Skip to content
This repository was archived by the owner on Jul 4, 2023. It is now read-only.

Commit f0d0d50

Browse files
author
Matt York
committed
- Made the default module selection be "app", if it is found
1 parent 255d27c commit f0d0d50

File tree

4 files changed

+21
-6
lines changed

4 files changed

+21
-6
lines changed

AndroidGears/.idea/misc.xml

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

AndroidGears/AndroidGears.iml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
88
<sourceFolder url="file://$MODULE_DIR$/resources" isTestSource="false" />
99
</content>
10-
<orderEntry type="jdk" jdkName="IDEA IC-139.225.3" jdkType="IDEA JDK" />
10+
<orderEntry type="jdk" jdkName="IDEA IC-135.480" jdkType="IDEA JDK" />
1111
<orderEntry type="sourceFolder" forTests="false" />
1212
<orderEntry type="module-library" exported="">
1313
<library>
@@ -23,4 +23,5 @@
2323
<orderEntry type="library" exported="" name="commons-io-2.4" level="project" />
2424
<orderEntry type="library" name="gson-2.2.4" level="project" />
2525
</component>
26-
</module>
26+
</module>
27+

AndroidGears/META-INF/plugin.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<idea-plugin version="2">
22
<id>com.github.androidgears.plugin5</id>
33
<name>Android Gears</name>
4-
<version>0.5.1</version>
4+
<version>0.5.2</version>
55
<vendor email="myork@cs.ua.edu" url="http://www.androidgears.org">Android Gears</vendor>
66

77
<description><![CDATA[

AndroidGears/src/Forms/ManageAndroidGearsForm.java

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,20 @@ public void actionPerformed(ActionEvent actionEvent) {
393393
//Setup Module Combo Box
394394
TargetModuleComboBox.setModel(new ListComboBoxModel<Module>(Arrays.asList(targetModules)));
395395
if (targetModules.length > 0) {
396-
TargetModuleComboBox.setSelectedIndex(targetModules.length - 1);
396+
//Look for the default name "app". This should cover most cases of selecting the right module by default
397+
Boolean defaultNameFound = false;
398+
for (int ii = 0; ii < targetModules.length; ii++){
399+
Module module = targetModules[ii];
400+
if (module.getName() == "app"){
401+
TargetModuleComboBox.setSelectedIndex(ii);
402+
defaultNameFound = true;
403+
}
404+
}
405+
406+
//If "app" is not found, select the first module in the list
407+
if (!defaultNameFound){
408+
TargetModuleComboBox.setSelectedIndex(0);
409+
}
397410
}
398411
TargetModuleComboBox.setRenderer(new ModuleCellRenderer());
399412
TargetModuleComboBox.addActionListener(new ActionListener() {

0 commit comments

Comments
 (0)