development
Revision | 8c32312983f8c3921c2097305205fbd407d1ab25 (tree) |
---|---|
Zeit | 2009-03-28 10:48:30 |
Autor | The Android Open Source Project <initial-contribution@andr...> |
Commiter | The Android Open Source Project |
Merge commit 'goog/cupcake'
@@ -548,16 +548,6 @@ public class Term extends Activity { | ||
548 | 548 | + controlKey + " 6 ==> Control-^"). |
549 | 549 | show(); |
550 | 550 | } |
551 | - | |
552 | - private void print(String msg) { | |
553 | - char[] chars = msg.toCharArray(); | |
554 | - int len = chars.length; | |
555 | - byte[] bytes = new byte[len]; | |
556 | - for (int i = 0; i < len; i++) { | |
557 | - bytes[i] = (byte) chars[i]; | |
558 | - } | |
559 | - mEmulatorView.append(bytes, 0, len); | |
560 | - } | |
561 | 551 | } |
562 | 552 | |
563 | 553 |
@@ -2707,8 +2697,13 @@ class EmulatorView extends View implements GestureDetector.OnGestureListener { | ||
2707 | 2697 | return null; |
2708 | 2698 | } |
2709 | 2699 | |
2710 | - public boolean hideStatusIcon() { | |
2711 | - return true; | |
2700 | + public boolean performEditorAction(int actionCode) { | |
2701 | + if(actionCode == EditorInfo.IME_ACTION_UNSPECIFIED) { | |
2702 | + // The "return" key has been pressed on the IME. | |
2703 | + sendText("\n"); | |
2704 | + return true; | |
2705 | + } | |
2706 | + return false; | |
2712 | 2707 | } |
2713 | 2708 | |
2714 | 2709 | public boolean performContextMenuAction(int id) { |
@@ -2720,13 +2715,12 @@ class EmulatorView extends View implements GestureDetector.OnGestureListener { | ||
2720 | 2715 | } |
2721 | 2716 | |
2722 | 2717 | public boolean sendKeyEvent(KeyEvent event) { |
2723 | - switch(event.getKeyCode()) { | |
2724 | - case KeyEvent.KEYCODE_ENTER: | |
2725 | - sendChar('\r'); | |
2726 | - break; | |
2727 | - case KeyEvent.KEYCODE_DEL: | |
2728 | - sendChar(127); | |
2729 | - break; | |
2718 | + if (event.getAction() == KeyEvent.ACTION_DOWN) { | |
2719 | + switch(event.getKeyCode()) { | |
2720 | + case KeyEvent.KEYCODE_DEL: | |
2721 | + sendChar(127); | |
2722 | + break; | |
2723 | + } | |
2730 | 2724 | } |
2731 | 2725 | return true; |
2732 | 2726 | } |
@@ -2739,10 +2733,6 @@ class EmulatorView extends View implements GestureDetector.OnGestureListener { | ||
2739 | 2733 | return true; |
2740 | 2734 | } |
2741 | 2735 | |
2742 | - public boolean showStatusIcon(String packageName, int resId) { | |
2743 | - return true; | |
2744 | - } | |
2745 | - | |
2746 | 2736 | private void sendChar(int c) { |
2747 | 2737 | try { |
2748 | 2738 | mTermOut.write(c); |
@@ -5,6 +5,7 @@ | ||
5 | 5 | * Project properties (right click project in Package Explorer, then "Properties"), lets you edit project target. |
6 | 6 | * New Launch configuration option to choose debug deployment target. |
7 | 7 | - Ability to export multiple apk from one project, using resource filters. See the 'android' property for Android projects. |
8 | +- Support for running JUnit tests on a device/emulator from a new "Android JUnit tests" launch configuration. | |
8 | 9 | |
9 | 10 | 0.8.1: |
10 | 11 |
@@ -45,16 +45,16 @@ Require-Bundle: com.android.ide.eclipse.ddms, | ||
45 | 45 | org.eclipse.ltk.core.refactoring, |
46 | 46 | org.eclipse.ltk.ui.refactoring |
47 | 47 | Eclipse-LazyStart: true |
48 | -Export-Package: com.android.ide.eclipse.adt, | |
48 | +Export-Package: com.android.ide.eclipse.adt;x-friends:="com.android.ide.eclipse.tests", | |
49 | 49 | com.android.ide.eclipse.adt.build;x-friends:="com.android.ide.eclipse.tests", |
50 | 50 | com.android.ide.eclipse.adt.launch;x-friends:="com.android.ide.eclipse.tests", |
51 | 51 | com.android.ide.eclipse.adt.project;x-friends:="com.android.ide.eclipse.tests", |
52 | 52 | com.android.ide.eclipse.adt.project.internal;x-friends:="com.android.ide.eclipse.tests", |
53 | 53 | com.android.ide.eclipse.adt.sdk;x-friends:="com.android.ide.eclipse.tests", |
54 | 54 | com.android.ide.eclipse.adt.wizards.newproject;x-friends:="com.android.ide.eclipse.tests", |
55 | - com.android.ide.eclipse.common, | |
56 | - com.android.ide.eclipse.common.project, | |
57 | - com.android.ide.eclipse.common.resources, | |
55 | + com.android.ide.eclipse.common;x-friends:="com.android.ide.eclipse.tests", | |
56 | + com.android.ide.eclipse.common.project;x-friends:="com.android.ide.eclipse.tests", | |
57 | + com.android.ide.eclipse.common.resources;x-friends:="com.android.ide.eclipse.tests", | |
58 | 58 | com.android.ide.eclipse.editors;x-friends:="com.android.ide.eclipse.tests", |
59 | 59 | com.android.ide.eclipse.editors.descriptors;x-friends:="com.android.ide.eclipse.tests", |
60 | 60 | com.android.ide.eclipse.editors.layout;x-friends:="com.android.ide.eclipse.tests", |
@@ -18,6 +18,7 @@ package com.android.ide.eclipse.adt.build; | ||
18 | 18 | |
19 | 19 | import com.android.ide.eclipse.adt.AdtConstants; |
20 | 20 | import com.android.ide.eclipse.adt.AdtPlugin; |
21 | +import com.android.ide.eclipse.adt.project.ApkInstallManager; | |
21 | 22 | import com.android.ide.eclipse.adt.project.ProjectHelper; |
22 | 23 | import com.android.ide.eclipse.adt.sdk.AndroidTargetData; |
23 | 24 | import com.android.ide.eclipse.adt.sdk.Sdk; |
@@ -551,6 +552,9 @@ public class ApkBuilder extends BaseBuilder { | ||
551 | 552 | // and store it |
552 | 553 | saveProjectBooleanProperty(PROPERTY_BUILD_APK, mBuildFinalPackage); |
553 | 554 | |
555 | + // reset the installation manager to force new installs of this project | |
556 | + ApkInstallManager.getInstance().resetInstallationFor(project); | |
557 | + | |
554 | 558 | AdtPlugin.printBuildToConsole(AdtConstants.BUILD_VERBOSE, getProject(), |
555 | 559 | "Build Success!"); |
556 | 560 | } |
@@ -32,6 +32,7 @@ import com.android.ide.eclipse.adt.AdtPlugin; | ||
32 | 32 | import com.android.ide.eclipse.adt.launch.AndroidLaunchConfiguration.TargetMode; |
33 | 33 | import com.android.ide.eclipse.adt.launch.DelayedLaunchInfo.InstallRetryMode; |
34 | 34 | import com.android.ide.eclipse.adt.launch.DeviceChooserDialog.DeviceChooserResponse; |
35 | +import com.android.ide.eclipse.adt.project.ApkInstallManager; | |
35 | 36 | import com.android.ide.eclipse.adt.project.ProjectHelper; |
36 | 37 | import com.android.ide.eclipse.adt.sdk.Sdk; |
37 | 38 | import com.android.ide.eclipse.common.project.AndroidManifestParser; |
@@ -762,13 +763,46 @@ public final class AndroidLaunchController implements IDebugBridgeChangeListener | ||
762 | 763 | |
763 | 764 | |
764 | 765 | /** |
765 | - * Syncs the application on the device/emulator. | |
766 | + * If needed, syncs the application and all its dependencies on the device/emulator. | |
766 | 767 | * |
767 | 768 | * @param launchInfo The Launch information object. |
768 | 769 | * @param device the device on which to sync the application |
769 | 770 | * @return true if the install succeeded. |
770 | 771 | */ |
771 | 772 | private boolean syncApp(DelayedLaunchInfo launchInfo, IDevice device) { |
773 | + boolean alreadyInstalled = ApkInstallManager.getInstance().isApplicationInstalled( | |
774 | + launchInfo.getProject(), device); | |
775 | + | |
776 | + if (alreadyInstalled) { | |
777 | + AdtPlugin.printToConsole(launchInfo.getProject(), | |
778 | + "Application already deployed. No need to reinstall."); | |
779 | + } else { | |
780 | + if (doSyncApp(launchInfo, device) == false) { | |
781 | + return false; | |
782 | + } | |
783 | + } | |
784 | + | |
785 | + // The app is now installed, now try the dependent projects | |
786 | + for (DelayedLaunchInfo dependentLaunchInfo : getDependenciesLaunchInfo(launchInfo)) { | |
787 | + String msg = String.format("Project dependency found, installing: %s", | |
788 | + dependentLaunchInfo.getProject().getName()); | |
789 | + AdtPlugin.printToConsole(launchInfo.getProject(), msg); | |
790 | + if (syncApp(dependentLaunchInfo, device) == false) { | |
791 | + return false; | |
792 | + } | |
793 | + } | |
794 | + | |
795 | + return true; | |
796 | + } | |
797 | + | |
798 | + /** | |
799 | + * Syncs the application on the device/emulator. | |
800 | + * | |
801 | + * @param launchInfo The Launch information object. | |
802 | + * @param device the device on which to sync the application | |
803 | + * @return true if the install succeeded. | |
804 | + */ | |
805 | + private boolean doSyncApp(DelayedLaunchInfo launchInfo, IDevice device) { | |
772 | 806 | SyncService sync = device.getSyncService(); |
773 | 807 | if (sync != null) { |
774 | 808 | IPath path = launchInfo.getPackageFile().getLocation(); |
@@ -812,12 +846,10 @@ public final class AndroidLaunchController implements IDebugBridgeChangeListener | ||
812 | 846 | return false; |
813 | 847 | } |
814 | 848 | |
815 | - // The app is now installed, now try the dependent projects | |
816 | - for (DelayedLaunchInfo dependentLaunchInfo : getDependenciesLaunchInfo(launchInfo)) { | |
817 | - String msg = String.format("Project dependency found, syncing: %s", | |
818 | - dependentLaunchInfo.getProject().getName()); | |
819 | - AdtPlugin.printToConsole(launchInfo.getProject(), msg); | |
820 | - syncApp(dependentLaunchInfo, device); | |
849 | + // if the installation succeeded, we register it. | |
850 | + if (installResult) { | |
851 | + ApkInstallManager.getInstance().registerInstallation( | |
852 | + launchInfo.getProject(), device); | |
821 | 853 | } |
822 | 854 | |
823 | 855 | return installResult; |
@@ -0,0 +1,207 @@ | ||
1 | +/* | |
2 | + * Copyright (C) 2009 The Android Open Source Project | |
3 | + * | |
4 | + * Licensed under the Eclipse Public License, Version 1.0 (the "License"); | |
5 | + * you may not use this file except in compliance with the License. | |
6 | + * You may obtain a copy of the License at | |
7 | + * | |
8 | + * http://www.eclipse.org/org/documents/epl-v10.php | |
9 | + * | |
10 | + * Unless required by applicable law or agreed to in writing, software | |
11 | + * distributed under the License is distributed on an "AS IS" BASIS, | |
12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
13 | + * See the License for the specific language governing permissions and | |
14 | + * limitations under the License. | |
15 | + */ | |
16 | + | |
17 | +package com.android.ide.eclipse.adt.project; | |
18 | + | |
19 | +import com.android.ddmlib.AndroidDebugBridge; | |
20 | +import com.android.ddmlib.Device; | |
21 | +import com.android.ddmlib.IDevice; | |
22 | +import com.android.ddmlib.AndroidDebugBridge.IDebugBridgeChangeListener; | |
23 | +import com.android.ddmlib.AndroidDebugBridge.IDeviceChangeListener; | |
24 | +import com.android.ide.eclipse.editors.resources.manager.ResourceMonitor; | |
25 | +import com.android.ide.eclipse.editors.resources.manager.ResourceMonitor.IProjectListener; | |
26 | + | |
27 | +import org.eclipse.core.resources.IProject; | |
28 | + | |
29 | +import java.util.ArrayList; | |
30 | + | |
31 | +/** | |
32 | + * Registers which apk was installed on which device. | |
33 | + * <p/> | |
34 | + * The goal of this class is to remember the installation of APKs on devices, and provide | |
35 | + * information about whether a new APK should be installed on a device prior to running the | |
36 | + * application from a launch configuration. | |
37 | + * <p/> | |
38 | + * The manager uses {@link IProject} and {@link IDevice} to identify the target device and the | |
39 | + * (project generating the) APK. This ensures that disconnected and reconnected devices will | |
40 | + * always receive new APKs (since the APK could be uninstalled manually). | |
41 | + * <p/> | |
42 | + * Manually uninstalling an APK from a connected device will still be a problem, but this should | |
43 | + * be a limited use case. | |
44 | + * <p/> | |
45 | + * This is a singleton. To get the instance, use {@link #getInstance()} | |
46 | + */ | |
47 | +public class ApkInstallManager implements IDeviceChangeListener, IDebugBridgeChangeListener, | |
48 | + IProjectListener { | |
49 | + | |
50 | + private final static ApkInstallManager sThis = new ApkInstallManager(); | |
51 | + | |
52 | + /** | |
53 | + * Internal struct to associate a project and a device. | |
54 | + */ | |
55 | + private static class ApkInstall { | |
56 | + public ApkInstall(IProject project, IDevice device) { | |
57 | + this.project = project; | |
58 | + this.device = device; | |
59 | + } | |
60 | + IProject project; | |
61 | + IDevice device; | |
62 | + } | |
63 | + | |
64 | + private final ArrayList<ApkInstall> mInstallList = new ArrayList<ApkInstall>(); | |
65 | + | |
66 | + public static ApkInstallManager getInstance() { | |
67 | + return sThis; | |
68 | + } | |
69 | + | |
70 | + /** | |
71 | + * Registers an installation of <var>project</var> onto <var>device</var> | |
72 | + * @param project The project that was installed. | |
73 | + * @param device The device that received the installation. | |
74 | + */ | |
75 | + public void registerInstallation(IProject project, IDevice device) { | |
76 | + synchronized (mInstallList) { | |
77 | + mInstallList.add(new ApkInstall(project, device)); | |
78 | + } | |
79 | + } | |
80 | + | |
81 | + /** | |
82 | + * Returns whether a <var>project</var> was installed on the <var>device</var>. | |
83 | + * @param project the project that may have been installed. | |
84 | + * @param device the device that may have received the installation. | |
85 | + * @return | |
86 | + */ | |
87 | + public boolean isApplicationInstalled(IProject project, IDevice device) { | |
88 | + synchronized (mInstallList) { | |
89 | + for (ApkInstall install : mInstallList) { | |
90 | + if (project == install.project && device == install.device) { | |
91 | + return true; | |
92 | + } | |
93 | + } | |
94 | + } | |
95 | + return false; | |
96 | + } | |
97 | + | |
98 | + /** | |
99 | + * Resets registered installations for a specific {@link IProject}. | |
100 | + * <p/>This ensures that {@link #isApplicationInstalled(IProject, IDevice)} will always return | |
101 | + * <code>null</code> for this specified project, for any device. | |
102 | + * @param project the project for which to reset all installations. | |
103 | + */ | |
104 | + public void resetInstallationFor(IProject project) { | |
105 | + synchronized (mInstallList) { | |
106 | + for (int i = 0 ; i < mInstallList.size() ;) { | |
107 | + ApkInstall install = mInstallList.get(i); | |
108 | + if (install.project == project) { | |
109 | + mInstallList.remove(i); | |
110 | + } else { | |
111 | + i++; | |
112 | + } | |
113 | + } | |
114 | + } | |
115 | + } | |
116 | + | |
117 | + private ApkInstallManager() { | |
118 | + AndroidDebugBridge.addDeviceChangeListener(this); | |
119 | + AndroidDebugBridge.addDebugBridgeChangeListener(this); | |
120 | + ResourceMonitor.getMonitor().addProjectListener(this); | |
121 | + } | |
122 | + | |
123 | + /* | |
124 | + * Responds to a bridge change by clearing the full installation list. | |
125 | + * (non-Javadoc) | |
126 | + * @see com.android.ddmlib.AndroidDebugBridge.IDebugBridgeChangeListener#bridgeChanged(com.android.ddmlib.AndroidDebugBridge) | |
127 | + */ | |
128 | + public void bridgeChanged(AndroidDebugBridge bridge) { | |
129 | + // the bridge changed, there is no way to know which IDevice will be which. | |
130 | + // We reset everything | |
131 | + synchronized (mInstallList) { | |
132 | + mInstallList.clear(); | |
133 | + } | |
134 | + } | |
135 | + | |
136 | + /* | |
137 | + * Responds to a device being disconnected by removing all installations related to this device. | |
138 | + * (non-Javadoc) | |
139 | + * @see com.android.ddmlib.AndroidDebugBridge.IDeviceChangeListener#deviceDisconnected(com.android.ddmlib.Device) | |
140 | + */ | |
141 | + public void deviceDisconnected(Device device) { | |
142 | + synchronized (mInstallList) { | |
143 | + for (int i = 0 ; i < mInstallList.size() ;) { | |
144 | + ApkInstall install = mInstallList.get(i); | |
145 | + if (install.device == device) { | |
146 | + mInstallList.remove(i); | |
147 | + } else { | |
148 | + i++; | |
149 | + } | |
150 | + } | |
151 | + } | |
152 | + } | |
153 | + | |
154 | + /* | |
155 | + * Responds to a close project by resetting all its installation. | |
156 | + * (non-Javadoc) | |
157 | + * @see com.android.ide.eclipse.editors.resources.manager.ResourceMonitor.IProjectListener#projectClosed(org.eclipse.core.resources.IProject) | |
158 | + */ | |
159 | + public void projectClosed(IProject project) { | |
160 | + resetInstallationFor(project); | |
161 | + } | |
162 | + | |
163 | + /* | |
164 | + * Responds to a close project by resetting all its installation. | |
165 | + * (non-Javadoc) | |
166 | + * @see com.android.ide.eclipse.editors.resources.manager.ResourceMonitor.IProjectListener#projectDeleted(org.eclipse.core.resources.IProject) | |
167 | + */ | |
168 | + public void projectDeleted(IProject project) { | |
169 | + resetInstallationFor(project); | |
170 | + } | |
171 | + | |
172 | + /* | |
173 | + * Does nothing | |
174 | + * (non-Javadoc) | |
175 | + * @see com.android.ddmlib.AndroidDebugBridge.IDeviceChangeListener#deviceChanged(com.android.ddmlib.Device, int) | |
176 | + */ | |
177 | + public void deviceChanged(Device device, int changeMask) { | |
178 | + // nothing to do. | |
179 | + } | |
180 | + | |
181 | + /* | |
182 | + * Does nothing | |
183 | + * (non-Javadoc) | |
184 | + * @see com.android.ddmlib.AndroidDebugBridge.IDeviceChangeListener#deviceConnected(com.android.ddmlib.Device) | |
185 | + */ | |
186 | + public void deviceConnected(Device device) { | |
187 | + // nothing to do. | |
188 | + } | |
189 | + | |
190 | + /* | |
191 | + * Does nothing | |
192 | + * (non-Javadoc) | |
193 | + * @see com.android.ide.eclipse.editors.resources.manager.ResourceMonitor.IProjectListener#projectOpened(org.eclipse.core.resources.IProject) | |
194 | + */ | |
195 | + public void projectOpened(IProject project) { | |
196 | + // nothing to do. | |
197 | + } | |
198 | + | |
199 | + /* | |
200 | + * Does nothing | |
201 | + * (non-Javadoc) | |
202 | + * @see com.android.ide.eclipse.editors.resources.manager.ResourceMonitor.IProjectListener#projectOpenedWithWorkspace(org.eclipse.core.resources.IProject) | |
203 | + */ | |
204 | + public void projectOpenedWithWorkspace(IProject project) { | |
205 | + // nothing to do. | |
206 | + } | |
207 | +} |
@@ -16,7 +16,7 @@ | ||
16 | 16 | |
17 | 17 | package com.android.ide.eclipse.adt.wizards.actions; |
18 | 18 | |
19 | -import com.android.ide.eclipse.editors.wizards.NewXmlFileWizard; | |
19 | +import com.android.ide.eclipse.adt.wizards.newxmlfile.NewXmlFileWizard; | |
20 | 20 | |
21 | 21 | import org.eclipse.jface.action.IAction; |
22 | 22 | import org.eclipse.ui.IWorkbenchWizard; |
@@ -14,9 +14,9 @@ | ||
14 | 14 | * limitations under the License. |
15 | 15 | */ |
16 | 16 | |
17 | -package com.android.ide.eclipse.adt.project; | |
17 | +package com.android.ide.eclipse.adt.wizards.actions; | |
18 | 18 | |
19 | -import com.android.ide.eclipse.editors.wizards.NewXmlFileWizard; | |
19 | +import com.android.ide.eclipse.adt.wizards.newxmlfile.NewXmlFileWizard; | |
20 | 20 | |
21 | 21 | import org.eclipse.jface.action.IAction; |
22 | 22 | import org.eclipse.jface.viewers.ISelection; |
@@ -15,7 +15,7 @@ | ||
15 | 15 | */ |
16 | 16 | |
17 | 17 | |
18 | -package com.android.ide.eclipse.editors.wizards; | |
18 | +package com.android.ide.eclipse.adt.wizards.newxmlfile; | |
19 | 19 | |
20 | 20 | import com.android.ide.eclipse.adt.AdtPlugin; |
21 | 21 | import com.android.ide.eclipse.adt.sdk.AndroidTargetData; |
@@ -31,6 +31,7 @@ import com.android.ide.eclipse.editors.resources.configurations.FolderConfigurat | ||
31 | 31 | import com.android.ide.eclipse.editors.resources.configurations.ResourceQualifier; |
32 | 32 | import com.android.ide.eclipse.editors.resources.descriptors.ResourcesDescriptors; |
33 | 33 | import com.android.ide.eclipse.editors.resources.manager.ResourceFolderType; |
34 | +import com.android.ide.eclipse.editors.wizards.ConfigurationSelector; | |
34 | 35 | import com.android.ide.eclipse.editors.wizards.ConfigurationSelector.ConfigurationState; |
35 | 36 | import com.android.sdklib.IAndroidTarget; |
36 | 37 | import com.android.sdklib.SdkConstants; |
@@ -16,11 +16,11 @@ | ||
16 | 16 | |
17 | 17 | |
18 | 18 | |
19 | -package com.android.ide.eclipse.editors.wizards; | |
19 | +package com.android.ide.eclipse.adt.wizards.newxmlfile; | |
20 | 20 | |
21 | 21 | import com.android.ide.eclipse.adt.AdtPlugin; |
22 | +import com.android.ide.eclipse.adt.wizards.newxmlfile.NewXmlFileCreationPage.TypeInfo; | |
22 | 23 | import com.android.ide.eclipse.editors.IconFactory; |
23 | -import com.android.ide.eclipse.editors.wizards.NewXmlFileCreationPage.TypeInfo; | |
24 | 24 | |
25 | 25 | import org.eclipse.core.resources.IContainer; |
26 | 26 | import org.eclipse.core.resources.IFile; |
@@ -90,7 +90,7 @@ public class AndroidConstants { | ||
90 | 90 | |
91 | 91 | /** Name of the android sources directory */ |
92 | 92 | public static final String FD_ANDROID_SOURCES = "sources"; //$NON-NLS-1$ |
93 | - | |
93 | + | |
94 | 94 | /** Resource java class filename, i.e. "R.java" */ |
95 | 95 | public final static String FN_RESOURCE_CLASS = "R.java"; //$NON-NLS-1$ |
96 | 96 | /** Resource class file filename, i.e. "R.class" */ |
@@ -128,7 +128,8 @@ public class AndroidConstants { | ||
128 | 128 | public final static String WS_ASSETS = WS_SEP + SdkConstants.FD_ASSETS; |
129 | 129 | |
130 | 130 | /** Leaf of the javaDoc folder. Does not start with a separator. */ |
131 | - public final static String WS_JAVADOC_FOLDER_LEAF = SdkConstants.FD_DOCS + "/reference"; //$NON-NLS-1$ | |
131 | + public final static String WS_JAVADOC_FOLDER_LEAF = SdkConstants.FD_DOCS + "/" + | |
132 | + SdkConstants.FD_DOCS_REFERENCE; //$NON-NLS-1$ | |
132 | 133 | |
133 | 134 | /** Path of the samples directory relative to the sdk folder. |
134 | 135 | * This is an OS path, ending with a separator. |
@@ -153,7 +153,8 @@ final class AddOnTarget implements IAndroidTarget { | ||
153 | 153 | case SKINS: |
154 | 154 | return mLocation + SdkConstants.OS_SKINS_FOLDER; |
155 | 155 | case DOCS: |
156 | - return mLocation + SdkConstants.FD_DOCS + File.separator; | |
156 | + return mLocation + SdkConstants.FD_DOCS + File.separator | |
157 | + + SdkConstants.FD_DOCS_REFERENCE; | |
157 | 158 | default : |
158 | 159 | return mBasePlatform.getPath(pathId); |
159 | 160 | } |
@@ -143,6 +143,8 @@ public final class SdkConstants { | ||
143 | 143 | public final static String FD_LIB = "lib"; |
144 | 144 | /** Name of the SDK docs folder. */ |
145 | 145 | public final static String FD_DOCS = "docs"; |
146 | + /** Name of the doc folder containing API reference doc (javadoc) */ | |
147 | + public static final String FD_DOCS_REFERENCE = "reference"; | |
146 | 148 | /** Name of the SDK images folder. */ |
147 | 149 | public final static String FD_IMAGES = "images"; |
148 | 150 | /** Name of the SDK skins folder. */ |
@@ -89,9 +89,9 @@ public final class AvdSelector { | ||
89 | 89 | final TableColumn column1 = new TableColumn(mTable, SWT.NONE); |
90 | 90 | column1.setText("Target Name"); |
91 | 91 | final TableColumn column2 = new TableColumn(mTable, SWT.NONE); |
92 | - column2.setText("API Level"); | |
92 | + column2.setText("SDK"); | |
93 | 93 | final TableColumn column3 = new TableColumn(mTable, SWT.NONE); |
94 | - column3.setText("SDK"); | |
94 | + column3.setText("API Level"); | |
95 | 95 | |
96 | 96 | adjustColumnsWidth(mTable, column0, column1, column2, column3); |
97 | 97 | setupSelectionListener(mTable); |
@@ -235,8 +235,8 @@ public final class AvdSelector { | ||
235 | 235 | Rectangle r = table.getClientArea(); |
236 | 236 | column0.setWidth(r.width * 30 / 100); // 30% |
237 | 237 | column1.setWidth(r.width * 45 / 100); // 45% |
238 | - column2.setWidth(r.width * 15 / 100); // 15% | |
239 | - column3.setWidth(r.width * 10 / 100); // 10% | |
238 | + column2.setWidth(r.width * 10 / 100); // 10% | |
239 | + column3.setWidth(r.width * 15 / 100); // 15% | |
240 | 240 | } |
241 | 241 | }); |
242 | 242 | } |