Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgor Fedorenko2011-02-08 16:17:36 -0500
committerIgor Fedorenko2011-02-08 16:17:36 -0500
commit338bfc4789d84256bbb00d622d4699a8fed31499 (patch)
tree10c0bacd0282f08c1caa23d060b18696537b13c7
parent5f53cd39a20f30b84cd3ee25b9388fc85ec279aa (diff)
downloadm2e-core-338bfc4789d84256bbb00d622d4699a8fed31499.tar.gz
m2e-core-338bfc4789d84256bbb00d622d4699a8fed31499.tar.xz
m2e-core-338bfc4789d84256bbb00d622d4699a8fed31499.zip
336555 moved core ui code to a separate bundle
Signed-off-by: Igor Fedorenko <igor@ifedorenko.com>
-rw-r--r--org.eclipse.m2e.core.ui/.classpath7
-rw-r--r--org.eclipse.m2e.core.ui/.gitignore1
-rw-r--r--org.eclipse.m2e.core.ui/.project33
-rw-r--r--org.eclipse.m2e.core.ui/.settings/org.eclipse.jdt.core.prefs279
-rw-r--r--org.eclipse.m2e.core.ui/.settings/org.eclipse.jdt.ui.prefs6
-rw-r--r--org.eclipse.m2e.core.ui/META-INF/MANIFEST.MF44
-rw-r--r--org.eclipse.m2e.core.ui/OSGI-INF/mavenconsole.xml7
-rw-r--r--org.eclipse.m2e.core.ui/build.properties10
-rw-r--r--org.eclipse.m2e.core.ui/icons/add_index.gif (renamed from org.eclipse.m2e.core/icons/add_index.gif)bin379 -> 379 bytes
-rw-r--r--org.eclipse.m2e.core.ui/icons/clear.gif (renamed from org.eclipse.m2e.core/icons/clear.gif)bin163 -> 163 bytes
-rw-r--r--org.eclipse.m2e.core.ui/icons/clear_disabled.gif (renamed from org.eclipse.m2e.core/icons/clear_disabled.gif)bin159 -> 159 bytes
-rw-r--r--org.eclipse.m2e.core.ui/icons/close.gif (renamed from org.eclipse.m2e.core/icons/close.gif)bin163 -> 163 bytes
-rw-r--r--org.eclipse.m2e.core.ui/icons/collapseall.gif (renamed from org.eclipse.m2e.core/icons/collapseall.gif)bin157 -> 157 bytes
-rw-r--r--org.eclipse.m2e.core.ui/icons/copy.gif (renamed from org.eclipse.m2e.core/icons/copy.gif)bin607 -> 607 bytes
-rw-r--r--org.eclipse.m2e.core.ui/icons/debug.gif (renamed from org.eclipse.m2e.core/icons/debug.gif)bin581 -> 581 bytes
-rw-r--r--org.eclipse.m2e.core.ui/icons/import_jar.gif (renamed from org.eclipse.m2e.core/icons/import_jar.gif)bin580 -> 580 bytes
-rw-r--r--org.eclipse.m2e.core.ui/icons/import_m2_project.gif (renamed from org.eclipse.m2e.core/icons/import_m2_project.gif)bin247 -> 247 bytes
-rw-r--r--org.eclipse.m2e.core.ui/icons/import_project.png (renamed from org.eclipse.m2e.core/icons/import_project.png)bin6452 -> 6452 bytes
-rw-r--r--org.eclipse.m2e.core.ui/icons/jar_obj.gif (renamed from org.eclipse.m2e.core/icons/jar_obj.gif)bin587 -> 587 bytes
-rw-r--r--org.eclipse.m2e.core.ui/icons/jar_src_version.gif (renamed from org.eclipse.m2e.core/icons/jar_src_version.gif)bin323 -> 323 bytes
-rw-r--r--org.eclipse.m2e.core.ui/icons/jar_version.gif (renamed from org.eclipse.m2e.core/icons/jar_version.gif)bin133 -> 133 bytes
-rw-r--r--org.eclipse.m2e.core.ui/icons/java_obj.gif (renamed from org.eclipse.m2e.core/icons/java_obj.gif)bin573 -> 573 bytes
-rw-r--r--org.eclipse.m2e.core.ui/icons/java_src_obj.gif (renamed from org.eclipse.m2e.core/icons/java_src_obj.gif)bin589 -> 589 bytes
-rw-r--r--org.eclipse.m2e.core.ui/icons/lock_ovr.gif (renamed from org.eclipse.m2e.core/icons/lock_ovr.gif)bin310 -> 310 bytes
-rw-r--r--org.eclipse.m2e.core.ui/icons/m2.gif (renamed from org.eclipse.m2e.core/icons/m2.gif)bin222 -> 222 bytes
-rw-r--r--org.eclipse.m2e.core.ui/icons/m2eclipse48.gif (renamed from org.eclipse.m2e.core/icons/m2eclipse48.gif)bin1795 -> 1795 bytes
-rw-r--r--org.eclipse.m2e.core.ui/icons/main_tab.gif (renamed from org.eclipse.m2e.core/icons/main_tab.gif)bin359 -> 359 bytes
-rw-r--r--org.eclipse.m2e.core.ui/icons/maven_index.gif (renamed from org.eclipse.m2e.core/icons/maven_index.gif)bin362 -> 362 bytes
-rw-r--r--org.eclipse.m2e.core.ui/icons/maven_indexes.gif (renamed from org.eclipse.m2e.core/icons/maven_indexes.gif)bin258 -> 258 bytes
-rw-r--r--org.eclipse.m2e.core.ui/icons/mjar.gif (renamed from org.eclipse.m2e.core/icons/mjar.gif)bin258 -> 258 bytes
-rw-r--r--org.eclipse.m2e.core.ui/icons/mlabel.gif (renamed from org.eclipse.m2e.core/icons/mlabel.gif)bin76 -> 76 bytes
-rw-r--r--org.eclipse.m2e.core.ui/icons/new_m2_pom.gif (renamed from org.eclipse.m2e.core/icons/new_m2_pom.gif)bin254 -> 254 bytes
-rw-r--r--org.eclipse.m2e.core.ui/icons/new_m2_project.gif (renamed from org.eclipse.m2e.core/icons/new_m2_project.gif)bin274 -> 274 bytes
-rw-r--r--org.eclipse.m2e.core.ui/icons/new_m2_project_wizard.gif (renamed from org.eclipse.m2e.core/icons/new_m2_project_wizard.gif)bin2051 -> 2051 bytes
-rw-r--r--org.eclipse.m2e.core.ui/icons/open_pom.gif (renamed from org.eclipse.m2e.core/icons/open_pom.gif)bin234 -> 234 bytes
-rw-r--r--org.eclipse.m2e.core.ui/icons/pom_obj.gif (renamed from org.eclipse.m2e.core/icons/pom_obj.gif)bin249 -> 249 bytes
-rw-r--r--org.eclipse.m2e.core.ui/icons/project_obj.gif (renamed from org.eclipse.m2e.core/icons/project_obj.gif)bin233 -> 233 bytes
-rw-r--r--org.eclipse.m2e.core.ui/icons/rebuild_index.gif (renamed from org.eclipse.m2e.core/icons/rebuild_index.gif)bin230 -> 230 bytes
-rw-r--r--org.eclipse.m2e.core.ui/icons/refresh.gif (renamed from org.eclipse.m2e.core/icons/refresh.gif)bin327 -> 327 bytes
-rw-r--r--org.eclipse.m2e.core.ui/icons/stderr.gif (renamed from org.eclipse.m2e.core/icons/stderr.gif)bin242 -> 242 bytes
-rw-r--r--org.eclipse.m2e.core.ui/icons/stdout.gif (renamed from org.eclipse.m2e.core/icons/stdout.gif)bin337 -> 337 bytes
-rw-r--r--org.eclipse.m2e.core.ui/icons/update_dependencies.gif (renamed from org.eclipse.m2e.core/icons/update_dependencies.gif)bin244 -> 244 bytes
-rw-r--r--org.eclipse.m2e.core.ui/icons/update_index.gif (renamed from org.eclipse.m2e.core/icons/update_index.gif)bin350 -> 350 bytes
-rw-r--r--org.eclipse.m2e.core.ui/icons/update_source_folders.gif (renamed from org.eclipse.m2e.core/icons/update_source_folders.gif)bin251 -> 251 bytes
-rw-r--r--org.eclipse.m2e.core.ui/icons/web.gif (renamed from org.eclipse.m2e.core/icons/web.gif)bin996 -> 996 bytes
-rw-r--r--org.eclipse.m2e.core.ui/intro/css/overview.css (renamed from org.eclipse.m2e.core/intro/css/overview.css)0
-rw-r--r--org.eclipse.m2e.core.ui/intro/css/whatsnew.css (renamed from org.eclipse.m2e.core/intro/css/whatsnew.css)0
-rw-r--r--org.eclipse.m2e.core.ui/intro/overview.xml (renamed from org.eclipse.m2e.core/intro/overview.xml)0
-rw-r--r--org.eclipse.m2e.core.ui/intro/whatsnew.xml (renamed from org.eclipse.m2e.core/intro/whatsnew.xml)0
-rw-r--r--org.eclipse.m2e.core.ui/m2eclipse.gif (renamed from org.eclipse.m2e.core/m2eclipse.gif)bin1694 -> 1694 bytes
-rw-r--r--org.eclipse.m2e.core.ui/plugin.properties117
-rw-r--r--org.eclipse.m2e.core.ui/plugin.xml829
-rw-r--r--org.eclipse.m2e.core.ui/pom.xml32
-rw-r--r--org.eclipse.m2e.core.ui/schema/lifecycleMappingPropertyPage.exsd (renamed from org.eclipse.m2e.core/schema/lifecycleMappingPropertyPage.exsd)0
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/internal/console/ConsoleDocument.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/console/ConsoleDocument.java)0
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/internal/console/IMavenConsoleListener.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/core/IMavenConsoleListener.java)2
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/internal/console/MavenConsoleFactory.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/MavenConsoleFactory.java)7
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/internal/console/MavenConsoleImpl.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/console/MavenConsoleImpl.java)27
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/internal/console/MavenConsolePageParticipant.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/MavenConsolePageParticipant.java)13
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/internal/console/MavenConsoleService.java18
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/internal/console/MavenShowConsoleAction.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/MavenShowConsoleAction.java)7
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/M2EUIPluginActivator.java69
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/MavenAdapterFactory.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/MavenAdapterFactory.java)0
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/MavenImages.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/MavenImages.java)9
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/MavenVersionDecorator.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/MavenVersionDecorator.java)3
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/UpdateConfigurationJob.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/jobs/UpdateConfigurationJob.java)8
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/AddDependencyAction.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/AddDependencyAction.java)20
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/AddPluginAction.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/AddPluginAction.java)12
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/ChangeNatureAction.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/ChangeNatureAction.java)7
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/CheckoutAsMavenAction.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/CheckoutAsMavenAction.java)11
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/DisableNatureAction.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/DisableNatureAction.java)7
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/EnableNatureAction.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/EnableNatureAction.java)22
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/MaterializeAction.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/MaterializeAction.java)8
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/MavenActionSupport.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/MavenActionSupport.java)20
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/MavenConsoleRemoveAction.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/MavenConsoleRemoveAction.java)12
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/MavenDebugOutputAction.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/MavenDebugOutputAction.java)9
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/MavenPropertyTester.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/MavenPropertyTester.java)3
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/ModuleProjectWizardAction.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/ModuleProjectWizardAction.java)5
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/OpenMavenConsoleAction.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/OpenMavenConsoleAction.java)7
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/OpenPomAction.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/OpenPomAction.java)30
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/OpenUrlAction.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/OpenUrlAction.java)28
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/RefreshMavenModelsAction.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/RefreshMavenModelsAction.java)9
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/SelectionUtil.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/SelectionUtil.java)41
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/UpdateConfigurationAction.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/UpdateConfigurationAction.java)11
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/components/TextComboBoxCellEditor.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/components/TextComboBoxCellEditor.java)0
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/dialogs/AbstractMavenDialog.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/dialogs/AbstractMavenDialog.java)7
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/dialogs/AddDependencyDialog.java690
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/dialogs/EditDependencyDialog.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/dialogs/EditDependencyDialog.java)24
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/dialogs/InputHistory.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/dialogs/InputHistory.java)7
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/dialogs/MavenGoalSelectionDialog.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/dialogs/MavenGoalSelectionDialog.java)19
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/dialogs/MavenMessageDialog.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/dialogs/MavenMessageDialog.java)2
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/dialogs/MavenPropertyDialog.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/dialogs/MavenPropertyDialog.java)5
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/dialogs/MavenRepositorySearchDialog.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/dialogs/MavenRepositorySearchDialog.java)39
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/lifecycle/AbstractLifecyclePropertyPage.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/lifecycle/AbstractLifecyclePropertyPage.java)0
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/lifecycle/AbstractPropertyPageExtensionPoint.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/lifecycle/AbstractPropertyPageExtensionPoint.java)0
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/lifecycle/ILifecyclePropertyPage.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/lifecycle/ILifecyclePropertyPage.java)0
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/lifecycle/ILifecyclePropertyPageExtensionPoint.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/lifecycle/ILifecyclePropertyPageExtensionPoint.java)0
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/lifecycle/LifecycleMappingPropertyPageFactory.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/lifecycle/LifecycleMappingPropertyPageFactory.java)3
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/lifecycle/ProjectConfiguratorsTable.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/lifecycle/ProjectConfiguratorsTable.java)7
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/lifecycle/ProjectConfiguratorsTableContentProvider.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/lifecycle/ProjectConfiguratorsTableContentProvider.java)1
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/lifecycle/ProjectConfiguratorsTableLabelProvider.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/lifecycle/ProjectConfiguratorsTableLabelProvider.java)3
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/CustomizableLifecycleMappingPropertyPage.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/CustomizableLifecycleMappingPropertyPage.java)7
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/EmptyLifecycleMappingPropertyPage.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/EmptyLifecycleMappingPropertyPage.java)0
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/GoalsFieldEditor.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/GoalsFieldEditor.java)0
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/LocalArchetypeCatalogDialog.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/LocalArchetypeCatalogDialog.java)16
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenArchetypesPreferencePage.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/MavenArchetypesPreferencePage.java)15
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenGoalSelectionAdapter.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/MavenGoalSelectionAdapter.java)3
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenInstallationsPreferencePage.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/MavenInstallationsPreferencePage.java)31
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenPreferencePage.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/MavenPreferencePage.java)10
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenProjectLifecycleMappingPage.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/MavenProjectLifecycleMappingPage.java)7
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenProjectPreferencePage.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/MavenProjectPreferencePage.java)13
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenSettingsPreferencePage.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/MavenSettingsPreferencePage.java)30
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MissingLifecycleMappingPropertyPage.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/MissingLifecycleMappingPropertyPage.java)1
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/RemoteArchetypeCatalogDialog.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/RemoteArchetypeCatalogDialog.java)16
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/SimpleLifecycleMappingPropertyPage.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/SimpleLifecycleMappingPropertyPage.java)3
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/search/MavenSearchPage.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/search/MavenSearchPage.java)3
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/search/MavenSearchResult.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/search/MavenSearchResult.java)0
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/search/MavenSearchResultPage.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/search/MavenSearchResultPage.java)0
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/search/util/ArtifactInfo.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/util/search/ArtifactInfo.java)2
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/search/util/CComboContentAdapter.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/util/search/CComboContentAdapter.java)2
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/search/util/ControlDecoration.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/util/search/ControlDecoration.java)2
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/search/util/IndexSearchEngine.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/util/search/IndexSearchEngine.java)6
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/search/util/MenuDetectEvent.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/util/search/MenuDetectEvent.java)2
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/search/util/MenuDetectListener.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/util/search/MenuDetectListener.java)2
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/search/util/Packaging.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/util/search/Packaging.java)2
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/search/util/SearchEngine.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/util/search/SearchEngine.java)2
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/search/util/SearchException.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/util/search/SearchException.java)2
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/util/M2EErrorDialog.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/util/M2EErrorDialog.java)6
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/util/M2EUIUtils.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/util/M2EUtils.java)28
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/util/ProposalUtil.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/util/ProposalUtil.java)22
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/util/Util.java57
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/MavenRepositoryView.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/MavenRepositoryView.java)37
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/RepositoryViewContentProvider.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/RepositoryViewContentProvider.java)3
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/RepositoryViewLabelProvider.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/RepositoryViewLabelProvider.java)9
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/AbstractIndexedRepositoryNode.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/AbstractIndexedRepositoryNode.java)5
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/AbstractRepositoriesNode.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/AbstractRepositoriesNode.java)5
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/CustomRepositoriesNode.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/CustomRepositoriesNode.java)0
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/GlobalRepositoriesNode.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/GlobalRepositoriesNode.java)0
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/IArtifactNode.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/IArtifactNode.java)0
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/IMavenRepositoryNode.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/IMavenRepositoryNode.java)0
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/IndexedArtifactFileNode.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/IndexedArtifactFileNode.java)5
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/IndexedArtifactGroupNode.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/IndexedArtifactGroupNode.java)7
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/IndexedArtifactNode.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/IndexedArtifactNode.java)5
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/LocalRepositoryNode.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/LocalRepositoryNode.java)0
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/LocalRepositoryRootNode.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/LocalRepositoryRootNode.java)5
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/ProjectRepositoriesNode.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/ProjectRepositoriesNode.java)5
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/RepositoryNode.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/RepositoryNode.java)0
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/WorkspaceRepositoryNode.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/WorkspaceRepositoryNode.java)0
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/AbstactCreateMavenProjectJob.java80
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/AbstractMavenProjectWizard.java40
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/AbstractMavenWizardPage.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/AbstractMavenWizardPage.java)12
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/CustomArchetypeDialog.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/CustomArchetypeDialog.java)9
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenArtifactComponent.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenArtifactComponent.java)8
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenCheckoutLocationPage.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenCheckoutLocationPage.java)18
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenCheckoutWizard.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenCheckoutWizard.java)37
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenDependenciesWizardPage.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenDependenciesWizardPage.java)19
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenImportWizard.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenImportWizard.java)46
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenImportWizardPage.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenImportWizardPage.java)38
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenInstallFileArtifactWizardPage.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenInstallFileArtifactWizardPage.java)20
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenInstallFileRepositoryWizardPage.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenInstallFileRepositoryWizardPage.java)13
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenInstallFileWizard.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenInstallFileWizard.java)16
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenLocationComponent.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenLocationComponent.java)5
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenMaterializePomWizard.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenMaterializePomWizard.java)114
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenModuleWizard.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenModuleWizard.java)65
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenModuleWizardParentPage.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenModuleWizardParentPage.java)28
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenParentComponent.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenParentComponent.java)10
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenPomSelectionComponent.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenPomSelectionComponent.java)28
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenPomWizard.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenPomWizard.java)18
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenPomWizardPage.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenPomWizardPage.java)8
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenProjectCheckoutJob.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenProjectCheckoutJob.java)59
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenProjectSelectionDialog.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenProjectSelectionDialog.java)11
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenProjectWizard.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenProjectWizard.java)97
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenProjectWizardArchetypePage.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenProjectWizardArchetypePage.java)50
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenProjectWizardArchetypeParametersPage.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenProjectWizardArchetypeParametersPage.java)32
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenProjectWizardArtifactPage.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenProjectWizardArtifactPage.java)14
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenProjectWizardLocationPage.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenProjectWizardLocationPage.java)29
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/ProjectsImportPage.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/ProjectsImportPage.java)13
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/ProjectsImportWizard.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/ProjectsImportWizard.java)5
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/ResolverConfigurationComponent.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/ResolverConfigurationComponent.java)9
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/WidthGroup.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/WidthGroup.java)2
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/WorkingSetGroup.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/WorkingSetGroup.java)40
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/WorkingSetHelper.java8
-rw-r--r--org.eclipse.m2e.core/META-INF/MANIFEST.MF20
-rw-r--r--org.eclipse.m2e.core/plugin.properties99
-rw-r--r--org.eclipse.m2e.core/plugin.xml855
-rw-r--r--org.eclipse.m2e.core/pom.xml3
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/MavenPlugin.java207
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/core/MavenConsole.java19
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/embedder/MavenModelManager.java10
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/embedder/MavenRuntimeManager.java85
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/M2EUtils.java64
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/builder/MavenBuilder.java2
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/AbstractTransferListenerAdapter.java13
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/ArtifactTransferListenerAdapter.java6
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/EclipseLogger.java10
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/EclipseLoggerManager.java5
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/MavenConfigurationImpl.java99
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/MavenImpl.java12
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/WagonTransferListenerAdapter.java5
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/index/ArtifactScanningMonitor.java9
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/index/IndexUpdaterJob.java6
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/index/NexusIndexManager.java27
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/markers/MavenMarkerManager.java18
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/preferences/MavenConfigurationImpl.java119
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/preferences/MavenPreferenceInitializer.java36
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/ProjectConfigurationManager.java65
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/ProjectRegistryManager.java5
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/ProjectRegistryRefreshJob.java16
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/LocalProjectScanner.java12
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/ProjectImportConfiguration.java18
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/util/Util.java119
-rw-r--r--org.eclipse.m2e.discovery/META-INF/MANIFEST.MF3
-rw-r--r--org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/startup/UpdateConfigurationStartup.java2
-rw-r--r--org.eclipse.m2e.editor.xml/META-INF/MANIFEST.MF3
-rw-r--r--org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/InsertArtifactProposal.java2
-rw-r--r--org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomHyperlinkDetector.java4
-rw-r--r--org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomTemplateContext.java12
-rw-r--r--org.eclipse.m2e.editor/META-INF/MANIFEST.MF3
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/DependenciesComposite.java6
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/DependencyDetailComposite.java14
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/DependencyLabelProvider.java2
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/PluginsComposite.java22
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/ReportingComposite.java16
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/RepositoriesComposite.java4
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/TeamComposite.java2
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/dialogs/ManageDependenciesDialog.java2
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/dialogs/MavenModuleSelectionDialog.java2
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/internal/actions/ShowDependencyHierarchyAction.java4
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/BuildPage.java10
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/DependencyTreePage.java2
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/FormUtils.java4
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/MavenPomEditor.java17
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/MavenPomEditorPage.java4
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/OverviewPage.java24
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/PomEditorPreferencePage.java3
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/ProfilesPage.java6
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/PropertiesSection.java2
-rw-r--r--org.eclipse.m2e.feature/feature.xml14
-rw-r--r--org.eclipse.m2e.jdt/META-INF/MANIFEST.MF3
-rw-r--r--org.eclipse.m2e.jdt/plugin.xml2
-rw-r--r--org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/AbstractJavaProjectConfigurator.java6
-rw-r--r--org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/actions/OpenJavaDocAction.java2
-rw-r--r--org.eclipse.m2e.launching/META-INF/MANIFEST.MF4
-rw-r--r--org.eclipse.m2e.launching/src/org/eclipse/m2e/actions/ExecutePomAction.java24
-rw-r--r--org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/LaunchingUtils.java27
-rw-r--r--org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenLaunchDelegate.java3
-rw-r--r--org.eclipse.m2e.launching/src/org/eclipse/m2e/ui/internal/launch/MavenLaunchMainTab.java22
-rw-r--r--org.eclipse.m2e.maven.runtime/.gitignore1
-rw-r--r--org.eclipse.m2e.parent/pom.xml2
-rw-r--r--org.eclipse.m2e.refactoring/META-INF/MANIFEST.MF3
-rw-r--r--org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/exclude/DependencyExcludeAction.java2
-rw-r--r--org.eclipse.m2e.scm/.classpath7
-rw-r--r--org.eclipse.m2e.scm/.gitignore1
-rw-r--r--org.eclipse.m2e.scm/.project28
-rw-r--r--org.eclipse.m2e.scm/.settings/org.eclipse.jdt.core.prefs279
-rw-r--r--org.eclipse.m2e.scm/.settings/org.eclipse.jdt.ui.prefs6
-rw-r--r--org.eclipse.m2e.scm/META-INF/MANIFEST.MF15
-rw-r--r--org.eclipse.m2e.scm/build.properties7
-rw-r--r--org.eclipse.m2e.scm/plugin.properties13
-rw-r--r--org.eclipse.m2e.scm/plugin.xml7
-rw-r--r--org.eclipse.m2e.scm/pom.xml22
-rw-r--r--org.eclipse.m2e.scm/schema/scmHandlers.exsd (renamed from org.eclipse.m2e.core/schema/scmHandlers.exsd)0
-rw-r--r--org.eclipse.m2e.scm/schema/scmHandlersUi.exsd (renamed from org.eclipse.m2e.core/schema/scmHandlersUi.exsd)0
-rw-r--r--org.eclipse.m2e.scm/src/org/eclipse/m2e/scm/MavenCheckoutOperation.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/scm/MavenCheckoutOperation.java)2
-rw-r--r--org.eclipse.m2e.scm/src/org/eclipse/m2e/scm/ScmHandler.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/scm/ScmHandler.java)2
-rw-r--r--org.eclipse.m2e.scm/src/org/eclipse/m2e/scm/ScmHandlerFactory.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/scm/ScmHandlerFactory.java)8
-rw-r--r--org.eclipse.m2e.scm/src/org/eclipse/m2e/scm/ScmHandlerUi.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/scm/ScmHandlerUi.java)2
-rw-r--r--org.eclipse.m2e.scm/src/org/eclipse/m2e/scm/ScmTag.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/scm/ScmTag.java)2
-rw-r--r--org.eclipse.m2e.scm/src/org/eclipse/m2e/scm/ScmUrl.java (renamed from org.eclipse.m2e.core/src/org/eclipse/m2e/core/scm/ScmUrl.java)2
-rw-r--r--target-platform/m2e-e35.target6
-rw-r--r--target-platform/m2e-e37.target20
271 files changed, 3965 insertions, 2692 deletions
diff --git a/org.eclipse.m2e.core.ui/.classpath b/org.eclipse.m2e.core.ui/.classpath
new file mode 100644
index 00000000..288a7808
--- /dev/null
+++ b/org.eclipse.m2e.core.ui/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/org.eclipse.m2e.core.ui/.gitignore b/org.eclipse.m2e.core.ui/.gitignore
new file mode 100644
index 00000000..ea8c4bf7
--- /dev/null
+++ b/org.eclipse.m2e.core.ui/.gitignore
@@ -0,0 +1 @@
+/target
diff --git a/org.eclipse.m2e.core.ui/.project b/org.eclipse.m2e.core.ui/.project
new file mode 100644
index 00000000..5a7ab7b6
--- /dev/null
+++ b/org.eclipse.m2e.core.ui/.project
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.m2e.core.ui</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ds.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.m2e.core.ui/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.m2e.core.ui/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000..5e4f3bfc
--- /dev/null
+++ b/org.eclipse.m2e.core.ui/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,279 @@
+#Mon Feb 07 16:08:55 EST 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=2
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=1
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=1
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=2
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=true
+org.eclipse.jdt.core.formatter.comment.format_block_comments=false
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=false
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
+org.eclipse.jdt.core.formatter.comment.line_length=120
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=
+org.eclipse.jdt.core.formatter.enabling_tag=
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
+org.eclipse.jdt.core.formatter.indentation.size=2
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=120
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=true
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=true
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=2
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/org.eclipse.m2e.core.ui/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.m2e.core.ui/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 00000000..98f92ec0
--- /dev/null
+++ b/org.eclipse.m2e.core.ui/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,6 @@
+#Mon Feb 07 16:08:57 EST 2011
+eclipse.preferences.version=1
+formatter_profile=_m2eclipse
+formatter_settings_version=12
+org.eclipse.jdt.ui.javadoc=false
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return Returns the ${bare_field_name}.\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} The ${bare_field_name} to set.\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*******************************************************************************&\#13;\n * Copyright (c) 2008 Sonatype, Inc.&\#13;\n * All rights reserved. This program and the accompanying materials&\#13;\n * are made available under the terms of the Eclipse Public License v1.0&\#13;\n * which accompanies this distribution, and is available at&\#13;\n * http\://www.eclipse.org/legal/epl-v10.html&\#13;\n *******************************************************************************/&\#13;\n</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * ${type_name}\n *\n * @author ${user}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\nMavenLogger.log(${exception_var});</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method ${enclosing_method}\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/org.eclipse.m2e.core.ui/META-INF/MANIFEST.MF b/org.eclipse.m2e.core.ui/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..adc6bfe8
--- /dev/null
+++ b/org.eclipse.m2e.core.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,44 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.m2e.core.ui;singleton:=true
+Bundle-Version: 0.13.0.qualifier
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-Name: %Bundle-Name
+Bundle-Vendor: %Bundle-Vendor
+Bundle-Localization: plugin
+Export-Package: org.eclipse.m2e.core.internal.console;x-internal:=true,
+ org.eclipse.m2e.core.ui.internal;x-internal:=true,
+ org.eclipse.m2e.core.ui.internal.actions,
+ org.eclipse.m2e.core.ui.internal.components;x-internal:=true,
+ org.eclipse.m2e.core.ui.internal.dialogs,
+ org.eclipse.m2e.core.ui.internal.lifecycle;x-internal:=true,
+ org.eclipse.m2e.core.ui.internal.preferences;x-internal:=true,
+ org.eclipse.m2e.core.ui.internal.search;x-internal:=true,
+ org.eclipse.m2e.core.ui.internal.search.util,
+ org.eclipse.m2e.core.ui.internal.util,
+ org.eclipse.m2e.core.ui.internal.views;x-internal:=true,
+ org.eclipse.m2e.core.ui.internal.views.nodes;x-internal:=true,
+ org.eclipse.m2e.core.ui.internal.wizards
+Bundle-Activator: org.eclipse.m2e.core.ui.internal.M2EUIPluginActivator
+Bundle-ActivationPolicy: lazy
+Require-Bundle: org.eclipse.osgi;bundle-version="3.5.2",
+ org.eclipse.equinox.common;bundle-version="3.5.1",
+ org.eclipse.ui.workbench;bundle-version="3.5.2",
+ org.eclipse.swt;bundle-version="3.5.2",
+ org.eclipse.m2e.core;bundle-version="0.13.0",
+ org.eclipse.jface;bundle-version="3.5.2",
+ org.eclipse.core.resources;bundle-version="3.5.2",
+ org.eclipse.core.runtime;bundle-version="3.5.0",
+ org.eclipse.m2e.model.edit;bundle-version="0.13.0",
+ org.eclipse.m2e.maven.runtime;bundle-version="0.13.0",
+ org.eclipse.m2e.archetype.common;bundle-version="0.13.0",
+ com.ibm.icu;bundle-version="4.0.1",
+ org.eclipse.m2e.maven.indexer;bundle-version="0.13.0",
+ org.eclipse.ui.console;bundle-version="3.4.0",
+ org.eclipse.ui.ide;bundle-version="3.5.2",
+ org.eclipse.core.filesystem;bundle-version="1.2.1",
+ org.eclipse.core.expressions;bundle-version="3.4.101",
+ org.eclipse.search;bundle-version="3.5.1",
+ org.eclipse.ui.forms;bundle-version="3.4.1",
+ org.eclipse.m2e.scm;bundle-version="0.13.0"
+Service-Component: OSGI-INF/mavenconsole.xml
diff --git a/org.eclipse.m2e.core.ui/OSGI-INF/mavenconsole.xml b/org.eclipse.m2e.core.ui/OSGI-INF/mavenconsole.xml
new file mode 100644
index 00000000..7552c453
--- /dev/null
+++ b/org.eclipse.m2e.core.ui/OSGI-INF/mavenconsole.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.m2e.core.internal.console.MavenConsoleService">
+ <implementation class="org.eclipse.m2e.core.internal.console.MavenConsoleService"/>
+ <service>
+ <provide interface="org.eclipse.m2e.core.core.MavenConsole"/>
+ </service>
+</scr:component>
diff --git a/org.eclipse.m2e.core.ui/build.properties b/org.eclipse.m2e.core.ui/build.properties
new file mode 100644
index 00000000..48b033fc
--- /dev/null
+++ b/org.eclipse.m2e.core.ui/build.properties
@@ -0,0 +1,10 @@
+source.. = src/
+output.. = target/classes/
+bin.includes = META-INF/,\
+ .,\
+ OSGI-INF/,\
+ plugin.xml,\
+ plugin.properties,\
+ icons/,\
+ intro/,\
+ schema/
diff --git a/org.eclipse.m2e.core/icons/add_index.gif b/org.eclipse.m2e.core.ui/icons/add_index.gif
index 33f47317..33f47317 100644
--- a/org.eclipse.m2e.core/icons/add_index.gif
+++ b/org.eclipse.m2e.core.ui/icons/add_index.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/clear.gif b/org.eclipse.m2e.core.ui/icons/clear.gif
index 2cd9c544..2cd9c544 100644
--- a/org.eclipse.m2e.core/icons/clear.gif
+++ b/org.eclipse.m2e.core.ui/icons/clear.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/clear_disabled.gif b/org.eclipse.m2e.core.ui/icons/clear_disabled.gif
index 559e4629..559e4629 100644
--- a/org.eclipse.m2e.core/icons/clear_disabled.gif
+++ b/org.eclipse.m2e.core.ui/icons/clear_disabled.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/close.gif b/org.eclipse.m2e.core.ui/icons/close.gif
index 2cd9c544..2cd9c544 100644
--- a/org.eclipse.m2e.core/icons/close.gif
+++ b/org.eclipse.m2e.core.ui/icons/close.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/collapseall.gif b/org.eclipse.m2e.core.ui/icons/collapseall.gif
index a2d80a90..a2d80a90 100644
--- a/org.eclipse.m2e.core/icons/collapseall.gif
+++ b/org.eclipse.m2e.core.ui/icons/collapseall.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/copy.gif b/org.eclipse.m2e.core.ui/icons/copy.gif
index 6d0dd17d..6d0dd17d 100644
--- a/org.eclipse.m2e.core/icons/copy.gif
+++ b/org.eclipse.m2e.core.ui/icons/copy.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/debug.gif b/org.eclipse.m2e.core.ui/icons/debug.gif
index 518e8660..518e8660 100644
--- a/org.eclipse.m2e.core/icons/debug.gif
+++ b/org.eclipse.m2e.core.ui/icons/debug.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/import_jar.gif b/org.eclipse.m2e.core.ui/icons/import_jar.gif
index da5afb91..da5afb91 100644
--- a/org.eclipse.m2e.core/icons/import_jar.gif
+++ b/org.eclipse.m2e.core.ui/icons/import_jar.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/import_m2_project.gif b/org.eclipse.m2e.core.ui/icons/import_m2_project.gif
index 4edf66db..4edf66db 100644
--- a/org.eclipse.m2e.core/icons/import_m2_project.gif
+++ b/org.eclipse.m2e.core.ui/icons/import_m2_project.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/import_project.png b/org.eclipse.m2e.core.ui/icons/import_project.png
index 3a5f3ac6..3a5f3ac6 100644
--- a/org.eclipse.m2e.core/icons/import_project.png
+++ b/org.eclipse.m2e.core.ui/icons/import_project.png
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/jar_obj.gif b/org.eclipse.m2e.core.ui/icons/jar_obj.gif
index 2fa1d777..2fa1d777 100644
--- a/org.eclipse.m2e.core/icons/jar_obj.gif
+++ b/org.eclipse.m2e.core.ui/icons/jar_obj.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/jar_src_version.gif b/org.eclipse.m2e.core.ui/icons/jar_src_version.gif
index 26c73738..26c73738 100644
--- a/org.eclipse.m2e.core/icons/jar_src_version.gif
+++ b/org.eclipse.m2e.core.ui/icons/jar_src_version.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/jar_version.gif b/org.eclipse.m2e.core.ui/icons/jar_version.gif
index 908dda8b..908dda8b 100644
--- a/org.eclipse.m2e.core/icons/jar_version.gif
+++ b/org.eclipse.m2e.core.ui/icons/jar_version.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/java_obj.gif b/org.eclipse.m2e.core.ui/icons/java_obj.gif
index 9a1797d2..9a1797d2 100644
--- a/org.eclipse.m2e.core/icons/java_obj.gif
+++ b/org.eclipse.m2e.core.ui/icons/java_obj.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/java_src_obj.gif b/org.eclipse.m2e.core.ui/icons/java_src_obj.gif
index 307954d2..307954d2 100644
--- a/org.eclipse.m2e.core/icons/java_src_obj.gif
+++ b/org.eclipse.m2e.core.ui/icons/java_src_obj.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/lock_ovr.gif b/org.eclipse.m2e.core.ui/icons/lock_ovr.gif
index c1facbbe..c1facbbe 100644
--- a/org.eclipse.m2e.core/icons/lock_ovr.gif
+++ b/org.eclipse.m2e.core.ui/icons/lock_ovr.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/m2.gif b/org.eclipse.m2e.core.ui/icons/m2.gif
index 4b0c0589..4b0c0589 100644
--- a/org.eclipse.m2e.core/icons/m2.gif
+++ b/org.eclipse.m2e.core.ui/icons/m2.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/m2eclipse48.gif b/org.eclipse.m2e.core.ui/icons/m2eclipse48.gif
index 84090bc0..84090bc0 100644
--- a/org.eclipse.m2e.core/icons/m2eclipse48.gif
+++ b/org.eclipse.m2e.core.ui/icons/m2eclipse48.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/main_tab.gif b/org.eclipse.m2e.core.ui/icons/main_tab.gif
index 9b9f79a6..9b9f79a6 100644
--- a/org.eclipse.m2e.core/icons/main_tab.gif
+++ b/org.eclipse.m2e.core.ui/icons/main_tab.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/maven_index.gif b/org.eclipse.m2e.core.ui/icons/maven_index.gif
index 6645b64a..6645b64a 100644
--- a/org.eclipse.m2e.core/icons/maven_index.gif
+++ b/org.eclipse.m2e.core.ui/icons/maven_index.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/maven_indexes.gif b/org.eclipse.m2e.core.ui/icons/maven_indexes.gif
index c288bfae..c288bfae 100644
--- a/org.eclipse.m2e.core/icons/maven_indexes.gif
+++ b/org.eclipse.m2e.core.ui/icons/maven_indexes.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/mjar.gif b/org.eclipse.m2e.core.ui/icons/mjar.gif
index d6b14677..d6b14677 100644
--- a/org.eclipse.m2e.core/icons/mjar.gif
+++ b/org.eclipse.m2e.core.ui/icons/mjar.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/mlabel.gif b/org.eclipse.m2e.core.ui/icons/mlabel.gif
index b801751b..b801751b 100644
--- a/org.eclipse.m2e.core/icons/mlabel.gif
+++ b/org.eclipse.m2e.core.ui/icons/mlabel.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/new_m2_pom.gif b/org.eclipse.m2e.core.ui/icons/new_m2_pom.gif
index 05bab80d..05bab80d 100644
--- a/org.eclipse.m2e.core/icons/new_m2_pom.gif
+++ b/org.eclipse.m2e.core.ui/icons/new_m2_pom.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/new_m2_project.gif b/org.eclipse.m2e.core.ui/icons/new_m2_project.gif
index ba5c27b8..ba5c27b8 100644
--- a/org.eclipse.m2e.core/icons/new_m2_project.gif
+++ b/org.eclipse.m2e.core.ui/icons/new_m2_project.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/new_m2_project_wizard.gif b/org.eclipse.m2e.core.ui/icons/new_m2_project_wizard.gif
index 8f18a52b..8f18a52b 100644
--- a/org.eclipse.m2e.core/icons/new_m2_project_wizard.gif
+++ b/org.eclipse.m2e.core.ui/icons/new_m2_project_wizard.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/open_pom.gif b/org.eclipse.m2e.core.ui/icons/open_pom.gif
index e74037b4..e74037b4 100644
--- a/org.eclipse.m2e.core/icons/open_pom.gif
+++ b/org.eclipse.m2e.core.ui/icons/open_pom.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/pom_obj.gif b/org.eclipse.m2e.core.ui/icons/pom_obj.gif
index aa4c32cd..aa4c32cd 100644
--- a/org.eclipse.m2e.core/icons/pom_obj.gif
+++ b/org.eclipse.m2e.core.ui/icons/pom_obj.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/project_obj.gif b/org.eclipse.m2e.core.ui/icons/project_obj.gif
index 94dba885..94dba885 100644
--- a/org.eclipse.m2e.core/icons/project_obj.gif
+++ b/org.eclipse.m2e.core.ui/icons/project_obj.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/rebuild_index.gif b/org.eclipse.m2e.core.ui/icons/rebuild_index.gif
index 164abc7b..164abc7b 100644
--- a/org.eclipse.m2e.core/icons/rebuild_index.gif
+++ b/org.eclipse.m2e.core.ui/icons/rebuild_index.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/refresh.gif b/org.eclipse.m2e.core.ui/icons/refresh.gif
index 3ca04d06..3ca04d06 100644
--- a/org.eclipse.m2e.core/icons/refresh.gif
+++ b/org.eclipse.m2e.core.ui/icons/refresh.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/stderr.gif b/org.eclipse.m2e.core.ui/icons/stderr.gif
index 27e7c9dd..27e7c9dd 100644
--- a/org.eclipse.m2e.core/icons/stderr.gif
+++ b/org.eclipse.m2e.core.ui/icons/stderr.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/stdout.gif b/org.eclipse.m2e.core.ui/icons/stdout.gif
index 43d51bc0..43d51bc0 100644
--- a/org.eclipse.m2e.core/icons/stdout.gif
+++ b/org.eclipse.m2e.core.ui/icons/stdout.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/update_dependencies.gif b/org.eclipse.m2e.core.ui/icons/update_dependencies.gif
index f760cd32..f760cd32 100644
--- a/org.eclipse.m2e.core/icons/update_dependencies.gif
+++ b/org.eclipse.m2e.core.ui/icons/update_dependencies.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/update_index.gif b/org.eclipse.m2e.core.ui/icons/update_index.gif
index 0bdecce8..0bdecce8 100644
--- a/org.eclipse.m2e.core/icons/update_index.gif
+++ b/org.eclipse.m2e.core.ui/icons/update_index.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/update_source_folders.gif b/org.eclipse.m2e.core.ui/icons/update_source_folders.gif
index 75663483..75663483 100644
--- a/org.eclipse.m2e.core/icons/update_source_folders.gif
+++ b/org.eclipse.m2e.core.ui/icons/update_source_folders.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/web.gif b/org.eclipse.m2e.core.ui/icons/web.gif
index 09f609d6..09f609d6 100644
--- a/org.eclipse.m2e.core/icons/web.gif
+++ b/org.eclipse.m2e.core.ui/icons/web.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/intro/css/overview.css b/org.eclipse.m2e.core.ui/intro/css/overview.css
index 66df774c..66df774c 100644
--- a/org.eclipse.m2e.core/intro/css/overview.css
+++ b/org.eclipse.m2e.core.ui/intro/css/overview.css
diff --git a/org.eclipse.m2e.core/intro/css/whatsnew.css b/org.eclipse.m2e.core.ui/intro/css/whatsnew.css
index d4c06d3d..d4c06d3d 100644
--- a/org.eclipse.m2e.core/intro/css/whatsnew.css
+++ b/org.eclipse.m2e.core.ui/intro/css/whatsnew.css
diff --git a/org.eclipse.m2e.core/intro/overview.xml b/org.eclipse.m2e.core.ui/intro/overview.xml
index 10b7ce14..10b7ce14 100644
--- a/org.eclipse.m2e.core/intro/overview.xml
+++ b/org.eclipse.m2e.core.ui/intro/overview.xml
diff --git a/org.eclipse.m2e.core/intro/whatsnew.xml b/org.eclipse.m2e.core.ui/intro/whatsnew.xml
index a19dc9f0..a19dc9f0 100644
--- a/org.eclipse.m2e.core/intro/whatsnew.xml
+++ b/org.eclipse.m2e.core.ui/intro/whatsnew.xml
diff --git a/org.eclipse.m2e.core/m2eclipse.gif b/org.eclipse.m2e.core.ui/m2eclipse.gif
index 585a2aba..585a2aba 100644
--- a/org.eclipse.m2e.core/m2eclipse.gif
+++ b/org.eclipse.m2e.core.ui/m2eclipse.gif
Binary files differ
diff --git a/org.eclipse.m2e.core.ui/plugin.properties b/org.eclipse.m2e.core.ui/plugin.properties
new file mode 100644
index 00000000..8719dd58
--- /dev/null
+++ b/org.eclipse.m2e.core.ui/plugin.properties
@@ -0,0 +1,117 @@
+#
+# Copyright (c) 2007, 2008 Sonatype, Inc.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+
+Bundle-Vendor = Eclipse.org - m2e
+Bundle-Name = Maven Integration for Eclipse
+
+m2.decorator.name=Maven Decorator
+m2.decorator.description=Adds an icon decoration to \
+ projects with Maven dependency management enabled.
+
+m2.decorator.version.name=Maven Version Decorator
+m2.decorator.version.description=Shows version for managed projects.
+
+m2.popup.project.label=Maven
+m2.popup.project.enable.label=Enable Maven Support
+m2.popup.project.disable.label=Disable Maven Support
+m2.popup.project.includeModules.label=Enable Nested Modules
+m2.popup.project.workspaceResolution.label=Enable Workspace Resolution
+m2.popup.project.add-dependency.label=Add Dependency
+m2.popup.project.update-sources.label=Update Source Folders
+m2.popup.ModuleProjectWizardAction=New Maven Module Project
+m2.popup.AddPluginAction=Add Plugin
+m2.popup.AddDependencyAction=Add Dependency
+m2.popup.UpdateConfigurationAction=Update Project Configuration
+m2.popup.RefreshMavenModelsAction=Update Dependencies
+m2.popup.RefreshMavenModelsAction.snapshots=Update Snapshots
+m2.popup.OpenUrlAction.openCiPage=Open Continuous Integration
+m2.popup.OpenUrlAction.openScmPage=Open Source Control
+m2.popup.OpenUrlAction.openIssuesPage=Open Issue Tracker
+m2.popup.OpenUrlAction.openProjectPage=Open Project Page
+m2.popup.OpenPomAction=Open POM
+m2.popup.DisableNatureAction=Disable Maven Nature
+m2.popup.ChangeNatureAction.disableWorkspaceResolution=Disable Workspace Resolution
+m2.popup.ChangeNatureAction.enableWorkspaceResolution=Enable Workspace Resolution
+
+m2.shortcut.open.pom=Open Maven POM
+
+m2.preferences.page.name=Maven
+
+m2.wizard.name=Maven
+m2.wizard.pom.name=Maven POM file
+m2.wizard.project.name=Maven Project
+
+m2.wizard.project.description=Create a Maven Project
+
+m2.wizard.import.name=Existing Maven Projects
+m2.wizard.import.description=Import Existing Maven Projects
+
+m2.wizard.materialize.name=Materialize Maven Projects
+m2.wizard.materialize.description=Materialize Maven Projects
+
+m2.wizard.module.name=Maven Module
+m2.wizard.module.description=Create a Maven module
+
+m2.editor.pom.name=Maven POM Editor
+
+m2.shortcut.addDependency=Add Maven Dependency
+m2.shortcut.addPlugin=Add Maven Plugin
+
+checkoutaction.label = Check out as Maven Project...
+openpomaction.label = Open POM
+openpomaction.label2 = Open POM
+openpomaction.label3 = Open POM
+openpomaction.label4 = Open POM
+openprojectaction.label = Open Project Page
+openprojectaction.label2 = Open Project Page
+openprojectaction.label3 = Open Project Page
+openprojectaction.label4 = Open Project Page
+command.opentype.description = Open Maven Type
+command.adddependency.description = Add Maven Dependency
+command.addplugin.description = Add Maven Plugin
+keyword.label = maven
+page.installations.name = Installations
+page.usersettings.name = User Settings
+page.archetypes.name = Archetypes
+wizard.checkout.name = Checkout Maven Projects from SCM
+wizard.checkout.description = Check out Maven Project from SVN
+category.general.name = General
+wizard.checkout2.name = Check out Maven Projects from SCM
+wizard.checkout2.description = Checkout Maven Project from SCM
+wizard.install.name = Install or deploy an artifact to a Maven repository
+wizard.install.description = Install or Deploy an artifact (archive) into a Maven repository
+consoleFactory.label = Maven Console
+actionSet.navigation.label = Maven Navigation
+action.openpom.label = Open Maven POM...
+action.openpom.tooltip = Open Maven POM
+action.updatedeps.label = Update All Maven Dependencies
+action.updatedeps.tooltip = Refresh Maven Models
+actionSet.maven.label = Maven
+action.adddep.label = Add Maven Dependency
+action.adddep.tooltip = Add Maven Dependency
+action.addplugin.label = Add Maven Plugin
+action.add.plugin.tooltip = Add Maven Plugin
+category.maven.name = Maven
+view.repos.name = Maven Repositories
+page.maven.name = Maven
+page.mappings.name = Lifecycle Mapping
+lifecycleMapping.custom.name = Customizable Lifecycle Mapping
+lifecycleMapping.empty.name = Empty Lifecycle Mapping
+extension-point.indexes.name = Maven Indexes
+extension-point.scmhandlers.name = SCM Handlers
+extension-point.scmhandlersui.name = SCM Handlers UI
+extension-point.archetypes.name = Maven Archetypes
+extension-point.configurators.name = Project Configurators
+extension-point.m2menu.name = m2 menu items
+extension-point.lifecyclemappings.name = Maven Lifecycle Mappings
+extension-point.mapping.proppage.name = Maven Lifecycle Mapping Property Page
+extension-point.mappingdefault.name = Default Maven Lifecycle Mappings
+extension-point.component.name = Maven Core Component Contributor
+extension-point.changed.name = mavenProjectChangedListeners
+extension-point.lifecycleMappingMetadataSource.name = Lifecycle Mapping Metadata Source
+convert.to.maven.name=Convert to Maven Project
diff --git a/org.eclipse.m2e.core.ui/plugin.xml b/org.eclipse.m2e.core.ui/plugin.xml
new file mode 100644
index 00000000..0befbb61
--- /dev/null
+++ b/org.eclipse.m2e.core.ui/plugin.xml
@@ -0,0 +1,829 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension-point id="lifecycleMappingPropertyPage" name = "%extension-point.mapping.proppage.name" schema = "schema/lifecycleMappingPropertyPage.exsd"/>
+
+
+ <extension point="org.eclipse.ui.intro.configExtension">
+ <configExtension configId="org.eclipse.ui.intro.universalConfig"
+ content="intro/overview.xml"/>
+ <configExtension configId="org.eclipse.ui.intro.universalConfig"
+ content="intro/whatsnew.xml"/>
+ </extension>
+
+ <extension point="org.eclipse.ui.decorators">
+ <decorator
+ adaptable="true"
+ icon="icons/mlabel.gif"
+ id="org.eclipse.m2e.core.maven2decorator"
+ label="%m2.decorator.name"
+ lightweight="true"
+ location="TOP_LEFT"
+ state="true">
+ <description>%m2.decorator.description</description>
+ <enablement>
+ <or>
+ <objectState name="nature" value="org.eclipse.m2e.core.maven2Nature"/>
+ <!--objectState name="name" value="pom.xml"/-->
+ <objectState name="label" value="Maven Dependencies"/>
+ </or>
+ </enablement>
+ </decorator>
+
+ <decorator id="org.eclipse.m2e.core.mavenVersionDecorator"
+ adaptable="true"
+ label="%m2.decorator.version.name"
+ lightweight="false"
+ class="org.eclipse.m2e.core.ui.internal.MavenVersionDecorator"
+ state="false">
+ <description>%m2.decorator.version.description</description>
+ <enablement>
+ <or>
+ <objectState name="nature" value="org.eclipse.m2e.core.maven2Nature"/>
+ <!--objectState name="name" value="pom.xml"/-->
+ </or>
+ </enablement>
+ </decorator>
+ </extension>
+
+ <extension point="org.eclipse.core.runtime.adapters">
+ <factory adaptableType="org.eclipse.core.runtime.IAdaptable"
+ class="org.eclipse.m2e.core.ui.internal.MavenAdapterFactory">
+ <adapter type="org.eclipse.ui.IActionFilter"/>
+ </factory>
+ </extension>
+
+ <extension point="org.eclipse.ui.popupMenus">
+ <!--
+ NOW WE HAVE PROJECT MENU CONTRIBUTIONS
+ -->
+ <objectContribution id="org.eclipse.m2e.core.projectMenu"
+ objectClass="org.eclipse.core.resources.IProject"
+ adaptable="true">
+ <menu
+ id="org.eclipse.m2e.core.mavenMenu"
+ path="additions"
+ label="%m2.popup.project.label">
+ <groupMarker name="new"/>
+ <separator name="org.eclipse.m2e.core.separator1"/>
+ <groupMarker name="update"/>
+ <separator name="org.eclipse.m2e.core.separator2"/>
+ <groupMarker name="open"/>
+ <separator name="org.eclipse.m2e.core.separator3"/>
+ <groupMarker name="nature"/>
+ <separator name="org.eclipse.m2e.core.separator4"/>
+ <groupMarker name="import"/>
+ </menu>
+ </objectContribution>
+ <objectContribution id="org.eclipse.m2e.core.projectMenu.newModuleProject"
+ objectClass="org.eclipse.core.resources.IProject"
+ adaptable="true">
+ <action id="org.eclipse.m2e.actions.moduleProjectWizardAction"
+ class="org.eclipse.m2e.core.ui.internal.actions.ModuleProjectWizardAction"
+ label="%m2.popup.ModuleProjectWizardAction"
+ style="push"
+ menubarPath="org.eclipse.m2e.core.mavenMenu/new"
+ enablesFor="1"/>
+ <visibility>
+ <and>
+ <objectState name="open" value="true"/>
+ <objectState name="nature" value="org.eclipse.m2e.core.maven2Nature"/>
+ </and>
+ </visibility>
+ </objectContribution>
+ <objectContribution id="org.eclipse.m2e.core.projectMenu.addDependencyPlugin"
+ objectClass="org.eclipse.core.resources.IProject"
+ adaptable="true">
+ <action id="org.eclipse.m2e.addPluginAction"
+ class="org.eclipse.m2e.core.ui.internal.actions.AddPluginAction"
+ label="%m2.popup.AddPluginAction"
+ style="push"
+ menubarPath="org.eclipse.m2e.core.mavenMenu/new"
+ enablesFor="1"/>
+ <action id="org.eclipse.m2e.addDependencyAction"
+ class="org.eclipse.m2e.core.ui.internal.actions.AddDependencyAction"
+ label="%m2.popup.AddDependencyAction"
+ style="push"
+ menubarPath="org.eclipse.m2e.core.mavenMenu/new"
+ enablesFor="1"/>
+ <visibility>
+ <and>
+ <objectState name="open" value="true"/>
+ <objectState name="nature" value="org.eclipse.m2e.core.maven2Nature"/>
+ </and>
+ </visibility>
+ </objectContribution>
+ <objectContribution id="org.eclipse.m2e.updateConfigurationAction"
+ objectClass="org.eclipse.core.resources.IProject"
+ adaptable="true">
+ <action id="org.eclipse.m2e.updateConfigurationAction"
+ class="org.eclipse.m2e.core.ui.internal.actions.UpdateConfigurationAction"
+ label="%m2.popup.UpdateConfigurationAction"
+ style="push"
+ menubarPath="org.eclipse.m2e.core.mavenMenu/update"
+ enablesFor="+"/>
+ <visibility>
+ <and>
+ <objectState name="open" value="true"/>
+ <objectState name="nature" value="org.eclipse.m2e.core.maven2Nature"/>
+ </and>
+ </visibility>
+ </objectContribution>
+
+ <objectContribution id="org.eclipse.m2e.refreshMavenModelsAction"
+ objectClass="org.eclipse.core.resources.IProject"
+ adaptable="true">
+ <action id="org.eclipse.m2e.refreshMavenModelsAction"
+ class="org.eclipse.m2e.core.ui.internal.actions.RefreshMavenModelsAction"
+ label="%m2.popup.RefreshMavenModelsAction"
+ style="push"
+ menubarPath="org.eclipse.m2e.core.mavenMenu/update"
+ enablesFor="+"/>
+ <action id="org.eclipse.m2e.refreshMavenSnapshotsAction"
+ class="org.eclipse.m2e.core.ui.internal.actions.RefreshMavenModelsAction:snapshots"
+ label="%m2.popup.RefreshMavenModelsAction.snapshots"
+ style="push"
+ menubarPath="org.eclipse.m2e.core.mavenMenu/update"
+ enablesFor="+">
+ </action>
+ <visibility>
+ <and>
+ <objectState name="open" value="true"/>
+ <objectState name="nature" value="org.eclipse.m2e.core.maven2Nature"/>
+ </and>
+ </visibility>
+ </objectContribution>
+ <objectContribution id="org.eclipse.m2e.openCiPage"
+ objectClass="org.eclipse.core.resources.IProject"
+ adaptable="true">
+ <action id="org.eclipse.m2e.openCiPage"
+ class="org.eclipse.m2e.core.ui.internal.actions.OpenUrlAction:org.eclipse.m2e.openCiPage"
+ label="%m2.popup.OpenUrlAction.openCiPage"
+ style="push"
+ menubarPath="org.eclipse.m2e.core.mavenMenu/open"
+ enablesFor="+"/>
+ <visibility>
+ <and>
+ <objectState name="open" value="true"/>
+ <objectState name="nature" value="org.eclipse.m2e.core.maven2Nature"/>
+ </and>
+ </visibility>
+ </objectContribution>
+ <objectContribution id="org.eclipse.m2e.openScmPage"
+ objectClass="org.eclipse.core.resources.IProject"
+ adaptable="true">
+ <action id="org.eclipse.m2e.openScmPage"
+ class="org.eclipse.m2e.core.ui.internal.actions.OpenUrlAction:org.eclipse.m2e.openScmPage"
+ label="%m2.popup.OpenUrlAction.openScmPage"
+ style="push"
+ menubarPath="org.eclipse.m2e.core.mavenMenu/open"
+ enablesFor="+"/>
+ <visibility>
+ <and>
+ <objectState name="open" value="true"/>
+ <objectState name="nature" value="org.eclipse.m2e.core.maven2Nature"/>
+ </and>
+ </visibility>
+ </objectContribution>
+ <objectContribution id="org.eclipse.m2e.openIssuesPage"
+ objectClass="org.eclipse.core.resources.IProject"
+ adaptable="true">
+ <action id="org.eclipse.m2e.openIssuesPage"
+ class="org.eclipse.m2e.core.ui.internal.actions.OpenUrlAction:org.eclipse.m2e.openIssuesPage"
+ label="%m2.popup.OpenUrlAction.openIssuesPage"
+ style="push"
+ menubarPath="org.eclipse.m2e.core.mavenMenu/open"
+ enablesFor="+"/>
+ <visibility>
+ <and>
+ <objectState name="open" value="true"/>
+ <objectState name="nature" value="org.eclipse.m2e.core.maven2Nature"/>
+ </and>
+ </visibility>
+ </objectContribution>
+ <objectContribution id="org.eclipse.m2e.openProjectPage"
+ objectClass="org.eclipse.core.resources.IProject"
+ adaptable="true">
+ <action id="org.eclipse.m2e.openProjectPage"
+ class="org.eclipse.m2e.core.ui.internal.actions.OpenUrlAction:org.eclipse.m2e.openProjectPage"
+ label="%m2.popup.OpenUrlAction.openProjectPage"
+ style="push"
+ menubarPath="org.eclipse.m2e.core.mavenMenu/open"
+ enablesFor="+"/>
+ <visibility>
+ <and>
+ <objectState name="open" value="true"/>
+ <objectState name="nature" value="org.eclipse.m2e.core.maven2Nature"/>
+ </and>
+ </visibility>
+ </objectContribution>
+ <objectContribution id="org.eclipse.m2e.openPomAction"
+ objectClass="org.eclipse.core.resources.IProject"
+ adaptable="true">
+ <action id="org.eclipse.m2e.openPomAction"
+ class="org.eclipse.m2e.core.ui.internal.actions.OpenPomAction"
+ label="%m2.popup.OpenPomAction"
+ style="push"
+ menubarPath="org.eclipse.m2e.core.mavenMenu/open"
+ enablesFor="+"/>
+ <visibility>
+ <and>
+ <objectState name="open" value="true"/>
+ <objectState name="nature" value="org.eclipse.m2e.core.maven2Nature"/>
+ </and>
+ </visibility>
+ </objectContribution>
+
+ <objectContribution id="org.eclipse.m2e.disableAction"
+ objectClass="org.eclipse.core.resources.IProject"
+ adaptable="true">
+ <action id="org.eclipse.m2e.disableAction"
+ class="org.eclipse.m2e.core.ui.internal.actions.DisableNatureAction"
+ label="%m2.popup.DisableNatureAction"
+ style="push"
+ menubarPath="org.eclipse.m2e.core.mavenMenu/nature"
+ enablesFor="+"/>
+ <visibility>
+ <and>
+ <objectState name="open" value="true"/>
+ <objectState name="nature" value="org.eclipse.m2e.core.maven2Nature"/>
+ </and>
+ </visibility>
+ </objectContribution>
+
+
+
+
+
+ <!--
+ NOW WE HAVE POMFILE MENU CONTRIBUTIONS
+ -->
+ <objectContribution id="org.eclipse.m2e.core.fileMenu"
+ objectClass="org.eclipse.core.resources.IFile"
+ adaptable="true">
+ <menu
+ id="org.eclipse.m2e.core.fileMenu"
+ path="additions"
+ label="%m2.popup.project.label">
+ <groupMarker name="new"/>
+ <separator name="org.eclipse.m2e.core.separator1"/>
+ <groupMarker name="update"/>
+ <separator name="org.eclipse.m2e.core.separator2"/>
+ <groupMarker name="open"/>
+ <separator name="org.eclipse.m2e.core.separator3"/>
+ <groupMarker name="nature"/>
+ <separator name="org.eclipse.m2e.core.separator4"/>
+ <groupMarker name="import"/>
+ </menu>
+ <visibility>
+ <objectState name="name" value="pom.xml"/>
+ </visibility>
+ </objectContribution>
+
+ <objectContribution id="org.eclipse.m2e.core.fileMenu.newModuleProject"
+ objectClass="org.eclipse.core.resources.IFile"
+ adaptable="true">
+ <action id="org.eclipse.m2e.actions.moduleProjectWizardAction"
+ class="org.eclipse.m2e.core.ui.internal.actions.ModuleProjectWizardAction"
+ label="%m2.popup.ModuleProjectWizardAction"
+ style="push"
+ menubarPath="org.eclipse.m2e.core.fileMenu/new"
+ enablesFor="1"/>
+ <visibility>
+ <objectState name="name" value="pom.xml"/>
+ </visibility>
+ </objectContribution>
+ <objectContribution id="org.eclipse.m2e.core.fileMenu.addDependencyPlugin"
+ objectClass="org.eclipse.core.resources.IFile"
+ adaptable="true">
+ <action id="org.eclipse.m2e.addPluginAction"
+ class="org.eclipse.m2e.core.ui.internal.actions.AddPluginAction"
+ label="%m2.popup.AddPluginAction"
+ style="push"
+ menubarPath="org.eclipse.m2e.core.fileMenu/new"
+ enablesFor="1"/>
+ <action id="org.eclipse.m2e.addDependencyAction"
+ class="org.eclipse.m2e.core.ui.internal.actions.AddDependencyAction"
+ label="%m2.popup.AddDependencyAction"
+ style="push"
+ menubarPath="org.eclipse.m2e.core.fileMenu/new"
+ enablesFor="1"/>
+ <visibility>
+ <objectState name="name" value="pom.xml"/>
+ </visibility>
+ </objectContribution>
+
+ <objectContribution id="org.eclipse.m2e.fileMenu.openCiPage"
+ objectClass="org.eclipse.core.resources.IFile"
+ adaptable="true">
+ <action id="org.eclipse.m2e.openCiPage"
+ class="org.eclipse.m2e.core.ui.internal.actions.OpenUrlAction:org.eclipse.m2e.openCiPage"
+ label="%m2.popup.OpenUrlAction.openCiPage"
+ style="push"
+ menubarPath="org.eclipse.m2e.core.fileMenu/open"
+ enablesFor="+"/>
+ <visibility>
+ <objectState name="name" value="pom.xml"/>
+ </visibility>
+ </objectContribution>
+ <objectContribution id="org.eclipse.m2e.fileMenu.openScmPage"
+ objectClass="org.eclipse.core.resources.IFile"
+ adaptable="true">
+ <action id="org.eclipse.m2e.openScmPage"
+ class="org.eclipse.m2e.core.ui.internal.actions.OpenUrlAction:org.eclipse.m2e.openScmPage"
+ label="%m2.popup.OpenUrlAction.openScmPage"
+ style="push"
+ menubarPath="org.eclipse.m2e.core.fileMenu/open"
+ enablesFor="+"/>
+ <visibility>
+ <objectState name="name" value="pom.xml"/>
+ </visibility>
+ </objectContribution>
+ <objectContribution id="org.eclipse.m2e.fileMenu.openIssuesPage"
+ objectClass="org.eclipse.core.resources.IFile"
+ adaptable="true">
+ <action id="org.eclipse.m2e.openIssuesPage"
+ class="org.eclipse.m2e.core.ui.internal.actions.OpenUrlAction:org.eclipse.m2e.openIssuesPage"
+ label="%m2.popup.OpenUrlAction.openIssuesPage"
+ style="push"
+ menubarPath="org.eclipse.m2e.core.fileMenu/open"
+ enablesFor="+"/>
+ <visibility>
+ <objectState name="name" value="pom.xml"/>
+ </visibility>
+ </objectContribution>
+ <objectContribution id="org.eclipse.m2e.fileMenu.openProjectPage"
+ objectClass="org.eclipse.core.resources.IFile"
+ adaptable="true">
+ <action id="org.eclipse.m2e.openProjectPage"
+ class="org.eclipse.m2e.core.ui.internal.actions.OpenUrlAction:org.eclipse.m2e.openProjectPage"
+ label="%m2.popup.OpenUrlAction.openProjectPage"
+ style="push"
+ menubarPath="org.eclipse.m2e.core.fileMenu/open"
+ enablesFor="+"/>
+ <visibility>
+ <objectState name="name" value="pom.xml"/>
+ </visibility>
+ </objectContribution>
+
+ <objectContribution id="org.eclipse.m2e.fileMenu.openPomAction"
+ objectClass="org.eclipse.core.resources.IFile"
+ adaptable="true">
+ <action id="org.eclipse.m2e.openPomAction"
+ class="org.eclipse.m2e.core.ui.internal.actions.OpenPomAction"
+ label="%m2.popup.OpenPomAction"
+ style="push"
+ menubarPath="org.eclipse.m2e.core.fileMenu/open"
+ enablesFor="+"/>
+ <visibility>
+ <objectState name="name" value="pom.xml"/>
+ </visibility>
+ </objectContribution>
+
+
+ <!-- MNGECLIPSE-2564 -for *not* maven project, add the Convert to Maven Project action -->
+
+ <objectContribution id="org.eclipse.m2e.enableNatureAction"
+ objectClass="org.eclipse.core.resources.IProject"
+ adaptable="true">
+ <action id="org.eclipse.m2e.enableNatureAction"
+ class="org.eclipse.m2e.core.ui.internal.actions.EnableNatureAction"
+ label="%convert.to.maven.name"
+ style="push"
+ menubarPath="org.eclipse.ui.projectConfigure/additions"
+ enablesFor="+"/>
+ <visibility>
+ <and>
+ <objectState name="open" value="true"/>
+ <not>
+ <objectState name="nature" value="org.eclipse.m2e.core.maven2Nature"/>
+ </not>
+ </and>
+ </visibility>
+ </objectContribution>
+
+ <!--
+ NOW WE HAVE WORKING SET MENU CONTRIBUTIONS
+ -->
+ <objectContribution id="org.eclipse.m2e.core.workingSetMenu"
+ adaptable="true"
+ objectClass="org.eclipse.ui.IWorkingSet">
+ <menu
+ id="org.eclipse.m2e.core.workingSetMenu"
+ path="additions"
+ label="%m2.popup.project.label">
+ <groupMarker name="new"/>
+ <separator name="org.eclipse.m2e.core.separator1"/>
+ <groupMarker name="update"/>
+ <separator name="org.eclipse.m2e.core.separator2"/>
+ <groupMarker name="open"/>
+ <separator name="org.eclipse.m2e.core.separator3"/>
+ <groupMarker name="nature"/>
+ <separator name="org.eclipse.m2e.core.separator4"/>
+ <groupMarker name="import"/>
+ </menu>
+ </objectContribution>
+
+ <objectContribution id="org.eclipse.m2e.workingSet.updateConfigurationAction"
+ adaptable="true"
+ objectClass="org.eclipse.ui.IWorkingSet">
+ <action id="org.eclipse.m2e.updateConfigurationAction"
+ class="org.eclipse.m2e.core.ui.internal.actions.UpdateConfigurationAction"
+ label="%m2.popup.UpdateConfigurationAction"
+ style="push"
+ menubarPath="org.eclipse.m2e.core.workingSetMenu/update"
+ enablesFor="+"/>
+ </objectContribution>
+
+ <objectContribution id="org.eclipse.m2e.workingSet.refreshMavenModelsAction"
+ adaptable="true"
+ objectClass="org.eclipse.ui.IWorkingSet">
+ <action id="org.eclipse.m2e.refreshMavenModelsAction"
+ class="org.eclipse.m2e.core.ui.internal.actions.RefreshMavenModelsAction"
+ label="%m2.popup.RefreshMavenModelsAction"
+ style="push"
+ menubarPath="org.eclipse.m2e.core.workingSetMenu/update"
+ enablesFor="+"/>
+ <action id="org.eclipse.m2e.refreshMavenSnapshotsAction"
+ class="org.eclipse.m2e.core.ui.internal.actions.RefreshMavenModelsAction:snapshots"
+ label="%m2.popup.RefreshMavenModelsAction.snapshots"
+ style="push"
+ menubarPath="org.eclipse.m2e.core.workingSetMenu/update"
+ enablesFor="+">
+ </action>
+ </objectContribution>
+
+
+ <objectContribution id="org.eclipse.m2e.core.scmUrl"
+ objectClass="org.eclipse.m2e.core.scm.ScmUrl"
+ adaptable="true">
+ <action id="org.eclipse.m2e.core.ui.checkoutAsMaven"
+ label="%checkoutaction.label"
+ class="org.eclipse.m2e.core.ui.internal.actions.CheckoutAsMavenAction"
+ menubarPath="checkoutGroup"/>
+ </objectContribution>
+
+ <objectContribution id="org.eclipse.m2e.core.openPomArtifact"
+ objectClass="org.apache.maven.artifact.Artifact"
+ adaptable="false">
+ <action id="org.eclipse.m2e.core.ui.openPomArtifact"
+ class="org.eclipse.m2e.core.ui.internal.actions.OpenPomAction"
+ label="%openpomaction.label"
+ enablesFor="1"/>
+ </objectContribution>
+ <objectContribution id="org.eclipse.m2e.core.openAetherPomDependencyNode"
+ objectClass="org.sonatype.aether.graph.DependencyNode"
+ adaptable="false">
+ <action id="org.eclipse.m2e.core.ui.openPomDependency"
+ class="org.eclipse.m2e.core.ui.internal.actions.OpenPomAction"
+ label="%openpomaction.label3"
+ enablesFor="1"/>
+ </objectContribution>
+ <objectContribution id="org.eclipse.m2e.core.openPomDependency"
+ objectClass="org.eclipse.m2e.model.edit.pom.Dependency"
+ adaptable="false">
+ <action id="org.eclipse.m2e.core.ui.openPomDependency"
+ class="org.eclipse.m2e.core.ui.internal.actions.OpenPomAction"
+ label="%openpomaction.label4"
+ enablesFor="1"/>
+ </objectContribution>
+
+ <objectContribution id="org.eclipse.m2e.core.openProjectPageArtifact"
+ objectClass="org.apache.maven.artifact.Artifact"
+ adaptable="false">
+ <action id="org.eclipse.m2e.core.ui.openPomArtifactUrl"
+ class="org.eclipse.m2e.core.ui.internal.actions.OpenUrlAction:org.eclipse.m2e.core.openProjectPage"
+ label="%openprojectaction.label"
+ enablesFor="1"/>
+ </objectContribution>
+ <objectContribution id="org.eclipse.m2e.core.openAetherProjectPageDependencyNode"
+ objectClass="org.sonatype.aether.graph.DependencyNode"
+ adaptable="false">
+ <action id="org.eclipse.m2e.core.ui.openPomDependencyUrl"
+ class="org.eclipse.m2e.core.ui.internal.actions.OpenUrlAction:org.eclipse.m2e.core.openProjectPage"
+ label="%openprojectaction.label3"
+ enablesFor="1"/>
+ </objectContribution>
+ <objectContribution id="org.eclipse.m2e.core.openopenProjectPageDependency"
+ objectClass="org.eclipse.m2e.model.edit.pom.Dependency"
+ adaptable="false">
+ <action id="org.eclipse.m2e.core.ui.openPomArtifactUrl"
+ class="org.eclipse.m2e.core.ui.internal.actions.OpenUrlAction:org.eclipse.m2e.core.openProjectPage"
+ label="%openprojectaction.label4"
+ enablesFor="1"/>
+ </objectContribution>
+
+ </extension>
+
+ <extension point="org.eclipse.ui.popupMenus">
+ <objectContribution id="org.eclipse.m2e.disableWorkspaceResolutionAction"
+ objectClass="org.eclipse.core.resources.IProject"
+ adaptable="true">
+ <action id="org.eclipse.m2e.disableWorkspaceResolutionAction"
+ class="org.eclipse.m2e.core.ui.internal.actions.ChangeNatureAction:disableWorkspaceResolution"
+ label="%m2.popup.ChangeNatureAction.disableWorkspaceResolution"
+ style="push"
+ menubarPath="org.eclipse.m2e.core.mavenMenu/nature"
+ enablesFor="1"/> <!-- is it really 1 or + -->
+ <visibility>
+ <and>
+ <objectState name="open" value="true"/>
+ <objectState name="nature" value="org.eclipse.m2e.core.maven2Nature"/>
+ </and>
+ </visibility>
+ <enablement>
+ <not>
+ <test property="org.eclipse.m2e.workspaceResulutionEnable"/>
+ </not>
+ </enablement>
+ </objectContribution>
+ <objectContribution id="org.eclipse.m2e.enableWorkspaceResolutionAction"
+ objectClass="org.eclipse.core.resources.IProject"
+ adaptable="true">
+ <action id="org.eclipse.m2e.enableWorkspaceResolutionAction"
+ class="org.eclipse.m2e.core.ui.internal.actions.ChangeNatureAction:enableWorkspaceResolution"
+ label="%m2.popup.ChangeNatureAction.enableWorkspaceResolution"
+ style="push"
+ menubarPath="org.eclipse.m2e.core.mavenMenu/nature"
+ enablesFor="1"/> <!-- is it really 1 or + -->
+ <visibility>
+ <and>
+ <objectState name="open" value="true"/>
+ <objectState name="nature" value="org.eclipse.m2e.core.maven2Nature"/>
+ </and>
+ </visibility>
+ <enablement>
+ <test property="org.eclipse.m2e.workspaceResulutionEnable"/>
+ </enablement>
+ </objectContribution>
+ </extension>
+
+ <extension point="org.eclipse.core.expressions.propertyTesters">
+ <propertyTester
+ id="org.eclipse.m2e.core.MavenPropertyTester"
+ class="org.eclipse.m2e.core.ui.internal.actions.MavenPropertyTester"
+ namespace="org.eclipse.m2e"
+ properties="launchable,workspaceResulutionEnable,hasArtifactKey,hasProjectArtifactKey"
+ type="org.eclipse.core.runtime.IAdaptable"/>
+ </extension>
+
+ <extension point="org.eclipse.ui.commands">
+ <command id="org.eclipse.m2e.core.ui.command.openPom"
+ categoryId="org.eclipse.ui.category.navigate"
+ name="%m2.shortcut.open.pom"/>
+ <command
+ categoryId="org.eclipse.ui.category.edit"
+ description="%command.adddependency.description"
+ id="org.eclipse.m2e.core.ui.command.addDependency"
+ name="%m2.shortcut.addDependency">
+ </command>
+ <command
+ categoryId="org.eclipse.ui.category.edit"
+ description="%command.addplugin.description"
+ id="org.eclipse.m2e.core.ui.command.addPlugin"
+ name="%m2.shortcut.addPlugin">
+ </command>
+ </extension>
+
+ <extension point="org.eclipse.ui.keywords">
+ <keyword id="org.eclipse.m2e.core.maven" label="%keyword.label"/>
+ </extension>
+
+ <extension point="org.eclipse.ui.preferencePages">
+ <page id="org.eclipse.m2e.core.preferences.Maven2PreferencePage"
+ class="org.eclipse.m2e.core.ui.internal.preferences.MavenPreferencePage"
+ name="%m2.preferences.page.name">
+ <keywordReference id="org.eclipse.m2e.core.maven"/>
+ </page>
+ <page id="org.eclipse.m2e.core.preferences.MavenInstallationsPreferencePage"
+ category="org.eclipse.m2e.core.preferences.Maven2PreferencePage"
+ class="org.eclipse.m2e.core.ui.internal.preferences.MavenInstallationsPreferencePage"
+ name="%page.installations.name">
+ <keywordReference id="org.eclipse.m2e.core.maven"/>
+ </page>
+ <page id="org.eclipse.m2e.core.preferences.MavenSettingsPreferencePage"
+ category="org.eclipse.m2e.core.preferences.Maven2PreferencePage"
+ class="org.eclipse.m2e.core.ui.internal.preferences.MavenSettingsPreferencePage"
+ name="%page.usersettings.name">
+ <keywordReference id="org.eclipse.m2e.core.maven"/>
+ </page>
+ <page id="org.eclipse.m2e.core.preferences.MavenArchetypesPreferencePage"
+ category="org.eclipse.m2e.core.preferences.Maven2PreferencePage"
+ class="org.eclipse.m2e.core.ui.internal.preferences.MavenArchetypesPreferencePage"
+ name="%page.archetypes.name">
+ <keywordReference id="org.eclipse.m2e.core.maven"/>
+ </page>
+ </extension>
+
+ <extension point="org.eclipse.ui.newWizards">
+ <category id="org.eclipse.m2e" name="%m2.wizard.name"/>
+
+ <wizard id="org.eclipse.m2e.core.wizards.Maven2PomWizard"
+ category="org.eclipse.m2e"
+ class="org.eclipse.m2e.core.ui.internal.wizards.MavenPomWizard"
+ icon="icons/new_m2_pom.gif"
+ name="%m2.wizard.pom.name">
+ <selection class="org.eclipse.core.resources.IProject"/>
+ <selection class="org.eclipse.core.resources.IResource"/>
+ </wizard>
+
+ <wizard id="org.eclipse.m2e.core.wizards.Maven2ProjectWizard"
+ category="org.eclipse.m2e"
+ class="org.eclipse.m2e.core.ui.internal.wizards.MavenProjectWizard"
+ icon="icons/new_m2_project.gif"
+ name="%m2.wizard.project.name"
+ project="true">
+ <description>%m2.wizard.project.description</description>
+ </wizard>
+
+ <wizard id="org.eclipse.m2e.core.wizards.Maven2ModuleWizard"
+ category="org.eclipse.m2e"
+ class="org.eclipse.m2e.core.ui.internal.wizards.MavenModuleWizard"
+ icon="icons/new_m2_project.gif"
+ name="%m2.wizard.module.name"
+ project="true">
+ <description>%m2.wizard.module.description</description>
+ </wizard>
+
+ <wizard id="org.eclipse.m2e.core.wizards.MavenCheckoutWizard"
+ name="%wizard.checkout.name"
+ class="org.eclipse.m2e.core.ui.internal.wizards.MavenCheckoutWizard"
+ category="org.eclipse.m2e"
+ icon="icons/import_m2_project.gif" project="true">
+ <description>%wizard.checkout.description</description>
+ <!--
+ <selection class="org.tigris.subversion.subclipse.core.ISVNRemoteFolder"/>
+ -->
+ </wizard>
+ </extension>
+
+ <extension point="org.eclipse.ui.importWizards">
+ <category id="org.eclipse.ui.Basic" name="%category.general.name"/>
+ <category id="org.eclipse.m2e" name="%m2.wizard.name"/>
+
+ <wizard id="org.eclipse.m2e.core.wizards.MavenPomCheckoutWizard"
+ class="org.eclipse.m2e.core.ui.internal.wizards.MavenMaterializePomWizard"
+ category="org.eclipse.m2e"
+ name="%m2.wizard.materialize.name"
+ icon="icons/import_m2_project.gif">
+ <description>%m2.wizard.materialize.description</description>
+ </wizard>
+
+ <wizard id="org.eclipse.m2e.core.wizards.MavenCheckoutWizard"
+ class="org.eclipse.m2e.core.ui.internal.wizards.MavenCheckoutWizard"
+ category="org.eclipse.m2e"
+ name="%wizard.checkout2.name"
+ icon="icons/import_m2_project.gif">
+ <description>%wizard.checkout2.description</description>
+ <!--
+ <selection class="org.tigris.subversion.subclipse.core.ISVNRemoteFolder"/>
+ -->
+ </wizard>
+
+ <wizard id="org.eclipse.m2e.core.wizards.MavenInstallFileWizard"
+ class="org.eclipse.m2e.core.ui.internal.wizards.MavenInstallFileWizard"
+ category="org.eclipse.m2e"
+ icon="icons/import_jar.gif"
+ name="%wizard.install.name">
+ <selection class="org.eclipse.core.resources.IFile" name="*.jar"/>
+ <description>%wizard.install.description</description>
+ </wizard>
+
+ <wizard id="org.eclipse.m2e.core.wizards.Maven2ImportWizard"
+ class="org.eclipse.m2e.core.ui.internal.wizards.MavenImportWizard"
+ icon="icons/import_m2_project.gif"
+ category="org.eclipse.m2e"
+ name="%m2.wizard.import.name">
+ <description>%m2.wizard.import.description</description>
+ </wizard>
+
+ </extension>
+
+ <extension point="org.eclipse.ui.console.consoleFactories">
+ <consoleFactory label="%consoleFactory.label" icon="icons/m2.gif"
+ class="org.eclipse.m2e.core.ui.internal.MavenConsoleFactory"/>
+ </extension>
+
+ <extension point="org.eclipse.ui.console.consolePageParticipants">
+ <consolePageParticipant
+ class="org.eclipse.m2e.core.ui.internal.MavenConsolePageParticipant"
+ id="org.eclipse.m2e.core.launch.console.Maven2ConsolePageParticipant">
+ <enablement>
+ <instanceof value="org.eclipse.m2e.core.internal.console.MavenConsoleImpl"/>
+ </enablement>
+ </consolePageParticipant>
+ </extension>
+
+ <extension point="org.eclipse.ui.actionSets">
+ <actionSet id="org.eclipse.m2e.core.ui.navigation"
+ label="%actionSet.navigation.label" visible="true">
+ <action
+ class="org.eclipse.m2e.core.ui.internal.actions.OpenPomAction:artifact"
+ definitionId="org.eclipse.m2e.core.ui.command.openPom"
+ icon="icons/open_pom.gif"
+ id="org.eclipse.m2e.core.ui.open.pom"
+ label="%action.openpom.label"
+ menubarPath="navigate/open.ext"
+ style="push"
+ tooltip="%action.openpom.tooltip"/>
+ <action
+ class="org.eclipse.m2e.core.ui.internal.actions.RefreshMavenModelsAction"
+ icon="icons/update_dependencies.gif"
+ id="org.eclipse.m2e.core.ui.internal.actions.RefreshModels"
+ label="%action.updatedeps.label"
+ menubarPath="project/additions"
+ tooltip="%action.updatedeps.tooltip">
+ </action>
+ </actionSet>
+
+ <actionSet
+ id="org.eclipse.m2e.core.actions.maven"
+ label="%actionSet.maven.label"
+ visible="true">
+ <action
+ class="org.eclipse.m2e.core.ui.internal.actions.AddDependencyAction"
+ definitionId="org.eclipse.m2e.core.ui.command.addDependency"
+ icon="icons/open_pom.gif"
+ id="org.eclipse.m2e.core.actions.add.dependency"
+ label="%action.adddep.label"
+ menubarPath="navigate/open.ext"
+ style="push"
+ tooltip="%action.adddep.tooltip">
+ </action>
+ <action
+ class="org.eclipse.m2e.core.ui.internal.actions.AddPluginAction"
+ definitionId="org.eclipse.m2e.core.ui.command.addPlugin"
+ id="org.eclipse.m2e.core.actions.add.plugin"
+ label="%action.addplugin.label"
+ style="push"
+ tooltip="%action.add.plugin.tooltip">
+ </action>
+ </actionSet>
+ </extension>
+
+ <extension point="org.eclipse.ui.views">
+ <category id="org.eclipse.m2e.core.views.repositories"
+ name="%category.maven.name"/>
+ <view id="org.eclipse.m2e.core.views.MavenRepositoryView"
+ category="org.eclipse.m2e.core.views.repositories"
+ class="org.eclipse.m2e.core.ui.internal.views.MavenRepositoryView"
+ icon="icons/maven_indexes.gif"
+ name="%view.repos.name"/>
+ </extension>
+
+ <extension point="org.eclipse.ui.propertyPages">
+ <page id="org.eclipse.m2e.core.MavenProjectPreferencePage"
+ class="org.eclipse.m2e.core.ui.internal.preferences.MavenProjectPreferencePage"
+ name="%page.maven.name"
+ objectClass="org.eclipse.core.resources.IProject"
+ adaptable="true">
+ <filter name="nature" value="org.eclipse.m2e.core.maven2Nature"/>
+ </page>
+ <page id="org.eclipse.m2e.core.MavenProjectLifecycleMappingPage"
+ class="org.eclipse.m2e.core.ui.internal.preferences.MavenProjectLifecycleMappingPage"
+ name="%page.mappings.name"
+ category="org.eclipse.m2e.core.MavenProjectPreferencePage"
+ objectClass="org.eclipse.core.resources.IProject"
+ adaptable="true">
+ <filter name="nature" value="org.eclipse.m2e.core.maven2Nature"/>
+ </page>
+ </extension>
+
+ <extension
+ point="org.eclipse.m2e.core.ui.lifecycleMappingPropertyPage">
+ <lifecycleMappingPropertyPage
+ class="org.eclipse.m2e.core.ui.internal.preferences.EmptyLifecycleMappingPropertyPage"
+ id = "emptyPropertyPage"
+ lifecycleMappingId = "NULL"
+ name = "Empty Lifecycle Mapping">
+ </lifecycleMappingPropertyPage>
+ <lifecycleMappingPropertyPage
+ class="org.eclipse.m2e.core.ui.internal.preferences.CustomizableLifecycleMappingPropertyPage"
+ id = "customizablePropertyPage"
+ lifecycleMappingId = "customizable"
+ name = "Customizable Lifecycle Mapping">
+ </lifecycleMappingPropertyPage>
+ <lifecycleMappingPropertyPage
+ class="org.eclipse.m2e.core.ui.internal.preferences.MissingLifecycleMappingPropertyPage"
+ id="missingLifecycleMappingPropertyPage"
+ lifecycleMappingId="MISSING"
+ name="Missing Lifecycle Mapping">
+ </lifecycleMappingPropertyPage>
+ </extension>
+
+ <extension point="org.eclipse.ui.bindings">
+ <key
+ commandId="org.eclipse.m2e.core.ui.command.addDependency"
+ contextId="org.eclipse.core.runtime.xml"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="Ctrl+Shift+D">
+ </key>
+ <key
+ commandId="org.eclipse.m2e.core.ui.command.addPlugin"
+ contextId="org.eclipse.core.runtime.xml"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="Ctrl+Shift+P">
+ </key>
+ </extension>
+
+</plugin>
diff --git a/org.eclipse.m2e.core.ui/pom.xml b/org.eclipse.m2e.core.ui/pom.xml
new file mode 100644
index 00000000..5df6e92e
--- /dev/null
+++ b/org.eclipse.m2e.core.ui/pom.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (c) 2008 Sonatype, Inc. All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ and is available at http://www.eclipse.org/legal/epl-v10.html -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.m2e</groupId>
+ <artifactId>org.eclipse.m2e.parent</artifactId>
+ <version>0.13.0-SNAPSHOT</version>
+ <relativePath>../org.eclipse.m2e.parent</relativePath>
+ </parent>
+
+ <artifactId>org.eclipse.m2e.core.ui</artifactId>
+ <packaging>eclipse-plugin</packaging>
+
+ <build>
+ <sourceDirectory>src</sourceDirectory>
+
+ <resources>
+ <resource>
+ <directory>${basedir}/src</directory>
+ <includes>
+ <include>**/*.properties</include>
+ </includes>
+ </resource>
+ </resources>
+
+ </build>
+</project>
diff --git a/org.eclipse.m2e.core/schema/lifecycleMappingPropertyPage.exsd b/org.eclipse.m2e.core.ui/schema/lifecycleMappingPropertyPage.exsd
index 83c13887..83c13887 100644
--- a/org.eclipse.m2e.core/schema/lifecycleMappingPropertyPage.exsd
+++ b/org.eclipse.m2e.core.ui/schema/lifecycleMappingPropertyPage.exsd
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/console/ConsoleDocument.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/internal/console/ConsoleDocument.java
index 77ccfa1b..77ccfa1b 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/console/ConsoleDocument.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/internal/console/ConsoleDocument.java
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/core/IMavenConsoleListener.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/internal/console/IMavenConsoleListener.java
index 1d1a7b93..a1817882 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/core/IMavenConsoleListener.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/internal/console/IMavenConsoleListener.java
@@ -9,7 +9,7 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.core;
+package org.eclipse.m2e.core.internal.console;
import java.util.EventListener;
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/MavenConsoleFactory.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/internal/console/MavenConsoleFactory.java
index 29b62508..1a491e99 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/MavenConsoleFactory.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/internal/console/MavenConsoleFactory.java
@@ -9,12 +9,11 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.ui.internal;
+package org.eclipse.m2e.core.internal.console;
+import org.eclipse.m2e.core.ui.internal.M2EUIPluginActivator;
import org.eclipse.ui.console.IConsoleFactory;
-import org.eclipse.m2e.core.MavenPlugin;
-
/**
* Maven Console factory is used to show the console from the "Open Console"
* drop-down action in Console view.
@@ -26,7 +25,7 @@ import org.eclipse.m2e.core.MavenPlugin;
public class MavenConsoleFactory implements IConsoleFactory {
public void openConsole() {
- MavenPlugin.getDefault().getConsole().showConsole();
+ M2EUIPluginActivator.getDefault().getMavenConsoleImpl().showConsole();
}
}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/console/MavenConsoleImpl.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/internal/console/MavenConsoleImpl.java
index 0b28a509..ef200552 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/console/MavenConsoleImpl.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/internal/console/MavenConsoleImpl.java
@@ -16,13 +16,14 @@ import java.util.Date;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
-import com.ibm.icu.text.DateFormat;
-import com.ibm.icu.util.ULocale;
-
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.m2e.core.core.MavenLogger;
+import org.eclipse.m2e.core.internal.Messages;
+import org.eclipse.m2e.core.internal.preferences.MavenPreferenceConstants;
+import org.eclipse.m2e.core.ui.internal.M2EUIPluginActivator;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.widgets.Display;
@@ -34,12 +35,8 @@ import org.eclipse.ui.console.IConsoleManager;
import org.eclipse.ui.console.IOConsole;
import org.eclipse.ui.console.IOConsoleOutputStream;
-import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.core.IMavenConsoleListener;
-import org.eclipse.m2e.core.core.MavenConsole;
-import org.eclipse.m2e.core.core.MavenLogger;
-import org.eclipse.m2e.core.internal.Messages;
-import org.eclipse.m2e.core.internal.preferences.MavenPreferenceConstants;
+import com.ibm.icu.text.DateFormat;
+import com.ibm.icu.util.ULocale;
/**
@@ -47,7 +44,7 @@ import org.eclipse.m2e.core.internal.preferences.MavenPreferenceConstants;
*
* @author Dmitri Maximovich
*/
-public class MavenConsoleImpl extends IOConsole implements MavenConsole, IPropertyChangeListener {
+public class MavenConsoleImpl extends IOConsole implements IPropertyChangeListener {
private boolean initialized = false;
@@ -279,11 +276,11 @@ public class MavenConsoleImpl extends IOConsole implements MavenConsole, IProper
}
public boolean showConsoleOnError(){
- return MavenPlugin.getDefault().getPreferenceStore().getBoolean(MavenPreferenceConstants.P_SHOW_CONSOLE_ON_ERR);
+ return M2EUIPluginActivator.getDefault().getPreferenceStore().getBoolean(MavenPreferenceConstants.P_SHOW_CONSOLE_ON_ERR);
}
public boolean showConsoleOnOutput(){
- return MavenPlugin.getDefault().getPreferenceStore().getBoolean(MavenPreferenceConstants.P_SHOW_CONSOLE_ON_OUTPUT);
+ return M2EUIPluginActivator.getDefault().getPreferenceStore().getBoolean(MavenPreferenceConstants.P_SHOW_CONSOLE_ON_OUTPUT);
}
public IConsoleListener newLifecycle() {
return new MavenConsoleLifecycle();
@@ -386,17 +383,11 @@ public class MavenConsoleImpl extends IOConsole implements MavenConsole, IProper
}
- /* (non-Javadoc)
- * @see org.eclipse.m2e.core.MavenConsole#addMavenConsoleListener(org.eclipse.m2e.core.IMavenConsoleListener)
- */
public void addMavenConsoleListener(IMavenConsoleListener listener) {
listeners.remove(listener);
listeners.add(listener);
}
- /* (non-Javadoc)
- * @see org.eclipse.m2e.core.MavenConsole#removeMavenConsoleListener(org.eclipse.m2e.core.IMavenConsoleListener)
- */
public void removeMavenConsoleListener(IMavenConsoleListener listener) {
listeners.remove(listener);
}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/MavenConsolePageParticipant.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/internal/console/MavenConsolePageParticipant.java
index a8154d4b..b6925116 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/MavenConsolePageParticipant.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/internal/console/MavenConsolePageParticipant.java
@@ -9,22 +9,21 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.ui.internal;
+package org.eclipse.m2e.core.internal.console;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.m2e.core.internal.Messages;
+import org.eclipse.m2e.core.internal.preferences.MavenPreferenceConstants;
+import org.eclipse.m2e.core.ui.internal.MavenImages;
+import org.eclipse.m2e.core.ui.internal.actions.MavenConsoleRemoveAction;
+import org.eclipse.m2e.core.ui.internal.actions.MavenDebugOutputAction;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.console.IConsole;
import org.eclipse.ui.console.IConsoleConstants;
import org.eclipse.ui.console.IConsolePageParticipant;
import org.eclipse.ui.part.IPageBookViewPage;
-import org.eclipse.m2e.core.MavenImages;
-import org.eclipse.m2e.core.actions.MavenConsoleRemoveAction;
-import org.eclipse.m2e.core.actions.MavenDebugOutputAction;
-import org.eclipse.m2e.core.internal.Messages;
-import org.eclipse.m2e.core.internal.preferences.MavenPreferenceConstants;
-
public class MavenConsolePageParticipant implements IConsolePageParticipant {
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/internal/console/MavenConsoleService.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/internal/console/MavenConsoleService.java
new file mode 100644
index 00000000..86f6840b
--- /dev/null
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/internal/console/MavenConsoleService.java
@@ -0,0 +1,18 @@
+
+package org.eclipse.m2e.core.internal.console;
+
+import org.eclipse.m2e.core.core.MavenConsole;
+import org.eclipse.m2e.core.ui.internal.M2EUIPluginActivator;
+
+
+public class MavenConsoleService implements MavenConsole {
+
+ public void logMessage(String msg) {
+ M2EUIPluginActivator.getDefault().getMavenConsoleImpl().logMessage(msg);
+ }
+
+ public void logError(String msg) {
+ M2EUIPluginActivator.getDefault().getMavenConsoleImpl().logError(msg);
+ }
+
+}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/MavenShowConsoleAction.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/internal/console/MavenShowConsoleAction.java
index 42275036..52f9e2d0 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/MavenShowConsoleAction.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/internal/console/MavenShowConsoleAction.java
@@ -9,15 +9,14 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.ui.internal;
+package org.eclipse.m2e.core.internal.console;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
-
-import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.ui.internal.M2EUIPluginActivator;
/**
* MavenShowConsoleAction
@@ -60,7 +59,7 @@ public abstract class MavenShowConsoleAction extends Action implements IProperty
* @return
*/
private IPreferenceStore getPreferenceStore() {
- return MavenPlugin.getDefault().getPreferenceStore();
+ return M2EUIPluginActivator.getDefault().getPreferenceStore();
}
/* (non-Javadoc)
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/M2EUIPluginActivator.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/M2EUIPluginActivator.java
new file mode 100644
index 00000000..e0b2e371
--- /dev/null
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/M2EUIPluginActivator.java
@@ -0,0 +1,69 @@
+
+package org.eclipse.m2e.core.ui.internal;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.core.IMavenConstants;
+import org.eclipse.m2e.core.internal.console.MavenConsoleImpl;
+import org.eclipse.m2e.core.ui.internal.search.util.IndexSearchEngine;
+import org.eclipse.m2e.core.ui.internal.search.util.SearchEngine;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+
+public class M2EUIPluginActivator extends AbstractUIPlugin {
+
+ private static M2EUIPluginActivator instance;
+
+ public M2EUIPluginActivator() {
+ M2EUIPluginActivator.instance = this;
+ }
+
+ private MavenConsoleImpl console;
+
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ super.stop(context);
+ }
+
+ public static M2EUIPluginActivator getDefault() {
+ return instance;
+ }
+
+ /**
+ * Returns an Image for the file at the given relative path.
+ */
+ public static Image getImage(String path) {
+ ImageRegistry registry = getDefault().getImageRegistry();
+ Image image = registry.get(path);
+ if(image == null) {
+ registry.put(path, imageDescriptorFromPlugin(IMavenConstants.PLUGIN_ID, path));
+ image = registry.get(path);
+ }
+ return image;
+ }
+
+ public static ImageDescriptor getImageDescriptor(String path) {
+ return imageDescriptorFromPlugin(IMavenConstants.PLUGIN_ID, path);
+ }
+
+ public synchronized MavenConsoleImpl getMavenConsoleImpl() {
+ if(console == null) {
+ console = new MavenConsoleImpl(MavenImages.M2);
+ }
+ return console;
+ }
+
+ public SearchEngine getSearchEngine(IProject project) throws CoreException {
+ return new IndexSearchEngine(MavenPlugin.getDefault().getIndexManager().getIndex(project));
+ }
+}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/MavenAdapterFactory.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/MavenAdapterFactory.java
index b09ccb05..b09ccb05 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/MavenAdapterFactory.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/MavenAdapterFactory.java
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/MavenImages.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/MavenImages.java
index ae211e78..cd6b5570 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/MavenImages.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/MavenImages.java
@@ -9,18 +9,17 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core;
+package org.eclipse.m2e.core.ui.internal;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.jface.viewers.DecorationOverlayIcon;
+import org.eclipse.m2e.core.core.IMavenConstants;
+import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.ImageData;
import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.eclipse.m2e.core.core.IMavenConstants;
-import org.eclipse.m2e.core.core.MavenLogger;
-
/**
* @author Eugene Kuleshov
@@ -141,7 +140,7 @@ public class MavenImages {
}
private static ImageRegistry getImageRegistry() {
- MavenPlugin plugin = MavenPlugin.getDefault();
+ M2EUIPluginActivator plugin = M2EUIPluginActivator.getDefault();
return plugin == null ? null : plugin.getImageRegistry();
}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/MavenVersionDecorator.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/MavenVersionDecorator.java
index c70fa53e..9b462c54 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/MavenVersionDecorator.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/MavenVersionDecorator.java
@@ -23,14 +23,13 @@ import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jface.viewers.ILabelDecorator;
import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.jface.viewers.LabelProviderChangedEvent;
-import org.eclipse.swt.graphics.Image;
-
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.embedder.ArtifactKey;
import org.eclipse.m2e.core.project.IMavenProjectChangedListener;
import org.eclipse.m2e.core.project.IMavenProjectFacade;
import org.eclipse.m2e.core.project.MavenProjectChangedEvent;
import org.eclipse.m2e.core.project.MavenProjectManager;
+import org.eclipse.swt.graphics.Image;
/**
* @author Eugene Kuleshov
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/jobs/UpdateConfigurationJob.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/UpdateConfigurationJob.java
index b2668efb..3fa93c07 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/jobs/UpdateConfigurationJob.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/UpdateConfigurationJob.java
@@ -9,7 +9,7 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.jobs;
+package org.eclipse.m2e.core.ui.internal;
import java.util.HashMap;
import java.util.Map;
@@ -29,12 +29,12 @@ import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.progress.IProgressConstants;
import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.actions.OpenMavenConsoleAction;
import org.eclipse.m2e.core.core.IMavenConstants;
import org.eclipse.m2e.core.core.MavenConsole;
import org.eclipse.m2e.core.internal.Messages;
import org.eclipse.m2e.core.project.IMavenProjectFacade;
-import org.eclipse.m2e.core.util.M2EUtils;
+import org.eclipse.m2e.core.ui.internal.actions.OpenMavenConsoleAction;
+import org.eclipse.m2e.core.ui.internal.util.M2EUIUtils;
public class UpdateConfigurationJob extends WorkspaceJob {
@@ -117,7 +117,7 @@ public class UpdateConfigurationJob extends WorkspaceJob {
display.asyncExec(new Runnable() {
public void run() {
- M2EUtils.showErrorsForProjectsDialog(shell != null ? shell : display.getActiveShell(),
+ M2EUIUtils.showErrorsForProjectsDialog(shell != null ? shell : display.getActiveShell(),
Messages.UpdateSourcesAction_error_title, Messages.UpdateSourcesAction_error_message, updateErrors);
}
});
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/AddDependencyAction.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/AddDependencyAction.java
index f4a16fae..fdc8390d 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/AddDependencyAction.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/AddDependencyAction.java
@@ -9,21 +9,15 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.actions;
+package org.eclipse.m2e.core.ui.internal.actions;
+import org.apache.maven.model.Dependency;
+import org.apache.maven.project.MavenProject;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.window.Window;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkbenchWindowActionDelegate;
-
-import org.apache.maven.model.Dependency;
-import org.apache.maven.project.MavenProject;
-
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.core.IMavenConstants;
import org.eclipse.m2e.core.core.MavenLogger;
@@ -31,7 +25,11 @@ import org.eclipse.m2e.core.embedder.MavenModelManager;
import org.eclipse.m2e.core.index.IndexedArtifactFile;
import org.eclipse.m2e.core.internal.Messages;
import org.eclipse.m2e.core.project.IMavenProjectFacade;
-import org.eclipse.m2e.core.ui.dialogs.MavenRepositorySearchDialog;
+import org.eclipse.m2e.core.ui.internal.dialogs.MavenRepositorySearchDialog;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.IWorkbenchWindowActionDelegate;
public class AddDependencyAction extends MavenActionSupport implements IWorkbenchWindowActionDelegate {
@@ -84,4 +82,4 @@ public class AddDependencyAction extends MavenActionSupport implements IWorkbenc
public void init(IWorkbenchWindow window) {
}
- } \ No newline at end of file
+ }
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/AddPluginAction.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/AddPluginAction.java
index 9b81af80..aa08b1fb 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/AddPluginAction.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/AddPluginAction.java
@@ -9,17 +9,13 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.actions;
+package org.eclipse.m2e.core.ui.internal.actions;
+import org.apache.maven.project.MavenProject;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.window.Window;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkbenchWindowActionDelegate;
-
-import org.apache.maven.project.MavenProject;
-
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.core.IMavenConstants;
import org.eclipse.m2e.core.core.MavenLogger;
@@ -27,7 +23,9 @@ import org.eclipse.m2e.core.embedder.MavenModelManager;
import org.eclipse.m2e.core.index.IndexedArtifactFile;
import org.eclipse.m2e.core.internal.Messages;
import org.eclipse.m2e.core.project.IMavenProjectFacade;
-import org.eclipse.m2e.core.ui.dialogs.MavenRepositorySearchDialog;
+import org.eclipse.m2e.core.ui.internal.dialogs.MavenRepositorySearchDialog;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.IWorkbenchWindowActionDelegate;
public class AddPluginAction extends MavenActionSupport implements IWorkbenchWindowActionDelegate {
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/ChangeNatureAction.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/ChangeNatureAction.java
index 4f2170f5..027ca97e 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/ChangeNatureAction.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/ChangeNatureAction.java
@@ -9,7 +9,7 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.actions;
+package org.eclipse.m2e.core.ui.internal.actions;
import java.util.Iterator;
import java.util.LinkedHashSet;
@@ -29,9 +29,6 @@ import org.eclipse.core.runtime.Status;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.IObjectActionDelegate;
-import org.eclipse.ui.IWorkbenchPart;
-
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.core.IMavenConstants;
import org.eclipse.m2e.core.embedder.IMavenConfiguration;
@@ -40,6 +37,8 @@ import org.eclipse.m2e.core.project.IProjectConfigurationManager;
import org.eclipse.m2e.core.project.MavenProjectManager;
import org.eclipse.m2e.core.project.MavenUpdateRequest;
import org.eclipse.m2e.core.project.ResolverConfiguration;
+import org.eclipse.ui.IObjectActionDelegate;
+import org.eclipse.ui.IWorkbenchPart;
public class ChangeNatureAction implements IObjectActionDelegate, IExecutableExtension {
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/CheckoutAsMavenAction.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/CheckoutAsMavenAction.java
index 9431826e..f6bf95d2 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/CheckoutAsMavenAction.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/CheckoutAsMavenAction.java
@@ -9,7 +9,7 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.actions;
+package org.eclipse.m2e.core.ui.internal.actions;
import java.util.Iterator;
@@ -17,16 +17,15 @@ import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.m2e.core.ui.internal.M2EUIPluginActivator;
+import org.eclipse.m2e.core.ui.internal.wizards.MavenCheckoutWizard;
+import org.eclipse.m2e.scm.ScmUrl;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IObjectActionDelegate;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.scm.ScmUrl;
-import org.eclipse.m2e.core.wizards.MavenCheckoutWizard;
-
/**
* Checkout as Maven project action
@@ -79,7 +78,7 @@ public class CheckoutAsMavenAction implements IObjectActionDelegate {
return shell;
}
- IWorkbench workbench = MavenPlugin.getDefault().getWorkbench();
+ IWorkbench workbench = M2EUIPluginActivator.getDefault().getWorkbench();
if(workbench == null) {
return null;
}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/DisableNatureAction.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/DisableNatureAction.java
index 7ae99170..f3d01f2e 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/DisableNatureAction.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/DisableNatureAction.java
@@ -9,7 +9,7 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.actions;
+package org.eclipse.m2e.core.ui.internal.actions;
import java.util.Iterator;
@@ -20,11 +20,10 @@ import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.IObjectActionDelegate;
-import org.eclipse.ui.IWorkbenchPart;
-
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.core.MavenLogger;
+import org.eclipse.ui.IObjectActionDelegate;
+import org.eclipse.ui.IWorkbenchPart;
public class DisableNatureAction implements IObjectActionDelegate {
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/EnableNatureAction.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/EnableNatureAction.java
index 0d88a28b..ec97c63b 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/EnableNatureAction.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/EnableNatureAction.java
@@ -9,7 +9,7 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.actions;
+package org.eclipse.m2e.core.ui.internal.actions;
import java.util.Iterator;
@@ -29,18 +29,18 @@ import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.window.Window;
import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IObjectActionDelegate;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPart;
-
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.core.IMavenConstants;
import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.internal.Messages;
import org.eclipse.m2e.core.project.IProjectConfigurationManager;
import org.eclipse.m2e.core.project.ResolverConfiguration;
-import org.eclipse.m2e.core.wizards.MavenPomWizard;
+import org.eclipse.m2e.core.ui.internal.M2EUIPluginActivator;
+import org.eclipse.m2e.core.ui.internal.wizards.MavenPomWizard;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IObjectActionDelegate;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPart;
public class EnableNatureAction implements IObjectActionDelegate, IExecutableExtension {
@@ -94,7 +94,7 @@ public class EnableNatureAction implements IObjectActionDelegate, IExecutableExt
}
private void enableNature(final IProject project, boolean isSingle) {
- final MavenPlugin plugin = MavenPlugin.getDefault();
+ final M2EUIPluginActivator plugin = M2EUIPluginActivator.getDefault();
IFile pom = project.getFile(IMavenConstants.POM_FILE_NAME);
if(isSingle && !pom.exists()) {
// XXX move into AbstractProjectConfigurator and use Eclipse project settings
@@ -120,9 +120,9 @@ public class EnableNatureAction implements IObjectActionDelegate, IExecutableExt
configuration.setActiveProfiles(""); //$NON-NLS-1$
boolean hasMavenNature = project.hasNature(IMavenConstants.NATURE_ID);
-
- IProjectConfigurationManager configurationManager = plugin.getProjectConfigurationManager();
-
+
+ IProjectConfigurationManager configurationManager = MavenPlugin.getDefault().getProjectConfigurationManager();
+
configurationManager.enableMavenNature(project, configuration, new NullProgressMonitor());
if(!hasMavenNature) {
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/MaterializeAction.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/MaterializeAction.java
index fee02f4f..5f11bb52 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/MaterializeAction.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/MaterializeAction.java
@@ -9,21 +9,19 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.actions;
+package org.eclipse.m2e.core.ui.internal.actions;
+import org.apache.maven.model.Dependency;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.m2e.core.ui.internal.wizards.MavenMaterializePomWizard;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IObjectActionDelegate;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.PlatformUI;
-import org.apache.maven.model.Dependency;
-
-import org.eclipse.m2e.core.wizards.MavenMaterializePomWizard;
-
public class MaterializeAction implements IObjectActionDelegate {
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/MavenActionSupport.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/MavenActionSupport.java
index 2caf29b6..b7fc256e 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/MavenActionSupport.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/MavenActionSupport.java
@@ -9,7 +9,7 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.actions;
+package org.eclipse.m2e.core.ui.internal.actions;
import java.util.Collections;
import java.util.Set;
@@ -20,6 +20,14 @@ import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.core.IMavenConstants;
+import org.eclipse.m2e.core.core.MavenLogger;
+import org.eclipse.m2e.core.embedder.ArtifactKey;
+import org.eclipse.m2e.core.embedder.ArtifactRef;
+import org.eclipse.m2e.core.project.IMavenProjectFacade;
+import org.eclipse.m2e.core.project.MavenProjectManager;
+import org.eclipse.m2e.core.ui.internal.M2EUIPluginActivator;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
@@ -31,14 +39,6 @@ import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
-import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.core.IMavenConstants;
-import org.eclipse.m2e.core.core.MavenLogger;
-import org.eclipse.m2e.core.embedder.ArtifactKey;
-import org.eclipse.m2e.core.embedder.ArtifactRef;
-import org.eclipse.m2e.core.project.IMavenProjectFacade;
-import org.eclipse.m2e.core.project.MavenProjectManager;
-
/**
*
* MavenActionSupport
@@ -86,7 +86,7 @@ public abstract class MavenActionSupport implements IObjectActionDelegate {
return shell;
}
- IWorkbench workbench = MavenPlugin.getDefault().getWorkbench();
+ IWorkbench workbench = M2EUIPluginActivator.getDefault().getWorkbench();
if(workbench == null) {
return null;
}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/MavenConsoleRemoveAction.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/MavenConsoleRemoveAction.java
index 92aa714d..6cea8f2a 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/MavenConsoleRemoveAction.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/MavenConsoleRemoveAction.java
@@ -9,13 +9,13 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.actions;
+package org.eclipse.m2e.core.ui.internal.actions;
import org.eclipse.jface.action.Action;
-
-import org.eclipse.m2e.core.MavenImages;
-import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.internal.Messages;
+import org.eclipse.m2e.core.ui.internal.M2EUIPluginActivator;
+import org.eclipse.m2e.core.ui.internal.MavenImages;
+
public class MavenConsoleRemoveAction extends Action {
@@ -23,9 +23,9 @@ public class MavenConsoleRemoveAction extends Action {
setToolTipText(Messages.MavenConsoleRemoveAction_tooltip);
setImageDescriptor(MavenImages.CLOSE);
}
-
+
public void run() {
- MavenPlugin.getDefault().getConsole().closeConsole();
+ M2EUIPluginActivator.getDefault().getMavenConsoleImpl().closeConsole();
}
}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/MavenDebugOutputAction.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/MavenDebugOutputAction.java
index c36e5357..ca71dffb 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/MavenDebugOutputAction.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/MavenDebugOutputAction.java
@@ -9,17 +9,16 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.actions;
+package org.eclipse.m2e.core.ui.internal.actions;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
-
-import org.eclipse.m2e.core.MavenImages;
-import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.internal.Messages;
import org.eclipse.m2e.core.internal.preferences.MavenPreferenceConstants;
+import org.eclipse.m2e.core.ui.internal.M2EUIPluginActivator;
+import org.eclipse.m2e.core.ui.internal.MavenImages;
/**
@@ -52,7 +51,7 @@ public class MavenDebugOutputAction extends Action {
}
IPreferenceStore getPreferenceStore() {
- return MavenPlugin.getDefault().getPreferenceStore();
+ return M2EUIPluginActivator.getDefault().getPreferenceStore();
}
boolean isDebug() {
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/MavenPropertyTester.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/MavenPropertyTester.java
index d96681f7..7631b089 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/MavenPropertyTester.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/MavenPropertyTester.java
@@ -9,7 +9,7 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.actions;
+package org.eclipse.m2e.core.ui.internal.actions;
import org.eclipse.core.expressions.PropertyTester;
import org.eclipse.core.resources.IFile;
@@ -17,7 +17,6 @@ import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.NullProgressMonitor;
-
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.core.IMavenConstants;
import org.eclipse.m2e.core.embedder.ArtifactKey;
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/ModuleProjectWizardAction.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/ModuleProjectWizardAction.java
index ed7223c9..396fc450 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/ModuleProjectWizardAction.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/ModuleProjectWizardAction.java
@@ -9,19 +9,18 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.actions;
+package org.eclipse.m2e.core.ui.internal.actions;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.m2e.core.ui.internal.wizards.MavenModuleWizard;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IObjectActionDelegate;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.PlatformUI;
-import org.eclipse.m2e.core.wizards.MavenModuleWizard;
-
/**
* A module project wizard action.
*/
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/OpenMavenConsoleAction.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/OpenMavenConsoleAction.java
index 47b10f71..52fc283b 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/OpenMavenConsoleAction.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/OpenMavenConsoleAction.java
@@ -9,11 +9,10 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.actions;
+package org.eclipse.m2e.core.ui.internal.actions;
import org.eclipse.jface.action.Action;
-
-import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.ui.internal.M2EUIPluginActivator;
/**
* Open Maven Console Action
@@ -23,7 +22,7 @@ import org.eclipse.m2e.core.MavenPlugin;
public class OpenMavenConsoleAction extends Action {
public void run() {
- MavenPlugin.getDefault().getConsole().showConsole();
+ M2EUIPluginActivator.getDefault().getMavenConsoleImpl().showConsole();
}
}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/OpenPomAction.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/OpenPomAction.java
index 20e4d249..da3520e9 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/OpenPomAction.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/OpenPomAction.java
@@ -9,7 +9,7 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.actions;
+package org.eclipse.m2e.core.ui.internal.actions;
import java.io.ByteArrayInputStream;
import java.io.File;
@@ -20,6 +20,8 @@ import java.net.URL;
import java.util.Collections;
import java.util.List;
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.repository.ArtifactRepository;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IStorage;
import org.eclipse.core.runtime.CoreException;
@@ -40,6 +42,17 @@ import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.window.Window;
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.core.MavenLogger;
+import org.eclipse.m2e.core.embedder.ArtifactKey;
+import org.eclipse.m2e.core.embedder.IMaven;
+import org.eclipse.m2e.core.index.IIndex;
+import org.eclipse.m2e.core.index.IndexedArtifact;
+import org.eclipse.m2e.core.index.IndexedArtifactFile;
+import org.eclipse.m2e.core.internal.Messages;
+import org.eclipse.m2e.core.project.IMavenProjectFacade;
+import org.eclipse.m2e.core.project.MavenProjectManager;
+import org.eclipse.m2e.core.ui.internal.dialogs.MavenRepositorySearchDialog;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
@@ -58,21 +71,6 @@ import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.actions.ActionDelegate;
import org.eclipse.ui.part.FileEditorInput;
-import org.apache.maven.artifact.Artifact;
-import org.apache.maven.artifact.repository.ArtifactRepository;
-
-import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.core.MavenLogger;
-import org.eclipse.m2e.core.embedder.ArtifactKey;
-import org.eclipse.m2e.core.embedder.IMaven;
-import org.eclipse.m2e.core.index.IIndex;
-import org.eclipse.m2e.core.index.IndexedArtifact;
-import org.eclipse.m2e.core.index.IndexedArtifactFile;
-import org.eclipse.m2e.core.internal.Messages;
-import org.eclipse.m2e.core.project.IMavenProjectFacade;
-import org.eclipse.m2e.core.project.MavenProjectManager;
-import org.eclipse.m2e.core.ui.dialogs.MavenRepositorySearchDialog;
-
/**
* Open POM Action
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/OpenUrlAction.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/OpenUrlAction.java
index 2b81ec4b..245563a3 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/OpenUrlAction.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/OpenUrlAction.java
@@ -9,13 +9,19 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.actions;
+package org.eclipse.m2e.core.ui.internal.actions;
import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.List;
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.model.CiManagement;
+import org.apache.maven.model.IssueManagement;
+import org.apache.maven.model.Scm;
+import org.apache.maven.project.MavenProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExecutableExtension;
@@ -27,6 +33,12 @@ import org.eclipse.jface.action.IAction;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.core.MavenLogger;
+import org.eclipse.m2e.core.embedder.ArtifactKey;
+import org.eclipse.m2e.core.embedder.IMaven;
+import org.eclipse.m2e.core.internal.Messages;
+import org.eclipse.m2e.core.project.IMavenProjectFacade;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IWorkbenchWindow;
@@ -37,20 +49,6 @@ import org.eclipse.ui.actions.ActionDelegate;
import org.eclipse.ui.browser.IWebBrowser;
import org.eclipse.ui.browser.IWorkbenchBrowserSupport;
-import org.apache.maven.artifact.Artifact;
-import org.apache.maven.artifact.repository.ArtifactRepository;
-import org.apache.maven.model.CiManagement;
-import org.apache.maven.model.IssueManagement;
-import org.apache.maven.model.Scm;
-import org.apache.maven.project.MavenProject;
-
-import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.core.MavenLogger;
-import org.eclipse.m2e.core.embedder.ArtifactKey;
-import org.eclipse.m2e.core.embedder.IMaven;
-import org.eclipse.m2e.core.internal.Messages;
-import org.eclipse.m2e.core.project.IMavenProjectFacade;
-
/**
* Open Url Action
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/RefreshMavenModelsAction.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/RefreshMavenModelsAction.java
index a78cc98f..1c2d0cc1 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/RefreshMavenModelsAction.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/RefreshMavenModelsAction.java
@@ -9,7 +9,7 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.actions;
+package org.eclipse.m2e.core.ui.internal.actions;
import java.util.ArrayList;
import java.util.Iterator;
@@ -23,15 +23,14 @@ import org.eclipse.core.runtime.IExecutableExtension;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkbenchWindowActionDelegate;
-import org.eclipse.ui.IWorkingSet;
-
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.core.IMavenConstants;
import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.project.MavenProjectManager;
import org.eclipse.m2e.core.project.MavenUpdateRequest;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.IWorkbenchWindowActionDelegate;
+import org.eclipse.ui.IWorkingSet;
public class RefreshMavenModelsAction implements IWorkbenchWindowActionDelegate, IExecutableExtension {
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/SelectionUtil.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/SelectionUtil.java
index 7955c654..385dc645 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/SelectionUtil.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/SelectionUtil.java
@@ -9,7 +9,7 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.actions;
+package org.eclipse.m2e.core.ui.internal.actions;
import java.io.File;
import java.io.FileOutputStream;
@@ -20,6 +20,11 @@ import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.execution.MavenExecutionRequest;
+import org.apache.maven.execution.MavenExecutionResult;
+import org.apache.maven.project.MavenProject;
+import org.codehaus.plexus.util.IOUtil;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
@@ -34,23 +39,6 @@ import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IFileEditorInput;
-import org.eclipse.ui.IStorageEditorInput;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkingSet;
-import org.eclipse.ui.IWorkingSetManager;
-import org.eclipse.ui.PlatformUI;
-
-import org.codehaus.plexus.util.IOUtil;
-
-import org.apache.maven.artifact.Artifact;
-import org.apache.maven.execution.MavenExecutionRequest;
-import org.apache.maven.execution.MavenExecutionResult;
-import org.apache.maven.project.MavenProject;
-
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.core.IMavenConstants;
import org.eclipse.m2e.core.core.MavenLogger;
@@ -59,9 +47,18 @@ import org.eclipse.m2e.core.embedder.IMaven;
import org.eclipse.m2e.core.internal.Messages;
import org.eclipse.m2e.core.project.IMavenProjectFacade;
import org.eclipse.m2e.core.project.MavenProjectManager;
-import org.eclipse.m2e.core.util.Util;
-import org.eclipse.m2e.core.util.Util.FileStoreEditorInputStub;
+import org.eclipse.m2e.core.ui.internal.util.Util;
+import org.eclipse.m2e.core.ui.internal.util.Util.FileStoreEditorInputStub;
import org.eclipse.m2e.model.edit.pom.Dependency;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.IStorageEditorInput;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.IWorkingSet;
+import org.eclipse.ui.IWorkingSetManager;
+import org.eclipse.ui.PlatformUI;
/**
@@ -223,7 +220,7 @@ public class SelectionUtil {
return null;
}
- public static IWorkingSet[] getAssignedWorkingSets(Object element) {
+ public static List<IWorkingSet> getAssignedWorkingSets(Object element) {
List<IWorkingSet> list = new ArrayList<IWorkingSet>();
IWorkingSetManager workingSetManager = PlatformUI.getWorkbench().getWorkingSetManager();
for(IWorkingSet workingSet : workingSetManager.getWorkingSets()) {
@@ -233,7 +230,7 @@ public class SelectionUtil {
}
}
}
- return list.toArray(new IWorkingSet[list.size()]);
+ return list;
}
public static ArtifactKey getArtifactKey(Object element) throws CoreException {
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/UpdateConfigurationAction.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/UpdateConfigurationAction.java
index b18dea2a..99d33112 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/UpdateConfigurationAction.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/UpdateConfigurationAction.java
@@ -9,7 +9,7 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.actions;
+package org.eclipse.m2e.core.ui.internal.actions;
import java.util.Iterator;
import java.util.LinkedHashSet;
@@ -21,16 +21,15 @@ import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.core.IMavenConstants;
+import org.eclipse.m2e.core.core.MavenLogger;
+import org.eclipse.m2e.core.ui.internal.UpdateConfigurationJob;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IObjectActionDelegate;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkingSet;
-import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.core.IMavenConstants;
-import org.eclipse.m2e.core.core.MavenLogger;
-import org.eclipse.m2e.core.jobs.UpdateConfigurationJob;
-
public class UpdateConfigurationAction implements IObjectActionDelegate {
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/components/TextComboBoxCellEditor.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/components/TextComboBoxCellEditor.java
index 45c0e957..45c0e957 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/components/TextComboBoxCellEditor.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/components/TextComboBoxCellEditor.java
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/dialogs/AbstractMavenDialog.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/dialogs/AbstractMavenDialog.java
index 37a8d4ad..e72d3849 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/dialogs/AbstractMavenDialog.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/dialogs/AbstractMavenDialog.java
@@ -9,17 +9,16 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.ui.dialogs;
+package org.eclipse.m2e.core.ui.internal.dialogs;
import org.eclipse.jface.dialogs.DialogSettings;
import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.m2e.core.ui.internal.M2EUIPluginActivator;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.dialogs.SelectionStatusDialog;
-import org.eclipse.m2e.core.MavenPlugin;
-
/**
* A dialog superclass, featuring position and size settings.
@@ -40,7 +39,7 @@ public abstract class AbstractMavenDialog extends SelectionStatusDialog {
protected AbstractMavenDialog(Shell parent, String settingsSection) {
super(parent);
- IDialogSettings pluginSettings = MavenPlugin.getDefault().getDialogSettings();
+ IDialogSettings pluginSettings = M2EUIPluginActivator.getDefault().getDialogSettings();
IDialogSettings settings = pluginSettings.getSection(settingsSection);
if(settings == null) {
settings = new DialogSettings(settingsSection);
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/dialogs/AddDependencyDialog.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/dialogs/AddDependencyDialog.java
new file mode 100644
index 00000000..268f7407
--- /dev/null
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/dialogs/AddDependencyDialog.java
@@ -0,0 +1,690 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Sonatype, Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+
+package org.eclipse.m2e.core.ui.internal.dialogs;
+
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.lucene.search.BooleanQuery;
+import org.apache.maven.project.MavenProject;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.core.IMavenConstants;
+import org.eclipse.m2e.core.core.MavenLogger;
+import org.eclipse.m2e.core.index.IIndex;
+import org.eclipse.m2e.core.index.IndexManager;
+import org.eclipse.m2e.core.index.IndexedArtifact;
+import org.eclipse.m2e.core.index.IndexedArtifactFile;
+import org.eclipse.m2e.core.index.UserInputSearchExpression;
+import org.eclipse.m2e.core.internal.Messages;
+import org.eclipse.m2e.core.ui.internal.search.util.Packaging;
+import org.eclipse.m2e.core.ui.internal.util.M2EUIUtils;
+import org.eclipse.m2e.core.ui.internal.util.ProposalUtil;
+import org.eclipse.m2e.core.ui.internal.wizards.MavenPomSelectionComponent;
+import org.eclipse.m2e.core.ui.internal.wizards.WidthGroup;
+import org.eclipse.m2e.model.edit.pom.Dependency;
+import org.eclipse.m2e.model.edit.pom.PomFactory;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.SashForm;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.Tree;
+
+import com.ibm.icu.text.DateFormat;
+
+
+/**
+ * A Dialog whose primary goal is to allow the user to select a dependency, either by entering the GAV coordinates
+ * manually, or by search through a repository index.
+ *
+ * @author rgould
+ */
+public class AddDependencyDialog extends AbstractMavenDialog {
+
+ public static final String[] SCOPES = new String[] {"compile", "provided", "runtime", "test", "system"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+
+ /*
+ * dependencies under dependencyManagement are permitted to use an the extra "import" scope
+ */
+ public static final String[] DEP_MANAGEMENT_SCOPES = new String[] {"compile", "provided", "runtime", "test", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ "system", "import"}; //$NON-NLS-1$ //$NON-NLS-2$
+
+ protected static final String DIALOG_SETTINGS = AddDependencyDialog.class.getName();
+
+ protected static final long SEARCH_DELAY = 500L; //in milliseconds
+
+ protected String[] scopes;
+
+ protected TreeViewer resultsViewer;
+
+ protected Text queryText;
+
+ protected Text groupIDtext;
+
+ protected Text artifactIDtext;
+
+ protected Text versionText;
+
+ protected Text infoTextarea;
+
+ protected Combo scopeCombo;
+
+ protected java.util.List<Dependency> dependencies;
+
+ protected WidthGroup widthGroup;
+
+ /*
+ * Stores selected files from the results viewer. These are later
+ * converted into the above dependencies when OK is pressed.
+ */
+ protected java.util.List<IndexedArtifactFile> artifactFiles;
+
+ protected SearchJob currentSearch;
+
+ protected IProject project;
+
+ protected IStatus lastStatus;
+
+ protected SelectionListener resultsListener;
+
+ protected boolean updating;
+
+ private final MavenProject mavenProject;
+
+ private final boolean isForDependencyManagement;
+
+ private Set<String> managedKeys;
+
+ private Set<String> existingKeys;
+
+ /**
+ * The AddDependencyDialog differs slightly in behaviour depending on context. If it is being used to apply a
+ * dependency under the "dependencyManagement" context, the extra "import" scope is available. Set @param
+ * isForDependencyManagement to true if this is case.
+ *
+ * @param parent
+ * @param isForDependencyManagement
+ * @param project the project which contains this POM. Used for looking up indices
+ */
+ public AddDependencyDialog(Shell parent, boolean isForDependencyManagement, IProject project, MavenProject mavenProject) {
+ super(parent, DIALOG_SETTINGS);
+ this.project = project;
+ this.mavenProject = mavenProject;
+
+ this.isForDependencyManagement = isForDependencyManagement;
+
+ setShellStyle(getShellStyle() | SWT.RESIZE);
+ setTitle(Messages.AddDependencyDialog_title);
+// setStatusLineAboveButtons(true);
+
+ if(!isForDependencyManagement) {
+ this.scopes = SCOPES;
+ } else {
+ this.scopes = DEP_MANAGEMENT_SCOPES;
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.Dialog#createDialogArea()
+ */
+ protected Control createDialogArea(Composite parent) {
+ readSettings();
+
+ Composite composite = (Composite) super.createDialogArea(parent);
+
+ widthGroup = new WidthGroup();
+ composite.addControlListener(widthGroup);
+
+ Composite gavControls = createGAVControls(composite);
+ gavControls.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
+
+ new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL).setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+
+ Composite searchControls = createSearchControls(composite);
+ searchControls.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+
+ updateStatus();
+ return composite;
+ }
+
+ /**
+ * Sets the up group-artifact-version controls
+ */
+ private Composite createGAVControls(Composite parent) {
+ Composite composite = new Composite(parent, SWT.NONE);
+
+ GridLayout gridLayout = new GridLayout(4, false);
+ gridLayout.marginWidth = 0;
+ gridLayout.horizontalSpacing = 10;
+ composite.setLayout(gridLayout);
+
+ Label groupIDlabel = new Label(composite, SWT.NONE);
+ groupIDlabel.setText(Messages.AddDependencyDialog_groupId_label);
+ widthGroup.addControl(groupIDlabel);
+
+ groupIDtext = new Text(composite, SWT.BORDER);
+ groupIDtext.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+ M2EUIUtils.addRequiredDecoration(groupIDtext);
+
+ new Label(composite, SWT.NONE);
+ new Label(composite, SWT.NONE);
+
+
+ Label artifactIDlabel = new Label(composite, SWT.NONE);
+ artifactIDlabel.setText(Messages.AddDependencyDialog_artifactId_label);
+ widthGroup.addControl(artifactIDlabel);
+
+ artifactIDtext = new Text(composite, SWT.BORDER);
+ artifactIDtext.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+ M2EUIUtils.addRequiredDecoration(artifactIDtext);
+
+ new Label(composite, SWT.NONE);
+ new Label(composite, SWT.NONE);
+
+ Label versionLabel = new Label(composite, SWT.NONE);
+ versionLabel.setText(Messages.AddDependencyDialog_version_label);
+ widthGroup.addControl(versionLabel);
+
+ versionText = new Text(composite, SWT.BORDER);
+ versionText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+
+ Label scopeLabel = new Label(composite, SWT.NONE);
+ scopeLabel.setText(Messages.AddDependencyDialog_scope_label);
+
+ scopeCombo = new Combo(composite, SWT.DROP_DOWN | SWT.READ_ONLY);
+ scopeCombo.setItems(scopes);
+ GridData scopeListData = new GridData(SWT.LEFT, SWT.CENTER, false, false);
+ scopeCombo.setLayoutData(scopeListData);
+ scopeCombo.setText(scopes[0]);
+
+ /*
+ * Fix the tab order (group -> artifact -> version -> scope)
+ */
+ composite.setTabList(new Control[] {groupIDtext, artifactIDtext, versionText, scopeCombo});
+
+ ProposalUtil.addGroupIdProposal(project, groupIDtext, Packaging.ALL);
+ ProposalUtil.addArtifactIdProposal(project, groupIDtext, artifactIDtext, Packaging.ALL);
+ ProposalUtil.addVersionProposal(project, mavenProject, groupIDtext, artifactIDtext, versionText, Packaging.ALL);
+
+ artifactIDtext.addModifyListener(new ModifyListener() {
+
+ public void modifyText(ModifyEvent e) {
+ updateInfo();
+ }
+ });
+
+ groupIDtext.addModifyListener(new ModifyListener() {
+
+ public void modifyText(ModifyEvent e) {
+ updateInfo();
+ }
+ });
+
+ return composite;
+ }
+
+ void updateInfo() {
+// infoTextarea.setText(""); //$NON-NLS-1$
+ if(!updating) {
+ resultsViewer.setSelection(StructuredSelection.EMPTY);
+ updateStatus();
+ }
+ // TODO mkleint: for now just ignore..
+// this snippet is supposed to tell people that they selected dependency already in the
+// project
+
+// if(dependencyNode == null) {
+// return;
+// }
+// dependencyNode.accept(new DependencyVisitor() {
+//
+// public boolean visitLeave(DependencyNode node) {
+// if(node.getDependency() != null && node.getDependency().getArtifact() != null) {
+// Artifact artifact = node.getDependency().getArtifact();
+// if(artifact.getGroupId().equalsIgnoreCase(groupIDtext.getText().trim())
+// && artifact.getArtifactId().equalsIgnoreCase(artifactIDtext.getText().trim())) {
+// infoTextarea.setText(NLS.bind(Messages.AddDependencyDialog_info_transitive,
+// new String[] {artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion()}));
+// }
+// return false;
+// }
+// return true;
+// }
+//
+// public boolean visitEnter(DependencyNode node) {
+// return true;
+// }
+// });
+
+ }
+
+ private Composite createSearchControls(Composite parent) {
+ SashForm sashForm = new SashForm(parent, SWT.VERTICAL | SWT.SMOOTH);
+ sashForm.setLayout(new FillLayout());
+
+ Composite resultsComposite = new Composite(sashForm, SWT.NONE);
+ GridLayout resultsLayout = new GridLayout(1, false);
+ resultsLayout.marginWidth = 0;
+ resultsComposite.setLayout(resultsLayout);
+
+ Label queryLabel = new Label(resultsComposite, SWT.NONE);
+ queryLabel.setText(Messages.AddDependencyDialog_search_label);
+// widthGroup.addControl(queryLabel);
+
+ queryText = new Text(resultsComposite, SWT.BORDER | SWT.SEARCH);
+ queryText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+ queryText.setFocus();
+
+// queryText.setMessage(Messages.AddDependencyDialog_search_message);
+
+ Label resultsLabel = new Label(resultsComposite, SWT.NONE);
+ resultsLabel.setText(Messages.AddDependencyDialog_results_label);
+ resultsLabel.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, false));
+// widthGroup.addControl(resultsLabel);
+
+ Tree resultsTree = new Tree(resultsComposite, SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION);
+ GridData treeData = new GridData(SWT.FILL, SWT.FILL, true, true);
+ treeData.heightHint = 140;
+ treeData.widthHint = 100;
+ resultsTree.setLayoutData(treeData);
+
+ Composite infoComposite = new Composite(sashForm, SWT.NONE);
+ GridLayout infoLayout = new GridLayout(1, false);
+ infoLayout.marginWidth = 0;
+ infoComposite.setLayout(infoLayout);
+
+ Label infoLabel = new Label(infoComposite, SWT.NONE);
+ infoLabel.setText(Messages.AddDependencyDialog_info_label);
+ infoLabel.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, false));
+// widthGroup.addControl(infoLabel);
+
+ infoTextarea = new Text(infoComposite, SWT.MULTI | SWT.READ_ONLY | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
+ GridData infoData = new GridData(SWT.FILL, SWT.FILL, true, true);
+ infoData.heightHint = 60;
+ infoData.widthHint = 100;
+ infoTextarea.setLayoutData(infoData);
+
+ sashForm.setWeights(new int[] {70, 30});
+
+ /*
+ * Set up TreeViewer for search results
+ */
+
+ resultsViewer = new TreeViewer(resultsTree);
+ resultsViewer.setContentProvider(new MavenPomSelectionComponent.SearchResultContentProvider());
+ //TODO we want to have the artifacts marked for presence and management..
+ managedKeys = new HashSet<String>();
+ existingKeys = new HashSet<String>();
+ if (mavenProject != null && mavenProject.getDependencyManagement() != null) {
+ for (org.apache.maven.model.Dependency d : mavenProject.getDependencyManagement().getDependencies()) {
+ managedKeys.add(d.getGroupId() + ":" + d.getArtifactId());
+ managedKeys.add(d.getGroupId() + ":" + d.getArtifactId() + ":" + d.getVersion());
+ }
+ }
+ if (isForDependencyManagement) {
+ existingKeys = managedKeys;
+ managedKeys = Collections.<String>emptySet();
+ }
+ resultsViewer.setLabelProvider(new DelegatingStyledCellLabelProvider(
+ new MavenPomSelectionComponent.SearchResultLabelProvider(existingKeys, managedKeys,
+ IIndex.SEARCH_ARTIFACT)));
+
+ /*
+ * Hook up events
+ */
+
+ resultsListener = new SelectionListener();
+ resultsViewer.addSelectionChangedListener(resultsListener);
+
+ queryText.addKeyListener(new KeyAdapter() {
+ public void keyPressed(KeyEvent e) {
+ if(e.keyCode == SWT.ARROW_DOWN) {
+ resultsViewer.getTree().setFocus();
+ }
+ }
+ });
+
+ queryText.addModifyListener(new ModifyListener() {
+
+ public void modifyText(ModifyEvent e) {
+ search(queryText.getText());
+ }
+ });
+
+ return sashForm;
+ }
+
+ /**
+ * Just a short helper method to determine what to display in the text widgets when the user selects multiple objects
+ * in the tree viewer. If the objects have the same value, then we should show that to them, otherwise we show
+ * something like "(multiple selected)"
+ *
+ * @param current
+ * @param newValue
+ * @return
+ */
+ String chooseWidgetText(String current, String newValue) {
+ if(current == null) {
+ return newValue;
+ } else if(!current.equals(newValue)) {
+ return Messages.AddDependencyDialog_multipleValuesSelected;
+ }
+ return current;
+ }
+
+ void appendFileInfo(final StringBuffer buffer, final IndexedArtifactFile file) {
+ buffer.append(" * " + file.fname);
+ if(file.size != -1) {
+ buffer.append(", size: ");
+ if((file.size / 1024 / 1024) > 0) {
+ buffer.append((file.size / 1024 / 1024) + "MB");
+ } else {
+ buffer.append(Math.max(1, file.size / 1024) + "KB");
+ }
+ }
+ buffer.append(", date: " + DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.SHORT).format(file.date));
+ buffer.append("\n");
+
+// TODO mkleint: for now just ignore..
+// this snippet is supposed to tell people that they selected dependency already in the
+// project
+
+// if(dependencyNode != null) {
+// dependencyNode.accept(new DependencyVisitor() {
+//
+// public boolean visitEnter(DependencyNode node) {
+// return true;
+// }
+//
+// public boolean visitLeave(DependencyNode node) {
+// if(node.getDependency() == null || node.getDependency().getArtifact() == null) {
+// return true;
+// }
+// Artifact artifact = node.getDependency().getArtifact();
+// if(artifact.getGroupId().equalsIgnoreCase(file.group)
+// && artifact.getArtifactId().equalsIgnoreCase(file.artifact)) {
+// buffer.append(NLS.bind(Messages.AddDependencyDialog_transitive_dependency,
+// new String[] {artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion()}));
+// /*
+// * DependencyNodes don't know their parents. Determining which transitive dependency
+// * is using the selected dependency is non trivial :(
+// */
+// return false;
+// }
+// return true;
+// }
+// });
+// }
+ }
+
+ protected void search(String query) {
+ if(query == null || query.length() <= 2) {
+ if(this.currentSearch != null) {
+ this.currentSearch.cancel();
+ }
+ } else {
+ IndexManager indexManager = MavenPlugin.getDefault().getIndexManager();
+
+ if(this.currentSearch != null) {
+ this.currentSearch.cancel();
+ }
+
+ this.currentSearch = new SearchJob(query.toLowerCase(), indexManager);
+ this.currentSearch.schedule(SEARCH_DELAY);
+ }
+ }
+
+ protected boolean isGroupAndArtifactPresent() {
+ return groupIDtext.getText().trim().length() > 0 && artifactIDtext.getText().trim().length() > 0;
+ }
+
+ protected void updateStatus() {
+ boolean enableOK = isGroupAndArtifactPresent() || (artifactFiles != null && artifactFiles.size() > 0);
+
+ int severity = enableOK ? IStatus.OK : IStatus.ERROR;
+ String message = enableOK ? "" : Messages.AddDependencyDialog_groupAndArtifactRequired; //$NON-NLS-1$
+
+ if(lastStatus == null || lastStatus.getSeverity() != severity) {
+ setInfo(severity, message);
+ }
+ }
+
+ protected void updateStatus(IStatus status) {
+ lastStatus = status;
+ super.updateStatus(status);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.dialogs.SelectionStatusDialog#computeResult()
+ * This is called when OK is pressed. There's no obligation to do anything.
+ */
+ protected void computeResult() {
+ String scope = scopeCombo.getText(); //$NON-NLS-1$
+
+ if(artifactFiles == null || artifactFiles.size() == 1) {
+ String type = "";
+ String classifier = "";
+ if (artifactFiles != null && artifactFiles.size() == 1) {
+ // use the selected artifact props if available..
+ IndexedArtifactFile file = artifactFiles.iterator().next();
+ classifier = file.classifier;
+ type = file.type;
+ }
+ Dependency dependency = createDependency(groupIDtext.getText().trim(), artifactIDtext.getText().trim(),
+ versionText.getText().trim(), scope, type, classifier); //$NON-NLS-1$
+ this.dependencies = Collections.singletonList(dependency);
+ } else {
+ this.dependencies = new LinkedList<Dependency>();
+ for(IndexedArtifactFile file : artifactFiles) {
+ Dependency dep = createDependency(file.group, file.artifact, managedKeys.contains(MavenPomSelectionComponent.getKey(file)) ? null : file.version, scope, file.type, file.classifier);
+ this.dependencies.add(dep);
+ }
+ }
+ }
+
+ private Dependency createDependency(String groupID, String artifactID, String version, String scope, String type, String classifier) {
+ Dependency dependency = PomFactory.eINSTANCE.createDependency();
+ dependency.setGroupId(groupID);
+ dependency.setArtifactId(artifactID);
+ if (version != null) {
+ dependency.setVersion(version);
+ }
+ dependency.setClassifier(classifier);
+
+ /*
+ * For scope and type, if the values are the default, don't save them.
+ * This reduces clutter in the XML file (although forces people who don't
+ * know what the defaults are to look them up).
+ */
+ dependency.setScope("compile".equals(scope) ? "" : scope); //$NON-NLS-1$ //$NON-NLS-2$
+ dependency.setType("jar".equals(type) ? "" : type); //$NON-NLS-1$ //$NON-NLS-2$
+
+ return dependency;
+ }
+
+ public java.util.List<Dependency> getDependencies() {
+ return this.dependencies;
+ }
+
+ void setInfo(int status, String message) {
+ updateStatus(new Status(status, IMavenConstants.PLUGIN_ID, message));
+ }
+
+ public final class SelectionListener implements ISelectionChangedListener {
+ public void selectionChanged(SelectionChangedEvent event) {
+ IStructuredSelection selection = (IStructuredSelection) event.getSelection();
+ if(selection.isEmpty()) {
+ infoTextarea.setText(""); //$NON-NLS-1$
+ artifactFiles = null;
+ updateStatus();
+ } else {
+ String artifact = null;
+ String group = null;
+ String version = null;
+
+ artifactFiles = new LinkedList<IndexedArtifactFile>();
+ StringBuffer buffer = new StringBuffer();
+ Iterator iter = selection.iterator();
+ while(iter.hasNext()) {
+ Object obj = iter.next();
+ IndexedArtifactFile file = null;
+ boolean managed = false;
+ if(obj instanceof IndexedArtifact) {
+ //the idea here is that if we have a managed version for something, then the IndexedArtifact shall
+ //represent that value..
+ IndexedArtifact ia = (IndexedArtifact)obj;
+ if (managedKeys.contains(MavenPomSelectionComponent.getKey(ia))) {
+ for (IndexedArtifactFile f : ia.getFiles()) {
+ if (managedKeys.contains(MavenPomSelectionComponent.getKey(f))) {
+ file = f;
+ managed = true;
+ break;
+ }
+ }
+ }
+ if (file == null) {
+ file = ((IndexedArtifact) obj).getFiles().iterator().next();
+ }
+ } else {
+ file = (IndexedArtifactFile) obj;
+ if (managedKeys.contains(MavenPomSelectionComponent.getKey(file))) {
+ managed = true;
+ }
+ }
+
+ appendFileInfo(buffer, file);
+ artifactFiles.add(file);
+
+ artifact = chooseWidgetText(artifact, file.artifact);
+ group = chooseWidgetText(group, file.group);
+ version = chooseWidgetText(version, managed ? "" : file.version);
+ }
+ setInfo(OK, NLS.bind(artifactFiles.size() == 1 ? Messages.AddDependencyDialog_itemSelected
+ : Messages.AddDependencyDialog_itemsSelected, artifactFiles.size()));
+ infoTextarea.setText(buffer.toString());
+
+ updating = true;
+ artifactIDtext.setText(artifact);
+ groupIDtext.setText(group);
+ versionText.setText(version);
+ updating = false;
+
+ boolean enabled = !(artifactFiles.size() > 1);
+ artifactIDtext.setEnabled(enabled);
+ groupIDtext.setEnabled(enabled);
+ versionText.setEnabled(enabled);
+ }
+ }
+ }
+
+ private class SearchJob extends Job {
+
+ private String query;
+
+ private IndexManager indexManager;
+
+ private boolean cancelled = false;
+
+ public SearchJob(String query, IndexManager indexManager) {
+ super(NLS.bind(Messages.AddDependencyDialog_searchingFor, query));
+ this.query = query;
+ this.indexManager = indexManager;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
+ */
+ protected IStatus run(IProgressMonitor monitor) {
+ if(this.cancelled || resultsViewer == null || resultsViewer.getControl() == null
+ || resultsViewer.getControl().isDisposed()) {
+ return Status.CANCEL_STATUS;
+ }
+
+ try {
+ setResults(IStatus.OK, Messages.AddDependencyDialog_searching, Collections.<String, IndexedArtifact> emptyMap());
+ // TODO: before it was searching all indexes, but it should current project? (cstamas)
+ // If not, the change getIndex(project) to getAllIndexes() and done
+ // TODO: cstamas identified this as "user input", true?
+ Map<String, IndexedArtifact> results = indexManager.getIndex(project).search(
+ new UserInputSearchExpression(query), IIndex.SEARCH_ARTIFACT, IIndex.SEARCH_JARS + IIndex.SEARCH_TESTS);
+ setResults(IStatus.OK, NLS.bind(Messages.AddDependencyDialog_searchDone, results.size()), results);
+ } catch(BooleanQuery.TooManyClauses exception) {
+ setResults(IStatus.ERROR, Messages.AddDependencyDialog_tooManyResults,
+ Collections.<String, IndexedArtifact> emptyMap());
+ } catch(RuntimeException exception) {
+ setResults(IStatus.ERROR, NLS.bind(Messages.AddDependencyDialog_searchError, exception.toString()),
+ Collections.<String, IndexedArtifact> emptyMap());
+ } catch(CoreException ex) {
+ setResults(IStatus.ERROR, NLS.bind(Messages.AddDependencyDialog_searchError, ex.getMessage()),
+ Collections.<String, IndexedArtifact> emptyMap());
+ MavenLogger.log(ex);
+ }
+
+ return Status.OK_STATUS;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.jobs.Job#canceling()
+ */
+ protected void canceling() {
+ this.cancelled = true;
+ super.canceling();
+ }
+
+ private void setResults(final int status, final String infoMessage, final Map<String, IndexedArtifact> results) {
+ if(cancelled) {
+ return;
+ }
+
+ Display.getDefault().syncExec(new Runnable() {
+
+ public void run() {
+ if(status == IStatus.OK) {
+ infoTextarea.setText(infoMessage);
+ } else {
+ setInfo(status, infoMessage);
+ }
+ if(results != null && resultsViewer != null && resultsViewer.getControl() != null
+ && !resultsViewer.getControl().isDisposed()) {
+ resultsViewer.setInput(results);
+ }
+ }
+ });
+ }
+
+ }
+}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/dialogs/EditDependencyDialog.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/dialogs/EditDependencyDialog.java
index 0325bb5d..fe1a7848 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/dialogs/EditDependencyDialog.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/dialogs/EditDependencyDialog.java
@@ -6,15 +6,22 @@
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
-package org.eclipse.m2e.core.ui.dialogs;
+package org.eclipse.m2e.core.ui.internal.dialogs;
-import static org.eclipse.m2e.core.util.Util.nvl;
+import static org.eclipse.m2e.core.ui.internal.util.Util.nvl;
+import org.apache.maven.project.MavenProject;
import org.eclipse.core.resources.IProject;
import org.eclipse.emf.common.command.Command;
import org.eclipse.emf.common.command.CompoundCommand;
import org.eclipse.emf.edit.command.SetCommand;
import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.m2e.core.internal.Messages;
+import org.eclipse.m2e.core.ui.internal.search.util.Packaging;
+import org.eclipse.m2e.core.ui.internal.util.M2EUIUtils;
+import org.eclipse.m2e.core.ui.internal.util.ProposalUtil;
+import org.eclipse.m2e.model.edit.pom.Dependency;
+import org.eclipse.m2e.model.edit.pom.PomPackage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
@@ -26,15 +33,6 @@ import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
-import org.apache.maven.project.MavenProject;
-
-import org.eclipse.m2e.core.internal.Messages;
-import org.eclipse.m2e.core.util.M2EUtils;
-import org.eclipse.m2e.core.util.ProposalUtil;
-import org.eclipse.m2e.core.util.search.Packaging;
-import org.eclipse.m2e.model.edit.pom.Dependency;
-import org.eclipse.m2e.model.edit.pom.PomPackage;
-
public class EditDependencyDialog extends AbstractMavenDialog {
protected static PomPackage POM_PACKAGE = PomPackage.eINSTANCE;
@@ -102,7 +100,7 @@ public class EditDependencyDialog extends AbstractMavenDialog {
gd_groupIdText.horizontalIndent = 4;
groupIdText.setLayoutData(gd_groupIdText);
ProposalUtil.addGroupIdProposal(project, groupIdText, Packaging.ALL);
- M2EUtils.addRequiredDecoration(groupIdText);
+ M2EUIUtils.addRequiredDecoration(groupIdText);
Label artifactIdLabel = new Label(composite, SWT.NONE);
artifactIdLabel.setText(Messages.EditDependencyDialog_artifactId_label);
@@ -112,7 +110,7 @@ public class EditDependencyDialog extends AbstractMavenDialog {
gd_artifactIdText.horizontalIndent = 4;
artifactIdText.setLayoutData(gd_artifactIdText);
ProposalUtil.addArtifactIdProposal(project, groupIdText, artifactIdText, Packaging.ALL);
- M2EUtils.addRequiredDecoration(artifactIdText);
+ M2EUIUtils.addRequiredDecoration(artifactIdText);
Label versionLabel = new Label(composite, SWT.NONE);
versionLabel.setText(Messages.EditDependencyDialog_version_label);
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/dialogs/InputHistory.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/dialogs/InputHistory.java
index 7aca5f83..c585956d 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/dialogs/InputHistory.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/dialogs/InputHistory.java
@@ -1,5 +1,5 @@
-package org.eclipse.m2e.core.ui.dialogs;
+package org.eclipse.m2e.core.ui.internal.dialogs;
import java.beans.Beans;
import java.util.ArrayList;
@@ -11,6 +11,7 @@ import java.util.Map;
import java.util.Set;
import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.m2e.core.ui.internal.M2EUIPluginActivator;
import org.eclipse.swt.SWTException;
import org.eclipse.swt.custom.CCombo;
import org.eclipse.swt.events.DisposeEvent;
@@ -18,8 +19,6 @@ import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Control;
-import org.eclipse.m2e.core.MavenPlugin;
-
public class InputHistory {
/** the history limit */
@@ -40,7 +39,7 @@ public class InputHistory {
public InputHistory(String sectionName, String[] privileged) {
comboMap = new HashMap<String, List<ControlWrapper>>();
- MavenPlugin plugin = MavenPlugin.getDefault();
+ M2EUIPluginActivator plugin = M2EUIPluginActivator.getDefault();
if(plugin != null) {
IDialogSettings pluginSettings = plugin.getDialogSettings();
dialogSettings = pluginSettings.getSection(sectionName);
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/dialogs/MavenGoalSelectionDialog.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/dialogs/MavenGoalSelectionDialog.java
index 593d8feb..f6ada911 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/dialogs/MavenGoalSelectionDialog.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/dialogs/MavenGoalSelectionDialog.java
@@ -9,7 +9,7 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.ui.dialogs;
+package org.eclipse.m2e.core.ui.internal.dialogs;
import java.util.ArrayList;
import java.util.Iterator;
@@ -27,6 +27,14 @@ import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.core.IMavenConstants;
+import org.eclipse.m2e.core.core.MavenLogger;
+import org.eclipse.m2e.core.core.Messages;
+import org.eclipse.m2e.core.index.IIndex;
+import org.eclipse.m2e.core.index.IndexManager;
+import org.eclipse.m2e.core.index.IndexedArtifact;
+import org.eclipse.m2e.core.index.IndexedArtifactFile;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.KeyAdapter;
import org.eclipse.swt.events.KeyEvent;
@@ -46,15 +54,6 @@ import org.eclipse.swt.widgets.Tree;
import org.eclipse.ui.dialogs.ElementTreeSelectionDialog;
import org.eclipse.ui.dialogs.ISelectionStatusValidator;
-import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.core.IMavenConstants;
-import org.eclipse.m2e.core.core.MavenLogger;
-import org.eclipse.m2e.core.core.Messages;
-import org.eclipse.m2e.core.index.IIndex;
-import org.eclipse.m2e.core.index.IndexManager;
-import org.eclipse.m2e.core.index.IndexedArtifact;
-import org.eclipse.m2e.core.index.IndexedArtifactFile;
-
public class MavenGoalSelectionDialog extends ElementTreeSelectionDialog {
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/dialogs/MavenMessageDialog.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/dialogs/MavenMessageDialog.java
index 6da9f585..8dd4c980 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/dialogs/MavenMessageDialog.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/dialogs/MavenMessageDialog.java
@@ -9,7 +9,7 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.ui.dialogs;
+package org.eclipse.m2e.core.ui.internal.dialogs;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.IMessageProvider;
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/dialogs/MavenPropertyDialog.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/dialogs/MavenPropertyDialog.java
index 764714e6..0e5cc359 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/dialogs/MavenPropertyDialog.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/dialogs/MavenPropertyDialog.java
@@ -9,11 +9,12 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.ui.dialogs;
+package org.eclipse.m2e.core.ui.internal.dialogs;
// import org.eclipse.debug.ui.StringVariableSelectionDialog;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.m2e.core.core.Messages;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
@@ -28,8 +29,6 @@ import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
-import org.eclipse.m2e.core.core.Messages;
-
public class MavenPropertyDialog extends Dialog {
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/dialogs/MavenRepositorySearchDialog.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/dialogs/MavenRepositorySearchDialog.java
index 869b0289..9e05f623 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/dialogs/MavenRepositorySearchDialog.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/dialogs/MavenRepositorySearchDialog.java
@@ -9,18 +9,33 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.ui.dialogs;
+package org.eclipse.m2e.core.ui.internal.dialogs;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
+import org.apache.maven.model.Dependency;
+import org.apache.maven.model.DependencyManagement;
+import org.apache.maven.model.Parent;
+import org.apache.maven.model.Plugin;
+import org.apache.maven.model.PluginManagement;
+import org.apache.maven.project.MavenProject;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.viewers.DoubleClickEvent;
import org.eclipse.jface.viewers.IDoubleClickListener;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.m2e.core.embedder.ArtifactKey;
+import org.eclipse.m2e.core.index.IIndex;
+import org.eclipse.m2e.core.index.IndexedArtifact;
+import org.eclipse.m2e.core.index.IndexedArtifactFile;
+import org.eclipse.m2e.core.internal.Messages;
+import org.eclipse.m2e.core.ui.internal.search.util.Packaging;
+import org.eclipse.m2e.core.ui.internal.util.M2EUIUtils;
+import org.eclipse.m2e.core.ui.internal.util.ProposalUtil;
+import org.eclipse.m2e.core.ui.internal.wizards.MavenPomSelectionComponent;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
@@ -33,24 +48,6 @@ import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
-import org.apache.maven.model.Dependency;
-import org.apache.maven.model.DependencyManagement;
-import org.apache.maven.model.Parent;
-import org.apache.maven.model.Plugin;
-import org.apache.maven.model.PluginManagement;
-import org.apache.maven.project.MavenProject;
-
-import org.eclipse.m2e.core.embedder.ArtifactKey;
-import org.eclipse.m2e.core.index.IIndex;
-import org.eclipse.m2e.core.index.IndexedArtifact;
-import org.eclipse.m2e.core.index.IndexedArtifactFile;
-import org.eclipse.m2e.core.internal.Messages;
-import org.eclipse.m2e.core.util.M2EUtils;
-import org.eclipse.m2e.core.util.ProposalUtil;
-import org.eclipse.m2e.core.util.search.Packaging;
-import org.eclipse.m2e.core.wizards.MavenPomSelectionComponent;
-
-
/**
* Maven POM Search dialog
*
@@ -262,7 +259,7 @@ public class MavenRepositorySearchDialog extends AbstractMavenDialog {
txtGroupId = new Text(composite, SWT.BORDER);
txtGroupId.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
- M2EUtils.addRequiredDecoration(txtGroupId);
+ M2EUIUtils.addRequiredDecoration(txtGroupId);
if (showScope) {
new Label(composite, SWT.NONE);
@@ -274,7 +271,7 @@ public class MavenRepositorySearchDialog extends AbstractMavenDialog {
txtArtifactId = new Text(composite, SWT.BORDER);
txtArtifactId.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
- M2EUtils.addRequiredDecoration(txtArtifactId);
+ M2EUIUtils.addRequiredDecoration(txtArtifactId);
if (showScope) {
new Label(composite, SWT.NONE);
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/lifecycle/AbstractLifecyclePropertyPage.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/lifecycle/AbstractLifecyclePropertyPage.java
index 3ce330f1..3ce330f1 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/lifecycle/AbstractLifecyclePropertyPage.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/lifecycle/AbstractLifecyclePropertyPage.java
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/lifecycle/AbstractPropertyPageExtensionPoint.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/lifecycle/AbstractPropertyPageExtensionPoint.java
index ace3c250..ace3c250 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/lifecycle/AbstractPropertyPageExtensionPoint.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/lifecycle/AbstractPropertyPageExtensionPoint.java
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/lifecycle/ILifecyclePropertyPage.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/lifecycle/ILifecyclePropertyPage.java
index bbc88239..bbc88239 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/lifecycle/ILifecyclePropertyPage.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/lifecycle/ILifecyclePropertyPage.java
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/lifecycle/ILifecyclePropertyPageExtensionPoint.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/lifecycle/ILifecyclePropertyPageExtensionPoint.java
index a81284da..a81284da 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/lifecycle/ILifecyclePropertyPageExtensionPoint.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/lifecycle/ILifecyclePropertyPageExtensionPoint.java
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/lifecycle/LifecycleMappingPropertyPageFactory.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/lifecycle/LifecycleMappingPropertyPageFactory.java
index 09966e94..45d49092 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/lifecycle/LifecycleMappingPropertyPageFactory.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/lifecycle/LifecycleMappingPropertyPageFactory.java
@@ -22,8 +22,6 @@ import org.eclipse.core.runtime.IExtensionPoint;
import org.eclipse.core.runtime.IExtensionRegistry;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Platform;
-import org.eclipse.swt.widgets.Shell;
-
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.core.IMavenConstants;
import org.eclipse.m2e.core.core.MavenLogger;
@@ -32,6 +30,7 @@ import org.eclipse.m2e.core.project.IProjectConfigurationManager;
import org.eclipse.m2e.core.project.MavenProjectManager;
import org.eclipse.m2e.core.project.ResolverConfiguration;
import org.eclipse.m2e.core.project.configurator.ILifecycleMapping;
+import org.eclipse.swt.widgets.Shell;
/**
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/lifecycle/ProjectConfiguratorsTable.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/lifecycle/ProjectConfiguratorsTable.java
index 20dfaf20..2e3e3020 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/lifecycle/ProjectConfiguratorsTable.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/lifecycle/ProjectConfiguratorsTable.java
@@ -15,6 +15,9 @@ import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.TableViewerColumn;
+import org.eclipse.m2e.core.internal.Messages;
+import org.eclipse.m2e.core.project.configurator.AbstractProjectConfigurator;
+import org.eclipse.m2e.core.project.configurator.ILifecycleMapping;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ControlAdapter;
import org.eclipse.swt.events.ControlEvent;
@@ -23,10 +26,6 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.m2e.core.internal.Messages;
-import org.eclipse.m2e.core.project.configurator.AbstractProjectConfigurator;
-import org.eclipse.m2e.core.project.configurator.ILifecycleMapping;
-
/**
* ProjectConfiguratorsTable
* Composite that holds a read only table of project configurators for a given lifecycle mapping strategy.
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/lifecycle/ProjectConfiguratorsTableContentProvider.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/lifecycle/ProjectConfiguratorsTableContentProvider.java
index 72fb20ac..0c8bd3d1 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/lifecycle/ProjectConfiguratorsTableContentProvider.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/lifecycle/ProjectConfiguratorsTableContentProvider.java
@@ -13,7 +13,6 @@ package org.eclipse.m2e.core.ui.internal.lifecycle;
import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.Viewer;
-
import org.eclipse.m2e.core.internal.Messages;
import org.eclipse.m2e.core.project.configurator.AbstractProjectConfigurator;
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/lifecycle/ProjectConfiguratorsTableLabelProvider.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/lifecycle/ProjectConfiguratorsTableLabelProvider.java
index 92fee588..cde6669d 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/lifecycle/ProjectConfiguratorsTableLabelProvider.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/lifecycle/ProjectConfiguratorsTableLabelProvider.java
@@ -14,13 +14,12 @@ package org.eclipse.m2e.core.ui.internal.lifecycle;
import org.eclipse.jface.viewers.IColorProvider;
import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.m2e.core.project.configurator.AbstractProjectConfigurator;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Display;
-import org.eclipse.m2e.core.project.configurator.AbstractProjectConfigurator;
-
/**
* ConfiguratorsTableLabelProvider
*
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/CustomizableLifecycleMappingPropertyPage.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/CustomizableLifecycleMappingPropertyPage.java
index 7f714460..e06c6e1b 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/CustomizableLifecycleMappingPropertyPage.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/CustomizableLifecycleMappingPropertyPage.java
@@ -11,16 +11,15 @@
package org.eclipse.m2e.core.ui.internal.preferences;
+import org.eclipse.m2e.core.internal.Messages;
+import org.eclipse.m2e.core.ui.internal.lifecycle.AbstractLifecyclePropertyPage;
+import org.eclipse.m2e.core.ui.internal.lifecycle.ProjectConfiguratorsTable;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
-import org.eclipse.m2e.core.internal.Messages;
-import org.eclipse.m2e.core.ui.internal.lifecycle.AbstractLifecyclePropertyPage;
-import org.eclipse.m2e.core.ui.internal.lifecycle.ProjectConfiguratorsTable;
-
/**
* CustomizableLifecycleMappingPropertyPage
*
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/EmptyLifecycleMappingPropertyPage.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/EmptyLifecycleMappingPropertyPage.java
index 92c98101..92c98101 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/EmptyLifecycleMappingPropertyPage.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/EmptyLifecycleMappingPropertyPage.java
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/GoalsFieldEditor.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/GoalsFieldEditor.java
index 480f0dad..480f0dad 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/GoalsFieldEditor.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/GoalsFieldEditor.java
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/LocalArchetypeCatalogDialog.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/LocalArchetypeCatalogDialog.java
index 52c49d57..2b69eaea 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/LocalArchetypeCatalogDialog.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/LocalArchetypeCatalogDialog.java
@@ -16,11 +16,17 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
+import org.apache.maven.archetype.catalog.Archetype;
+import org.apache.maven.archetype.catalog.ArchetypeCatalog;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.dialogs.DialogSettings;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.dialogs.TitleAreaDialog;
+import org.eclipse.m2e.core.archetype.ArchetypeCatalogFactory;
+import org.eclipse.m2e.core.archetype.ArchetypeCatalogFactory.LocalCatalogFactory;
+import org.eclipse.m2e.core.internal.Messages;
+import org.eclipse.m2e.core.ui.internal.M2EUIPluginActivator;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
@@ -37,14 +43,6 @@ import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
-import org.apache.maven.archetype.catalog.Archetype;
-import org.apache.maven.archetype.catalog.ArchetypeCatalog;
-
-import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.archetype.ArchetypeCatalogFactory;
-import org.eclipse.m2e.core.archetype.ArchetypeCatalogFactory.LocalCatalogFactory;
-import org.eclipse.m2e.core.internal.Messages;
-
/**
* Local Archetype catalog dialog
*
@@ -78,7 +76,7 @@ public class LocalArchetypeCatalogDialog extends TitleAreaDialog {
this.message = Messages.LocalArchetypeCatalogDialog_message;
setShellStyle(SWT.DIALOG_TRIM);
- IDialogSettings pluginSettings = MavenPlugin.getDefault().getDialogSettings();
+ IDialogSettings pluginSettings = M2EUIPluginActivator.getDefault().getDialogSettings();
dialogSettings = pluginSettings.getSection(DIALOG_SETTINGS);
if(dialogSettings == null) {
dialogSettings = new DialogSettings(DIALOG_SETTINGS);
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/MavenArchetypesPreferencePage.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenArchetypesPreferencePage.java
index 18b4f125..d4af3594 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/MavenArchetypesPreferencePage.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenArchetypesPreferencePage.java
@@ -31,6 +31,13 @@ import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.window.Window;
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.archetype.ArchetypeCatalogFactory;
+import org.eclipse.m2e.core.archetype.ArchetypeCatalogFactory.LocalCatalogFactory;
+import org.eclipse.m2e.core.archetype.ArchetypeCatalogFactory.RemoteCatalogFactory;
+import org.eclipse.m2e.core.archetype.ArchetypeManager;
+import org.eclipse.m2e.core.core.MavenLogger;
+import org.eclipse.m2e.core.internal.Messages;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
@@ -52,14 +59,6 @@ import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.browser.IWebBrowser;
-import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.archetype.ArchetypeCatalogFactory;
-import org.eclipse.m2e.core.archetype.ArchetypeCatalogFactory.LocalCatalogFactory;
-import org.eclipse.m2e.core.archetype.ArchetypeCatalogFactory.RemoteCatalogFactory;
-import org.eclipse.m2e.core.archetype.ArchetypeManager;
-import org.eclipse.m2e.core.core.MavenLogger;
-import org.eclipse.m2e.core.internal.Messages;
-
/**
* Maven Archetype catalogs preference page
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/MavenGoalSelectionAdapter.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenGoalSelectionAdapter.java
index 25493b14..10f316b9 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/MavenGoalSelectionAdapter.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenGoalSelectionAdapter.java
@@ -12,13 +12,12 @@
package org.eclipse.m2e.core.ui.internal.preferences;
import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.m2e.core.ui.internal.dialogs.MavenGoalSelectionDialog;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
-import org.eclipse.m2e.core.ui.dialogs.MavenGoalSelectionDialog;
-
public class MavenGoalSelectionAdapter extends SelectionAdapter {
private Shell shell;
private Text text;
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/MavenInstallationsPreferencePage.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenInstallationsPreferencePage.java
index e79d67d7..07315548 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/MavenInstallationsPreferencePage.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenInstallationsPreferencePage.java
@@ -17,6 +17,7 @@ import java.net.MalformedURLException;
import java.net.URL;
import java.util.List;
+import org.apache.maven.settings.building.SettingsProblem;
import org.eclipse.core.filesystem.EFS;
import org.eclipse.core.filesystem.IFileStore;
import org.eclipse.core.runtime.CoreException;
@@ -38,6 +39,17 @@ import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.ITableLabelProvider;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.core.MavenLogger;
+import org.eclipse.m2e.core.embedder.IMaven;
+import org.eclipse.m2e.core.embedder.IMavenConfiguration;
+import org.eclipse.m2e.core.embedder.MavenRuntime;
+import org.eclipse.m2e.core.embedder.MavenRuntimeManager;
+import org.eclipse.m2e.core.index.IndexManager;
+import org.eclipse.m2e.core.internal.Messages;
+import org.eclipse.m2e.core.internal.embedder.MavenEmbeddedRuntime;
+import org.eclipse.m2e.core.internal.preferences.MavenPreferenceConstants;
+import org.eclipse.m2e.core.ui.internal.M2EUIPluginActivator;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
@@ -71,19 +83,6 @@ import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.browser.IWebBrowser;
import org.eclipse.ui.ide.IDE;
-import org.apache.maven.settings.building.SettingsProblem;
-
-import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.core.MavenLogger;
-import org.eclipse.m2e.core.embedder.IMaven;
-import org.eclipse.m2e.core.embedder.IMavenConfiguration;
-import org.eclipse.m2e.core.embedder.MavenRuntime;
-import org.eclipse.m2e.core.embedder.MavenRuntimeManager;
-import org.eclipse.m2e.core.index.IndexManager;
-import org.eclipse.m2e.core.internal.Messages;
-import org.eclipse.m2e.core.internal.embedder.MavenEmbeddedRuntime;
-import org.eclipse.m2e.core.internal.preferences.MavenPreferenceConstants;
-
/**
* Maven installations preference page
@@ -145,7 +144,7 @@ public class MavenInstallationsPreferencePage extends PreferencePage implements
protected void storeCustom(String dir){
- mavenPlugin.getPreferenceStore().setValue(P_MAVEN_CUSTOM_GLOBAL, dir == null ? "" : dir); //$NON-NLS-1$
+ M2EUIPluginActivator.getDefault().getPreferenceStore().setValue(P_MAVEN_CUSTOM_GLOBAL, dir == null ? "" : dir); //$NON-NLS-1$
}
/* (non-Javadoc)
* @see org.eclipse.jface.preference.PreferencePage#performApply()
@@ -270,9 +269,9 @@ public class MavenInstallationsPreferencePage extends PreferencePage implements
if(defaultRuntime == null || defaultRuntime instanceof MavenEmbeddedRuntime){
String globalSettings = null;
if(useLastCustomGlobal){
- globalSettings = mavenPlugin.getPreferenceStore().getString(P_MAVEN_CUSTOM_GLOBAL);
+ globalSettings = M2EUIPluginActivator.getDefault().getPreferenceStore().getString(P_MAVEN_CUSTOM_GLOBAL);
} else {
- globalSettings = mavenPlugin.getPreferenceStore().getString(MavenPreferenceConstants.P_GLOBAL_SETTINGS_FILE);
+ globalSettings = M2EUIPluginActivator.getDefault().getPreferenceStore().getString(MavenPreferenceConstants.P_GLOBAL_SETTINGS_FILE);
}
return globalSettings.trim().length()==0 ? null : globalSettings;
}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/MavenPreferencePage.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenPreferencePage.java
index 18105440..42aecfc8 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/MavenPreferencePage.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenPreferencePage.java
@@ -13,6 +13,10 @@ package org.eclipse.m2e.core.ui.internal.preferences;
import org.eclipse.jface.preference.BooleanFieldEditor;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.core.Messages;
+import org.eclipse.m2e.core.internal.preferences.MavenPreferenceConstants;
+import org.eclipse.m2e.core.ui.internal.M2EUIPluginActivator;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
@@ -21,10 +25,6 @@ import org.eclipse.swt.widgets.Label;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.core.Messages;
-import org.eclipse.m2e.core.internal.preferences.MavenPreferenceConstants;
-
public class MavenPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
@@ -32,7 +32,7 @@ public class MavenPreferencePage extends FieldEditorPreferencePage implements IW
public MavenPreferencePage() {
super(GRID);
- setPreferenceStore(MavenPlugin.getDefault().getPreferenceStore());
+ setPreferenceStore(M2EUIPluginActivator.getDefault().getPreferenceStore());
plugin = MavenPlugin.getDefault();
}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/MavenProjectLifecycleMappingPage.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenProjectLifecycleMappingPage.java
index fca8e44d..119b8d22 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/MavenProjectLifecycleMappingPage.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenProjectLifecycleMappingPage.java
@@ -14,15 +14,14 @@ package org.eclipse.m2e.core.ui.internal.preferences;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.ui.dialogs.PropertyPage;
-
import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.internal.Messages;
import org.eclipse.m2e.core.project.configurator.ILifecycleMapping;
import org.eclipse.m2e.core.ui.internal.lifecycle.ILifecyclePropertyPage;
import org.eclipse.m2e.core.ui.internal.lifecycle.LifecycleMappingPropertyPageFactory;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.dialogs.PropertyPage;
/**
* Maven project preference page
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/MavenProjectPreferencePage.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenProjectPreferencePage.java
index 9c89659f..5803311b 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/MavenProjectPreferencePage.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenProjectPreferencePage.java
@@ -18,6 +18,12 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.core.IMavenConstants;
+import org.eclipse.m2e.core.core.MavenLogger;
+import org.eclipse.m2e.core.internal.Messages;
+import org.eclipse.m2e.core.project.MavenProjectManager;
+import org.eclipse.m2e.core.project.ResolverConfiguration;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
@@ -29,13 +35,6 @@ import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.dialogs.PropertyPage;
-import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.core.IMavenConstants;
-import org.eclipse.m2e.core.core.MavenLogger;
-import org.eclipse.m2e.core.internal.Messages;
-import org.eclipse.m2e.core.project.MavenProjectManager;
-import org.eclipse.m2e.core.project.ResolverConfiguration;
-
/**
* Maven project preference page
*
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/MavenSettingsPreferencePage.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenSettingsPreferencePage.java
index 788b8726..b96c844a 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/MavenSettingsPreferencePage.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenSettingsPreferencePage.java
@@ -16,6 +16,10 @@ import java.lang.reflect.Constructor;
import java.util.ArrayList;
import java.util.List;
+import org.apache.maven.cli.MavenCli;
+import org.apache.maven.repository.RepositorySystem;
+import org.apache.maven.settings.Settings;
+import org.apache.maven.settings.building.SettingsProblem;
import org.eclipse.core.filesystem.EFS;
import org.eclipse.core.filesystem.IFileStore;
import org.eclipse.core.resources.IProject;
@@ -28,6 +32,16 @@ import org.eclipse.core.runtime.SubProgressMonitor;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.core.MavenLogger;
+import org.eclipse.m2e.core.core.Messages;
+import org.eclipse.m2e.core.embedder.IMaven;
+import org.eclipse.m2e.core.embedder.IMavenConfiguration;
+import org.eclipse.m2e.core.embedder.MavenRuntime;
+import org.eclipse.m2e.core.embedder.MavenRuntimeManager;
+import org.eclipse.m2e.core.index.IndexManager;
+import org.eclipse.m2e.core.project.IMavenProjectFacade;
+import org.eclipse.m2e.core.project.MavenUpdateRequest;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
@@ -55,22 +69,6 @@ import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.ide.IDE;
-import org.apache.maven.cli.MavenCli;
-import org.apache.maven.repository.RepositorySystem;
-import org.apache.maven.settings.Settings;
-import org.apache.maven.settings.building.SettingsProblem;
-
-import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.core.MavenLogger;
-import org.eclipse.m2e.core.core.Messages;
-import org.eclipse.m2e.core.embedder.IMaven;
-import org.eclipse.m2e.core.embedder.IMavenConfiguration;
-import org.eclipse.m2e.core.embedder.MavenRuntime;
-import org.eclipse.m2e.core.embedder.MavenRuntimeManager;
-import org.eclipse.m2e.core.index.IndexManager;
-import org.eclipse.m2e.core.project.IMavenProjectFacade;
-import org.eclipse.m2e.core.project.MavenUpdateRequest;
-
/**
* Maven installations preference page
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/MissingLifecycleMappingPropertyPage.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MissingLifecycleMappingPropertyPage.java
index de6393aa..f9b0d893 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/MissingLifecycleMappingPropertyPage.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MissingLifecycleMappingPropertyPage.java
@@ -12,7 +12,6 @@
package org.eclipse.m2e.core.ui.internal.preferences;
import org.eclipse.core.runtime.CoreException;
-
import org.eclipse.m2e.core.internal.Messages;
import org.eclipse.m2e.core.project.configurator.ILifecycleMapping;
import org.eclipse.m2e.core.ui.internal.lifecycle.LifecycleMappingPropertyPageFactory;
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/RemoteArchetypeCatalogDialog.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/RemoteArchetypeCatalogDialog.java
index 649c89da..fa194908 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/RemoteArchetypeCatalogDialog.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/RemoteArchetypeCatalogDialog.java
@@ -16,6 +16,8 @@ import java.util.Arrays;
import java.util.Collections;
import java.util.List;
+import org.apache.maven.archetype.catalog.Archetype;
+import org.apache.maven.archetype.catalog.ArchetypeCatalog;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
@@ -24,6 +26,10 @@ import org.eclipse.jface.dialogs.DialogSettings;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.dialogs.TitleAreaDialog;
+import org.eclipse.m2e.core.archetype.ArchetypeCatalogFactory;
+import org.eclipse.m2e.core.archetype.ArchetypeCatalogFactory.RemoteCatalogFactory;
+import org.eclipse.m2e.core.internal.Messages;
+import org.eclipse.m2e.core.ui.internal.M2EUIPluginActivator;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
@@ -40,14 +46,6 @@ import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
-import org.apache.maven.archetype.catalog.Archetype;
-import org.apache.maven.archetype.catalog.ArchetypeCatalog;
-
-import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.archetype.ArchetypeCatalogFactory;
-import org.eclipse.m2e.core.archetype.ArchetypeCatalogFactory.RemoteCatalogFactory;
-import org.eclipse.m2e.core.internal.Messages;
-
/**
* Remote Archetype catalog dialog
*
@@ -88,7 +86,7 @@ public class RemoteArchetypeCatalogDialog extends TitleAreaDialog {
this.message = Messages.RemoteArchetypeCatalogDialog_message;
setShellStyle(SWT.DIALOG_TRIM);
- IDialogSettings pluginSettings = MavenPlugin.getDefault().getDialogSettings();
+ IDialogSettings pluginSettings = M2EUIPluginActivator.getDefault().getDialogSettings();
dialogSettings = pluginSettings.getSection(DIALOG_SETTINGS);
if(dialogSettings == null) {
dialogSettings = new DialogSettings(DIALOG_SETTINGS);
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/SimpleLifecycleMappingPropertyPage.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/SimpleLifecycleMappingPropertyPage.java
index 76f8df82..9044e069 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/SimpleLifecycleMappingPropertyPage.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/SimpleLifecycleMappingPropertyPage.java
@@ -11,6 +11,7 @@
package org.eclipse.m2e.core.ui.internal.preferences;
+import org.eclipse.m2e.core.ui.internal.lifecycle.AbstractLifecyclePropertyPage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
@@ -19,8 +20,6 @@ import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
-import org.eclipse.m2e.core.ui.internal.lifecycle.AbstractLifecyclePropertyPage;
-
/**
* Simple lifecycle mapping properties page that displays static text.
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/search/MavenSearchPage.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/search/MavenSearchPage.java
index 38cdb6f1..b58dddd9 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/search/MavenSearchPage.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/search/MavenSearchPage.java
@@ -14,6 +14,7 @@ package org.eclipse.m2e.core.ui.internal.search;
import org.eclipse.jface.dialogs.DialogPage;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.CheckboxTableViewer;
+import org.eclipse.m2e.core.internal.Messages;
import org.eclipse.search.ui.ISearchPage;
import org.eclipse.search.ui.ISearchPageContainer;
import org.eclipse.swt.SWT;
@@ -25,8 +26,6 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Table;
-import org.eclipse.m2e.core.internal.Messages;
-
/**
* Maven Search Page
*
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/search/MavenSearchResult.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/search/MavenSearchResult.java
index a464aeea..a464aeea 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/search/MavenSearchResult.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/search/MavenSearchResult.java
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/search/MavenSearchResultPage.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/search/MavenSearchResultPage.java
index d0c28aae..d0c28aae 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/search/MavenSearchResultPage.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/search/MavenSearchResultPage.java
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/util/search/ArtifactInfo.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/search/util/ArtifactInfo.java
index 85b90527..ea5b18ee 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/util/search/ArtifactInfo.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/search/util/ArtifactInfo.java
@@ -9,7 +9,7 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.util.search;
+package org.eclipse.m2e.core.ui.internal.search.util;
/**
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/util/search/CComboContentAdapter.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/search/util/CComboContentAdapter.java
index 2dbbe432..aa465fc1 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/util/search/CComboContentAdapter.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/search/util/CComboContentAdapter.java
@@ -9,7 +9,7 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.util.search;
+package org.eclipse.m2e.core.ui.internal.search.util;
import org.eclipse.jface.fieldassist.ContentProposalAdapter;
import org.eclipse.jface.fieldassist.IControlContentAdapter;
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/util/search/ControlDecoration.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/search/util/ControlDecoration.java
index 4e7b7fae..8c90a57d 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/util/search/ControlDecoration.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/search/util/ControlDecoration.java
@@ -10,7 +10,7 @@
*******************************************************************************/
-package org.eclipse.m2e.core.util.search;
+package org.eclipse.m2e.core.ui.internal.search.util;
import org.eclipse.core.runtime.ListenerList;
import org.eclipse.jface.fieldassist.FieldDecoration;
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/util/search/IndexSearchEngine.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/search/util/IndexSearchEngine.java
index ad022e2a..6bab025d 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/util/search/IndexSearchEngine.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/search/util/IndexSearchEngine.java
@@ -9,7 +9,7 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.util.search;
+package org.eclipse.m2e.core.ui.internal.search.util;
import java.util.ArrayList;
import java.util.Collection;
@@ -19,10 +19,8 @@ import java.util.Set;
import java.util.SortedSet;
import java.util.TreeSet;
-import org.eclipse.core.runtime.CoreException;
-
import org.apache.maven.artifact.versioning.ComparableVersion;
-
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.m2e.core.index.IIndex;
import org.eclipse.m2e.core.index.IndexManager;
import org.eclipse.m2e.core.index.IndexedArtifact;
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/util/search/MenuDetectEvent.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/search/util/MenuDetectEvent.java
index 95d976b5..15745da3 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/util/search/MenuDetectEvent.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/search/util/MenuDetectEvent.java
@@ -9,7 +9,7 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.util.search;
+package org.eclipse.m2e.core.ui.internal.search.util;
import org.eclipse.swt.events.TypedEvent;
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/util/search/MenuDetectListener.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/search/util/MenuDetectListener.java
index 4de16ce7..26cb1421 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/util/search/MenuDetectListener.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/search/util/MenuDetectListener.java
@@ -9,7 +9,7 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.util.search;
+package org.eclipse.m2e.core.ui.internal.search.util;
import java.util.EventListener;
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/util/search/Packaging.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/search/util/Packaging.java
index 52f92101..cf98ea6b 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/util/search/Packaging.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/search/util/Packaging.java
@@ -9,7 +9,7 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.util.search;
+package org.eclipse.m2e.core.ui.internal.search.util;
import org.eclipse.m2e.core.index.SearchExpression;
import org.eclipse.m2e.core.index.SourcedSearchExpression;
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/util/search/SearchEngine.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/search/util/SearchEngine.java
index 9490a7e7..c6f8634a 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/util/search/SearchEngine.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/search/util/SearchEngine.java
@@ -9,7 +9,7 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.util.search;
+package org.eclipse.m2e.core.ui.internal.search.util;
import java.util.Collection;
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/util/search/SearchException.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/search/util/SearchException.java
index 606836ed..2cb0c06b 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/util/search/SearchException.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/search/util/SearchException.java
@@ -9,7 +9,7 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.util.search;
+package org.eclipse.m2e.core.ui.internal.search.util;
/**
* @author Lukas Krecan
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/util/M2EErrorDialog.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/util/M2EErrorDialog.java
index 37a4a96f..e4d2dd12 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/util/M2EErrorDialog.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/util/M2EErrorDialog.java
@@ -9,7 +9,7 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.util;
+package org.eclipse.m2e.core.ui.internal.util;
import java.util.Collection;
@@ -22,6 +22,8 @@ import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.ITableLabelProvider;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.m2e.core.internal.M2EUtils;
+import org.eclipse.m2e.core.internal.Messages;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.Image;
@@ -32,8 +34,6 @@ import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.m2e.core.internal.Messages;
-
/**
* M2EErrorDialog
* Error dialog for displaying a list/table of error values.
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/util/M2EUtils.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/util/M2EUIUtils.java
index 8bb6e156..0b9aa536 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/util/M2EUtils.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/util/M2EUIUtils.java
@@ -9,7 +9,7 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.util;
+package org.eclipse.m2e.core.ui.internal.util;
import java.util.Map;
@@ -19,6 +19,7 @@ import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.fieldassist.ControlDecoration;
import org.eclipse.jface.fieldassist.FieldDecoration;
import org.eclipse.jface.fieldassist.FieldDecorationRegistry;
+import org.eclipse.m2e.core.internal.M2EUtils;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.FontData;
@@ -31,7 +32,7 @@ import org.eclipse.swt.widgets.Shell;
*
* @author dyocum
*/
-public class M2EUtils {
+public class M2EUIUtils {
public static Font deriveFont(Font f, int style, int height){
FontData[] fd = f.getFontData();
@@ -44,34 +45,13 @@ public class M2EUtils {
public static void showErrorDialog(Shell shell, String title, String msg, Exception e){
StringBuffer buff = new StringBuffer(msg);
- Throwable t = getRootCause(e);
+ Throwable t = M2EUtils.getRootCause(e);
if(t != null && !nullOrEmpty(t.getMessage())){
buff.append(t.getMessage());
}
MessageDialog.openError(shell, title, buff.toString());
}
- public static String getRootCauseMessage(Throwable t){
- Throwable root = getRootCause(t);
- if(t == null){
- return null;
- }
- return root.getMessage();
- }
-
- public static Throwable getRootCause(Throwable ex) {
- if(ex == null){
- return null;
- }
- Throwable rootCause = ex;
- Throwable cause = rootCause.getCause();
- while(cause != null && cause != rootCause) {
- rootCause = cause;
- cause = cause.getCause();
- }
- return cause == null ? rootCause : cause;
- }
-
public static boolean nullOrEmpty(String s){
return s == null || s.length() == 0;
}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/util/ProposalUtil.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/util/ProposalUtil.java
index dc073e50..d082d161 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/util/ProposalUtil.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/util/ProposalUtil.java
@@ -6,13 +6,14 @@
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
-package org.eclipse.m2e.core.util;
+package org.eclipse.m2e.core.ui.internal.util;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Properties;
+import org.apache.maven.project.MavenProject;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.fieldassist.ContentProposalAdapter;
@@ -22,21 +23,18 @@ import org.eclipse.jface.fieldassist.IContentProposal;
import org.eclipse.jface.fieldassist.IContentProposalProvider;
import org.eclipse.jface.fieldassist.IControlContentAdapter;
import org.eclipse.jface.fieldassist.TextContentAdapter;
+import org.eclipse.m2e.core.core.MavenLogger;
+import org.eclipse.m2e.core.ui.internal.M2EUIPluginActivator;
+import org.eclipse.m2e.core.ui.internal.search.util.CComboContentAdapter;
+import org.eclipse.m2e.core.ui.internal.search.util.ControlDecoration;
+import org.eclipse.m2e.core.ui.internal.search.util.Packaging;
+import org.eclipse.m2e.core.ui.internal.search.util.SearchEngine;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.fieldassist.ContentAssistCommandAdapter;
-import org.apache.maven.project.MavenProject;
-
-import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.core.MavenLogger;
-import org.eclipse.m2e.core.util.search.CComboContentAdapter;
-import org.eclipse.m2e.core.util.search.ControlDecoration;
-import org.eclipse.m2e.core.util.search.Packaging;
-import org.eclipse.m2e.core.util.search.SearchEngine;
-
/**
* Holds the proposal utility code, previously in the editor.xml plug-in. Provides proposal suggestions for text and
@@ -173,8 +171,8 @@ public class ProposalUtil {
});
}
- private static SearchEngine getSearchEngine(final IProject project) throws CoreException {
- return MavenPlugin.getDefault().getSearchEngine(project);
+ public static SearchEngine getSearchEngine(final IProject project) throws CoreException {
+ return M2EUIPluginActivator.getDefault().getSearchEngine(project);
}
}
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/util/Util.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/util/Util.java
new file mode 100644
index 00000000..e3beb7d2
--- /dev/null
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/util/Util.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2008-2010 Sonatype, Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Sonatype, Inc. - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.m2e.core.ui.internal.util;
+
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
+
+
+/**
+ * Utility methods
+ *
+ * @author Eugene Kuleshov
+ */
+public class Util {
+
+ /**
+ * Proxy factory for compatibility stubs
+ */
+ @SuppressWarnings("unchecked")
+ public static <T> T proxy(final Object o, Class<T> type) {
+ return (T) Proxy.newProxyInstance(type.getClassLoader(), //
+ new Class[] {type}, //
+ new InvocationHandler() {
+ public Object invoke(Object proxy, Method m, Object[] args) throws Throwable {
+ try {
+ Method mm = o.getClass().getMethod(m.getName(), m.getParameterTypes());
+ return mm.invoke(o, args);
+ } catch(final NoSuchMethodException e) {
+ return null;
+ }
+ }
+ });
+ }
+
+ /**
+ * Stub interface for FileStoreEditorInput
+ *
+ * @see Util#proxy(Object, Class)
+ */
+ public static interface FileStoreEditorInputStub {
+ public java.net.URI getURI();
+ }
+
+ public static String nvl(String s) {
+ return s == null ? "" : s; //$NON-NLS-1$
+ }
+}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/MavenRepositoryView.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/MavenRepositoryView.java
index 08547ca7..95e37be3 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/MavenRepositoryView.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/MavenRepositoryView.java
@@ -36,24 +36,7 @@ import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.dnd.TextTransfer;
-import org.eclipse.swt.dnd.Transfer;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.IWorkbenchActionConstants;
-import org.eclipse.ui.actions.BaseSelectionListenerAction;
-import org.eclipse.ui.part.DrillDownAdapter;
-import org.eclipse.ui.part.ViewPart;
-
-import org.eclipse.m2e.core.MavenImages;
import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.actions.MaterializeAction;
-import org.eclipse.m2e.core.actions.OpenPomAction;
import org.eclipse.m2e.core.index.IndexListener;
import org.eclipse.m2e.core.index.IndexManager;
import org.eclipse.m2e.core.index.IndexedArtifact;
@@ -62,12 +45,28 @@ import org.eclipse.m2e.core.internal.Messages;
import org.eclipse.m2e.core.internal.index.IndexedArtifactGroup;
import org.eclipse.m2e.core.internal.index.NexusIndex;
import org.eclipse.m2e.core.repository.IRepository;
+import org.eclipse.m2e.core.ui.internal.MavenImages;
+import org.eclipse.m2e.core.ui.internal.actions.MaterializeAction;
+import org.eclipse.m2e.core.ui.internal.actions.OpenPomAction;
+import org.eclipse.m2e.core.ui.internal.util.M2EUIUtils;
import org.eclipse.m2e.core.ui.internal.views.nodes.AbstractIndexedRepositoryNode;
import org.eclipse.m2e.core.ui.internal.views.nodes.IArtifactNode;
import org.eclipse.m2e.core.ui.internal.views.nodes.IndexedArtifactFileNode;
import org.eclipse.m2e.core.ui.internal.views.nodes.LocalRepositoryNode;
import org.eclipse.m2e.core.ui.internal.views.nodes.RepositoryNode;
-import org.eclipse.m2e.core.util.M2EUtils;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.dnd.Clipboard;
+import org.eclipse.swt.dnd.TextTransfer;
+import org.eclipse.swt.dnd.Transfer;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.IWorkbenchActionConstants;
+import org.eclipse.ui.actions.BaseSelectionListenerAction;
+import org.eclipse.ui.part.DrillDownAdapter;
+import org.eclipse.ui.part.ViewPart;
/**
@@ -467,7 +466,7 @@ public class MavenRepositoryView extends ViewPart {
try {
node.getIndex().setIndexDetails(details);
} catch(CoreException ex) {
- M2EUtils.showErrorDialog(this.getViewSite().getShell(), Messages.MavenRepositoryView_error_title, Messages.MavenRepositoryView_error_message, ex);
+ M2EUIUtils.showErrorDialog(this.getViewSite().getShell(), Messages.MavenRepositoryView_error_title, Messages.MavenRepositoryView_error_message, ex);
}
}
}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/RepositoryViewContentProvider.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/RepositoryViewContentProvider.java
index 9a0b3fe0..a084fc52 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/RepositoryViewContentProvider.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/RepositoryViewContentProvider.java
@@ -14,13 +14,12 @@ package org.eclipse.m2e.core.ui.internal.views;
import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.ui.IViewSite;
-
import org.eclipse.m2e.core.ui.internal.views.nodes.CustomRepositoriesNode;
import org.eclipse.m2e.core.ui.internal.views.nodes.GlobalRepositoriesNode;
import org.eclipse.m2e.core.ui.internal.views.nodes.IMavenRepositoryNode;
import org.eclipse.m2e.core.ui.internal.views.nodes.LocalRepositoryRootNode;
import org.eclipse.m2e.core.ui.internal.views.nodes.ProjectRepositoriesNode;
+import org.eclipse.ui.IViewSite;
/**
* RepositoryViewContentProvider
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/RepositoryViewLabelProvider.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/RepositoryViewLabelProvider.java
index 0ac86c34..f65adaf6 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/RepositoryViewLabelProvider.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/RepositoryViewLabelProvider.java
@@ -14,6 +14,9 @@ package org.eclipse.m2e.core.ui.internal.views;
import org.eclipse.jface.viewers.IColorProvider;
import org.eclipse.jface.viewers.IFontProvider;
import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.m2e.core.ui.internal.util.M2EUIUtils;
+import org.eclipse.m2e.core.ui.internal.views.nodes.IMavenRepositoryNode;
+import org.eclipse.m2e.core.ui.internal.views.nodes.RepositoryNode;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Font;
@@ -23,10 +26,6 @@ import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.PlatformUI;
-import org.eclipse.m2e.core.ui.internal.views.nodes.IMavenRepositoryNode;
-import org.eclipse.m2e.core.ui.internal.views.nodes.RepositoryNode;
-import org.eclipse.m2e.core.util.M2EUtils;
-
/**
* RepositoryViewLabelProvider
*
@@ -45,7 +44,7 @@ public class RepositoryViewLabelProvider extends LabelProvider implements IColor
size = Math.max(size, data[i].getHeight());
}
}
- italicFont = M2EUtils.deriveFont(treeFont, SWT.ITALIC, size);
+ italicFont = M2EUIUtils.deriveFont(treeFont, SWT.ITALIC, size);
}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/AbstractIndexedRepositoryNode.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/AbstractIndexedRepositoryNode.java
index a6fb9f55..2d1755b6 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/AbstractIndexedRepositoryNode.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/AbstractIndexedRepositoryNode.java
@@ -14,12 +14,11 @@ package org.eclipse.m2e.core.ui.internal.views.nodes;
import java.util.Arrays;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.swt.graphics.Image;
-
-import org.eclipse.m2e.core.MavenImages;
import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.internal.index.IndexedArtifactGroup;
import org.eclipse.m2e.core.internal.index.NexusIndex;
+import org.eclipse.m2e.core.ui.internal.MavenImages;
+import org.eclipse.swt.graphics.Image;
/**
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/AbstractRepositoriesNode.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/AbstractRepositoriesNode.java
index bb80d447..c1b24b70 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/AbstractRepositoriesNode.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/AbstractRepositoriesNode.java
@@ -14,14 +14,13 @@ package org.eclipse.m2e.core.ui.internal.views.nodes;
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.swt.graphics.Image;
-
-import org.eclipse.m2e.core.MavenImages;
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.internal.index.NexusIndex;
import org.eclipse.m2e.core.internal.index.NexusIndexManager;
import org.eclipse.m2e.core.repository.IRepository;
import org.eclipse.m2e.core.repository.IRepositoryRegistry;
+import org.eclipse.m2e.core.ui.internal.MavenImages;
+import org.eclipse.swt.graphics.Image;
/**
* AbstractRepositoriesNode
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/CustomRepositoriesNode.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/CustomRepositoriesNode.java
index 678dcbdd..678dcbdd 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/CustomRepositoriesNode.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/CustomRepositoriesNode.java
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/GlobalRepositoriesNode.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/GlobalRepositoriesNode.java
index 7eef0deb..7eef0deb 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/GlobalRepositoriesNode.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/GlobalRepositoriesNode.java
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/IArtifactNode.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/IArtifactNode.java
index 54c908fb..54c908fb 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/IArtifactNode.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/IArtifactNode.java
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/IMavenRepositoryNode.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/IMavenRepositoryNode.java
index b296ca7f..b296ca7f 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/IMavenRepositoryNode.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/IMavenRepositoryNode.java
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/IndexedArtifactFileNode.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/IndexedArtifactFileNode.java
index 4f9d5702..91b140c0 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/IndexedArtifactFileNode.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/IndexedArtifactFileNode.java
@@ -11,12 +11,11 @@
package org.eclipse.m2e.core.ui.internal.views.nodes;
-import org.eclipse.swt.graphics.Image;
-
-import org.eclipse.m2e.core.MavenImages;
import org.eclipse.m2e.core.index.IIndex;
import org.eclipse.m2e.core.index.IndexedArtifactFile;
import org.eclipse.m2e.core.internal.index.NexusIndexManager;
+import org.eclipse.m2e.core.ui.internal.MavenImages;
+import org.eclipse.swt.graphics.Image;
/**
* IndexedArtifactFileNode
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/IndexedArtifactGroupNode.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/IndexedArtifactGroupNode.java
index 28f5b5c4..6c411fa3 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/IndexedArtifactGroupNode.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/IndexedArtifactGroupNode.java
@@ -14,14 +14,13 @@ package org.eclipse.m2e.core.ui.internal.views.nodes;
import java.util.ArrayList;
import java.util.Collection;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.index.IndexedArtifact;
import org.eclipse.m2e.core.internal.index.IndexedArtifactGroup;
import org.eclipse.m2e.core.internal.index.NexusIndexManager;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.PlatformUI;
/**
* IndexedArtifactGroupNode
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/IndexedArtifactNode.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/IndexedArtifactNode.java
index 23c3a8e0..7e295320 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/IndexedArtifactNode.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/IndexedArtifactNode.java
@@ -14,12 +14,11 @@ package org.eclipse.m2e.core.ui.internal.views.nodes;
import java.util.ArrayList;
import java.util.Set;
-import org.eclipse.swt.graphics.Image;
-
-import org.eclipse.m2e.core.MavenImages;
import org.eclipse.m2e.core.index.IndexedArtifact;
import org.eclipse.m2e.core.index.IndexedArtifactFile;
import org.eclipse.m2e.core.internal.Messages;
+import org.eclipse.m2e.core.ui.internal.MavenImages;
+import org.eclipse.swt.graphics.Image;
/**
* IndexedArtifactNode
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/LocalRepositoryNode.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/LocalRepositoryNode.java
index e46218be..e46218be 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/LocalRepositoryNode.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/LocalRepositoryNode.java
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/LocalRepositoryRootNode.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/LocalRepositoryRootNode.java
index 69b6bb17..4ed2d2c3 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/LocalRepositoryRootNode.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/LocalRepositoryRootNode.java
@@ -11,13 +11,12 @@
package org.eclipse.m2e.core.ui.internal.views.nodes;
-import org.eclipse.swt.graphics.Image;
-
-import org.eclipse.m2e.core.MavenImages;
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.internal.Messages;
import org.eclipse.m2e.core.internal.index.NexusIndex;
import org.eclipse.m2e.core.internal.index.NexusIndexManager;
+import org.eclipse.m2e.core.ui.internal.MavenImages;
+import org.eclipse.swt.graphics.Image;
/**
* LocalRepositoryNode
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/ProjectRepositoriesNode.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/ProjectRepositoriesNode.java
index 2c96cc27..69ab7d64 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/ProjectRepositoriesNode.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/ProjectRepositoriesNode.java
@@ -13,15 +13,14 @@ package org.eclipse.m2e.core.ui.internal.views.nodes;
import java.util.ArrayList;
-import org.eclipse.swt.graphics.Image;
-
-import org.eclipse.m2e.core.MavenImages;
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.internal.Messages;
import org.eclipse.m2e.core.internal.index.NexusIndex;
import org.eclipse.m2e.core.internal.index.NexusIndexManager;
import org.eclipse.m2e.core.repository.IRepository;
import org.eclipse.m2e.core.repository.IRepositoryRegistry;
+import org.eclipse.m2e.core.ui.internal.MavenImages;
+import org.eclipse.swt.graphics.Image;
/**
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/RepositoryNode.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/RepositoryNode.java
index 849df8bf..849df8bf 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/RepositoryNode.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/RepositoryNode.java
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/WorkspaceRepositoryNode.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/WorkspaceRepositoryNode.java
index 4cbb19fe..4cbb19fe 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/WorkspaceRepositoryNode.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/WorkspaceRepositoryNode.java
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/AbstactCreateMavenProjectJob.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/AbstactCreateMavenProjectJob.java
new file mode 100644
index 00000000..38639f93
--- /dev/null
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/AbstactCreateMavenProjectJob.java
@@ -0,0 +1,80 @@
+/*******************************************************************************
+ * Copyright (c) 2008-2010 Sonatype, Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Sonatype, Inc. - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.m2e.core.ui.internal.wizards;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.WorkspaceJob;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.m2e.core.project.IMavenProjectImportResult;
+import org.eclipse.m2e.core.ui.internal.actions.OpenMavenConsoleAction;
+import org.eclipse.ui.IWorkingSet;
+import org.eclipse.ui.progress.IProgressConstants;
+
+
+public abstract class AbstactCreateMavenProjectJob extends WorkspaceJob {
+
+ private final List<IWorkingSet> workingSets;
+
+ public AbstactCreateMavenProjectJob(String name, List<IWorkingSet> workingSets) {
+ super(name);
+ this.workingSets = workingSets;
+ }
+
+ @Override
+ public final IStatus runInWorkspace(IProgressMonitor monitor) throws CoreException {
+ setProperty(IProgressConstants.ACTION_PROPERTY, new OpenMavenConsoleAction());
+ List<IProject> projects = doCreateMavenProjects(monitor);
+ if(projects != null) {
+ for(IProject project : projects) {
+ addToWorkingSets(project, workingSets);
+ }
+ }
+ return Status.OK_STATUS;
+ }
+
+ protected abstract List<IProject> doCreateMavenProjects(IProgressMonitor monitor) throws CoreException;
+
+ // PlatformUI.getWorkbench().getWorkingSetManager().addToWorkingSets(project, new IWorkingSet[] {workingSet});
+ public static void addToWorkingSets(IProject project, List<IWorkingSet> workingSets) {
+ if(workingSets != null && workingSets.size() > 0) {
+ // IAdaptable[] elements = workingSet.adaptElements(new IAdaptable[] {project});
+ // if(elements.length == 1) {
+ for(IWorkingSet workingSet : workingSets) {
+ if (workingSet!=null) {
+ IAdaptable[] oldElements = workingSet.getElements();
+ IAdaptable[] newElements = new IAdaptable[oldElements.length + 1];
+ System.arraycopy(oldElements, 0, newElements, 0, oldElements.length);
+ newElements[oldElements.length] = project;
+ workingSet.setElements(newElements);
+ }
+ }
+ }
+ }
+
+ protected static ArrayList<IProject> toProjects(List<IMavenProjectImportResult> results) {
+ ArrayList<IProject> projects = new ArrayList<IProject>();
+ for (IMavenProjectImportResult result : results) {
+ if (result.getProject()!=null) {
+ projects.add(result.getProject());
+ }
+ }
+ return projects;
+ }
+
+}
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/AbstractMavenProjectWizard.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/AbstractMavenProjectWizard.java
new file mode 100644
index 00000000..74a272cb
--- /dev/null
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/AbstractMavenProjectWizard.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2008-2010 Sonatype, Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Sonatype, Inc. - initial API and implementation
+ *******************************************************************************/
+
+
+package org.eclipse.m2e.core.ui.internal.wizards;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.m2e.core.project.ProjectImportConfiguration;
+import org.eclipse.m2e.core.ui.internal.actions.SelectionUtil;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkingSet;
+
+
+public abstract class AbstractMavenProjectWizard extends Wizard {
+
+ protected IStructuredSelection selection;
+
+ protected ProjectImportConfiguration importConfiguration;
+
+ protected List<IWorkingSet> workingSets = new ArrayList<IWorkingSet>();
+
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+ this.selection = selection;
+ this.importConfiguration = new ProjectImportConfiguration();
+ this.workingSets.add(SelectionUtil.getSelectedWorkingSet(selection));
+ }
+
+}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/AbstractMavenWizardPage.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/AbstractMavenWizardPage.java
index cac68318..9b065a8b 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/AbstractMavenWizardPage.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/AbstractMavenWizardPage.java
@@ -9,7 +9,7 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.wizards;
+package org.eclipse.m2e.core.ui.internal.wizards;
import java.util.ArrayList;
import java.util.HashMap;
@@ -24,13 +24,13 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.dialogs.DialogSettings;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.core.Messages;
import org.eclipse.m2e.core.project.ProjectImportConfiguration;
+import org.eclipse.m2e.core.ui.internal.M2EUIPluginActivator;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
/**
@@ -131,7 +131,7 @@ public abstract class AbstractMavenWizardPage extends WizardPage {
pluginSettings = new DialogSettings("Workbench");
}
else {
- pluginSettings = MavenPlugin.getDefault().getDialogSettings();
+ pluginSettings = M2EUIPluginActivator.getDefault().getDialogSettings();
}
dialogSettings = pluginSettings.getSection(getName());
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/CustomArchetypeDialog.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/CustomArchetypeDialog.java
index bd919d54..28c0ecb5 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/CustomArchetypeDialog.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/CustomArchetypeDialog.java
@@ -9,7 +9,7 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.wizards;
+package org.eclipse.m2e.core.ui.internal.wizards;
import java.util.ArrayList;
import java.util.Arrays;
@@ -20,6 +20,8 @@ import org.eclipse.jface.dialogs.DialogSettings;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.dialogs.TitleAreaDialog;
+import org.eclipse.m2e.core.internal.Messages;
+import org.eclipse.m2e.core.ui.internal.M2EUIPluginActivator;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
@@ -31,9 +33,6 @@ import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.internal.Messages;
-
/**
* Custom Archetype dialog
*
@@ -81,7 +80,7 @@ public class CustomArchetypeDialog extends TitleAreaDialog {
this.message = Messages.CustomArchetypeDialog_message;
setShellStyle(SWT.DIALOG_TRIM);
- IDialogSettings pluginSettings = MavenPlugin.getDefault().getDialogSettings();
+ IDialogSettings pluginSettings = M2EUIPluginActivator.getDefault().getDialogSettings();
dialogSettings = pluginSettings.getSection(DIALOG_SETTINGS);
if(dialogSettings == null) {
dialogSettings = new DialogSettings(DIALOG_SETTINGS);
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenArtifactComponent.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenArtifactComponent.java
index 28ed3647..5ebdb92f 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenArtifactComponent.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenArtifactComponent.java
@@ -9,8 +9,10 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.wizards;
+package org.eclipse.m2e.core.ui.internal.wizards;
+import org.apache.maven.model.Model;
+import org.eclipse.m2e.core.core.Messages;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.layout.GridData;
@@ -21,10 +23,6 @@ import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
-import org.apache.maven.model.Model;
-
-import org.eclipse.m2e.core.core.Messages;
-
public class MavenArtifactComponent extends Composite {
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenCheckoutLocationPage.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenCheckoutLocationPage.java
index 0e6e4307..33c26a4a 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenCheckoutLocationPage.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenCheckoutLocationPage.java
@@ -9,13 +9,20 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.wizards;
+package org.eclipse.m2e.core.ui.internal.wizards;
import java.util.LinkedHashSet;
import java.util.Set;
+import org.apache.maven.model.Scm;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.wizard.IWizardContainer;
+import org.eclipse.m2e.core.internal.Messages;
+import org.eclipse.m2e.core.project.ProjectImportConfiguration;
+import org.eclipse.m2e.scm.ScmHandlerFactory;
+import org.eclipse.m2e.scm.ScmHandlerUi;
+import org.eclipse.m2e.scm.ScmTag;
+import org.eclipse.m2e.scm.ScmUrl;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
@@ -32,15 +39,6 @@ import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
-import org.apache.maven.model.Scm;
-
-import org.eclipse.m2e.core.internal.Messages;
-import org.eclipse.m2e.core.project.ProjectImportConfiguration;
-import org.eclipse.m2e.core.scm.ScmHandlerFactory;
-import org.eclipse.m2e.core.scm.ScmHandlerUi;
-import org.eclipse.m2e.core.scm.ScmTag;
-import org.eclipse.m2e.core.scm.ScmUrl;
-
/**
* @author Eugene Kuleshov
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenCheckoutWizard.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenCheckoutWizard.java
index 53f3b54a..1705d282 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenCheckoutWizard.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenCheckoutWizard.java
@@ -9,29 +9,25 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.wizards;
+package org.eclipse.m2e.core.ui.internal.wizards;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
+import org.apache.maven.model.Scm;
import org.eclipse.core.runtime.IAdapterManager;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.Platform;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.ui.IImportWizard;
-import org.eclipse.ui.INewWizard;
-import org.eclipse.ui.IWorkbench;
-
-import org.apache.maven.model.Scm;
-
-import org.eclipse.m2e.core.actions.SelectionUtil;
import org.eclipse.m2e.core.core.IMavenConstants;
import org.eclipse.m2e.core.internal.Messages;
import org.eclipse.m2e.core.project.MavenProjectScmInfo;
-import org.eclipse.m2e.core.project.ProjectImportConfiguration;
-import org.eclipse.m2e.core.scm.ScmUrl;
+import org.eclipse.m2e.core.ui.internal.actions.SelectionUtil;
+import org.eclipse.m2e.scm.ScmUrl;
+import org.eclipse.ui.IImportWizard;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbench;
/**
@@ -39,10 +35,8 @@ import org.eclipse.m2e.core.scm.ScmUrl;
*
* @author Eugene Kuleshov
*/
-public class MavenCheckoutWizard extends Wizard implements IImportWizard, INewWizard {
+public class MavenCheckoutWizard extends AbstractMavenProjectWizard implements IImportWizard, INewWizard {
- private final ProjectImportConfiguration importConfiguration = new ProjectImportConfiguration();
-
private ScmUrl[] urls;
private String parentUrl;
@@ -51,9 +45,6 @@ public class MavenCheckoutWizard extends Wizard implements IImportWizard, INewWi
private MavenProjectWizardLocationPage locationPage;
- private IStructuredSelection selection;
-
-
public MavenCheckoutWizard() {
this(null);
setNeedsProgressMonitor(true);
@@ -66,15 +57,15 @@ public class MavenCheckoutWizard extends Wizard implements IImportWizard, INewWi
}
public void init(IWorkbench workbench, IStructuredSelection selection) {
+ super.init(workbench, selection);
+
this.selection = selection;
-
- importConfiguration.setWorkingSet(SelectionUtil.getSelectedWorkingSet(selection));
-
+
ArrayList<ScmUrl> urls = new ArrayList<ScmUrl>();
IAdapterManager adapterManager = Platform.getAdapterManager();
for(Iterator<?> it = selection.iterator(); it.hasNext();) {
ScmUrl url = (ScmUrl) adapterManager.getAdapter(it.next(), ScmUrl.class);
- if(url!=null) {
+ if(url != null) {
urls.add(url);
}
}
@@ -110,7 +101,7 @@ public class MavenCheckoutWizard extends Wizard implements IImportWizard, INewWi
locationPage = new MavenProjectWizardLocationPage(importConfiguration, //
Messages.MavenCheckoutWizard_location1,
- Messages.MavenCheckoutWizard_location2);
+ Messages.MavenCheckoutWizard_location2, workingSets);
locationPage.setLocationPath(SelectionUtil.getSelectedLocation(selection));
addPage(scheckoutPage);
@@ -162,7 +153,7 @@ public class MavenCheckoutWizard extends Wizard implements IImportWizard, INewWi
mavenProjects.add(projectInfo);
}
- MavenProjectCheckoutJob job = new MavenProjectCheckoutJob(importConfiguration, checkoutAllProjects) {
+ MavenProjectCheckoutJob job = new MavenProjectCheckoutJob(importConfiguration, checkoutAllProjects, workingSets) {
protected Collection<MavenProjectScmInfo> getProjects(IProgressMonitor monitor) {
return mavenProjects;
}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenDependenciesWizardPage.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenDependenciesWizardPage.java
index fc0cfce6..b5c4ba43 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenDependenciesWizardPage.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenDependenciesWizardPage.java
@@ -9,12 +9,13 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.wizards;
+package org.eclipse.m2e.core.ui.internal.wizards;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
+import org.apache.maven.model.Dependency;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.LabelProvider;
@@ -24,6 +25,12 @@ import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerComparator;
import org.eclipse.jface.window.Window;
import org.eclipse.jface.wizard.IWizardContainer;
+import org.eclipse.m2e.core.core.Messages;
+import org.eclipse.m2e.core.index.IndexedArtifact;
+import org.eclipse.m2e.core.index.IndexedArtifactFile;
+import org.eclipse.m2e.core.project.ProjectImportConfiguration;
+import org.eclipse.m2e.core.ui.internal.MavenImages;
+import org.eclipse.m2e.core.ui.internal.dialogs.MavenRepositorySearchDialog;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
@@ -34,16 +41,6 @@ import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
-import org.apache.maven.model.Dependency;
-
-import org.eclipse.m2e.core.MavenImages;
-import org.eclipse.m2e.core.core.Messages;
-import org.eclipse.m2e.core.index.IndexedArtifact;
-import org.eclipse.m2e.core.index.IndexedArtifactFile;
-import org.eclipse.m2e.core.project.ProjectImportConfiguration;
-import org.eclipse.m2e.core.ui.dialogs.MavenRepositorySearchDialog;
-
-
/**
* Wizard page for gathering information about Maven artifacts. Allows to select
* artifacts from the repository index.
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenImportWizard.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenImportWizard.java
index 3eeafc8b..f23b2dfe 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenImportWizard.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenImportWizard.java
@@ -9,31 +9,26 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.wizards;
+package org.eclipse.m2e.core.ui.internal.wizards;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
-import org.eclipse.core.resources.WorkspaceJob;
+import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.ui.IImportWizard;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.progress.IProgressConstants;
-
import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.actions.OpenMavenConsoleAction;
-import org.eclipse.m2e.core.actions.SelectionUtil;
import org.eclipse.m2e.core.internal.Messages;
+import org.eclipse.m2e.core.project.IMavenProjectImportResult;
import org.eclipse.m2e.core.project.MavenProjectInfo;
import org.eclipse.m2e.core.project.ProjectImportConfiguration;
+import org.eclipse.m2e.core.ui.internal.actions.SelectionUtil;
+import org.eclipse.ui.IImportWizard;
+import org.eclipse.ui.IWorkbench;
/**
@@ -41,10 +36,8 @@ import org.eclipse.m2e.core.project.ProjectImportConfiguration;
*
* @author Eugene Kuleshov
*/
-public class MavenImportWizard extends Wizard implements IImportWizard {
+public class MavenImportWizard extends AbstractMavenProjectWizard implements IImportWizard {
- final ProjectImportConfiguration importConfiguration;
-
private MavenImportWizardPage page;
private List<String> locations;
@@ -52,31 +45,29 @@ public class MavenImportWizard extends Wizard implements IImportWizard {
private boolean showLocation = true;
public MavenImportWizard() {
- importConfiguration = new ProjectImportConfiguration();
setNeedsProgressMonitor(true);
setWindowTitle(Messages.MavenImportWizard_title);
}
public MavenImportWizard(ProjectImportConfiguration importConfiguration, List<String> locations) {
- this.importConfiguration = importConfiguration;
this.locations = locations;
this.showLocation = false;
setNeedsProgressMonitor(true);
}
public void init(IWorkbench workbench, IStructuredSelection selection) {
+ super.init(workbench, selection);
+
if(locations == null || locations.isEmpty()) {
IPath location = SelectionUtil.getSelectedLocation(selection);
if(location != null) {
locations = Collections.singletonList(location.toOSString());
}
}
-
- importConfiguration.setWorkingSet(SelectionUtil.getSelectedWorkingSet(selection));
}
public void addPages() {
- page = new MavenImportWizardPage(importConfiguration);
+ page = new MavenImportWizardPage(importConfiguration, workingSets);
page.setLocations(locations);
page.setShowLocation(showLocation);
addPage(page);
@@ -91,17 +82,12 @@ public class MavenImportWizard extends Wizard implements IImportWizard {
final MavenPlugin plugin = MavenPlugin.getDefault();
- Job job = new WorkspaceJob(Messages.MavenImportWizard_job) {
- public IStatus runInWorkspace(IProgressMonitor monitor) {
- setProperty(IProgressConstants.ACTION_PROPERTY, new OpenMavenConsoleAction());
- try {
- plugin.getProjectConfigurationManager().importProjects(projects, importConfiguration, monitor);
- } catch(CoreException ex) {
- plugin.getConsole().logError("Projects imported with errors");
- return ex.getStatus();
- }
-
- return Status.OK_STATUS;
+ Job job = new AbstactCreateMavenProjectJob(Messages.MavenImportWizard_job, workingSets) {
+ @Override
+ protected List<IProject> doCreateMavenProjects(IProgressMonitor monitor) throws CoreException {
+ List<IMavenProjectImportResult> results = plugin.getProjectConfigurationManager().importProjects(projects,
+ importConfiguration, monitor);
+ return toProjects(results);
}
};
job.setRule(plugin.getProjectConfigurationManager().getRule());
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenImportWizardPage.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenImportWizardPage.java
index f838854f..c1633138 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenImportWizardPage.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenImportWizardPage.java
@@ -9,7 +9,7 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.wizards;
+package org.eclipse.m2e.core.ui.internal.wizards;
import java.io.File;
import java.lang.reflect.InvocationTargetException;
@@ -18,6 +18,8 @@ import java.util.Collection;
import java.util.List;
import java.util.Set;
+import org.apache.maven.model.Model;
+import org.apache.maven.model.Parent;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.IWorkspaceRoot;
@@ -36,6 +38,14 @@ import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.core.MavenLogger;
+import org.eclipse.m2e.core.core.Messages;
+import org.eclipse.m2e.core.embedder.MavenModelManager;
+import org.eclipse.m2e.core.project.AbstractProjectScanner;
+import org.eclipse.m2e.core.project.LocalProjectScanner;
+import org.eclipse.m2e.core.project.MavenProjectInfo;
+import org.eclipse.m2e.core.project.ProjectImportConfiguration;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
@@ -51,19 +61,7 @@ import org.eclipse.swt.widgets.DirectoryDialog;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Tree;
-
-import org.apache.maven.model.Model;
-import org.apache.maven.model.Parent;
-
-import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.core.MavenConsole;
-import org.eclipse.m2e.core.core.MavenLogger;
-import org.eclipse.m2e.core.core.Messages;
-import org.eclipse.m2e.core.embedder.MavenModelManager;
-import org.eclipse.m2e.core.project.AbstractProjectScanner;
-import org.eclipse.m2e.core.project.LocalProjectScanner;
-import org.eclipse.m2e.core.project.MavenProjectInfo;
-import org.eclipse.m2e.core.project.ProjectImportConfiguration;
+import org.eclipse.ui.IWorkingSet;
/**
@@ -87,8 +85,11 @@ public class MavenImportWizardPage extends AbstractMavenWizardPage {
private boolean showLocation = true;
- protected MavenImportWizardPage(ProjectImportConfiguration importConfiguration) {
+ private final List<IWorkingSet> workingSets;
+
+ protected MavenImportWizardPage(ProjectImportConfiguration importConfiguration, List<IWorkingSet> workingSets) {
super("MavenProjectImportWizardPage", importConfiguration);
+ this.workingSets = workingSets;
setTitle(org.eclipse.m2e.core.internal.Messages.MavenImportWizardPage_title);
setDescription(org.eclipse.m2e.core.internal.Messages.MavenImportWizardPage_desc);
setPageComplete(false);
@@ -264,7 +265,7 @@ public class MavenImportWizardPage extends AbstractMavenWizardPage {
}
});
- this.workingSetGroup = new WorkingSetGroup(composite, getImportConfiguration(), getShell());
+ this.workingSetGroup = new WorkingSetGroup(composite, workingSets, getShell());
createAdvancedSettings(composite, new GridData(SWT.FILL, SWT.TOP, false, false, 3, 1));
resolverConfigurationComponent.template.addModifyListener(new ModifyListener(){
@@ -391,11 +392,10 @@ public class MavenImportWizardPage extends AbstractMavenWizardPage {
File root = workspaceRoot.getLocation().toFile();
MavenPlugin mavenPlugin = MavenPlugin.getDefault();
MavenModelManager modelManager = mavenPlugin.getMavenModelManager();
- MavenConsole console = mavenPlugin.getConsole();
if(showLocation || locations == null || locations.isEmpty()) {
- return new LocalProjectScanner(root, rootDirectoryCombo.getText(), false, modelManager, console);
+ return new LocalProjectScanner(root, rootDirectoryCombo.getText(), false, modelManager);
}
- return new LocalProjectScanner(root, locations, true, modelManager, console);
+ return new LocalProjectScanner(root, locations, true, modelManager);
}
/**
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenInstallFileArtifactWizardPage.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenInstallFileArtifactWizardPage.java
index adbcd2a0..02e2dbc5 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenInstallFileArtifactWizardPage.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenInstallFileArtifactWizardPage.java
@@ -9,13 +9,21 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.wizards;
+package org.eclipse.m2e.core.ui.internal.wizards;
import java.io.File;
+import org.apache.maven.project.MavenProject;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.core.MavenLogger;
+import org.eclipse.m2e.core.embedder.ArtifactKey;
+import org.eclipse.m2e.core.embedder.IMaven;
+import org.eclipse.m2e.core.index.IndexedArtifactFile;
+import org.eclipse.m2e.core.internal.Messages;
+import org.eclipse.m2e.core.ui.internal.actions.SelectionUtil;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
@@ -31,16 +39,6 @@ import org.eclipse.swt.widgets.FileDialog;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
-import org.apache.maven.project.MavenProject;
-
-import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.actions.SelectionUtil;
-import org.eclipse.m2e.core.core.MavenLogger;
-import org.eclipse.m2e.core.embedder.ArtifactKey;
-import org.eclipse.m2e.core.embedder.IMaven;
-import org.eclipse.m2e.core.index.IndexedArtifactFile;
-import org.eclipse.m2e.core.internal.Messages;
-
/**
* Wizard page to enter parameters required for artifact installation.
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenInstallFileRepositoryWizardPage.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenInstallFileRepositoryWizardPage.java
index ef199a8f..aaff216b 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenInstallFileRepositoryWizardPage.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenInstallFileRepositoryWizardPage.java
@@ -9,7 +9,7 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.wizards;
+package org.eclipse.m2e.core.ui.internal.wizards;
import java.io.File;
@@ -21,17 +21,16 @@ import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.model.edit.pom.Model;
import org.eclipse.m2e.model.edit.pom.PomFactory;
import org.eclipse.m2e.model.edit.pom.Repository;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
/**
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenInstallFileWizard.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenInstallFileWizard.java
index 23212884..00b88ea3 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenInstallFileWizard.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenInstallFileWizard.java
@@ -9,12 +9,14 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.wizards;
+package org.eclipse.m2e.core.ui.internal.wizards;
import java.util.Arrays;
import java.util.List;
import java.util.Properties;
+import org.apache.maven.execution.MavenExecutionRequest;
+import org.apache.maven.execution.MavenExecutionResult;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
@@ -24,19 +26,15 @@ import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.ui.IImportWizard;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.progress.IProgressConstants;
-
-import org.apache.maven.execution.MavenExecutionRequest;
-import org.apache.maven.execution.MavenExecutionResult;
-
import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.actions.OpenMavenConsoleAction;
import org.eclipse.m2e.core.core.IMavenConstants;
import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.embedder.IMaven;
import org.eclipse.m2e.core.internal.Messages;
+import org.eclipse.m2e.core.ui.internal.actions.OpenMavenConsoleAction;
+import org.eclipse.ui.IImportWizard;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.progress.IProgressConstants;
/**
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenLocationComponent.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenLocationComponent.java
index 534dcdfe..f7bd98e2 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenLocationComponent.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenLocationComponent.java
@@ -9,12 +9,13 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.wizards;
+package org.eclipse.m2e.core.ui.internal.wizards;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
+import org.eclipse.m2e.core.core.Messages;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionAdapter;
@@ -28,8 +29,6 @@ import org.eclipse.swt.widgets.DirectoryDialog;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
-import org.eclipse.m2e.core.core.Messages;
-
/**
* Simple GUI component which allows the user to choose between a workspace
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenMaterializePomWizard.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenMaterializePomWizard.java
index 920ab4ef..90bbb2ae 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenMaterializePomWizard.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenMaterializePomWizard.java
@@ -9,15 +9,22 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.wizards;
+package org.eclipse.m2e.core.ui.internal.wizards;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
+import org.apache.maven.model.Dependency;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.embedder.ArtifactKey;
+import org.eclipse.m2e.core.internal.Messages;
+import org.eclipse.m2e.core.project.MavenProjectPomScanner;
+import org.eclipse.m2e.core.project.MavenProjectScmInfo;
+import org.eclipse.m2e.core.project.ProjectImportConfiguration;
+import org.eclipse.m2e.core.ui.internal.actions.SelectionUtil;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Button;
@@ -26,25 +33,13 @@ import org.eclipse.ui.IImportWizard;
import org.eclipse.ui.INewWizard;
import org.eclipse.ui.IWorkbench;
-import org.apache.maven.model.Dependency;
-
-import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.actions.SelectionUtil;
-import org.eclipse.m2e.core.embedder.ArtifactKey;
-import org.eclipse.m2e.core.internal.Messages;
-import org.eclipse.m2e.core.project.MavenProjectPomScanner;
-import org.eclipse.m2e.core.project.MavenProjectScmInfo;
-import org.eclipse.m2e.core.project.ProjectImportConfiguration;
-
/**
* A wizard used to import projects for Maven artifacts
*
* @author Eugene Kuleshov
*/
-public class MavenMaterializePomWizard extends Wizard implements IImportWizard, INewWizard {
-
- ProjectImportConfiguration importConfiguration;
+public class MavenMaterializePomWizard extends AbstractMavenProjectWizard implements IImportWizard, INewWizard {
MavenDependenciesWizardPage selectionPage;
@@ -57,9 +52,6 @@ public class MavenMaterializePomWizard extends Wizard implements IImportWizard,
// TODO replace with ArtifactKey
private Dependency[] dependencies;
- private IStructuredSelection selection;
-
-
public MavenMaterializePomWizard() {
importConfiguration = new ProjectImportConfiguration();
setNeedsProgressMonitor(true);
@@ -75,10 +67,6 @@ public class MavenMaterializePomWizard extends Wizard implements IImportWizard,
}
public void init(IWorkbench workbench, IStructuredSelection selection) {
- this.selection = selection;
-
- importConfiguration.setWorkingSet(SelectionUtil.getSelectedWorkingSet(selection));
-
ArrayList<Dependency> dependencies = new ArrayList<Dependency>();
for(Iterator<?> it = selection.iterator(); it.hasNext();) {
@@ -117,7 +105,7 @@ public class MavenMaterializePomWizard extends Wizard implements IImportWizard,
locationPage = new MavenProjectWizardLocationPage(importConfiguration, //
Messages.MavenMaterializePomWizard_location_title,
- Messages.MavenMaterializePomWizard_location_message);
+ Messages.MavenMaterializePomWizard_location_message, workingSets);
locationPage.setLocationPath(SelectionUtil.getSelectedLocation(selection));
addPage(selectionPage);
@@ -138,7 +126,7 @@ public class MavenMaterializePomWizard extends Wizard implements IImportWizard,
final boolean checkoutAllProjects = checkOutAllButton.getSelection();
final boolean developer = useDeveloperConnectionButton.getSelection();
- MavenProjectCheckoutJob job = new MavenProjectCheckoutJob(importConfiguration, checkoutAllProjects) {
+ MavenProjectCheckoutJob job = new MavenProjectCheckoutJob(importConfiguration, checkoutAllProjects, workingSets) {
protected List<MavenProjectScmInfo> getProjects(IProgressMonitor monitor) throws InterruptedException {
MavenPlugin plugin = MavenPlugin.getDefault();
MavenProjectPomScanner<MavenProjectScmInfo> scanner = new MavenProjectPomScanner<MavenProjectScmInfo>(developer, dependencies, //
@@ -159,83 +147,5 @@ public class MavenMaterializePomWizard extends Wizard implements IImportWizard,
return true;
}
-
-// public Scm[] getScms(IProgressMonitor monitor) {
-// ArrayList scms = new ArrayList();
-//
-// MavenPlugin plugin = MavenPlugin.getDefault();
-// MavenEmbedderManager embedderManager = plugin.getMavenEmbedderManager();
-// IndexManager indexManager = plugin.getMavenRepositoryIndexManager();
-// MavenConsole console = plugin.getConsole();
-//
-// MavenEmbedder embedder = embedderManager.getWorkspaceEmbedder();
-//
-// for(int i = 0; i < dependencies.length; i++ ) {
-// try {
-// Dependency d = dependencies[i];
-//
-// Artifact artifact = embedder.createArtifact(d.getGroupId(), //
-// d.getArtifactId(), d.getVersion(), null, "pom");
-//
-// List remoteRepositories = indexManager.getArtifactRepositories(null, null);
-//
-// embedder.resolve(artifact, remoteRepositories, embedder.getLocalRepository());
-//
-// File file = artifact.getFile();
-// if(file != null) {
-// MavenProject project = embedder.readProject(file);
-//
-// Scm scm = project.getScm();
-// if(scm == null) {
-// String msg = project.getId() + " doesn't specify SCM info";
-// console.logError(msg);
-// continue;
-// }
-//
-// String connection = scm.getConnection();
-// String devConnection = scm.getDeveloperConnection();
-// String tag = scm.getTag();
-// String url = scm.getUrl();
-//
-// console.logMessage(project.getArtifactId());
-// console.logMessage("Connection: " + connection);
-// console.logMessage(" dev: " + devConnection);
-// console.logMessage(" url: " + url);
-// console.logMessage(" tag: " + tag);
-//
-// if(connection==null) {
-// if(devConnection==null) {
-// String msg = project.getId() + " doesn't specify SCM connection";
-// console.logError(msg);
-// continue;
-// }
-// scm.setConnection(devConnection);
-// }
-//
-// // connection: scm:svn:https://svn.apache.org/repos/asf/incubator/wicket/branches/wicket-1.2.x/wicket
-// // dev: scm:svn:https://svn.apache.org/repos/asf/incubator/wicket/branches/wicket-1.2.x/wicket
-// // url: http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.2.x/wicket
-// // tag: HEAD
-//
-// // TODO add an option to select all modules/projects and optimize scan
-//
-// scms.add(scm);
-//
-//// if(!connection.startsWith(SCM_SVN_PROTOCOL)) {
-//// String msg = project.getId() + " SCM type is not supported " + connection;
-//// console.logError(msg);
-//// addError(new Exception(msg));
-//// } else {
-//// String svnUrl = connection.trim().substring(SCM_SVN_PROTOCOL.length());
-//// }
-// }
-//
-// } catch(Exception ex) {
-// console.logError(ex.getMessage());
-// }
-// }
-//
-// return (Scm[]) scms.toArray(new Scm[scms.size()]);
-// }
}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenModuleWizard.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenModuleWizard.java
index d9028c09..7a9e1988 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenModuleWizard.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenModuleWizard.java
@@ -9,27 +9,32 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.wizards;
+package org.eclipse.m2e.core.ui.internal.wizards;
import java.util.Arrays;
import java.util.List;
import java.util.Properties;
+import org.apache.maven.archetype.catalog.Archetype;
+import org.apache.maven.model.Dependency;
+import org.apache.maven.model.Model;
+import org.apache.maven.model.Parent;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.resources.WorkspaceJob;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.IJobChangeEvent;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.core.runtime.jobs.JobChangeAdapter;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.core.Messages;
+import org.eclipse.m2e.core.ui.internal.MavenImages;
+import org.eclipse.m2e.core.ui.internal.actions.OpenMavenConsoleAction;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionAdapter;
@@ -40,22 +45,11 @@ import org.eclipse.ui.INewWizard;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.progress.IProgressConstants;
-import org.apache.maven.archetype.catalog.Archetype;
-import org.apache.maven.model.Dependency;
-import org.apache.maven.model.Model;
-import org.apache.maven.model.Parent;
-
-import org.eclipse.m2e.core.MavenImages;
-import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.actions.OpenMavenConsoleAction;
-import org.eclipse.m2e.core.core.Messages;
-import org.eclipse.m2e.core.project.ProjectImportConfiguration;
-
/**
* A project wizard for creating a new Maven2 module project.
*/
-public class MavenModuleWizard extends Wizard implements INewWizard {
+public class MavenModuleWizard extends AbstractMavenProjectWizard implements INewWizard {
/** The name of the default wizard page image. */
// protected static final String DEFAULT_PAGE_IMAGE_NAME = "icons/new_m2_project_wizard.gif";
@@ -81,9 +75,6 @@ public class MavenModuleWizard extends Wizard implements INewWizard {
/** The wizard page for choosing the Maven2 dependencies to use. */
private MavenDependenciesWizardPage dependenciesPage;
- /** The project configuration bean. */
- protected ProjectImportConfiguration configuration;
-
private String moduleName;
protected boolean isEditor = false;
@@ -102,13 +93,11 @@ public class MavenModuleWizard extends Wizard implements INewWizard {
/** Creates the pages. */
public void addPages() {
- configuration = new ProjectImportConfiguration();
-
- parentPage = new MavenModuleWizardParentPage(configuration);
- archetypePage = new MavenProjectWizardArchetypePage(configuration);
- parametersPage = new MavenProjectWizardArchetypeParametersPage(configuration);
- artifactPage = new MavenProjectWizardArtifactPage(configuration);
- dependenciesPage = new MavenDependenciesWizardPage(configuration, //
+ parentPage = new MavenModuleWizardParentPage(importConfiguration, workingSets);
+ archetypePage = new MavenProjectWizardArchetypePage(importConfiguration);
+ parametersPage = new MavenProjectWizardArchetypeParametersPage(importConfiguration);
+ artifactPage = new MavenProjectWizardArtifactPage(importConfiguration);
+ dependenciesPage = new MavenDependenciesWizardPage(importConfiguration, //
Messages.getString("wizard.project.page.dependencies.title"), // //$NON-NLS-1$
Messages.getString("wizard.project.page.dependencies.description")); //$NON-NLS-1$
dependenciesPage.setDependencies(new Dependency[0]);
@@ -219,21 +208,22 @@ public class MavenModuleWizard extends Wizard implements INewWizard {
final String[] folders = artifactPage.getFolders();
- job = new WorkspaceJob(Messages.getString("wizard.project.job.creatingProject", moduleName)) { //$NON-NLS-1$
- public IStatus runInWorkspace(IProgressMonitor monitor) throws CoreException {
+ job = new AbstactCreateMavenProjectJob(Messages.getString("wizard.project.job.creatingProject", moduleName), workingSets) { //$NON-NLS-1$
+ @Override
+ protected List<IProject> doCreateMavenProjects(IProgressMonitor monitor) throws CoreException {
setProperty(IProgressConstants.ACTION_PROPERTY, new OpenMavenConsoleAction());
- String projectName = configuration.getProjectName(model);
- IProject project = configuration.getProject(ResourcesPlugin.getWorkspace().getRoot(), model);
+ String projectName = importConfiguration.getProjectName(model);
+ IProject project = importConfiguration.getProject(ResourcesPlugin.getWorkspace().getRoot(), model);
// XXX respect parent's setting for separate projects for modules
// XXX should run update sources on parent instead of creating new module project
plugin.getProjectConfigurationManager().createSimpleProject(project, location.append(moduleName), model,
- folders, configuration, monitor);
+ folders, importConfiguration, monitor);
setModule(projectName);
- return Status.OK_STATUS;
+ return Arrays.asList(project);
}
};
@@ -249,16 +239,17 @@ public class MavenModuleWizard extends Wizard implements INewWizard {
final String javaPackage = parametersPage.getJavaPackage();
final Properties properties = parametersPage.getProperties();
- job = new WorkspaceJob(Messages.getString("wizard.project.job.creating", archetype.getArtifactId())) { //$NON-NLS-1$
- public IStatus runInWorkspace(IProgressMonitor monitor) throws CoreException {
- setProperty(IProgressConstants.ACTION_PROPERTY, new OpenMavenConsoleAction());
+ job = new AbstactCreateMavenProjectJob(Messages.getString(
+ "wizard.project.job.creating", archetype.getArtifactId()), workingSets) { //$NON-NLS-1$
+ @Override
+ protected List<IProject> doCreateMavenProjects(IProgressMonitor monitor) throws CoreException {
MavenPlugin plugin = MavenPlugin.getDefault();
plugin.getProjectConfigurationManager().createArchetypeProject(project, location, archetype, //
- groupId, artifactId, version, javaPackage, properties, configuration, monitor);
+ groupId, artifactId, version, javaPackage, properties, importConfiguration, monitor);
setModule(moduleName);
- return Status.OK_STATUS;
+ return Arrays.asList(project);
}
};
}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenModuleWizardParentPage.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenModuleWizardParentPage.java
index 4b2c1b14..8b88cae1 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenModuleWizardParentPage.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenModuleWizardParentPage.java
@@ -9,8 +9,11 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.wizards;
+package org.eclipse.m2e.core.ui.internal.wizards;
+import java.util.List;
+
+import org.apache.maven.model.Model;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
@@ -21,6 +24,12 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
import org.eclipse.jface.window.Window;
import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.core.IMavenConstants;
+import org.eclipse.m2e.core.core.MavenLogger;
+import org.eclipse.m2e.core.core.Messages;
+import org.eclipse.m2e.core.project.ProjectImportConfiguration;
+import org.eclipse.m2e.core.ui.internal.actions.SelectionUtil;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
@@ -34,15 +43,7 @@ import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
-
-import org.apache.maven.model.Model;
-
-import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.actions.SelectionUtil;
-import org.eclipse.m2e.core.core.IMavenConstants;
-import org.eclipse.m2e.core.core.MavenLogger;
-import org.eclipse.m2e.core.core.Messages;
-import org.eclipse.m2e.core.project.ProjectImportConfiguration;
+import org.eclipse.ui.IWorkingSet;
/**
@@ -74,10 +75,13 @@ public class MavenModuleWizardParentPage extends AbstractMavenWizardPage {
/** working set selector widget */
private WorkingSetGroup workingSetGroup;
+ private final List<IWorkingSet> workingSets;
+
/** Creates a new page. */
- public MavenModuleWizardParentPage(ProjectImportConfiguration projectImportConfiguration) {
+ public MavenModuleWizardParentPage(ProjectImportConfiguration projectImportConfiguration, List<IWorkingSet> workingSets) {
super("MavenModuleWizardParentPage", projectImportConfiguration);
+ this.workingSets = workingSets;
setTitle(Messages.getString("wizard.module.page.parent.title")); //$NON-NLS-1$
setDescription(Messages.getString("wizard.module.page.parent.description")); //$NON-NLS-1$
setPageComplete(false);
@@ -134,7 +138,7 @@ public class MavenModuleWizardParentPage extends AbstractMavenWizardPage {
}
});
- this.workingSetGroup = new WorkingSetGroup(container, getImportConfiguration(), getShell());
+ this.workingSetGroup = new WorkingSetGroup(container, workingSets, getShell());
createAdvancedSettings(container, new GridData(SWT.FILL, SWT.TOP, true, false, 3, 1));
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenParentComponent.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenParentComponent.java
index b40aaeac..cda33f4f 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenParentComponent.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenParentComponent.java
@@ -9,8 +9,11 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.wizards;
+package org.eclipse.m2e.core.ui.internal.wizards;
+import org.apache.maven.model.Model;
+import org.apache.maven.model.Parent;
+import org.eclipse.m2e.core.core.Messages;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionAdapter;
@@ -25,11 +28,6 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
-import org.apache.maven.model.Model;
-import org.apache.maven.model.Parent;
-
-import org.eclipse.m2e.core.core.Messages;
-
/**
* Wizard page component showing panel project properties.
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenPomSelectionComponent.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenPomSelectionComponent.java
index 2e6721c5..8b98b1da 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenPomSelectionComponent.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenPomSelectionComponent.java
@@ -9,7 +9,7 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.wizards;
+package org.eclipse.m2e.core.ui.internal.wizards;
import java.util.Collections;
import java.util.HashSet;
@@ -17,8 +17,7 @@ import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;
-import com.ibm.icu.text.DateFormat;
-
+import org.apache.lucene.search.BooleanQuery;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
@@ -36,6 +35,16 @@ import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.StyledString;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.core.IMavenConstants;
+import org.eclipse.m2e.core.embedder.ArtifactKey;
+import org.eclipse.m2e.core.index.IIndex;
+import org.eclipse.m2e.core.index.IndexManager;
+import org.eclipse.m2e.core.index.IndexedArtifact;
+import org.eclipse.m2e.core.index.IndexedArtifactFile;
+import org.eclipse.m2e.core.index.UserInputSearchExpression;
+import org.eclipse.m2e.core.internal.Messages;
+import org.eclipse.m2e.core.ui.internal.MavenImages;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.FocusEvent;
@@ -55,18 +64,7 @@ import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeItem;
-import org.apache.lucene.search.BooleanQuery;
-
-import org.eclipse.m2e.core.MavenImages;
-import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.core.IMavenConstants;
-import org.eclipse.m2e.core.embedder.ArtifactKey;
-import org.eclipse.m2e.core.index.IIndex;
-import org.eclipse.m2e.core.index.IndexManager;
-import org.eclipse.m2e.core.index.IndexedArtifact;
-import org.eclipse.m2e.core.index.IndexedArtifactFile;
-import org.eclipse.m2e.core.index.UserInputSearchExpression;
-import org.eclipse.m2e.core.internal.Messages;
+import com.ibm.icu.text.DateFormat;
/**
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenPomWizard.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenPomWizard.java
index b3c5b2cc..2b0eb6f6 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenPomWizard.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenPomWizard.java
@@ -9,13 +9,15 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.wizards;
+package org.eclipse.m2e.core.ui.internal.wizards;
import java.io.File;
import java.lang.reflect.InvocationTargetException;
import java.util.Arrays;
import java.util.List;
+import org.apache.maven.model.Dependency;
+import org.apache.maven.model.Model;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
@@ -31,6 +33,11 @@ import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.core.IMavenConstants;
+import org.eclipse.m2e.core.core.MavenLogger;
+import org.eclipse.m2e.core.embedder.MavenModelManager;
+import org.eclipse.m2e.core.internal.Messages;
import org.eclipse.osgi.util.NLS;
import org.eclipse.ui.INewWizard;
import org.eclipse.ui.IWorkbench;
@@ -40,15 +47,6 @@ import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.ide.IDE;
-import org.apache.maven.model.Dependency;
-import org.apache.maven.model.Model;
-
-import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.core.IMavenConstants;
-import org.eclipse.m2e.core.core.MavenLogger;
-import org.eclipse.m2e.core.embedder.MavenModelManager;
-import org.eclipse.m2e.core.internal.Messages;
-
/**
* New POM wizard
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenPomWizardPage.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenPomWizardPage.java
index b2b62645..f347e879 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenPomWizardPage.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenPomWizardPage.java
@@ -9,8 +9,9 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.wizards;
+package org.eclipse.m2e.core.ui.internal.wizards;
+import org.apache.maven.model.Model;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
@@ -18,6 +19,7 @@ import org.eclipse.core.runtime.Path;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.window.Window;
+import org.eclipse.m2e.core.internal.Messages;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
@@ -31,10 +33,6 @@ import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.dialogs.ContainerSelectionDialog;
-import org.apache.maven.model.Model;
-
-import org.eclipse.m2e.core.internal.Messages;
-
/**
* Wizard page used to specify basic POM parameters
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenProjectCheckoutJob.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenProjectCheckoutJob.java
index f894e0f6..e0bc6205 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenProjectCheckoutJob.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenProjectCheckoutJob.java
@@ -9,7 +9,7 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.wizards;
+package org.eclipse.m2e.core.ui.internal.wizards;
import java.io.File;
import java.io.IOException;
@@ -18,6 +18,9 @@ import java.util.Collection;
import java.util.List;
import java.util.Set;
+import org.apache.maven.model.Model;
+import org.codehaus.plexus.util.DirectoryScanner;
+import org.codehaus.plexus.util.FileUtils;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.resources.ResourcesPlugin;
@@ -33,30 +36,26 @@ import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.window.Window;
import org.eclipse.jface.wizard.IWizard;
import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.dnd.TextTransfer;
-import org.eclipse.swt.dnd.Transfer;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.NewProjectAction;
-import org.eclipse.ui.progress.IProgressConstants;
-
-import org.codehaus.plexus.util.DirectoryScanner;
-import org.codehaus.plexus.util.FileUtils;
-
-import org.apache.maven.model.Model;
-
import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.actions.OpenMavenConsoleAction;
import org.eclipse.m2e.core.core.MavenConsole;
import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.embedder.MavenModelManager;
import org.eclipse.m2e.core.internal.Messages;
+import org.eclipse.m2e.core.project.IMavenProjectImportResult;
import org.eclipse.m2e.core.project.LocalProjectScanner;
import org.eclipse.m2e.core.project.MavenProjectInfo;
import org.eclipse.m2e.core.project.MavenProjectScmInfo;
import org.eclipse.m2e.core.project.ProjectImportConfiguration;
-import org.eclipse.m2e.core.scm.MavenCheckoutOperation;
+import org.eclipse.m2e.core.ui.internal.actions.OpenMavenConsoleAction;
+import org.eclipse.m2e.scm.MavenCheckoutOperation;
+import org.eclipse.swt.dnd.Clipboard;
+import org.eclipse.swt.dnd.TextTransfer;
+import org.eclipse.swt.dnd.Transfer;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IWorkingSet;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.actions.NewProjectAction;
+import org.eclipse.ui.progress.IProgressConstants;
/**
@@ -76,10 +75,14 @@ public abstract class MavenProjectCheckoutJob extends WorkspaceJob {
List<String> collectedLocations = new ArrayList<String>();
- public MavenProjectCheckoutJob(ProjectImportConfiguration importConfiguration, boolean checkoutAllProjects) {
+ final List<IWorkingSet> workingSets;
+
+ public MavenProjectCheckoutJob(ProjectImportConfiguration importConfiguration, boolean checkoutAllProjects,
+ List<IWorkingSet> workingSets) {
super(Messages.MavenProjectCheckoutJob_title);
this.configuration = importConfiguration;
this.checkoutAllProjects = checkoutAllProjects;
+ this.workingSets = workingSets;
setProperty(IProgressConstants.ACTION_PROPERTY, new OpenMavenConsoleAction());
addJobChangeListener(new CheckoutJobChangeListener());
@@ -108,11 +111,11 @@ public abstract class MavenProjectCheckoutJob extends WorkspaceJob {
MavenModelManager modelManager = plugin.getMavenModelManager();
LocalProjectScanner scanner = new LocalProjectScanner(workspace.getLocation().toFile(), operation.getLocations(),
- true, modelManager, console);
+ true, modelManager);
scanner.run(monitor);
this.projects = plugin.getProjectConfigurationManager().collectProjects(scanner.getProjects());
-
+
if(checkoutAllProjects) {
// check if there any project name conflicts
for(MavenProjectInfo projectInfo : projects) {
@@ -206,21 +209,19 @@ public abstract class MavenProjectCheckoutJob extends WorkspaceJob {
if(checkoutAllProjects) {
final MavenPlugin plugin = MavenPlugin.getDefault();
- WorkspaceJob job = new WorkspaceJob(Messages.MavenProjectCheckoutJob_job) {
- public IStatus runInWorkspace(IProgressMonitor monitor) {
+ WorkspaceJob job = new AbstactCreateMavenProjectJob(Messages.MavenProjectCheckoutJob_job, workingSets) {
+ @Override
+ protected List<IProject> doCreateMavenProjects(IProgressMonitor monitor) throws CoreException {
Set<MavenProjectInfo> projectSet = plugin.getProjectConfigurationManager().collectProjects(projects);
- try {
- plugin.getProjectConfigurationManager().importProjects(projectSet, configuration, monitor);
- } catch(CoreException ex) {
- plugin.getConsole().logError("Projects imported with errors");
- return ex.getStatus();
- }
+ List<IMavenProjectImportResult> results = plugin.getProjectConfigurationManager().importProjects(
+ projectSet, configuration, monitor);
- return Status.OK_STATUS;
+ return toProjects(results);
}
};
- ISchedulingRule rule = ResourcesPlugin.getWorkspace().getRuleFactory().modifyRule(ResourcesPlugin.getWorkspace().getRoot());
+ ISchedulingRule rule = ResourcesPlugin.getWorkspace().getRuleFactory()
+ .modifyRule(ResourcesPlugin.getWorkspace().getRoot());
job.setRule(rule);
job.schedule();
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenProjectSelectionDialog.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenProjectSelectionDialog.java
index 77db0415..4ed6466c 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenProjectSelectionDialog.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenProjectSelectionDialog.java
@@ -9,7 +9,7 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.wizards;
+package org.eclipse.m2e.core.ui.internal.wizards;
import java.util.ArrayList;
import java.util.List;
@@ -27,6 +27,10 @@ import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.m2e.core.core.IMavenConstants;
+import org.eclipse.m2e.core.core.MavenLogger;
+import org.eclipse.m2e.core.core.Messages;
+import org.eclipse.m2e.core.ui.internal.dialogs.AbstractMavenDialog;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
@@ -37,11 +41,6 @@ import org.eclipse.ui.dialogs.FilteredTree;
import org.eclipse.ui.dialogs.PatternFilter;
import org.eclipse.ui.model.WorkbenchLabelProvider;
-import org.eclipse.m2e.core.core.IMavenConstants;
-import org.eclipse.m2e.core.core.MavenLogger;
-import org.eclipse.m2e.core.core.Messages;
-import org.eclipse.m2e.core.ui.dialogs.AbstractMavenDialog;
-
/**
* A simple dialog allowing the selection of Maven projects and subfolders containing POMs.
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenProjectWizard.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenProjectWizard.java
index 48e3630d..319cd34f 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenProjectWizard.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenProjectWizard.java
@@ -9,31 +9,35 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.wizards;
+package org.eclipse.m2e.core.ui.internal.wizards;
import java.util.Arrays;
import java.util.List;
import java.util.Properties;
+import org.apache.maven.archetype.catalog.Archetype;
+import org.apache.maven.model.Dependency;
+import org.apache.maven.model.Model;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.resources.WorkspaceJob;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.IJobChangeEvent;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.core.runtime.jobs.JobChangeAdapter;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.core.IMavenConstants;
+import org.eclipse.m2e.core.core.Messages;
+import org.eclipse.m2e.core.ui.internal.MavenImages;
+import org.eclipse.m2e.core.ui.internal.actions.SelectionUtil;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
@@ -43,20 +47,6 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.ui.INewWizard;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.progress.IProgressConstants;
-
-import org.apache.maven.archetype.catalog.Archetype;
-import org.apache.maven.model.Dependency;
-import org.apache.maven.model.Model;
-
-import org.eclipse.m2e.core.MavenImages;
-import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.actions.OpenMavenConsoleAction;
-import org.eclipse.m2e.core.actions.SelectionUtil;
-import org.eclipse.m2e.core.core.IMavenConstants;
-import org.eclipse.m2e.core.core.Messages;
-import org.eclipse.m2e.core.project.ProjectImportConfiguration;
/**
@@ -80,7 +70,7 @@ import org.eclipse.m2e.core.project.ProjectImportConfiguration;
* </ul>
* </p>
*/
-public class MavenProjectWizard extends Wizard implements INewWizard {
+public class MavenProjectWizard extends AbstractMavenProjectWizard implements INewWizard {
/** The wizard page for gathering general project information. */
protected MavenProjectWizardLocationPage locationPage;
@@ -97,12 +87,8 @@ public class MavenProjectWizard extends Wizard implements INewWizard {
/** The wizard page for choosing the Maven2 dependencies to use. */
protected MavenDependenciesWizardPage dependenciesPage;
- ProjectImportConfiguration configuration;
-
protected Button simpleProject;
- private IStructuredSelection selection;
-
/**
* Default constructor. Sets the title and image of the wizard.
*/
@@ -113,17 +99,10 @@ public class MavenProjectWizard extends Wizard implements INewWizard {
setNeedsProgressMonitor(true);
}
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- this.selection = selection;
- }
-
public void addPages() {
- configuration = new ProjectImportConfiguration();
- configuration.setWorkingSet(SelectionUtil.getSelectedWorkingSet(selection));
-
- locationPage = new MavenProjectWizardLocationPage(configuration, //
+ locationPage = new MavenProjectWizardLocationPage(importConfiguration, //
Messages.getString("wizard.project.page.project.title"), // //$NON-NLS-1$
- Messages.getString("wizard.project.page.project.description")) { //$NON-NLS-1$
+ Messages.getString("wizard.project.page.project.description"), workingSets) { //$NON-NLS-1$
protected void createAdditionalControls(Composite container) {
simpleProject = new Button(container, SWT.CHECK);
@@ -148,10 +127,10 @@ public class MavenProjectWizard extends Wizard implements INewWizard {
};
locationPage.setLocationPath(SelectionUtil.getSelectedLocation(selection));
- archetypePage = new MavenProjectWizardArchetypePage(configuration);
- parametersPage = new MavenProjectWizardArchetypeParametersPage(configuration);
- artifactPage = new MavenProjectWizardArtifactPage(configuration);
- dependenciesPage = new MavenDependenciesWizardPage(configuration, //
+ archetypePage = new MavenProjectWizardArchetypePage(importConfiguration);
+ parametersPage = new MavenProjectWizardArchetypeParametersPage(importConfiguration);
+ artifactPage = new MavenProjectWizardArtifactPage(importConfiguration);
+ dependenciesPage = new MavenDependenciesWizardPage(importConfiguration, //
Messages.getString("wizard.project.page.dependencies.title"), // //$NON-NLS-1$
Messages.getString("wizard.project.page.dependencies.description")); //$NON-NLS-1$
dependenciesPage.setDependencies(new Dependency[0]);
@@ -220,8 +199,8 @@ public class MavenProjectWizard extends Wizard implements INewWizard {
// the default workspace location for a project, we have to pass null
// instead of the actual location.
final Model model = getModel();
- final String projectName = configuration.getProjectName(model);
- IStatus nameStatus = configuration.validateProjectName(model);
+ final String projectName = importConfiguration.getProjectName(model);
+ IStatus nameStatus = importConfiguration.validateProjectName(model);
if(!nameStatus.isOK()) {
MessageDialog.openError(getShell(), Messages.getString("wizard.project.job.failed", projectName), nameStatus.getMessage()); //$NON-NLS-1$
return false;
@@ -231,7 +210,7 @@ public class MavenProjectWizard extends Wizard implements INewWizard {
final IPath location = locationPage.isInWorkspace() ? null : locationPage.getLocationPath();
final IWorkspaceRoot root = workspace.getRoot();
- final IProject project = configuration.getProject(root, model);
+ final IProject project = importConfiguration.getProject(root, model);
boolean pomExists = ( locationPage.isInWorkspace() ?
root.getLocation().append(project.getName()) : location ).append(IMavenConstants.POM_FILE_NAME).toFile().exists();
@@ -245,24 +224,17 @@ public class MavenProjectWizard extends Wizard implements INewWizard {
final MavenPlugin plugin = MavenPlugin.getDefault();
if(simpleProject.getSelection()) {
- @SuppressWarnings("unchecked")
List<Dependency> modelDependencies = model.getDependencies();
modelDependencies.addAll(Arrays.asList(dependenciesPage.getDependencies()));
final String[] folders = artifactPage.getFolders();
- job = new WorkspaceJob(Messages.getString("wizard.project.job.creatingProject", projectName)) { //$NON-NLS-1$
- public IStatus runInWorkspace(IProgressMonitor monitor) {
- setProperty(IProgressConstants.ACTION_PROPERTY, new OpenMavenConsoleAction());
- try {
- plugin.getProjectConfigurationManager().createSimpleProject(project, location, model, folders, //
- configuration, monitor);
- return Status.OK_STATUS;
- } catch(CoreException e) {
- return e.getStatus();
- } finally {
- monitor.done();
- }
+ job = new AbstactCreateMavenProjectJob(Messages.getString("wizard.project.job.creatingProject", projectName), workingSets) { //$NON-NLS-1$
+ @Override
+ protected List<IProject> doCreateMavenProjects(IProgressMonitor monitor) throws CoreException {
+ plugin.getProjectConfigurationManager().createSimpleProject(project, location, model, folders, //
+ importConfiguration, monitor);
+ return Arrays.asList(project);
}
};
@@ -275,18 +247,13 @@ public class MavenProjectWizard extends Wizard implements INewWizard {
final String javaPackage = parametersPage.getJavaPackage();
final Properties properties = parametersPage.getProperties();
- job = new WorkspaceJob(Messages.getString("wizard.project.job.creating", archetype.getArtifactId())) { //$NON-NLS-1$
- public IStatus runInWorkspace(IProgressMonitor monitor) {
- setProperty(IProgressConstants.ACTION_PROPERTY, new OpenMavenConsoleAction());
- try {
- plugin.getProjectConfigurationManager().createArchetypeProject(project, location, archetype, //
- groupId, artifactId, version, javaPackage, properties, configuration, monitor);
- return Status.OK_STATUS;
- } catch(CoreException e) {
- return e.getStatus();
- } finally {
- monitor.done();
- }
+ job = new AbstactCreateMavenProjectJob(Messages.getString(
+ "wizard.project.job.creating", archetype.getArtifactId()), workingSets) { //$NON-NLS-1$
+ @Override
+ protected List<IProject> doCreateMavenProjects(IProgressMonitor monitor) throws CoreException {
+ plugin.getProjectConfigurationManager().createArchetypeProject(project, location, archetype, //
+ groupId, artifactId, version, javaPackage, properties, importConfiguration, monitor);
+ return Arrays.asList(project);
}
};
}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenProjectWizardArchetypePage.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenProjectWizardArchetypePage.java
index db00389d..c7b888a1 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenProjectWizardArchetypePage.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenProjectWizardArchetypePage.java
@@ -9,7 +9,7 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.wizards;
+package org.eclipse.m2e.core.ui.internal.wizards;
import java.io.File;
import java.lang.reflect.InvocationTargetException;
@@ -22,6 +22,13 @@ import java.util.List;
import java.util.Set;
import java.util.TreeSet;
+import org.apache.maven.archetype.catalog.Archetype;
+import org.apache.maven.archetype.catalog.ArchetypeCatalog;
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.artifact.repository.DefaultArtifactRepository;
+import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout;
+import org.apache.maven.artifact.versioning.DefaultArtifactVersion;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
@@ -45,6 +52,21 @@ import org.eclipse.jface.viewers.ViewerComparator;
import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.jface.window.Window;
import org.eclipse.jface.wizard.IWizardContainer;
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.archetype.ArchetypeCatalogFactory;
+import org.eclipse.m2e.core.archetype.ArchetypeCatalogFactory.NexusIndexerCatalogFactory;
+import org.eclipse.m2e.core.archetype.ArchetypeManager;
+import org.eclipse.m2e.core.core.MavenLogger;
+import org.eclipse.m2e.core.core.Messages;
+import org.eclipse.m2e.core.embedder.ArtifactKey;
+import org.eclipse.m2e.core.embedder.IMaven;
+import org.eclipse.m2e.core.index.IMutableIndex;
+import org.eclipse.m2e.core.index.IndexListener;
+import org.eclipse.m2e.core.index.IndexManager;
+import org.eclipse.m2e.core.project.ProjectImportConfiguration;
+import org.eclipse.m2e.core.repository.IRepository;
+import org.eclipse.m2e.core.ui.internal.MavenImages;
+import org.eclipse.m2e.core.ui.internal.util.M2EUIUtils;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.SashForm;
@@ -69,30 +91,6 @@ import org.eclipse.swt.widgets.ToolBar;
import org.eclipse.swt.widgets.ToolItem;
import org.eclipse.ui.dialogs.PreferencesUtil;
-import org.apache.maven.archetype.catalog.Archetype;
-import org.apache.maven.archetype.catalog.ArchetypeCatalog;
-import org.apache.maven.artifact.Artifact;
-import org.apache.maven.artifact.repository.ArtifactRepository;
-import org.apache.maven.artifact.repository.DefaultArtifactRepository;
-import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout;
-import org.apache.maven.artifact.versioning.DefaultArtifactVersion;
-
-import org.eclipse.m2e.core.MavenImages;
-import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.archetype.ArchetypeCatalogFactory;
-import org.eclipse.m2e.core.archetype.ArchetypeCatalogFactory.NexusIndexerCatalogFactory;
-import org.eclipse.m2e.core.archetype.ArchetypeManager;
-import org.eclipse.m2e.core.core.MavenLogger;
-import org.eclipse.m2e.core.core.Messages;
-import org.eclipse.m2e.core.embedder.ArtifactKey;
-import org.eclipse.m2e.core.embedder.IMaven;
-import org.eclipse.m2e.core.index.IMutableIndex;
-import org.eclipse.m2e.core.index.IndexListener;
-import org.eclipse.m2e.core.index.IndexManager;
-import org.eclipse.m2e.core.project.ProjectImportConfiguration;
-import org.eclipse.m2e.core.repository.IRepository;
-import org.eclipse.m2e.core.util.M2EUtils;
-
/**
* Maven Archetype selection wizard page presents the user with a list of available Maven Archetypes available for
@@ -852,7 +850,7 @@ public class MavenProjectWizardArchetypePage extends AbstractMavenWizardPage imp
if(element instanceof Archetype) {
String version = ((Archetype) element).getVersion();
boolean isSnap = false;
- if(M2EUtils.nullOrEmpty(version)) {
+ if(M2EUIUtils.nullOrEmpty(version)) {
isSnap = false;
} else if(version.lastIndexOf(SNAPSHOT) >= 0) {
isSnap = true;
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenProjectWizardArchetypeParametersPage.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenProjectWizardArchetypeParametersPage.java
index c566b6d4..b272651e 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenProjectWizardArchetypeParametersPage.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenProjectWizardArchetypeParametersPage.java
@@ -9,7 +9,7 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.wizards;
+package org.eclipse.m2e.core.ui.internal.wizards;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
@@ -21,8 +21,13 @@ import java.util.Properties;
import java.util.Set;
import java.util.regex.Pattern;
-import com.ibm.icu.lang.UCharacter;
-
+import org.apache.maven.archetype.catalog.Archetype;
+import org.apache.maven.archetype.common.ArchetypeArtifactManager;
+import org.apache.maven.archetype.exception.UnknownArchetype;
+import org.apache.maven.archetype.metadata.ArchetypeDescriptor;
+import org.apache.maven.archetype.metadata.RequiredProperty;
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.model.Model;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
@@ -32,6 +37,12 @@ import org.eclipse.jface.viewers.ICellModifier;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.TextCellEditor;
import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.core.MavenLogger;
+import org.eclipse.m2e.core.core.Messages;
+import org.eclipse.m2e.core.embedder.IMaven;
+import org.eclipse.m2e.core.project.ProjectImportConfiguration;
+import org.eclipse.m2e.core.ui.internal.components.TextComboBoxCellEditor;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
@@ -48,20 +59,7 @@ import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.TableItem;
-import org.apache.maven.archetype.catalog.Archetype;
-import org.apache.maven.archetype.common.ArchetypeArtifactManager;
-import org.apache.maven.archetype.exception.UnknownArchetype;
-import org.apache.maven.archetype.metadata.ArchetypeDescriptor;
-import org.apache.maven.archetype.metadata.RequiredProperty;
-import org.apache.maven.artifact.repository.ArtifactRepository;
-import org.apache.maven.model.Model;
-
-import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.core.MavenLogger;
-import org.eclipse.m2e.core.core.Messages;
-import org.eclipse.m2e.core.embedder.IMaven;
-import org.eclipse.m2e.core.project.ProjectImportConfiguration;
-import org.eclipse.m2e.core.ui.internal.components.TextComboBoxCellEditor;
+import com.ibm.icu.lang.UCharacter;
/**
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenProjectWizardArtifactPage.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenProjectWizardArtifactPage.java
index c2d50537..9afcce5e 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenProjectWizardArtifactPage.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenProjectWizardArtifactPage.java
@@ -9,13 +9,18 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.wizards;
+package org.eclipse.m2e.core.ui.internal.wizards;
import java.util.HashMap;
import java.util.Map;
+import org.apache.maven.model.Model;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.window.Window;
+import org.eclipse.m2e.core.core.Messages;
+import org.eclipse.m2e.core.index.IndexedArtifactFile;
+import org.eclipse.m2e.core.project.ProjectImportConfiguration;
+import org.eclipse.m2e.core.ui.internal.dialogs.MavenRepositorySearchDialog;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
@@ -25,13 +30,6 @@ import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
-import org.apache.maven.model.Model;
-
-import org.eclipse.m2e.core.core.Messages;
-import org.eclipse.m2e.core.index.IndexedArtifactFile;
-import org.eclipse.m2e.core.project.ProjectImportConfiguration;
-import org.eclipse.m2e.core.ui.dialogs.MavenRepositorySearchDialog;
-
/**
* Wizard page responsible for gathering information about the Maven2 artifact and the directories to create. This
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenProjectWizardLocationPage.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenProjectWizardLocationPage.java
index 78f91edc..6e582eb3 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenProjectWizardLocationPage.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenProjectWizardLocationPage.java
@@ -9,7 +9,9 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.wizards;
+package org.eclipse.m2e.core.ui.internal.wizards;
+
+import java.util.List;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.ResourcesPlugin;
@@ -17,6 +19,8 @@ import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
+import org.eclipse.m2e.core.core.Messages;
+import org.eclipse.m2e.core.project.ProjectImportConfiguration;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
@@ -29,9 +33,7 @@ import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.DirectoryDialog;
import org.eclipse.swt.widgets.Label;
-
-import org.eclipse.m2e.core.core.Messages;
-import org.eclipse.m2e.core.project.ProjectImportConfiguration;
+import org.eclipse.ui.IWorkingSet;
/**
@@ -48,28 +50,21 @@ public class MavenProjectWizardLocationPage extends AbstractMavenWizardPage {
private IPath location;
+ private final List<IWorkingSet> workingSets;
+
/**
* Creates Maven project location page.
*
* @param title location page title text
* @param description location page description text
*/
- public MavenProjectWizardLocationPage(ProjectImportConfiguration configuration, String title, String description) {
+ public MavenProjectWizardLocationPage(ProjectImportConfiguration configuration, String title, String description,
+ List<IWorkingSet> workingSets) {
super("MavenProjectWizardLocationPage", configuration); //$NON-NLS-1$
+ this.workingSets = workingSets;
setTitle(title);
setDescription(description);
setPageComplete(false);
-
- }
-
- /**
- * Creates Maven project location page.
- */
- public MavenProjectWizardLocationPage(ProjectImportConfiguration configuration, boolean showSimpleProject) {
- super("MavenProjectWizardLocationPage", configuration); //$NON-NLS-1$
- setTitle(Messages.getString("wizard.project.page.project.title")); //$NON-NLS-1$
- setDescription(Messages.getString("wizard.project.page.project.description")); //$NON-NLS-1$
- setPageComplete(false);
}
/**
@@ -154,7 +149,7 @@ public class MavenProjectWizardLocationPage extends AbstractMavenWizardPage {
}
});
- this.workingSetGroup = new WorkingSetGroup(container, getImportConfiguration(), getShell());
+ this.workingSetGroup = new WorkingSetGroup(container, workingSets, getShell());
if(location==null || Platform.getLocation().equals(location)) {
// useDefaultWorkspaceLocationButton.setSelection(true);
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/ProjectsImportPage.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/ProjectsImportPage.java
index 5200f7bf..6f82a08b 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/ProjectsImportPage.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/ProjectsImportPage.java
@@ -9,7 +9,7 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.wizards;
+package org.eclipse.m2e.core.ui.internal.wizards;
import java.io.File;
import java.io.IOException;
@@ -48,6 +48,11 @@ import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerComparator;
import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.core.IMavenConstants;
+import org.eclipse.m2e.core.core.MavenConsole;
+import org.eclipse.m2e.core.core.MavenLogger;
+import org.eclipse.m2e.core.internal.Messages;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
@@ -60,12 +65,6 @@ import org.eclipse.swt.widgets.Label;
import org.eclipse.ui.actions.WorkspaceModifyOperation;
import org.eclipse.ui.dialogs.IOverwriteQuery;
-import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.core.IMavenConstants;
-import org.eclipse.m2e.core.core.MavenConsole;
-import org.eclipse.m2e.core.core.MavenLogger;
-import org.eclipse.m2e.core.internal.Messages;
-
/**
* The ProjectsImportPage is the page that allows the user to import projects from a particular location.
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/ProjectsImportWizard.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/ProjectsImportWizard.java
index 5e3c563d..b6c3f0db 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/ProjectsImportWizard.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/ProjectsImportWizard.java
@@ -9,12 +9,11 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.wizards;
+package org.eclipse.m2e.core.ui.internal.wizards;
import org.eclipse.jface.wizard.Wizard;
-
-import org.eclipse.m2e.core.MavenImages;
import org.eclipse.m2e.core.internal.Messages;
+import org.eclipse.m2e.core.ui.internal.MavenImages;
/**
* WizardExtension
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/ResolverConfigurationComponent.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/ResolverConfigurationComponent.java
index f94e4bff..cc183d04 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/ResolverConfigurationComponent.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/ResolverConfigurationComponent.java
@@ -9,8 +9,11 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.wizards;
+package org.eclipse.m2e.core.ui.internal.wizards;
+import org.eclipse.m2e.core.core.Messages;
+import org.eclipse.m2e.core.project.ProjectImportConfiguration;
+import org.eclipse.m2e.core.project.ResolverConfiguration;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
@@ -29,10 +32,6 @@ import org.eclipse.ui.forms.events.ExpansionAdapter;
import org.eclipse.ui.forms.events.ExpansionEvent;
import org.eclipse.ui.forms.widgets.ExpandableComposite;
-import org.eclipse.m2e.core.core.Messages;
-import org.eclipse.m2e.core.project.ProjectImportConfiguration;
-import org.eclipse.m2e.core.project.ResolverConfiguration;
-
/**
* A foldable resolver configuration panel
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/WidthGroup.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/WidthGroup.java
index c6f8c77e..c5ef651f 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/WidthGroup.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/WidthGroup.java
@@ -9,7 +9,7 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.wizards;
+package org.eclipse.m2e.core.ui.internal.wizards;
import java.util.HashSet;
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/WorkingSetGroup.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/WorkingSetGroup.java
index 0d7bf352..3766579f 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/WorkingSetGroup.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/WorkingSetGroup.java
@@ -9,7 +9,7 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.m2e.core.wizards;
+package org.eclipse.m2e.core.ui.internal.wizards;
import java.util.Arrays;
import java.util.HashSet;
@@ -33,6 +33,7 @@ import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerComparator;
import org.eclipse.jface.window.Window;
+import org.eclipse.m2e.core.internal.Messages;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
@@ -48,9 +49,6 @@ import org.eclipse.ui.IWorkingSetManager;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.dialogs.IWorkingSetSelectionDialog;
-import org.eclipse.m2e.core.internal.Messages;
-import org.eclipse.m2e.core.project.ProjectImportConfiguration;
-
/**
* Working set group
@@ -66,12 +64,12 @@ public class WorkingSetGroup {
Button addToWorkingSetButton;
- final ProjectImportConfiguration configuration;
+ final List<IWorkingSet> workingSets;
final Shell shell;
- public WorkingSetGroup(Composite container, ProjectImportConfiguration configuration, Shell shell) {
- this.configuration = configuration;
+ public WorkingSetGroup(Composite container, List<IWorkingSet> workingSets, Shell shell) {
+ this.workingSets = workingSets;
this.shell = shell;
createControl(container);
@@ -175,13 +173,12 @@ public class WorkingSetGroup {
WORKING_SET_IDS.toArray(new String[0]));
if(dialog.open() == Window.OK) {
IWorkingSet[] workingSets = dialog.getSelection();
-
- selectWorkingSets(workingSets);
+ selectWorkingSets(Arrays.asList(workingSets));
}
}
});
- if(selectWorkingSets(configuration.getWorkingSets())) {
+ if(selectWorkingSets(workingSets)) {
addToWorkingSetButton.setSelection(true);
workingsetLabel.setEnabled(true);
workingsetComboViewer.getCombo().setEnabled(true);
@@ -197,7 +194,7 @@ public class WorkingSetGroup {
if(addToWorkingingSet) {
updateConfiguration();
} else {
- configuration.setWorkingSet(null);
+ workingSets.clear();
}
}
});
@@ -214,11 +211,13 @@ public class WorkingSetGroup {
IStructuredSelection selection = (IStructuredSelection) workingsetComboViewer.getSelection();
Object o = selection.getFirstElement();
if(o != null) {
+ workingSets.clear();
if(o instanceof IWorkingSet) {
- configuration.setWorkingSet((IWorkingSet) o);
+ workingSets.add((IWorkingSet) o);
} else if(o instanceof List<?>) {
- List<?> l = (List<?>) o;
- configuration.setWorkingSets(l.toArray(new IWorkingSet[l.size()]));
+ @SuppressWarnings("unchecked")
+ List<IWorkingSet> l = (List<IWorkingSet>) o;
+ workingSets.addAll(l);
}
}
}
@@ -249,20 +248,19 @@ public class WorkingSetGroup {
workingsetComboViewer.getLabelProvider().dispose();
}
- protected boolean selectWorkingSets(IWorkingSet[] workingSets) {
+ protected boolean selectWorkingSets(List<IWorkingSet> workingSets) {
Set<IWorkingSet> defaultSets = getWorkingSets();
workingsetComboViewer.setInput(defaultSets);
- if(workingSets != null && workingSets.length > 0) {
- if(workingSets.length == 1) {
- IWorkingSet workingSet = workingSets[0];
+ if(workingSets != null && workingSets.size() > 0) {
+ if(workingSets.size() == 1) {
+ IWorkingSet workingSet = workingSets.get(0);
if(defaultSets.contains(workingSet)) {
workingsetComboViewer.setSelection(new StructuredSelection(workingSet));
}
} else {
- List<?> list = Arrays.asList(workingSets);
- workingsetComboViewer.add(list);
- workingsetComboViewer.setSelection(new StructuredSelection((Object) list));
+ workingsetComboViewer.add(workingSets);
+ workingsetComboViewer.setSelection(new StructuredSelection((Object) workingSets));
}
return true;
}
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/WorkingSetHelper.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/WorkingSetHelper.java
new file mode 100644
index 00000000..171a95b9
--- /dev/null
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/WorkingSetHelper.java
@@ -0,0 +1,8 @@
+
+package org.eclipse.m2e.core.ui.internal.wizards;
+
+
+
+public class WorkingSetHelper {
+
+}
diff --git a/org.eclipse.m2e.core/META-INF/MANIFEST.MF b/org.eclipse.m2e.core/META-INF/MANIFEST.MF
index bf1bfdbb..fff5ae65 100644
--- a/org.eclipse.m2e.core/META-INF/MANIFEST.MF
+++ b/org.eclipse.m2e.core/META-INF/MANIFEST.MF
@@ -13,10 +13,6 @@ Require-Bundle:
org.eclipse.core.expressions,
org.eclipse.core.filesystem,
org.eclipse.search,
- org.eclipse.ui,
- org.eclipse.ui.ide,
- org.eclipse.ui.console,
- org.eclipse.ui.forms,
org.eclipse.m2e.maven.runtime;bundle-version="[0.13.0,0.14.0)",
org.eclipse.m2e.archetype.common;bundle-version="[0.13.0,0.14.0)",
org.eclipse.m2e.maven.indexer;bundle-version="[0.13.0,0.14.0)",
@@ -28,7 +24,6 @@ Bundle-ClassPath: .
Bundle-RequiredExecutionEnvironment: J2SE-1.5,
JavaSE-1.6
Export-Package: org.eclipse.m2e.core,
- org.eclipse.m2e.core.actions,
org.eclipse.m2e.core.archetype,
org.eclipse.m2e.core.builder;x-internal:=true,
org.eclipse.m2e.core.core,
@@ -36,7 +31,6 @@ Export-Package: org.eclipse.m2e.core,
org.eclipse.m2e.core.index,
org.eclipse.m2e.core.internal;x-friends:="org.eclipse.m2e.core.tests,org.eclipse.m2e.jdt",
org.eclipse.m2e.core.internal.builder;x-internal:=true,
- org.eclipse.m2e.core.internal.console;x-internal:=true,
org.eclipse.m2e.core.internal.content;x-internal:=true,
org.eclipse.m2e.core.internal.embedder;x-friends:="org.eclipse.m2e.core.tests",
org.eclipse.m2e.core.internal.index;x-friends:="org.eclipse.m2e.core.tests",
@@ -51,18 +45,6 @@ Export-Package: org.eclipse.m2e.core,
org.eclipse.m2e.core.jobs,
org.eclipse.m2e.core.project,
org.eclipse.m2e.core.project.configurator,
- org.eclipse.m2e.core.repository,
- org.eclipse.m2e.core.scm,
- org.eclipse.m2e.core.ui.dialogs,
- org.eclipse.m2e.core.ui.internal;x-internal:=true,
- org.eclipse.m2e.core.ui.internal.components;x-internal:=true,
- org.eclipse.m2e.core.ui.internal.lifecycle;x-internal:=true,
- org.eclipse.m2e.core.ui.internal.preferences;x-internal:=true,
- org.eclipse.m2e.core.ui.internal.search;x-internal:=true,
- org.eclipse.m2e.core.ui.internal.views;x-internal:=true,
- org.eclipse.m2e.core.ui.internal.views.nodes;x-internal:=true,
- org.eclipse.m2e.core.util,
- org.eclipse.m2e.core.util.search,
- org.eclipse.m2e.core.wizards
+ org.eclipse.m2e.core.repository
MavenArtifact-GroupId: org.eclipse.m2e
MavenArtifact-ArtifactId: org.eclipse.m2e.core
diff --git a/org.eclipse.m2e.core/plugin.properties b/org.eclipse.m2e.core/plugin.properties
index 91655c91..3b805124 100644
--- a/org.eclipse.m2e.core/plugin.properties
+++ b/org.eclipse.m2e.core/plugin.properties
@@ -6,40 +6,12 @@
# http://www.eclipse.org/legal/epl-v10.html
#
+Bundle-Vendor = Eclipse.org - m2e
+Bundle-Name = Maven Integration for Eclipse
+
m2.builder.name=Maven Project Builder
m2.nature.name=Maven Nature
-m2.decorator.name=Maven Decorator
-m2.decorator.description=Adds an icon decoration to \
- projects with Maven dependency management enabled.
-
-m2.decorator.version.name=Maven Version Decorator
-m2.decorator.version.description=Shows version for managed projects.
-
-m2.popup.project.label=Maven
-m2.popup.project.enable.label=Enable Maven Support
-m2.popup.project.disable.label=Disable Maven Support
-m2.popup.project.includeModules.label=Enable Nested Modules
-m2.popup.project.workspaceResolution.label=Enable Workspace Resolution
-m2.popup.project.add-dependency.label=Add Dependency
-m2.popup.project.update-sources.label=Update Source Folders
-m2.popup.ModuleProjectWizardAction=New Maven Module Project
-m2.popup.AddPluginAction=Add Plugin
-m2.popup.AddDependencyAction=Add Dependency
-m2.popup.UpdateConfigurationAction=Update Project Configuration
-m2.popup.RefreshMavenModelsAction=Update Dependencies
-m2.popup.RefreshMavenModelsAction.snapshots=Update Snapshots
-m2.popup.OpenUrlAction.openCiPage=Open Continuous Integration
-m2.popup.OpenUrlAction.openScmPage=Open Source Control
-m2.popup.OpenUrlAction.openIssuesPage=Open Issue Tracker
-m2.popup.OpenUrlAction.openProjectPage=Open Project Page
-m2.popup.OpenPomAction=Open POM
-m2.popup.DisableNatureAction=Disable Maven Nature
-m2.popup.ChangeNatureAction.disableWorkspaceResolution=Disable Workspace Resolution
-m2.popup.ChangeNatureAction.enableWorkspaceResolution=Enable Workspace Resolution
-
-m2.shortcut.open.pom=Open Maven POM
-
m2.marker.problem.name=Maven Problem
m2.marker.problem.pomloading.name=Maven pom Loading Problem
m2.marker.problem.configuration.name=Maven Configuration Problem
@@ -49,80 +21,19 @@ m2.marker.problem.build.participant.name=Maven Build Participant Problem
m2.marker.problem.lifecycleMapping.name=Maven Project Build Lifecycle Mapping Problem
m2.marker.hint.name=Maven Problem
-m2.preferences.page.name=Maven
-
-m2.wizard.name=Maven
-m2.wizard.pom.name=Maven POM file
-m2.wizard.project.name=Maven Project
-
-m2.wizard.project.description=Create a Maven Project
-
-m2.wizard.import.name=Existing Maven Projects
-m2.wizard.import.description=Import Existing Maven Projects
-
-m2.wizard.materialize.name=Materialize Maven Projects
-m2.wizard.materialize.description=Materialize Maven Projects
-
-m2.wizard.module.name=Maven Module
-m2.wizard.module.description=Create a Maven module
-
-m2.editor.pom.name=Maven POM Editor
-
-m2.shortcut.addDependency=Add Maven Dependency
-m2.shortcut.addPlugin=Add Maven Plugin
-Bundle-Vendor = Eclipse.org - m2e
-Bundle-Name = Maven Integration for Eclipse
content-type.name = Maven POM XML
-checkoutaction.label = Check out as Maven Project...
-openpomaction.label = Open POM
-openpomaction.label2 = Open POM
-openpomaction.label3 = Open POM
-openpomaction.label4 = Open POM
-openprojectaction.label = Open Project Page
-openprojectaction.label2 = Open Project Page
-openprojectaction.label3 = Open Project Page
-openprojectaction.label4 = Open Project Page
-command.opentype.description = Open Maven Type
-command.adddependency.description = Add Maven Dependency
-command.addplugin.description = Add Maven Plugin
-keyword.label = maven
-page.installations.name = Installations
-page.usersettings.name = User Settings
-page.archetypes.name = Archetypes
-wizard.checkout.name = Checkout Maven Projects from SCM
-wizard.checkout.description = Check out Maven Project from SVN
-category.general.name = General
-wizard.checkout2.name = Check out Maven Projects from SCM
-wizard.checkout2.description = Checkout Maven Project from SCM
-wizard.install.name = Install or deploy an artifact to a Maven repository
-wizard.install.description = Install or Deploy an artifact (archive) into a Maven repository
-consoleFactory.label = Maven Console
-actionSet.navigation.label = Maven Navigation
-action.openpom.label = Open Maven POM...
-action.openpom.tooltip = Open Maven POM
-action.updatedeps.label = Update All Maven Dependencies
-action.updatedeps.tooltip = Refresh Maven Models
-actionSet.maven.label = Maven
-action.adddep.label = Add Maven Dependency
-action.adddep.tooltip = Add Maven Dependency
-action.addplugin.label = Add Maven Plugin
-action.add.plugin.tooltip = Add Maven Plugin
-category.maven.name = Maven
-view.repos.name = Maven Repositories
-page.maven.name = Maven
-page.mappings.name = Lifecycle Mapping
+
lifecycleMapping.custom.name = Customizable Lifecycle Mapping
lifecycleMapping.empty.name = Empty Lifecycle Mapping
+
extension-point.indexes.name = Maven Indexes
extension-point.scmhandlers.name = SCM Handlers
extension-point.scmhandlersui.name = SCM Handlers UI
extension-point.archetypes.name = Maven Archetypes
extension-point.configurators.name = Project Configurators
-extension-point.m2menu.name = m2 menu items
extension-point.lifecyclemappings.name = Maven Lifecycle Mappings
extension-point.mapping.proppage.name = Maven Lifecycle Mapping Property Page
extension-point.mappingdefault.name = Default Maven Lifecycle Mappings
extension-point.component.name = Maven Core Component Contributor
extension-point.changed.name = mavenProjectChangedListeners
extension-point.lifecycleMappingMetadataSource.name = Lifecycle Mapping Metadata Source
-convert.to.maven.name=Convert to Maven Project
diff --git a/org.eclipse.m2e.core/plugin.xml b/org.eclipse.m2e.core/plugin.xml
index ef81dd18..f82fdd74 100644
--- a/org.eclipse.m2e.core/plugin.xml
+++ b/org.eclipse.m2e.core/plugin.xml
@@ -9,21 +9,12 @@
<?eclipse version="3.0"?>
<plugin>
<extension-point id="indexes" name="%extension-point.indexes.name" schema="schema/indexes.exsd"/>
- <extension-point id="scmHandlers" name="%extension-point.scmhandlers.name" schema="schema/scmHandlers.exsd"/>
- <extension-point id="scmHandlersUi" name="%extension-point.scmhandlersui.name" schema="schema/scmHandlersUi.exsd"/>
<extension-point id="archetypeCatalogs" name="%extension-point.archetypes.name" schema="schema/archetypes.exsd"/>
<extension-point id="projectConfigurators" name="%extension-point.configurators.name" schema="schema/projectConfigurators.exsd"/>
<extension-point id="lifecycleMappings" name="%extension-point.lifecyclemappings.name" schema="schema/lifecycleMappings.exsd"/>
- <extension-point id="lifecycleMappingPropertyPage" name = "%extension-point.mapping.proppage.name" schema = "schema/lifecycleMappingPropertyPage.exsd"/>
<extension-point id="mavenComponentContributors" name="%extension-point.component.name" schema="schema/mavenComponentContributors.exsd"/>
<extension-point id="mavenProjectChangedListeners" name="%extension-point.changed.name" schema="schema/mavenProjectChangedListeners.exsd"/>
<extension-point id="lifecycleMappingMetadataSource" name="%extension-point.lifecycleMappingMetadataSource.name" schema="schema/lifecycleMappingMetadataSource.exsd"/>
- <extension point="org.eclipse.ui.intro.configExtension">
- <configExtension configId="org.eclipse.ui.intro.universalConfig"
- content="intro/overview.xml"/>
- <configExtension configId="org.eclipse.ui.intro.universalConfig"
- content="intro/whatsnew.xml"/>
- </extension>
<extension point="org.eclipse.core.runtime.contentTypes">
<content-type id="pomFile" name="%content-type.name"
@@ -52,605 +43,13 @@
<builder id="org.eclipse.m2e.core.maven2Builder"/>
</extension>
- <extension point="org.eclipse.ui.decorators">
- <decorator
- adaptable="true"
- icon="icons/mlabel.gif"
- id="org.eclipse.m2e.core.maven2decorator"
- label="%m2.decorator.name"
- lightweight="true"
- location="TOP_LEFT"
- state="true">
- <description>%m2.decorator.description</description>
- <enablement>
- <or>
- <objectState name="nature" value="org.eclipse.m2e.core.maven2Nature"/>
- <!--objectState name="name" value="pom.xml"/-->
- <objectState name="label" value="Maven Dependencies"/>
- </or>
- </enablement>
- </decorator>
-
- <decorator id="org.eclipse.m2e.core.mavenVersionDecorator"
- adaptable="true"
- label="%m2.decorator.version.name"
- lightweight="false"
- class="org.eclipse.m2e.core.ui.internal.MavenVersionDecorator"
- state="false">
- <description>%m2.decorator.version.description</description>
- <enablement>
- <or>
- <objectState name="nature" value="org.eclipse.m2e.core.maven2Nature"/>
- <!--objectState name="name" value="pom.xml"/-->
- </or>
- </enablement>
- </decorator>
-
- </extension>
-
<extension point="org.eclipse.core.runtime.adapters">
- <factory adaptableType="org.eclipse.core.runtime.IAdaptable"
- class="org.eclipse.m2e.core.ui.internal.MavenAdapterFactory">
- <adapter type="org.eclipse.ui.IActionFilter"/>
- </factory>
<factory adaptableType="org.eclipse.core.resources.IResource"
class="org.eclipse.m2e.core.internal.project.ArtifactKeyAdapterFactory">
<adapter type="org.eclipse.m2e.core.embedder.ArtifactKey"/>
</factory>
</extension>
- <!--
- <extension point="org.eclipse.ui.actionSets">
- <actionSet id="org.eclipse.m2e.core.actionSet" label="Maven" visible="true">
- <action id="org.eclipse.m2e.core.mainProjectMenu.action"
- class="org.eclipse.m2e.core.actions.MavenMenuAction"
- label="Maven"
- menubarPath="project/additions"
- style="pulldown"
- icon="icons/m2.gif">
- <enablement>
- <and>
- <objectState name="open" value="true"/>
- <objectClass name="org.eclipse.core.resources.IProject"/>
- </and>
- </enablement>
- </action>
- </actionSet>
- </extension>
- -->
-
- <extension point="org.eclipse.ui.popupMenus">
- <!--
- NOW WE HAVE PROJECT MENU CONTRIBUTIONS
- -->
- <objectContribution id="org.eclipse.m2e.core.projectMenu"
- objectClass="org.eclipse.core.resources.IProject"
- adaptable="true">
- <menu
- id="org.eclipse.m2e.core.mavenMenu"
- path="additions"
- label="%m2.popup.project.label">
- <groupMarker name="new"/>
- <separator name="org.eclipse.m2e.core.separator1"/>
- <groupMarker name="update"/>
- <separator name="org.eclipse.m2e.core.separator2"/>
- <groupMarker name="open"/>
- <separator name="org.eclipse.m2e.core.separator3"/>
- <groupMarker name="nature"/>
- <separator name="org.eclipse.m2e.core.separator4"/>
- <groupMarker name="import"/>
- </menu>
- </objectContribution>
- <objectContribution id="org.eclipse.m2e.core.projectMenu.newModuleProject"
- objectClass="org.eclipse.core.resources.IProject"
- adaptable="true">
- <action id="org.eclipse.m2e.actions.moduleProjectWizardAction"
- class="org.eclipse.m2e.core.actions.ModuleProjectWizardAction"
- label="%m2.popup.ModuleProjectWizardAction"
- style="push"
- menubarPath="org.eclipse.m2e.core.mavenMenu/new"
- enablesFor="1"/>
- <visibility>
- <and>
- <objectState name="open" value="true"/>
- <objectState name="nature" value="org.eclipse.m2e.core.maven2Nature"/>
- </and>
- </visibility>
- </objectContribution>
- <objectContribution id="org.eclipse.m2e.core.projectMenu.addDependencyPlugin"
- objectClass="org.eclipse.core.resources.IProject"
- adaptable="true">
- <action id="org.eclipse.m2e.addPluginAction"
- class="org.eclipse.m2e.core.actions.AddPluginAction"
- label="%m2.popup.AddPluginAction"
- style="push"
- menubarPath="org.eclipse.m2e.core.mavenMenu/new"
- enablesFor="1"/>
- <action id="org.eclipse.m2e.addDependencyAction"
- class="org.eclipse.m2e.core.actions.AddDependencyAction"
- label="%m2.popup.AddDependencyAction"
- style="push"
- menubarPath="org.eclipse.m2e.core.mavenMenu/new"
- enablesFor="1"/>
- <visibility>
- <and>
- <objectState name="open" value="true"/>
- <objectState name="nature" value="org.eclipse.m2e.core.maven2Nature"/>
- </and>
- </visibility>
- </objectContribution>
- <objectContribution id="org.eclipse.m2e.updateConfigurationAction"
- objectClass="org.eclipse.core.resources.IProject"
- adaptable="true">
- <action id="org.eclipse.m2e.updateConfigurationAction"
- class="org.eclipse.m2e.core.actions.UpdateConfigurationAction"
- label="%m2.popup.UpdateConfigurationAction"
- style="push"
- menubarPath="org.eclipse.m2e.core.mavenMenu/update"
- enablesFor="+"/>
- <visibility>
- <and>
- <objectState name="open" value="true"/>
- <objectState name="nature" value="org.eclipse.m2e.core.maven2Nature"/>
- </and>
- </visibility>
- </objectContribution>
-
- <objectContribution id="org.eclipse.m2e.refreshMavenModelsAction"
- objectClass="org.eclipse.core.resources.IProject"
- adaptable="true">
- <action id="org.eclipse.m2e.refreshMavenModelsAction"
- class="org.eclipse.m2e.core.actions.RefreshMavenModelsAction"
- label="%m2.popup.RefreshMavenModelsAction"
- style="push"
- menubarPath="org.eclipse.m2e.core.mavenMenu/update"
- enablesFor="+"/>
- <action id="org.eclipse.m2e.refreshMavenSnapshotsAction"
- class="org.eclipse.m2e.core.actions.RefreshMavenModelsAction:snapshots"
- label="%m2.popup.RefreshMavenModelsAction.snapshots"
- style="push"
- menubarPath="org.eclipse.m2e.core.mavenMenu/update"
- enablesFor="+">
- </action>
- <visibility>
- <and>
- <objectState name="open" value="true"/>
- <objectState name="nature" value="org.eclipse.m2e.core.maven2Nature"/>
- </and>
- </visibility>
- </objectContribution>
- <objectContribution id="org.eclipse.m2e.openCiPage"
- objectClass="org.eclipse.core.resources.IProject"
- adaptable="true">
- <action id="org.eclipse.m2e.openCiPage"
- class="org.eclipse.m2e.core.actions.OpenUrlAction:org.eclipse.m2e.openCiPage"
- label="%m2.popup.OpenUrlAction.openCiPage"
- style="push"
- menubarPath="org.eclipse.m2e.core.mavenMenu/open"
- enablesFor="+"/>
- <visibility>
- <and>
- <objectState name="open" value="true"/>
- <objectState name="nature" value="org.eclipse.m2e.core.maven2Nature"/>
- </and>
- </visibility>
- </objectContribution>
- <objectContribution id="org.eclipse.m2e.openScmPage"
- objectClass="org.eclipse.core.resources.IProject"
- adaptable="true">
- <action id="org.eclipse.m2e.openScmPage"
- class="org.eclipse.m2e.core.actions.OpenUrlAction:org.eclipse.m2e.openScmPage"
- label="%m2.popup.OpenUrlAction.openScmPage"
- style="push"
- menubarPath="org.eclipse.m2e.core.mavenMenu/open"
- enablesFor="+"/>
- <visibility>
- <and>
- <objectState name="open" value="true"/>
- <objectState name="nature" value="org.eclipse.m2e.core.maven2Nature"/>
- </and>
- </visibility>
- </objectContribution>
- <objectContribution id="org.eclipse.m2e.openIssuesPage"
- objectClass="org.eclipse.core.resources.IProject"
- adaptable="true">
- <action id="org.eclipse.m2e.openIssuesPage"
- class="org.eclipse.m2e.core.actions.OpenUrlAction:org.eclipse.m2e.openIssuesPage"
- label="%m2.popup.OpenUrlAction.openIssuesPage"
- style="push"
- menubarPath="org.eclipse.m2e.core.mavenMenu/open"
- enablesFor="+"/>
- <visibility>
- <and>
- <objectState name="open" value="true"/>
- <objectState name="nature" value="org.eclipse.m2e.core.maven2Nature"/>
- </and>
- </visibility>
- </objectContribution>
- <objectContribution id="org.eclipse.m2e.openProjectPage"
- objectClass="org.eclipse.core.resources.IProject"
- adaptable="true">
- <action id="org.eclipse.m2e.openProjectPage"
- class="org.eclipse.m2e.core.actions.OpenUrlAction:org.eclipse.m2e.openProjectPage"
- label="%m2.popup.OpenUrlAction.openProjectPage"
- style="push"
- menubarPath="org.eclipse.m2e.core.mavenMenu/open"
- enablesFor="+"/>
- <visibility>
- <and>
- <objectState name="open" value="true"/>
- <objectState name="nature" value="org.eclipse.m2e.core.maven2Nature"/>
- </and>
- </visibility>
- </objectContribution>
- <objectContribution id="org.eclipse.m2e.openPomAction"
- objectClass="org.eclipse.core.resources.IProject"
- adaptable="true">
- <action id="org.eclipse.m2e.openPomAction"
- class="org.eclipse.m2e.core.actions.OpenPomAction"
- label="%m2.popup.OpenPomAction"
- style="push"
- menubarPath="org.eclipse.m2e.core.mavenMenu/open"
- enablesFor="+"/>
- <visibility>
- <and>
- <objectState name="open" value="true"/>
- <objectState name="nature" value="org.eclipse.m2e.core.maven2Nature"/>
- </and>
- </visibility>
- </objectContribution>
-
- <objectContribution id="org.eclipse.m2e.disableAction"
- objectClass="org.eclipse.core.resources.IProject"
- adaptable="true">
- <action id="org.eclipse.m2e.disableAction"
- class="org.eclipse.m2e.core.actions.DisableNatureAction"
- label="%m2.popup.DisableNatureAction"
- style="push"
- menubarPath="org.eclipse.m2e.core.mavenMenu/nature"
- enablesFor="+"/>
- <visibility>
- <and>
- <objectState name="open" value="true"/>
- <objectState name="nature" value="org.eclipse.m2e.core.maven2Nature"/>
- </and>
- </visibility>
- </objectContribution>
-
-
-
-
-
- <!--
- NOW WE HAVE POMFILE MENU CONTRIBUTIONS
- -->
- <objectContribution id="org.eclipse.m2e.core.fileMenu"
- objectClass="org.eclipse.core.resources.IFile"
- adaptable="true">
- <menu
- id="org.eclipse.m2e.core.fileMenu"
- path="additions"
- label="%m2.popup.project.label">
- <groupMarker name="new"/>
- <separator name="org.eclipse.m2e.core.separator1"/>
- <groupMarker name="update"/>
- <separator name="org.eclipse.m2e.core.separator2"/>
- <groupMarker name="open"/>
- <separator name="org.eclipse.m2e.core.separator3"/>
- <groupMarker name="nature"/>
- <separator name="org.eclipse.m2e.core.separator4"/>
- <groupMarker name="import"/>
- </menu>
- <visibility>
- <objectState name="name" value="pom.xml"/>
- </visibility>
- </objectContribution>
-
- <objectContribution id="org.eclipse.m2e.core.fileMenu.newModuleProject"
- objectClass="org.eclipse.core.resources.IFile"
- adaptable="true">
- <action id="org.eclipse.m2e.actions.moduleProjectWizardAction"
- class="org.eclipse.m2e.core.actions.ModuleProjectWizardAction"
- label="%m2.popup.ModuleProjectWizardAction"
- style="push"
- menubarPath="org.eclipse.m2e.core.fileMenu/new"
- enablesFor="1"/>
- <visibility>
- <objectState name="name" value="pom.xml"/>
- </visibility>
- </objectContribution>
- <objectContribution id="org.eclipse.m2e.core.fileMenu.addDependencyPlugin"
- objectClass="org.eclipse.core.resources.IFile"
- adaptable="true">
- <action id="org.eclipse.m2e.addPluginAction"
- class="org.eclipse.m2e.core.actions.AddPluginAction"
- label="%m2.popup.AddPluginAction"
- style="push"
- menubarPath="org.eclipse.m2e.core.fileMenu/new"
- enablesFor="1"/>
- <action id="org.eclipse.m2e.addDependencyAction"
- class="org.eclipse.m2e.core.actions.AddDependencyAction"
- label="%m2.popup.AddDependencyAction"
- style="push"
- menubarPath="org.eclipse.m2e.core.fileMenu/new"
- enablesFor="1"/>
- <visibility>
- <objectState name="name" value="pom.xml"/>
- </visibility>
- </objectContribution>
-
- <objectContribution id="org.eclipse.m2e.fileMenu.openCiPage"
- objectClass="org.eclipse.core.resources.IFile"
- adaptable="true">
- <action id="org.eclipse.m2e.openCiPage"
- class="org.eclipse.m2e.core.actions.OpenUrlAction:org.eclipse.m2e.openCiPage"
- label="%m2.popup.OpenUrlAction.openCiPage"
- style="push"
- menubarPath="org.eclipse.m2e.core.fileMenu/open"
- enablesFor="+"/>
- <visibility>
- <objectState name="name" value="pom.xml"/>
- </visibility>
- </objectContribution>
- <objectContribution id="org.eclipse.m2e.fileMenu.openScmPage"
- objectClass="org.eclipse.core.resources.IFile"
- adaptable="true">
- <action id="org.eclipse.m2e.openScmPage"
- class="org.eclipse.m2e.core.actions.OpenUrlAction:org.eclipse.m2e.openScmPage"
- label="%m2.popup.OpenUrlAction.openScmPage"
- style="push"
- menubarPath="org.eclipse.m2e.core.fileMenu/open"
- enablesFor="+"/>
- <visibility>
- <objectState name="name" value="pom.xml"/>
- </visibility>
- </objectContribution>
- <objectContribution id="org.eclipse.m2e.fileMenu.openIssuesPage"
- objectClass="org.eclipse.core.resources.IFile"
- adaptable="true">
- <action id="org.eclipse.m2e.openIssuesPage"
- class="org.eclipse.m2e.core.actions.OpenUrlAction:org.eclipse.m2e.openIssuesPage"
- label="%m2.popup.OpenUrlAction.openIssuesPage"
- style="push"
- menubarPath="org.eclipse.m2e.core.fileMenu/open"
- enablesFor="+"/>
- <visibility>
- <objectState name="name" value="pom.xml"/>
- </visibility>
- </objectContribution>
- <objectContribution id="org.eclipse.m2e.fileMenu.openProjectPage"
- objectClass="org.eclipse.core.resources.IFile"
- adaptable="true">
- <action id="org.eclipse.m2e.openProjectPage"
- class="org.eclipse.m2e.core.actions.OpenUrlAction:org.eclipse.m2e.openProjectPage"
- label="%m2.popup.OpenUrlAction.openProjectPage"
- style="push"
- menubarPath="org.eclipse.m2e.core.fileMenu/open"
- enablesFor="+"/>
- <visibility>
- <objectState name="name" value="pom.xml"/>
- </visibility>
- </objectContribution>
-
- <objectContribution id="org.eclipse.m2e.fileMenu.openPomAction"
- objectClass="org.eclipse.core.resources.IFile"
- adaptable="true">
- <action id="org.eclipse.m2e.openPomAction"
- class="org.eclipse.m2e.core.actions.OpenPomAction"
- label="%m2.popup.OpenPomAction"
- style="push"
- menubarPath="org.eclipse.m2e.core.fileMenu/open"
- enablesFor="+"/>
- <visibility>
- <objectState name="name" value="pom.xml"/>
- </visibility>
- </objectContribution>
-
-
- <!-- MNGECLIPSE-2564 -for *not* maven project, add the Convert to Maven Project action -->
-
- <objectContribution id="org.eclipse.m2e.enableNatureAction"
- objectClass="org.eclipse.core.resources.IProject"
- adaptable="true">
- <action id="org.eclipse.m2e.enableNatureAction"
- class="org.eclipse.m2e.core.actions.EnableNatureAction"
- label="%convert.to.maven.name"
- style="push"
- menubarPath="org.eclipse.ui.projectConfigure/additions"
- enablesFor="+"/>
- <visibility>
- <and>
- <objectState name="open" value="true"/>
- <not>
- <objectState name="nature" value="org.eclipse.m2e.core.maven2Nature"/>
- </not>
- </and>
- </visibility>
- </objectContribution>
-
- <!--
- NOW WE HAVE WORKING SET MENU CONTRIBUTIONS
- -->
- <objectContribution id="org.eclipse.m2e.core.workingSetMenu"
- adaptable="true"
- objectClass="org.eclipse.ui.IWorkingSet">
- <menu
- id="org.eclipse.m2e.core.workingSetMenu"
- path="additions"
- label="%m2.popup.project.label">
- <groupMarker name="new"/>
- <separator name="org.eclipse.m2e.core.separator1"/>
- <groupMarker name="update"/>
- <separator name="org.eclipse.m2e.core.separator2"/>
- <groupMarker name="open"/>
- <separator name="org.eclipse.m2e.core.separator3"/>
- <groupMarker name="nature"/>
- <separator name="org.eclipse.m2e.core.separator4"/>
- <groupMarker name="import"/>
- </menu>
- </objectContribution>
-
- <objectContribution id="org.eclipse.m2e.workingSet.updateConfigurationAction"
- adaptable="true"
- objectClass="org.eclipse.ui.IWorkingSet">
- <action id="org.eclipse.m2e.updateConfigurationAction"
- class="org.eclipse.m2e.core.actions.UpdateConfigurationAction"
- label="%m2.popup.UpdateConfigurationAction"
- style="push"
- menubarPath="org.eclipse.m2e.core.workingSetMenu/update"
- enablesFor="+"/>
- </objectContribution>
-
- <objectContribution id="org.eclipse.m2e.workingSet.refreshMavenModelsAction"
- adaptable="true"
- objectClass="org.eclipse.ui.IWorkingSet">
- <action id="org.eclipse.m2e.refreshMavenModelsAction"
- class="org.eclipse.m2e.core.actions.RefreshMavenModelsAction"
- label="%m2.popup.RefreshMavenModelsAction"
- style="push"
- menubarPath="org.eclipse.m2e.core.workingSetMenu/update"
- enablesFor="+"/>
- <action id="org.eclipse.m2e.refreshMavenSnapshotsAction"
- class="org.eclipse.m2e.core.actions.RefreshMavenModelsAction:snapshots"
- label="%m2.popup.RefreshMavenModelsAction.snapshots"
- style="push"
- menubarPath="org.eclipse.m2e.core.workingSetMenu/update"
- enablesFor="+">
- </action>
- </objectContribution>
-
-
- <objectContribution id="org.eclipse.m2e.core.scmUrl"
- objectClass="org.eclipse.m2e.core.scm.ScmUrl"
- adaptable="true">
- <action id="org.eclipse.m2e.core.ui.checkoutAsMaven"
- label="%checkoutaction.label"
- class="org.eclipse.m2e.core.actions.CheckoutAsMavenAction"
- menubarPath="checkoutGroup"/>
- </objectContribution>
-
- <objectContribution id="org.eclipse.m2e.core.openPomArtifact"
- objectClass="org.apache.maven.artifact.Artifact"
- adaptable="false">
- <action id="org.eclipse.m2e.core.ui.openPomArtifact"
- class="org.eclipse.m2e.core.actions.OpenPomAction"
- label="%openpomaction.label"
- enablesFor="1"/>
- </objectContribution>
- <objectContribution id="org.eclipse.m2e.core.openAetherPomDependencyNode"
- objectClass="org.sonatype.aether.graph.DependencyNode"
- adaptable="false">
- <action id="org.eclipse.m2e.core.ui.openPomDependency"
- class="org.eclipse.m2e.core.actions.OpenPomAction"
- label="%openpomaction.label3"
- enablesFor="1"/>
- </objectContribution>
- <objectContribution id="org.eclipse.m2e.core.openPomDependency"
- objectClass="org.eclipse.m2e.model.edit.pom.Dependency"
- adaptable="false">
- <action id="org.eclipse.m2e.core.ui.openPomDependency"
- class="org.eclipse.m2e.core.actions.OpenPomAction"
- label="%openpomaction.label4"
- enablesFor="1"/>
- </objectContribution>
-
- <objectContribution id="org.eclipse.m2e.core.openProjectPageArtifact"
- objectClass="org.apache.maven.artifact.Artifact"
- adaptable="false">
- <action id="org.eclipse.m2e.core.ui.openPomArtifactUrl"
- class="org.eclipse.m2e.core.actions.OpenUrlAction:org.eclipse.m2e.core.openProjectPage"
- label="%openprojectaction.label"
- enablesFor="1"/>
- </objectContribution>
- <objectContribution id="org.eclipse.m2e.core.openAetherProjectPageDependencyNode"
- objectClass="org.sonatype.aether.graph.DependencyNode"
- adaptable="false">
- <action id="org.eclipse.m2e.core.ui.openPomDependencyUrl"
- class="org.eclipse.m2e.core.actions.OpenUrlAction:org.eclipse.m2e.core.openProjectPage"
- label="%openprojectaction.label3"
- enablesFor="1"/>
- </objectContribution>
- <objectContribution id="org.eclipse.m2e.core.openopenProjectPageDependency"
- objectClass="org.eclipse.m2e.model.edit.pom.Dependency"
- adaptable="false">
- <action id="org.eclipse.m2e.core.ui.openPomArtifactUrl"
- class="org.eclipse.m2e.core.actions.OpenUrlAction:org.eclipse.m2e.core.openProjectPage"
- label="%openprojectaction.label4"
- enablesFor="1"/>
- </objectContribution>
-
- </extension>
-
- <extension point="org.eclipse.ui.popupMenus">
- <objectContribution id="org.eclipse.m2e.disableWorkspaceResolutionAction"
- objectClass="org.eclipse.core.resources.IProject"
- adaptable="true">
- <action id="org.eclipse.m2e.disableWorkspaceResolutionAction"
- class="org.eclipse.m2e.core.actions.ChangeNatureAction:disableWorkspaceResolution"
- label="%m2.popup.ChangeNatureAction.disableWorkspaceResolution"
- style="push"
- menubarPath="org.eclipse.m2e.core.mavenMenu/nature"
- enablesFor="1"/> <!-- is it really 1 or + -->
- <visibility>
- <and>
- <objectState name="open" value="true"/>
- <objectState name="nature" value="org.eclipse.m2e.core.maven2Nature"/>
- </and>
- </visibility>
- <enablement>
- <not>
- <test property="org.eclipse.m2e.workspaceResulutionEnable"/>
- </not>
- </enablement>
- </objectContribution>
- <objectContribution id="org.eclipse.m2e.enableWorkspaceResolutionAction"
- objectClass="org.eclipse.core.resources.IProject"
- adaptable="true">
- <action id="org.eclipse.m2e.enableWorkspaceResolutionAction"
- class="org.eclipse.m2e.core.actions.ChangeNatureAction:enableWorkspaceResolution"
- label="%m2.popup.ChangeNatureAction.enableWorkspaceResolution"
- style="push"
- menubarPath="org.eclipse.m2e.core.mavenMenu/nature"
- enablesFor="1"/> <!-- is it really 1 or + -->
- <visibility>
- <and>
- <objectState name="open" value="true"/>
- <objectState name="nature" value="org.eclipse.m2e.core.maven2Nature"/>
- </and>
- </visibility>
- <enablement>
- <test property="org.eclipse.m2e.workspaceResulutionEnable"/>
- </enablement>
- </objectContribution>
- </extension>
-
- <extension point="org.eclipse.core.expressions.propertyTesters">
- <propertyTester
- id="org.eclipse.m2e.core.MavenPropertyTester"
- class="org.eclipse.m2e.core.actions.MavenPropertyTester"
- namespace="org.eclipse.m2e"
- properties="launchable,workspaceResulutionEnable,hasArtifactKey,hasProjectArtifactKey"
- type="org.eclipse.core.runtime.IAdaptable"/>
- </extension>
-
- <extension point="org.eclipse.ui.commands">
- <command id="org.eclipse.m2e.core.ui.command.openPom"
- categoryId="org.eclipse.ui.category.navigate"
- name="%m2.shortcut.open.pom"/>
- <command
- categoryId="org.eclipse.ui.category.edit"
- description="%command.adddependency.description"
- id="org.eclipse.m2e.core.ui.command.addDependency"
- name="%m2.shortcut.addDependency">
- </command>
- <command
- categoryId="org.eclipse.ui.category.edit"
- description="%command.addplugin.description"
- id="org.eclipse.m2e.core.ui.command.addPlugin"
- name="%m2.shortcut.addPlugin">
- </command>
- </extension>
-
<extension point="org.eclipse.core.resources.markers"
id="maven2Problem"
name="%m2.marker.problem.name">
@@ -693,236 +92,10 @@
<persistent value="true"/>
</extension>
- <extension point="org.eclipse.ui.keywords">
- <keyword id="org.eclipse.m2e.core.maven" label="%keyword.label"/>
- </extension>
-
- <extension point="org.eclipse.ui.preferencePages">
- <page id="org.eclipse.m2e.core.preferences.Maven2PreferencePage"
- class="org.eclipse.m2e.core.ui.internal.preferences.MavenPreferencePage"
- name="%m2.preferences.page.name">
- <keywordReference id="org.eclipse.m2e.core.maven"/>
- </page>
- <page id="org.eclipse.m2e.core.preferences.MavenInstallationsPreferencePage"
- category="org.eclipse.m2e.core.preferences.Maven2PreferencePage"
- class="org.eclipse.m2e.core.ui.internal.preferences.MavenInstallationsPreferencePage"
- name="%page.installations.name">
- <keywordReference id="org.eclipse.m2e.core.maven"/>
- </page>
- <page id="org.eclipse.m2e.core.preferences.MavenSettingsPreferencePage"
- category="org.eclipse.m2e.core.preferences.Maven2PreferencePage"
- class="org.eclipse.m2e.core.ui.internal.preferences.MavenSettingsPreferencePage"
- name="%page.usersettings.name">
- <keywordReference id="org.eclipse.m2e.core.maven"/>
- </page>
- <page id="org.eclipse.m2e.core.preferences.MavenArchetypesPreferencePage"
- category="org.eclipse.m2e.core.preferences.Maven2PreferencePage"
- class="org.eclipse.m2e.core.ui.internal.preferences.MavenArchetypesPreferencePage"
- name="%page.archetypes.name">
- <keywordReference id="org.eclipse.m2e.core.maven"/>
- </page>
- </extension>
-
<extension point="org.eclipse.core.runtime.preferences">
<initializer class="org.eclipse.m2e.core.internal.preferences.MavenPreferenceInitializer"/>
</extension>
- <extension point="org.eclipse.ui.newWizards">
- <category id="org.eclipse.m2e" name="%m2.wizard.name"/>
-
- <wizard id="org.eclipse.m2e.core.wizards.Maven2PomWizard"
- category="org.eclipse.m2e"
- class="org.eclipse.m2e.core.wizards.MavenPomWizard"
- icon="icons/new_m2_pom.gif"
- name="%m2.wizard.pom.name">
- <selection class="org.eclipse.core.resources.IProject"/>
- <selection class="org.eclipse.core.resources.IResource"/>
- </wizard>
-
- <wizard id="org.eclipse.m2e.core.wizards.Maven2ProjectWizard"
- category="org.eclipse.m2e"
- class="org.eclipse.m2e.core.wizards.MavenProjectWizard"
- icon="icons/new_m2_project.gif"
- name="%m2.wizard.project.name"
- project="true">
- <description>%m2.wizard.project.description</description>
- </wizard>
-
- <wizard id="org.eclipse.m2e.core.wizards.Maven2ModuleWizard"
- category="org.eclipse.m2e"
- class="org.eclipse.m2e.core.wizards.MavenModuleWizard"
- icon="icons/new_m2_project.gif"
- name="%m2.wizard.module.name"
- project="true">
- <description>%m2.wizard.module.description</description>
- </wizard>
-
- <wizard id="org.eclipse.m2e.core.wizards.MavenCheckoutWizard"
- name="%wizard.checkout.name"
- class="org.eclipse.m2e.core.wizards.MavenCheckoutWizard"
- category="org.eclipse.m2e"
- icon="icons/import_m2_project.gif" project="true">
- <description>%wizard.checkout.description</description>
- <!--
- <selection class="org.tigris.subversion.subclipse.core.ISVNRemoteFolder"/>
- -->
- </wizard>
- </extension>
-
- <extension point="org.eclipse.ui.importWizards">
- <category id="org.eclipse.ui.Basic" name="%category.general.name"/>
- <category id="org.eclipse.m2e" name="%m2.wizard.name"/>
-
- <wizard id="org.eclipse.m2e.core.wizards.MavenPomCheckoutWizard"
- class="org.eclipse.m2e.core.wizards.MavenMaterializePomWizard"
- category="org.eclipse.m2e"
- name="%m2.wizard.materialize.name"
- icon="icons/import_m2_project.gif">
- <description>%m2.wizard.materialize.description</description>
- </wizard>
-
- <wizard id="org.eclipse.m2e.core.wizards.MavenCheckoutWizard"
- class="org.eclipse.m2e.core.wizards.MavenCheckoutWizard"
- category="org.eclipse.m2e"
- name="%wizard.checkout2.name"
- icon="icons/import_m2_project.gif">
- <description>%wizard.checkout2.description</description>
- <!--
- <selection class="org.tigris.subversion.subclipse.core.ISVNRemoteFolder"/>
- -->
- </wizard>
-
- <wizard id="org.eclipse.m2e.core.wizards.MavenInstallFileWizard"
- class="org.eclipse.m2e.core.wizards.MavenInstallFileWizard"
- category="org.eclipse.m2e"
- icon="icons/import_jar.gif"
- name="%wizard.install.name">
- <selection class="org.eclipse.core.resources.IFile" name="*.jar"/>
- <description>%wizard.install.description</description>
- </wizard>
-
- <wizard id="org.eclipse.m2e.core.wizards.Maven2ImportWizard"
- class="org.eclipse.m2e.core.wizards.MavenImportWizard"
- icon="icons/import_m2_project.gif"
- category="org.eclipse.m2e"
- name="%m2.wizard.import.name">
- <description>%m2.wizard.import.description</description>
- </wizard>
-
- </extension>
-
- <extension point="org.eclipse.ui.console.consoleFactories">
- <consoleFactory label="%consoleFactory.label" icon="icons/m2.gif"
- class="org.eclipse.m2e.core.ui.internal.MavenConsoleFactory"/>
- </extension>
-
- <extension point="org.eclipse.ui.console.consolePageParticipants">
- <consolePageParticipant
- class="org.eclipse.m2e.core.ui.internal.MavenConsolePageParticipant"
- id="org.eclipse.m2e.core.launch.console.Maven2ConsolePageParticipant">
- <enablement>
- <instanceof value="org.eclipse.m2e.core.internal.console.MavenConsoleImpl"/>
- </enablement>
- </consolePageParticipant>
- </extension>
-
- <extension point="org.eclipse.ui.actionSets">
- <actionSet id="org.eclipse.m2e.core.ui.navigation"
- label="%actionSet.navigation.label" visible="true">
- <action
- class="org.eclipse.m2e.core.actions.OpenPomAction:artifact"
- definitionId="org.eclipse.m2e.core.ui.command.openPom"
- icon="icons/open_pom.gif"
- id="org.eclipse.m2e.core.ui.open.pom"
- label="%action.openpom.label"
- menubarPath="navigate/open.ext"
- style="push"
- tooltip="%action.openpom.tooltip"/>
- <action
- class="org.eclipse.m2e.core.actions.RefreshMavenModelsAction"
- icon="icons/update_dependencies.gif"
- id="org.eclipse.m2e.core.actions.RefreshModels"
- label="%action.updatedeps.label"
- menubarPath="project/additions"
- tooltip="%action.updatedeps.tooltip">
- </action>
- </actionSet>
-
- <actionSet
- id="org.eclipse.m2e.core.actions.maven"
- label="%actionSet.maven.label"
- visible="true">
- <action
- class="org.eclipse.m2e.core.actions.AddDependencyAction"
- definitionId="org.eclipse.m2e.core.ui.command.addDependency"
- icon="icons/open_pom.gif"
- id="org.eclipse.m2e.core.actions.add.dependency"
- label="%action.adddep.label"
- menubarPath="navigate/open.ext"
- style="push"
- tooltip="%action.adddep.tooltip">
- </action>
- <action
- class="org.eclipse.m2e.core.actions.AddPluginAction"
- definitionId="org.eclipse.m2e.core.ui.command.addPlugin"
- id="org.eclipse.m2e.core.actions.add.plugin"
- label="%action.addplugin.label"
- style="push"
- tooltip="%action.add.plugin.tooltip">
- </action>
- </actionSet>
- </extension>
-
- <extension point="org.eclipse.ui.views">
- <category id="org.eclipse.m2e.core.views.repositories"
- name="%category.maven.name"/>
- <view id="org.eclipse.m2e.core.views.MavenRepositoryView"
- category="org.eclipse.m2e.core.views.repositories"
- class="org.eclipse.m2e.core.ui.internal.views.MavenRepositoryView"
- icon="icons/maven_indexes.gif"
- name="%view.repos.name"/>
- </extension>
-
- <extension point="org.eclipse.ui.propertyPages">
- <page id="org.eclipse.m2e.core.MavenProjectPreferencePage"
- class="org.eclipse.m2e.core.ui.internal.preferences.MavenProjectPreferencePage"
- name="%page.maven.name"
- objectClass="org.eclipse.core.resources.IProject"
- adaptable="true">
- <filter name="nature" value="org.eclipse.m2e.core.maven2Nature"/>
- </page>
- <page id="org.eclipse.m2e.core.MavenProjectLifecycleMappingPage"
- class="org.eclipse.m2e.core.ui.internal.preferences.MavenProjectLifecycleMappingPage"
- name="%page.mappings.name"
- category="org.eclipse.m2e.core.MavenProjectPreferencePage"
- objectClass="org.eclipse.core.resources.IProject"
- adaptable="true">
- <filter name="nature" value="org.eclipse.m2e.core.maven2Nature"/>
- </page>
- </extension>
-
- <extension
- point="org.eclipse.m2e.core.lifecycleMappingPropertyPage">
- <lifecycleMappingPropertyPage
- class="org.eclipse.m2e.core.ui.internal.preferences.EmptyLifecycleMappingPropertyPage"
- id = "emptyPropertyPage"
- lifecycleMappingId = "NULL"
- name = "Empty Lifecycle Mapping">
- </lifecycleMappingPropertyPage>
- <lifecycleMappingPropertyPage
- class="org.eclipse.m2e.core.ui.internal.preferences.CustomizableLifecycleMappingPropertyPage"
- id = "customizablePropertyPage"
- lifecycleMappingId = "customizable"
- name = "Customizable Lifecycle Mapping">
- </lifecycleMappingPropertyPage>
- <lifecycleMappingPropertyPage
- class="org.eclipse.m2e.core.ui.internal.preferences.MissingLifecycleMappingPropertyPage"
- id="missingLifecycleMappingPropertyPage"
- lifecycleMappingId="MISSING"
- name="Missing Lifecycle Mapping">
- </lifecycleMappingPropertyPage>
- </extension>
-
<extension
point="org.eclipse.m2e.core.lifecycleMappings">
<lifecycleMapping
@@ -938,32 +111,4 @@
</configurator>
</extension>
- <extension point="org.eclipse.ui.bindings">
- <key
- commandId="org.eclipse.m2e.core.ui.command.addDependency"
- contextId="org.eclipse.core.runtime.xml"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="Ctrl+Shift+D">
- </key>
- <key
- commandId="org.eclipse.m2e.core.ui.command.addPlugin"
- contextId="org.eclipse.core.runtime.xml"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="Ctrl+Shift+P">
- </key>
- </extension>
-
- <!--
- <extension point="org.eclipse.search.searchPages">
- <page id="org.eclipse.m2e.core.MavenSearchPage"
- class="org.eclipse.m2e.core.ui.internal.search.MavenSearchPage"
- enabled="true"
- label="Maven Search"/>
- </extension>
- <extension point="org.eclipse.search.searchResultViewPages">
- <viewPage id="org.eclipse.m2e.core.MavenSearchResultPage"
- class="org.eclipse.m2e.core.ui.internal.search.MavenSearchResultPage"
- searchResultClass="org.eclipse.m2e.core.ui.internal.search.MavenSearchResult"/>
- </extension>
- -->
</plugin>
diff --git a/org.eclipse.m2e.core/pom.xml b/org.eclipse.m2e.core/pom.xml
index 8067bd46..68c99d5e 100644
--- a/org.eclipse.m2e.core/pom.xml
+++ b/org.eclipse.m2e.core/pom.xml
@@ -32,9 +32,6 @@
<include>**/*.properties</include>
</includes>
</resource>
- <resource>
- <directory>${basedir}/resources</directory>
- </resource>
</resources>
<plugins>
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/MavenPlugin.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/MavenPlugin.java
index 2cddf6f9..76672f41 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/MavenPlugin.java
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/MavenPlugin.java
@@ -12,42 +12,19 @@
package org.eclipse.m2e.core;
import java.io.File;
-import java.net.MalformedURLException;
-import java.net.URL;
import org.osgi.framework.BundleContext;
import org.osgi.framework.Constants;
+import org.osgi.framework.ServiceReference;
import org.osgi.framework.Version;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
-import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResourceChangeEvent;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.dialogs.MessageDialogWithToggle;
-import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Link;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IStartup;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.browser.IWebBrowser;
-import org.eclipse.ui.dialogs.PreferencesUtil;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.eclipse.core.runtime.Plugin;
import org.codehaus.plexus.ContainerConfiguration;
import org.codehaus.plexus.DefaultContainerConfiguration;
@@ -83,9 +60,6 @@ import org.eclipse.m2e.core.embedder.MavenModelManager;
import org.eclipse.m2e.core.embedder.MavenRuntimeManager;
import org.eclipse.m2e.core.index.IndexManager;
import org.eclipse.m2e.core.internal.ExtensionReader;
-import org.eclipse.m2e.core.internal.Messages;
-import org.eclipse.m2e.core.internal.console.MavenConsoleImpl;
-import org.eclipse.m2e.core.internal.embedder.MavenConfigurationImpl;
import org.eclipse.m2e.core.internal.embedder.MavenEmbeddedRuntime;
import org.eclipse.m2e.core.internal.embedder.MavenImpl;
import org.eclipse.m2e.core.internal.embedder.MavenWorkspaceRuntime;
@@ -94,7 +68,7 @@ import org.eclipse.m2e.core.internal.index.IndexingTransferListener;
import org.eclipse.m2e.core.internal.index.NexusIndexManager;
import org.eclipse.m2e.core.internal.markers.IMavenMarkerManager;
import org.eclipse.m2e.core.internal.markers.MavenMarkerManager;
-import org.eclipse.m2e.core.internal.preferences.MavenPreferenceConstants;
+import org.eclipse.m2e.core.internal.preferences.MavenConfigurationImpl;
import org.eclipse.m2e.core.internal.project.ProjectConfigurationManager;
import org.eclipse.m2e.core.internal.project.WorkspaceStateWriter;
import org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager;
@@ -104,15 +78,13 @@ import org.eclipse.m2e.core.project.IProjectConfigurationManager;
import org.eclipse.m2e.core.project.MavenProjectManager;
import org.eclipse.m2e.core.project.MavenUpdateRequest;
import org.eclipse.m2e.core.repository.IRepositoryRegistry;
-import org.eclipse.m2e.core.util.search.IndexSearchEngine;
-import org.eclipse.m2e.core.util.search.SearchEngine;
/**
* MavenPlugin main plug-in class.
*/
-public class MavenPlugin extends AbstractUIPlugin implements IStartup {
-
+public class MavenPlugin extends Plugin {
+
// preferences
private static final String PREFS_ARCHETYPES = "archetypesInfo.xml"; //$NON-NLS-1$
@@ -125,8 +97,6 @@ public class MavenPlugin extends AbstractUIPlugin implements IStartup {
*/
private MutablePlexusContainer plexus;
- private MavenConsole console;
-
private MavenModelManager modelManager;
private NexusIndexManager indexManager;
@@ -193,14 +163,7 @@ public class MavenPlugin extends AbstractUIPlugin implements IStartup {
MavenLogger.setLog(getLog());
- try {
- this.console = new MavenConsoleImpl(MavenImages.M2); //$NON-NLS-1$
- } catch(RuntimeException ex) {
- MavenLogger.log(new Status(IStatus.ERROR, IMavenConstants.PLUGIN_ID, -1, "Unable to start console: "
- + ex.toString(), ex));
- }
-
- this.mavenConfiguration = new MavenConfigurationImpl(getPreferenceStore());
+ this.mavenConfiguration = new MavenConfigurationImpl();
ClassLoader cl = MavenPlugin.class.getClassLoader();
ContainerConfiguration cc = new DefaultContainerConfiguration().setClassWorld(new ClassWorld("plexus.core", cl)) //$NON-NLS-1$
@@ -215,23 +178,22 @@ public class MavenPlugin extends AbstractUIPlugin implements IStartup {
this.archetypeManager.readCatalogs();
} catch(Exception ex) {
String msg = "Can't read archetype catalog configuration";
- this.console.logError(msg + "; " + ex.getMessage()); //$NON-NLS-1$
MavenLogger.log(msg, ex);
}
- this.mavenMarkerManager = new MavenMarkerManager(console, mavenConfiguration);
+ this.mavenMarkerManager = new MavenMarkerManager(mavenConfiguration);
boolean updateProjectsOnStartup = mavenConfiguration.isUpdateProjectsOnStartup();
////////////////////////////////////////////////////////////////////////////////////////////////
- this.maven = new MavenImpl(mavenConfiguration, console);
+ this.maven = new MavenImpl(mavenConfiguration);
// TODO eagerly reads workspace state cache
- this.managerImpl = new ProjectRegistryManager(maven, console, stateLocationDir,
- !updateProjectsOnStartup /* readState */, mavenMarkerManager);
+ this.managerImpl = new ProjectRegistryManager(maven, stateLocationDir, !updateProjectsOnStartup /* readState */,
+ mavenMarkerManager);
- this.mavenBackgroundJob = new ProjectRegistryRefreshJob(managerImpl, console, mavenConfiguration);
+ this.mavenBackgroundJob = new ProjectRegistryRefreshJob(managerImpl, mavenConfiguration);
IWorkspace workspace = ResourcesPlugin.getWorkspace();
workspace.addResourceChangeListener(mavenBackgroundJob, IResourceChangeEvent.POST_CHANGE
@@ -244,13 +206,13 @@ public class MavenPlugin extends AbstractUIPlugin implements IStartup {
mavenConfiguration.isOffline() /*offline*/, false /* updateSnapshots */));
}
- this.modelManager = new MavenModelManager(maven, projectManager, console);
+ this.modelManager = new MavenModelManager(maven, projectManager);
- this.runtimeManager = new MavenRuntimeManager(getPreferenceStore());
+ this.runtimeManager = new MavenRuntimeManager();
this.runtimeManager.setEmbeddedRuntime(new MavenEmbeddedRuntime(getBundleContext()));
this.runtimeManager.setWorkspaceRuntime(new MavenWorkspaceRuntime(projectManager));
- this.configurationManager = new ProjectConfigurationManager(maven, console, projectManager, modelManager,
+ this.configurationManager = new ProjectConfigurationManager(maven, projectManager, modelManager,
mavenMarkerManager, mavenConfiguration);
this.projectManager.addMavenProjectChangedListener(this.configurationManager);
workspace.addResourceChangeListener(configurationManager, IResourceChangeEvent.PRE_DELETE);
@@ -261,7 +223,7 @@ public class MavenPlugin extends AbstractUIPlugin implements IStartup {
this.projectManager.addMavenProjectChangedListener(repositoryRegistry);
//create the index manager
- this.indexManager = new NexusIndexManager(console, projectManager, repositoryRegistry, stateLocationDir);
+ this.indexManager = new NexusIndexManager(projectManager, repositoryRegistry, stateLocationDir);
this.projectManager.addMavenProjectChangedListener(indexManager);
this.maven.addLocalRepositoryListener(new IndexingTransferListener(indexManager));
this.repositoryRegistry.addRepositoryIndexer(indexManager);
@@ -269,8 +231,6 @@ public class MavenPlugin extends AbstractUIPlugin implements IStartup {
// fork repository registry update. must after index manager registered as a listener
this.repositoryRegistry.updateRegistry();
-
- checkJdk();
}
private static ArchetypeManager newArchetypeManager(File stateLocationDir) {
@@ -284,10 +244,6 @@ public class MavenPlugin extends AbstractUIPlugin implements IStartup {
return archetypeManager;
}
- public void earlyStartup() {
- // nothing to do here, all startup work is done in #start(BundleContext)
- }
-
public PlexusContainer getPlexusContainer() {
return plexus;
}
@@ -319,95 +275,9 @@ public class MavenPlugin extends AbstractUIPlugin implements IStartup {
workspace.removeResourceChangeListener(configurationManager);
this.configurationManager = null;
- if(this.console != null) {
- this.console.shutdown();
- }
-
plugin = null;
}
- private void checkJdk() {
- if(getPreferenceStore().getBoolean(MavenPreferenceConstants.P_DISABLE_JDK_CHECK)) {
- return;
- }
- // There is no tools.jar on Mac OS X
- // http://developer.apple.com/documentation/Java/Conceptual/Java14Development/02-JavaDevTools/JavaDevTools.html
- String osName = System.getProperty("os.name", ""); //$NON-NLS-1$ //$NON-NLS-2$
- if(osName.toLowerCase().indexOf("mac os") == -1) { //$NON-NLS-1$
- String javaHome = System.getProperty("java.home"); //$NON-NLS-1$
- File toolsJar = new File(javaHome, "../lib/tools.jar"); //$NON-NLS-1$
- if(!toolsJar.exists()) {
- getConsole().logError("Eclipse is running in a JRE, but a JDK is required\n" //
- + " Some Maven plugins may not work when importing projects or updating source folders.");
- if(!getPreferenceStore().getBoolean(MavenPreferenceConstants.P_DISABLE_JDK_WARNING)) {
- showJdkWarning();
- }
- }
- }
- }
-
- private void showJdkWarning() {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- Shell shell = PlatformUI.getWorkbench().getDisplay().getActiveShell();
- MessageDialogWithToggle dialog = new MessageDialogWithToggle(shell, //
- Messages.MavenPlugin_error_jre_title, //
- null, Messages.MavenPlugin_error_jre_message, MessageDialog.WARNING, //
- new String[] {IDialogConstants.OK_LABEL}, //
- 0, Messages.MavenPlugin_error_warn_again, false) {
- protected Control createMessageArea(Composite composite) {
- Image image = getImage();
- if(image != null) {
- imageLabel = new Label(composite, SWT.NULL);
- image.setBackground(imageLabel.getBackground());
- imageLabel.setImage(image);
- GridDataFactory.fillDefaults().align(SWT.CENTER, SWT.BEGINNING).applyTo(imageLabel);
- }
-
- Link link = new Link(composite, getMessageLabelStyle());
- link.setText(message);
- link.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- if("eclipse.ini".equals(e.text)) { //$NON-NLS-1$
-// String href = "topic=/org.eclipse.platform.doc.user/tasks/running_eclipse.htm";
-// BaseHelpSystem.getHelpDisplay().displayHelpResource(href, false);
-
- try {
- IWebBrowser browser = PlatformUI.getWorkbench().getBrowserSupport().getExternalBrowser();
- // browser.openURL(new URL("http://www.eclipse.org/swt/launcher.html"));
- browser
- .openURL(new URL(
- "http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.platform.doc.user/tasks/running_eclipse.htm")); //$NON-NLS-1$
- } catch(MalformedURLException ex) {
- MavenLogger.log("Malformed URL", ex);
- } catch(PartInitException ex) {
- MavenLogger.log(ex);
- }
- } else {
- PreferencesUtil.createPreferenceDialogOn(getShell(),
- "org.eclipse.jdt.debug.ui.preferences.VMPreferencePage", null, null).open(); //$NON-NLS-1$
- }
- }
- });
-
- GridDataFactory.fillDefaults().align(SWT.FILL, SWT.BEGINNING).grab(true, false)
- .hint(convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH), SWT.DEFAULT)
- .applyTo(link);
-
- return composite;
- }
- };
-
- dialog.setPrefStore(getPreferenceStore());
- dialog.setPrefKey(MavenPreferenceConstants.P_DISABLE_JDK_WARNING);
-
- dialog.open();
-
- getPreferenceStore().setValue(MavenPreferenceConstants.P_DISABLE_JDK_WARNING, dialog.getToggleState());
- }
- });
- }
-
/**
* Returns the shared instance.
*/
@@ -431,8 +301,28 @@ public class MavenPlugin extends AbstractUIPlugin implements IStartup {
return this.indexManager;
}
+ @SuppressWarnings({"unchecked", "rawtypes"})
public MavenConsole getConsole() {
- return this.console;
+ // TODO this leaks service references
+ MavenConsole console = null;
+ ServiceReference serviceReference = bundleContext.getServiceReference(MavenConsole.class.getName());
+ if(serviceReference != null) {
+ console = (MavenConsole) bundleContext.getService(serviceReference);
+ }
+ if(console == null) {
+ final Logger log = LoggerFactory.getLogger(MavenConsole.class);
+ console = new MavenConsole() {
+
+ public void logMessage(String msg) {
+ log.info(msg);
+ }
+
+ public void logError(String msg) {
+ log.error(msg);
+ }
+ };
+ }
+ return console;
}
public MavenRuntimeManager getMavenRuntimeManager() {
@@ -451,23 +341,6 @@ public class MavenPlugin extends AbstractUIPlugin implements IStartup {
return this.mavenConfiguration;
}
- /**
- * Returns an Image for the file at the given relative path.
- */
- public static Image getImage(String path) {
- ImageRegistry registry = getDefault().getImageRegistry();
- Image image = registry.get(path);
- if(image == null) {
- registry.put(path, imageDescriptorFromPlugin(IMavenConstants.PLUGIN_ID, path));
- image = registry.get(path);
- }
- return image;
- }
-
- public static ImageDescriptor getImageDescriptor(String path) {
- return imageDescriptorFromPlugin(IMavenConstants.PLUGIN_ID, path);
- }
-
public BundleContext getBundleContext() {
return this.bundleContext;
}
@@ -559,8 +432,4 @@ public class MavenPlugin extends AbstractUIPlugin implements IStartup {
legacy.setSession(session);
return old;
}
-
- public SearchEngine getSearchEngine(IProject context) throws CoreException {
- return new IndexSearchEngine(MavenPlugin.getDefault().getIndexManager().getIndex(context));
- }
}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/core/MavenConsole.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/core/MavenConsole.java
index a6196d0f..4f723d9c 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/core/MavenConsole.java
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/core/MavenConsole.java
@@ -11,31 +11,16 @@
package org.eclipse.m2e.core.core;
-import org.eclipse.ui.console.IConsole;
-import org.eclipse.ui.console.IConsoleListener;
-
/**
* Maven Console
- *
+ *
* @author Eugene Kuleshov
* @noimplement This interface is not intended to be implemented by clients.
*/
-public interface MavenConsole extends IConsole {
+public interface MavenConsole {
void logMessage(String msg);
void logError(String msg);
- IConsoleListener newLifecycle();
-
- void shutdown();
-
- void showConsole();
-
- void closeConsole();
-
- void addMavenConsoleListener(IMavenConsoleListener listener);
-
- void removeMavenConsoleListener(IMavenConsoleListener listener);
-
}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/embedder/MavenModelManager.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/embedder/MavenModelManager.java
index 273d01b8..5bd5ef4a 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/embedder/MavenModelManager.java
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/embedder/MavenModelManager.java
@@ -64,7 +64,6 @@ import org.sonatype.aether.util.graph.transformer.JavaEffectiveScopeCalculator;
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.core.IMavenConstants;
-import org.eclipse.m2e.core.core.MavenConsole;
import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.internal.Messages;
import org.eclipse.m2e.core.project.IMavenProjectFacade;
@@ -92,15 +91,12 @@ public class MavenModelManager {
static final PomFactory POM_FACTORY = PomFactory.eINSTANCE;
private final MavenProjectManager projectManager;
-
- private final MavenConsole console;
private final IMaven maven;
- public MavenModelManager(IMaven maven, MavenProjectManager projectManager, MavenConsole console) {
+ public MavenModelManager(IMaven maven, MavenProjectManager projectManager) {
this.maven = maven;
this.projectManager = projectManager;
- this.console = console;
}
public PomResourceImpl loadResource(IFile pomFile) throws CoreException {
@@ -135,7 +131,6 @@ public class MavenModelManager {
String pomFileName = pomFile.getLocation().toString();
if(pomFile.exists()) {
String msg = NLS.bind(Messages.MavenModelManager_error_pom_exists, pomFileName);
- console.logError(msg);
throw new CoreException(new Status(IStatus.ERROR, IMavenConstants.PLUGIN_ID, -1, msg, null));
}
@@ -183,11 +178,9 @@ public class MavenModelManager {
} catch(RuntimeException ex) {
String msg = NLS.bind(Messages.MavenModelManager_error_create, pomFileName, ex.toString());
- console.logError(msg);
throw new CoreException(new Status(IStatus.ERROR, IMavenConstants.PLUGIN_ID, -1, msg, ex));
} catch(Exception ex) {
String msg = NLS.bind(Messages.MavenModelManager_error_create, pomFileName, ex.toString());
- console.logError(msg);
throw new CoreException(new Status(IStatus.ERROR, IMavenConstants.PLUGIN_ID, -1, msg, ex));
}
}
@@ -315,7 +308,6 @@ public class MavenModelManager {
resource.save(Collections.EMPTY_MAP);
} catch(Exception ex) {
String msg = "Unable to update " + pom;
- console.logError(msg + "; " + ex.getMessage()); //$NON-NLS-1$
MavenLogger.log(msg, ex);
} finally {
if (resource != null) {
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/embedder/MavenRuntimeManager.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/embedder/MavenRuntimeManager.java
index 0fd11501..44203ad2 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/embedder/MavenRuntimeManager.java
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/embedder/MavenRuntimeManager.java
@@ -16,38 +16,49 @@ import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
-import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.preferences.DefaultScope;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.core.runtime.preferences.IPreferencesService;
+import org.eclipse.core.runtime.preferences.InstanceScope;
+import org.eclipse.m2e.core.core.IMavenConstants;
import org.eclipse.m2e.core.internal.embedder.MavenEmbeddedRuntime;
import org.eclipse.m2e.core.internal.embedder.MavenExternalRuntime;
import org.eclipse.m2e.core.internal.preferences.MavenPreferenceConstants;
+
/**
* Maven runtime manager
- *
+ *
* @author Eugene Kuleshov
*/
public class MavenRuntimeManager {
-
+
public static final String DEFAULT = "DEFAULT"; //$NON-NLS-1$
-
- public static final String EMBEDDED = "EMBEDDED"; //$NON-NLS-1$
+
+ public static final String EMBEDDED = "EMBEDDED"; //$NON-NLS-1$
public static final String WORKSPACE = "WORKSPACE"; //$NON-NLS-1$
- private final IPreferenceStore preferenceStore;
+ private final IEclipsePreferences[] preferencesLookup = new IEclipsePreferences[2];
+
+ private final IPreferencesService preferenceStore;
private Map<String, MavenRuntime> runtimes = new LinkedHashMap<String, MavenRuntime>();
-
+
private MavenRuntime embeddedRuntime;
-
+
private MavenRuntime workspaceRuntime;
-
+
private MavenRuntime defaultRuntime;
-
- public MavenRuntimeManager(IPreferenceStore preferenceStore) {
- this.preferenceStore = preferenceStore;
+ public MavenRuntimeManager() {
+ this.preferenceStore = Platform.getPreferencesService();
+
+ this.preferencesLookup[0] = new InstanceScope().getNode(IMavenConstants.PLUGIN_ID);
+ this.preferencesLookup[1] = new DefaultScope().getNode(IMavenConstants.PLUGIN_ID);
+
initRuntimes();
}
@@ -58,16 +69,16 @@ public class MavenRuntimeManager {
public void setWorkspaceRuntime(MavenRuntime workspaceRuntime) {
this.workspaceRuntime = workspaceRuntime;
}
-
+
public MavenRuntime getDefaultRuntime() {
if(defaultRuntime == null || !defaultRuntime.isAvailable()) {
return embeddedRuntime;
}
return this.defaultRuntime;
}
-
+
public MavenRuntime getRuntime(String location) {
- if(location==null || location.length()==0 || DEFAULT.equals(location)) {
+ if(location == null || location.length() == 0 || DEFAULT.equals(location)) {
return getDefaultRuntime();
}
if(EMBEDDED.equals(location)) {
@@ -78,7 +89,7 @@ public class MavenRuntimeManager {
}
return runtimes.get(location);
}
-
+
public List<MavenRuntime> getMavenRuntimes() {
ArrayList<MavenRuntime> runtimes = new ArrayList<MavenRuntime>();
@@ -87,7 +98,7 @@ public class MavenRuntimeManager {
if(workspaceRuntime != null && workspaceRuntime.isAvailable()) {
runtimes.add(workspaceRuntime);
}
-
+
for(MavenRuntime runtime : this.runtimes.values()) {
if(runtime.isAvailable()) {
runtimes.add(runtime);
@@ -97,22 +108,22 @@ public class MavenRuntimeManager {
}
public void reset() {
- preferenceStore.setToDefault(MavenPreferenceConstants.P_RUNTIMES);
- preferenceStore.setToDefault(MavenPreferenceConstants.P_DEFAULT_RUNTIME);
-
+ preferencesLookup[0].remove(MavenPreferenceConstants.P_RUNTIMES);
+ preferencesLookup[0].remove(MavenPreferenceConstants.P_DEFAULT_RUNTIME);
+
initRuntimes();
}
-
+
public void setDefaultRuntime(MavenRuntime runtime) {
this.defaultRuntime = runtime;
if(runtime == null) {
- preferenceStore.setToDefault(MavenPreferenceConstants.P_DEFAULT_RUNTIME);
+ preferencesLookup[0].remove(MavenPreferenceConstants.P_DEFAULT_RUNTIME);
} else {
- preferenceStore.setValue(MavenPreferenceConstants.P_DEFAULT_RUNTIME, runtime.getLocation());
+ preferencesLookup[0].put(MavenPreferenceConstants.P_DEFAULT_RUNTIME, runtime.getLocation());
}
}
-
+
public void setRuntimes(List<MavenRuntime> runtimes) {
this.runtimes.clear();
@@ -125,18 +136,18 @@ public class MavenRuntimeManager {
separator = "|"; //$NON-NLS-1$
}
}
- preferenceStore.setValue(MavenPreferenceConstants.P_RUNTIMES, sb.toString());
+ preferencesLookup[0].put(MavenPreferenceConstants.P_RUNTIMES, sb.toString());
}
private void initRuntimes() {
runtimes.clear();
defaultRuntime = null;
-
- String selected = preferenceStore.getString(MavenPreferenceConstants.P_DEFAULT_RUNTIME);
-
- String runtimesPreference = preferenceStore.getString(MavenPreferenceConstants.P_RUNTIMES);
- if(runtimesPreference!=null && runtimesPreference.length()>0) {
+
+ String selected = preferenceStore.get(MavenPreferenceConstants.P_DEFAULT_RUNTIME, null, preferencesLookup);
+
+ String runtimesPreference = preferenceStore.get(MavenPreferenceConstants.P_RUNTIMES, null, preferencesLookup);
+ if(runtimesPreference != null && runtimesPreference.length() > 0) {
String[] locations = runtimesPreference.split("\\|"); //$NON-NLS-1$
for(int i = 0; i < locations.length; i++ ) {
MavenRuntime runtime = createExternalRuntime(locations[i]);
@@ -151,15 +162,15 @@ public class MavenRuntimeManager {
public static MavenRuntime createExternalRuntime(String location) {
return new MavenExternalRuntime(location);
}
-
+
public String getGlobalSettingsFile() {
//only return the preference store value for the global settings file if its an embedded runtime
- if(defaultRuntime == null || defaultRuntime instanceof MavenEmbeddedRuntime){
- String globalSettings = preferenceStore.getString(MavenPreferenceConstants.P_GLOBAL_SETTINGS_FILE);
- return globalSettings.trim().length()==0 ? null : globalSettings;
+ if(defaultRuntime == null || defaultRuntime instanceof MavenEmbeddedRuntime) {
+ String globalSettings = preferenceStore.get(MavenPreferenceConstants.P_GLOBAL_SETTINGS_FILE, null,
+ preferencesLookup);
+ return globalSettings.trim().length() == 0 ? null : globalSettings;
}
return defaultRuntime == null ? null : defaultRuntime.getSettings();
- }
-
-
+ }
+
}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/M2EUtils.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/M2EUtils.java
new file mode 100644
index 00000000..1c647b00
--- /dev/null
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/M2EUtils.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Sonatype, Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Sonatype, Inc. - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.m2e.core.internal;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.runtime.CoreException;
+
+public class M2EUtils {
+
+ /**
+ * Helper method which creates a folder and, recursively, all its parent folders.
+ *
+ * @param folder The folder to create.
+ * @param derived true if folder should be marked as derived
+ * @throws CoreException if creating the given <code>folder</code> or any of its parents fails.
+ */
+ public static void createFolder(IFolder folder, boolean derived) throws CoreException {
+ // Recurse until we find a parent folder which already exists.
+ if(!folder.exists()) {
+ IContainer parent = folder.getParent();
+ // First, make sure that all parent folders exist.
+ if(parent != null && !parent.exists()) {
+ createFolder((IFolder) parent, false);
+ }
+ folder.create(true, true, null);
+ }
+
+ if(folder.isAccessible() && derived) {
+ folder.setDerived(true);
+ }
+ }
+
+ public static String getRootCauseMessage(Throwable t){
+ Throwable root = getRootCause(t);
+ if(t == null){
+ return null;
+ }
+ return root.getMessage();
+ }
+
+ public static Throwable getRootCause(Throwable ex) {
+ if(ex == null) {
+ return null;
+ }
+ Throwable rootCause = ex;
+ Throwable cause = rootCause.getCause();
+ while(cause != null && cause != rootCause) {
+ rootCause = cause;
+ cause = cause.getCause();
+ }
+ return cause == null ? rootCause : cause;
+ }
+
+}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/builder/MavenBuilder.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/builder/MavenBuilder.java
index 660e9aae..3c0aaa94 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/builder/MavenBuilder.java
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/builder/MavenBuilder.java
@@ -53,6 +53,7 @@ import org.eclipse.m2e.core.core.IMavenConstants;
import org.eclipse.m2e.core.core.MavenConsole;
import org.eclipse.m2e.core.embedder.IMaven;
import org.eclipse.m2e.core.embedder.IMavenConfiguration;
+import org.eclipse.m2e.core.internal.M2EUtils;
import org.eclipse.m2e.core.internal.markers.IMavenMarkerManager;
import org.eclipse.m2e.core.project.IMavenProjectFacade;
import org.eclipse.m2e.core.project.IProjectConfigurationManager;
@@ -61,7 +62,6 @@ import org.eclipse.m2e.core.project.MavenUpdateRequest;
import org.eclipse.m2e.core.project.configurator.AbstractBuildParticipant;
import org.eclipse.m2e.core.project.configurator.ILifecycleMapping;
import org.eclipse.m2e.core.project.configurator.MojoExecutionKey;
-import org.eclipse.m2e.core.util.M2EUtils;
public class MavenBuilder extends IncrementalProjectBuilder {
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/AbstractTransferListenerAdapter.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/AbstractTransferListenerAdapter.java
index 22d1f714..09b9fea3 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/AbstractTransferListenerAdapter.java
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/AbstractTransferListenerAdapter.java
@@ -18,7 +18,7 @@ import org.eclipse.osgi.util.NLS;
import org.apache.maven.wagon.WagonConstants;
-import org.eclipse.m2e.core.core.MavenConsole;
+import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.internal.Messages;
@@ -33,16 +33,13 @@ abstract class AbstractTransferListenerAdapter {
protected final IProgressMonitor monitor;
- protected final MavenConsole console;
-
protected long complete = 0;
private static final String[] units = {Messages.AbstractTransferListenerAdapter_byte, Messages.AbstractTransferListenerAdapter_kb, Messages.AbstractTransferListenerAdapter_mb};
- protected AbstractTransferListenerAdapter(MavenImpl maven, IProgressMonitor monitor, MavenConsole console) {
+ protected AbstractTransferListenerAdapter(MavenImpl maven, IProgressMonitor monitor) {
this.maven = maven;
this.monitor = monitor == null ? new NullProgressMonitor() : monitor;
- this.console = console;
}
protected void formatBytes(long n, StringBuffer sb) {
@@ -63,7 +60,7 @@ abstract class AbstractTransferListenerAdapter {
}
protected void transferStarted(String artifactUrl) {
- console.logMessage(NLS.bind("Downloading {0}", artifactUrl));
+ MavenPlugin.getDefault().getConsole().logMessage(NLS.bind("Downloading {0}", artifactUrl));
// monitor.beginTask("0% "+e.getWagon().getRepository()+"/"+e.getResource().getName(), IProgressMonitor.UNKNOWN);
monitor.subTask(Messages.AbstractTransferListenerAdapter_4 + artifactUrl);
}
@@ -93,14 +90,14 @@ abstract class AbstractTransferListenerAdapter {
}
protected void transferCompleted(String artifactUrl) {
- console.logMessage(NLS.bind("Downloaded {0}", artifactUrl));
+ MavenPlugin.getDefault().getConsole().logMessage(NLS.bind("Downloaded {0}", artifactUrl));
// monitor.subTask("100% "+e.getWagon().getRepository()+"/"+e.getResource().getName());
monitor.subTask(""); //$NON-NLS-1$
}
protected void transferError(String artifactUrl, Exception exception) {
- console.logMessage(NLS.bind("Unable to download {0} : {1}", artifactUrl, exception));
+ MavenPlugin.getDefault().getConsole().logMessage(NLS.bind("Unable to download {0} : {1}", artifactUrl, exception));
monitor.subTask(NLS.bind(Messages.AbstractTransferListenerAdapter_subtask, artifactUrl));
}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/ArtifactTransferListenerAdapter.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/ArtifactTransferListenerAdapter.java
index 9562cb9c..7cc144b2 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/ArtifactTransferListenerAdapter.java
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/ArtifactTransferListenerAdapter.java
@@ -16,8 +16,6 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.sonatype.aether.transfer.TransferEvent;
import org.sonatype.aether.transfer.TransferListener;
-import org.eclipse.m2e.core.core.MavenConsole;
-
/**
* ArtifactTransferListenerAdapter
*
@@ -26,8 +24,8 @@ import org.eclipse.m2e.core.core.MavenConsole;
public class ArtifactTransferListenerAdapter extends AbstractTransferListenerAdapter implements
TransferListener {
- ArtifactTransferListenerAdapter(MavenImpl maven, IProgressMonitor monitor, MavenConsole console) {
- super(maven, monitor, console);
+ ArtifactTransferListenerAdapter(MavenImpl maven, IProgressMonitor monitor) {
+ super(maven, monitor);
}
public void transferInitiated(TransferEvent event) {
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/EclipseLogger.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/EclipseLogger.java
index 16cbe8b6..97c0c5f5 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/EclipseLogger.java
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/EclipseLogger.java
@@ -15,25 +15,23 @@ import org.eclipse.osgi.util.NLS;
import org.codehaus.plexus.logging.Logger;
-import org.eclipse.m2e.core.core.MavenConsole;
+import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.embedder.IMavenConfiguration;
import org.eclipse.m2e.core.internal.Messages;
class EclipseLogger implements Logger {
- private MavenConsole console;
private final IMavenConfiguration mavenConfiguration;
- public EclipseLogger(MavenConsole console, IMavenConfiguration mavenConfiguration) {
- this.console = console;
+ public EclipseLogger(IMavenConfiguration mavenConfiguration) {
this.mavenConfiguration = mavenConfiguration;
}
private void out(String s) {
- console.logMessage(s);
+ MavenPlugin.getDefault().getConsole().logMessage(s);
}
private void outError(String s) {
- console.logError(s);
+ MavenPlugin.getDefault().getConsole().logError(s);
}
public void debug( String msg ) {
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/EclipseLoggerManager.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/EclipseLoggerManager.java
index 2e6c4dd4..70340d2d 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/EclipseLoggerManager.java
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/EclipseLoggerManager.java
@@ -14,7 +14,6 @@ package org.eclipse.m2e.core.internal.embedder;
import org.codehaus.plexus.logging.AbstractLoggerManager;
import org.codehaus.plexus.logging.Logger;
-import org.eclipse.m2e.core.core.MavenConsole;
import org.eclipse.m2e.core.embedder.IMavenConfiguration;
@@ -27,8 +26,8 @@ public class EclipseLoggerManager extends AbstractLoggerManager {
private EclipseLogger logger;
- public EclipseLoggerManager(MavenConsole console, IMavenConfiguration mavenConfiguration) {
- this.logger = new EclipseLogger(console, mavenConfiguration);
+ public EclipseLoggerManager(IMavenConfiguration mavenConfiguration) {
+ this.logger = new EclipseLogger(mavenConfiguration);
}
public int getActiveLoggerCount() {
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/MavenConfigurationImpl.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/MavenConfigurationImpl.java
deleted file mode 100644
index 1205a00b..00000000
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/MavenConfigurationImpl.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008-2010 Sonatype, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Sonatype, Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.m2e.core.internal.embedder;
-
-import org.eclipse.core.runtime.ListenerList;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-
-import org.eclipse.m2e.core.core.MavenLogger;
-import org.eclipse.m2e.core.embedder.IMavenConfiguration;
-import org.eclipse.m2e.core.embedder.IMavenConfigurationChangeListener;
-import org.eclipse.m2e.core.embedder.MavenConfigurationChangeEvent;
-import org.eclipse.m2e.core.internal.preferences.MavenPreferenceConstants;
-
-
-public class MavenConfigurationImpl implements IMavenConfiguration, IPropertyChangeListener {
-
- private final IPreferenceStore preferenceStore;
- private final ListenerList listeners = new ListenerList(ListenerList.IDENTITY);
-
- public MavenConfigurationImpl(IPreferenceStore preferenceStore) {
- this.preferenceStore = preferenceStore;
- preferenceStore.addPropertyChangeListener(this);
- }
-
- public String getGlobalSettingsFile() {
- return preferenceStore.getString(MavenPreferenceConstants.P_GLOBAL_SETTINGS_FILE);
- }
-
- public String getUserSettingsFile() {
- return preferenceStore.getString(MavenPreferenceConstants.P_USER_SETTINGS_FILE);
- }
-
- public boolean isDebugOutput() {
- return preferenceStore.getBoolean(MavenPreferenceConstants.P_DEBUG_OUTPUT);
- }
-
- public boolean isDownloadJavaDoc() {
- return preferenceStore.getBoolean(MavenPreferenceConstants.P_DOWNLOAD_JAVADOC);
- }
-
- public boolean isDownloadSources() {
- return preferenceStore.getBoolean(MavenPreferenceConstants.P_DOWNLOAD_SOURCES);
- }
-
- public boolean isHideFoldersOfNestedProjects() {
- return preferenceStore.getBoolean(MavenPreferenceConstants.P_HIDE_FOLDERS_OF_NESTED_PROJECTS);
- }
-
- public boolean isOffline() {
- return preferenceStore.getBoolean(MavenPreferenceConstants.P_OFFLINE);
- }
-
- public void setUserSettingsFile(String settingsFile) {
- preferenceStore.setValue(MavenPreferenceConstants.P_USER_SETTINGS_FILE, nvl(settingsFile));
- }
-
- public void setGlobalSettingsFile(String globalSettingsFile){
- preferenceStore.setValue(MavenPreferenceConstants.P_GLOBAL_SETTINGS_FILE, nvl(globalSettingsFile));
- }
-
- private static String nvl(String s) {
- return s == null ? "" : s; //$NON-NLS-1$
- }
-
- public boolean isUpdateProjectsOnStartup() {
- return preferenceStore.getBoolean(MavenPreferenceConstants.P_UPDATE_PROJECTS);
- }
-
- public boolean isUpdateIndexesOnStartup() {
- return preferenceStore.getBoolean(MavenPreferenceConstants.P_UPDATE_INDEXES);
- }
-
- public synchronized void addConfigurationChangeListener(IMavenConfigurationChangeListener listener) {
- this.listeners.add(listener);
- }
-
- public void propertyChange(PropertyChangeEvent event) {
- MavenConfigurationChangeEvent mavenEvent = new MavenConfigurationChangeEvent(event.getProperty(), event.getNewValue(), event.getOldValue());
- for (Object listener : listeners.getListeners()) {
- try {
- ((IMavenConfigurationChangeListener) listener).mavenConfigutationChange(mavenEvent);
- } catch (Exception e) {
- MavenLogger.log("Could not deliver maven configuration change event", e);
- }
- }
-
- }
-}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/MavenImpl.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/MavenImpl.java
index 7be82405..73da4f91 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/MavenImpl.java
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/MavenImpl.java
@@ -142,7 +142,6 @@ import org.sonatype.aether.transfer.TransferListener;
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.core.IMavenConstants;
-import org.eclipse.m2e.core.core.MavenConsole;
import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.embedder.ILocalRepositoryListener;
import org.eclipse.m2e.core.embedder.IMaven;
@@ -168,14 +167,11 @@ public class MavenImpl implements IMaven, IMavenConfigurationChangeListener {
private final ConverterLookup converterLookup = new DefaultConverterLookup();
- private final MavenConsole console;
-
private final ArrayList<ISettingsChangeListener> settingsListeners = new ArrayList<ISettingsChangeListener>();
private final ArrayList<ILocalRepositoryListener> localRepositoryListeners = new ArrayList<ILocalRepositoryListener>();
- public MavenImpl(IMavenConfiguration mavenConfiguration, MavenConsole console) {
- this.console = console;
+ public MavenImpl(IMavenConfiguration mavenConfiguration) {
this.mavenConfiguration = mavenConfiguration;
mavenConfiguration.addConfigurationChangeListener(this);
}
@@ -1022,18 +1018,18 @@ public class MavenImpl implements IMaven, IMavenConfigurationChangeListener {
@SuppressWarnings("deprecation")
public WagonTransferListenerAdapter createTransferListener(IProgressMonitor monitor) {
- return new WagonTransferListenerAdapter(this, monitor, console);
+ return new WagonTransferListenerAdapter(this, monitor);
}
public TransferListener createArtifactTransferListener(IProgressMonitor monitor) {
- return new ArtifactTransferListenerAdapter(this, monitor, console);
+ return new ArtifactTransferListenerAdapter(this, monitor);
}
public synchronized PlexusContainer getPlexusContainer() throws CoreException {
if(plexus == null) {
try {
plexus = newPlexusContainer();
- plexus.setLoggerManager(new EclipseLoggerManager(console, mavenConfiguration));
+ plexus.setLoggerManager(new EclipseLoggerManager(mavenConfiguration));
} catch(PlexusContainerException ex) {
throw new CoreException(new Status(IStatus.ERROR, IMavenConstants.PLUGIN_ID, -1,
Messages.MavenImpl_error_init_maven, ex));
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/WagonTransferListenerAdapter.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/WagonTransferListenerAdapter.java
index 7d5b19c5..e1c26c16 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/WagonTransferListenerAdapter.java
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/WagonTransferListenerAdapter.java
@@ -25,7 +25,6 @@ import org.apache.maven.wagon.events.TransferEvent;
import org.apache.maven.wagon.events.TransferListener;
import org.apache.maven.wagon.repository.Repository;
-import org.eclipse.m2e.core.core.MavenConsole;
import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.embedder.ArtifactKey;
import org.eclipse.m2e.core.embedder.ILocalRepositoryListener;
@@ -37,8 +36,8 @@ final class WagonTransferListenerAdapter extends AbstractTransferListenerAdapter
// TODO this is just wrong!
private final GavCalculator gavCalculator = new M2GavCalculator();
- WagonTransferListenerAdapter(MavenImpl maven, IProgressMonitor monitor, MavenConsole console) {
- super(maven, monitor, console);
+ WagonTransferListenerAdapter(MavenImpl maven, IProgressMonitor monitor) {
+ super(maven, monitor);
}
public void transferInitiated(TransferEvent e) {
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/index/ArtifactScanningMonitor.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/index/ArtifactScanningMonitor.java
index adf3f0de..b20e363a 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/index/ArtifactScanningMonitor.java
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/index/ArtifactScanningMonitor.java
@@ -20,7 +20,7 @@ import org.apache.maven.index.ArtifactScanningListener;
import org.apache.maven.index.ScanningResult;
import org.apache.maven.index.context.IndexingContext;
-import org.eclipse.m2e.core.core.MavenConsole;
+import org.eclipse.m2e.core.MavenPlugin;
class ArtifactScanningMonitor implements ArtifactScanningListener {
@@ -30,17 +30,14 @@ class ArtifactScanningMonitor implements ArtifactScanningListener {
private final IProgressMonitor monitor;
- private final MavenConsole console;
-
private long timestamp = System.currentTimeMillis();
private File repositoryDir;
- ArtifactScanningMonitor(File repositoryDir, IProgressMonitor monitor, MavenConsole console) {
+ ArtifactScanningMonitor(File repositoryDir, IProgressMonitor monitor) {
//this.indexInfo = indexInfo;
this.repositoryDir = repositoryDir;
this.monitor = monitor;
- this.console = console;
}
public void scanningStarted(IndexingContext ctx) {
@@ -62,6 +59,6 @@ class ArtifactScanningMonitor implements ArtifactScanningListener {
public void artifactError(ArtifactContext ac, Exception e) {
String id = ac.getPom().getAbsolutePath().substring(repositoryDir.getAbsolutePath().length());
- console.logError(id + " " + e.getMessage()); //$NON-NLS-1$
+ MavenPlugin.getDefault().getConsole().logError(id + " " + e.getMessage()); //$NON-NLS-1$
}
} \ No newline at end of file
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/index/IndexUpdaterJob.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/index/IndexUpdaterJob.java
index a14760f6..12c9f394 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/index/IndexUpdaterJob.java
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/index/IndexUpdaterJob.java
@@ -22,11 +22,8 @@ import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.ISchedulingRule;
import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.ui.progress.IProgressConstants;
-import org.eclipse.m2e.core.actions.OpenMavenConsoleAction;
import org.eclipse.m2e.core.core.IMavenConstants;
-import org.eclipse.m2e.core.core.MavenConsole;
import org.eclipse.m2e.core.internal.Messages;
import org.eclipse.m2e.core.jobs.IBackgroundProcessingQueue;
@@ -50,9 +47,8 @@ class IndexUpdaterJob extends Job implements IBackgroundProcessingQueue {
private final Stack<IndexUpdaterJob.IndexCommand> updateQueue = new Stack<IndexUpdaterJob.IndexCommand>();
- public IndexUpdaterJob(NexusIndexManager indexManager, MavenConsole console) {
+ public IndexUpdaterJob(NexusIndexManager indexManager) {
super(Messages.IndexUpdaterJob_title);
- setProperty(IProgressConstants.ACTION_PROPERTY, new OpenMavenConsoleAction());
setRule(new IndexUpdaterRule());
}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/index/NexusIndexManager.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/index/NexusIndexManager.java
index 04088d2f..2068b6e9 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/index/NexusIndexManager.java
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/index/NexusIndexManager.java
@@ -81,7 +81,6 @@ import org.apache.maven.wagon.proxy.ProxyInfo;
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.core.IMavenConstants;
-import org.eclipse.m2e.core.core.MavenConsole;
import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.embedder.ArtifactKey;
import org.eclipse.m2e.core.embedder.ArtifactRepositoryRef;
@@ -144,8 +143,6 @@ public class NexusIndexManager implements IndexManager, IMavenProjectChangedList
private ArrayList<IndexCreator> minCreators = null;
- private final MavenConsole console;
-
private final File baseIndexDir;
private final List<IndexListener> indexListeners = new ArrayList<IndexListener>();
@@ -171,9 +168,8 @@ public class NexusIndexManager implements IndexManager, IMavenProjectChangedList
*/
private final Map<String, Object> indexLocks = new WeakHashMap<String, Object>();
- public NexusIndexManager(MavenConsole console, MavenProjectManager projectManager,
+ public NexusIndexManager(MavenProjectManager projectManager,
IRepositoryRegistry repositoryRegistry, File stateDir) {
- this.console = console;
this.projectManager = projectManager;
this.repositoryRegistry = repositoryRegistry;
this.baseIndexDir = new File(stateDir, "nexus"); //$NON-NLS-1$
@@ -181,7 +177,7 @@ public class NexusIndexManager implements IndexManager, IMavenProjectChangedList
this.maven = MavenPlugin.getDefault().getMaven();
this.indexUpdater = MavenPlugin.getDefault().getIndexUpdater();
- this.updaterJob = new IndexUpdaterJob(this, console);
+ this.updaterJob = new IndexUpdaterJob(this);
this.workspaceIndex = new NexusIndex(this, repositoryRegistry.getWorkspaceRepository(), NexusIndex.DETAILS_MIN);
}
@@ -206,9 +202,7 @@ public class NexusIndexManager implements IndexManager, IMavenProjectChangedList
fullCreators.add(mavenArchetype);
} catch(ComponentLookupException ce) {
String msg = "Error looking up component ";
- console.logError(msg + "; " + ce.getMessage()); //$NON-NLS-1$
MavenLogger.log(msg, ce);
-
}
}
return fullCreators;
@@ -534,9 +528,9 @@ public class NexusIndexManager implements IndexManager, IMavenProjectChangedList
IndexingContext context = getIndexingContext(repository);
purgeCurrentIndex(context);
if(context.getRepository().isDirectory()) {
- getIndexer().scan(context, new ArtifactScanningMonitor(context.getRepository(), monitor, console), false);
+ getIndexer().scan(context, new ArtifactScanningMonitor(context.getRepository(), monitor), false);
}
- console.logMessage("Updated local repository index");
+ MavenPlugin.getDefault().getConsole().logMessage("Updated local repository index");
} catch(Exception ex) {
MavenLogger.log("Unable to re-index " + repository.toString(), ex);
throw new CoreException(new Status(IStatus.ERROR, IMavenConstants.PLUGIN_ID, -1,
@@ -584,7 +578,6 @@ public class NexusIndexManager implements IndexManager, IMavenProjectChangedList
getIndexer().addArtifactToIndex(artifactContext, context);
} catch(Exception ex) {
String msg = "Unable to add " + getDocumentKey(key);
- console.logError(msg + "; " + ex.getMessage()); //$NON-NLS-1$
MavenLogger.log(msg, ex);
}
}
@@ -624,7 +617,6 @@ public class NexusIndexManager implements IndexManager, IMavenProjectChangedList
getIndexer().deleteArtifactFromIndex(artifactContext, context);
} catch(Exception ex) {
String msg = "Unable to remove " + getDocumentKey(key);
- console.logError(msg + "; " + ex.getMessage()); //$NON-NLS-1$
MavenLogger.log(msg, ex);
}
}
@@ -931,7 +923,6 @@ public class NexusIndexManager implements IndexManager, IMavenProjectChangedList
}
} catch(IOException ex) {
String msg = "Error changing index details " + repository.toString();
- console.logError(msg + "; " + ex.getMessage()); //$NON-NLS-1$
MavenLogger.log(msg, ex);
throw new CoreException(new Status(IStatus.ERROR, IMavenConstants.PLUGIN_ID, -1,
Messages.NexusIndexManager_error_add_repo, ex));
@@ -1101,7 +1092,7 @@ public class NexusIndexManager implements IndexManager, IMavenProjectChangedList
if(monitor != null) {
monitor.setTaskName(NLS.bind(Messages.NexusIndexManager_task_updating, repository.toString()));
}
- console.logMessage("Updating index " + repository.toString());
+ MavenPlugin.getDefault().getConsole().logMessage("Updating index " + repository.toString());
try {
fireIndexUpdating(repository);
@@ -1148,9 +1139,9 @@ public class NexusIndexManager implements IndexManager, IMavenProjectChangedList
}
if(updated) {
- console.logMessage("Updated index for " + repository.toString());
+ MavenPlugin.getDefault().getConsole().logMessage("Updated index for " + repository.toString());
} else {
- console.logMessage("No index update available for " + repository.toString());
+ MavenPlugin.getDefault().getConsole().logMessage("No index update available for " + repository.toString());
}
} finally {
@@ -1159,11 +1150,11 @@ public class NexusIndexManager implements IndexManager, IMavenProjectChangedList
}
} catch(FileNotFoundException e) {
String msg = "Unable to update index for " + repository.toString() + ": " + e.getMessage(); //$NON-NLS-2$
- console.logError(msg);
+ MavenPlugin.getDefault().getConsole().logError(msg);
} catch(Exception ie) {
String msg = "Unable to update index for " + repository.toString();
MavenLogger.log(msg, ie);
- console.logError(msg);
+ MavenPlugin.getDefault().getConsole().logError(msg);
} finally {
fireIndexChanged(repository);
}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/markers/MavenMarkerManager.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/markers/MavenMarkerManager.java
index 8834b71a..86191f60 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/markers/MavenMarkerManager.java
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/markers/MavenMarkerManager.java
@@ -14,12 +14,14 @@ package org.eclipse.m2e.core.internal.markers;
import java.util.List;
import java.util.Set;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.osgi.util.NLS;
-import org.eclipse.ui.views.markers.MarkerViewUtil;
import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.resolver.AbstractArtifactResolutionException;
@@ -32,17 +34,18 @@ import org.apache.maven.project.DependencyResolutionResult;
import org.apache.maven.project.MavenProject;
import org.apache.maven.project.ProjectBuildingException;
-import org.eclipse.m2e.core.core.MavenConsole;
+import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.core.Messages;
import org.eclipse.m2e.core.embedder.IMavenConfiguration;
public class MavenMarkerManager implements IMavenMarkerManager {
- private final MavenConsole console;
+
+ private static Logger log = LoggerFactory.getLogger(MavenMarkerManager.class);
+
private final IMavenConfiguration mavenConfiguration;
- public MavenMarkerManager(MavenConsole console, IMavenConfiguration mavenConfiguration) {
- this.console = console;
+ public MavenMarkerManager(IMavenConfiguration mavenConfiguration) {
this.mavenConfiguration = mavenConfiguration;
}
@@ -105,10 +108,9 @@ public class MavenMarkerManager implements IMavenMarkerManager {
lineNumber = 1;
}
marker.setAttribute(IMarker.LINE_NUMBER, lineNumber);
- marker.setAttribute(MarkerViewUtil.NAME_ATTRIBUTE, resource.getFullPath().toPortableString());
}
} catch(CoreException ex) {
- console.logError("Unable to add marker; " + ex.toString()); //$NON-NLS-1$
+ log.error("Unable to add marker; " + ex.toString(), ex); //$NON-NLS-1$
}
return marker;
}
@@ -263,7 +265,7 @@ public class MavenMarkerManager implements IMavenMarkerManager {
}
addMarker(pomFile, type, errorMessage, 1, IMarker.SEVERITY_ERROR);
- console.logError(errorMessage);
+ MavenPlugin.getDefault().getConsole().logError(errorMessage);
}
}
}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/preferences/MavenConfigurationImpl.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/preferences/MavenConfigurationImpl.java
new file mode 100644
index 00000000..3a6dfdea
--- /dev/null
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/preferences/MavenConfigurationImpl.java
@@ -0,0 +1,119 @@
+/*******************************************************************************
+ * Copyright (c) 2008-2010 Sonatype, Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Sonatype, Inc. - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.m2e.core.internal.preferences;
+
+import org.eclipse.core.runtime.ListenerList;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.preferences.DefaultScope;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences.IPreferenceChangeListener;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences.PreferenceChangeEvent;
+import org.eclipse.core.runtime.preferences.IPreferencesService;
+import org.eclipse.core.runtime.preferences.InstanceScope;
+
+import org.eclipse.m2e.core.core.IMavenConstants;
+import org.eclipse.m2e.core.core.MavenLogger;
+import org.eclipse.m2e.core.embedder.IMavenConfiguration;
+import org.eclipse.m2e.core.embedder.IMavenConfigurationChangeListener;
+import org.eclipse.m2e.core.embedder.MavenConfigurationChangeEvent;
+
+
+public class MavenConfigurationImpl implements IMavenConfiguration, IPreferenceChangeListener {
+
+ private final IEclipsePreferences[] preferencesLookup = new IEclipsePreferences[2];
+
+ private final IPreferencesService preferenceStore;
+
+ private final ListenerList listeners = new ListenerList(ListenerList.IDENTITY);
+
+ public MavenConfigurationImpl() {
+ this.preferenceStore = Platform.getPreferencesService();
+
+ this.preferencesLookup[0] = new InstanceScope().getNode(IMavenConstants.PLUGIN_ID);
+ this.preferencesLookup[1] = new DefaultScope().getNode(IMavenConstants.PLUGIN_ID);
+
+ preferencesLookup[0].addPreferenceChangeListener(this);
+ }
+
+ public String getGlobalSettingsFile() {
+ return preferenceStore.get(MavenPreferenceConstants.P_GLOBAL_SETTINGS_FILE, null, preferencesLookup);
+ }
+
+ public String getUserSettingsFile() {
+ return preferenceStore.get(MavenPreferenceConstants.P_USER_SETTINGS_FILE, null, preferencesLookup);
+ }
+
+ public boolean isDebugOutput() {
+ return Boolean.parseBoolean(preferenceStore.get(MavenPreferenceConstants.P_DEBUG_OUTPUT, null, preferencesLookup));
+ }
+
+ public boolean isDownloadJavaDoc() {
+ return Boolean.parseBoolean(preferenceStore.get(MavenPreferenceConstants.P_DOWNLOAD_JAVADOC, null,
+ preferencesLookup));
+ }
+
+ public boolean isDownloadSources() {
+ return Boolean.parseBoolean(preferenceStore.get(MavenPreferenceConstants.P_DOWNLOAD_SOURCES, null,
+ preferencesLookup));
+ }
+
+ public void setDownloadSources(boolean downloadSources) {
+ preferencesLookup[0].putBoolean(MavenPreferenceConstants.P_DOWNLOAD_SOURCES, downloadSources);
+ }
+
+ public boolean isHideFoldersOfNestedProjects() {
+ return Boolean.parseBoolean(preferenceStore.get(MavenPreferenceConstants.P_HIDE_FOLDERS_OF_NESTED_PROJECTS, null,
+ preferencesLookup));
+ }
+
+ public boolean isOffline() {
+ return Boolean.parseBoolean(preferenceStore.get(MavenPreferenceConstants.P_OFFLINE, null, preferencesLookup));
+ }
+
+ public void setUserSettingsFile(String settingsFile) {
+ preferencesLookup[0].put(MavenPreferenceConstants.P_USER_SETTINGS_FILE, nvl(settingsFile));
+ }
+
+ public void setGlobalSettingsFile(String globalSettingsFile) {
+ preferencesLookup[0].put(MavenPreferenceConstants.P_GLOBAL_SETTINGS_FILE, nvl(globalSettingsFile));
+ }
+
+ private static String nvl(String s) {
+ return s == null ? "" : s; //$NON-NLS-1$
+ }
+
+ public boolean isUpdateProjectsOnStartup() {
+ return Boolean.parseBoolean(preferenceStore
+ .get(MavenPreferenceConstants.P_UPDATE_PROJECTS, null, preferencesLookup));
+ }
+
+ public boolean isUpdateIndexesOnStartup() {
+ return Boolean
+ .parseBoolean(preferenceStore.get(MavenPreferenceConstants.P_UPDATE_INDEXES, null, preferencesLookup));
+ }
+
+ public synchronized void addConfigurationChangeListener(IMavenConfigurationChangeListener listener) {
+ this.listeners.add(listener);
+ }
+
+ public void preferenceChange(PreferenceChangeEvent event) {
+ MavenConfigurationChangeEvent mavenEvent = new MavenConfigurationChangeEvent(event.getKey(), event.getNewValue(),
+ event.getOldValue());
+ for(Object listener : listeners.getListeners()) {
+ try {
+ ((IMavenConfigurationChangeListener) listener).mavenConfigutationChange(mavenEvent);
+ } catch(Exception e) {
+ MavenLogger.log("Could not deliver maven configuration change event", e);
+ }
+ }
+ }
+}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/preferences/MavenPreferenceInitializer.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/preferences/MavenPreferenceInitializer.java
index b9ade3d4..2e1bde89 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/preferences/MavenPreferenceInitializer.java
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/preferences/MavenPreferenceInitializer.java
@@ -12,11 +12,13 @@
package org.eclipse.m2e.core.internal.preferences;
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.core.runtime.preferences.DefaultScope;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.core.runtime.preferences.IScopeContext;
import org.apache.maven.cli.MavenCli;
-import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.core.IMavenConstants;
/**
@@ -32,36 +34,36 @@ public class MavenPreferenceInitializer extends AbstractPreferenceInitializer {
* @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
*/
public void initializeDefaultPreferences() {
- IPreferenceStore store = MavenPlugin.getDefault().getPreferenceStore();
+ IEclipsePreferences store = ((IScopeContext) new DefaultScope()).getNode(IMavenConstants.PLUGIN_ID);
- store.setDefault(MavenPreferenceConstants.P_USER_SETTINGS_FILE, //
+ store.put(MavenPreferenceConstants.P_USER_SETTINGS_FILE, //
MavenCli.DEFAULT_USER_SETTINGS_FILE.getAbsolutePath());
- store.setDefault(MavenPreferenceConstants.P_GLOBAL_SETTINGS_FILE, ""); //$NON-NLS-1$
+ store.put(MavenPreferenceConstants.P_GLOBAL_SETTINGS_FILE, ""); //$NON-NLS-1$
- store.setDefault(MavenPreferenceConstants.P_DEBUG_OUTPUT, false);
+ store.putBoolean(MavenPreferenceConstants.P_DEBUG_OUTPUT, false);
- store.setDefault(MavenPreferenceConstants.P_OFFLINE, false);
+ store.putBoolean(MavenPreferenceConstants.P_OFFLINE, false);
- store.setDefault(MavenPreferenceConstants.P_DOWNLOAD_SOURCES, false);
- store.setDefault(MavenPreferenceConstants.P_DOWNLOAD_JAVADOC, false);
+ store.putBoolean(MavenPreferenceConstants.P_DOWNLOAD_SOURCES, false);
+ store.putBoolean(MavenPreferenceConstants.P_DOWNLOAD_JAVADOC, false);
// store.setDefault( MavenPreferenceConstants.P_GLOBAL_CHECKSUM_POLICY, ArtifactRepositoryPolicy.CHECKSUM_POLICY_WARN);
// store.setDefault( MavenPreferenceConstants.P_UPDATE_SNAPSHOTS, false);
// store.setDefault( MavenPreferenceConstants.P_CHECK_LATEST_PLUGIN_VERSION, false);
- store.setDefault(MavenPreferenceConstants.P_OUTPUT_FOLDER, "target-eclipse"); //$NON-NLS-1$
+ store.put(MavenPreferenceConstants.P_OUTPUT_FOLDER, "target-eclipse"); //$NON-NLS-1$
- store.setDefault(MavenPreferenceConstants.P_RUNTIMES, ""); //$NON-NLS-1$
- store.setDefault(MavenPreferenceConstants.P_DEFAULT_RUNTIME, ""); //$NON-NLS-1$
+ store.put(MavenPreferenceConstants.P_RUNTIMES, ""); //$NON-NLS-1$
+ store.put(MavenPreferenceConstants.P_DEFAULT_RUNTIME, ""); //$NON-NLS-1$
- store.setDefault(MavenPreferenceConstants.P_UPDATE_INDEXES, true);
- store.setDefault(MavenPreferenceConstants.P_UPDATE_PROJECTS, false);
+ store.putBoolean(MavenPreferenceConstants.P_UPDATE_INDEXES, true);
+ store.putBoolean(MavenPreferenceConstants.P_UPDATE_PROJECTS, false);
- store.setDefault(MavenPreferenceConstants.P_HIDE_FOLDERS_OF_NESTED_PROJECTS, false);
+ store.putBoolean(MavenPreferenceConstants.P_HIDE_FOLDERS_OF_NESTED_PROJECTS, false);
- store.setDefault(MavenPreferenceConstants.P_SHOW_CONSOLE_ON_ERR, true);
- store.setDefault(MavenPreferenceConstants.P_SHOW_CONSOLE_ON_OUTPUT, false);
+ store.putBoolean(MavenPreferenceConstants.P_SHOW_CONSOLE_ON_ERR, true);
+ store.putBoolean(MavenPreferenceConstants.P_SHOW_CONSOLE_ON_OUTPUT, false);
}
}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/ProjectConfigurationManager.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/ProjectConfigurationManager.java
index 2e265259..8abf15d6 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/ProjectConfigurationManager.java
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/ProjectConfigurationManager.java
@@ -28,6 +28,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.eclipse.core.resources.ICommand;
+import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IMarker;
@@ -50,7 +51,6 @@ import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.SubMonitor;
import org.eclipse.core.runtime.jobs.ISchedulingRule;
import org.eclipse.osgi.util.NLS;
-import org.eclipse.ui.IWorkingSet;
import org.codehaus.plexus.util.StringUtils;
@@ -68,7 +68,6 @@ import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.archetype.ArchetypeCatalogFactory.RemoteCatalogFactory;
import org.eclipse.m2e.core.archetype.ArchetypeManager;
import org.eclipse.m2e.core.core.IMavenConstants;
-import org.eclipse.m2e.core.core.MavenConsole;
import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.embedder.IMaven;
import org.eclipse.m2e.core.embedder.IMavenConfiguration;
@@ -90,7 +89,6 @@ import org.eclipse.m2e.core.project.ResolverConfiguration;
import org.eclipse.m2e.core.project.configurator.AbstractProjectConfigurator;
import org.eclipse.m2e.core.project.configurator.ILifecycleMapping;
import org.eclipse.m2e.core.project.configurator.ProjectConfigurationRequest;
-import org.eclipse.m2e.core.util.Util;
/**
* import Maven projects
@@ -104,8 +102,6 @@ public class ProjectConfigurationManager implements IProjectConfigurationManager
IResourceChangeListener {
private static Logger log = LoggerFactory.getLogger(ProjectConfigurationManager.class);
- final MavenConsole console;
-
final MavenProjectManager projectManager;
final MavenModelManager mavenModelManager;
@@ -116,9 +112,8 @@ public class ProjectConfigurationManager implements IProjectConfigurationManager
final IMavenConfiguration mavenConfiguration;
- public ProjectConfigurationManager(IMaven maven, MavenConsole console, MavenProjectManager projectManager,
+ public ProjectConfigurationManager(IMaven maven, MavenProjectManager projectManager,
MavenModelManager mavenModelManager, IMavenMarkerManager mavenMarkerManager, IMavenConfiguration mavenConfiguration) {
- this.console = console;
this.projectManager = projectManager;
this.mavenModelManager = mavenModelManager;
this.mavenMarkerManager = mavenMarkerManager;
@@ -149,8 +144,6 @@ public class ProjectConfigurationManager implements IProjectConfigurationManager
if (project != null) {
projects.add(project);
-
- addToWorkingSets(project, configuration.getWorkingSets());
}
}
@@ -159,7 +152,7 @@ public class ProjectConfigurationManager implements IProjectConfigurationManager
configureNewMavenProject(projects, progress.newChild(90));
long t2 = System.currentTimeMillis();
- console.logMessage("Project import completed " + ((t2 - t1) / 1000) + " sec");
+ MavenPlugin.getDefault().getConsole().logMessage("Project import completed " + ((t2 - t1) / 1000) + " sec");
return result;
}
@@ -269,24 +262,6 @@ public class ProjectConfigurationManager implements IProjectConfigurationManager
}
}
- // PlatformUI.getWorkbench().getWorkingSetManager().addToWorkingSets(project, new IWorkingSet[] {workingSet});
- private void addToWorkingSets(IProject project, IWorkingSet[] workingSets) {
- if (workingSets != null && workingSets.length > 0) {
- // IAdaptable[] elements = workingSet.adaptElements(new IAdaptable[] {project});
- // if(elements.length == 1) {
- for (IWorkingSet workingSet : workingSets) {
- IAdaptable[] oldElements = workingSet.getElements();
- IAdaptable[] newElements = new IAdaptable[oldElements.length + 1];
- System.arraycopy(oldElements, 0, newElements, 0, oldElements.length);
- newElements[oldElements.length] = project;
-
- // Eclipse 3.2 compatibility
- workingSet.setElements(Util.proxy(workingSet, A.class).adaptElements(newElements));
- // }
- }
- }
- }
-
/**
* A compatibility proxy stub
*/
@@ -423,7 +398,6 @@ public class ProjectConfigurationManager implements IProjectConfigurationManager
project.open(monitor);
monitor.worked(1);
- addToWorkingSets(project, configuration.getWorkingSets());
monitor.worked(1);
monitor.subTask(Messages.ProjectConfigurationManager_task_creating_pom);
@@ -433,7 +407,7 @@ public class ProjectConfigurationManager implements IProjectConfigurationManager
monitor.subTask(Messages.ProjectConfigurationManager_task_creating_folders);
for(int i = 0; i < directories.length; i++ ) {
- Util.createFolder(project.getFolder(directories[i]), false);
+ createFolder(project.getFolder(directories[i]), false);
}
monitor.worked(1);
@@ -441,6 +415,29 @@ public class ProjectConfigurationManager implements IProjectConfigurationManager
enableMavenNature(project, configuration.getResolverConfiguration(), monitor);
monitor.worked(1);
}
+
+ /**
+ * Helper method which creates a folder and, recursively, all its parent folders.
+ *
+ * @param folder The folder to create.
+ * @param derived true if folder should be marked as derived
+ * @throws CoreException if creating the given <code>folder</code> or any of its parents fails.
+ */
+ public static void createFolder(IFolder folder, boolean derived) throws CoreException {
+ // Recurse until we find a parent folder which already exists.
+ if(!folder.exists()) {
+ IContainer parent = folder.getParent();
+ // First, make sure that all parent folders exist.
+ if(parent != null && !parent.exists()) {
+ createFolder((IFolder) parent, false);
+ }
+ folder.create(true, true, null);
+ }
+
+ if(folder.isAccessible() && derived) {
+ folder.setDerived(true);
+ }
+ }
/**
* Creates project structure using Archetype and then imports created project
@@ -501,7 +498,7 @@ public class ProjectConfigurationManager implements IProjectConfigurationManager
String projectFolder = location.append(artifactId).toFile().getAbsolutePath();
LocalProjectScanner scanner = new LocalProjectScanner(workspaceRoot.getLocation().toFile(), //
- projectFolder, true, mavenModelManager, console);
+ projectFolder, true, mavenModelManager);
scanner.run(monitor);
Set<MavenProjectInfo> projectSet = collectProjects(scanner.getProjects());
@@ -573,7 +570,7 @@ public class ProjectConfigurationManager implements IProjectConfigurationManager
public Set<MavenProjectInfo> collectProjects(Collection<MavenProjectInfo> projects) {
for(MavenProjectInfo projectInfo : projects) {
- console.logMessage("Collecting project info " + projectInfo);
+ MavenPlugin.getDefault().getConsole().logMessage("Collecting project info " + projectInfo);
add(projectInfo);
collectProjects(projectInfo.getProjects());
}
@@ -628,12 +625,12 @@ public class ProjectConfigurationManager implements IProjectConfigurationManager
IProject project = root.getProject(projectName);
if(project.exists()) {
- console.logError("Project " + projectName + " already exists");
+ MavenPlugin.getDefault().getConsole().logError("Project " + projectName + " already exists");
return null;
}
if(projectDir.equals(root.getLocation().toFile())) {
- console.logError("Can't create project " + projectName + " at Workspace folder");
+ MavenPlugin.getDefault().getConsole().logError("Can't create project " + projectName + " at Workspace folder");
return null;
}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/ProjectRegistryManager.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/ProjectRegistryManager.java
index 35958e38..a961280d 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/ProjectRegistryManager.java
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/ProjectRegistryManager.java
@@ -123,7 +123,6 @@ public class ProjectRegistryManager {
private final ProjectRegistry projectRegistry;
- private final MavenConsole console;
private final MavenImpl maven;
private final IMavenMarkerManager markerManager;
@@ -134,9 +133,8 @@ public class ProjectRegistryManager {
private volatile Thread syncRefreshThread;
- public ProjectRegistryManager(MavenImpl maven, MavenConsole console, File stateLocationDir, boolean readState,
+ public ProjectRegistryManager(MavenImpl maven, File stateLocationDir, boolean readState,
IMavenMarkerManager mavenMarkerManager) {
- this.console = console;
this.markerManager = mavenMarkerManager;
this.maven = maven;
@@ -185,6 +183,7 @@ public class ProjectRegistryManager {
} else {
List<Throwable> exceptions = executionResult.getExceptions();
if (exceptions != null) {
+ MavenConsole console = MavenPlugin.getDefault().getConsole();
for(Throwable ex : exceptions) {
String msg = "Failed to read Maven project";
console.logError(msg);
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/ProjectRegistryRefreshJob.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/ProjectRegistryRefreshJob.java
index ff0eeb51..2f527fff 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/ProjectRegistryRefreshJob.java
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/ProjectRegistryRefreshJob.java
@@ -34,11 +34,9 @@ import org.eclipse.core.runtime.jobs.ISchedulingRule;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.core.runtime.preferences.IEclipsePreferences.IPreferenceChangeListener;
import org.eclipse.core.runtime.preferences.IEclipsePreferences.PreferenceChangeEvent;
-import org.eclipse.ui.progress.IProgressConstants;
-import org.eclipse.m2e.core.actions.OpenMavenConsoleAction;
+import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.core.IMavenConstants;
-import org.eclipse.m2e.core.core.MavenConsole;
import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.embedder.IMavenConfiguration;
import org.eclipse.m2e.core.internal.Messages;
@@ -56,15 +54,11 @@ public class ProjectRegistryRefreshJob extends Job implements IResourceChangeLis
private final IMavenConfiguration mavenConfiguration;
- private final MavenConsole console;
-
- public ProjectRegistryRefreshJob(ProjectRegistryManager manager, MavenConsole console, IMavenConfiguration mavenConfiguration) {
+ public ProjectRegistryRefreshJob(ProjectRegistryManager manager, IMavenConfiguration mavenConfiguration) {
super(Messages.ProjectRegistryRefreshJob_title);
this.manager = manager;
this.mavenConfiguration = mavenConfiguration;
- this.console = console;
setRule(ResourcesPlugin.getWorkspace().getRuleFactory().buildRule());
- setProperty(IProgressConstants.ACTION_PROPERTY, new OpenMavenConsoleAction());
}
public void refresh(MavenUpdateRequest updateRequest) {
@@ -109,7 +103,7 @@ public class ProjectRegistryRefreshJob extends Job implements IResourceChangeLis
MavenLogger.log(ex);
} catch(OperationCanceledException ex) {
- console.logMessage("Refreshing Maven model is canceled");
+ MavenPlugin.getDefault().getConsole().logMessage("Refreshing Maven model is canceled");
} catch (StaleMutableProjectRegistryException e) {
synchronized(this.queue) {
@@ -162,14 +156,14 @@ public class ProjectRegistryRefreshJob extends Job implements IResourceChangeLis
MavenUpdateRequest updateRequest = new MavenUpdateRequest(projects, offline, updateSnapshots);
updateRequest.setForce(false);
queue(updateRequest);
- console.logMessage("Refreshing " + updateRequest.toString());
+ MavenPlugin.getDefault().getConsole().logMessage("Refreshing " + updateRequest.toString());
}
if(!refreshProjects.isEmpty()) {
IProject[] projects = refreshProjects.toArray(new IProject[refreshProjects.size()]);
MavenUpdateRequest updateRequest = new MavenUpdateRequest(projects, offline, updateSnapshots);
updateRequest.setForce(false);
queue(updateRequest);
- console.logMessage("Refreshing " + updateRequest.toString());
+ MavenPlugin.getDefault().getConsole().logMessage("Refreshing " + updateRequest.toString());
}
}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/LocalProjectScanner.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/LocalProjectScanner.java
index b397910e..f284ff08 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/LocalProjectScanner.java
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/LocalProjectScanner.java
@@ -28,7 +28,6 @@ import org.apache.maven.model.Model;
import org.apache.maven.model.Profile;
import org.eclipse.m2e.core.core.IMavenConstants;
-import org.eclipse.m2e.core.core.MavenConsole;
import org.eclipse.m2e.core.embedder.MavenModelManager;
import org.eclipse.m2e.core.internal.Messages;
@@ -42,21 +41,18 @@ public class LocalProjectScanner extends AbstractProjectScanner<MavenProjectInfo
private final boolean basedirRemameRequired;
private Set<File> scannedFolders = new HashSet<File>();
- private final MavenConsole console;
private final MavenModelManager modelManager;
- public LocalProjectScanner(File workspaceRoot, String folder, boolean needsRename, MavenModelManager modelManager,
- MavenConsole console) {
- this(workspaceRoot, Collections.singletonList(folder), needsRename, modelManager, console);
+ public LocalProjectScanner(File workspaceRoot, String folder, boolean needsRename, MavenModelManager modelManager) {
+ this(workspaceRoot, Collections.singletonList(folder), needsRename, modelManager);
}
public LocalProjectScanner(File workspaceRoot, List<String> folders, boolean basedirRemameRequired,
- MavenModelManager modelManager, MavenConsole console) {
+ MavenModelManager modelManager) {
this.workspaceRoot = workspaceRoot;
this.folders = folders;
this.basedirRemameRequired = basedirRemameRequired;
this.modelManager = modelManager;
- this.console = console;
}
public void run(IProgressMonitor monitor) throws InterruptedException {
@@ -160,10 +156,8 @@ public class LocalProjectScanner extends AbstractProjectScanner<MavenProjectInfo
} catch(CoreException ex) {
addError(ex);
- console.logError("Unable to read model " + baseDir.getAbsolutePath());
} catch(IOException ex) {
addError(ex);
- console.logError("Unable to read model " + baseDir.getAbsolutePath());
}
return null;
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/ProjectImportConfiguration.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/ProjectImportConfiguration.java
index e8f8b8bf..83398b25 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/ProjectImportConfiguration.java
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/ProjectImportConfiguration.java
@@ -18,7 +18,6 @@ import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
-import org.eclipse.ui.IWorkingSet;
import org.apache.maven.model.Model;
@@ -42,8 +41,6 @@ public class ProjectImportConfiguration {
/** the project name template */
private String projectNameTemplate = ""; //$NON-NLS-1$
-
- private IWorkingSet[] workingSets;
/** Creates a new configuration. */
public ProjectImportConfiguration(ResolverConfiguration resolverConfiguration) {
@@ -70,21 +67,6 @@ public class ProjectImportConfiguration {
return projectNameTemplate;
}
- /** @deprecated UI aspects will be refactored out of core import logic */
- public void setWorkingSet(IWorkingSet workingSet) {
- this.workingSets = workingSet == null ? null : new IWorkingSet[]{workingSet};
- }
-
- /** @deprecated UI aspects will be refactored out of core import logic */
- public void setWorkingSets(IWorkingSet[] workingSets) {
- this.workingSets = workingSets;
- }
-
- /** @deprecated UI aspects will be refactored out of core import logic */
- public IWorkingSet[] getWorkingSets() {
- return this.workingSets;
- }
-
/**
* Calculates the project name for the given model.
*
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/util/Util.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/util/Util.java
deleted file mode 100644
index fa01cbae..00000000
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/util/Util.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008-2010 Sonatype, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Sonatype, Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.m2e.core.util;
-
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.Method;
-import java.lang.reflect.Proxy;
-
-import org.osgi.framework.Bundle;
-import org.osgi.framework.Version;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.variables.VariablesPlugin;
-
-import org.eclipse.m2e.core.core.MavenLogger;
-
-
-/**
- * Utility methods
- *
- * @author Eugene Kuleshov
- */
-public class Util {
-
- public static boolean isEclipseVersion(int major, int minor) {
- Bundle bundle = ResourcesPlugin.getPlugin().getBundle();
- String version = (String) bundle.getHeaders().get(org.osgi.framework.Constants.BUNDLE_VERSION);
- Version v = Version.parseVersion(version);
- return v.getMajor() == major && v.getMinor() == minor;
- }
-
- /**
- * Proxy factory for compatibility stubs
- */
- @SuppressWarnings("unchecked")
- public static <T> T proxy(final Object o, Class<T> type) {
- return (T) Proxy.newProxyInstance(type.getClassLoader(), //
- new Class[] {type}, //
- new InvocationHandler() {
- public Object invoke(Object proxy, Method m, Object[] args) throws Throwable {
- try {
- Method mm = o.getClass().getMethod(m.getName(), m.getParameterTypes());
- return mm.invoke(o, args);
- } catch(final NoSuchMethodException e) {
- return null;
- }
- }
- });
- }
-
- /**
- * Stub interface for FileStoreEditorInput
- *
- * @see Util#proxy(Object, Class)
- */
- public static interface FileStoreEditorInputStub {
- public java.net.URI getURI();
- }
-
- /**
- * Helper method which creates a folder and, recursively, all its parent folders.
- *
- * @param folder The folder to create.
- * @param derived true if folder should be marked as derived
- * @throws CoreException if creating the given <code>folder</code> or any of its parents fails.
- */
- public static void createFolder(IFolder folder, boolean derived) throws CoreException {
- // Recurse until we find a parent folder which already exists.
- if(!folder.exists()) {
- IContainer parent = folder.getParent();
- // First, make sure that all parent folders exist.
- if(parent != null && !parent.exists()) {
- createFolder((IFolder) parent, false);
- }
- folder.create(true, true, null);
- }
-
- if(folder.isAccessible() && derived) {
- folder.setDerived(true);
- }
- }
-
- public static void setDerived(IFolder folder, boolean derived) throws CoreException {
- if(folder.isAccessible()) {
- folder.setDerived(derived);
- }
- }
-
- /**
- * Substitute any variable
- */
- public static String substituteVar(String s) {
- if(s == null) {
- return s;
- }
- try {
- return VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(s);
- } catch(CoreException e) {
- MavenLogger.log(e);
- return null;
- }
- }
-
- public static String nvl(String s) {
- return s == null ? "" : s; //$NON-NLS-1$
- }
-}
diff --git a/org.eclipse.m2e.discovery/META-INF/MANIFEST.MF b/org.eclipse.m2e.discovery/META-INF/MANIFEST.MF
index e693ee2e..80f8311c 100644
--- a/org.eclipse.m2e.discovery/META-INF/MANIFEST.MF
+++ b/org.eclipse.m2e.discovery/META-INF/MANIFEST.MF
@@ -18,7 +18,8 @@ Require-Bundle: org.eclipse.equinox.p2.ui.discovery,
org.eclipse.ui.ide,
org.eclipse.equinox.p2.operations,
org.eclipse.equinox.p2.core,
- org.eclipse.equinox.p2.metadata
+ org.eclipse.equinox.p2.metadata,
+ org.eclipse.m2e.core.ui;bundle-version="0.13.0"
Export-Package: org.eclipse.m2e.internal.discovery,
org.eclipse.m2e.internal.discovery.markers,
org.eclipse.m2e.internal.discovery.startup;x-internal:=true,
diff --git a/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/startup/UpdateConfigurationStartup.java b/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/startup/UpdateConfigurationStartup.java
index 5c34420c..30812a8b 100644
--- a/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/startup/UpdateConfigurationStartup.java
+++ b/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/startup/UpdateConfigurationStartup.java
@@ -23,7 +23,7 @@ import org.eclipse.core.runtime.MultiStatus;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.core.IMavenConstants;
-import org.eclipse.m2e.core.jobs.UpdateConfigurationJob;
+import org.eclipse.m2e.core.ui.internal.UpdateConfigurationJob;
import org.eclipse.m2e.internal.discovery.DiscoveryActivator;
import org.eclipse.m2e.internal.discovery.Messages;
import org.eclipse.ui.IStartup;
diff --git a/org.eclipse.m2e.editor.xml/META-INF/MANIFEST.MF b/org.eclipse.m2e.editor.xml/META-INF/MANIFEST.MF
index 42b077db..6fab89d7 100644
--- a/org.eclipse.m2e.editor.xml/META-INF/MANIFEST.MF
+++ b/org.eclipse.m2e.editor.xml/META-INF/MANIFEST.MF
@@ -19,7 +19,8 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.core.resources,
org.eclipse.ui.ide,
org.eclipse.core.filesystem,
- org.eclipse.ui.forms
+ org.eclipse.ui.forms,
+ org.eclipse.m2e.core.ui;bundle-version="[0.13.0,0.14.0)"
Export-Package: org.eclipse.m2e.editor.xml, org.eclipse.m2e.editor.xml.internal
Bundle-ClassPath: .
Bundle-Vendor: %Bundle-Vendor
diff --git a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/InsertArtifactProposal.java b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/InsertArtifactProposal.java
index c7eef9b4..7543b3db 100644
--- a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/InsertArtifactProposal.java
+++ b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/InsertArtifactProposal.java
@@ -44,7 +44,7 @@ import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.index.IIndex;
import org.eclipse.m2e.core.index.IndexedArtifactFile;
-import org.eclipse.m2e.core.ui.dialogs.MavenRepositorySearchDialog;
+import org.eclipse.m2e.core.ui.internal.dialogs.MavenRepositorySearchDialog;
import org.eclipse.m2e.editor.xml.internal.Messages;
import org.eclipse.m2e.editor.xml.internal.PomEdits.Operation;
import org.eclipse.m2e.editor.xml.internal.PomEdits.OperationTuple;
diff --git a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomHyperlinkDetector.java b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomHyperlinkDetector.java
index d9059cac..59056914 100644
--- a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomHyperlinkDetector.java
+++ b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomHyperlinkDetector.java
@@ -62,9 +62,9 @@ import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
import org.eclipse.wst.sse.ui.StructuredTextEditor;
-import org.eclipse.m2e.core.actions.OpenPomAction;
-import org.eclipse.m2e.core.actions.OpenPomAction.MavenPathStorageEditorInput;
import org.eclipse.m2e.core.core.MavenLogger;
+import org.eclipse.m2e.core.ui.internal.actions.OpenPomAction;
+import org.eclipse.m2e.core.ui.internal.actions.OpenPomAction.MavenPathStorageEditorInput;
import org.eclipse.m2e.editor.xml.internal.Messages;
import org.eclipse.m2e.editor.xml.internal.NodeOperation;
import org.eclipse.m2e.editor.xml.internal.XmlUtils;
diff --git a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomTemplateContext.java b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomTemplateContext.java
index 98efd579..d728c12f 100644
--- a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomTemplateContext.java
+++ b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomTemplateContext.java
@@ -37,17 +37,17 @@ import org.codehaus.plexus.util.StringUtils;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
+
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.text.templates.Template;
import org.eclipse.osgi.util.NLS;
-import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.core.MavenLogger;
-import org.eclipse.m2e.core.project.IMavenProjectFacade;
-import org.eclipse.m2e.core.util.search.ArtifactInfo;
-import org.eclipse.m2e.core.util.search.Packaging;
-import org.eclipse.m2e.core.util.search.SearchEngine;
+import org.eclipse.m2e.core.ui.internal.M2EUIPluginActivator;
+import org.eclipse.m2e.core.ui.internal.search.util.ArtifactInfo;
+import org.eclipse.m2e.core.ui.internal.search.util.Packaging;
+import org.eclipse.m2e.core.ui.internal.search.util.SearchEngine;
import org.eclipse.m2e.editor.xml.internal.Messages;
import org.eclipse.m2e.editor.xml.internal.XmlUtils;
@@ -534,7 +534,7 @@ public enum PomTemplateContext {
if(searchEngineForTests != null) {
return searchEngineForTests;
}
- return MavenPlugin.getDefault().getSearchEngine(project);
+ return M2EUIPluginActivator.getDefault().getSearchEngine(project);
}
diff --git a/org.eclipse.m2e.editor/META-INF/MANIFEST.MF b/org.eclipse.m2e.editor/META-INF/MANIFEST.MF
index 3459cdbf..953c878f 100644
--- a/org.eclipse.m2e.editor/META-INF/MANIFEST.MF
+++ b/org.eclipse.m2e.editor/META-INF/MANIFEST.MF
@@ -15,7 +15,8 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.m2e.core;bundle-version="[0.13.0,0.14.0)",
org.eclipse.m2e.maven.runtime;bundle-version="[0.13.0,0.14.0)",
org.eclipse.m2e.model.edit;bundle-version="[0.13.0,0.14.0)",
- org.eclipse.m2e.editor.xml;bundle-version="[0.13.0,0.14.0)"
+ org.eclipse.m2e.editor.xml;bundle-version="[0.13.0,0.14.0)",
+ org.eclipse.m2e.core.ui;bundle-version="[0.13.0,0.14.0)"
Eclipse-LazyStart: true
Bundle-RequiredExecutionEnvironment: J2SE-1.5,
JavaSE-1.6
diff --git a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/DependenciesComposite.java b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/DependenciesComposite.java
index 534e1690..6283ab0c 100644
--- a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/DependenciesComposite.java
+++ b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/DependenciesComposite.java
@@ -17,6 +17,7 @@ import java.util.Collections;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
+
import org.apache.maven.artifact.Artifact;
import org.apache.maven.project.MavenProject;
import org.eclipse.core.runtime.CoreException;
@@ -43,15 +44,14 @@ import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerFilter;
-
import org.eclipse.jface.window.Window;
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.index.IndexedArtifactFile;
import org.eclipse.m2e.core.project.IMavenProjectFacade;
import org.eclipse.m2e.core.project.MavenProjectManager;
-import org.eclipse.m2e.core.ui.dialogs.EditDependencyDialog;
-import org.eclipse.m2e.core.ui.dialogs.MavenRepositorySearchDialog;
+import org.eclipse.m2e.core.ui.internal.dialogs.EditDependencyDialog;
+import org.eclipse.m2e.core.ui.internal.dialogs.MavenRepositorySearchDialog;
import org.eclipse.m2e.editor.MavenEditorImages;
import org.eclipse.m2e.editor.MavenEditorPlugin;
import org.eclipse.m2e.editor.dialogs.ManageDependenciesDialog;
diff --git a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/DependencyDetailComposite.java b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/DependencyDetailComposite.java
index 8fd27f55..4600db72 100644
--- a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/DependencyDetailComposite.java
+++ b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/DependencyDetailComposite.java
@@ -12,12 +12,12 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.m2e.core.actions.OpenPomAction;
import org.eclipse.m2e.core.core.MavenLogger;
-import org.eclipse.m2e.core.util.M2EUtils;
-import org.eclipse.m2e.core.util.ProposalUtil;
-import org.eclipse.m2e.core.util.search.Packaging;
-import org.eclipse.m2e.core.wizards.WidthGroup;
+import org.eclipse.m2e.core.ui.internal.actions.OpenPomAction;
+import org.eclipse.m2e.core.ui.internal.search.util.Packaging;
+import org.eclipse.m2e.core.ui.internal.util.M2EUIUtils;
+import org.eclipse.m2e.core.ui.internal.util.ProposalUtil;
+import org.eclipse.m2e.core.ui.internal.wizards.WidthGroup;
import org.eclipse.m2e.editor.internal.Messages;
import org.eclipse.m2e.editor.pom.FormUtils;
import org.eclipse.m2e.editor.pom.MavenPomEditorPage;
@@ -117,7 +117,7 @@ public class DependencyDetailComposite extends Composite {
gd_groupIdText.horizontalIndent = 4;
groupIdText.setLayoutData(gd_groupIdText);
ProposalUtil.addGroupIdProposal(editorPage.getProject(), groupIdText, Packaging.ALL);
- M2EUtils.addRequiredDecoration(groupIdText);
+ M2EUIUtils.addRequiredDecoration(groupIdText);
Hyperlink artifactIdHyperlink = toolkit.createHyperlink(this, Messages.DependenciesComposite_lblArtifactId,
SWT.NONE);
@@ -145,7 +145,7 @@ public class DependencyDetailComposite extends Composite {
gd_artifactIdText.horizontalIndent = 4;
artifactIdText.setLayoutData(gd_artifactIdText);
ProposalUtil.addArtifactIdProposal(editorPage.getProject(), groupIdText, artifactIdText, Packaging.ALL);
- M2EUtils.addRequiredDecoration(artifactIdText);
+ M2EUIUtils.addRequiredDecoration(artifactIdText);
Label versionLabel = toolkit.createLabel(this, Messages.DependenciesComposite_lblVersion, SWT.NONE);
versionLabel.setLayoutData(new GridData());
diff --git a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/DependencyLabelProvider.java b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/DependencyLabelProvider.java
index 2f109f57..7d72d2a7 100644
--- a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/DependencyLabelProvider.java
+++ b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/DependencyLabelProvider.java
@@ -21,10 +21,10 @@ import org.eclipse.jface.viewers.IColorProvider;
import org.eclipse.jface.viewers.IDecoration;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.viewers.StyledString;
-import org.eclipse.m2e.core.MavenImages;
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.project.IMavenProjectFacade;
import org.eclipse.m2e.core.project.MavenProjectManager;
+import org.eclipse.m2e.core.ui.internal.MavenImages;
import org.eclipse.m2e.editor.MavenEditorImages;
import org.eclipse.m2e.editor.internal.Messages;
import org.eclipse.m2e.editor.pom.MavenPomEditor;
diff --git a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/PluginsComposite.java b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/PluginsComposite.java
index 9a47ae0e..2ddc4ecf 100644
--- a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/PluginsComposite.java
+++ b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/PluginsComposite.java
@@ -59,17 +59,15 @@ import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.jface.window.Window;
-import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.actions.OpenPomAction;
-import org.eclipse.m2e.core.actions.OpenUrlAction;
import org.eclipse.m2e.core.core.MavenLogger;
-import org.eclipse.m2e.core.embedder.ArtifactKey;
-import org.eclipse.m2e.core.index.IIndex;
import org.eclipse.m2e.core.index.IndexedArtifactFile;
-import org.eclipse.m2e.core.ui.dialogs.MavenRepositorySearchDialog;
-import org.eclipse.m2e.core.util.M2EUtils;
-import org.eclipse.m2e.core.util.ProposalUtil;
-import org.eclipse.m2e.core.util.search.Packaging;
+import org.eclipse.m2e.core.ui.internal.M2EUIPluginActivator;
+import org.eclipse.m2e.core.ui.internal.actions.OpenPomAction;
+import org.eclipse.m2e.core.ui.internal.actions.OpenUrlAction;
+import org.eclipse.m2e.core.ui.internal.dialogs.MavenRepositorySearchDialog;
+import org.eclipse.m2e.core.ui.internal.search.util.Packaging;
+import org.eclipse.m2e.core.ui.internal.util.M2EUIUtils;
+import org.eclipse.m2e.core.ui.internal.util.ProposalUtil;
import org.eclipse.m2e.editor.MavenEditorImages;
import org.eclipse.m2e.editor.internal.Messages;
import org.eclipse.m2e.editor.plugins.DefaultPluginConfigurationEditor;
@@ -482,7 +480,7 @@ public class PluginsComposite extends Composite{
groupIdText.setData("name", "groupIdText"); //$NON-NLS-1$ //$NON-NLS-2$
parentEditorPage.createEvaluatorInfo(groupIdText);
ProposalUtil.addGroupIdProposal(parentEditorPage.getProject(), groupIdText, Packaging.PLUGIN);
- M2EUtils.addRequiredDecoration(groupIdText);
+ M2EUIUtils.addRequiredDecoration(groupIdText);
Hyperlink artifactIdHyperlink = toolkit.createHyperlink(pluginDetailsComposite, Messages.PluginsComposite_lblArtifactId, SWT.NONE);
artifactIdHyperlink.addHyperlinkListener(new HyperlinkAdapter() {
@@ -505,7 +503,7 @@ public class PluginsComposite extends Composite{
artifactIdText.setLayoutData(gd_artifactIdText);
artifactIdText.setData("name", "artifactIdText"); //$NON-NLS-1$ //$NON-NLS-2$
ProposalUtil.addArtifactIdProposal(parentEditorPage.getProject(), groupIdText, artifactIdText, Packaging.PLUGIN);
- M2EUtils.addRequiredDecoration(artifactIdText);
+ M2EUIUtils.addRequiredDecoration(artifactIdText);
parentEditorPage.createEvaluatorInfo(artifactIdText);
Label label = toolkit.createLabel(pluginDetailsComposite, Messages.PluginsComposite_lblVersion, SWT.NONE);
@@ -1332,7 +1330,7 @@ public class PluginsComposite extends Composite{
String artifactId = descriptor.getArtifactId();
String version = ""; //$NON-NLS-1$
try {
- Collection<String> versions = MavenPlugin.getDefault().getSearchEngine(parentEditorPage.getProject()).findVersions(groupId, artifactId, null, Packaging.PLUGIN);
+ Collection<String> versions = M2EUIPluginActivator.getDefault().getSearchEngine(parentEditorPage.getProject()).findVersions(groupId, artifactId, null, Packaging.PLUGIN);
if(!versions.isEmpty()) {
version = versions.iterator().next();
}
diff --git a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/ReportingComposite.java b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/ReportingComposite.java
index b2f27c03..cd141751 100644
--- a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/ReportingComposite.java
+++ b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/ReportingComposite.java
@@ -41,15 +41,15 @@ import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.jface.window.Window;
-import org.eclipse.m2e.core.actions.OpenPomAction;
-import org.eclipse.m2e.core.actions.OpenUrlAction;
import org.eclipse.m2e.core.embedder.ArtifactKey;
import org.eclipse.m2e.core.index.IIndex;
import org.eclipse.m2e.core.index.IndexedArtifactFile;
-import org.eclipse.m2e.core.ui.dialogs.MavenRepositorySearchDialog;
-import org.eclipse.m2e.core.util.M2EUtils;
-import org.eclipse.m2e.core.util.ProposalUtil;
-import org.eclipse.m2e.core.util.search.Packaging;
+import org.eclipse.m2e.core.ui.internal.actions.OpenPomAction;
+import org.eclipse.m2e.core.ui.internal.actions.OpenUrlAction;
+import org.eclipse.m2e.core.ui.internal.dialogs.MavenRepositorySearchDialog;
+import org.eclipse.m2e.core.ui.internal.search.util.Packaging;
+import org.eclipse.m2e.core.ui.internal.util.M2EUIUtils;
+import org.eclipse.m2e.core.ui.internal.util.ProposalUtil;
import org.eclipse.m2e.editor.MavenEditorImages;
import org.eclipse.m2e.editor.composites.PluginsComposite.PluginFilter;
import org.eclipse.m2e.editor.internal.Messages;
@@ -336,7 +336,7 @@ public class ReportingComposite extends Composite {
groupIdText.setLayoutData(gd_groupIdText);
groupIdText.setData("name", "groupIdText"); //$NON-NLS-1$ //$NON-NLS-2$
ProposalUtil.addGroupIdProposal(editorPage.getProject(), groupIdText, Packaging.ALL);
- M2EUtils.addRequiredDecoration(groupIdText);
+ M2EUIUtils.addRequiredDecoration(groupIdText);
Hyperlink artifactIdHyperlink = toolkit.createHyperlink(pluginDetailsComposite, Messages.ReportingComposite_lblArtifactId, SWT.NONE);
artifactIdHyperlink.addHyperlinkListener(new HyperlinkAdapter() {
@@ -359,7 +359,7 @@ public class ReportingComposite extends Composite {
artifactIdText.setLayoutData(gd_artifactIdText);
artifactIdText.setData("name", "artifactIdText"); //$NON-NLS-1$ //$NON-NLS-2$
ProposalUtil.addArtifactIdProposal(editorPage.getProject(), groupIdText, artifactIdText, Packaging.ALL);
- M2EUtils.addRequiredDecoration(artifactIdText);
+ M2EUIUtils.addRequiredDecoration(artifactIdText);
toolkit.createLabel(pluginDetailsComposite, Messages.ReportingComposite_lblVersion, SWT.NONE);
diff --git a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/RepositoriesComposite.java b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/RepositoriesComposite.java
index 1e3d12b4..ea310147 100644
--- a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/RepositoriesComposite.java
+++ b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/RepositoriesComposite.java
@@ -34,8 +34,8 @@ import org.eclipse.emf.edit.domain.EditingDomain;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.m2e.core.actions.OpenPomAction;
-import org.eclipse.m2e.core.wizards.WidthGroup;
+import org.eclipse.m2e.core.ui.internal.actions.OpenPomAction;
+import org.eclipse.m2e.core.ui.internal.wizards.WidthGroup;
import org.eclipse.m2e.editor.MavenEditorImages;
import org.eclipse.m2e.editor.internal.Messages;
import org.eclipse.m2e.editor.pom.FormUtils;
diff --git a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/TeamComposite.java b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/TeamComposite.java
index 0b634366..b18d2ee3 100644
--- a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/TeamComposite.java
+++ b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/TeamComposite.java
@@ -29,7 +29,7 @@ import org.eclipse.emf.edit.domain.EditingDomain;
import org.eclipse.jface.viewers.ICellModifier;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.m2e.core.wizards.WidthGroup;
+import org.eclipse.m2e.core.ui.internal.wizards.WidthGroup;
import org.eclipse.m2e.editor.MavenEditorImages;
import org.eclipse.m2e.editor.internal.Messages;
import org.eclipse.m2e.editor.pom.FormUtils;
diff --git a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/dialogs/ManageDependenciesDialog.java b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/dialogs/ManageDependenciesDialog.java
index 15a813ca..7b93be6f 100644
--- a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/dialogs/ManageDependenciesDialog.java
+++ b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/dialogs/ManageDependenciesDialog.java
@@ -45,7 +45,7 @@ import org.eclipse.jface.viewers.Viewer;
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.project.IMavenProjectFacade;
-import org.eclipse.m2e.core.ui.dialogs.AbstractMavenDialog;
+import org.eclipse.m2e.core.ui.internal.dialogs.AbstractMavenDialog;
import org.eclipse.m2e.editor.MavenEditorPlugin;
import org.eclipse.m2e.editor.composites.DependencyLabelProvider;
import org.eclipse.m2e.editor.composites.ListEditorContentProvider;
diff --git a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/dialogs/MavenModuleSelectionDialog.java b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/dialogs/MavenModuleSelectionDialog.java
index 3b78faa3..9c391597 100644
--- a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/dialogs/MavenModuleSelectionDialog.java
+++ b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/dialogs/MavenModuleSelectionDialog.java
@@ -8,7 +8,7 @@ import org.eclipse.jface.viewers.IColorProvider;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.m2e.core.wizards.MavenProjectSelectionDialog;
+import org.eclipse.m2e.core.ui.internal.wizards.MavenProjectSelectionDialog;
import org.eclipse.m2e.editor.internal.Messages;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
diff --git a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/internal/actions/ShowDependencyHierarchyAction.java b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/internal/actions/ShowDependencyHierarchyAction.java
index 61ed4961..5f679dae 100644
--- a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/internal/actions/ShowDependencyHierarchyAction.java
+++ b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/internal/actions/ShowDependencyHierarchyAction.java
@@ -18,10 +18,10 @@ import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.m2e.core.actions.OpenPomAction;
-import org.eclipse.m2e.core.actions.SelectionUtil;
import org.eclipse.m2e.core.embedder.ArtifactKey;
import org.eclipse.m2e.core.project.IMavenProjectFacade;
+import org.eclipse.m2e.core.ui.internal.actions.OpenPomAction;
+import org.eclipse.m2e.core.ui.internal.actions.SelectionUtil;
import org.eclipse.m2e.editor.internal.Messages;
import org.eclipse.m2e.editor.pom.MavenPomEditor;
import org.eclipse.swt.widgets.Display;
diff --git a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/BuildPage.java b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/BuildPage.java
index 8bb4790f..30165b41 100644
--- a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/BuildPage.java
+++ b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/BuildPage.java
@@ -36,15 +36,15 @@ import org.eclipse.jface.action.ToolBarManager;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.window.Window;
-import org.eclipse.m2e.core.actions.OpenPomAction;
-import org.eclipse.m2e.core.actions.OpenUrlAction;
import org.eclipse.m2e.core.core.IMavenConstants;
import org.eclipse.m2e.core.embedder.ArtifactKey;
import org.eclipse.m2e.core.index.IIndex;
import org.eclipse.m2e.core.index.IndexedArtifactFile;
-import org.eclipse.m2e.core.ui.dialogs.MavenRepositorySearchDialog;
-import org.eclipse.m2e.core.util.ProposalUtil;
-import org.eclipse.m2e.core.util.search.Packaging;
+import org.eclipse.m2e.core.ui.internal.actions.OpenPomAction;
+import org.eclipse.m2e.core.ui.internal.actions.OpenUrlAction;
+import org.eclipse.m2e.core.ui.internal.dialogs.MavenRepositorySearchDialog;
+import org.eclipse.m2e.core.ui.internal.search.util.Packaging;
+import org.eclipse.m2e.core.ui.internal.util.ProposalUtil;
import org.eclipse.m2e.editor.MavenEditorImages;
import org.eclipse.m2e.editor.composites.BuildComposite;
import org.eclipse.m2e.editor.composites.DependencyLabelProvider;
diff --git a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/DependencyTreePage.java b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/DependencyTreePage.java
index a3290031..b9a2461c 100644
--- a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/DependencyTreePage.java
+++ b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/DependencyTreePage.java
@@ -50,7 +50,6 @@ import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerComparator;
import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.actions.OpenPomAction;
import org.eclipse.m2e.core.core.IMavenConstants;
import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.embedder.ArtifactKey;
@@ -58,6 +57,7 @@ import org.eclipse.m2e.core.project.IMavenProjectChangedListener;
import org.eclipse.m2e.core.project.IMavenProjectFacade;
import org.eclipse.m2e.core.project.MavenProjectChangedEvent;
import org.eclipse.m2e.core.project.MavenProjectManager;
+import org.eclipse.m2e.core.ui.internal.actions.OpenPomAction;
import org.eclipse.m2e.editor.MavenEditorImages;
import org.eclipse.m2e.editor.internal.Messages;
import org.eclipse.osgi.util.NLS;
diff --git a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/FormUtils.java b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/FormUtils.java
index 34d44449..a4778044 100644
--- a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/FormUtils.java
+++ b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/FormUtils.java
@@ -24,8 +24,8 @@ import org.codehaus.plexus.interpolation.RegexBasedInterpolator;
import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.m2e.core.core.MavenLogger;
-import org.eclipse.m2e.core.ui.dialogs.MavenMessageDialog;
-import org.eclipse.m2e.core.util.Util;
+import org.eclipse.m2e.core.ui.internal.dialogs.MavenMessageDialog;
+import org.eclipse.m2e.core.ui.internal.util.Util;
import org.eclipse.m2e.editor.internal.Messages;
import org.eclipse.m2e.editor.xml.internal.FormHoverProvider;
import org.eclipse.m2e.editor.xml.internal.FormHoverProvider.Execute;
diff --git a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/MavenPomEditor.java b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/MavenPomEditor.java
index c24f2cbb..59af1915 100644
--- a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/MavenPomEditor.java
+++ b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/MavenPomEditor.java
@@ -73,9 +73,6 @@ import org.eclipse.jface.text.source.IAnnotationModel;
import org.eclipse.jface.text.source.IOverviewRuler;
import org.eclipse.jface.text.source.IVerticalRuler;
import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.actions.OpenPomAction.MavenPathStorageEditorInput;
-import org.eclipse.m2e.core.actions.OpenPomAction.MavenStorageEditorInput;
-import org.eclipse.m2e.core.actions.SelectionUtil;
import org.eclipse.m2e.core.core.IMavenConstants;
import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.embedder.ArtifactKey;
@@ -84,8 +81,12 @@ import org.eclipse.m2e.core.project.IMavenProjectChangedListener;
import org.eclipse.m2e.core.project.IMavenProjectFacade;
import org.eclipse.m2e.core.project.MavenProjectChangedEvent;
import org.eclipse.m2e.core.project.MavenProjectManager;
-import org.eclipse.m2e.core.util.Util;
-import org.eclipse.m2e.core.util.Util.FileStoreEditorInputStub;
+import org.eclipse.m2e.core.ui.internal.M2EUIPluginActivator;
+import org.eclipse.m2e.core.ui.internal.actions.SelectionUtil;
+import org.eclipse.m2e.core.ui.internal.actions.OpenPomAction.MavenPathStorageEditorInput;
+import org.eclipse.m2e.core.ui.internal.actions.OpenPomAction.MavenStorageEditorInput;
+import org.eclipse.m2e.core.ui.internal.util.Util;
+import org.eclipse.m2e.core.ui.internal.util.Util.FileStoreEditorInputStub;
import org.eclipse.m2e.editor.MavenEditorImages;
import org.eclipse.m2e.editor.MavenEditorPlugin;
import org.eclipse.m2e.editor.internal.Messages;
@@ -390,7 +391,8 @@ public class MavenPomEditor extends FormEditor implements IResourceChangeListene
* Show or hide the advanced pages within the editor (based on the default setting)
*/
protected void showAdvancedPages(){
- showAdvancedPages(MavenPlugin.getDefault().getPreferenceStore().getBoolean(PomEditorPreferencePage.P_SHOW_ADVANCED_TABS));
+ showAdvancedPages(M2EUIPluginActivator.getDefault().getPreferenceStore()
+ .getBoolean(PomEditorPreferencePage.P_SHOW_ADVANCED_TABS));
}
/**
@@ -455,7 +457,8 @@ public class MavenPomEditor extends FormEditor implements IResourceChangeListene
}
protected void selectActivePage(){
- boolean showXML = MavenPlugin.getDefault().getPreferenceStore().getBoolean(PomEditorPreferencePage.P_DEFAULT_POM_EDITOR_PAGE);
+ boolean showXML = M2EUIPluginActivator.getDefault().getPreferenceStore()
+ .getBoolean(PomEditorPreferencePage.P_DEFAULT_POM_EDITOR_PAGE);
if(showXML){
setActivePage(null);
}
diff --git a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/MavenPomEditorPage.java b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/MavenPomEditorPage.java
index 0c8a59d7..8546ce8e 100644
--- a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/MavenPomEditorPage.java
+++ b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/MavenPomEditorPage.java
@@ -51,12 +51,12 @@ import org.eclipse.jface.fieldassist.FieldDecoration;
import org.eclipse.jface.fieldassist.FieldDecorationRegistry;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.actions.OpenPomAction;
import org.eclipse.m2e.core.core.IMavenConstants;
import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.project.IMavenProjectFacade;
import org.eclipse.m2e.core.project.MavenProjectManager;
-import org.eclipse.m2e.core.ui.dialogs.InputHistory;
+import org.eclipse.m2e.core.ui.internal.actions.OpenPomAction;
+import org.eclipse.m2e.core.ui.internal.dialogs.InputHistory;
import org.eclipse.m2e.editor.MavenEditorImages;
import org.eclipse.m2e.editor.internal.Messages;
import org.eclipse.m2e.editor.xml.internal.FormHoverProvider;
diff --git a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/OverviewPage.java b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/OverviewPage.java
index b6d02b72..9e31167f 100644
--- a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/OverviewPage.java
+++ b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/OverviewPage.java
@@ -45,21 +45,21 @@ import org.eclipse.jface.viewers.OpenEvent;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.window.Window;
import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.m2e.core.MavenImages;
import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.actions.OpenPomAction;
import org.eclipse.m2e.core.core.IMavenConstants;
import org.eclipse.m2e.core.embedder.ArtifactKey;
import org.eclipse.m2e.core.embedder.ProjectUpdater;
import org.eclipse.m2e.core.index.IIndex;
import org.eclipse.m2e.core.index.IndexedArtifactFile;
import org.eclipse.m2e.core.project.IMavenProjectFacade;
-import org.eclipse.m2e.core.ui.dialogs.MavenRepositorySearchDialog;
-import org.eclipse.m2e.core.util.M2EUtils;
-import org.eclipse.m2e.core.util.ProposalUtil;
-import org.eclipse.m2e.core.util.search.Packaging;
-import org.eclipse.m2e.core.wizards.MavenModuleWizard;
-import org.eclipse.m2e.core.wizards.WidthGroup;
+import org.eclipse.m2e.core.ui.internal.MavenImages;
+import org.eclipse.m2e.core.ui.internal.actions.OpenPomAction;
+import org.eclipse.m2e.core.ui.internal.dialogs.MavenRepositorySearchDialog;
+import org.eclipse.m2e.core.ui.internal.search.util.Packaging;
+import org.eclipse.m2e.core.ui.internal.util.M2EUIUtils;
+import org.eclipse.m2e.core.ui.internal.util.ProposalUtil;
+import org.eclipse.m2e.core.ui.internal.wizards.MavenModuleWizard;
+import org.eclipse.m2e.core.ui.internal.wizards.WidthGroup;
import org.eclipse.m2e.editor.MavenEditorImages;
import org.eclipse.m2e.editor.composites.ListEditorComposite;
import org.eclipse.m2e.editor.composites.ListEditorContentProvider;
@@ -276,7 +276,7 @@ public class OverviewPage extends MavenPomEditorPage {
GridData gd_artifactIdText = new GridData(SWT.FILL, SWT.CENTER, true, false);
gd_artifactIdText.horizontalIndent = 4;
artifactIdText.setLayoutData(gd_artifactIdText);
- M2EUtils.addRequiredDecoration(artifactIdText);
+ M2EUIUtils.addRequiredDecoration(artifactIdText);
createEvaluatorInfo(artifactIdText);
Label versionLabel = toolkit.createLabel(artifactComposite, Messages.OverviewPage_lblVersion, SWT.NONE);
@@ -418,7 +418,7 @@ public class OverviewPage extends MavenPomEditorPage {
parentGroupIdText.setLayoutData(gd_parentGroupIdText);
parentGroupIdText.setData("name", "parentGroupId"); //$NON-NLS-1$ //$NON-NLS-2$
ProposalUtil.addGroupIdProposal(getProject(), parentGroupIdText, Packaging.POM);
- M2EUtils.addRequiredDecoration(parentGroupIdText);
+ M2EUIUtils.addRequiredDecoration(parentGroupIdText);
createEvaluatorInfo(parentGroupIdText);
@@ -431,7 +431,7 @@ public class OverviewPage extends MavenPomEditorPage {
parentArtifactIdText.setLayoutData(gd_parentArtifactIdText);
parentArtifactIdText.setData("name", "parentArtifactId"); //$NON-NLS-1$ //$NON-NLS-2$
ProposalUtil.addArtifactIdProposal(getProject(), parentGroupIdText, parentArtifactIdText, Packaging.POM);
- M2EUtils.addRequiredDecoration(parentArtifactIdText);
+ M2EUIUtils.addRequiredDecoration(parentArtifactIdText);
createEvaluatorInfo(parentArtifactIdText);
Label parentVersionLabel = toolkit.createLabel(parentComposite, Messages.OverviewPage_lblVersion2, SWT.NONE);
@@ -446,7 +446,7 @@ public class OverviewPage extends MavenPomEditorPage {
ProposalUtil.addVersionProposal(getProject(), null/** null because we don't want expressions from parent pom here */,
parentGroupIdText, parentArtifactIdText, parentVersionText,
Packaging.POM);
- M2EUtils.addRequiredDecoration(parentVersionText);
+ M2EUIUtils.addRequiredDecoration(parentVersionText);
createEvaluatorInfo(parentVersionText);
diff --git a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/PomEditorPreferencePage.java b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/PomEditorPreferencePage.java
index 8e8f7189..b24580dc 100644
--- a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/PomEditorPreferencePage.java
+++ b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/PomEditorPreferencePage.java
@@ -15,6 +15,7 @@ import org.eclipse.jface.preference.BooleanFieldEditor;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.core.Messages;
+import org.eclipse.m2e.core.ui.internal.M2EUIPluginActivator;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
@@ -28,7 +29,7 @@ public class PomEditorPreferencePage extends FieldEditorPreferencePage implement
public PomEditorPreferencePage() {
super(GRID);
- setPreferenceStore(MavenPlugin.getDefault().getPreferenceStore());
+ setPreferenceStore(M2EUIPluginActivator.getDefault().getPreferenceStore());
plugin = MavenPlugin.getDefault();
}
diff --git a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/ProfilesPage.java b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/ProfilesPage.java
index 4fe1fbee..337e395c 100644
--- a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/ProfilesPage.java
+++ b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/ProfilesPage.java
@@ -39,12 +39,12 @@ import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.window.Window;
import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.m2e.core.actions.OpenPomAction;
import org.eclipse.m2e.core.core.IMavenConstants;
import org.eclipse.m2e.core.embedder.ArtifactKey;
import org.eclipse.m2e.core.project.IMavenProjectFacade;
-import org.eclipse.m2e.core.wizards.MavenModuleWizard;
-import org.eclipse.m2e.core.wizards.WidthGroup;
+import org.eclipse.m2e.core.ui.internal.actions.OpenPomAction;
+import org.eclipse.m2e.core.ui.internal.wizards.MavenModuleWizard;
+import org.eclipse.m2e.core.ui.internal.wizards.WidthGroup;
import org.eclipse.m2e.editor.MavenEditorImages;
import org.eclipse.m2e.editor.composites.BuildComposite;
import org.eclipse.m2e.editor.composites.DependenciesComposite;
diff --git a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/PropertiesSection.java b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/PropertiesSection.java
index 9f17525c..811e672b 100644
--- a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/PropertiesSection.java
+++ b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/PropertiesSection.java
@@ -26,7 +26,7 @@ import org.eclipse.emf.edit.domain.EditingDomain;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.viewers.DoubleClickEvent;
import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.m2e.core.ui.dialogs.MavenPropertyDialog;
+import org.eclipse.m2e.core.ui.internal.dialogs.MavenPropertyDialog;
import org.eclipse.m2e.editor.composites.ListEditorComposite;
import org.eclipse.m2e.editor.composites.ListEditorContentProvider;
import org.eclipse.m2e.editor.internal.Messages;
diff --git a/org.eclipse.m2e.feature/feature.xml b/org.eclipse.m2e.feature/feature.xml
index ebc0f578..128a383c 100644
--- a/org.eclipse.m2e.feature/feature.xml
+++ b/org.eclipse.m2e.feature/feature.xml
@@ -113,4 +113,18 @@
version="0.0.0"
unpack="false"/>
+ <plugin
+ id="org.eclipse.m2e.core.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.m2e.scm"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
</feature>
diff --git a/org.eclipse.m2e.jdt/META-INF/MANIFEST.MF b/org.eclipse.m2e.jdt/META-INF/MANIFEST.MF
index b68afc8b..70145b5a 100644
--- a/org.eclipse.m2e.jdt/META-INF/MANIFEST.MF
+++ b/org.eclipse.m2e.jdt/META-INF/MANIFEST.MF
@@ -23,7 +23,8 @@ Require-Bundle: org.eclipse.core.resources,
org.eclipse.m2e.model.edit;bundle-version="[0.13.0,0.14.0)",
org.eclipse.m2e.core;bundle-version="[0.13.0,0.14.0)",
org.eclipse.ui.console,
- org.slf4j.api;bundle-version="1.5.11"
+ org.slf4j.api;bundle-version="1.5.11",
+ org.eclipse.m2e.core.ui;bundle-version="[0.13.0,0.14.0)"
Eclipse-LazyStart: true
Bundle-Activator: org.eclipse.m2e.jdt.MavenJdtPlugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5,
diff --git a/org.eclipse.m2e.jdt/plugin.xml b/org.eclipse.m2e.jdt/plugin.xml
index f84eb178..710a1f88 100644
--- a/org.eclipse.m2e.jdt/plugin.xml
+++ b/org.eclipse.m2e.jdt/plugin.xml
@@ -508,7 +508,7 @@
</objectContribution>
</extension>
<extension
- point="org.eclipse.m2e.core.lifecycleMappingPropertyPage">
+ point="org.eclipse.m2e.core.ui.lifecycleMappingPropertyPage">
<lifecycleMappingPropertyPage
class="org.eclipse.m2e.core.ui.internal.preferences.CustomizableLifecycleMappingPropertyPage"
lifecycleMappingId="jar">
diff --git a/org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/AbstractJavaProjectConfigurator.java b/org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/AbstractJavaProjectConfigurator.java
index dcedb811..c920125a 100644
--- a/org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/AbstractJavaProjectConfigurator.java
+++ b/org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/AbstractJavaProjectConfigurator.java
@@ -42,12 +42,12 @@ import org.apache.maven.project.MavenProject;
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.core.MavenLogger;
+import org.eclipse.m2e.core.internal.M2EUtils;
import org.eclipse.m2e.core.project.IMavenProjectFacade;
import org.eclipse.m2e.core.project.IProjectConfigurationManager;
import org.eclipse.m2e.core.project.configurator.AbstractProjectConfigurator;
import org.eclipse.m2e.core.project.configurator.ILifecycleMapping;
import org.eclipse.m2e.core.project.configurator.ProjectConfigurationRequest;
-import org.eclipse.m2e.core.util.Util;
import org.eclipse.m2e.jdt.BuildPathManager;
import org.eclipse.m2e.jdt.IClasspathDescriptor;
import org.eclipse.m2e.jdt.IClasspathEntryDescriptor;
@@ -223,8 +223,8 @@ public abstract class AbstractJavaProjectConfigurator extends AbstractProjectCon
IFolder classes = getFolder(project, mavenProject.getBuild().getOutputDirectory());
IFolder testClasses = getFolder(project, mavenProject.getBuild().getTestOutputDirectory());
- Util.createFolder(classes, true);
- Util.createFolder(testClasses, true);
+ M2EUtils.createFolder(classes, true);
+ M2EUtils.createFolder(testClasses, true);
IPath[] inclusion = new IPath[0];
IPath[] exclusion = new IPath[0];
diff --git a/org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/actions/OpenJavaDocAction.java b/org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/actions/OpenJavaDocAction.java
index 43877de7..01ab6ba4 100644
--- a/org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/actions/OpenJavaDocAction.java
+++ b/org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/actions/OpenJavaDocAction.java
@@ -36,10 +36,10 @@ import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.actions.SelectionUtil;
import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.embedder.ArtifactKey;
import org.eclipse.m2e.core.embedder.IMaven;
+import org.eclipse.m2e.core.ui.internal.actions.SelectionUtil;
import org.eclipse.m2e.jdt.internal.Messages;
/**
diff --git a/org.eclipse.m2e.launching/META-INF/MANIFEST.MF b/org.eclipse.m2e.launching/META-INF/MANIFEST.MF
index 2b972fcd..774b5eab 100644
--- a/org.eclipse.m2e.launching/META-INF/MANIFEST.MF
+++ b/org.eclipse.m2e.launching/META-INF/MANIFEST.MF
@@ -23,10 +23,12 @@ Require-Bundle: org.eclipse.core.resources,
org.eclipse.jdt.junit,
org.eclipse.m2e.maven.runtime;bundle-version="[0.13.0,0.14.0)",
org.eclipse.m2e.core;bundle-version="[0.13.0,0.14.0)",
- com.ibm.icu;bundle-version="4.0.1"
+ com.ibm.icu;bundle-version="4.0.1",
+ org.eclipse.m2e.core.ui;bundle-version="[0.13.0,0.14.0)"
Eclipse-LazyStart: true
Bundle-RequiredExecutionEnvironment: J2SE-1.5,
JavaSE-1.6
Bundle-Vendor: %Bundle-Vendor
Export-Package: org.eclipse.m2e.actions;x-internal:=true
Bundle-Activator: org.eclipse.m2e.internal.launch.MavenLaunchPlugin
+Import-Package: org.slf4j
diff --git a/org.eclipse.m2e.launching/src/org/eclipse/m2e/actions/ExecutePomAction.java b/org.eclipse.m2e.launching/src/org/eclipse/m2e/actions/ExecutePomAction.java
index 894f4619..39fdcc83 100644
--- a/org.eclipse.m2e.launching/src/org/eclipse/m2e/actions/ExecutePomAction.java
+++ b/org.eclipse.m2e.launching/src/org/eclipse/m2e/actions/ExecutePomAction.java
@@ -45,23 +45,23 @@ import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.window.Window;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IFileEditorInput;
-import org.eclipse.ui.dialogs.ElementListSelectionDialog;
-
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.core.IMavenConstants;
import org.eclipse.m2e.core.core.MavenLogger;
-import org.eclipse.m2e.internal.launch.Messages;
import org.eclipse.m2e.core.project.IMavenProjectFacade;
import org.eclipse.m2e.core.project.MavenProjectManager;
import org.eclipse.m2e.core.project.ResolverConfiguration;
+import org.eclipse.m2e.core.ui.internal.M2EUIPluginActivator;
+import org.eclipse.m2e.internal.launch.LaunchingUtils;
+import org.eclipse.m2e.internal.launch.Messages;
import org.eclipse.m2e.ui.internal.launch.MavenLaunchMainTab;
-import org.eclipse.m2e.core.util.Util;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.dialogs.ElementListSelectionDialog;
/**
@@ -158,7 +158,7 @@ public class ExecutePomAction implements ILaunchShortcut, IExecutableExtension {
}
private Shell getShell() {
- return MavenPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getShell();
+ return M2EUIPluginActivator.getDefault().getWorkbench().getActiveWorkbenchWindow().getShell();
}
private IContainer findPomXmlBasedir(IContainer dir) {
@@ -282,7 +282,7 @@ public class ExecutePomAction implements ILaunchShortcut, IExecutableExtension {
ArrayList<ILaunchConfiguration> matchingConfigs = new ArrayList<ILaunchConfiguration>();
for(ILaunchConfiguration configuration : launchConfigurations) {
// substitute variables
- String workDir = Util.substituteVar(configuration.getAttribute(MavenLaunchConstants.ATTR_POM_DIR, (String) null));
+ String workDir = LaunchingUtils.substituteVar(configuration.getAttribute(MavenLaunchConstants.ATTR_POM_DIR, (String) null));
if(workDir == null) {
continue;
}
diff --git a/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/LaunchingUtils.java b/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/LaunchingUtils.java
new file mode 100644
index 00000000..e78938c4
--- /dev/null
+++ b/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/LaunchingUtils.java
@@ -0,0 +1,27 @@
+package org.eclipse.m2e.internal.launch;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.variables.VariablesPlugin;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class LaunchingUtils {
+
+ private static Logger log = LoggerFactory.getLogger(LaunchingUtils.class);
+
+ /**
+ * Substitute any variable
+ */
+ public static String substituteVar(String s) {
+ if(s == null) {
+ return s;
+ }
+ try {
+ return VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(s);
+ } catch(CoreException e) {
+ log.error("Could not substitute variable {}.", s, e);
+ return null;
+ }
+ }
+
+}
diff --git a/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenLaunchDelegate.java b/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenLaunchDelegate.java
index d8b1728e..87cab6c4 100644
--- a/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenLaunchDelegate.java
+++ b/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenLaunchDelegate.java
@@ -41,7 +41,6 @@ import org.eclipse.m2e.core.core.MavenConsole;
import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.embedder.IMavenConfiguration;
import org.eclipse.m2e.core.embedder.IMavenLauncherConfiguration;
-import org.eclipse.m2e.core.util.Util;
public class MavenLaunchDelegate extends JavaLaunchDelegate implements MavenLaunchConstants {
@@ -190,7 +189,7 @@ public class MavenLaunchDelegate extends JavaLaunchDelegate implements MavenLaun
if(n > -1) {
name = property.substring(0, n);
if(n > 1) {
- value = Util.substituteVar(property.substring(n + 1));
+ value = LaunchingUtils.substituteVar(property.substring(n + 1));
}
}
diff --git a/org.eclipse.m2e.launching/src/org/eclipse/m2e/ui/internal/launch/MavenLaunchMainTab.java b/org.eclipse.m2e.launching/src/org/eclipse/m2e/ui/internal/launch/MavenLaunchMainTab.java
index 697cdaa7..05f84bd8 100644
--- a/org.eclipse.m2e.launching/src/org/eclipse/m2e/ui/internal/launch/MavenLaunchMainTab.java
+++ b/org.eclipse.m2e.launching/src/org/eclipse/m2e/ui/internal/launch/MavenLaunchMainTab.java
@@ -36,6 +36,16 @@ import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.m2e.actions.MavenLaunchConstants;
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.core.MavenLogger;
+import org.eclipse.m2e.core.core.Messages;
+import org.eclipse.m2e.core.embedder.IMavenConfiguration;
+import org.eclipse.m2e.core.embedder.MavenRuntime;
+import org.eclipse.m2e.core.embedder.MavenRuntimeManager;
+import org.eclipse.m2e.core.ui.internal.MavenImages;
+import org.eclipse.m2e.core.ui.internal.dialogs.MavenGoalSelectionDialog;
+import org.eclipse.m2e.core.ui.internal.dialogs.MavenPropertyDialog;
+import org.eclipse.m2e.internal.launch.LaunchingUtils;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.FocusAdapter;
import org.eclipse.swt.events.FocusEvent;
@@ -60,16 +70,6 @@ import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.dialogs.ContainerSelectionDialog;
import org.eclipse.ui.dialogs.PreferencesUtil;
import org.eclipse.ui.externaltools.internal.model.IExternalToolConstants;
-import org.eclipse.m2e.core.MavenImages;
-import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.core.MavenLogger;
-import org.eclipse.m2e.core.core.Messages;
-import org.eclipse.m2e.core.embedder.IMavenConfiguration;
-import org.eclipse.m2e.core.embedder.MavenRuntime;
-import org.eclipse.m2e.core.embedder.MavenRuntimeManager;
-import org.eclipse.m2e.core.ui.dialogs.MavenGoalSelectionDialog;
-import org.eclipse.m2e.core.ui.dialogs.MavenPropertyDialog;
-import org.eclipse.m2e.core.util.Util;
/**
@@ -696,7 +696,7 @@ public class MavenLaunchMainTab extends AbstractLaunchConfigurationTab implement
if(name == null || name.trim().length() == 0) {
return false;
}
- String dirName = Util.substituteVar(name);
+ String dirName = LaunchingUtils.substituteVar(name);
if(dirName == null) {
return false;
}
diff --git a/org.eclipse.m2e.maven.runtime/.gitignore b/org.eclipse.m2e.maven.runtime/.gitignore
index ea8c4bf7..fef45dc2 100644
--- a/org.eclipse.m2e.maven.runtime/.gitignore
+++ b/org.eclipse.m2e.maven.runtime/.gitignore
@@ -1 +1,2 @@
/target
+/local-patches.jar
diff --git a/org.eclipse.m2e.parent/pom.xml b/org.eclipse.m2e.parent/pom.xml
index 51055492..f2120804 100644
--- a/org.eclipse.m2e.parent/pom.xml
+++ b/org.eclipse.m2e.parent/pom.xml
@@ -82,6 +82,7 @@
<!-- <module>../org.eclipse.m2e.cliresolver</module> -->
<module>../org.eclipse.m2e.core</module>
+ <module>../org.eclipse.m2e.core.ui</module>
<module>../org.eclipse.m2e.launching</module>
<module>../org.eclipse.m2e.jdt</module>
<module>../org.eclipse.m2e.refactoring</module>
@@ -89,6 +90,7 @@
<module>../org.eclipse.m2e.editor</module>
<module>../org.eclipse.m2e.lifecyclemapping.defaults</module>
<module>../org.eclipse.m2e.discovery</module>
+ <module>../org.eclipse.m2e.scm</module>
<!-- common test helpers -->
<module>../org.eclipse.m2e.tests.common</module>
diff --git a/org.eclipse.m2e.refactoring/META-INF/MANIFEST.MF b/org.eclipse.m2e.refactoring/META-INF/MANIFEST.MF
index 9478f9ea..4fd741a4 100644
--- a/org.eclipse.m2e.refactoring/META-INF/MANIFEST.MF
+++ b/org.eclipse.m2e.refactoring/META-INF/MANIFEST.MF
@@ -19,7 +19,8 @@ Require-Bundle: org.eclipse.m2e.core;bundle-version="[0.13.0,0.14.0)",
org.eclipse.jdt.core,
org.eclipse.ui.ide,
org.eclipse.ltk.core.refactoring,
- org.eclipse.ltk.ui.refactoring;visibility:=reexport
+ org.eclipse.ltk.ui.refactoring;visibility:=reexport,
+ org.eclipse.m2e.core.ui;bundle-version="[0.13.0,0.14.0)"
Eclipse-LazyStart: true
Bundle-RequiredExecutionEnvironment: J2SE-1.5,
JavaSE-1.6
diff --git a/org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/exclude/DependencyExcludeAction.java b/org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/exclude/DependencyExcludeAction.java
index 54eaf0e9..18f4348d 100644
--- a/org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/exclude/DependencyExcludeAction.java
+++ b/org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/exclude/DependencyExcludeAction.java
@@ -20,8 +20,8 @@ import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation;
-import org.eclipse.m2e.core.actions.SelectionUtil;
import org.eclipse.m2e.core.embedder.ArtifactKey;
+import org.eclipse.m2e.core.ui.internal.actions.SelectionUtil;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IActionDelegate;
import org.eclipse.ui.IEditorPart;
diff --git a/org.eclipse.m2e.scm/.classpath b/org.eclipse.m2e.scm/.classpath
new file mode 100644
index 00000000..288a7808
--- /dev/null
+++ b/org.eclipse.m2e.scm/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/org.eclipse.m2e.scm/.gitignore b/org.eclipse.m2e.scm/.gitignore
new file mode 100644
index 00000000..c41cc9e3
--- /dev/null
+++ b/org.eclipse.m2e.scm/.gitignore
@@ -0,0 +1 @@
+/target \ No newline at end of file
diff --git a/org.eclipse.m2e.scm/.project b/org.eclipse.m2e.scm/.project
new file mode 100644
index 00000000..d2cbdd16
--- /dev/null
+++ b/org.eclipse.m2e.scm/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.m2e.scm</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.m2e.scm/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.m2e.scm/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000..7a1f3961
--- /dev/null
+++ b/org.eclipse.m2e.scm/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,279 @@
+#Tue Feb 08 10:09:28 EST 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=2
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=1
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=1
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=2
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=true
+org.eclipse.jdt.core.formatter.comment.format_block_comments=false
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=false
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
+org.eclipse.jdt.core.formatter.comment.line_length=120
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=
+org.eclipse.jdt.core.formatter.enabling_tag=
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
+org.eclipse.jdt.core.formatter.indentation.size=2
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_clos