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.
Merge branch 'master' of https://github.com/pbreault/adb-idea into pb…
…reault-master # Conflicts: # build.gradle # src/main/kotlin/com/developerphil/adbidea/adb/AdbFacade.kt # src/main/kotlin/com/developerphil/adbidea/debugger/Debugger.kt # src/main/kotlin/com/developerphil/adbidea/ui/DeviceChooserDialog.kt # src/main/kotlin/com/developerphil/adbidea/ui/NotificationHelper.kt # src/main/resources/META-INF/plugin.xml
- Loading branch information
Showing
43 changed files
with
521 additions
and
412 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
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
buildscript { | ||
|
||
ext.kotlin_version = '1.3.41' | ||
ext.kotlin_version = '1.3.61' | ||
|
||
repositories { | ||
mavenCentral() | ||
|
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
154 changes: 0 additions & 154 deletions
154
src/main/java/com/developerphil/adbidea/ui/DeviceChooserDialog.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package com.developerphil.adbidea | ||
|
||
import com.developerphil.adbidea.preference.ApplicationPreferences | ||
import com.developerphil.adbidea.preference.accessor.PreferenceAccessorImpl | ||
import com.developerphil.adbidea.ui.NotificationHelper | ||
import com.intellij.ide.plugins.PluginManager | ||
import com.intellij.ide.util.PropertiesComponent | ||
import com.intellij.openapi.components.ApplicationComponent | ||
import com.intellij.openapi.extensions.PluginId | ||
import com.intellij.util.text.SemVer | ||
|
||
|
||
private val pluginPackage = "com.developerphil.adbidea" | ||
|
||
// This is more of a service locator than a proper DI framework. | ||
// It's not used often enough in the codebase to warrant the complexity of a DI solution like dagger. | ||
class Application : ApplicationComponent { | ||
private val applicationPreferencesAccessor = PreferenceAccessorImpl(PropertiesComponent.getInstance()) | ||
private val applicationPreferences = ApplicationPreferences(applicationPreferencesAccessor) | ||
|
||
override fun initComponent() { | ||
try { | ||
val version = PluginManager.getPlugin(PluginId.getId(pluginPackage))!!.version!! | ||
applicationPreferences.savePreviousPluginVersion(SemVer.parseFromText(version)!!) | ||
} catch (e: Exception) { | ||
NotificationHelper.error("Couldn't initialize ADB Idea: ${e.message}") | ||
} | ||
} | ||
} |
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
28 changes: 0 additions & 28 deletions
28
src/main/kotlin/com/developerphil/adbidea/PluginPreferences.kt
This file was deleted.
Oops, something went wrong.
15 changes: 0 additions & 15 deletions
15
src/main/kotlin/com/developerphil/adbidea/accessor/preference/ProjectPreferenceAccessor.kt
This file was deleted.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
src/main/kotlin/com/developerphil/adbidea/action/ClearDataAndRestartWithDebuggerAction.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,14 @@ | ||
package com.developerphil.adbidea.action | ||
|
||
import com.developerphil.adbidea.adb.AdbFacade | ||
import com.developerphil.adbidea.adb.AdbUtil | ||
import com.intellij.openapi.actionSystem.AnActionEvent | ||
import com.intellij.openapi.project.Project | ||
|
||
class ClearDataAndRestartWithDebuggerAction : AdbAction() { | ||
override fun actionPerformed(e: AnActionEvent, project: Project) = AdbFacade.clearDataAndRestartWithDebugger(project) | ||
|
||
override fun update(e: AnActionEvent) { | ||
e.presentation.isEnabled = AdbUtil.isDebuggingAvailable | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
src/main/kotlin/com/developerphil/adbidea/action/DisableMobileAction.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,9 @@ | ||
package com.developerphil.adbidea.action | ||
|
||
import com.developerphil.adbidea.adb.AdbFacade | ||
import com.intellij.openapi.actionSystem.AnActionEvent | ||
import com.intellij.openapi.project.Project | ||
|
||
class DisableMobileAction : AdbAction() { | ||
override fun actionPerformed(e: AnActionEvent, project: Project) = AdbFacade.disableMobile(project) | ||
} |
9 changes: 9 additions & 0 deletions
9
src/main/kotlin/com/developerphil/adbidea/action/DisableWifiAction.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,9 @@ | ||
package com.developerphil.adbidea.action | ||
|
||
import com.developerphil.adbidea.adb.AdbFacade | ||
import com.intellij.openapi.actionSystem.AnActionEvent | ||
import com.intellij.openapi.project.Project | ||
|
||
class DisableWifiAction : AdbAction() { | ||
override fun actionPerformed(e: AnActionEvent, project: Project) = AdbFacade.disableWifi(project) | ||
} |
9 changes: 9 additions & 0 deletions
9
src/main/kotlin/com/developerphil/adbidea/action/EnableMobileAction.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,9 @@ | ||
package com.developerphil.adbidea.action | ||
|
||
import com.developerphil.adbidea.adb.AdbFacade | ||
import com.intellij.openapi.actionSystem.AnActionEvent | ||
import com.intellij.openapi.project.Project | ||
|
||
class EnableMobileAction : AdbAction() { | ||
override fun actionPerformed(e: AnActionEvent, project: Project) = AdbFacade.enableMobile(project) | ||
} |
9 changes: 9 additions & 0 deletions
9
src/main/kotlin/com/developerphil/adbidea/action/EnableWifiAction.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,9 @@ | ||
package com.developerphil.adbidea.action | ||
|
||
import com.developerphil.adbidea.adb.AdbFacade | ||
import com.intellij.openapi.actionSystem.AnActionEvent | ||
import com.intellij.openapi.project.Project | ||
|
||
class EnableWifiAction : AdbAction() { | ||
override fun actionPerformed(e: AnActionEvent, project: Project) = AdbFacade.enableWifi(project) | ||
} |
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
Oops, something went wrong.