forked from pbreault/adb-idea
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Conflicts: # src/main/resources/META-INF/plugin.xml
- Loading branch information
Showing
7 changed files
with
39 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 0 additions & 39 deletions
39
src/main/java/com/developerphil/adbidea/compatibility/CanRunOnDeviceCompat.java
This file was deleted.
Oops, something went wrong.
24 changes: 24 additions & 0 deletions
24
src/main/java/com/developerphil/adbidea/compatibility/CanRunOnDeviceCompat.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.developerphil.adbidea.compatibility | ||
|
||
import com.android.ddmlib.IDevice | ||
import com.android.tools.idea.run.* | ||
import org.jetbrains.android.facet.AndroidFacet | ||
import org.joor.on | ||
import org.joor.asType | ||
|
||
class CanRunOnDeviceCompat(private val myFacet: AndroidFacet, device: IDevice) : BackwardCompatibleGetter<LaunchCompatibility>() { | ||
|
||
private val androidDevice = ConnectedAndroidDevice(device, null) | ||
|
||
override// Android Studio 3.4+ | ||
fun getCurrentImplementation() = on<LaunchCompatibilityCheckerImpl>() | ||
.call("create", myFacet, null, null) | ||
.asType<LaunchCompatibilityChecker>() | ||
.validate(androidDevice) | ||
|
||
override// Android Studio 3.3 & Intellij 2018.3 | ||
fun getPreviousImplementation() = on<LaunchCompatibilityCheckerImpl>() | ||
.call("create", myFacet) | ||
.asType<LaunchCompatibilityChecker>() | ||
.validate(androidDevice) | ||
} |
42 changes: 0 additions & 42 deletions
42
...veloperphil/adbidea/compatibility/CanRunOnDeviceCompatForIntellij2016DotOneAndDotTwo.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package org.joor | ||
|
||
inline fun <reified T> on() = Reflect.on(T::class.java) | ||
inline fun <reified T> Reflect.asType() = this.`as`(T::class.java) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters