Merge korg/donut into korg/master
Conflicts: tools/eclipse/plugins/README.txt tools/sdkmanager/libs/sdklib/src/com/android/sdklib/avd/AvdManager.java
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="lib" path="jarutils.jar"/>
|
||||
<classpathentry kind="lib" path="androidprefs.jar"/>
|
||||
<classpathentry kind="lib" path="sdkstats.jar"/>
|
||||
<classpathentry kind="lib" path="sdkstats.jar" sourcepath="/SdkStatsService"/>
|
||||
<classpathentry kind="lib" path="kxml2-2.3.0.jar"/>
|
||||
<classpathentry kind="lib" path="layoutlib_api.jar"/>
|
||||
<classpathentry kind="lib" path="layoutlib_utils.jar"/>
|
||||
|
||||
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Android Development Toolkit
|
||||
Bundle-SymbolicName: com.android.ide.eclipse.adt;singleton:=true
|
||||
Bundle-Version: 0.9.0.qualifier
|
||||
Bundle-Version: 0.9.1.qualifier
|
||||
Bundle-ClassPath: .,
|
||||
jarutils.jar,
|
||||
androidprefs.jar,
|
||||
@@ -47,39 +47,59 @@ Require-Bundle: com.android.ide.eclipse.ddms,
|
||||
org.eclipse.core.expressions
|
||||
Eclipse-LazyStart: true
|
||||
Export-Package: com.android.ide.eclipse.adt;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.adt.build;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.adt.launch;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.adt.project;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.adt.project.internal;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.adt.sdk;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.adt.wizards.newproject;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.adt.ui;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.common;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.common.project;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.common.resources;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.editors;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.editors.descriptors;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.editors.layout;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.editors.layout.descriptors;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.editors.layout.parts;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.editors.layout.uimodel;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.editors.manifest;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.editors.manifest.descriptors;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.editors.manifest.model;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.editors.manifest.pages;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.editors.menu;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.editors.menu.descriptors;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.editors.resources;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.editors.resources.configurations;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.editors.resources.descriptors;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.editors.resources.explorer;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.editors.resources.manager;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.editors.resources.manager.files;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.editors.resources.uimodel;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.editors.ui;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.editors.ui.tree;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.editors.uimodel;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.editors.xml;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.editors.xml.descriptors;x-friends:="com.android.ide.eclipse.tests"
|
||||
com.android.ide.eclipse.adt.internal;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.adt.internal.actions;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.adt.internal.build;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.adt.internal.editors;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.adt.internal.editors.descriptors;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.adt.internal.editors.layout;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.adt.internal.editors.layout.descriptors;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.adt.internal.editors.layout.parts;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.adt.internal.editors.layout.uimodel;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.adt.internal.editors.manifest;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.adt.internal.editors.manifest.descriptors;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.adt.internal.editors.manifest.model;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.adt.internal.editors.manifest.pages;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.adt.internal.editors.menu;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.adt.internal.editors.menu.descriptors;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.adt.internal.editors.resources;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.adt.internal.editors.resources.descriptors;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.adt.internal.editors.resources.uimodel;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.adt.internal.editors.ui;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.adt.internal.editors.ui.tree;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.adt.internal.editors.uimodel;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.adt.internal.editors.xml;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.adt.internal.editors.xml.descriptors;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.adt.internal.launch;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.adt.internal.launch.junit;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.adt.internal.launch.junit.runtime;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.adt.internal.preferences;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.adt.internal.project;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.adt.internal.properties;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.adt.internal.refactorings.extractstring;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.adt.internal.resources;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.adt.internal.resources.configurations;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.adt.internal.resources.manager;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.adt.internal.resources.manager.files;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.adt.internal.sdk;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.adt.internal.ui;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.adt.internal.wizards.actions;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.adt.internal.wizards.export;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.adt.internal.wizards.newproject;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ide.eclipse.adt.internal.wizards.newxmlfile;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.jarutils;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.layoutlib.api;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.layoutlib.utils;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.ninepatch;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.prefs;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.sdklib;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.sdklib.internal.avd;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.sdklib.internal.project;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.sdklib.internal.repository;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.sdklib.repository;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.sdkstats;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.sdkuilib.internal.repository;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.sdkuilib.internal.widgets;x-friends:="com.android.ide.eclipse.tests",
|
||||
com.android.sdkuilib.repository;x-friends:="com.android.ide.eclipse.tests"
|
||||
|
||||
|
||||
|
||||
BIN
tools/eclipse/plugins/com.android.ide.eclipse.adt/icons/avd_manager.png
Executable file
BIN
tools/eclipse/plugins/com.android.ide.eclipse.adt/icons/avd_manager.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 135 B |
@@ -47,7 +47,7 @@
|
||||
point="org.eclipse.core.resources.builders">
|
||||
<builder
|
||||
hasNature="true">
|
||||
<run class="com.android.ide.eclipse.adt.build.ResourceManagerBuilder"/>
|
||||
<run class="com.android.ide.eclipse.adt.internal.build.ResourceManagerBuilder"/>
|
||||
</builder>
|
||||
</extension>
|
||||
<extension
|
||||
@@ -56,7 +56,7 @@
|
||||
point="org.eclipse.core.resources.builders">
|
||||
<builder
|
||||
hasNature="true">
|
||||
<run class="com.android.ide.eclipse.adt.build.PreCompilerBuilder"/>
|
||||
<run class="com.android.ide.eclipse.adt.internal.build.PreCompilerBuilder"/>
|
||||
</builder>
|
||||
</extension>
|
||||
<extension
|
||||
@@ -65,7 +65,7 @@
|
||||
point="org.eclipse.core.resources.builders">
|
||||
<builder
|
||||
hasNature="true">
|
||||
<run class="com.android.ide.eclipse.adt.build.ApkBuilder"/>
|
||||
<run class="com.android.ide.eclipse.adt.internal.build.ApkBuilder"/>
|
||||
</builder>
|
||||
</extension>
|
||||
<extension
|
||||
@@ -73,7 +73,7 @@
|
||||
name="AndroidNature"
|
||||
point="org.eclipse.core.resources.natures">
|
||||
<runtime>
|
||||
<run class="com.android.ide.eclipse.adt.project.AndroidNature"/>
|
||||
<run class="com.android.ide.eclipse.adt.internal.project.AndroidNature"/>
|
||||
</runtime>
|
||||
<builder id="com.android.ide.eclipse.adt.ResourceManagerBuilder"/>
|
||||
<builder id="com.android.ide.eclipse.adt.PreCompilerBuilder"/>
|
||||
@@ -87,10 +87,10 @@
|
||||
<wizard
|
||||
canFinishEarly="false"
|
||||
category="com.android.ide.eclipse.wizards.category"
|
||||
class="com.android.ide.eclipse.adt.wizards.newproject.NewProjectWizard"
|
||||
class="com.android.ide.eclipse.adt.internal.wizards.newproject.NewProjectWizard"
|
||||
finalPerspective="org.eclipse.jdt.ui.JavaPerspective"
|
||||
hasPages="true"
|
||||
icon="icons/android.png"
|
||||
icon="icons/new_adt_project.png"
|
||||
id="com.android.ide.eclipse.adt.project.NewProjectWizard"
|
||||
name="Android Project"
|
||||
preferredPerspectives="org.eclipse.jdt.ui.JavaPerspective"
|
||||
@@ -98,10 +98,22 @@
|
||||
<wizard
|
||||
canFinishEarly="false"
|
||||
category="com.android.ide.eclipse.wizards.category"
|
||||
class="com.android.ide.eclipse.editors.wizards.NewXmlFileWizard"
|
||||
class="com.android.ide.eclipse.adt.internal.wizards.newproject.NewTestProjectWizard"
|
||||
finalPerspective="org.eclipse.jdt.ui.JavaPerspective"
|
||||
hasPages="true"
|
||||
icon="icons/android.png"
|
||||
icon="icons/androidjunit.png"
|
||||
id="com.android.ide.eclipse.adt.project.NewTestProjectWizard"
|
||||
name="Android Test Project"
|
||||
preferredPerspectives="org.eclipse.jdt.ui.JavaPerspective"
|
||||
project="true">
|
||||
</wizard>
|
||||
<wizard
|
||||
canFinishEarly="false"
|
||||
category="com.android.ide.eclipse.wizards.category"
|
||||
class="com.android.ide.eclipse.adt.internal.wizards.newxmlfile.NewXmlFileWizard"
|
||||
finalPerspective="org.eclipse.jdt.ui.JavaPerspective"
|
||||
hasPages="true"
|
||||
icon="icons/new_xml.png"
|
||||
id="com.android.ide.eclipse.editors.wizards.NewXmlFileWizard"
|
||||
name="Android XML File"
|
||||
preferredPerspectives="org.eclipse.jdt.ui.JavaPerspective"
|
||||
@@ -111,7 +123,7 @@
|
||||
<extension
|
||||
point="org.eclipse.debug.core.launchConfigurationTypes">
|
||||
<launchConfigurationType
|
||||
delegate="com.android.ide.eclipse.adt.launch.LaunchConfigDelegate"
|
||||
delegate="com.android.ide.eclipse.adt.internal.launch.LaunchConfigDelegate"
|
||||
delegateDescription="The Android Application Launcher supports running and debugging remote Android applications on devices or emulators."
|
||||
delegateName="Android Launcher"
|
||||
id="com.android.ide.eclipse.adt.debug.LaunchConfigType"
|
||||
@@ -132,7 +144,7 @@
|
||||
<extension
|
||||
point="org.eclipse.debug.ui.launchConfigurationTabGroups">
|
||||
<launchConfigurationTabGroup
|
||||
class="com.android.ide.eclipse.adt.launch.LaunchConfigTabGroup"
|
||||
class="com.android.ide.eclipse.adt.internal.launch.LaunchConfigTabGroup"
|
||||
description="Android Application"
|
||||
id="com.android.ide.eclipse.adt.debug.LaunchConfigTabGroup"
|
||||
type="com.android.ide.eclipse.adt.debug.LaunchConfigType"/>
|
||||
@@ -141,7 +153,7 @@
|
||||
point="org.eclipse.debug.ui.launchShortcuts">
|
||||
<shortcut
|
||||
category="com.android.ide.eclipse.adt.launch.LaunchConfigType"
|
||||
class="com.android.ide.eclipse.adt.launch.LaunchShortcut"
|
||||
class="com.android.ide.eclipse.adt.internal.launch.LaunchShortcut"
|
||||
icon="icons/android.png"
|
||||
id="com.android.ide.eclipse.adt.debug.launching.LaunchShortcut"
|
||||
label="Android Application"
|
||||
@@ -197,7 +209,7 @@
|
||||
</not>
|
||||
</visibility>
|
||||
<action
|
||||
class="com.android.ide.eclipse.adt.project.ConvertToAndroidAction"
|
||||
class="com.android.ide.eclipse.adt.internal.actions.ConvertToAndroidAction"
|
||||
enablesFor="1"
|
||||
id="com.android.ide.eclipse.adt.ConvertToAndroidAction"
|
||||
label="Convert To Android Project"
|
||||
@@ -220,26 +232,37 @@
|
||||
value="com.android.ide.eclipse.adt.AndroidNature">
|
||||
</filter>
|
||||
<action
|
||||
class="com.android.ide.eclipse.adt.project.NewXmlFileWizardAction"
|
||||
class="com.android.ide.eclipse.adt.internal.wizards.actions.NewXmlFileAction"
|
||||
enablesFor="1"
|
||||
id="com.android.ide.eclipse.adt.project.NewXmlFileWizardAction"
|
||||
icon="icons/new_xml.png"
|
||||
id="com.android.ide.eclipse.adt.wizards.actions.NewXmlFileAction"
|
||||
label="New Resource File..."
|
||||
menubarPath="com.android.ide.eclipse.adt.AndroidTools/group1">
|
||||
menubarPath="com.android.ide.eclipse.adt.AndroidTools/group1"
|
||||
tooltip="Opens a wizard to help create a new Android XML Resource file">
|
||||
</action>
|
||||
<action
|
||||
class="com.android.ide.eclipse.adt.project.ExportAction"
|
||||
class="com.android.ide.eclipse.adt.internal.wizards.actions.NewTestProjectAction"
|
||||
enablesFor="1"
|
||||
icon="icons/androidjunit.png"
|
||||
id="com.android.ide.eclipse.adt.wizards.actions.NewTestProjectAction"
|
||||
label="New Test Project..."
|
||||
menubarPath="com.android.ide.eclipse.adt.AndroidTools/group1"
|
||||
tooltip="Opens a wizard to help create a new Android Test Project">
|
||||
</action>
|
||||
<action
|
||||
class="com.android.ide.eclipse.adt.internal.wizards.actions.ExportAction"
|
||||
enablesFor="1"
|
||||
id="com.android.ide.eclipse.adt.project.ExportAction"
|
||||
label="Export Unsigned Application Package..."
|
||||
menubarPath="com.android.ide.eclipse.adt.AndroidTools/group2"/>
|
||||
<action
|
||||
class="com.android.ide.eclipse.adt.project.ExportWizardAction"
|
||||
class="com.android.ide.eclipse.adt.internal.wizards.actions.ExportWizardAction"
|
||||
enablesFor="1"
|
||||
id="com.android.ide.eclipse.adt.project.ExportWizardAction"
|
||||
label="Export Signed Application Package..."
|
||||
menubarPath="com.android.ide.eclipse.adt.AndroidTools/group2"/>
|
||||
<action
|
||||
class="com.android.ide.eclipse.adt.project.FixProjectAction"
|
||||
class="com.android.ide.eclipse.adt.internal.actions.FixProjectAction"
|
||||
enablesFor="1"
|
||||
id="com.android.ide.eclipse.adt.project.FixProjectAction"
|
||||
label="Fix Project Properties"
|
||||
@@ -250,29 +273,29 @@
|
||||
<extension
|
||||
point="org.eclipse.ui.preferencePages">
|
||||
<page
|
||||
class="com.android.ide.eclipse.adt.preferences.AndroidPreferencePage"
|
||||
class="com.android.ide.eclipse.adt.internal.preferences.AndroidPreferencePage"
|
||||
id="com.android.ide.eclipse.preferences.main"
|
||||
name="Android"/>
|
||||
<page
|
||||
category="com.android.ide.eclipse.preferences.main"
|
||||
class="com.android.ide.eclipse.adt.preferences.BuildPreferencePage"
|
||||
class="com.android.ide.eclipse.adt.internal.preferences.BuildPreferencePage"
|
||||
id="com.android.ide.eclipse.adt.preferences.BuildPreferencePage"
|
||||
name="Build"/>
|
||||
<page
|
||||
category="com.android.ide.eclipse.preferences.main"
|
||||
class="com.android.ide.eclipse.adt.preferences.LaunchPreferencePage"
|
||||
class="com.android.ide.eclipse.adt.internal.preferences.LaunchPreferencePage"
|
||||
id="com.android.ide.eclipse.adt.preferences.LaunchPreferencePage"
|
||||
name="Launch"/>
|
||||
<page
|
||||
category="com.android.ide.eclipse.preferences.main"
|
||||
class="com.android.ide.eclipse.common.preferences.UsagePreferencePage"
|
||||
class="com.android.ide.eclipse.adt.internal.preferences.UsagePreferencePage"
|
||||
id="com.android.ide.eclipse.common.preferences.UsagePreferencePage"
|
||||
name="Usage Stats">
|
||||
</page>
|
||||
</extension>
|
||||
<extension
|
||||
point="org.eclipse.core.runtime.preferences">
|
||||
<initializer class="com.android.ide.eclipse.adt.preferences.PreferenceInitializer"/>
|
||||
<initializer class="com.android.ide.eclipse.adt.internal.preferences.PreferenceInitializer"/>
|
||||
</extension>
|
||||
<extension
|
||||
id="com.android.ide.eclipse.adt.adtProblem"
|
||||
@@ -312,11 +335,11 @@
|
||||
<extension
|
||||
point="org.eclipse.jdt.core.classpathContainerInitializer">
|
||||
<classpathContainerInitializer
|
||||
class="com.android.ide.eclipse.adt.project.internal.AndroidClasspathContainerInitializer"
|
||||
class="com.android.ide.eclipse.adt.internal.project.AndroidClasspathContainerInitializer"
|
||||
id="com.android.ide.eclipse.adt.project.AndroidClasspathContainerInitializer">
|
||||
</classpathContainerInitializer>
|
||||
<classpathContainerInitializer
|
||||
class="com.android.ide.eclipse.adt.project.internal.AndroidClasspathContainerInitializer"
|
||||
class="com.android.ide.eclipse.adt.internal.project.AndroidClasspathContainerInitializer"
|
||||
id="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK">
|
||||
</classpathContainerInitializer>
|
||||
</extension>
|
||||
@@ -328,7 +351,7 @@
|
||||
</category>
|
||||
<wizard
|
||||
category="com.android.ide.eclipse.wizards.category"
|
||||
class="com.android.ide.eclipse.adt.project.export.ExportWizard"
|
||||
class="com.android.ide.eclipse.adt.internal.wizards.export.ExportWizard"
|
||||
icon="icons/android.png"
|
||||
id="com.android.ide.eclipse.adt.project.ExportWizard"
|
||||
name="Export Android Application">
|
||||
@@ -365,7 +388,7 @@
|
||||
point="org.eclipse.ui.decorators">
|
||||
<decorator
|
||||
adaptable="true"
|
||||
class="com.android.ide.eclipse.adt.project.FolderDecorator"
|
||||
class="com.android.ide.eclipse.adt.internal.project.FolderDecorator"
|
||||
id="com.android.ide.eclipse.adt.project.FolderDecorator"
|
||||
label="Android Decorator"
|
||||
lightweight="true"
|
||||
@@ -377,7 +400,7 @@
|
||||
<extension
|
||||
point="org.eclipse.ui.editors">
|
||||
<editor
|
||||
class="com.android.ide.eclipse.editors.manifest.ManifestEditor"
|
||||
class="com.android.ide.eclipse.adt.internal.editors.manifest.ManifestEditor"
|
||||
default="true"
|
||||
filenames="AndroidManifest.xml"
|
||||
icon="icons/android.png"
|
||||
@@ -385,7 +408,7 @@
|
||||
name="Android Manifest Editor">
|
||||
</editor>
|
||||
<editor
|
||||
class="com.android.ide.eclipse.editors.resources.ResourcesEditor"
|
||||
class="com.android.ide.eclipse.adt.internal.editors.resources.ResourcesEditor"
|
||||
default="false"
|
||||
extensions="xml"
|
||||
icon="icons/android.png"
|
||||
@@ -393,16 +416,16 @@
|
||||
name="Android Resource Editor">
|
||||
</editor>
|
||||
<editor
|
||||
class="com.android.ide.eclipse.editors.layout.LayoutEditor"
|
||||
class="com.android.ide.eclipse.adt.internal.editors.layout.LayoutEditor"
|
||||
default="false"
|
||||
extensions="xml"
|
||||
icon="icons/android.png"
|
||||
id="com.android.ide.eclipse.editors.layout.LayoutEditor"
|
||||
matchingStrategy="com.android.ide.eclipse.editors.layout.MatchingStrategy"
|
||||
matchingStrategy="com.android.ide.eclipse.adt.internal.editors.layout.MatchingStrategy"
|
||||
name="Android Layout Editor">
|
||||
</editor>
|
||||
<editor
|
||||
class="com.android.ide.eclipse.editors.menu.MenuEditor"
|
||||
class="com.android.ide.eclipse.adt.internal.editors.menu.MenuEditor"
|
||||
default="false"
|
||||
extensions="xml"
|
||||
icon="icons/android.png"
|
||||
@@ -410,7 +433,7 @@
|
||||
name="Android Menu Editor">
|
||||
</editor>
|
||||
<editor
|
||||
class="com.android.ide.eclipse.editors.xml.XmlEditor"
|
||||
class="com.android.ide.eclipse.adt.internal.editors.xml.XmlEditor"
|
||||
default="false"
|
||||
extensions="xml"
|
||||
icon="icons/android.png"
|
||||
@@ -423,7 +446,7 @@
|
||||
<view
|
||||
allowMultiple="false"
|
||||
category="com.android.ide.eclipse.ddms.views.category"
|
||||
class="com.android.ide.eclipse.editors.resources.explorer.ResourceExplorerView"
|
||||
class="com.android.ide.eclipse.adt.internal.ui.ResourceExplorerView"
|
||||
icon="icons/android.png"
|
||||
id="com.android.ide.eclipse.editors.resources.explorer.ResourceExplorerView"
|
||||
name="Resource Explorer">
|
||||
@@ -432,23 +455,23 @@
|
||||
<extension
|
||||
point="org.eclipse.wst.sse.ui.editorConfiguration">
|
||||
<sourceViewerConfiguration
|
||||
class="com.android.ide.eclipse.editors.manifest.ManifestSourceViewerConfig"
|
||||
class="com.android.ide.eclipse.adt.internal.editors.manifest.ManifestSourceViewerConfig"
|
||||
target="com.android.ide.eclipse.editors.manifest.ManifestEditor">
|
||||
</sourceViewerConfiguration>
|
||||
<sourceViewerConfiguration
|
||||
class="com.android.ide.eclipse.editors.resources.ResourcesSourceViewerConfig"
|
||||
class="com.android.ide.eclipse.adt.internal.editors.resources.ResourcesSourceViewerConfig"
|
||||
target="com.android.ide.eclipse.editors.resources.ResourcesEditor">
|
||||
</sourceViewerConfiguration>
|
||||
<sourceViewerConfiguration
|
||||
class="com.android.ide.eclipse.editors.layout.LayoutSourceViewerConfig"
|
||||
class="com.android.ide.eclipse.adt.internal.editors.layout.LayoutSourceViewerConfig"
|
||||
target="com.android.ide.eclipse.editors.layout.LayoutEditor">
|
||||
</sourceViewerConfiguration>
|
||||
<sourceViewerConfiguration
|
||||
class="com.android.ide.eclipse.editors.menu.MenuSourceViewerConfig"
|
||||
class="com.android.ide.eclipse.adt.internal.editors.menu.MenuSourceViewerConfig"
|
||||
target="com.android.ide.eclipse.editors.menu.MenuEditor">
|
||||
</sourceViewerConfiguration>
|
||||
<sourceViewerConfiguration
|
||||
class="com.android.ide.eclipse.editors.xml.XmlSourceViewerConfig"
|
||||
class="com.android.ide.eclipse.adt.internal.editors.xml.XmlSourceViewerConfig"
|
||||
target="com.android.ide.eclipse.editors.xml.XmlEditor">
|
||||
</sourceViewerConfiguration>
|
||||
</extension>
|
||||
@@ -456,7 +479,7 @@
|
||||
point="org.eclipse.ui.propertyPages">
|
||||
<page
|
||||
adaptable="true"
|
||||
class="com.android.ide.eclipse.adt.project.properties.AndroidPropertyPage"
|
||||
class="com.android.ide.eclipse.adt.internal.properties.AndroidPropertyPage"
|
||||
id="com.android.ide.eclipse.adt.project.properties.AndroidPropertyPage"
|
||||
name="Android"
|
||||
nameFilter="*"
|
||||
@@ -475,7 +498,7 @@
|
||||
label="Android Wizards"
|
||||
visible="true">
|
||||
<action
|
||||
class="com.android.ide.eclipse.adt.wizards.actions.NewXmlFileAction"
|
||||
class="com.android.ide.eclipse.adt.internal.wizards.actions.NewXmlFileAction"
|
||||
icon="icons/new_xml.png"
|
||||
id="com.android.ide.eclipse.adt.wizards.actions.NewXmlFileAction"
|
||||
label="New Android XML File"
|
||||
@@ -484,7 +507,16 @@
|
||||
tooltip="Opens a wizard to help create a new Android XML file">
|
||||
</action>
|
||||
<action
|
||||
class="com.android.ide.eclipse.adt.wizards.actions.NewProjectAction"
|
||||
class="com.android.ide.eclipse.adt.internal.wizards.actions.NewTestProjectAction"
|
||||
icon="icons/androidjunit.png"
|
||||
id="com.android.ide.eclipse.adt.wizards.actions.NewTestProjectAction"
|
||||
label="New Android Test Project"
|
||||
style="push"
|
||||
toolbarPath="android_project"
|
||||
tooltip="Opens a wizard to help create a new Android Test Project">
|
||||
</action>
|
||||
<action
|
||||
class="com.android.ide.eclipse.adt.internal.wizards.actions.NewProjectAction"
|
||||
icon="icons/new_adt_project.png"
|
||||
id="com.android.ide.eclipse.adt.wizards.actions.NewProjectAction"
|
||||
label="New Android Project"
|
||||
@@ -498,9 +530,9 @@
|
||||
id="adt.actionSet.refactorings"
|
||||
label="Android Refactorings"
|
||||
visible="true">
|
||||
|
||||
|
||||
<!-- This duplicates the Refactoring Menu definition from the jdt.ui plugin.xml,
|
||||
which allows us to insert our contribution even if the JDT is not loaded.
|
||||
which allows us to insert our contribution even if the JDT is not loaded.
|
||||
We overload the definition with our new group.-->
|
||||
<menu
|
||||
label="Refactor"
|
||||
@@ -518,14 +550,14 @@
|
||||
<separator name="scriptGroup"/>
|
||||
</menu>
|
||||
|
||||
<menu
|
||||
label="Android"
|
||||
path="org.eclipse.jdt.ui.refactoring.menu/androidGroup"
|
||||
id="com.android.ide.eclipse.adt.refactoring.menu">
|
||||
<separator name="android"/>
|
||||
</menu>
|
||||
<menu
|
||||
label="Android"
|
||||
path="org.eclipse.jdt.ui.refactoring.menu/androidGroup"
|
||||
id="com.android.ide.eclipse.adt.refactoring.menu">
|
||||
<separator name="android"/>
|
||||
</menu>
|
||||
<action
|
||||
class="com.android.ide.eclipse.adt.refactorings.extractstring.ExtractStringAction"
|
||||
class="com.android.ide.eclipse.adt.internal.refactorings.extractstring.ExtractStringAction"
|
||||
definitionId="com.android.ide.eclipse.adt.refactoring.extract.string"
|
||||
id="com.android.ide.eclipse.adt.actions.ExtractString"
|
||||
label="Extract Android String..."
|
||||
@@ -538,11 +570,27 @@
|
||||
label="Refactor">
|
||||
</menu>
|
||||
</actionSet>
|
||||
<actionSet
|
||||
description="Android AVD Manager"
|
||||
id="adt.actionSet.avdManager"
|
||||
label="Android AVD Manager"
|
||||
visible="true">
|
||||
<action
|
||||
class="com.android.ide.eclipse.adt.internal.wizards.actions.AvdManagerAction"
|
||||
icon="icons/avd_manager.png"
|
||||
id="com.android.ide.eclipse.adt.ui.avdmanager"
|
||||
label="Android AVD Manager"
|
||||
menubarPath="Window/additions"
|
||||
style="push"
|
||||
toolbarPath="android_project"
|
||||
tooltip="Opens the Android Virtual Device (AVD) Manager">
|
||||
</action>
|
||||
</actionSet>
|
||||
</extension>
|
||||
<extension
|
||||
point="org.eclipse.debug.core.launchDelegates">
|
||||
<launchDelegate
|
||||
delegate="com.android.ide.eclipse.adt.launch.JUnitLaunchConfigDelegate"
|
||||
delegate="com.android.ide.eclipse.adt.internal.launch.JUnitLaunchConfigDelegate"
|
||||
delegateDescription="Removes the Android JAR from the Bootstrap Classpath"
|
||||
id="com.android.ide.eclipse.adt.launch.JUnitLaunchConfigDelegate.launchAndroidJunit"
|
||||
modes="run,debug"
|
||||
@@ -553,7 +601,7 @@
|
||||
<extension
|
||||
point="org.eclipse.debug.core.launchConfigurationTypes">
|
||||
<launchConfigurationType
|
||||
delegate="com.android.ide.eclipse.adt.launch.junit.AndroidJUnitLaunchConfigDelegate"
|
||||
delegate="com.android.ide.eclipse.adt.internal.launch.junit.AndroidJUnitLaunchConfigDelegate"
|
||||
id="com.android.ide.eclipse.adt.junit.launchConfigurationType"
|
||||
modes="run,debug"
|
||||
name="Android JUnit Test"
|
||||
@@ -573,7 +621,7 @@
|
||||
<extension
|
||||
point="org.eclipse.debug.ui.launchConfigurationTabGroups">
|
||||
<launchConfigurationTabGroup
|
||||
class="com.android.ide.eclipse.adt.launch.junit.AndroidJUnitTabGroup"
|
||||
class="com.android.ide.eclipse.adt.internal.launch.junit.AndroidJUnitTabGroup"
|
||||
description="Android JUnit Test"
|
||||
id="com.android.ide.eclipse.adt.junit.AndroidJUnitLaunchConfigTabGroup"
|
||||
type="com.android.ide.eclipse.adt.junit.launchConfigurationType"/>
|
||||
@@ -581,7 +629,7 @@
|
||||
<extension
|
||||
point="org.eclipse.debug.ui.launchShortcuts">
|
||||
<shortcut
|
||||
class="com.android.ide.eclipse.adt.launch.junit.AndroidJUnitLaunchShortcut"
|
||||
class="com.android.ide.eclipse.adt.internal.launch.junit.AndroidJUnitLaunchShortcut"
|
||||
icon="icons/androidjunit.png"
|
||||
id="com.android.ide.eclipse.adt.junit.launchShortcut"
|
||||
label="Android JUnit Test"
|
||||
@@ -622,7 +670,7 @@
|
||||
<extension
|
||||
point="org.eclipse.ltk.core.refactoring.refactoringContributions">
|
||||
<contribution
|
||||
class="com.android.ide.eclipse.adt.refactorings.extractstring.ExtractStringContribution"
|
||||
class="com.android.ide.eclipse.adt.internal.refactorings.extractstring.ExtractStringContribution"
|
||||
id="com.android.ide.eclipse.adt.refactoring.extract.string">
|
||||
</contribution>
|
||||
</extension>
|
||||
@@ -632,7 +680,7 @@
|
||||
properties="isTest,canLaunchAsJUnit"
|
||||
namespace="com.android.ide.eclipse.adt"
|
||||
type="org.eclipse.core.runtime.IAdaptable"
|
||||
class="com.android.ide.eclipse.adt.launch.junit.AndroidJUnitPropertyTester"
|
||||
class="com.android.ide.eclipse.adt.internal.launch.junit.AndroidJUnitPropertyTester"
|
||||
id="com.android.ide.eclipse.adt.AndroidJUnitPropertyTester">
|
||||
</propertyTester>
|
||||
</extension>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
package com.android.ide.eclipse.adt;
|
||||
|
||||
import com.android.ide.eclipse.adt.project.internal.AndroidClasspathContainerInitializer;
|
||||
import com.android.ide.eclipse.adt.internal.project.AndroidClasspathContainerInitializer;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -20,37 +20,36 @@ import com.android.ddmuilib.StackTracePanel;
|
||||
import com.android.ddmuilib.StackTracePanel.ISourceRevealer;
|
||||
import com.android.ddmuilib.console.DdmConsole;
|
||||
import com.android.ddmuilib.console.IDdmConsole;
|
||||
import com.android.ide.eclipse.adt.launch.AndroidLaunchController;
|
||||
import com.android.ide.eclipse.adt.preferences.BuildPreferencePage;
|
||||
import com.android.ide.eclipse.adt.project.ProjectHelper;
|
||||
import com.android.ide.eclipse.adt.project.export.ExportWizard;
|
||||
import com.android.ide.eclipse.adt.project.internal.AndroidClasspathContainerInitializer;
|
||||
import com.android.ide.eclipse.adt.sdk.AndroidTargetParser;
|
||||
import com.android.ide.eclipse.adt.sdk.LoadStatus;
|
||||
import com.android.ide.eclipse.adt.sdk.Sdk;
|
||||
import com.android.ide.eclipse.adt.sdk.Sdk.ITargetChangeListener;
|
||||
import com.android.ide.eclipse.adt.ui.EclipseUiHelper;
|
||||
import com.android.ide.eclipse.common.AndroidConstants;
|
||||
import com.android.ide.eclipse.common.SdkStatsHelper;
|
||||
import com.android.ide.eclipse.common.StreamHelper;
|
||||
import com.android.ide.eclipse.common.project.BaseProjectHelper;
|
||||
import com.android.ide.eclipse.common.project.ExportHelper;
|
||||
import com.android.ide.eclipse.common.project.ExportHelper.IExportCallback;
|
||||
import com.android.ide.eclipse.adt.internal.VersionCheck;
|
||||
import com.android.ide.eclipse.adt.internal.editors.IconFactory;
|
||||
import com.android.ide.eclipse.adt.internal.editors.layout.LayoutEditor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.menu.MenuEditor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.resources.ResourcesEditor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.xml.XmlEditor;
|
||||
import com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController;
|
||||
import com.android.ide.eclipse.adt.internal.preferences.BuildPreferencePage;
|
||||
import com.android.ide.eclipse.adt.internal.project.AndroidClasspathContainerInitializer;
|
||||
import com.android.ide.eclipse.adt.internal.project.BaseProjectHelper;
|
||||
import com.android.ide.eclipse.adt.internal.project.ExportHelper;
|
||||
import com.android.ide.eclipse.adt.internal.project.ProjectHelper;
|
||||
import com.android.ide.eclipse.adt.internal.project.ExportHelper.IExportCallback;
|
||||
import com.android.ide.eclipse.adt.internal.resources.manager.ProjectResources;
|
||||
import com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolder;
|
||||
import com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolderType;
|
||||
import com.android.ide.eclipse.adt.internal.resources.manager.ResourceManager;
|
||||
import com.android.ide.eclipse.adt.internal.resources.manager.ResourceMonitor;
|
||||
import com.android.ide.eclipse.adt.internal.resources.manager.ResourceMonitor.IFileListener;
|
||||
import com.android.ide.eclipse.adt.internal.sdk.AndroidTargetParser;
|
||||
import com.android.ide.eclipse.adt.internal.sdk.LoadStatus;
|
||||
import com.android.ide.eclipse.adt.internal.sdk.Sdk;
|
||||
import com.android.ide.eclipse.adt.internal.sdk.Sdk.ITargetChangeListener;
|
||||
import com.android.ide.eclipse.adt.internal.ui.EclipseUiHelper;
|
||||
import com.android.ide.eclipse.adt.internal.wizards.export.ExportWizard;
|
||||
import com.android.ide.eclipse.ddms.DdmsPlugin;
|
||||
import com.android.ide.eclipse.ddms.ImageLoader;
|
||||
import com.android.ide.eclipse.editors.IconFactory;
|
||||
import com.android.ide.eclipse.editors.layout.LayoutEditor;
|
||||
import com.android.ide.eclipse.editors.menu.MenuEditor;
|
||||
import com.android.ide.eclipse.editors.resources.ResourcesEditor;
|
||||
import com.android.ide.eclipse.editors.resources.manager.ProjectResources;
|
||||
import com.android.ide.eclipse.editors.resources.manager.ResourceFolder;
|
||||
import com.android.ide.eclipse.editors.resources.manager.ResourceFolderType;
|
||||
import com.android.ide.eclipse.editors.resources.manager.ResourceManager;
|
||||
import com.android.ide.eclipse.editors.resources.manager.ResourceMonitor;
|
||||
import com.android.ide.eclipse.editors.resources.manager.ResourceMonitor.IFileListener;
|
||||
import com.android.ide.eclipse.editors.xml.XmlEditor;
|
||||
import com.android.sdklib.IAndroidTarget;
|
||||
import com.android.sdklib.SdkConstants;
|
||||
import com.android.sdkstats.SdkStatsService;
|
||||
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.resources.IFolder;
|
||||
@@ -110,6 +109,7 @@ import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -118,7 +118,7 @@ import java.util.List;
|
||||
public class AdtPlugin extends AbstractUIPlugin {
|
||||
/** The plug-in ID */
|
||||
public static final String PLUGIN_ID = "com.android.ide.eclipse.adt"; //$NON-NLS-1$
|
||||
|
||||
|
||||
public final static String PREFS_SDK_DIR = PLUGIN_ID + ".sdk"; //$NON-NLS-1$
|
||||
|
||||
public final static String PREFS_RES_AUTO_REFRESH = PLUGIN_ID + ".resAutoRefresh"; //$NON-NLS-1$
|
||||
@@ -132,7 +132,7 @@ public class AdtPlugin extends AbstractUIPlugin {
|
||||
public final static String PREFS_HOME_PACKAGE = PLUGIN_ID + ".homePackage"; //$NON-NLS-1$
|
||||
|
||||
public final static String PREFS_EMU_OPTIONS = PLUGIN_ID + ".emuOptions"; //$NON-NLS-1$
|
||||
|
||||
|
||||
/** singleton instance */
|
||||
private static AdtPlugin sPlugin;
|
||||
|
||||
@@ -162,7 +162,7 @@ public class AdtPlugin extends AbstractUIPlugin {
|
||||
|
||||
/** Color used in the error console */
|
||||
private Color mRed;
|
||||
|
||||
|
||||
/** Load status of the SDK. Any access MUST be in a synchronized(mPostLoadProjects) block */
|
||||
private LoadStatus mSdkIsLoaded = LoadStatus.LOADING;
|
||||
/** Project to update once the SDK is loaded.
|
||||
@@ -172,7 +172,7 @@ public class AdtPlugin extends AbstractUIPlugin {
|
||||
/** Project to check validity of cache vs actual once the SDK is loaded.
|
||||
* Any access MUST be in a synchronized(mPostLoadProjectsToResolve) block */
|
||||
private final ArrayList<IJavaProject> mPostLoadProjectsToCheck = new ArrayList<IJavaProject>();
|
||||
|
||||
|
||||
private ResourceMonitor mResourceMonitor;
|
||||
private ArrayList<ITargetChangeListener> mTargetChangeListeners =
|
||||
new ArrayList<ITargetChangeListener>();
|
||||
@@ -204,7 +204,7 @@ public class AdtPlugin extends AbstractUIPlugin {
|
||||
@Override
|
||||
public void println(String message) {
|
||||
// write the date/project tag first.
|
||||
String tag = StreamHelper.getMessageTag(mProject != null ? mProject.getName() : null);
|
||||
String tag = getMessageTag(mProject != null ? mProject.getName() : null);
|
||||
|
||||
print(tag);
|
||||
if (mPrefix != null) {
|
||||
@@ -312,7 +312,7 @@ public class AdtPlugin extends AbstractUIPlugin {
|
||||
// get the SDK location and build id.
|
||||
if (checkSdkLocationAndId()) {
|
||||
// if sdk if valid, reparse it
|
||||
|
||||
|
||||
// add all the opened Android projects to the list of projects to be updated
|
||||
// after the SDK is reloaded
|
||||
synchronized (getSdkLockObject()) {
|
||||
@@ -320,7 +320,7 @@ public class AdtPlugin extends AbstractUIPlugin {
|
||||
IJavaProject[] androidProjects = BaseProjectHelper.getAndroidProjects();
|
||||
mPostLoadProjectsToResolve.addAll(Arrays.asList(androidProjects));
|
||||
}
|
||||
|
||||
|
||||
// parse the SDK resources at the new location
|
||||
parseSdkContent();
|
||||
}
|
||||
@@ -341,7 +341,7 @@ public class AdtPlugin extends AbstractUIPlugin {
|
||||
|
||||
// check the location of SDK
|
||||
final boolean isSdkLocationValid = checkSdkLocationAndId();
|
||||
|
||||
|
||||
mBuildVerbosity = BuildPreferencePage.getBuildLevel(
|
||||
mStore.getString(PREFS_BUILD_VERBOSITY));
|
||||
|
||||
@@ -356,7 +356,7 @@ public class AdtPlugin extends AbstractUIPlugin {
|
||||
// and give it the debug launcher for android projects
|
||||
DdmsPlugin.setRunningAppDebugLauncher(new DdmsPlugin.IDebugLauncher() {
|
||||
public boolean debug(String appName, int port) {
|
||||
// search for an android project matching the process name
|
||||
// search for an android project matching the process name
|
||||
IProject project = ProjectHelper.findAndroidProjectByAppName(appName);
|
||||
if (project != null) {
|
||||
AndroidLaunchController.debugRunningApp(project, port);
|
||||
@@ -366,7 +366,7 @@ public class AdtPlugin extends AbstractUIPlugin {
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
StackTracePanel.setSourceRevealer(new ISourceRevealer() {
|
||||
public void reveal(String applicationName, String className, int line) {
|
||||
IProject project = ProjectHelper.findAndroidProjectByAppName(applicationName);
|
||||
@@ -375,12 +375,12 @@ public class AdtPlugin extends AbstractUIPlugin {
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// setup export callback for editors
|
||||
ExportHelper.setCallback(new IExportCallback() {
|
||||
public void startExportWizard(IProject project) {
|
||||
StructuredSelection selection = new StructuredSelection(project);
|
||||
|
||||
|
||||
ExportWizard wizard = new ExportWizard();
|
||||
wizard.init(PlatformUI.getWorkbench(), selection);
|
||||
WizardDialog dialog = new WizardDialog(getDisplay().getActiveShell(),
|
||||
@@ -388,7 +388,7 @@ public class AdtPlugin extends AbstractUIPlugin {
|
||||
dialog.open();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// initialize editors
|
||||
startEditors();
|
||||
|
||||
@@ -400,16 +400,16 @@ public class AdtPlugin extends AbstractUIPlugin {
|
||||
@Override
|
||||
public void done(IJobChangeEvent event) {
|
||||
super.done(event);
|
||||
|
||||
|
||||
// Once the ping job is finished, start the SDK parser
|
||||
if (isSdkLocationValid) {
|
||||
// parse the SDK resources.
|
||||
parseSdkContent();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
// build jobs are run after other interactive jobs
|
||||
pingJob.setPriority(Job.BUILD);
|
||||
pingJob.setPriority(Job.BUILD);
|
||||
// Wait 2 seconds before starting the ping job. This leaves some time to the
|
||||
// other bundles to initialize.
|
||||
pingJob.schedule(2000 /*milliseconds*/);
|
||||
@@ -417,15 +417,15 @@ public class AdtPlugin extends AbstractUIPlugin {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
|
||||
*/
|
||||
@Override
|
||||
public void stop(BundleContext context) throws Exception {
|
||||
super.stop(context);
|
||||
|
||||
|
||||
stopEditors();
|
||||
|
||||
|
||||
mRed.dispose();
|
||||
synchronized (AdtPlugin.class) {
|
||||
sPlugin = null;
|
||||
@@ -525,7 +525,7 @@ public class AdtPlugin extends AbstractUIPlugin {
|
||||
if (sPlugin != null) {
|
||||
return sPlugin.mBuildVerbosity;
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -537,7 +537,7 @@ public class AdtPlugin extends AbstractUIPlugin {
|
||||
* @return the image descriptor
|
||||
*/
|
||||
public static ImageDescriptor getImageDescriptor(String path) {
|
||||
return imageDescriptorFromPlugin(PLUGIN_ID, path);
|
||||
return imageDescriptorFromPlugin(PLUGIN_ID, path);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -555,7 +555,7 @@ public class AdtPlugin extends AbstractUIPlugin {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// attempt to get a file to one of the template.
|
||||
try {
|
||||
URL url = bundle.getEntry(AndroidConstants.WS_SEP + filepath);
|
||||
@@ -683,10 +683,10 @@ public class AdtPlugin extends AbstractUIPlugin {
|
||||
});
|
||||
return result[0];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Logs a message to the default Eclipse log.
|
||||
*
|
||||
*
|
||||
* @param severity The severity code. Valid values are: {@link IStatus#OK},
|
||||
* {@link IStatus#ERROR}, {@link IStatus#INFO}, {@link IStatus#WARNING} or
|
||||
* {@link IStatus#CANCEL}.
|
||||
@@ -704,7 +704,7 @@ public class AdtPlugin extends AbstractUIPlugin {
|
||||
* Logs an exception to the default Eclipse log.
|
||||
* <p/>
|
||||
* The status severity is always set to ERROR.
|
||||
*
|
||||
*
|
||||
* @param exception the exception to log.
|
||||
* @param format The format string, like for {@link String#format(String, Object...)}.
|
||||
* @param args The arguments for the format string, like for
|
||||
@@ -715,13 +715,13 @@ public class AdtPlugin extends AbstractUIPlugin {
|
||||
Status status = new Status(IStatus.ERROR, PLUGIN_ID, message, exception);
|
||||
getDefault().getLog().log(status);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This is a mix between log(Throwable) and printErrorToConsole.
|
||||
* <p/>
|
||||
* This logs the exception with an ERROR severity and the given printf-like format message.
|
||||
* The same message is then printed on the Android error console with the associated tag.
|
||||
*
|
||||
*
|
||||
* @param exception the exception to log.
|
||||
* @param format The format string, like for {@link String#format(String, Object...)}.
|
||||
* @param args The arguments for the format string, like for
|
||||
@@ -733,7 +733,7 @@ public class AdtPlugin extends AbstractUIPlugin {
|
||||
String message = String.format(format, args);
|
||||
Status status = new Status(IStatus.ERROR, PLUGIN_ID, message, exception);
|
||||
getDefault().getLog().log(status);
|
||||
StreamHelper.printToStream(sPlugin.mAndroidConsoleErrorStream, tag, message);
|
||||
printToStream(sPlugin.mAndroidConsoleErrorStream, tag, message);
|
||||
showAndroidConsole();
|
||||
}
|
||||
}
|
||||
@@ -745,8 +745,8 @@ public class AdtPlugin extends AbstractUIPlugin {
|
||||
*/
|
||||
public static synchronized void printErrorToConsole(String tag, Object... objects) {
|
||||
if (sPlugin != null) {
|
||||
StreamHelper.printToStream(sPlugin.mAndroidConsoleErrorStream, tag, objects);
|
||||
|
||||
printToStream(sPlugin.mAndroidConsoleErrorStream, tag, objects);
|
||||
|
||||
showAndroidConsole();
|
||||
}
|
||||
}
|
||||
@@ -783,7 +783,7 @@ public class AdtPlugin extends AbstractUIPlugin {
|
||||
if (sPlugin != null) {
|
||||
if (level <= sPlugin.mBuildVerbosity) {
|
||||
String tag = project != null ? project.getName() : null;
|
||||
StreamHelper.printToStream(sPlugin.mAndroidConsoleStream, tag, objects);
|
||||
printToStream(sPlugin.mAndroidConsoleStream, tag, objects);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -795,7 +795,7 @@ public class AdtPlugin extends AbstractUIPlugin {
|
||||
*/
|
||||
public static synchronized void printToConsole(String tag, Object... objects) {
|
||||
if (sPlugin != null) {
|
||||
StreamHelper.printToStream(sPlugin.mAndroidConsoleStream, tag, objects);
|
||||
printToStream(sPlugin.mAndroidConsoleStream, tag, objects);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -813,7 +813,7 @@ public class AdtPlugin extends AbstractUIPlugin {
|
||||
public static void showAndroidConsole() {
|
||||
// first make sure the console is in the workbench
|
||||
EclipseUiHelper.showView(IConsoleConstants.ID_CONSOLE_VIEW, true);
|
||||
|
||||
|
||||
// now make sure it's not docked.
|
||||
ConsolePlugin.getDefault().getConsoleManager().showConsoleView(
|
||||
AdtPlugin.getDefault().getAndroidConsole());
|
||||
@@ -832,7 +832,7 @@ public class AdtPlugin extends AbstractUIPlugin {
|
||||
if (sPlugin != null) {
|
||||
return new AndroidPrintStream(project, prefix, sPlugin.mAndroidConsoleStream);
|
||||
}
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -849,10 +849,10 @@ public class AdtPlugin extends AbstractUIPlugin {
|
||||
if (sPlugin != null) {
|
||||
return new AndroidPrintStream(project, prefix, sPlugin.mAndroidConsoleErrorStream);
|
||||
}
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns whether the Sdk has been loaded.
|
||||
*/
|
||||
@@ -861,7 +861,7 @@ public class AdtPlugin extends AbstractUIPlugin {
|
||||
return mSdkIsLoaded;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the lock object for SDK loading. If you wish to do things while the SDK is loading,
|
||||
* you must synchronize on this object.
|
||||
@@ -869,7 +869,7 @@ public class AdtPlugin extends AbstractUIPlugin {
|
||||
public final Object getSdkLockObject() {
|
||||
return mPostLoadProjectsToResolve;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the given {@link IJavaProject} to have its target resolved again once the SDK finishes
|
||||
* to load.
|
||||
@@ -879,14 +879,14 @@ public class AdtPlugin extends AbstractUIPlugin {
|
||||
mPostLoadProjectsToResolve.add(javaProject);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the given {@link IJavaProject} to have its target checked for consistency
|
||||
* once the SDK finishes to load. This is used if the target is resolved using cached
|
||||
* information while the SDK is loading.
|
||||
*/
|
||||
public final void setProjectToCheck(IJavaProject javaProject) {
|
||||
// only lock on
|
||||
// only lock on
|
||||
synchronized (getSdkLockObject()) {
|
||||
mPostLoadProjectsToCheck.add(javaProject);
|
||||
}
|
||||
@@ -983,25 +983,19 @@ public class AdtPlugin extends AbstractUIPlugin {
|
||||
@Override
|
||||
protected IStatus run(IProgressMonitor monitor) {
|
||||
try {
|
||||
pingUsageServer(); //$NON-NLS-1$
|
||||
|
||||
// get the version of the plugin
|
||||
String versionString = (String) getBundle().getHeaders().get(
|
||||
Constants.BUNDLE_VERSION);
|
||||
Version version = new Version(versionString);
|
||||
|
||||
SdkStatsHelper.pingUsageServer("adt", version); //$NON-NLS-1$
|
||||
|
||||
return Status.OK_STATUS;
|
||||
} catch (Throwable t) {
|
||||
log(t, "pingUsageServer failed"); //$NON-NLS-1$
|
||||
log(t, "pingUsageServer failed"); //$NON-NLS-1$
|
||||
return new Status(IStatus.ERROR, PLUGIN_ID,
|
||||
"pingUsageServer failed", t);
|
||||
"pingUsageServer failed", t); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
};
|
||||
return job;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Parses the SDK resources.
|
||||
*/
|
||||
@@ -1018,18 +1012,18 @@ public class AdtPlugin extends AbstractUIPlugin {
|
||||
return new Status(IStatus.WARNING, PLUGIN_ID,
|
||||
"An Android SDK is already being loaded. Please try again later.");
|
||||
}
|
||||
|
||||
|
||||
mSdkIsLoading = true;
|
||||
|
||||
|
||||
SubMonitor progress = SubMonitor.convert(monitor,
|
||||
"Initialize SDK Manager", 100);
|
||||
|
||||
|
||||
Sdk sdk = Sdk.loadSdk(mOsSdkLocation);
|
||||
|
||||
|
||||
if (sdk != null) {
|
||||
|
||||
|
||||
progress.setTaskName(Messages.AdtPlugin_Parsing_Resources);
|
||||
|
||||
|
||||
int n = sdk.getTargets().length;
|
||||
if (n > 0) {
|
||||
int w = 60 / n;
|
||||
@@ -1050,7 +1044,7 @@ public class AdtPlugin extends AbstractUIPlugin {
|
||||
mSdkIsLoaded = LoadStatus.LOADED;
|
||||
|
||||
progress.setTaskName("Check Projects");
|
||||
|
||||
|
||||
ArrayList<IJavaProject> list = new ArrayList<IJavaProject>();
|
||||
for (IJavaProject javaProject : mPostLoadProjectsToResolve) {
|
||||
if (javaProject.getProject().isOpen()) {
|
||||
@@ -1066,24 +1060,24 @@ public class AdtPlugin extends AbstractUIPlugin {
|
||||
// do not need to be resolved again).
|
||||
AndroidClasspathContainerInitializer.checkProjectsCache(
|
||||
mPostLoadProjectsToCheck);
|
||||
|
||||
|
||||
list.addAll(mPostLoadProjectsToCheck);
|
||||
|
||||
|
||||
// update the project that needs recompiling.
|
||||
if (list.size() > 0) {
|
||||
IJavaProject[] array = list.toArray(
|
||||
new IJavaProject[list.size()]);
|
||||
AndroidClasspathContainerInitializer.updateProjects(array);
|
||||
}
|
||||
|
||||
|
||||
progress.worked(10);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Notify resource changed listeners
|
||||
progress.setTaskName("Refresh UI");
|
||||
progress.setWorkRemaining(mTargetChangeListeners.size());
|
||||
|
||||
|
||||
// Clone the list before iterating, to avoid Concurrent Modification
|
||||
// exceptions
|
||||
final List<ITargetChangeListener> listeners =
|
||||
@@ -1102,6 +1096,11 @@ public class AdtPlugin extends AbstractUIPlugin {
|
||||
}
|
||||
}
|
||||
});
|
||||
} catch (Throwable t) {
|
||||
log(t, "Unknown exception in parseSdkContent."); //$NON-NLS-1$
|
||||
return new Status(IStatus.ERROR, PLUGIN_ID,
|
||||
"parseSdkContent failed", t); //$NON-NLS-1$
|
||||
|
||||
} finally {
|
||||
mSdkIsLoading = false;
|
||||
if (monitor != null) {
|
||||
@@ -1115,34 +1114,18 @@ public class AdtPlugin extends AbstractUIPlugin {
|
||||
job.setPriority(Job.BUILD); // build jobs are run after other interactive jobs
|
||||
job.schedule();
|
||||
}
|
||||
|
||||
|
||||
/** Returns the global android console */
|
||||
public MessageConsole getAndroidConsole() {
|
||||
return mAndroidConsole;
|
||||
}
|
||||
|
||||
|
||||
// ----- Methods for Editors -------
|
||||
|
||||
public void startEditors() {
|
||||
sAndroidLogoDesc = imageDescriptorFromPlugin(AdtPlugin.PLUGIN_ID,
|
||||
"/icons/android.png"); //$NON-NLS-1$
|
||||
sAndroidLogo = sAndroidLogoDesc.createImage();
|
||||
|
||||
// get the stream to write in the android console.
|
||||
MessageConsole androidConsole = AdtPlugin.getDefault().getAndroidConsole();
|
||||
mAndroidConsoleStream = androidConsole.newMessageStream();
|
||||
|
||||
mAndroidConsoleErrorStream = androidConsole.newMessageStream();
|
||||
mRed = new Color(getDisplay(), 0xFF, 0x00, 0x00);
|
||||
|
||||
// because this can be run, in some cases, by a non ui thread, and beccause
|
||||
// changing the console properties update the ui, we need to make this change
|
||||
// in the ui thread.
|
||||
getDisplay().asyncExec(new Runnable() {
|
||||
public void run() {
|
||||
mAndroidConsoleErrorStream.setColor(mRed);
|
||||
}
|
||||
});
|
||||
|
||||
// Add a resource listener to handle compiled resources.
|
||||
IWorkspace ws = ResourcesPlugin.getWorkspace();
|
||||
@@ -1160,19 +1143,19 @@ public class AdtPlugin extends AbstractUIPlugin {
|
||||
|
||||
/**
|
||||
* The <code>AbstractUIPlugin</code> implementation of this <code>Plugin</code>
|
||||
* method saves this plug-in's preference and dialog stores and shuts down
|
||||
* method saves this plug-in's preference and dialog stores and shuts down
|
||||
* its image registry (if they are in use). Subclasses may extend this
|
||||
* method, but must send super <b>last</b>. A try-finally statement should
|
||||
* be used where necessary to ensure that <code>super.shutdown()</code> is
|
||||
* always done.
|
||||
*
|
||||
*
|
||||
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
|
||||
*/
|
||||
public void stopEditors() {
|
||||
sAndroidLogo.dispose();
|
||||
|
||||
|
||||
IconFactory.getInstance().Dispose();
|
||||
|
||||
|
||||
// Remove the resource listener that handles compiled resources.
|
||||
IWorkspace ws = ResourcesPlugin.getWorkspace();
|
||||
ResourceMonitor.stopMonitoring(ws);
|
||||
@@ -1182,7 +1165,7 @@ public class AdtPlugin extends AbstractUIPlugin {
|
||||
|
||||
/**
|
||||
* Returns an Image for the small Android logo.
|
||||
*
|
||||
*
|
||||
* Callers should not dispose it.
|
||||
*/
|
||||
public static Image getAndroidLogo() {
|
||||
@@ -1191,13 +1174,13 @@ public class AdtPlugin extends AbstractUIPlugin {
|
||||
|
||||
/**
|
||||
* Returns an {@link ImageDescriptor} for the small Android logo.
|
||||
*
|
||||
*
|
||||
* Callers should not dispose it.
|
||||
*/
|
||||
public static ImageDescriptor getAndroidLogoDesc() {
|
||||
return sAndroidLogoDesc;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the ResourceMonitor object.
|
||||
*/
|
||||
@@ -1207,23 +1190,23 @@ public class AdtPlugin extends AbstractUIPlugin {
|
||||
|
||||
/**
|
||||
* Sets up the editor to register default editors for resource files when needed.
|
||||
*
|
||||
*
|
||||
* This is called by the {@link AdtPlugin} during initialization.
|
||||
*
|
||||
*
|
||||
* @param monitor The main Resource Monitor object.
|
||||
*/
|
||||
public void setupDefaultEditor(ResourceMonitor monitor) {
|
||||
monitor.addFileListener(new IFileListener() {
|
||||
|
||||
private static final String UNKNOWN_EDITOR = "unknown-editor"; //$NON-NLS-1$
|
||||
|
||||
|
||||
/* (non-Javadoc)
|
||||
* Sent when a file changed.
|
||||
* @param file The file that changed.
|
||||
* @param markerDeltas The marker deltas for the file.
|
||||
* @param kind The change kind. This is equivalent to
|
||||
* {@link IResourceDelta#accept(IResourceDeltaVisitor)}
|
||||
*
|
||||
*
|
||||
* @see IFileListener#fileChanged
|
||||
*/
|
||||
public void fileChanged(IFile file, IMarkerDelta[] markerDeltas, int kind) {
|
||||
@@ -1233,7 +1216,7 @@ public class AdtPlugin extends AbstractUIPlugin {
|
||||
// There is no support for sub folders, so the segment count must be 4
|
||||
if (file.getFullPath().segmentCount() == 4) {
|
||||
// check if we are inside the res folder.
|
||||
String segment = file.getFullPath().segment(1);
|
||||
String segment = file.getFullPath().segment(1);
|
||||
if (segment.equalsIgnoreCase(SdkConstants.FD_RESOURCES)) {
|
||||
// we are inside a res/ folder, get the actual ResourceFolder
|
||||
ProjectResources resources = ResourceManager.getInstance().
|
||||
@@ -1252,7 +1235,7 @@ public class AdtPlugin extends AbstractUIPlugin {
|
||||
|
||||
ResourceFolder resFolder = resources.getResourceFolder(
|
||||
(IFolder)file.getParent());
|
||||
|
||||
|
||||
if (resFolder != null) {
|
||||
if (kind == IResourceDelta.ADDED) {
|
||||
resourceAdded(file, resFolder.getType());
|
||||
@@ -1320,7 +1303,7 @@ public class AdtPlugin extends AbstractUIPlugin {
|
||||
file.setPersistentProperty(qname, null);
|
||||
IWorkbenchPage page = PlatformUI.getWorkbench().
|
||||
getActiveWorkbenchWindow().getActivePage();
|
||||
|
||||
|
||||
IEditorPart oldEditor = page.findEditor(new FileEditorInput(file));
|
||||
if (oldEditor != null &&
|
||||
AdtPlugin.displayPrompt("Android XML Editor",
|
||||
@@ -1332,7 +1315,7 @@ public class AdtPlugin extends AbstractUIPlugin {
|
||||
XmlEditor.ID,
|
||||
true, /* activate */
|
||||
IWorkbenchPage.MATCH_NONE);
|
||||
|
||||
|
||||
if (newEditor != null) {
|
||||
page.closeEditor(oldEditor, true /* save */);
|
||||
}
|
||||
@@ -1385,8 +1368,60 @@ public class AdtPlugin extends AbstractUIPlugin {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public static synchronized OutputStream getErrorStream() {
|
||||
return sPlugin.mAndroidConsoleErrorStream;
|
||||
}
|
||||
|
||||
/**
|
||||
* Pings the usage start server.
|
||||
*/
|
||||
private void pingUsageServer() {
|
||||
// get the version of the plugin
|
||||
String versionString = (String) getBundle().getHeaders().get(
|
||||
Constants.BUNDLE_VERSION);
|
||||
Version version = new Version(versionString);
|
||||
|
||||
versionString = String.format("%1$d.%2$d.%3$d", version.getMajor(), //$NON-NLS-1$
|
||||
version.getMinor(), version.getMicro());
|
||||
|
||||
SdkStatsService.ping("adt", versionString, getDisplay()); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
/**
|
||||
* Prints messages, associated with a project to the specified stream
|
||||
* @param stream The stream to write to
|
||||
* @param tag The tag associated to the message. Can be null
|
||||
* @param objects The objects to print through their toString() method (or directly for
|
||||
* {@link String} objects.
|
||||
*/
|
||||
public static synchronized void printToStream(MessageConsoleStream stream, String tag,
|
||||
Object... objects) {
|
||||
String dateTag = getMessageTag(tag);
|
||||
|
||||
for (Object obj : objects) {
|
||||
stream.print(dateTag);
|
||||
if (obj instanceof String) {
|
||||
stream.println((String)obj);
|
||||
} else {
|
||||
stream.println(obj.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a string containing the current date/time, and the tag
|
||||
* @param tag The tag associated to the message. Can be null
|
||||
* @return The dateTag
|
||||
*/
|
||||
public static String getMessageTag(String tag) {
|
||||
Calendar c = Calendar.getInstance();
|
||||
|
||||
if (tag == null) {
|
||||
return String.format(Messages.Console_Date_Tag, c);
|
||||
}
|
||||
|
||||
return String.format(Messages.Console_Data_Project_Tag, c, tag);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.common;
|
||||
package com.android.ide.eclipse.adt;
|
||||
|
||||
import com.android.sdklib.SdkConstants;
|
||||
|
||||
@@ -90,7 +90,7 @@ public class AndroidConstants {
|
||||
|
||||
/** Name of the android sources directory */
|
||||
public static final String FD_ANDROID_SOURCES = "sources"; //$NON-NLS-1$
|
||||
|
||||
|
||||
/** Resource java class filename, i.e. "R.java" */
|
||||
public final static String FN_RESOURCE_CLASS = "R.java"; //$NON-NLS-1$
|
||||
/** Resource class file filename, i.e. "R.class" */
|
||||
@@ -104,15 +104,11 @@ public class AndroidConstants {
|
||||
/** Temporary packaged resources file name for a specific set of configuration */
|
||||
public final static String FN_RESOURCES_S_AP_ = "resources-%s.ap_"; //$NON-NLS-1$
|
||||
public final static Pattern PATTERN_RESOURCES_S_AP_ =
|
||||
Pattern.compile("resources-.*\\.ap_", Pattern.CASE_INSENSITIVE);
|
||||
Pattern.compile("resources-.*\\.ap_", Pattern.CASE_INSENSITIVE); //$NON-NLS-1$
|
||||
|
||||
public final static String FN_ADB =
|
||||
(SdkConstants.CURRENT_PLATFORM == SdkConstants.PLATFORM_WINDOWS) ?
|
||||
"adb.exe" : "adb"; //$NON-NLS-1$ //$NON-NLS-2$
|
||||
public final static String FN_ADB = SdkConstants.FN_ADB;
|
||||
|
||||
public final static String FN_EMULATOR =
|
||||
(SdkConstants.CURRENT_PLATFORM == SdkConstants.PLATFORM_WINDOWS) ?
|
||||
"emulator.exe" : "emulator"; //$NON-NLS-1$ //$NON-NLS-2$
|
||||
public final static String FN_EMULATOR = SdkConstants.FN_EMULATOR;
|
||||
|
||||
public final static String FN_TRACEVIEW =
|
||||
(SdkConstants.CURRENT_PLATFORM == SdkConstants.PLATFORM_WINDOWS) ?
|
||||
@@ -128,8 +124,8 @@ public class AndroidConstants {
|
||||
public final static String WS_ASSETS = WS_SEP + SdkConstants.FD_ASSETS;
|
||||
|
||||
/** Leaf of the javaDoc folder. Does not start with a separator. */
|
||||
public final static String WS_JAVADOC_FOLDER_LEAF = SdkConstants.FD_DOCS + "/" +
|
||||
SdkConstants.FD_DOCS_REFERENCE; //$NON-NLS-1$
|
||||
public final static String WS_JAVADOC_FOLDER_LEAF = SdkConstants.FD_DOCS + "/" + //$NON-NLS-1$
|
||||
SdkConstants.FD_DOCS_REFERENCE;
|
||||
|
||||
/** Path of the samples directory relative to the sdk folder.
|
||||
* This is an OS path, ending with a separator.
|
||||
@@ -159,10 +155,10 @@ public class AndroidConstants {
|
||||
|
||||
/** aidl marker error. */
|
||||
public final static String MARKER_AIDL = COMMON_PLUGIN_ID + ".aidlProblem"; //$NON-NLS-1$
|
||||
|
||||
|
||||
/** android marker error */
|
||||
public final static String MARKER_ANDROID = COMMON_PLUGIN_ID + ".androidProblem"; //$NON-NLS-1$
|
||||
|
||||
|
||||
/** Name for the "type" marker attribute */
|
||||
public final static String MARKER_ATTR_TYPE = "android.type"; //$NON-NLS-1$
|
||||
/** Name for the "class" marker attribute */
|
||||
@@ -176,9 +172,9 @@ public class AndroidConstants {
|
||||
/** provider value for marker attribute "type" */
|
||||
public final static String MARKER_ATTR_TYPE_PROVIDER = "provider"; //$NON-NLS-1$
|
||||
|
||||
public final static String CLASS_ACTIVITY = "android.app.Activity"; //$NON-NLS-1$
|
||||
public final static String CLASS_SERVICE = "android.app.Service"; //$NON-NLS-1$
|
||||
public final static String CLASS_BROADCASTRECEIVER = "android.content.BroadcastReceiver"; //$NON-NLS-1$
|
||||
public final static String CLASS_ACTIVITY = "android.app.Activity"; //$NON-NLS-1$
|
||||
public final static String CLASS_SERVICE = "android.app.Service"; //$NON-NLS-1$
|
||||
public final static String CLASS_BROADCASTRECEIVER = "android.content.BroadcastReceiver"; //$NON-NLS-1$
|
||||
public final static String CLASS_CONTENTPROVIDER = "android.content.ContentProvider"; //$NON-NLS-1$
|
||||
public final static String CLASS_INSTRUMENTATION = "android.app.Instrumentation"; //$NON-NLS-1$
|
||||
public final static String CLASS_INSTRUMENTATION_RUNNER =
|
||||
@@ -202,7 +198,7 @@ public class AndroidConstants {
|
||||
"android.preference." + CLASS_NAME_PREFERENCE_SCREEN; //$NON-NLS-1$
|
||||
public final static String CLASS_PREFERENCEGROUP = "android.preference.PreferenceGroup"; //$NON-NLS-1$
|
||||
public final static String CLASS_PARCELABLE = "android.os.Parcelable"; //$NON-NLS-1$
|
||||
|
||||
|
||||
public final static String CLASS_BRIDGE = "com.android.layoutlib.bridge.Bridge"; //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
@@ -219,6 +215,6 @@ public class AndroidConstants {
|
||||
|
||||
/** The base URL where to find the Android class & manifest documentation */
|
||||
public static final String CODESITE_BASE_URL = "http://code.google.com/android"; //$NON-NLS-1$
|
||||
|
||||
|
||||
public static final String LIBRARY_TEST_RUNNER = "android.test.runner"; // $NON-NLS-1$
|
||||
}
|
||||
@@ -16,6 +16,10 @@ public class Messages extends NLS {
|
||||
|
||||
public static String AdtPlugin_Parsing_Resources;
|
||||
|
||||
public static String Console_Data_Project_Tag;
|
||||
|
||||
public static String Console_Date_Tag;
|
||||
|
||||
public static String Could_Not_Find;
|
||||
|
||||
public static String Could_Not_Find_Folder;
|
||||
|
||||
@@ -14,8 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.adt;
|
||||
package com.android.ide.eclipse.adt.internal;
|
||||
|
||||
import com.android.ide.eclipse.adt.AdtPlugin;
|
||||
import com.android.ide.eclipse.adt.Messages;
|
||||
import com.android.ide.eclipse.adt.AdtPlugin.CheckSdkErrorHandler;
|
||||
import com.android.sdklib.SdkConstants;
|
||||
|
||||
@@ -32,7 +34,7 @@ import java.util.regex.Pattern;
|
||||
/**
|
||||
* Class handling the version check for the plugin vs. the SDK.<br>
|
||||
* The plugin must be able to support all version of the SDK.
|
||||
*
|
||||
*
|
||||
* <p/>An SDK can require a new version of the plugin.
|
||||
* <p/>The SDK contains a file with the minimum version for the plugin. This file is inside the
|
||||
* <code>tools/lib</code> directory, and is called <code>plugin.prop</code>.<br>
|
||||
@@ -40,7 +42,7 @@ import java.util.regex.Pattern;
|
||||
* against the current plugin version.<br>
|
||||
*
|
||||
*/
|
||||
final class VersionCheck {
|
||||
public final class VersionCheck {
|
||||
/**
|
||||
* Pattern to get the minimum plugin version supported by the SDK. This is read from
|
||||
* the file <code>$SDK/tools/lib/plugin.prop</code>.
|
||||
@@ -14,10 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.adt.project;
|
||||
package com.android.ide.eclipse.adt.internal.actions;
|
||||
|
||||
import com.android.ide.eclipse.adt.AdtPlugin;
|
||||
import com.android.ide.eclipse.common.AndroidConstants;
|
||||
import com.android.ide.eclipse.adt.AndroidConstants;
|
||||
import com.android.ide.eclipse.adt.internal.project.ProjectHelper;
|
||||
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.IProjectDescription;
|
||||
@@ -14,7 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.adt.project;
|
||||
package com.android.ide.eclipse.adt.internal.actions;
|
||||
|
||||
import com.android.ide.eclipse.adt.internal.project.AndroidNature;
|
||||
import com.android.ide.eclipse.adt.internal.project.ProjectHelper;
|
||||
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
File diff suppressed because it is too large
Load Diff
@@ -14,10 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.adt.build;
|
||||
package com.android.ide.eclipse.adt.internal.build;
|
||||
|
||||
import com.android.ide.eclipse.adt.build.BaseBuilder.BaseDeltaVisitor;
|
||||
import com.android.ide.eclipse.common.AndroidConstants;
|
||||
import com.android.ide.eclipse.adt.AndroidConstants;
|
||||
import com.android.ide.eclipse.adt.internal.build.BaseBuilder.BaseDeltaVisitor;
|
||||
import com.android.sdklib.SdkConstants;
|
||||
|
||||
import org.eclipse.core.resources.IFile;
|
||||
@@ -14,16 +14,16 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.adt.build;
|
||||
package com.android.ide.eclipse.adt.internal.build;
|
||||
|
||||
import com.android.ide.eclipse.adt.AdtConstants;
|
||||
import com.android.ide.eclipse.adt.AdtPlugin;
|
||||
import com.android.ide.eclipse.adt.project.ProjectHelper;
|
||||
import com.android.ide.eclipse.adt.sdk.LoadStatus;
|
||||
import com.android.ide.eclipse.common.AndroidConstants;
|
||||
import com.android.ide.eclipse.common.project.BaseProjectHelper;
|
||||
import com.android.ide.eclipse.common.project.XmlErrorHandler;
|
||||
import com.android.ide.eclipse.common.project.XmlErrorHandler.XmlErrorListener;
|
||||
import com.android.ide.eclipse.adt.AndroidConstants;
|
||||
import com.android.ide.eclipse.adt.internal.project.BaseProjectHelper;
|
||||
import com.android.ide.eclipse.adt.internal.project.ProjectHelper;
|
||||
import com.android.ide.eclipse.adt.internal.project.XmlErrorHandler;
|
||||
import com.android.ide.eclipse.adt.internal.project.XmlErrorHandler.XmlErrorListener;
|
||||
import com.android.ide.eclipse.adt.internal.sdk.LoadStatus;
|
||||
|
||||
import org.eclipse.core.resources.IContainer;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
@@ -146,7 +146,7 @@ abstract class BaseBuilder extends IncrementalProjectBuilder {
|
||||
*/
|
||||
private final static Pattern sPattern7Line1 = Pattern.compile(
|
||||
"^ERROR:\\s+9-patch\\s+image\\s+(.+)\\s+malformed\\.$"); //$NON-NLS-1$
|
||||
|
||||
|
||||
private final static Pattern sPattern8Line1 = Pattern.compile(
|
||||
"^(invalid resource directory name): (.*)$"); //$NON-NLS-1$
|
||||
|
||||
@@ -179,7 +179,7 @@ abstract class BaseBuilder extends IncrementalProjectBuilder {
|
||||
public BaseDeltaVisitor(BaseBuilder builder) {
|
||||
mBuilder = builder;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Finds a matching Source folder for the current path. This checkds if the current path
|
||||
* leads to, or is a source folder.
|
||||
@@ -189,18 +189,18 @@ abstract class BaseBuilder extends IncrementalProjectBuilder {
|
||||
*/
|
||||
protected static String[] findMatchingSourceFolder(ArrayList<IPath> sourceFolders,
|
||||
String[] pathSegments) {
|
||||
|
||||
|
||||
for (IPath p : sourceFolders) {
|
||||
// check if we are inside one of those source class path
|
||||
|
||||
|
||||
// get the segments
|
||||
String[] srcSegments = p.segments();
|
||||
|
||||
|
||||
// compare segments. We want the path of the resource
|
||||
// we're visiting to be
|
||||
boolean valid = true;
|
||||
int segmentCount = pathSegments.length;
|
||||
|
||||
|
||||
for (int i = 0 ; i < segmentCount; i++) {
|
||||
String s1 = pathSegments[i];
|
||||
String s2 = srcSegments[i];
|
||||
@@ -210,7 +210,7 @@ abstract class BaseBuilder extends IncrementalProjectBuilder {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (valid) {
|
||||
// this folder, or one of this children is a source
|
||||
// folder!
|
||||
@@ -218,7 +218,7 @@ abstract class BaseBuilder extends IncrementalProjectBuilder {
|
||||
return srcSegments;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -278,7 +278,7 @@ abstract class BaseBuilder extends IncrementalProjectBuilder {
|
||||
|
||||
/**
|
||||
* Adds a marker to the current project.
|
||||
*
|
||||
*
|
||||
* @param markerId The id of the marker to add.
|
||||
* @param message the message associated with the mark
|
||||
* @param severity the severity of the marker.
|
||||
@@ -350,9 +350,9 @@ abstract class BaseBuilder extends IncrementalProjectBuilder {
|
||||
protected final int grabProcessOutput(final Process process,
|
||||
final ArrayList<String> results)
|
||||
throws InterruptedException {
|
||||
// Due to the limited buffer size on windows for the standard io (stderr, stdout), we
|
||||
// *need* to read both stdout and stderr all the time. If we don't and a process output
|
||||
// a large amount, this could deadlock the process.
|
||||
// Due to the limited buffer size on windows for the standard io (stderr, stdout), we
|
||||
// *need* to read both stdout and stderr all the time. If we don't and a process output
|
||||
// a large amount, this could deadlock the process.
|
||||
|
||||
// read the lines as they come. if null is returned, it's
|
||||
// because the process finished
|
||||
@@ -576,7 +576,7 @@ abstract class BaseBuilder extends IncrementalProjectBuilder {
|
||||
// success, go to the next line
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
m = sPattern8Line1.matcher(p);
|
||||
if (m.matches()) {
|
||||
String location = m.group(2);
|
||||
@@ -596,7 +596,7 @@ abstract class BaseBuilder extends IncrementalProjectBuilder {
|
||||
if (m.matches()) {
|
||||
String badConfig = m.group(1);
|
||||
String msg = String.format("APK Configuration filter '%1$s' is invalid", badConfig);
|
||||
|
||||
|
||||
// skip the next line
|
||||
i++;
|
||||
|
||||
@@ -825,7 +825,7 @@ abstract class BaseBuilder extends IncrementalProjectBuilder {
|
||||
|
||||
// get a java project from it
|
||||
IJavaProject javaProject = JavaCore.create(project);
|
||||
|
||||
|
||||
IWorkspaceRoot wsRoot = ResourcesPlugin.getWorkspace().getRoot();
|
||||
|
||||
ArrayList<String> oslibraryList = new ArrayList<String>();
|
||||
@@ -836,7 +836,7 @@ abstract class BaseBuilder extends IncrementalProjectBuilder {
|
||||
e.getEntryKind() == IClasspathEntry.CPE_VARIABLE) {
|
||||
// if this is a classpath variable reference, we resolve it.
|
||||
if (e.getEntryKind() == IClasspathEntry.CPE_VARIABLE) {
|
||||
e = JavaCore.getResolvedClasspathEntry(e);
|
||||
e = JavaCore.getResolvedClasspathEntry(e);
|
||||
}
|
||||
|
||||
// get the IPath
|
||||
@@ -878,15 +878,15 @@ abstract class BaseBuilder extends IncrementalProjectBuilder {
|
||||
|
||||
return oslibraryList.toArray(new String[oslibraryList.size()]);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Aborts the build if the SDK/project setups are broken. This does not
|
||||
* display any errors.
|
||||
*
|
||||
*
|
||||
* @param project The {@link IJavaProject} being compiled.
|
||||
* @throws CoreException
|
||||
*/
|
||||
protected final void abortOnBadSetup(IProject project) throws CoreException {
|
||||
protected void abortOnBadSetup(IProject project) throws CoreException {
|
||||
// check if we have finished loading the SDK.
|
||||
if (AdtPlugin.getDefault().getSdkLoadStatus() != LoadStatus.LOADED) {
|
||||
// we exit silently
|
||||
@@ -896,22 +896,22 @@ abstract class BaseBuilder extends IncrementalProjectBuilder {
|
||||
// abort if there are TARGET or ADT type markers
|
||||
IMarker[] markers = project.findMarkers(AdtConstants.MARKER_TARGET,
|
||||
false /*includeSubtypes*/, IResource.DEPTH_ZERO);
|
||||
|
||||
|
||||
if (markers.length > 0) {
|
||||
stopBuild("");
|
||||
}
|
||||
|
||||
|
||||
markers = project.findMarkers(AdtConstants.MARKER_ADT, false /*includeSubtypes*/,
|
||||
IResource.DEPTH_ZERO);
|
||||
|
||||
|
||||
if (markers.length > 0) {
|
||||
stopBuild("");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Throws an exception to cancel the build.
|
||||
*
|
||||
*
|
||||
* @param error the error message
|
||||
* @param args the printf-style arguments to the error message.
|
||||
* @throws CoreException
|
||||
@@ -920,7 +920,7 @@ abstract class BaseBuilder extends IncrementalProjectBuilder {
|
||||
throw new CoreException(new Status(IStatus.CANCEL, AdtPlugin.PLUGIN_ID,
|
||||
String.format(error, args)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Recursively delete all the derived resources.
|
||||
*/
|
||||
@@ -1,10 +1,10 @@
|
||||
|
||||
package com.android.ide.eclipse.adt.build;
|
||||
package com.android.ide.eclipse.adt.internal.build;
|
||||
|
||||
import org.eclipse.osgi.util.NLS;
|
||||
|
||||
public class Messages extends NLS {
|
||||
private static final String BUNDLE_NAME = "com.android.ide.eclipse.adt.build.build_messages"; //$NON-NLS-1$
|
||||
private static final String BUNDLE_NAME = "com.android.ide.eclipse.adt.internal.build.build_messages"; //$NON-NLS-1$
|
||||
|
||||
public static String AAPT_Error;
|
||||
|
||||
@@ -14,16 +14,16 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.adt.build;
|
||||
package com.android.ide.eclipse.adt.internal.build;
|
||||
|
||||
import com.android.ide.eclipse.adt.AdtConstants;
|
||||
import com.android.ide.eclipse.adt.AdtPlugin;
|
||||
import com.android.ide.eclipse.adt.project.FixLaunchConfig;
|
||||
import com.android.ide.eclipse.adt.sdk.Sdk;
|
||||
import com.android.ide.eclipse.common.AndroidConstants;
|
||||
import com.android.ide.eclipse.common.project.AndroidManifestParser;
|
||||
import com.android.ide.eclipse.common.project.BaseProjectHelper;
|
||||
import com.android.ide.eclipse.common.project.XmlErrorHandler.BasicXmlErrorListener;
|
||||
import com.android.ide.eclipse.adt.AndroidConstants;
|
||||
import com.android.ide.eclipse.adt.internal.project.AndroidManifestParser;
|
||||
import com.android.ide.eclipse.adt.internal.project.BaseProjectHelper;
|
||||
import com.android.ide.eclipse.adt.internal.project.FixLaunchConfig;
|
||||
import com.android.ide.eclipse.adt.internal.project.XmlErrorHandler.BasicXmlErrorListener;
|
||||
import com.android.ide.eclipse.adt.internal.sdk.Sdk;
|
||||
import com.android.sdklib.IAndroidTarget;
|
||||
import com.android.sdklib.SdkConstants;
|
||||
|
||||
@@ -271,8 +271,7 @@ public class PreCompilerBuilder extends BaseBuilder {
|
||||
// if there was some XML errors, we just return w/o doing
|
||||
// anything since we've put some markers in the files anyway.
|
||||
if (dv != null && dv.mXmlError) {
|
||||
AdtPlugin.printBuildToConsole(AdtConstants.BUILD_VERBOSE, project,
|
||||
Messages.Xml_Error);
|
||||
AdtPlugin.printErrorToConsole(project, Messages.Xml_Error);
|
||||
|
||||
// This interrupts the build. The next builders will not run.
|
||||
stopBuild(Messages.Xml_Error);
|
||||
@@ -14,15 +14,15 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.adt.build;
|
||||
package com.android.ide.eclipse.adt.internal.build;
|
||||
|
||||
import com.android.ide.eclipse.adt.AdtConstants;
|
||||
import com.android.ide.eclipse.adt.AdtPlugin;
|
||||
import com.android.ide.eclipse.adt.build.BaseBuilder.BaseDeltaVisitor;
|
||||
import com.android.ide.eclipse.adt.build.PreCompilerBuilder.AidlData;
|
||||
import com.android.ide.eclipse.common.AndroidConstants;
|
||||
import com.android.ide.eclipse.common.project.AndroidManifestParser;
|
||||
import com.android.ide.eclipse.common.project.BaseProjectHelper;
|
||||
import com.android.ide.eclipse.adt.AndroidConstants;
|
||||
import com.android.ide.eclipse.adt.internal.build.BaseBuilder.BaseDeltaVisitor;
|
||||
import com.android.ide.eclipse.adt.internal.build.PreCompilerBuilder.AidlData;
|
||||
import com.android.ide.eclipse.adt.internal.project.AndroidManifestParser;
|
||||
import com.android.ide.eclipse.adt.internal.project.BaseProjectHelper;
|
||||
import com.android.sdklib.SdkConstants;
|
||||
|
||||
import org.eclipse.core.resources.IContainer;
|
||||
@@ -14,14 +14,14 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.adt.build;
|
||||
package com.android.ide.eclipse.adt.internal.build;
|
||||
|
||||
import com.android.ide.eclipse.adt.AdtConstants;
|
||||
import com.android.ide.eclipse.adt.AdtPlugin;
|
||||
import com.android.ide.eclipse.adt.project.ProjectHelper;
|
||||
import com.android.ide.eclipse.adt.sdk.Sdk;
|
||||
import com.android.ide.eclipse.common.AndroidConstants;
|
||||
import com.android.ide.eclipse.common.project.BaseProjectHelper;
|
||||
import com.android.ide.eclipse.adt.AndroidConstants;
|
||||
import com.android.ide.eclipse.adt.internal.project.BaseProjectHelper;
|
||||
import com.android.ide.eclipse.adt.internal.project.ProjectHelper;
|
||||
import com.android.ide.eclipse.adt.internal.sdk.Sdk;
|
||||
import com.android.sdklib.IAndroidTarget;
|
||||
import com.android.sdklib.SdkConstants;
|
||||
|
||||
@@ -14,22 +14,24 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors;
|
||||
package com.android.ide.eclipse.adt.internal.editors;
|
||||
|
||||
import com.android.ide.eclipse.adt.sdk.AndroidTargetData;
|
||||
import com.android.ide.eclipse.editors.descriptors.AttributeDescriptor;
|
||||
import com.android.ide.eclipse.editors.descriptors.DescriptorsUtils;
|
||||
import com.android.ide.eclipse.editors.descriptors.ElementDescriptor;
|
||||
import com.android.ide.eclipse.editors.descriptors.IDescriptorProvider;
|
||||
import com.android.ide.eclipse.editors.descriptors.SeparatorAttributeDescriptor;
|
||||
import com.android.ide.eclipse.editors.descriptors.TextAttributeDescriptor;
|
||||
import com.android.ide.eclipse.editors.descriptors.TextValueDescriptor;
|
||||
import com.android.ide.eclipse.editors.descriptors.XmlnsAttributeDescriptor;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiAttributeNode;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiFlagAttributeNode;
|
||||
import com.android.ide.eclipse.adt.AdtPlugin;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.AttributeDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.DescriptorsUtils;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.ElementDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.IDescriptorProvider;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.SeparatorAttributeDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.TextAttributeDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.TextValueDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.XmlnsAttributeDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiAttributeNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiFlagAttributeNode;
|
||||
import com.android.ide.eclipse.adt.internal.sdk.AndroidTargetData;
|
||||
import com.android.sdklib.SdkConstants;
|
||||
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.jface.text.BadLocationException;
|
||||
import org.eclipse.jface.text.IDocument;
|
||||
import org.eclipse.jface.text.ITextViewer;
|
||||
@@ -74,7 +76,7 @@ public abstract class AndroidContentAssist implements IContentAssistProcessor {
|
||||
|
||||
/** Regexp to detect an element tag name */
|
||||
private static Pattern sFirstElementWord = Pattern.compile("^[a-zA-Z0-9_:]+"); //$NON-NLS-1$
|
||||
|
||||
|
||||
/** Regexp to detect whitespace */
|
||||
private static Pattern sWhitespace = Pattern.compile("\\s+"); //$NON-NLS-1$
|
||||
|
||||
@@ -86,11 +88,11 @@ public abstract class AndroidContentAssist implements IContentAssistProcessor {
|
||||
private ElementDescriptor mRootDescriptor;
|
||||
|
||||
private final int mDescriptorId;
|
||||
|
||||
|
||||
private AndroidEditor mEditor;
|
||||
|
||||
/**
|
||||
* Constructor for AndroidContentAssist
|
||||
* Constructor for AndroidContentAssist
|
||||
* @param descriptorId An id for {@link AndroidTargetData#getDescriptorProvider(int)}.
|
||||
* The Id can be one of {@link AndroidTargetData#DESCRIPTOR_MANIFEST},
|
||||
* {@link AndroidTargetData#DESCRIPTOR_LAYOUT},
|
||||
@@ -110,17 +112,22 @@ public abstract class AndroidContentAssist implements IContentAssistProcessor {
|
||||
* @param viewer the viewer whose document is used to compute the proposals
|
||||
* @param offset an offset within the document for which completions should be computed
|
||||
* @return an array of completion proposals or <code>null</code> if no proposals are possible
|
||||
*
|
||||
*
|
||||
* @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#computeCompletionProposals(org.eclipse.jface.text.ITextViewer, int)
|
||||
*/
|
||||
public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int offset) {
|
||||
|
||||
|
||||
if (mEditor == null) {
|
||||
mEditor = getAndroidEditor(viewer);
|
||||
if (mEditor == null) {
|
||||
// This should not happen. Duck and forget.
|
||||
AdtPlugin.log(IStatus.ERROR, "Editor not found during completion");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
UiElementNode rootUiNode = mEditor.getUiRootNode();
|
||||
|
||||
|
||||
Object[] choices = null; /* An array of ElementDescriptor, or AttributeDescriptor
|
||||
or String or null */
|
||||
String parent = ""; //$NON-NLS-1$
|
||||
@@ -136,7 +143,12 @@ public abstract class AndroidContentAssist implements IContentAssistProcessor {
|
||||
// check to see if we can find a UiElementNode matching this XML node
|
||||
UiElementNode currentUiNode =
|
||||
rootUiNode == null ? null : rootUiNode.findXmlNode(currentNode);
|
||||
|
||||
|
||||
if (currentNode == null) {
|
||||
// Should not happen (an XML doc always has at least a doc node). Just give up.
|
||||
return null;
|
||||
}
|
||||
|
||||
if (currentNode.getNodeType() == Node.ELEMENT_NODE) {
|
||||
parent = currentNode.getNodeName();
|
||||
|
||||
@@ -154,7 +166,7 @@ public abstract class AndroidContentAssist implements IContentAssistProcessor {
|
||||
// We're editing attributes in an element node (either the attributes' names
|
||||
// or their values).
|
||||
choices = getChoicesForAttribute(parent, currentNode, currentUiNode, info);
|
||||
|
||||
|
||||
if (info.correctedPrefix != null) {
|
||||
wordPrefix = info.correctedPrefix;
|
||||
}
|
||||
@@ -180,7 +192,7 @@ public abstract class AndroidContentAssist implements IContentAssistProcessor {
|
||||
needTag = '<';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// get the selection length
|
||||
int selectionLength = 0;
|
||||
ISelection selection = viewer.getSelectionProvider().getSelection();
|
||||
@@ -196,7 +208,7 @@ public abstract class AndroidContentAssist implements IContentAssistProcessor {
|
||||
/**
|
||||
* Returns the namespace prefix matching the Android Resource URI.
|
||||
* If no such declaration is found, returns the default "android" prefix.
|
||||
*
|
||||
*
|
||||
* @param node The current node. Must not be null.
|
||||
* @param nsUri The namespace URI of which the prefix is to be found,
|
||||
* e.g. {@link SdkConstants#NS_RESOURCES}
|
||||
@@ -210,9 +222,9 @@ public abstract class AndroidContentAssist implements IContentAssistProcessor {
|
||||
if (XmlnsAttributeDescriptor.XMLNS_URI.equals(nsUri)) {
|
||||
return "xmlns"; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
|
||||
HashSet<String> visited = new HashSet<String>();
|
||||
|
||||
|
||||
String prefix = null;
|
||||
for (; prefix == null &&
|
||||
node != null &&
|
||||
@@ -230,7 +242,7 @@ public abstract class AndroidContentAssist implements IContentAssistProcessor {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Use a sensible default prefix if we can't find one.
|
||||
// We need to make sure the prefix is not one that was declared in the scope
|
||||
// visited above.
|
||||
@@ -251,7 +263,7 @@ public abstract class AndroidContentAssist implements IContentAssistProcessor {
|
||||
* <p/>
|
||||
* Example: <manifest><applic*cursor* => returns the list of all elements that
|
||||
* can be found under <manifest>, of which <application> is one of the choices.
|
||||
*
|
||||
*
|
||||
* @return an ElementDescriptor[] or null if no valid element was found.
|
||||
*/
|
||||
private Object[] getChoicesForElement(String parent, Node current_node) {
|
||||
@@ -287,8 +299,8 @@ public abstract class AndroidContentAssist implements IContentAssistProcessor {
|
||||
* lenient as suitable for attribute values.
|
||||
* - AttribInfo.needTag will be non-zero if we find that the attribute completion proposal
|
||||
* must be double-quoted.
|
||||
* @param currentUiNode
|
||||
*
|
||||
* @param currentUiNode
|
||||
*
|
||||
* @return an AttributeDescriptor[] if the user is editing an attribute name.
|
||||
* a String[] if the user is editing an attribute value with some known values,
|
||||
* or null if nothing is known about the context.
|
||||
@@ -309,7 +321,7 @@ public abstract class AndroidContentAssist implements IContentAssistProcessor {
|
||||
} else {
|
||||
attrInfo.needTag = '"';
|
||||
}
|
||||
|
||||
|
||||
if (currentUiNode != null) {
|
||||
// look for an UI attribute matching the current attribute name
|
||||
String attrName = attrInfo.name;
|
||||
@@ -329,7 +341,7 @@ public abstract class AndroidContentAssist implements IContentAssistProcessor {
|
||||
|
||||
if (currAttrNode != null) {
|
||||
choices = currAttrNode.getPossibleValues(value);
|
||||
|
||||
|
||||
if (currAttrNode instanceof UiFlagAttributeNode) {
|
||||
// A "flag" can consist of several values separated by "or" (|).
|
||||
// If the correct prefix contains such a pipe character, we change
|
||||
@@ -345,7 +357,7 @@ public abstract class AndroidContentAssist implements IContentAssistProcessor {
|
||||
|
||||
if (choices == null) {
|
||||
// fallback on the older descriptor-only based lookup.
|
||||
|
||||
|
||||
// in order to properly handle the special case of the name attribute in
|
||||
// the action tag, we need the grandparent of the action node, to know
|
||||
// what type of actions we need.
|
||||
@@ -358,7 +370,7 @@ public abstract class AndroidContentAssist implements IContentAssistProcessor {
|
||||
greatGrandParentName = greatGrandParent.getLocalName();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
AndroidTargetData data = mEditor.getTargetData();
|
||||
if (data != null) {
|
||||
choices = data.getAttributeValues(parent, attrInfo.name, greatGrandParentName);
|
||||
@@ -382,7 +394,7 @@ public abstract class AndroidContentAssist implements IContentAssistProcessor {
|
||||
* This means the user is editing outside of any XML element or attribute.
|
||||
* Simply return the list of XML elements that can be present there, based on the
|
||||
* parent of the current node.
|
||||
*
|
||||
*
|
||||
* @return An ElementDescriptor[] or null.
|
||||
*/
|
||||
private Object[] getChoicesForTextNode(Node currentNode) {
|
||||
@@ -413,7 +425,7 @@ public abstract class AndroidContentAssist implements IContentAssistProcessor {
|
||||
* - AttributeDescriptor: a possible attribute descriptor which XML name should be completed.
|
||||
* - String: string values to display as-is to the user. Typically those are possible
|
||||
* values for a given attribute.
|
||||
*
|
||||
*
|
||||
* @return The ICompletionProposal[] to display to the user.
|
||||
*/
|
||||
private ICompletionProposal[] computeProposals(int offset, Node currentNode,
|
||||
@@ -421,7 +433,7 @@ public abstract class AndroidContentAssist implements IContentAssistProcessor {
|
||||
boolean is_attribute, int selectionLength) {
|
||||
ArrayList<CompletionProposal> proposals = new ArrayList<CompletionProposal>();
|
||||
HashMap<String, String> nsUriMap = new HashMap<String, String>();
|
||||
|
||||
|
||||
for (Object choice : choices) {
|
||||
String keyword = null;
|
||||
String nsPrefix = null;
|
||||
@@ -441,7 +453,7 @@ public abstract class AndroidContentAssist implements IContentAssistProcessor {
|
||||
if (choice instanceof TextAttributeDescriptor) {
|
||||
tooltip = ((TextAttributeDescriptor) choice).getTooltip();
|
||||
}
|
||||
|
||||
|
||||
// Get the namespace URI for the attribute. Note that some attributes
|
||||
// do not have a namespace and thus return null here.
|
||||
String nsUri = ((AttributeDescriptor)choice).getNamespaceUri();
|
||||
@@ -455,13 +467,13 @@ public abstract class AndroidContentAssist implements IContentAssistProcessor {
|
||||
if (nsPrefix != null) {
|
||||
nsPrefix += ":"; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
|
||||
} else if (choice instanceof String) {
|
||||
keyword = (String) choice;
|
||||
} else {
|
||||
continue; // discard unknown choice
|
||||
}
|
||||
|
||||
|
||||
String nsKeyword = nsPrefix == null ? keyword : (nsPrefix + keyword);
|
||||
|
||||
if (keyword.startsWith(wordPrefix) ||
|
||||
@@ -499,7 +511,7 @@ public abstract class AndroidContentAssist implements IContentAssistProcessor {
|
||||
proposals.add(proposal);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return proposals.toArray(new ICompletionProposal[proposals.size()]);
|
||||
}
|
||||
|
||||
@@ -510,7 +522,7 @@ public abstract class AndroidContentAssist implements IContentAssistProcessor {
|
||||
* <p/>
|
||||
* Elements can have children if the descriptor has children element descriptors
|
||||
* or if one of the attributes is a TextValueDescriptor.
|
||||
*
|
||||
*
|
||||
* @param descriptor An ElementDescriptor or an AttributeDescriptor
|
||||
* @return True if the descriptor is an ElementDescriptor that can have children or a text value
|
||||
*/
|
||||
@@ -548,7 +560,7 @@ public abstract class AndroidContentAssist implements IContentAssistProcessor {
|
||||
/**
|
||||
* Returns the characters which when entered by the user should
|
||||
* automatically trigger the presentation of possible completions.
|
||||
*
|
||||
*
|
||||
* In our case, we auto-activate on opening tags and attributes namespace.
|
||||
*
|
||||
* @return the auto activation characters for completion proposal or <code>null</code>
|
||||
@@ -569,7 +581,7 @@ public abstract class AndroidContentAssist implements IContentAssistProcessor {
|
||||
public String getErrorMessage() {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Heuristically extracts the prefix used for determining template relevance
|
||||
* from the viewer's document. The default implementation returns the String from
|
||||
@@ -578,7 +590,7 @@ public abstract class AndroidContentAssist implements IContentAssistProcessor {
|
||||
*
|
||||
* The part were we access the docment was extracted from
|
||||
* org.eclipse.jface.text.templatesTemplateCompletionProcessor and adapted to our needs.
|
||||
*
|
||||
*
|
||||
* @param viewer the viewer
|
||||
* @param offset offset into document
|
||||
* @return the prefix to consider
|
||||
@@ -611,7 +623,7 @@ public abstract class AndroidContentAssist implements IContentAssistProcessor {
|
||||
return ""; //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Extracts the character at the given offset.
|
||||
* Returns 0 if the offset is invalid.
|
||||
@@ -676,7 +688,7 @@ public abstract class AndroidContentAssist implements IContentAssistProcessor {
|
||||
// text will contain the full string of the current element,
|
||||
// i.e. whatever is after the "<" to the current cursor
|
||||
String text = document.get(offset, n - offset);
|
||||
|
||||
|
||||
// Normalize whitespace to single spaces
|
||||
text = sWhitespace.matcher(text).replaceAll(" "); //$NON-NLS-1$
|
||||
|
||||
@@ -684,13 +696,13 @@ public abstract class AndroidContentAssist implements IContentAssistProcessor {
|
||||
// any whitespace. If there's nothing left, no attribute has been defined yet.
|
||||
// Be sure to keep any whitespace after the initial word if any, as it matters.
|
||||
text = sFirstElementWord.matcher(text).replaceFirst(""); //$NON-NLS-1$
|
||||
|
||||
|
||||
// There MUST be space after the element name. If not, the cursor is still
|
||||
// defining the element name.
|
||||
if (!text.startsWith(" ")) { //$NON-NLS-1$
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
// Remove full attributes:
|
||||
// Syntax:
|
||||
// name = "..." quoted string with all but < and "
|
||||
@@ -709,7 +721,7 @@ public abstract class AndroidContentAssist implements IContentAssistProcessor {
|
||||
// merged with the previous one.
|
||||
// - string with an = sign, optionally followed by a quote (' or "): the user is
|
||||
// writing the value of the attribute.
|
||||
int pos_equal = text.indexOf('=');
|
||||
int pos_equal = text.indexOf('=');
|
||||
if (pos_equal == -1) {
|
||||
info.isInValue = false;
|
||||
info.name = text.trim();
|
||||
@@ -749,7 +761,7 @@ public abstract class AndroidContentAssist implements IContentAssistProcessor {
|
||||
|
||||
return node;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Computes (if needed) and returns the root descriptor.
|
||||
*/
|
||||
@@ -758,17 +770,17 @@ public abstract class AndroidContentAssist implements IContentAssistProcessor {
|
||||
AndroidTargetData data = mEditor.getTargetData();
|
||||
if (data != null) {
|
||||
IDescriptorProvider descriptorProvider = data.getDescriptorProvider(mDescriptorId);
|
||||
|
||||
|
||||
if (descriptorProvider != null) {
|
||||
mRootDescriptor = new ElementDescriptor("",
|
||||
descriptorProvider.getRootElementDescriptors());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return mRootDescriptor;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the active {@link AndroidEditor} matching this source viewer.
|
||||
*/
|
||||
@@ -789,7 +801,7 @@ public abstract class AndroidContentAssist implements IContentAssistProcessor {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -14,13 +14,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors;
|
||||
package com.android.ide.eclipse.adt.internal.editors;
|
||||
|
||||
import com.android.ide.eclipse.adt.AdtPlugin;
|
||||
import com.android.ide.eclipse.adt.sdk.AndroidTargetData;
|
||||
import com.android.ide.eclipse.adt.sdk.Sdk;
|
||||
import com.android.ide.eclipse.adt.sdk.Sdk.ITargetChangeListener;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.sdk.AndroidTargetData;
|
||||
import com.android.ide.eclipse.adt.internal.sdk.Sdk;
|
||||
import com.android.ide.eclipse.adt.internal.sdk.Sdk.ITargetChangeListener;
|
||||
import com.android.sdklib.IAndroidTarget;
|
||||
|
||||
import org.eclipse.core.resources.IFile;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors;
|
||||
package com.android.ide.eclipse.adt.internal.editors;
|
||||
|
||||
|
||||
import org.eclipse.jface.text.IAutoEditStrategy;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors;
|
||||
package com.android.ide.eclipse.adt.internal.editors;
|
||||
|
||||
import org.xml.sax.Attributes;
|
||||
import org.xml.sax.InputSource;
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
|
||||
package com.android.ide.eclipse.editors;
|
||||
package com.android.ide.eclipse.adt.internal.editors;
|
||||
|
||||
import com.android.ide.eclipse.adt.AdtPlugin;
|
||||
import com.android.sdklib.SdkConstants;
|
||||
@@ -14,12 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.descriptors;
|
||||
package com.android.ide.eclipse.adt.internal.editors.descriptors;
|
||||
|
||||
import com.android.ide.eclipse.adt.AdtPlugin;
|
||||
import com.android.ide.eclipse.editors.IconFactory;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiAttributeNode;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.IconFactory;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiAttributeNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
|
||||
import com.android.sdklib.SdkConstants;
|
||||
|
||||
import org.eclipse.swt.graphics.Image;
|
||||
@@ -14,10 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.descriptors;
|
||||
package com.android.ide.eclipse.adt.internal.editors.descriptors;
|
||||
|
||||
import com.android.ide.eclipse.editors.IconFactory;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiAbstractTextAttributeNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.IconFactory;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiAbstractTextAttributeNode;
|
||||
|
||||
import org.eclipse.jface.viewers.ILabelProvider;
|
||||
import org.eclipse.jface.viewers.ILabelProviderListener;
|
||||
@@ -14,9 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.descriptors;
|
||||
package com.android.ide.eclipse.adt.internal.editors.descriptors;
|
||||
|
||||
import com.android.ide.eclipse.editors.uimodel.UiListAttributeNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiListAttributeNode;
|
||||
|
||||
/**
|
||||
* Describes a text attribute that can only contain boolean values.
|
||||
@@ -14,15 +14,15 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.descriptors;
|
||||
package com.android.ide.eclipse.adt.internal.editors.descriptors;
|
||||
|
||||
import com.android.ide.eclipse.common.AndroidConstants;
|
||||
import com.android.ide.eclipse.common.resources.ResourceType;
|
||||
import com.android.ide.eclipse.common.resources.DeclareStyleableInfo.AttributeInfo;
|
||||
import com.android.ide.eclipse.common.resources.DeclareStyleableInfo.AttributeInfo.Format;
|
||||
import com.android.ide.eclipse.editors.layout.LayoutConstants;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiDocumentNode;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.AndroidConstants;
|
||||
import com.android.ide.eclipse.adt.internal.editors.layout.LayoutConstants;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiDocumentNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.resources.ResourceType;
|
||||
import com.android.ide.eclipse.adt.internal.resources.DeclareStyleableInfo.AttributeInfo;
|
||||
import com.android.ide.eclipse.adt.internal.resources.DeclareStyleableInfo.AttributeInfo.Format;
|
||||
import com.android.sdklib.SdkConstants;
|
||||
|
||||
import org.eclipse.swt.graphics.Image;
|
||||
@@ -57,7 +57,7 @@ public final class DescriptorsUtils {
|
||||
public static final String MANIFEST_SDK_URL = "/reference/android/R.styleable.html#"; //$NON-NLS-1$
|
||||
|
||||
public static final String IMAGE_KEY = "image"; //$NON-NLS-1$
|
||||
|
||||
|
||||
private static final String CODE = "$code"; //$NON-NLS-1$
|
||||
private static final String LINK = "$link"; //$NON-NLS-1$
|
||||
private static final String ELEM = "$elem"; //$NON-NLS-1$
|
||||
@@ -72,7 +72,7 @@ public final class DescriptorsUtils {
|
||||
/**
|
||||
* Creates a new {@link TextAttributeDescriptor} instance for the given XML name,
|
||||
* UI name and tooltip.
|
||||
*
|
||||
*
|
||||
* @param xmlName The XML attribute name.
|
||||
* @param uiName The UI attribute name.
|
||||
* @param nsUri The URI of the attribute. Can be null if attribute has no namespace.
|
||||
@@ -86,7 +86,7 @@ public final class DescriptorsUtils {
|
||||
|
||||
/**
|
||||
* Add all {@link AttributeInfo} to the the array of {@link AttributeDescriptor}.
|
||||
*
|
||||
*
|
||||
* @param attributes The list of {@link AttributeDescriptor} to append to
|
||||
* @param elementXmlName Optional XML local name of the element to which attributes are
|
||||
* being added. When not null, this is used to filter overrides.
|
||||
@@ -120,7 +120,7 @@ public final class DescriptorsUtils {
|
||||
|
||||
/**
|
||||
* Add an {@link AttributeInfo} to the the array of {@link AttributeDescriptor}.
|
||||
*
|
||||
*
|
||||
* @param attributes The list of {@link AttributeDescriptor} to append to
|
||||
* @param elementXmlName Optional XML local name of the element to which attributes are
|
||||
* being added. When not null, this is used to filter overrides.
|
||||
@@ -145,13 +145,13 @@ public final class DescriptorsUtils {
|
||||
if (required) {
|
||||
uiName += "*"; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
|
||||
String tooltip = null;
|
||||
String rawTooltip = info.getJavaDoc();
|
||||
if (rawTooltip == null) {
|
||||
rawTooltip = "";
|
||||
}
|
||||
|
||||
|
||||
String deprecated = info.getDeprecatedDoc();
|
||||
if (deprecated != null) {
|
||||
if (rawTooltip.length() > 0) {
|
||||
@@ -172,7 +172,7 @@ public final class DescriptorsUtils {
|
||||
if (flen > 0) {
|
||||
// Fill the formats in a set for faster access
|
||||
HashSet<Format> formats_set = new HashSet<Format>();
|
||||
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (rawTooltip != null && rawTooltip.length() > 0) {
|
||||
sb.append(rawTooltip);
|
||||
@@ -220,7 +220,7 @@ public final class DescriptorsUtils {
|
||||
overrideAttrLocalName = elements[elements.length - 1];
|
||||
elements = elements[0].split(","); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
|
||||
if (overrideAttrLocalName == null ||
|
||||
!overrideAttrLocalName.equals(xmlLocalName)) {
|
||||
continue;
|
||||
@@ -236,7 +236,7 @@ public final class DescriptorsUtils {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!ok_element) {
|
||||
continue;
|
||||
}
|
||||
@@ -247,7 +247,7 @@ public final class DescriptorsUtils {
|
||||
// The override is instance of the class to create, which must
|
||||
// have a constructor compatible with TextAttributeDescriptor.
|
||||
@SuppressWarnings("unchecked") //$NON-NLS-1$
|
||||
Class<? extends TextAttributeDescriptor> clazz =
|
||||
Class<? extends TextAttributeDescriptor> clazz =
|
||||
(Class<? extends TextAttributeDescriptor>) override;
|
||||
Constructor<? extends TextAttributeDescriptor> cons;
|
||||
cons = clazz.getConstructor(new Class<?>[] {
|
||||
@@ -310,7 +310,7 @@ public final class DescriptorsUtils {
|
||||
* Indicates the the given {@link AttributeInfo} already exists in the ArrayList of
|
||||
* {@link AttributeDescriptor}. This test for the presence of a descriptor with the same
|
||||
* XML name.
|
||||
*
|
||||
*
|
||||
* @param attributes The list of {@link AttributeDescriptor} to compare to.
|
||||
* @param nsUri The URI of the attribute. Can be null if attribute has no namespace.
|
||||
* See {@link SdkConstants#NS_RESOURCES} for a common value.
|
||||
@@ -370,9 +370,9 @@ public final class DescriptorsUtils {
|
||||
buf.append(c);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
name = buf.toString();
|
||||
|
||||
|
||||
// Replace these acronyms by upper-case versions
|
||||
// - (?<=^| ) means "if preceded by a space or beginning of string"
|
||||
// - (?=$| ) means "if followed by a space or end of string"
|
||||
@@ -381,11 +381,11 @@ public final class DescriptorsUtils {
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Capitalizes the string, i.e. transforms the initial [a-z] into [A-Z].
|
||||
* Returns the string unmodified if the first character is not [a-z].
|
||||
*
|
||||
*
|
||||
* @param str The string to capitalize.
|
||||
* @return The capitalized string
|
||||
*/
|
||||
@@ -393,7 +393,7 @@ public final class DescriptorsUtils {
|
||||
if (str == null || str.length() < 1 || str.charAt(0) < 'a' || str.charAt(0) > 'z') {
|
||||
return str;
|
||||
}
|
||||
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append((char)(str.charAt(0) + 'A' - 'a'));
|
||||
sb.append(str.substring(1));
|
||||
@@ -405,7 +405,7 @@ public final class DescriptorsUtils {
|
||||
*/
|
||||
public static String formatTooltip(String javadoc) {
|
||||
ArrayList<String> spans = scanJavadoc(javadoc);
|
||||
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
boolean needBreak = false;
|
||||
|
||||
@@ -430,7 +430,7 @@ public final class DescriptorsUtils {
|
||||
if (text != null) {
|
||||
text = text.trim();
|
||||
}
|
||||
|
||||
|
||||
// If there's no text, use the anchor if there's one
|
||||
if (text == null || text.length() == 0) {
|
||||
text = anchor;
|
||||
@@ -441,12 +441,12 @@ public final class DescriptorsUtils {
|
||||
// If we still have no text, use the base as text
|
||||
text = base;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (text != null) {
|
||||
sb.append(text);
|
||||
}
|
||||
|
||||
|
||||
} else if (ELEM.equals(s)) {
|
||||
s = spans.get(++i);
|
||||
if (s != null) {
|
||||
@@ -462,17 +462,17 @@ public final class DescriptorsUtils {
|
||||
needBreak = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Formats the javadoc tooltip to be usable in a FormText.
|
||||
* <p/>
|
||||
* If the descriptor can provide an icon, the caller should provide
|
||||
* elementsDescriptor.getIcon() as "image" to FormText, e.g.:
|
||||
* <code>formText.setImage(IMAGE_KEY, elementsDescriptor.getIcon());</code>
|
||||
*
|
||||
*
|
||||
* @param javadoc The javadoc to format. Cannot be null.
|
||||
* @param elementDescriptor The element descriptor parent of the javadoc. Cannot be null.
|
||||
* @param androidDocBaseUrl The base URL for the documentation. Cannot be null. Should be
|
||||
@@ -488,9 +488,9 @@ public final class DescriptorsUtils {
|
||||
if (sdkUrl != null && sdkUrl.startsWith(MANIFEST_SDK_URL)) {
|
||||
fullSdkUrl = androidDocBaseUrl + sdkUrl;
|
||||
}
|
||||
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
|
||||
Image icon = elementDescriptor.getIcon();
|
||||
if (icon != null) {
|
||||
sb.append("<form><li style=\"image\" value=\"" + //$NON-NLS-1$
|
||||
@@ -516,7 +516,7 @@ public final class DescriptorsUtils {
|
||||
String base = spans.get(++i);
|
||||
String anchor = spans.get(++i);
|
||||
String text = spans.get(++i);
|
||||
|
||||
|
||||
if (base != null) {
|
||||
base = base.trim();
|
||||
}
|
||||
@@ -526,7 +526,7 @@ public final class DescriptorsUtils {
|
||||
if (text != null) {
|
||||
text = text.trim();
|
||||
}
|
||||
|
||||
|
||||
// If there's no text, use the anchor if there's one
|
||||
if (text == null || text.length() == 0) {
|
||||
text = anchor;
|
||||
@@ -560,7 +560,7 @@ public final class DescriptorsUtils {
|
||||
// If we still have no text, use the base as text
|
||||
text = base;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (url != null && text != null) {
|
||||
sb.append("<a href=\""); //$NON-NLS-1$
|
||||
@@ -600,15 +600,15 @@ public final class DescriptorsUtils {
|
||||
|
||||
private static ArrayList<String> scanJavadoc(String javadoc) {
|
||||
ArrayList<String> spans = new ArrayList<String>();
|
||||
|
||||
|
||||
// Standardize all whitespace in the javadoc to single spaces.
|
||||
if (javadoc != null) {
|
||||
javadoc = javadoc.replaceAll("[ \t\f\r\n]+", " "); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
|
||||
|
||||
// Detects {@link <base>#<name> <text>} where all 3 are optional
|
||||
Pattern p_link = Pattern.compile("\\{@link\\s+([^#\\}\\s]*)(?:#([^\\s\\}]*))?(?:\\s*([^\\}]*))?\\}(.*)"); //$NON-NLS-1$
|
||||
// Detects <code>blah</code>
|
||||
// Detects <code>blah</code>
|
||||
Pattern p_code = Pattern.compile("<code>(.+?)</code>(.*)"); //$NON-NLS-1$
|
||||
// Detects @blah@, used in hard-coded tooltip descriptors
|
||||
Pattern p_elem = Pattern.compile("@([\\w -]+)@(.*)"); //$NON-NLS-1$
|
||||
@@ -621,7 +621,7 @@ public final class DescriptorsUtils {
|
||||
|
||||
int currentLength = 0;
|
||||
String text = null;
|
||||
|
||||
|
||||
while(javadoc != null && javadoc.length() > 0) {
|
||||
Matcher m;
|
||||
String s = null;
|
||||
@@ -665,7 +665,7 @@ public final class DescriptorsUtils {
|
||||
}
|
||||
if (s != null && s.length() > 0) {
|
||||
s = cleanupJavadocHtml(s);
|
||||
|
||||
|
||||
if (currentLength >= JAVADOC_BREAK_LENGTH) {
|
||||
spans.add(BREAK);
|
||||
currentLength = 0;
|
||||
@@ -680,12 +680,12 @@ public final class DescriptorsUtils {
|
||||
currentLength = 0;
|
||||
s = s.substring(pos + 1);
|
||||
}
|
||||
|
||||
|
||||
spans.add(s);
|
||||
currentLength += s.length();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return spans;
|
||||
}
|
||||
|
||||
@@ -722,15 +722,13 @@ public final class DescriptorsUtils {
|
||||
fill ? LayoutConstants.VALUE_FILL_PARENT : LayoutConstants.VALUE_WRAP_CONTENT,
|
||||
false /* override */);
|
||||
|
||||
String widget_id = getFreeWidgetId(ui_node.getUiRoot(),
|
||||
new Object[] { ui_node.getDescriptor().getXmlLocalName(), null, null, null });
|
||||
String widget_id = getFreeWidgetId(ui_node);
|
||||
if (widget_id != null) {
|
||||
ui_node.setAttributeValue(LayoutConstants.ATTR_ID, "@+id/" + widget_id, //$NON-NLS-1$
|
||||
false /* override */);
|
||||
ui_node.setAttributeValue(LayoutConstants.ATTR_ID, widget_id, false /* override */);
|
||||
}
|
||||
|
||||
ui_node.setAttributeValue(LayoutConstants.ATTR_TEXT, widget_id, false /*override*/);
|
||||
|
||||
|
||||
if (updateLayout) {
|
||||
UiElementNode ui_parent = ui_node.getUiParent();
|
||||
if (ui_parent != null &&
|
||||
@@ -752,19 +750,26 @@ public final class DescriptorsUtils {
|
||||
/**
|
||||
* Given a UI root node, returns the first available id that matches the
|
||||
* pattern "prefix%02d".
|
||||
*
|
||||
* <p/>TabWidget is a special case and the method will always return "@android:id/tabs".
|
||||
*
|
||||
* @param uiNode The UI node that gives the prefix to match.
|
||||
* @return A suitable generated id
|
||||
* @return A suitable generated id in the attribute form needed by the XML id tag
|
||||
* (e.g. "@+id/something")
|
||||
*/
|
||||
public static String getFreeWidgetId(UiElementNode uiNode) {
|
||||
return getFreeWidgetId(uiNode.getUiRoot(),
|
||||
new Object[] { uiNode.getDescriptor().getXmlLocalName(), null, null, null });
|
||||
String name = uiNode.getDescriptor().getXmlLocalName();
|
||||
if ("TabWidget".equals(name)) { //$NON-NLS-1$
|
||||
return "@android:id/tabs"; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
return "@+id/" + getFreeWidgetId(uiNode.getUiRoot(), //$NON-NLS-1$
|
||||
new Object[] { name, null, null, null });
|
||||
}
|
||||
|
||||
/**
|
||||
* Given a UI root node, returns the first available id that matches the
|
||||
* pattern "prefix%02d".
|
||||
*
|
||||
*
|
||||
* For recursion purposes, a "context" is given. Since Java doesn't have in-out parameters
|
||||
* in methods and we're not going to do a dedicated type, we just use an object array which
|
||||
* must contain one initial item and several are built on the fly just for internal storage:
|
||||
@@ -775,7 +780,7 @@ public final class DescriptorsUtils {
|
||||
* <li> map(Set<String>): A set of the ids collected so far when walking through the widget
|
||||
* hierarchy. Must start with null.
|
||||
* </ul>
|
||||
*
|
||||
*
|
||||
* @param uiRoot The Ui root node where to start searching recursively. For the initial call
|
||||
* you want to pass the document root.
|
||||
* @param params An in-out context of parameters used during recursion, as explained above.
|
||||
@@ -837,9 +842,9 @@ public final class DescriptorsUtils {
|
||||
for (UiElementNode uiChild : uiRoot.getUiChildren()) {
|
||||
getFreeWidgetId(uiChild, params);
|
||||
}
|
||||
|
||||
|
||||
// Note: return params[2] (not "generated") since it could have changed during recursion.
|
||||
return (String) params[2];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -14,10 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.descriptors;
|
||||
package com.android.ide.eclipse.adt.internal.editors.descriptors;
|
||||
|
||||
import com.android.ide.eclipse.editors.uimodel.UiDocumentNode;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiDocumentNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
|
||||
|
||||
/**
|
||||
* {@link DocumentDescriptor} describes the properties expected for an XML document node.
|
||||
@@ -14,11 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.descriptors;
|
||||
package com.android.ide.eclipse.adt.internal.editors.descriptors;
|
||||
|
||||
import com.android.ide.eclipse.adt.AdtPlugin;
|
||||
import com.android.ide.eclipse.editors.IconFactory;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.IconFactory;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
|
||||
import com.android.sdklib.SdkConstants;
|
||||
|
||||
import org.eclipse.jface.resource.ImageDescriptor;
|
||||
@@ -14,11 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.descriptors;
|
||||
package com.android.ide.eclipse.adt.internal.editors.descriptors;
|
||||
|
||||
import com.android.ide.eclipse.editors.uimodel.UiAttributeNode;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiListAttributeNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiAttributeNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiListAttributeNode;
|
||||
|
||||
/**
|
||||
* Describes a text attribute that can only contains some predefined values.
|
||||
@@ -14,13 +14,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.descriptors;
|
||||
package com.android.ide.eclipse.adt.internal.editors.descriptors;
|
||||
|
||||
import com.android.ide.eclipse.editors.ui.FlagValueCellEditor;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiAttributeNode;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiFlagAttributeNode;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiListAttributeNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.ui.FlagValueCellEditor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiAttributeNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiFlagAttributeNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiListAttributeNode;
|
||||
|
||||
import org.eclipse.jface.viewers.CellEditor;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.descriptors;
|
||||
package com.android.ide.eclipse.adt.internal.editors.descriptors;
|
||||
|
||||
public interface IDescriptorProvider {
|
||||
|
||||
@@ -14,12 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.descriptors;
|
||||
package com.android.ide.eclipse.adt.internal.editors.descriptors;
|
||||
|
||||
import com.android.ide.eclipse.editors.ui.ListValueCellEditor;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiAttributeNode;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiListAttributeNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.ui.ListValueCellEditor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiAttributeNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiListAttributeNode;
|
||||
|
||||
import org.eclipse.jface.viewers.CellEditor;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
@@ -14,13 +14,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.descriptors;
|
||||
package com.android.ide.eclipse.adt.internal.editors.descriptors;
|
||||
|
||||
import com.android.ide.eclipse.common.resources.ResourceType;
|
||||
import com.android.ide.eclipse.editors.ui.ResourceValueCellEditor;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiAttributeNode;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiResourceAttributeNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.ui.ResourceValueCellEditor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiAttributeNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiResourceAttributeNode;
|
||||
import com.android.ide.eclipse.adt.internal.resources.ResourceType;
|
||||
import com.android.sdklib.SdkConstants;
|
||||
|
||||
import org.eclipse.jface.viewers.CellEditor;
|
||||
@@ -14,11 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.descriptors;
|
||||
package com.android.ide.eclipse.adt.internal.editors.descriptors;
|
||||
|
||||
import com.android.ide.eclipse.editors.uimodel.UiAttributeNode;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiSeparatorAttributeNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiAttributeNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiSeparatorAttributeNode;
|
||||
|
||||
/**
|
||||
* {@link SeparatorAttributeDescriptor} does not represent any real attribute.
|
||||
@@ -14,12 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.descriptors;
|
||||
package com.android.ide.eclipse.adt.internal.editors.descriptors;
|
||||
|
||||
import com.android.ide.eclipse.editors.ui.TextValueCellEditor;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiAttributeNode;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiTextAttributeNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.ui.TextValueCellEditor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiAttributeNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiTextAttributeNode;
|
||||
import com.android.sdklib.SdkConstants;
|
||||
|
||||
import org.eclipse.jface.viewers.CellEditor;
|
||||
@@ -14,11 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.descriptors;
|
||||
package com.android.ide.eclipse.adt.internal.editors.descriptors;
|
||||
|
||||
import com.android.ide.eclipse.editors.uimodel.UiAttributeNode;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiTextValueNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiAttributeNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiTextValueNode;
|
||||
|
||||
|
||||
/**
|
||||
@@ -14,10 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.descriptors;
|
||||
package com.android.ide.eclipse.adt.internal.editors.descriptors;
|
||||
|
||||
import com.android.ide.eclipse.editors.uimodel.UiAttributeNode;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiAttributeNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
|
||||
|
||||
|
||||
/**
|
||||
@@ -14,13 +14,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.layout;
|
||||
package com.android.ide.eclipse.adt.internal.editors.layout;
|
||||
|
||||
import com.android.ide.eclipse.editors.layout.LayoutReloadMonitor.ILayoutReloadListener;
|
||||
import com.android.ide.eclipse.editors.layout.parts.ElementCreateCommand;
|
||||
import com.android.ide.eclipse.editors.resources.configurations.FolderConfiguration;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiDocumentNode;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.layout.LayoutReloadMonitor.ILayoutReloadListener;
|
||||
import com.android.ide.eclipse.adt.internal.editors.layout.parts.ElementCreateCommand;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiDocumentNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.resources.configurations.FolderConfiguration;
|
||||
|
||||
import org.eclipse.gef.DefaultEditDomain;
|
||||
import org.eclipse.gef.ui.parts.GraphicalEditorWithPalette;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.layout;
|
||||
package com.android.ide.eclipse.adt.internal.editors.layout;
|
||||
|
||||
import com.android.layoutlib.api.IXmlPullParser;
|
||||
|
||||
@@ -14,51 +14,51 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.layout;
|
||||
package com.android.ide.eclipse.adt.internal.editors.layout;
|
||||
|
||||
import com.android.ide.eclipse.adt.AdtPlugin;
|
||||
import com.android.ide.eclipse.adt.sdk.AndroidTargetData;
|
||||
import com.android.ide.eclipse.adt.sdk.LoadStatus;
|
||||
import com.android.ide.eclipse.adt.sdk.Sdk;
|
||||
import com.android.ide.eclipse.adt.sdk.AndroidTargetData.LayoutBridge;
|
||||
import com.android.ide.eclipse.adt.sdk.Sdk.ITargetChangeListener;
|
||||
import com.android.ide.eclipse.adt.ui.ConfigurationSelector.DensityVerifier;
|
||||
import com.android.ide.eclipse.adt.ui.ConfigurationSelector.DimensionVerifier;
|
||||
import com.android.ide.eclipse.adt.ui.ConfigurationSelector.LanguageRegionVerifier;
|
||||
import com.android.ide.eclipse.adt.ui.ConfigurationSelector.MobileCodeVerifier;
|
||||
import com.android.ide.eclipse.common.resources.ResourceType;
|
||||
import com.android.ide.eclipse.editors.IconFactory;
|
||||
import com.android.ide.eclipse.editors.layout.LayoutEditor.UiEditorActions;
|
||||
import com.android.ide.eclipse.editors.layout.LayoutReloadMonitor.ILayoutReloadListener;
|
||||
import com.android.ide.eclipse.editors.layout.descriptors.ViewElementDescriptor;
|
||||
import com.android.ide.eclipse.editors.layout.parts.ElementCreateCommand;
|
||||
import com.android.ide.eclipse.editors.layout.parts.UiElementEditPart;
|
||||
import com.android.ide.eclipse.editors.layout.parts.UiElementsEditPartFactory;
|
||||
import com.android.ide.eclipse.editors.resources.configurations.CountryCodeQualifier;
|
||||
import com.android.ide.eclipse.editors.resources.configurations.FolderConfiguration;
|
||||
import com.android.ide.eclipse.editors.resources.configurations.KeyboardStateQualifier;
|
||||
import com.android.ide.eclipse.editors.resources.configurations.LanguageQualifier;
|
||||
import com.android.ide.eclipse.editors.resources.configurations.NavigationMethodQualifier;
|
||||
import com.android.ide.eclipse.editors.resources.configurations.NetworkCodeQualifier;
|
||||
import com.android.ide.eclipse.editors.resources.configurations.PixelDensityQualifier;
|
||||
import com.android.ide.eclipse.editors.resources.configurations.RegionQualifier;
|
||||
import com.android.ide.eclipse.editors.resources.configurations.ScreenDimensionQualifier;
|
||||
import com.android.ide.eclipse.editors.resources.configurations.ScreenOrientationQualifier;
|
||||
import com.android.ide.eclipse.editors.resources.configurations.TextInputMethodQualifier;
|
||||
import com.android.ide.eclipse.editors.resources.configurations.TouchScreenQualifier;
|
||||
import com.android.ide.eclipse.editors.resources.configurations.KeyboardStateQualifier.KeyboardState;
|
||||
import com.android.ide.eclipse.editors.resources.configurations.NavigationMethodQualifier.NavigationMethod;
|
||||
import com.android.ide.eclipse.editors.resources.configurations.ScreenOrientationQualifier.ScreenOrientation;
|
||||
import com.android.ide.eclipse.editors.resources.configurations.TextInputMethodQualifier.TextInputMethod;
|
||||
import com.android.ide.eclipse.editors.resources.configurations.TouchScreenQualifier.TouchScreenType;
|
||||
import com.android.ide.eclipse.editors.resources.manager.ProjectResources;
|
||||
import com.android.ide.eclipse.editors.resources.manager.ResourceFile;
|
||||
import com.android.ide.eclipse.editors.resources.manager.ResourceFolderType;
|
||||
import com.android.ide.eclipse.editors.resources.manager.ResourceManager;
|
||||
import com.android.ide.eclipse.editors.ui.tree.CopyCutAction;
|
||||
import com.android.ide.eclipse.editors.ui.tree.PasteAction;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiDocumentNode;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.IconFactory;
|
||||
import com.android.ide.eclipse.adt.internal.editors.layout.LayoutEditor.UiEditorActions;
|
||||
import com.android.ide.eclipse.adt.internal.editors.layout.LayoutReloadMonitor.ILayoutReloadListener;
|
||||
import com.android.ide.eclipse.adt.internal.editors.layout.descriptors.ViewElementDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.layout.parts.ElementCreateCommand;
|
||||
import com.android.ide.eclipse.adt.internal.editors.layout.parts.UiElementEditPart;
|
||||
import com.android.ide.eclipse.adt.internal.editors.layout.parts.UiElementsEditPartFactory;
|
||||
import com.android.ide.eclipse.adt.internal.editors.ui.tree.CopyCutAction;
|
||||
import com.android.ide.eclipse.adt.internal.editors.ui.tree.PasteAction;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiDocumentNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.resources.ResourceType;
|
||||
import com.android.ide.eclipse.adt.internal.resources.configurations.CountryCodeQualifier;
|
||||
import com.android.ide.eclipse.adt.internal.resources.configurations.FolderConfiguration;
|
||||
import com.android.ide.eclipse.adt.internal.resources.configurations.KeyboardStateQualifier;
|
||||
import com.android.ide.eclipse.adt.internal.resources.configurations.LanguageQualifier;
|
||||
import com.android.ide.eclipse.adt.internal.resources.configurations.NavigationMethodQualifier;
|
||||
import com.android.ide.eclipse.adt.internal.resources.configurations.NetworkCodeQualifier;
|
||||
import com.android.ide.eclipse.adt.internal.resources.configurations.PixelDensityQualifier;
|
||||
import com.android.ide.eclipse.adt.internal.resources.configurations.RegionQualifier;
|
||||
import com.android.ide.eclipse.adt.internal.resources.configurations.ScreenDimensionQualifier;
|
||||
import com.android.ide.eclipse.adt.internal.resources.configurations.ScreenOrientationQualifier;
|
||||
import com.android.ide.eclipse.adt.internal.resources.configurations.TextInputMethodQualifier;
|
||||
import com.android.ide.eclipse.adt.internal.resources.configurations.TouchScreenQualifier;
|
||||
import com.android.ide.eclipse.adt.internal.resources.configurations.KeyboardStateQualifier.KeyboardState;
|
||||
import com.android.ide.eclipse.adt.internal.resources.configurations.NavigationMethodQualifier.NavigationMethod;
|
||||
import com.android.ide.eclipse.adt.internal.resources.configurations.ScreenOrientationQualifier.ScreenOrientation;
|
||||
import com.android.ide.eclipse.adt.internal.resources.configurations.TextInputMethodQualifier.TextInputMethod;
|
||||
import com.android.ide.eclipse.adt.internal.resources.configurations.TouchScreenQualifier.TouchScreenType;
|
||||
import com.android.ide.eclipse.adt.internal.resources.manager.ProjectResources;
|
||||
import com.android.ide.eclipse.adt.internal.resources.manager.ResourceFile;
|
||||
import com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolderType;
|
||||
import com.android.ide.eclipse.adt.internal.resources.manager.ResourceManager;
|
||||
import com.android.ide.eclipse.adt.internal.sdk.AndroidTargetData;
|
||||
import com.android.ide.eclipse.adt.internal.sdk.LoadStatus;
|
||||
import com.android.ide.eclipse.adt.internal.sdk.Sdk;
|
||||
import com.android.ide.eclipse.adt.internal.sdk.AndroidTargetData.LayoutBridge;
|
||||
import com.android.ide.eclipse.adt.internal.sdk.Sdk.ITargetChangeListener;
|
||||
import com.android.ide.eclipse.adt.internal.ui.ConfigurationSelector.DensityVerifier;
|
||||
import com.android.ide.eclipse.adt.internal.ui.ConfigurationSelector.DimensionVerifier;
|
||||
import com.android.ide.eclipse.adt.internal.ui.ConfigurationSelector.LanguageRegionVerifier;
|
||||
import com.android.ide.eclipse.adt.internal.ui.ConfigurationSelector.MobileCodeVerifier;
|
||||
import com.android.layoutlib.api.ILayoutLog;
|
||||
import com.android.layoutlib.api.ILayoutResult;
|
||||
import com.android.layoutlib.api.IProjectCallback;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.layout;
|
||||
package com.android.ide.eclipse.adt.internal.editors.layout;
|
||||
|
||||
/**
|
||||
* A bunch of constants that map to either:
|
||||
@@ -14,10 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.layout;
|
||||
package com.android.ide.eclipse.adt.internal.editors.layout;
|
||||
|
||||
import com.android.ide.eclipse.adt.sdk.AndroidTargetData;
|
||||
import com.android.ide.eclipse.editors.AndroidContentAssist;
|
||||
import com.android.ide.eclipse.adt.internal.editors.AndroidContentAssist;
|
||||
import com.android.ide.eclipse.adt.internal.sdk.AndroidTargetData;
|
||||
|
||||
/**
|
||||
* Content Assist Processor for /res/layout XML files
|
||||
@@ -14,14 +14,14 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.layout;
|
||||
package com.android.ide.eclipse.adt.internal.editors.layout;
|
||||
|
||||
import com.android.ide.eclipse.adt.ui.ConfigurationSelector;
|
||||
import com.android.ide.eclipse.adt.ui.ConfigurationSelector.ConfigurationState;
|
||||
import com.android.ide.eclipse.editors.IconFactory;
|
||||
import com.android.ide.eclipse.editors.resources.configurations.FolderConfiguration;
|
||||
import com.android.ide.eclipse.editors.resources.configurations.ResourceQualifier;
|
||||
import com.android.ide.eclipse.editors.resources.manager.ResourceFolderType;
|
||||
import com.android.ide.eclipse.adt.internal.editors.IconFactory;
|
||||
import com.android.ide.eclipse.adt.internal.resources.configurations.FolderConfiguration;
|
||||
import com.android.ide.eclipse.adt.internal.resources.configurations.ResourceQualifier;
|
||||
import com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolderType;
|
||||
import com.android.ide.eclipse.adt.internal.ui.ConfigurationSelector;
|
||||
import com.android.ide.eclipse.adt.internal.ui.ConfigurationSelector.ConfigurationState;
|
||||
|
||||
import org.eclipse.jface.dialogs.IDialogConstants;
|
||||
import org.eclipse.jface.dialogs.TrayDialog;
|
||||
@@ -14,19 +14,19 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.layout;
|
||||
package com.android.ide.eclipse.adt.internal.editors.layout;
|
||||
|
||||
import com.android.ide.eclipse.adt.AdtPlugin;
|
||||
import com.android.ide.eclipse.adt.sdk.AndroidTargetData;
|
||||
import com.android.ide.eclipse.adt.ui.EclipseUiHelper;
|
||||
import com.android.ide.eclipse.common.AndroidConstants;
|
||||
import com.android.ide.eclipse.editors.AndroidEditor;
|
||||
import com.android.ide.eclipse.editors.descriptors.DocumentDescriptor;
|
||||
import com.android.ide.eclipse.editors.resources.manager.ResourceFolder;
|
||||
import com.android.ide.eclipse.editors.resources.manager.ResourceManager;
|
||||
import com.android.ide.eclipse.editors.ui.tree.UiActions;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiDocumentNode;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.AndroidConstants;
|
||||
import com.android.ide.eclipse.adt.internal.editors.AndroidEditor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.DocumentDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.ui.tree.UiActions;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiDocumentNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolder;
|
||||
import com.android.ide.eclipse.adt.internal.resources.manager.ResourceManager;
|
||||
import com.android.ide.eclipse.adt.internal.sdk.AndroidTargetData;
|
||||
import com.android.ide.eclipse.adt.internal.ui.EclipseUiHelper;
|
||||
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
@@ -14,15 +14,15 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.layout;
|
||||
package com.android.ide.eclipse.adt.internal.editors.layout;
|
||||
|
||||
import com.android.ide.eclipse.common.AndroidConstants;
|
||||
import com.android.ide.eclipse.editors.resources.manager.ResourceFolder;
|
||||
import com.android.ide.eclipse.editors.resources.manager.ResourceFolderType;
|
||||
import com.android.ide.eclipse.editors.resources.manager.ResourceManager;
|
||||
import com.android.ide.eclipse.editors.resources.manager.ResourceMonitor;
|
||||
import com.android.ide.eclipse.editors.resources.manager.ResourceMonitor.IFileListener;
|
||||
import com.android.ide.eclipse.editors.resources.manager.ResourceMonitor.IResourceEventListener;
|
||||
import com.android.ide.eclipse.adt.AndroidConstants;
|
||||
import com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolder;
|
||||
import com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolderType;
|
||||
import com.android.ide.eclipse.adt.internal.resources.manager.ResourceManager;
|
||||
import com.android.ide.eclipse.adt.internal.resources.manager.ResourceMonitor;
|
||||
import com.android.ide.eclipse.adt.internal.resources.manager.ResourceMonitor.IFileListener;
|
||||
import com.android.ide.eclipse.adt.internal.resources.manager.ResourceMonitor.IResourceEventListener;
|
||||
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.resources.IMarkerDelta;
|
||||
@@ -14,10 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.layout;
|
||||
package com.android.ide.eclipse.adt.internal.editors.layout;
|
||||
|
||||
|
||||
import com.android.ide.eclipse.editors.AndroidSourceViewerConfig;
|
||||
import com.android.ide.eclipse.adt.internal.editors.AndroidSourceViewerConfig;
|
||||
|
||||
/**
|
||||
* Source Viewer Configuration that calls in LayoutContentAssist.
|
||||
@@ -14,11 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.layout;
|
||||
package com.android.ide.eclipse.adt.internal.editors.layout;
|
||||
|
||||
import com.android.ide.eclipse.editors.resources.manager.ResourceFolder;
|
||||
import com.android.ide.eclipse.editors.resources.manager.ResourceFolderType;
|
||||
import com.android.ide.eclipse.editors.resources.manager.ResourceManager;
|
||||
import com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolder;
|
||||
import com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolderType;
|
||||
import com.android.ide.eclipse.adt.internal.resources.manager.ResourceManager;
|
||||
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.ui.IEditorInput;
|
||||
@@ -14,10 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.layout;
|
||||
package com.android.ide.eclipse.adt.internal.editors.layout;
|
||||
|
||||
import com.android.ide.eclipse.adt.sdk.AndroidTargetData;
|
||||
import com.android.ide.eclipse.editors.descriptors.ElementDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.ElementDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.sdk.AndroidTargetData;
|
||||
|
||||
import org.eclipse.gef.palette.PaletteDrawer;
|
||||
import org.eclipse.gef.palette.PaletteGroup;
|
||||
@@ -14,13 +14,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.layout;
|
||||
package com.android.ide.eclipse.adt.internal.editors.layout;
|
||||
|
||||
import com.android.ide.eclipse.adt.AdtPlugin;
|
||||
import com.android.ide.eclipse.common.AndroidConstants;
|
||||
import com.android.ide.eclipse.common.project.AndroidManifestParser;
|
||||
import com.android.ide.eclipse.editors.resources.manager.ProjectClassLoader;
|
||||
import com.android.ide.eclipse.editors.resources.manager.ProjectResources;
|
||||
import com.android.ide.eclipse.adt.AndroidConstants;
|
||||
import com.android.ide.eclipse.adt.internal.project.AndroidManifestParser;
|
||||
import com.android.ide.eclipse.adt.internal.resources.manager.ProjectClassLoader;
|
||||
import com.android.ide.eclipse.adt.internal.resources.manager.ProjectResources;
|
||||
import com.android.layoutlib.api.IProjectCallback;
|
||||
|
||||
import org.eclipse.core.resources.IFile;
|
||||
@@ -15,20 +15,20 @@
|
||||
*/
|
||||
|
||||
|
||||
package com.android.ide.eclipse.editors.layout;
|
||||
package com.android.ide.eclipse.adt.internal.editors.layout;
|
||||
|
||||
import com.android.ide.eclipse.adt.ui.EclipseUiHelper;
|
||||
import com.android.ide.eclipse.editors.IconFactory;
|
||||
import com.android.ide.eclipse.editors.layout.parts.UiDocumentTreeEditPart;
|
||||
import com.android.ide.eclipse.editors.layout.parts.UiElementTreeEditPart;
|
||||
import com.android.ide.eclipse.editors.layout.parts.UiElementTreeEditPartFactory;
|
||||
import com.android.ide.eclipse.editors.layout.parts.UiLayoutTreeEditPart;
|
||||
import com.android.ide.eclipse.editors.layout.parts.UiViewTreeEditPart;
|
||||
import com.android.ide.eclipse.editors.ui.tree.CopyCutAction;
|
||||
import com.android.ide.eclipse.editors.ui.tree.PasteAction;
|
||||
import com.android.ide.eclipse.editors.ui.tree.UiActions;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiDocumentNode;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.IconFactory;
|
||||
import com.android.ide.eclipse.adt.internal.editors.layout.parts.UiDocumentTreeEditPart;
|
||||
import com.android.ide.eclipse.adt.internal.editors.layout.parts.UiElementTreeEditPart;
|
||||
import com.android.ide.eclipse.adt.internal.editors.layout.parts.UiElementTreeEditPartFactory;
|
||||
import com.android.ide.eclipse.adt.internal.editors.layout.parts.UiLayoutTreeEditPart;
|
||||
import com.android.ide.eclipse.adt.internal.editors.layout.parts.UiViewTreeEditPart;
|
||||
import com.android.ide.eclipse.adt.internal.editors.ui.tree.CopyCutAction;
|
||||
import com.android.ide.eclipse.adt.internal.editors.ui.tree.PasteAction;
|
||||
import com.android.ide.eclipse.adt.internal.editors.ui.tree.UiActions;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiDocumentNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.ui.EclipseUiHelper;
|
||||
|
||||
import org.eclipse.gef.EditPartViewer;
|
||||
import org.eclipse.gef.ui.parts.ContentOutlinePage;
|
||||
@@ -14,9 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.layout;
|
||||
package com.android.ide.eclipse.adt.internal.editors.layout;
|
||||
|
||||
import com.android.ide.eclipse.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
|
||||
import com.android.layoutlib.api.IXmlPullParser;
|
||||
|
||||
import org.w3c.dom.Node;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.layout;
|
||||
package com.android.ide.eclipse.adt.internal.editors.layout;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.graphics.Point;
|
||||
@@ -14,10 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.layout;
|
||||
package com.android.ide.eclipse.adt.internal.editors.layout;
|
||||
|
||||
import com.android.ide.eclipse.common.AndroidConstants;
|
||||
import com.android.ide.eclipse.editors.layout.descriptors.ViewElementDescriptor;
|
||||
import com.android.ide.eclipse.adt.AndroidConstants;
|
||||
import com.android.ide.eclipse.adt.internal.editors.layout.descriptors.ViewElementDescriptor;
|
||||
import com.android.layoutlib.api.IXmlPullParser;
|
||||
import com.android.sdklib.SdkConstants;
|
||||
|
||||
@@ -14,13 +14,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.layout.descriptors;
|
||||
package com.android.ide.eclipse.adt.internal.editors.layout.descriptors;
|
||||
|
||||
import com.android.ide.eclipse.adt.sdk.AndroidTargetData;
|
||||
import com.android.ide.eclipse.adt.sdk.Sdk;
|
||||
import com.android.ide.eclipse.common.resources.ViewClassInfo;
|
||||
import com.android.ide.eclipse.editors.descriptors.AttributeDescriptor;
|
||||
import com.android.ide.eclipse.editors.descriptors.ElementDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.AttributeDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.ElementDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.resources.ViewClassInfo;
|
||||
import com.android.ide.eclipse.adt.internal.sdk.AndroidTargetData;
|
||||
import com.android.ide.eclipse.adt.internal.sdk.Sdk;
|
||||
import com.android.sdklib.IAndroidTarget;
|
||||
|
||||
import org.eclipse.core.resources.IProject;
|
||||
@@ -14,19 +14,19 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.layout.descriptors;
|
||||
package com.android.ide.eclipse.adt.internal.editors.layout.descriptors;
|
||||
|
||||
import com.android.ide.eclipse.common.AndroidConstants;
|
||||
import com.android.ide.eclipse.common.resources.DeclareStyleableInfo;
|
||||
import com.android.ide.eclipse.common.resources.ViewClassInfo;
|
||||
import com.android.ide.eclipse.common.resources.DeclareStyleableInfo.AttributeInfo;
|
||||
import com.android.ide.eclipse.common.resources.ViewClassInfo.LayoutParamsInfo;
|
||||
import com.android.ide.eclipse.editors.descriptors.AttributeDescriptor;
|
||||
import com.android.ide.eclipse.editors.descriptors.DescriptorsUtils;
|
||||
import com.android.ide.eclipse.editors.descriptors.DocumentDescriptor;
|
||||
import com.android.ide.eclipse.editors.descriptors.ElementDescriptor;
|
||||
import com.android.ide.eclipse.editors.descriptors.IDescriptorProvider;
|
||||
import com.android.ide.eclipse.editors.descriptors.SeparatorAttributeDescriptor;
|
||||
import com.android.ide.eclipse.adt.AndroidConstants;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.AttributeDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.DescriptorsUtils;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.DocumentDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.ElementDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.IDescriptorProvider;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.SeparatorAttributeDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.resources.DeclareStyleableInfo;
|
||||
import com.android.ide.eclipse.adt.internal.resources.ViewClassInfo;
|
||||
import com.android.ide.eclipse.adt.internal.resources.DeclareStyleableInfo.AttributeInfo;
|
||||
import com.android.ide.eclipse.adt.internal.resources.ViewClassInfo.LayoutParamsInfo;
|
||||
import com.android.sdklib.SdkConstants;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -14,12 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.layout.descriptors;
|
||||
package com.android.ide.eclipse.adt.internal.editors.layout.descriptors;
|
||||
|
||||
import com.android.ide.eclipse.editors.descriptors.AttributeDescriptor;
|
||||
import com.android.ide.eclipse.editors.descriptors.ElementDescriptor;
|
||||
import com.android.ide.eclipse.editors.layout.uimodel.UiViewElementNode;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.AttributeDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.ElementDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
|
||||
|
||||
/**
|
||||
* {@link ViewElementDescriptor} describes the properties expected for a given XML element node
|
||||
@@ -14,14 +14,14 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.layout.parts;
|
||||
package com.android.ide.eclipse.adt.internal.editors.layout.parts;
|
||||
|
||||
import com.android.ide.eclipse.editors.descriptors.DescriptorsUtils;
|
||||
import com.android.ide.eclipse.editors.descriptors.ElementDescriptor;
|
||||
import com.android.ide.eclipse.editors.layout.LayoutConstants;
|
||||
import com.android.ide.eclipse.editors.layout.LayoutEditor.UiEditorActions;
|
||||
import com.android.ide.eclipse.editors.layout.parts.UiLayoutEditPart.HighlightInfo;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.DescriptorsUtils;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.ElementDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.layout.LayoutConstants;
|
||||
import com.android.ide.eclipse.adt.internal.editors.layout.LayoutEditor.UiEditorActions;
|
||||
import com.android.ide.eclipse.adt.internal.editors.layout.parts.UiLayoutEditPart.HighlightInfo;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
|
||||
|
||||
import org.eclipse.draw2d.geometry.Point;
|
||||
import org.eclipse.draw2d.geometry.Rectangle;
|
||||
@@ -15,13 +15,13 @@
|
||||
*/
|
||||
|
||||
|
||||
package com.android.ide.eclipse.editors.layout.parts;
|
||||
package com.android.ide.eclipse.adt.internal.editors.layout.parts;
|
||||
|
||||
import com.android.ide.eclipse.editors.AndroidEditor;
|
||||
import com.android.ide.eclipse.editors.descriptors.ElementDescriptor;
|
||||
import com.android.ide.eclipse.editors.layout.LayoutEditor;
|
||||
import com.android.ide.eclipse.editors.layout.LayoutEditor.UiEditorActions;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.AndroidEditor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.ElementDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.layout.LayoutEditor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.layout.LayoutEditor.UiEditorActions;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
|
||||
|
||||
import org.eclipse.draw2d.geometry.Point;
|
||||
import org.eclipse.gef.commands.Command;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.layout.parts;
|
||||
package com.android.ide.eclipse.adt.internal.editors.layout.parts;
|
||||
|
||||
import org.eclipse.draw2d.ColorConstants;
|
||||
import org.eclipse.draw2d.Figure;
|
||||
@@ -14,9 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.layout.parts;
|
||||
package com.android.ide.eclipse.adt.internal.editors.layout.parts;
|
||||
|
||||
import com.android.ide.eclipse.editors.layout.parts.UiLayoutEditPart.HighlightInfo;
|
||||
import com.android.ide.eclipse.adt.internal.editors.layout.parts.UiLayoutEditPart.HighlightInfo;
|
||||
|
||||
import org.eclipse.draw2d.ColorConstants;
|
||||
import org.eclipse.draw2d.Figure;
|
||||
@@ -14,10 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.layout.parts;
|
||||
package com.android.ide.eclipse.adt.internal.editors.layout.parts;
|
||||
|
||||
import com.android.ide.eclipse.editors.uimodel.UiDocumentNode;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiDocumentNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
|
||||
|
||||
import org.eclipse.draw2d.AbstractBackground;
|
||||
import org.eclipse.draw2d.ColorConstants;
|
||||
@@ -14,9 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.layout.parts;
|
||||
package com.android.ide.eclipse.adt.internal.editors.layout.parts;
|
||||
|
||||
import com.android.ide.eclipse.editors.uimodel.UiDocumentNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiDocumentNode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -14,11 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.layout.parts;
|
||||
package com.android.ide.eclipse.adt.internal.editors.layout.parts;
|
||||
|
||||
import com.android.ide.eclipse.editors.descriptors.ElementDescriptor;
|
||||
import com.android.ide.eclipse.editors.uimodel.IUiUpdateListener;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.ElementDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.IUiUpdateListener;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
|
||||
import com.android.sdklib.SdkConstants;
|
||||
|
||||
import org.eclipse.draw2d.IFigure;
|
||||
@@ -14,9 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.layout.parts;
|
||||
package com.android.ide.eclipse.adt.internal.editors.layout.parts;
|
||||
|
||||
import com.android.ide.eclipse.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
|
||||
|
||||
import org.eclipse.gef.editparts.AbstractTreeEditPart;
|
||||
import org.eclipse.swt.graphics.Image;
|
||||
@@ -14,10 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.layout.parts;
|
||||
package com.android.ide.eclipse.adt.internal.editors.layout.parts;
|
||||
|
||||
import com.android.ide.eclipse.editors.uimodel.UiDocumentNode;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiDocumentNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
|
||||
|
||||
import org.eclipse.gef.EditPart;
|
||||
import org.eclipse.gef.EditPartFactory;
|
||||
@@ -14,10 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.layout.parts;
|
||||
package com.android.ide.eclipse.adt.internal.editors.layout.parts;
|
||||
|
||||
import com.android.ide.eclipse.editors.uimodel.UiDocumentNode;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiDocumentNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
|
||||
|
||||
import org.eclipse.gef.EditPart;
|
||||
import org.eclipse.gef.EditPartFactory;
|
||||
@@ -14,9 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.layout.parts;
|
||||
package com.android.ide.eclipse.adt.internal.editors.layout.parts;
|
||||
|
||||
import com.android.ide.eclipse.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
|
||||
|
||||
import org.eclipse.draw2d.IFigure;
|
||||
import org.eclipse.draw2d.XYLayout;
|
||||
@@ -14,9 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.layout.parts;
|
||||
package com.android.ide.eclipse.adt.internal.editors.layout.parts;
|
||||
|
||||
import com.android.ide.eclipse.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -14,9 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.layout.parts;
|
||||
package com.android.ide.eclipse.adt.internal.editors.layout.parts;
|
||||
|
||||
import com.android.ide.eclipse.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
|
||||
|
||||
import org.eclipse.draw2d.IFigure;
|
||||
import org.eclipse.draw2d.XYLayout;
|
||||
@@ -14,9 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.layout.parts;
|
||||
package com.android.ide.eclipse.adt.internal.editors.layout.parts;
|
||||
|
||||
import com.android.ide.eclipse.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
|
||||
|
||||
/**
|
||||
* Implementation of {@link UiElementTreeEditPart} for view objects.
|
||||
@@ -14,17 +14,17 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.layout.uimodel;
|
||||
package com.android.ide.eclipse.adt.internal.editors.layout.uimodel;
|
||||
|
||||
import com.android.ide.eclipse.adt.sdk.AndroidTargetData;
|
||||
import com.android.ide.eclipse.adt.sdk.Sdk;
|
||||
import com.android.ide.eclipse.common.AndroidConstants;
|
||||
import com.android.ide.eclipse.editors.descriptors.AttributeDescriptor;
|
||||
import com.android.ide.eclipse.editors.descriptors.ElementDescriptor;
|
||||
import com.android.ide.eclipse.editors.descriptors.XmlnsAttributeDescriptor;
|
||||
import com.android.ide.eclipse.editors.layout.descriptors.ViewElementDescriptor;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiDocumentNode;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.AndroidConstants;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.AttributeDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.ElementDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.XmlnsAttributeDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.layout.descriptors.ViewElementDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiDocumentNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.sdk.AndroidTargetData;
|
||||
import com.android.ide.eclipse.adt.internal.sdk.Sdk;
|
||||
import com.android.sdklib.IAndroidTarget;
|
||||
import com.android.sdklib.SdkConstants;
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.manifest;
|
||||
package com.android.ide.eclipse.adt.internal.editors.manifest;
|
||||
|
||||
import com.android.ide.eclipse.adt.sdk.AndroidTargetData;
|
||||
import com.android.ide.eclipse.editors.AndroidContentAssist;
|
||||
import com.android.ide.eclipse.adt.internal.editors.AndroidContentAssist;
|
||||
import com.android.ide.eclipse.adt.internal.sdk.AndroidTargetData;
|
||||
|
||||
/**
|
||||
* Content Assist Processor for AndroidManifest.xml
|
||||
@@ -14,23 +14,23 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.manifest;
|
||||
package com.android.ide.eclipse.adt.internal.editors.manifest;
|
||||
|
||||
import com.android.ide.eclipse.adt.AdtPlugin;
|
||||
import com.android.ide.eclipse.adt.sdk.AndroidTargetData;
|
||||
import com.android.ide.eclipse.common.AndroidConstants;
|
||||
import com.android.ide.eclipse.common.project.AndroidXPathFactory;
|
||||
import com.android.ide.eclipse.editors.AndroidEditor;
|
||||
import com.android.ide.eclipse.editors.descriptors.ElementDescriptor;
|
||||
import com.android.ide.eclipse.editors.manifest.descriptors.AndroidManifestDescriptors;
|
||||
import com.android.ide.eclipse.editors.manifest.pages.ApplicationPage;
|
||||
import com.android.ide.eclipse.editors.manifest.pages.InstrumentationPage;
|
||||
import com.android.ide.eclipse.editors.manifest.pages.OverviewPage;
|
||||
import com.android.ide.eclipse.editors.manifest.pages.PermissionPage;
|
||||
import com.android.ide.eclipse.editors.resources.manager.ResourceMonitor;
|
||||
import com.android.ide.eclipse.editors.resources.manager.ResourceMonitor.IFileListener;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiAttributeNode;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.AndroidConstants;
|
||||
import com.android.ide.eclipse.adt.internal.editors.AndroidEditor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.ElementDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.manifest.descriptors.AndroidManifestDescriptors;
|
||||
import com.android.ide.eclipse.adt.internal.editors.manifest.pages.ApplicationPage;
|
||||
import com.android.ide.eclipse.adt.internal.editors.manifest.pages.InstrumentationPage;
|
||||
import com.android.ide.eclipse.adt.internal.editors.manifest.pages.OverviewPage;
|
||||
import com.android.ide.eclipse.adt.internal.editors.manifest.pages.PermissionPage;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiAttributeNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.project.AndroidXPathFactory;
|
||||
import com.android.ide.eclipse.adt.internal.resources.manager.ResourceMonitor;
|
||||
import com.android.ide.eclipse.adt.internal.resources.manager.ResourceMonitor.IFileListener;
|
||||
import com.android.ide.eclipse.adt.internal.sdk.AndroidTargetData;
|
||||
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.resources.IMarker;
|
||||
@@ -55,8 +55,10 @@ import javax.xml.xpath.XPathExpressionException;
|
||||
* Multi-page form editor for AndroidManifest.xml.
|
||||
*/
|
||||
public final class ManifestEditor extends AndroidEditor {
|
||||
private final static String EMPTY = ""; //$NON-NLS-1$
|
||||
|
||||
public static final String ID = AndroidConstants.EDITORS_NAMESPACE + ".manifest.ManifestEditor"; //$NON-NLS-1$
|
||||
|
||||
private final static String EMPTY = ""; //$NON-NLS-1$
|
||||
|
||||
/** Root node of the UI element hierarchy */
|
||||
private UiElementNode mUiManifestNode;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.manifest;
|
||||
package com.android.ide.eclipse.adt.internal.editors.manifest;
|
||||
|
||||
import org.eclipse.jface.action.IAction;
|
||||
import org.eclipse.ui.IActionBars;
|
||||
@@ -14,10 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.manifest;
|
||||
package com.android.ide.eclipse.adt.internal.editors.manifest;
|
||||
|
||||
|
||||
import com.android.ide.eclipse.editors.AndroidSourceViewerConfig;
|
||||
import com.android.ide.eclipse.adt.internal.editors.AndroidSourceViewerConfig;
|
||||
|
||||
/**
|
||||
* Source Viewer Configuration that calls in ManifestContentAssist.
|
||||
@@ -14,20 +14,20 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.manifest.descriptors;
|
||||
package com.android.ide.eclipse.adt.internal.editors.manifest.descriptors;
|
||||
|
||||
import com.android.ide.eclipse.adt.AdtPlugin;
|
||||
import com.android.ide.eclipse.common.AndroidConstants;
|
||||
import com.android.ide.eclipse.common.resources.DeclareStyleableInfo;
|
||||
import com.android.ide.eclipse.common.resources.ResourceType;
|
||||
import com.android.ide.eclipse.editors.descriptors.AttributeDescriptor;
|
||||
import com.android.ide.eclipse.editors.descriptors.DescriptorsUtils;
|
||||
import com.android.ide.eclipse.editors.descriptors.ElementDescriptor;
|
||||
import com.android.ide.eclipse.editors.descriptors.IDescriptorProvider;
|
||||
import com.android.ide.eclipse.editors.descriptors.ListAttributeDescriptor;
|
||||
import com.android.ide.eclipse.editors.descriptors.ReferenceAttributeDescriptor;
|
||||
import com.android.ide.eclipse.editors.descriptors.TextAttributeDescriptor;
|
||||
import com.android.ide.eclipse.editors.descriptors.XmlnsAttributeDescriptor;
|
||||
import com.android.ide.eclipse.adt.AndroidConstants;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.AttributeDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.DescriptorsUtils;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.ElementDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.IDescriptorProvider;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.ListAttributeDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.ReferenceAttributeDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.TextAttributeDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.XmlnsAttributeDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.resources.DeclareStyleableInfo;
|
||||
import com.android.ide.eclipse.adt.internal.resources.ResourceType;
|
||||
import com.android.sdklib.SdkConstants;
|
||||
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
@@ -193,7 +193,7 @@ public final class AndroidManifestDescriptors implements IDescriptorProvider {
|
||||
|
||||
overrides.put("*/theme", ThemeAttributeDescriptor.class); //$NON-NLS-1$
|
||||
overrides.put("*/permission", ListAttributeDescriptor.class); //$NON-NLS-1$
|
||||
overrides.put("*/targetPackage", PackageAttributeDescriptor.class); //$NON-NLS-1$
|
||||
overrides.put("*/targetPackage", ManifestPkgAttrDescriptor.class); //$NON-NLS-1$
|
||||
|
||||
overrides.put("uses-library/name", ListAttributeDescriptor.class); //$NON-NLS-1$
|
||||
|
||||
@@ -14,12 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.manifest.descriptors;
|
||||
package com.android.ide.eclipse.adt.internal.editors.manifest.descriptors;
|
||||
|
||||
import com.android.ide.eclipse.editors.descriptors.TextAttributeDescriptor;
|
||||
import com.android.ide.eclipse.editors.manifest.model.UiClassAttributeNode;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiAttributeNode;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.TextAttributeDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.manifest.model.UiClassAttributeNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiAttributeNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
|
||||
|
||||
/**
|
||||
* Describes an 'Application' class XML attribute. It is displayed by a
|
||||
@@ -14,13 +14,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.manifest.descriptors;
|
||||
package com.android.ide.eclipse.adt.internal.editors.manifest.descriptors;
|
||||
|
||||
import com.android.ide.eclipse.editors.descriptors.TextAttributeDescriptor;
|
||||
import com.android.ide.eclipse.editors.manifest.model.UiClassAttributeNode;
|
||||
import com.android.ide.eclipse.editors.manifest.model.UiClassAttributeNode.IPostTypeCreationAction;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiAttributeNode;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.TextAttributeDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.manifest.model.UiClassAttributeNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.manifest.model.UiClassAttributeNode.IPostTypeCreationAction;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiAttributeNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
|
||||
import com.android.sdklib.SdkConstants;
|
||||
|
||||
/**
|
||||
@@ -14,12 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.manifest.descriptors;
|
||||
package com.android.ide.eclipse.adt.internal.editors.manifest.descriptors;
|
||||
|
||||
import com.android.ide.eclipse.editors.descriptors.AttributeDescriptor;
|
||||
import com.android.ide.eclipse.editors.descriptors.ElementDescriptor;
|
||||
import com.android.ide.eclipse.editors.manifest.model.UiManifestElementNode;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.AttributeDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.ElementDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.manifest.model.UiManifestElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
|
||||
|
||||
/**
|
||||
* {@link ManifestElementDescriptor} describes an XML element node, with its
|
||||
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Copyright (C) 2009 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Eclipse Public License, Version 1.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.eclipse.org/org/documents/epl-v10.php
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.adt.internal.editors.manifest.descriptors;
|
||||
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.TextAttributeDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.manifest.model.UiManifestPkgAttrNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiAttributeNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
|
||||
|
||||
/**
|
||||
* Describes a package XML attribute. It is displayed by a {@link UiManifestPkgAttrNode}.
|
||||
*/
|
||||
public class ManifestPkgAttrDescriptor extends TextAttributeDescriptor {
|
||||
|
||||
public ManifestPkgAttrDescriptor(String xmlLocalName, String uiName, String nsUri,
|
||||
String tooltip) {
|
||||
super(xmlLocalName, uiName, nsUri, tooltip);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return A new {@link UiManifestPkgAttrNode} linked to this descriptor.
|
||||
*/
|
||||
@Override
|
||||
public UiAttributeNode createUiNode(UiElementNode uiParent) {
|
||||
return new UiManifestPkgAttrNode(this, uiParent);
|
||||
}
|
||||
}
|
||||
@@ -14,12 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.manifest.descriptors;
|
||||
package com.android.ide.eclipse.adt.internal.editors.manifest.descriptors;
|
||||
|
||||
import com.android.ide.eclipse.editors.descriptors.TextAttributeDescriptor;
|
||||
import com.android.ide.eclipse.editors.manifest.model.UiPackageAttributeNode;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiAttributeNode;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.TextAttributeDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.manifest.model.UiPackageAttributeNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiAttributeNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
|
||||
|
||||
/**
|
||||
* Describes a package XML attribute. It is displayed by a {@link UiPackageAttributeNode}.
|
||||
@@ -14,10 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.manifest.descriptors;
|
||||
package com.android.ide.eclipse.adt.internal.editors.manifest.descriptors;
|
||||
|
||||
import com.android.ide.eclipse.common.AndroidConstants;
|
||||
import com.android.ide.eclipse.editors.manifest.model.UiClassAttributeNode.IPostTypeCreationAction;
|
||||
import com.android.ide.eclipse.adt.AndroidConstants;
|
||||
import com.android.ide.eclipse.adt.internal.editors.manifest.model.UiClassAttributeNode.IPostTypeCreationAction;
|
||||
|
||||
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||
import org.eclipse.jdt.core.ICompilationUnit;
|
||||
@@ -14,10 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.manifest.descriptors;
|
||||
package com.android.ide.eclipse.adt.internal.editors.manifest.descriptors;
|
||||
|
||||
import com.android.ide.eclipse.common.AndroidConstants;
|
||||
import com.android.ide.eclipse.editors.manifest.model.UiClassAttributeNode.IPostTypeCreationAction;
|
||||
import com.android.ide.eclipse.adt.AndroidConstants;
|
||||
import com.android.ide.eclipse.adt.internal.editors.manifest.model.UiClassAttributeNode.IPostTypeCreationAction;
|
||||
|
||||
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||
import org.eclipse.jdt.core.ICompilationUnit;
|
||||
@@ -14,13 +14,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.manifest.descriptors;
|
||||
package com.android.ide.eclipse.adt.internal.editors.manifest.descriptors;
|
||||
|
||||
import com.android.ide.eclipse.common.resources.ResourceType;
|
||||
import com.android.ide.eclipse.editors.descriptors.TextAttributeDescriptor;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiAttributeNode;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiResourceAttributeNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.TextAttributeDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiAttributeNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiResourceAttributeNode;
|
||||
import com.android.ide.eclipse.adt.internal.resources.ResourceType;
|
||||
|
||||
/**
|
||||
* Describes a Theme/Style XML attribute displayed by a {@link UiResourceAttributeNode}
|
||||
@@ -14,19 +14,19 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.manifest.model;
|
||||
package com.android.ide.eclipse.adt.internal.editors.manifest.model;
|
||||
|
||||
import com.android.ide.eclipse.adt.AdtPlugin;
|
||||
import com.android.ide.eclipse.common.AndroidConstants;
|
||||
import com.android.ide.eclipse.common.project.AndroidManifestParser;
|
||||
import com.android.ide.eclipse.common.project.BaseProjectHelper;
|
||||
import com.android.ide.eclipse.editors.AndroidEditor;
|
||||
import com.android.ide.eclipse.editors.descriptors.AttributeDescriptor;
|
||||
import com.android.ide.eclipse.editors.descriptors.TextAttributeDescriptor;
|
||||
import com.android.ide.eclipse.editors.manifest.descriptors.AndroidManifestDescriptors;
|
||||
import com.android.ide.eclipse.editors.ui.SectionHelper;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiTextAttributeNode;
|
||||
import com.android.ide.eclipse.adt.AndroidConstants;
|
||||
import com.android.ide.eclipse.adt.internal.editors.AndroidEditor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.AttributeDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.TextAttributeDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.manifest.descriptors.AndroidManifestDescriptors;
|
||||
import com.android.ide.eclipse.adt.internal.editors.ui.SectionHelper;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiTextAttributeNode;
|
||||
import com.android.ide.eclipse.adt.internal.project.AndroidManifestParser;
|
||||
import com.android.ide.eclipse.adt.internal.project.BaseProjectHelper;
|
||||
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
@@ -463,7 +463,7 @@ public class UiClassAttributeNode extends UiTextAttributeNode {
|
||||
* Computes and return the {@link IPackageFragmentRoot}s corresponding to the source folders of
|
||||
* the specified project.
|
||||
* @param project the project
|
||||
* @param b
|
||||
* @param include_containers True to include containers
|
||||
* @return an array of IPackageFragmentRoot.
|
||||
*/
|
||||
private IPackageFragmentRoot[] getPackageFragmentRoots(IProject project,
|
||||
@@ -14,13 +14,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.manifest.model;
|
||||
package com.android.ide.eclipse.adt.internal.editors.manifest.model;
|
||||
|
||||
import com.android.ide.eclipse.editors.descriptors.ElementDescriptor;
|
||||
import com.android.ide.eclipse.editors.manifest.descriptors.AndroidManifestDescriptors;
|
||||
import com.android.ide.eclipse.editors.manifest.descriptors.ManifestElementDescriptor;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiAttributeNode;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.ElementDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.manifest.descriptors.AndroidManifestDescriptors;
|
||||
import com.android.ide.eclipse.adt.internal.editors.manifest.descriptors.ManifestElementDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiAttributeNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
|
||||
import com.android.sdklib.SdkConstants;
|
||||
|
||||
import org.w3c.dom.Element;
|
||||
@@ -0,0 +1,338 @@
|
||||
/*
|
||||
* Copyright (C) 2009 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Eclipse Public License, Version 1.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.eclipse.org/org/documents/epl-v10.php
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.adt.internal.editors.manifest.model;
|
||||
|
||||
import com.android.ide.eclipse.adt.AdtPlugin;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.AttributeDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.TextAttributeDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.manifest.ManifestEditor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.ui.SectionHelper;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiTextAttributeNode;
|
||||
import com.android.ide.eclipse.adt.internal.project.AndroidManifestParser;
|
||||
import com.android.ide.eclipse.adt.internal.project.BaseProjectHelper;
|
||||
import com.android.ide.eclipse.adt.internal.wizards.actions.NewProjectAction;
|
||||
import com.android.ide.eclipse.adt.internal.wizards.newproject.NewProjectWizard;
|
||||
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.jdt.core.IJavaProject;
|
||||
import org.eclipse.jface.dialogs.Dialog;
|
||||
import org.eclipse.jface.dialogs.IMessageProvider;
|
||||
import org.eclipse.jface.viewers.ILabelProvider;
|
||||
import org.eclipse.jface.viewers.ILabelProviderListener;
|
||||
import org.eclipse.jface.window.Window;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.events.DisposeEvent;
|
||||
import org.eclipse.swt.events.DisposeListener;
|
||||
import org.eclipse.swt.events.ModifyEvent;
|
||||
import org.eclipse.swt.events.ModifyListener;
|
||||
import org.eclipse.swt.events.SelectionAdapter;
|
||||
import org.eclipse.swt.events.SelectionEvent;
|
||||
import org.eclipse.swt.graphics.Image;
|
||||
import org.eclipse.swt.layout.GridData;
|
||||
import org.eclipse.swt.layout.GridLayout;
|
||||
import org.eclipse.swt.widgets.Button;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Text;
|
||||
import org.eclipse.ui.IWorkbenchPage;
|
||||
import org.eclipse.ui.IWorkbenchWindow;
|
||||
import org.eclipse.ui.PartInitException;
|
||||
import org.eclipse.ui.PlatformUI;
|
||||
import org.eclipse.ui.dialogs.ElementListSelectionDialog;
|
||||
import org.eclipse.ui.forms.IManagedForm;
|
||||
import org.eclipse.ui.forms.events.HyperlinkAdapter;
|
||||
import org.eclipse.ui.forms.events.HyperlinkEvent;
|
||||
import org.eclipse.ui.forms.widgets.FormText;
|
||||
import org.eclipse.ui.forms.widgets.FormToolkit;
|
||||
import org.eclipse.ui.forms.widgets.TableWrapData;
|
||||
import org.eclipse.ui.part.FileEditorInput;
|
||||
|
||||
import java.util.TreeSet;
|
||||
|
||||
/**
|
||||
* Represents an XML attribute to select an exisintg manifest package, that can be modified using
|
||||
* a simple text field or a dialog to choose an existing package.
|
||||
* <p/>
|
||||
* See {@link UiTextAttributeNode} for more information.
|
||||
*/
|
||||
public class UiManifestPkgAttrNode extends UiTextAttributeNode {
|
||||
|
||||
/**
|
||||
* Creates a {@link UiManifestPkgAttrNode} object that will display ui to select or create
|
||||
* a manifest package.
|
||||
* @param attributeDescriptor the {@link AttributeDescriptor} object linked to the Ui Node.
|
||||
*/
|
||||
public UiManifestPkgAttrNode(AttributeDescriptor attributeDescriptor, UiElementNode uiParent) {
|
||||
super(attributeDescriptor, uiParent);
|
||||
}
|
||||
|
||||
/* (non-java doc)
|
||||
* Creates a label widget and an associated text field.
|
||||
* <p/>
|
||||
* As most other parts of the android manifest editor, this assumes the
|
||||
* parent uses a table layout with 2 columns.
|
||||
*/
|
||||
@Override
|
||||
public void createUiControl(final Composite parent, final IManagedForm managedForm) {
|
||||
setManagedForm(managedForm);
|
||||
FormToolkit toolkit = managedForm.getToolkit();
|
||||
TextAttributeDescriptor desc = (TextAttributeDescriptor) getDescriptor();
|
||||
|
||||
StringBuilder label = new StringBuilder();
|
||||
label.append("<form><p><a href='unused'>"); //$NON-NLS-1$
|
||||
label.append(desc.getUiName());
|
||||
label.append("</a></p></form>"); //$NON-NLS-1$
|
||||
FormText formText = SectionHelper.createFormText(parent, toolkit, true /* isHtml */,
|
||||
label.toString(), true /* setupLayoutData */);
|
||||
formText.addHyperlinkListener(new HyperlinkAdapter() {
|
||||
@Override
|
||||
public void linkActivated(HyperlinkEvent e) {
|
||||
super.linkActivated(e);
|
||||
doLabelClick();
|
||||
}
|
||||
});
|
||||
formText.setLayoutData(new TableWrapData(TableWrapData.LEFT, TableWrapData.MIDDLE));
|
||||
SectionHelper.addControlTooltip(formText, desc.getTooltip());
|
||||
|
||||
Composite composite = toolkit.createComposite(parent);
|
||||
composite.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.MIDDLE));
|
||||
GridLayout gl = new GridLayout(2, false);
|
||||
gl.marginHeight = gl.marginWidth = 0;
|
||||
composite.setLayout(gl);
|
||||
// Fixes missing text borders under GTK... also requires adding a 1-pixel margin
|
||||
// for the text field below
|
||||
toolkit.paintBordersFor(composite);
|
||||
|
||||
final Text text = toolkit.createText(composite, getCurrentValue());
|
||||
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
|
||||
gd.horizontalIndent = 1; // Needed by the fixed composite borders under GTK
|
||||
text.setLayoutData(gd);
|
||||
|
||||
setTextWidget(text);
|
||||
|
||||
Button browseButton = toolkit.createButton(composite, "Browse...", SWT.PUSH);
|
||||
|
||||
browseButton.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
super.widgetSelected(e);
|
||||
doBrowseClick();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/* (non-java doc)
|
||||
* Adds a validator to the text field that calls managedForm.getMessageManager().
|
||||
*/
|
||||
@Override
|
||||
protected void onAddValidators(final Text text) {
|
||||
ModifyListener listener = new ModifyListener() {
|
||||
public void modifyText(ModifyEvent e) {
|
||||
String package_name = text.getText();
|
||||
if (package_name.indexOf('.') < 1) {
|
||||
getManagedForm().getMessageManager().addMessage(text,
|
||||
"Package name should contain at least two identifiers.",
|
||||
null /* data */, IMessageProvider.ERROR, text);
|
||||
} else {
|
||||
getManagedForm().getMessageManager().removeMessage(text, text);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
text.addModifyListener(listener);
|
||||
|
||||
// Make sure the validator removes its message(s) when the widget is disposed
|
||||
text.addDisposeListener(new DisposeListener() {
|
||||
public void widgetDisposed(DisposeEvent e) {
|
||||
getManagedForm().getMessageManager().removeMessage(text, text);
|
||||
}
|
||||
});
|
||||
|
||||
// Finally call the validator once to make sure the initial value is processed
|
||||
listener.modifyText(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles response to the Browse button by creating a Package dialog.
|
||||
* */
|
||||
private void doBrowseClick() {
|
||||
|
||||
// Display the list of AndroidManifest packages in a selection dialog
|
||||
ElementListSelectionDialog dialog = new ElementListSelectionDialog(
|
||||
getTextWidget().getShell(),
|
||||
new ILabelProvider() {
|
||||
public Image getImage(Object element) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getText(Object element) {
|
||||
return element.toString();
|
||||
}
|
||||
|
||||
public void addListener(ILabelProviderListener listener) {
|
||||
}
|
||||
|
||||
public void dispose() {
|
||||
}
|
||||
|
||||
public boolean isLabelProperty(Object element, String property) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void removeListener(ILabelProviderListener listener) {
|
||||
}
|
||||
});
|
||||
|
||||
dialog.setTitle("Android Manifest Package Selection");
|
||||
dialog.setMessage("Select the Android Manifest package to target.");
|
||||
|
||||
dialog.setElements(getPossibleValues(null));
|
||||
|
||||
// open the dialog and use the object selected if OK was clicked, or null otherwise
|
||||
if (dialog.open() == Window.OK) {
|
||||
String result = (String) dialog.getFirstResult();
|
||||
if (result != null && result.length() > 0) {
|
||||
getTextWidget().setText(result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles response to the Label hyper link being activated.
|
||||
*/
|
||||
private void doLabelClick() {
|
||||
// get the current package name
|
||||
String package_name = getTextWidget().getText().trim();
|
||||
|
||||
if (package_name.length() == 0) {
|
||||
createNewProject();
|
||||
} else {
|
||||
displayExistingManifest(package_name);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* When the label is clicked and there's already a package name, this method
|
||||
* attempts to find the project matching the android package name and it attempts
|
||||
* to open the manifest editor.
|
||||
*
|
||||
* @param package_name The android package name to find. Must not be null.
|
||||
*/
|
||||
private void displayExistingManifest(String package_name) {
|
||||
|
||||
// Look for the first project that uses this package name
|
||||
for (IJavaProject project : BaseProjectHelper.getAndroidProjects()) {
|
||||
// check that there is indeed a manifest file.
|
||||
IFile manifestFile = AndroidManifestParser.getManifest(project.getProject());
|
||||
if (manifestFile == null) {
|
||||
// no file? skip this project.
|
||||
continue;
|
||||
}
|
||||
|
||||
AndroidManifestParser parser = null;
|
||||
try {
|
||||
parser = AndroidManifestParser.parseForData(manifestFile);
|
||||
} catch (CoreException e) {
|
||||
// ignore, handled below.
|
||||
}
|
||||
if (parser == null) {
|
||||
// skip this project.
|
||||
continue;
|
||||
}
|
||||
|
||||
if (package_name.equals(parser.getPackage())) {
|
||||
// Found the project.
|
||||
|
||||
IWorkbenchWindow win = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
|
||||
if (win != null) {
|
||||
IWorkbenchPage page = win.getActivePage();
|
||||
if (page != null) {
|
||||
try {
|
||||
page.openEditor(
|
||||
new FileEditorInput(manifestFile),
|
||||
ManifestEditor.ID,
|
||||
true, /* activate */
|
||||
IWorkbenchPage.MATCH_INPUT);
|
||||
} catch (PartInitException e) {
|
||||
AdtPlugin.log(e,
|
||||
"Opening editor failed for %s", //$NON-NLS-1$
|
||||
manifestFile.getFullPath());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// We found the project; even if we failed there's no need to keep looking.
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays the New Project Wizard to create a new project.
|
||||
* If one is successfully created, use the Android Package name.
|
||||
*/
|
||||
private void createNewProject() {
|
||||
|
||||
NewProjectAction npwAction = new NewProjectAction();
|
||||
npwAction.run(null /*action*/);
|
||||
if (npwAction.getDialogResult() == Dialog.OK) {
|
||||
NewProjectWizard npw = (NewProjectWizard) npwAction.getWizard();
|
||||
String name = npw.getPackageName();
|
||||
if (name != null && name.length() > 0) {
|
||||
getTextWidget().setText(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all the possible android package names that could be used.
|
||||
* The prefix is not used.
|
||||
*
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public String[] getPossibleValues(String prefix) {
|
||||
TreeSet<String> packages = new TreeSet<String>();
|
||||
|
||||
for (IJavaProject project : BaseProjectHelper.getAndroidProjects()) {
|
||||
// check that there is indeed a manifest file.
|
||||
IFile manifestFile = AndroidManifestParser.getManifest(project.getProject());
|
||||
if (manifestFile == null) {
|
||||
// no file? skip this project.
|
||||
continue;
|
||||
}
|
||||
|
||||
AndroidManifestParser parser = null;
|
||||
try {
|
||||
parser = AndroidManifestParser.parseForData(manifestFile);
|
||||
} catch (CoreException e) {
|
||||
// ignore, handled below.
|
||||
}
|
||||
if (parser == null) {
|
||||
// skip this project.
|
||||
continue;
|
||||
}
|
||||
|
||||
packages.add(parser.getPackage());
|
||||
}
|
||||
|
||||
return packages.toArray(new String[packages.size()]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,15 +14,15 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.manifest.model;
|
||||
package com.android.ide.eclipse.adt.internal.editors.manifest.model;
|
||||
|
||||
import com.android.ide.eclipse.adt.AdtPlugin;
|
||||
import com.android.ide.eclipse.editors.AndroidEditor;
|
||||
import com.android.ide.eclipse.editors.descriptors.AttributeDescriptor;
|
||||
import com.android.ide.eclipse.editors.descriptors.TextAttributeDescriptor;
|
||||
import com.android.ide.eclipse.editors.ui.SectionHelper;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiTextAttributeNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.AndroidEditor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.AttributeDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.TextAttributeDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.ui.SectionHelper;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiTextAttributeNode;
|
||||
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
@@ -14,16 +14,16 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.manifest.pages;
|
||||
package com.android.ide.eclipse.adt.internal.editors.manifest.pages;
|
||||
|
||||
import com.android.ide.eclipse.adt.AdtPlugin;
|
||||
import com.android.ide.eclipse.editors.descriptors.AttributeDescriptor;
|
||||
import com.android.ide.eclipse.editors.descriptors.XmlnsAttributeDescriptor;
|
||||
import com.android.ide.eclipse.editors.manifest.ManifestEditor;
|
||||
import com.android.ide.eclipse.editors.ui.UiElementPart;
|
||||
import com.android.ide.eclipse.editors.uimodel.IUiUpdateListener;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiAttributeNode;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.AttributeDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.XmlnsAttributeDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.manifest.ManifestEditor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.ui.UiElementPart;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.IUiUpdateListener;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiAttributeNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
|
||||
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
@@ -14,14 +14,14 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.manifest.pages;
|
||||
package com.android.ide.eclipse.adt.internal.editors.manifest.pages;
|
||||
|
||||
import com.android.ide.eclipse.adt.AdtPlugin;
|
||||
import com.android.ide.eclipse.editors.descriptors.ElementDescriptor;
|
||||
import com.android.ide.eclipse.editors.manifest.ManifestEditor;
|
||||
import com.android.ide.eclipse.editors.manifest.descriptors.AndroidManifestDescriptors;
|
||||
import com.android.ide.eclipse.editors.ui.tree.UiTreeBlock;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.ElementDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.manifest.ManifestEditor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.manifest.descriptors.AndroidManifestDescriptors;
|
||||
import com.android.ide.eclipse.adt.internal.editors.ui.tree.UiTreeBlock;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.layout.GridData;
|
||||
@@ -14,16 +14,16 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.manifest.pages;
|
||||
package com.android.ide.eclipse.adt.internal.editors.manifest.pages;
|
||||
|
||||
import com.android.ide.eclipse.adt.AdtPlugin;
|
||||
import com.android.ide.eclipse.adt.sdk.Sdk;
|
||||
import com.android.ide.eclipse.editors.descriptors.DescriptorsUtils;
|
||||
import com.android.ide.eclipse.editors.manifest.ManifestEditor;
|
||||
import com.android.ide.eclipse.editors.ui.UiElementPart;
|
||||
import com.android.ide.eclipse.editors.uimodel.IUiUpdateListener;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.editors.uimodel.IUiUpdateListener.UiUpdateState;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.DescriptorsUtils;
|
||||
import com.android.ide.eclipse.adt.internal.editors.manifest.ManifestEditor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.ui.UiElementPart;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.IUiUpdateListener;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.IUiUpdateListener.UiUpdateState;
|
||||
import com.android.ide.eclipse.adt.internal.sdk.Sdk;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.events.SelectionAdapter;
|
||||
@@ -14,14 +14,14 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.manifest.pages;
|
||||
package com.android.ide.eclipse.adt.internal.editors.manifest.pages;
|
||||
|
||||
import com.android.ide.eclipse.adt.AdtPlugin;
|
||||
import com.android.ide.eclipse.editors.descriptors.ElementDescriptor;
|
||||
import com.android.ide.eclipse.editors.manifest.ManifestEditor;
|
||||
import com.android.ide.eclipse.editors.manifest.descriptors.AndroidManifestDescriptors;
|
||||
import com.android.ide.eclipse.editors.ui.tree.UiTreeBlock;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.ElementDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.manifest.ManifestEditor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.manifest.descriptors.AndroidManifestDescriptors;
|
||||
import com.android.ide.eclipse.adt.internal.editors.ui.tree.UiTreeBlock;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
|
||||
|
||||
import org.eclipse.ui.forms.IManagedForm;
|
||||
import org.eclipse.ui.forms.editor.FormPage;
|
||||
@@ -14,11 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.manifest.pages;
|
||||
package com.android.ide.eclipse.adt.internal.editors.manifest.pages;
|
||||
|
||||
import com.android.ide.eclipse.common.project.ExportHelper;
|
||||
import com.android.ide.eclipse.editors.manifest.ManifestEditor;
|
||||
import com.android.ide.eclipse.editors.ui.SectionHelper.ManifestSectionPart;
|
||||
import com.android.ide.eclipse.adt.internal.editors.manifest.ManifestEditor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.ui.SectionHelper.ManifestSectionPart;
|
||||
import com.android.ide.eclipse.adt.internal.project.ExportHelper;
|
||||
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
@@ -14,13 +14,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.manifest.pages;
|
||||
package com.android.ide.eclipse.adt.internal.editors.manifest.pages;
|
||||
|
||||
import com.android.ide.eclipse.editors.descriptors.ElementDescriptor;
|
||||
import com.android.ide.eclipse.editors.manifest.ManifestEditor;
|
||||
import com.android.ide.eclipse.editors.manifest.descriptors.AndroidManifestDescriptors;
|
||||
import com.android.ide.eclipse.editors.ui.UiElementPart;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.ElementDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.manifest.ManifestEditor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.manifest.descriptors.AndroidManifestDescriptors;
|
||||
import com.android.ide.eclipse.adt.internal.editors.ui.UiElementPart;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
|
||||
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.ui.forms.IManagedForm;
|
||||
@@ -14,13 +14,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.manifest.pages;
|
||||
package com.android.ide.eclipse.adt.internal.editors.manifest.pages;
|
||||
|
||||
import com.android.ide.eclipse.adt.AdtPlugin;
|
||||
import com.android.ide.eclipse.editors.descriptors.ElementDescriptor;
|
||||
import com.android.ide.eclipse.editors.manifest.ManifestEditor;
|
||||
import com.android.ide.eclipse.editors.manifest.descriptors.AndroidManifestDescriptors;
|
||||
import com.android.ide.eclipse.editors.ui.SectionHelper.ManifestSectionPart;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.ElementDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.manifest.ManifestEditor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.manifest.descriptors.AndroidManifestDescriptors;
|
||||
import com.android.ide.eclipse.adt.internal.editors.ui.SectionHelper.ManifestSectionPart;
|
||||
|
||||
import org.eclipse.swt.graphics.Image;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
@@ -14,14 +14,14 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.manifest.pages;
|
||||
package com.android.ide.eclipse.adt.internal.editors.manifest.pages;
|
||||
|
||||
import com.android.ide.eclipse.adt.AdtPlugin;
|
||||
import com.android.ide.eclipse.editors.descriptors.ElementDescriptor;
|
||||
import com.android.ide.eclipse.editors.manifest.ManifestEditor;
|
||||
import com.android.ide.eclipse.editors.manifest.descriptors.AndroidManifestDescriptors;
|
||||
import com.android.ide.eclipse.editors.ui.tree.UiTreeBlock;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.ElementDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.manifest.ManifestEditor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.manifest.descriptors.AndroidManifestDescriptors;
|
||||
import com.android.ide.eclipse.adt.internal.editors.ui.tree.UiTreeBlock;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.layout.GridData;
|
||||
@@ -14,14 +14,14 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.manifest.pages;
|
||||
package com.android.ide.eclipse.adt.internal.editors.manifest.pages;
|
||||
|
||||
import com.android.ide.eclipse.adt.AdtPlugin;
|
||||
import com.android.ide.eclipse.editors.descriptors.ElementDescriptor;
|
||||
import com.android.ide.eclipse.editors.manifest.ManifestEditor;
|
||||
import com.android.ide.eclipse.editors.manifest.descriptors.AndroidManifestDescriptors;
|
||||
import com.android.ide.eclipse.editors.ui.tree.UiTreeBlock;
|
||||
import com.android.ide.eclipse.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.descriptors.ElementDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.manifest.ManifestEditor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.manifest.descriptors.AndroidManifestDescriptors;
|
||||
import com.android.ide.eclipse.adt.internal.editors.ui.tree.UiTreeBlock;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
|
||||
|
||||
import org.eclipse.ui.forms.IManagedForm;
|
||||
import org.eclipse.ui.forms.editor.FormPage;
|
||||
@@ -14,10 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ide.eclipse.editors.menu;
|
||||
package com.android.ide.eclipse.adt.internal.editors.menu;
|
||||
|
||||
import com.android.ide.eclipse.adt.sdk.AndroidTargetData;
|
||||
import com.android.ide.eclipse.editors.AndroidContentAssist;
|
||||
import com.android.ide.eclipse.adt.internal.editors.AndroidContentAssist;
|
||||
import com.android.ide.eclipse.adt.internal.sdk.AndroidTargetData;
|
||||
|
||||
/**
|
||||
* Content Assist Processor for /res/menu XML files
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user