This commit was manufactured by cvs2svn to create branch
'R2_1_2_maintenance'.
Sprout from R2_1_maintenance 2003-09-09 18:46:52 UTC Sonia Dimitrov <sdimitro> 'update versions for 2.1.2'
Delete:
ant/org.eclipse.ant.core/.classpath
ant/org.eclipse.ant.core/.cvsignore
ant/org.eclipse.ant.core/.options
ant/org.eclipse.ant.core/.project
ant/org.eclipse.ant.core/about.html
ant/org.eclipse.ant.core/build.properties
ant/org.eclipse.ant.core/buildnotes_platform-ant.html
ant/org.eclipse.ant.core/doc/org_eclipse_ant_core.html
ant/org.eclipse.ant.core/doc/org_eclipse_ant_core_antTasks.html
ant/org.eclipse.ant.core/doc/org_eclipse_ant_core_antTypes.html
ant/org.eclipse.ant.core/doc/org_eclipse_ant_core_extraClasspathEntries.html
ant/org.eclipse.ant.core/lib/antsupportlib.jar
ant/org.eclipse.ant.core/plugin.properties
ant/org.eclipse.ant.core/plugin.xml
ant/org.eclipse.ant.core/r2_0_buildnotes_platform-ant.html
ant/org.eclipse.ant.core/r2_1_buildnotes_platform-ant.html
ant/org.eclipse.ant.core/schema/antTasks.exsd
ant/org.eclipse.ant.core/schema/antTypes.exsd
ant/org.eclipse.ant.core/schema/extraClasspathEntries.exsd
ant/org.eclipse.ant.core/scripts/buildExtraJAR.xml
ant/org.eclipse.ant.core/scripts/exportplugin.xml
ant/org.eclipse.ant.core/scripts/updateTarget.xml
ant/org.eclipse.ant.core/src/org/eclipse/ant/core/AntCorePlugin.java
ant/org.eclipse.ant.core/src/org/eclipse/ant/core/AntCorePreferences.java
ant/org.eclipse.ant.core/src/org/eclipse/ant/core/AntRunner.java
ant/org.eclipse.ant.core/src/org/eclipse/ant/core/AntSecurityException.java
ant/org.eclipse.ant.core/src/org/eclipse/ant/core/ProjectInfo.java
ant/org.eclipse.ant.core/src/org/eclipse/ant/core/Property.java
ant/org.eclipse.ant.core/src/org/eclipse/ant/core/TargetInfo.java
ant/org.eclipse.ant.core/src/org/eclipse/ant/core/Task.java
ant/org.eclipse.ant.core/src/org/eclipse/ant/core/Type.java
ant/org.eclipse.ant.core/src/org/eclipse/ant/core/package.html
ant/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntClassLoader.java
ant/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntObject.java
ant/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/IAntCoreConstants.java
ant/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/InternalCoreAntMessages.java
ant/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/InternalCoreAntMessages.properties
ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/AntSecurityManager.java
ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/InputHandlerSetter.java
ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/InternalAntMessages.java
ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/InternalAntMessages.properties
ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/InternalAntRunner.java
ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/InternalProject.java
ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/ProgressBuildListener.java
ant/org.eclipse.ant.tests.core/.classpath
ant/org.eclipse.ant.tests.core/.cvsignore
ant/org.eclipse.ant.tests.core/.project
ant/org.eclipse.ant.tests.core/about.html
ant/org.eclipse.ant.tests.core/build.properties
ant/org.eclipse.ant.tests.core/buildfiles/buildAntTestsSupportJAR.xml
ant/org.eclipse.ant.tests.core/lib/antTestsSupport.jar
ant/org.eclipse.ant.tests.core/plugin.properties
ant/org.eclipse.ant.tests.core/plugin.xml
ant/org.eclipse.ant.tests.core/test plugin/org/eclipse/ant/tests/core/testplugin/AntFileRunner.java
ant/org.eclipse.ant.tests.core/test plugin/org/eclipse/ant/tests/core/testplugin/AntTestChecker.java
ant/org.eclipse.ant.tests.core/test plugin/org/eclipse/ant/tests/core/testplugin/AntTestPlugin.java
ant/org.eclipse.ant.tests.core/test plugin/org/eclipse/ant/tests/core/testplugin/ProjectHelper.java
ant/org.eclipse.ant.tests.core/test support/org/eclipse/ant/tests/core/support/inputHandlers/AntTestInputHandler.java
ant/org.eclipse.ant.tests.core/test support/org/eclipse/ant/tests/core/support/tasks/AntTestTask.java
ant/org.eclipse.ant.tests.core/test support/org/eclipse/ant/tests/core/support/tasks/AntTestTask2.java
ant/org.eclipse.ant.tests.core/test support/org/eclipse/ant/tests/core/support/testloggers/TestBuildListener.java
ant/org.eclipse.ant.tests.core/test support/org/eclipse/ant/tests/core/support/testloggers/TestBuildLogger.java
ant/org.eclipse.ant.tests.core/test support/org/eclipse/ant/tests/core/support/types/AntTestPath.java
ant/org.eclipse.ant.tests.core/test.xml
ant/org.eclipse.ant.tests.core/testbuildfiles/Bug32551.xml
ant/org.eclipse.ant.tests.core/testbuildfiles/Bug34663.xml
ant/org.eclipse.ant.tests.core/testbuildfiles/ClasspathOrdering.xml
ant/org.eclipse.ant.tests.core/testbuildfiles/CustomTask.xml
ant/org.eclipse.ant.tests.core/testbuildfiles/CustomType.xml
ant/org.eclipse.ant.tests.core/testbuildfiles/NoDefault.xml
ant/org.eclipse.ant.tests.core/testbuildfiles/TestForEcho.xml
ant/org.eclipse.ant.tests.core/testbuildfiles/build.xml
ant/org.eclipse.ant.tests.core/testbuildfiles/echoing.xml
ant/org.eclipse.ant.tests.core/testbuildfiles/input.xml
ant/org.eclipse.ant.tests.core/testbuildfiles/javac.xml
ant/org.eclipse.ant.tests.core/testlib/classpathOrdering1.jar
ant/org.eclipse.ant.tests.core/testlib/classpathOrdering2.jar
ant/org.eclipse.ant.tests.core/testlib/taskFolder/org/eclipse/ant/tests/core/support/tasks/AntTestTask2.class
ant/org.eclipse.ant.tests.core/testresources/AntTestTask.java
ant/org.eclipse.ant.tests.core/testresources/taskdefs.properties
ant/org.eclipse.ant.tests.core/testresources/test.properties
ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/AbstractAntTest.java
ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/AutomatedSuite.java
ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/ProjectCreationDecorator.java
ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/tests/FrameworkTests.java
ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/tests/OptionTests.java
ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/tests/ProjectTests.java
ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/tests/TargetTests.java
ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/tests/TaskTests.java
ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/tests/TypeTests.java
update/org.eclipse.update.ui/.classpath
update/org.eclipse.update.ui/.cvsignore
update/org.eclipse.update.ui/.project
update/org.eclipse.update.ui/Graphics_update.html
update/org.eclipse.update.ui/about.html
update/org.eclipse.update.ui/build.properties
update/org.eclipse.update.ui/icons/full/clcl16/backward_nav.gif
update/org.eclipse.update.ui/icons/full/clcl16/forward_nav.gif
update/org.eclipse.update.ui/icons/full/clcl16/go_nav.gif
update/org.eclipse.update.ui/icons/full/clcl16/home_nav.gif
update/org.eclipse.update.ui/icons/full/clcl16/refresh_nav.gif
update/org.eclipse.update.ui/icons/full/clcl16/show_unconf.gif
update/org.eclipse.update.ui/icons/full/clcl16/stop_nav.gif
update/org.eclipse.update.ui/icons/full/ctool16/config_wiz.gif
update/org.eclipse.update.ui/icons/full/ctool16/install_wiz.gif
update/org.eclipse.update.ui/icons/full/ctool16/new_bookmark_wiz.gif
update/org.eclipse.update.ui/icons/full/ctool16/new_folder_wiz.gif
update/org.eclipse.update.ui/icons/full/ctool16/new_search_wiz.gif
update/org.eclipse.update.ui/icons/full/ctool16/uninstall_wiz.gif
update/org.eclipse.update.ui/icons/full/ctool16/update_wiz.gif
update/org.eclipse.update.ui/icons/full/cview16/browser.gif
update/org.eclipse.update.ui/icons/full/cview16/configs.gif
update/org.eclipse.update.ui/icons/full/cview16/featuresrc_result.gif
update/org.eclipse.update.ui/icons/full/cview16/preview.gif
update/org.eclipse.update.ui/icons/full/cview16/selected_updates.gif
update/org.eclipse.update.ui/icons/full/cview16/update_pers.gif
update/org.eclipse.update.ui/icons/full/cview16/updates.gif
update/org.eclipse.update.ui/icons/full/dlcl16/backward_nav.gif
update/org.eclipse.update.ui/icons/full/dlcl16/forward_nav.gif
update/org.eclipse.update.ui/icons/full/dlcl16/go_nav.gif
update/org.eclipse.update.ui/icons/full/dlcl16/home_nav.gif
update/org.eclipse.update.ui/icons/full/dlcl16/refresh_nav.gif
update/org.eclipse.update.ui/icons/full/dlcl16/show_unconf.gif
update/org.eclipse.update.ui/icons/full/dlcl16/stop_nav.gif
update/org.eclipse.update.ui/icons/full/dtool16/config_wiz.gif
update/org.eclipse.update.ui/icons/full/dtool16/install_wiz.gif
update/org.eclipse.update.ui/icons/full/dtool16/new_bookmark_wiz.gif
update/org.eclipse.update.ui/icons/full/dtool16/new_folder_wiz.gif
update/org.eclipse.update.ui/icons/full/dtool16/new_search_wiz.gif
update/org.eclipse.update.ui/icons/full/dtool16/uninstall_wiz.gif
update/org.eclipse.update.ui/icons/full/dtool16/update_wiz.gif
update/org.eclipse.update.ui/icons/full/elcl16/backward_nav.gif
update/org.eclipse.update.ui/icons/full/elcl16/collapseall.gif
update/org.eclipse.update.ui/icons/full/elcl16/forward_nav.gif
update/org.eclipse.update.ui/icons/full/elcl16/go_nav.gif
update/org.eclipse.update.ui/icons/full/elcl16/home_nav.gif
update/org.eclipse.update.ui/icons/full/elcl16/refresh_nav.gif
update/org.eclipse.update.ui/icons/full/elcl16/show_unconf.gif
update/org.eclipse.update.ui/icons/full/elcl16/stop_nav.gif
update/org.eclipse.update.ui/icons/full/etool16/config_wiz.gif
update/org.eclipse.update.ui/icons/full/etool16/install_wiz.gif
update/org.eclipse.update.ui/icons/full/etool16/new_bookmark_wiz.gif
update/org.eclipse.update.ui/icons/full/etool16/new_folder_wiz.gif
update/org.eclipse.update.ui/icons/full/etool16/new_search_wiz.gif
update/org.eclipse.update.ui/icons/full/etool16/uninstall_wiz.gif
update/org.eclipse.update.ui/icons/full/etool16/update_wiz.gif
update/org.eclipse.update.ui/icons/full/eview16/browser.gif
update/org.eclipse.update.ui/icons/full/eview16/configs.gif
update/org.eclipse.update.ui/icons/full/eview16/featuresrc_result.gif
update/org.eclipse.update.ui/icons/full/eview16/preview.gif
update/org.eclipse.update.ui/icons/full/eview16/selected_updates.gif
update/org.eclipse.update.ui/icons/full/eview16/update_pers.gif
update/org.eclipse.update.ui/icons/full/eview16/updates.gif
update/org.eclipse.update.ui/icons/full/forms/def_provider.jpg
update/org.eclipse.update.ui/icons/full/forms/form_banner.jpg
update/org.eclipse.update.ui/icons/full/forms/form_underline.jpg
update/org.eclipse.update.ui/icons/full/forms/topic.gif
update/org.eclipse.update.ui/icons/full/obj16/app_obj.gif
update/org.eclipse.update.ui/icons/full/obj16/bfolder_obj.gif
update/org.eclipse.update.ui/icons/full/obj16/category_obj.gif
update/org.eclipse.update.ui/icons/full/obj16/cd_obj.gif
update/org.eclipse.update.ui/icons/full/obj16/computer_obj.gif
update/org.eclipse.update.ui/icons/full/obj16/config_obj.gif
update/org.eclipse.update.ui/icons/full/obj16/efix2_obj.gif
update/org.eclipse.update.ui/icons/full/obj16/efix_obj.gif
update/org.eclipse.update.ui/icons/full/obj16/esite_obj.gif
update/org.eclipse.update.ui/icons/full/obj16/feature_obj.gif
update/org.eclipse.update.ui/icons/full/obj16/floppy_obj.gif
update/org.eclipse.update.ui/icons/full/obj16/history_obj.gif
update/org.eclipse.update.ui/icons/full/obj16/lsite_obj.gif
update/org.eclipse.update.ui/icons/full/obj16/notinstalled_feature_obj.gif
update/org.eclipse.update.ui/icons/full/obj16/places_obj.gif
update/org.eclipse.update.ui/icons/full/obj16/psearch_obj.gif
update/org.eclipse.update.ui/icons/full/obj16/psite_obj.gif
update/org.eclipse.update.ui/icons/full/obj16/saved_obj.gif
update/org.eclipse.update.ui/icons/full/obj16/site_obj.gif
update/org.eclipse.update.ui/icons/full/obj16/tsearch_obj.gif
update/org.eclipse.update.ui/icons/full/obj16/unconf_feature_obj.gif
update/org.eclipse.update.ui/icons/full/obj16/updates_obj.gif
update/org.eclipse.update.ui/icons/full/obj16/usearch_obj.gif
update/org.eclipse.update.ui/icons/full/obj16/vfixed_obj.gif
update/org.eclipse.update.ui/icons/full/obj16/vremote_obj.gif
update/org.eclipse.update.ui/icons/full/obj16/vremovable_obj.gif
update/org.eclipse.update.ui/icons/full/obj16/web_bkmrk_obj.gif
update/org.eclipse.update.ui/icons/full/ovr16/add_stat.gif
update/org.eclipse.update.ui/icons/full/ovr16/current_co.gif
update/org.eclipse.update.ui/icons/full/ovr16/del_stat.gif
update/org.eclipse.update.ui/icons/full/ovr16/error_co.gif
update/org.eclipse.update.ui/icons/full/ovr16/installable_co.gif
update/org.eclipse.update.ui/icons/full/ovr16/linked_co.gif
update/org.eclipse.update.ui/icons/full/ovr16/mod_co.gif
update/org.eclipse.update.ui/icons/full/ovr16/unconfigured_co.gif
update/org.eclipse.update.ui/icons/full/ovr16/updated_co.gif
update/org.eclipse.update.ui/icons/full/ovr16/warning_co.gif
update/org.eclipse.update.ui/icons/full/wizban/config_wiz.gif
update/org.eclipse.update.ui/icons/full/wizban/def_wizban.jpg
update/org.eclipse.update.ui/icons/full/wizban/install_wiz.gif
update/org.eclipse.update.ui/icons/full/wizban/new_bookmark_wiz.gif
update/org.eclipse.update.ui/icons/full/wizban/new_folder_wiz.gif
update/org.eclipse.update.ui/icons/full/wizban/new_search_wiz.gif
update/org.eclipse.update.ui/icons/full/wizban/uninstall_wiz.gif
update/org.eclipse.update.ui/icons/full/wizban/update_wiz.gif
update/org.eclipse.update.ui/plugin.properties
update/org.eclipse.update.ui/plugin.xml
update/org.eclipse.update.ui/schema/searchCategory.exsd
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/DeltaWizardAction.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/NewUpdatesAction.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/PatchCleaner.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/UpdateLabelProvider.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/UpdateManagerAction.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/UpdatePerspective.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/UpdateUI.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/UpdateUIImages.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/UpdateUIPluginResources.properties
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/WebInstallHandler.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/ActivityConstraints.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/ActivitySection.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/CategoryForm.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/DetailsForm.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/DetailsHistory.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/DetailsHistoryItem.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/DiscoveryFolderForm.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/ExtensionRootForm.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/IUpdateForm.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/InfoLink.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/InstallConfigurationForm.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/InstallableSiteForm.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/LocalSiteForm.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/MainForm.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/MultipleSelectionForm.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/MyComputerForm.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/PreserveSection.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/PropertyWebForm.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/RevertSection.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/SearchForm.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/SiteForm.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/UIProblemHandler.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/UnknownObjectForm.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/UpdateAdapterFactory.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/UpdateSection.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/UpdateWebForm.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/BookmarkFolder.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/BookmarkUtil.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/ConfiguredFeatureAdapter.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/ConfiguredSiteAdapter.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/DiscoveryFolder.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/ExtensionRoot.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/FeatureAdapter.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/FeatureReferenceAdapter.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/IConfiguredFeatureAdapter.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/IConfiguredSiteAdapter.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/IConfiguredSiteContext.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/IFeatureAdapter.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/ISiteAdapter.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/IUpdateModelChangedListener.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/MissingFeature.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/MonitorAdapter.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/MyComputer.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/MyComputerDirectory.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/MyComputerFile.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/NamedModelObject.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/PendingChange.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/PreservedConfiguration.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/SimpleFeatureAdapter.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/SiteBookmark.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/SiteCategory.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/UIModelObject.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/UpdateModel.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/CategoryPage.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/DetailsPage.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/DiscoveryFolderPage.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/ExtensionRootPage.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/IUpdateFormPage.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/InstallConfigurationPage.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/InstallableSitePage.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/LocalSitePage.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/MainPage.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/MultipleSelectionPage.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/MyComputerPage.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/SearchPage.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/SitePage.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/UnknownObjectPage.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/UpdateFormPage.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/parts/AboutInfo.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/parts/AbstractOverlayIcon.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/parts/ConfigurationInfo.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/parts/DefaultContentProvider.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/parts/ImageOverlayIcon.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/parts/OverlayIcon.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/parts/PixelConverter.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/parts/SWTUtil.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/parts/SharedLabelProvider.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/parts/Sorter.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/parts/VolumeLabelProvider.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/preferences/AppServerPreferencePage.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/preferences/MainPreferencePage.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/preferences/UpdateColors.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/properties/ConfigurationPropertyPage.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/properties/NamedObjectPropertyPage.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/properties/SearchObjectPropertyPage.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/properties/SiteBookmarkPropertyPage.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/properties/SiteBookmarkPropertySource.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/BackgroundProgressMonitor.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/BackgroundThread.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/DefaultUpdatesSearchObject.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/DriveSearchSettings.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/ExpressionSearchCategory.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/ISearchCategory.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/ISearchObjectAdapter.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/ISearchQuery.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/MyComputerSearchDialog.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/MyComputerSearchSettings.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/NewPluginEntryDialog.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/PluginsSearchCategory.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/SearchCategory.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/SearchCategoryDescriptor.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/SearchCategoryRegistryReader.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/SearchObject.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/SearchResultSite.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/UpdatesSearchCategory.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/security/BannerPage.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/security/JarVerificationDialog.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/security/JarVerificationPage.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/security/JarVerificationService.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/security/UpdateManagerAuthenticator.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/security/UserValidationDialog.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/BaseTableView.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/BaseTreeView.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/BaseView.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/ConfigurationView.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/DetailsView.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/FeatureSorter.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/IEmbeddedWebBrowser.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/MultiPageView.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/RenameDialog.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/SearchMonitorManager.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/SearchResultView.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/SelectedUpdatesView.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/SiteStateAction.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/UpdateModelDataTransfer.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/UpdatesDragAdapter.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/UpdatesDropAdapter.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/UpdatesView.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/BannerPage.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/BaseNewWizardPage.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/DeltaAdapter.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/DeltaFeatureAdapter.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/DuplicateConflictsDialog.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/FeatureHierarchyElement.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/IDynamicPage.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/InstallDeltaWizard.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/InstallDeltaWizardPage.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/InstallWizard.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/InstallWizardDialog.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/LicensePage.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/MultiInstallWizard.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/MultiOptionalFeaturesPage.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/MultiReviewPage.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/MultiTargetPage.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/NewFolderWizardPage.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/NewSearchWizardPage.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/NewSiteBookmarkWizardPage.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/NewUpdatesWizard.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/NewUpdatesWizardPage.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/NewWizard.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/OptionalFeaturesPage.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/ResizableWizardDialog.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/ReviewPage.java
update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/TargetPage.java
update/org.eclipse.update.ui/src_webapp/org/eclipse/update/internal/ui/servlets/InstallServlet.java
update/org.eclipse.update.ui/src_webapp/org/eclipse/update/internal/ui/servlets/ServletsUtil.java
update/org.eclipse.update.ui/webapp/WEB-INF/.cvsignore
update/org.eclipse.update.ui/webapp/WEB-INF/lib/.cvsignore
update/org.eclipse.update.ui/webapp/WEB-INF/web.xml
update/org.eclipse.update.ui/webapp/images/backward_nav.gif
update/org.eclipse.update.ui/webapp/images/form_banner.jpg
update/org.eclipse.update.ui/webapp/images/form_underline.jpg
diff --git a/ant/org.eclipse.ant.core/.classpath b/ant/org.eclipse.ant.core/.classpath
deleted file mode 100644
index 0946172..0000000
--- a/ant/org.eclipse.ant.core/.classpath
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src/"/>
- <classpathentry kind="src" path="src_ant/"/>
- <classpathentry kind="src" path="/org.apache.xerces"/>
- <classpathentry kind="src" path="/org.eclipse.core.runtime"/>
- <classpathentry kind="src" path="/org.eclipse.core.boot"/>
- <classpathentry kind="var" path="JRE_LIB" rootpath="JRE_SRCROOT" sourcepath="JRE_SRC"/>
- <classpathentry kind="src" path="/org.apache.ant"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/ant/org.eclipse.ant.core/.cvsignore b/ant/org.eclipse.ant.core/.cvsignore
deleted file mode 100644
index ba077a4..0000000
--- a/ant/org.eclipse.ant.core/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/ant/org.eclipse.ant.core/.options b/ant/org.eclipse.ant.core/.options
deleted file mode 100644
index 04b34d5..0000000
--- a/ant/org.eclipse.ant.core/.options
+++ /dev/null
@@ -1,7 +0,0 @@
-# Debugging options for the org.eclipse.ant.core plugin.
-
-# Turn on debugging for the org.eclipse.ant.core plugin.
-org.eclipse.ant.core/debug=true
-
-# Displays buildfile run times.
-org.eclipse.ant.core/buildfile/timing=false
diff --git a/ant/org.eclipse.ant.core/.project b/ant/org.eclipse.ant.core/.project
deleted file mode 100644
index 0dfdc5d..0000000
--- a/ant/org.eclipse.ant.core/.project
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.ant.core</name>
- <comment></comment>
- <projects>
- <project>org.apache.ant</project>
- <project>org.apache.xerces</project>
- <project>org.eclipse.core.boot</project>
- <project>org.eclipse.core.runtime</project>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
diff --git a/ant/org.eclipse.ant.core/about.html b/ant/org.eclipse.ant.core/about.html
deleted file mode 100644
index 4735c0f..0000000
--- a/ant/org.eclipse.ant.core/about.html
+++ /dev/null
@@ -1,90 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>3rd March, 2003</p>
-<h3>License</h3>
-<p>Eclipse.org makes available all content in this plug-in ("Content"). Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
-Common Public License Version 1.0 ("CPL"). A copy of the CPL is available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>.
-For purposes of the CPL, "Program" will mean the Content.</p>
-
-<h3>Third Party Content</h3>
-
-<p>The Content includes items that have been sourced from third parties as follows:</p>
-
-<p><b>Ant 1.5.2</b></p>
-<p>The plug-in is based on software developed by The Apache Software Foundation as part of the Jakarta project. Therefore:</p>
-
-<blockquote>
-This product includes software developed by the Apache Software Foundation (<a href="http://www.apache.org/">http://www.apache.org/</a>).
-</blockquote>
-
-<p>The following classes ("Ant Derivative Work") are based on Ant code:</p>
-
-<ul>
- <li>InternalAntRunner contained in antsupportlib.jar and antsupportlibsrc.zip</li>
- <li>InternalProject contained in antsupportlib.jar and antsupportlibsrc.zip</li>
-</ul>
-
-<p>The Ant Derivative Work is:</p>
-
-<blockquote>Copyright (c) 2000-2002 The Apache Software Foundation. All rights reserved.</blockquote>
-
-<p>Your use of the Ant Derivative Work is subject to the terms and conditions of the Apache Software License 1.1 which
-is available at <a href="http://ant.apache.org/manual/LICENSE">http://ant.apache.org/manual/LICENSE</a>.
-More specifically:</p>
-<blockquote>
- 1. Redistributions of source code must retain the above copyright notice, this list of<br>
- conditions and the following disclaimer.<br>
-<br>
- 2. Redistributions in binary form must reproduce the above copyright notice, this list of<br>
- conditions and the following disclaimer in the documentation and/or other materials<br>
- provided with the distribution.<br>
-<br>
- 3. The end-user documentation included with the redistribution, if any, must include the<br>
- following acknowledgment:<br>
- <blockquote>
- "This product includes software developed by the Apache Software Foundation<br>
- (<a href="http://www.apache.org/">http://www.apache.org/</a>)."
- </blockquote>
- Alternately, this acknowledgment may appear in the software itself, if and wherever such<br>
- third-party acknowledgments normally appear.<br>
-<br>
- 4. The names "Ant" and "Apache Software Foundation" must not be used to endorse or<br>
- promote products derived from this software without prior written permission. For written<br>
- permission, please contact <a href="mailto:apache@apache.org">apache@apache.org</a>.<br>
-<br>
- 5. Products derived from this software may not be called "Apache", nor may "Apache" appear<br>
- in their name, without prior written permission of the Apache Software Foundation.<br>
-<br>
- THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT<br>
- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR<br>
- PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR ITS<br>
- CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR<br>
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR<br>
- SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON<br>
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING<br>
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF<br>
- ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-</blockquote>
-
-<h3>Contributions</h3>
-
-<p>If this Content is licensed to you under the terms and conditions of the CPL, any Contributions, as defined in the CPL, uploaded, submitted, or otherwise
-made available to Eclipse.org, members of Eclipse.org and/or the host of Eclipse.org web site, by you that relate to such
-Content are provided under the terms and conditions of the CPL and can be made available to others under the terms of the CPL.</p>
-
-<p>If this Content is licensed to you under license terms and conditions other than the CPL ("Other License"), any modifications, enhancements and/or
-other code and/or documentation ("Modifications") uploaded, submitted, or otherwise made available to Eclipse.org, members of Eclipse.org and/or the
-host of Eclipse.org, by you that relate to such Content are provided under terms and conditions of the Other License and can be made available
-to others under the terms of the Other License. In addition, with regard to Modifications for which you are the copyright holder, you are also
-providing the Modifications under the terms and conditions of the CPL and such Modifications can be made available to others under the terms of
-the CPL.</p>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/ant/org.eclipse.ant.core/build.properties b/ant/org.eclipse.ant.core/build.properties
deleted file mode 100644
index b5703b3..0000000
--- a/ant/org.eclipse.ant.core/build.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-source.antsupport.jar=src/
-source.lib/antsupportlib.jar=src_ant/
-src.includes=about.html,schema/
-bin.includes=plugin.xml,plugin.properties,about.html,*.jar,lib/*.jar,.options
-jars.compile.order=antsupport.jar,lib/antsupportlib.jar
-jars.extra.classpath=../org.apache.ant/ant.jar
-javadoc.packages=org.eclipse.*
\ No newline at end of file
diff --git a/ant/org.eclipse.ant.core/buildnotes_platform-ant.html b/ant/org.eclipse.ant.core/buildnotes_platform-ant.html
deleted file mode 100644
index f98d00e..0000000
--- a/ant/org.eclipse.ant.core/buildnotes_platform-ant.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="GENERATOR" content="Mozilla/4.7 [en] (WinNT; I) [Netscape]">
- <title>Eclipse Platform 2.1.1 Release Notes Ant</title>
-</head>
-<body>
-
-<h1>
-Eclipse 2.1.1 Platform Build Notes<br>
-Ant</h1>
-Eclipse SDK Build April ??, 2003
-
-<h3>
-Resolved Bugs</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=34608">34608</a>: Exception using content assist<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=35497">35497</a>: ArrayIndexOutOfBounds on external tools page<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=36353">36353</a>: Move to Ant 1.5.3<br>
-
-
-</body>
-</html>
diff --git a/ant/org.eclipse.ant.core/doc/org_eclipse_ant_core.html b/ant/org.eclipse.ant.core/doc/org_eclipse_ant_core.html
deleted file mode 100644
index 5489b8a..0000000
--- a/ant/org.eclipse.ant.core/doc/org_eclipse_ant_core.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Ant Build Tool Core extension-points</title>
-</head>
-<body link="#0000FF" vlink="#800080">
-
-<center>
-<h1>
-Ant Build Tool Core Plug-in</h1></center>
-This document lists all of the extension points that the Ant Build Tool Core
-plug-in makes available to tool developers.
-<p>
-<hr WIDTH="100%">
-<h1>
-General Extension Points</h1>
-The following extension points can be used to extend the fundamental capabilities
-of the Ant core plug-in:
-<ul>
-<li>
-<a href="org_eclipse_ant_core_antTasks.html">org.eclipse.ant.core.antTasks</a></li>
-
-<li>
-<a href="org_eclipse_ant_core_antTypes.html">org.eclipse.ant.core.antTypes</a></li>
-<li>
-<a href="org_eclipse_ant_core_extraClasspathEntries.html">org.eclipse.ant.core.extraClasspathEntries</a></li>
-</ul>
-<a href="hglegal2003.htm"><img SRC="ngibmcpy2003.gif" ALT="Copyright IBM Corp. 2000, 2003. All Rights Reserved." BORDER=0 height=12 width=195></a>
-</body>
-</html>
diff --git a/ant/org.eclipse.ant.core/doc/org_eclipse_ant_core_antTasks.html b/ant/org.eclipse.ant.core/doc/org_eclipse_ant_core_antTasks.html
deleted file mode 100644
index 2b8f935..0000000
--- a/ant/org.eclipse.ant.core/doc/org_eclipse_ant_core_antTasks.html
+++ /dev/null
@@ -1,68 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<HEAD><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<STYLE type="text/css">
-div.dtd-fragment {
- width: 100%;
- border: none;
- background-color: #eee;
-}
-</STYLE>
-</HEAD>
-<HTML>
-<BODY>
-<H1><CENTER>Ant Tasks</CENTER></H1>
-<b><i>Identifier: </i></b>org.eclipse.ant.core.antTasks<p>
-<b><i>Description: </i></b>Allows plug-ins to define arbitrary Ant tasks for use
-by the Ant infrastructure. The standard Ant infrastructure
-allows for the addition of arbitrary tasks.
-Unfortunately, it is unlikely that the Ant Core plug-in
-would have the classes required by these tasks on its
-classpath (or that of any of its prerequisites).
-To address this, clients should define an extension
-which plugs into this extension-point and maps a
-task name onto a class. The Ant plug-in can then
-request that the declaring plug-in load the specified class.<p><b><i>Configuration Markup:</i></b><p>
-<p><samp><font color="#800000"> <!ELEMENT <a name="e.extension">extension</a> (<a href="#e.antTask">antTask</a>*)></font></samp>
-<br><br><samp><font color="#800000"> <!ATTLIST extension</samp>
-<br><samp> point CDATA #REQUIRED</samp>
-<br><samp> id CDATA #IMPLIED</samp>
-<br><samp> name CDATA #IMPLIED</samp>
-<br><samp> ></font></samp>
-<ul>
-<li><b>point</b> - a fully qualified identifier of the target extension point</li>
-<li><b>id</b> - an optional identifier of the extension instance</li>
-<li><b>name</b> - an optional name of the extension instance</li>
-</ul>
-<p><samp><font color="#800000"> <!ELEMENT <a name="e.antTask">antTask</a> EMPTY></font></samp>
-<br><br><samp><font color="#800000"> <!ATTLIST antTask</samp>
-<br><samp> name CDATA #REQUIRED</samp>
-<br><samp> class CDATA #REQUIRED</samp>
-<br><samp> library CDATA #REQUIRED</samp>
-<br><samp> headless CDATA #IMPLIED</samp>
-<br><samp> ></font></samp>
-<ul>
-<li><b>name</b> - name of the task to be defined</li>
-<li><b>class</b> - the fully qualified name of a Java class implementing
-the task. Generally this class must be a subclass of
-<samp>org.apache.tools.ant.Task</samp>.</li>
-<li><b>library</b> - a path relative to the plug-in install location
-for the library containing the task.</li>
-<li><b>headless</b> - indicates whether this task is suitable for use in a "headless" Ant environment. If running headless and the attribute is "false",
- the task will not be loaded or defined. As well, the plugin class loader will not be added as a parent classloader to the Ant classloader.
- The implied value is true, when not specified.</li>
-</ul>
-<b><i>Examples: </i></b>The following is an example of an Ant tasks extension point:
-<p>
-<pre>
- <font color="#000080"><extension point=<font color="#008000">"org.eclipse.ant.core.antTasks"</font>></font>
- <font color="#000080"><antTask name=<font color="#008000">"coolTask"</font> class=<font color="#008000">"com.example.CoolTask"</font>/></font>
- <font color="#000080"></extension></font>
-</pre>
-</p><p>
-<b><i>Supplied Implementation: </i></b>The platform itself supplies a number of tasks including
-eclipse.incrementalBuild and eclipse.refreshLocal.<p>
-<font size="-1" color="#336699">
-<a href="hglegal.htm"><img SRC="ngibmcpy.gif" ALT="Copyright IBM Corp. 2000, 2003. All Rights Reserved." BORDER=0 height=12 width=195></a><p>
-</font>
-</BODY>
-</HTML>
diff --git a/ant/org.eclipse.ant.core/doc/org_eclipse_ant_core_antTypes.html b/ant/org.eclipse.ant.core/doc/org_eclipse_ant_core_antTypes.html
deleted file mode 100644
index 60705c0..0000000
--- a/ant/org.eclipse.ant.core/doc/org_eclipse_ant_core_antTypes.html
+++ /dev/null
@@ -1,67 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<HEAD><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<STYLE type="text/css">
-div.dtd-fragment {
- width: 100%;
- border: none;
- background-color: #eee;
-}
-</STYLE>
-</HEAD>
-<HTML>
-<BODY>
-<H1><CENTER>Ant Types</CENTER></H1>
-<b><i>Identifier: </i></b>org.eclipse.ant.core.antTypes<p>
-<b><i>Description: </i></b>Allows plug-ins to define arbitrary Ant datatypes for
-use by the Ant infrastructure. The standard Ant
-infrastructure allows for the addition of arbitrary
-datatypes. Unfortunately, it is unlikely that the
-Ant Core plug-in would have the classes required
-by these datatypes on its classpath (or that of any
-of its prerequisites). To address this, clients
-should define an extension which plugs into this
-extension-point and maps a datatype name onto a class.
-The Ant plug-in can then request that the declaring
-plug-in load the specified class.<p><b><i>Configuration Markup:</i></b><p>
-<p><samp><font color="#800000"> <!ELEMENT <a name="e.extension">extension</a> (<a href="#e.antType">antType</a>*)></font></samp>
-<br><br><samp><font color="#800000"> <!ATTLIST extension</samp>
-<br><samp> point CDATA #REQUIRED</samp>
-<br><samp> id CDATA #IMPLIED</samp>
-<br><samp> name CDATA #IMPLIED</samp>
-<br><samp> ></font></samp>
-<ul>
-<li><b>point</b> - a fully qualified identifier of the target extension point</li>
-<li><b>id</b> - an optional identifier of the extension instance</li>
-<li><b>name</b> - an optional name of the extension instance</li>
-</ul>
-<p><samp><font color="#800000"> <!ELEMENT <a name="e.antType">antType</a> EMPTY></font></samp>
-<br><br><samp><font color="#800000"> <!ATTLIST antType</samp>
-<br><samp> name CDATA #REQUIRED</samp>
-<br><samp> class CDATA #REQUIRED</samp>
-<br><samp> library CDATA #REQUIRED</samp>
-<br><samp> headless CDATA #IMPLIED</samp>
-<br><samp> ></font></samp>
-<ul>
-<li><b>name</b> - name of the type to be defined</li>
-<li><b>class</b> - the fully qualified name of a Java class implementing
-the datatype. Generally this class must be a subclass of
-<samp>org.apache.tools.ant.types.DataType</samp>.</li>
-<li><b>library</b> - a path relative to the plug-in install location
-for the library containing the type.</li>
-<li><b>headless</b> - indicates whether this type is suitable for use in a "headless" Ant environment. If running headless and the attribute is "false",
- the type will not be loaded or defined. As well, the plugin class loader will not be added as a parent classloader to the Ant classloader.
- The implied value is true, when not specified.</li>
-</ul>
-<b><i>Examples: </i></b>The following is an example of an Ant types extension point:
-<p>
-<pre>
- <font color="#000080"><extension point=<font color="#008000">"org.eclipse.ant.core.antTypes"</font>></font>
- <font color="#000080"><antType name=<font color="#008000">"coolType"</font> class=<font color="#008000">"com.example.CoolType"</font>/></font>
- <font color="#000080"></extension></font>
-</pre>
-</p><p>
-<font size="-1" color="#336699">
-<a href="hglegal.htm"><img SRC="ngibmcpy.gif" ALT="Copyright IBM Corp. 2000, 2003. All Rights Reserved." BORDER=0 height=12 width=195></a><p>
-</font>
-</BODY>
-</HTML>
diff --git a/ant/org.eclipse.ant.core/doc/org_eclipse_ant_core_extraClasspathEntries.html b/ant/org.eclipse.ant.core/doc/org_eclipse_ant_core_extraClasspathEntries.html
deleted file mode 100644
index 4f77b1d..0000000
--- a/ant/org.eclipse.ant.core/doc/org_eclipse_ant_core_extraClasspathEntries.html
+++ /dev/null
@@ -1,55 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<HEAD><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<STYLE type="text/css">
-div.dtd-fragment {
- width: 100%;
- border: none;
- background-color: #eee;
-}
-</STYLE>
-</HEAD>
-<HTML>
-<BODY>
-<H1><CENTER>Extra Ant Classpath Entries</CENTER></H1>
-<b><i>Identifier: </i></b>org.eclipse.ant.core.extraClasspathEntries<p>
-<b><i>Description: </i></b>Allows plug-ins to define arbitrary JARs for use by the Ant infrastructure.
-These JARs are put into the Ant classpath at runtime. Besides
-the JAR, the plug-in classloader of the plug-in providing the
-JAR is also added to the classpath.<p><b><i>Configuration Markup:</i></b><p>
-<p><samp><font color="#800000"> <!ELEMENT <a name="e.extension">extension</a> (<a href="#e.extraClasspathEntry">extraClasspathEntry</a>*)></font></samp>
-<br><br><samp><font color="#800000"> <!ATTLIST extension</samp>
-<br><samp> point CDATA #REQUIRED</samp>
-<br><samp> id CDATA #IMPLIED</samp>
-<br><samp> name CDATA #IMPLIED</samp>
-<br><samp> ></font></samp>
-<ul>
-<li><b>point</b> - a fully qualified identifier of the target extension point</li>
-<li><b>id</b> - an optional identifier of the extension instance</li>
-<li><b>name</b> - an optional name of the extension instance</li>
-</ul>
-<p><samp><font color="#800000"> <!ELEMENT <a name="e.extraClasspathEntry">extraClasspathEntry</a> EMPTY></font></samp>
-<br><br><samp><font color="#800000"> <!ATTLIST extraClasspathEntry</samp>
-<br><samp> library CDATA #REQUIRED</samp>
-<br><samp> headless CDATA #IMPLIED</samp>
-<br><samp> ></font></samp>
-<ul>
-<li><b>library</b> - a path relative to the plug-in install location for the library.</li>
-<li><b>headless</b> - indicates whether this extra classpath entry is suitable for use in a "headless" Ant environment. If running headless and the attribute is "false",
- this entry will not be added to the Ant classpath. As well, the plugin class loader will not be added as a parent classloader to the Ant classloader.
- The implied value is true, when not specified.</li>
-</ul>
-<b><i>Examples: </i></b>The following is an example of an extra classpath entries extension point:
-
-<p>
-<pre>
- <font color="#000080"><extension point=<font color="#008000">"org.eclipse.ant.core.extraClasspathEntries"</font>></font>
- <font color="#000080"><extraClasspathEntry library=<font color="#008000">"myExtraLibrary.jar"</font>/></font>
- <font color="#000080"></extension></font>
-</pre>
-</p><p>
-<b><i>Supplied Implementation: </i></b>The platform itself supplies an Ant support jar (antsupportlib.jar).<p>
-<font size="-1" color="#336699">
-<a href="hglegal.htm"><img SRC="ngibmcpy.gif" ALT="Copyright IBM Corp. 2000, 2003. All Rights Reserved." BORDER=0 height=12 width=195></a><p>
-</font>
-</BODY>
-</HTML>
diff --git a/ant/org.eclipse.ant.core/lib/antsupportlib.jar b/ant/org.eclipse.ant.core/lib/antsupportlib.jar
deleted file mode 100644
index d59d56b..0000000
--- a/ant/org.eclipse.ant.core/lib/antsupportlib.jar
+++ /dev/null
Binary files differ
diff --git a/ant/org.eclipse.ant.core/plugin.properties b/ant/org.eclipse.ant.core/plugin.properties
deleted file mode 100644
index cfbd778..0000000
--- a/ant/org.eclipse.ant.core/plugin.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-
-pluginName = Ant Build Tool Core
-providerName = Eclipse.org
-classpathName = Extra Ant Classpath Entry Definitions
-tasksName = Ant Task Definitions
-typesName = Ant Type Definitions
diff --git a/ant/org.eclipse.ant.core/plugin.xml b/ant/org.eclipse.ant.core/plugin.xml
deleted file mode 100644
index 26f7163..0000000
--- a/ant/org.eclipse.ant.core/plugin.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<plugin
- id="org.eclipse.ant.core"
- name="%pluginName"
- version="2.1.1"
- provider-name="%providerName"
- class="org.eclipse.ant.core.AntCorePlugin">
-
- <requires>
- <import plugin="org.apache.xerces"/>
- </requires>
-
- <runtime>
- <library name="antsupport.jar">
- <export name="*"/>
- <packages prefixes="org.eclipse.ant"/>
- </library>
- </runtime>
-
- <extension-point id="extraClasspathEntries" name="%classpathName" schema="schema/extraClasspathEntries.exsd"/>
- <extension-point id="antTasks" name="%tasksName" schema="schema/antTasks.exsd"/>
- <extension-point id="antTypes" name="%typesName" schema="schema/antTypes.exsd"/>
-
- <!-- Applications -->
- <extension
- id="antRunner"
- point="org.eclipse.core.runtime.applications">
- <application>
- <run
- class="org.eclipse.ant.core.AntRunner">
- </run>
- </application>
- </extension>
-
- <!-- Extra Classpath -->
- <extension point="org.eclipse.ant.core.extraClasspathEntries">
- <extraClasspathEntry
- library="lib/antsupportlib.jar">
- </extraClasspathEntry>
- </extension>
-
-</plugin>
\ No newline at end of file
diff --git a/ant/org.eclipse.ant.core/r2_0_buildnotes_platform-ant.html b/ant/org.eclipse.ant.core/r2_0_buildnotes_platform-ant.html
deleted file mode 100644
index 238d69a..0000000
--- a/ant/org.eclipse.ant.core/r2_0_buildnotes_platform-ant.html
+++ /dev/null
@@ -1,552 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="GENERATOR" content="Mozilla/4.7 [en] (WinNT; I) [Netscape]">
- <title>Eclipse Platform Release Notes Core</title>
-</head>
-<body>
-
-<h1>
-Eclipse Platform Build Notes<br>
-Ant</h1>
-Eclipse SDK Build 20020612
-<h2>
-What's new in this drop</h2>
-
-<h3>
-API changes</h3>
-
-<ul>
-<li>
-None.</li>
-</ul>
-
-<h3>
-Other highlights</h3>
-
-<ul>
-<li>
-None.</li>
-</ul>
-
-<h3>
-Resolved Bugs</h3>
-
-<ul>
-<li>
-<a href="http://dev.eclipse.org/bugs/buglist.cgi?bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&email1=&emailtype1=substring&emailassigned_to1=1&email2=&emailtype2=substring&emailreporter2=1&bugidtype=include&bug_id=&changedin=&votes=&chfield=bug_status&chfieldfrom=2002%2F06%2F11&chfieldto=2002%2F06%2F12&chfieldvalue=&product=Platform&component=Ant&short_desc=&short_desc_type=allwordssubstr&long_desc=&long_desc_type=allwordssubstr&keywords=&keywords_type=anywords&field0-0-0=noop&type0-0-0=noop&value0-0-0=&field0-0-1=noop&type0-0-1=noop&value0-0-1=&cmdtype=doit&order=Bug+Number">Click
-here</a> to see PRs which have been marked as RESOLVED, VERIFIED or CLOSED
-since the last integration build.</li>
-</ul>
-
-<h1>
-
-<hr WIDTH="100%">Eclipse Platform Build Notes<br>
-Ant</h1>
-Eclipse SDK Build 20020611
-<h2>
-What's new in this drop</h2>
-
-<h3>
-API changes</h3>
-
-<ul>
-<li>
-None.</li>
-</ul>
-
-<h3>
-Other highlights</h3>
-
-<ul>
-<li>
-None.</li>
-</ul>
-
-<h3>
-Resolved Bugs</h3>
-
-<ul>
-<li>
-<a href="http://dev.eclipse.org/bugs/buglist.cgi?bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&email1=&emailtype1=substring&emailassigned_to1=1&email2=&emailtype2=substring&emailreporter2=1&bugidtype=include&bug_id=&changedin=&votes=&chfield=bug_status&chfieldfrom=2002%2F06%2F07&chfieldto=2002%2F06%2F11&chfieldvalue=&product=Platform&component=Ant&short_desc=&short_desc_type=allwordssubstr&long_desc=&long_desc_type=allwordssubstr&keywords=&keywords_type=anywords&field0-0-0=noop&type0-0-0=noop&value0-0-0=&field0-0-1=noop&type0-0-1=noop&value0-0-1=&cmdtype=doit&order=Bug+Number">Click
-here</a> to see PRs which have been marked as RESOLVED, VERIFIED or CLOSED
-since the last integration build.</li>
-</ul>
-
-<h1>
-
-<hr WIDTH="100%">Eclipse Platform Build Notes<br>
-Ant</h1>
-Eclipse SDK Build 20020607
-<h2>
-What's new in this drop</h2>
-
-<h3>
-API changes</h3>
-
-<ul>
-<li>
-None.</li>
-</ul>
-
-<h3>
-Other highlights</h3>
-
-<ul>
-<li>
-None.</li>
-</ul>
-
-<h3>
-Resolved Bugs</h3>
-
-<ul>
-<li>
-<a href="http://dev.eclipse.org/bugs/buglist.cgi?bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&email1=&emailtype1=substring&emailassigned_to1=1&email2=&emailtype2=substring&emailreporter2=1&bugidtype=include&bug_id=&changedin=&votes=&chfield=bug_status&chfieldfrom=2002%2F05%2F31&chfieldto=2002%2F06%2F07&chfieldvalue=&product=Platform&component=Ant&short_desc=&short_desc_type=allwordssubstr&long_desc=&long_desc_type=allwordssubstr&keywords=&keywords_type=anywords&field0-0-0=noop&type0-0-0=noop&value0-0-0=&field0-0-1=noop&type0-0-1=noop&value0-0-1=&cmdtype=doit&order=Bug+Number">Click
-here</a> to see PRs which have been marked as RESOLVED, VERIFIED or CLOSED
-since the last integration build.</li>
-</ul>
-
-<h1>
-
-<hr WIDTH="100%">Eclipse Platform Build Notes<br>
-Ant</h1>
-Eclipse SDK Build 20020531
-<h2>
-What's new in this drop</h2>
-
-<h3>
-API changes</h3>
-
-<ul>
-<li>
-None.</li>
-</ul>
-
-<h3>
-Other highlights</h3>
-
-<ul>
-<li>
-None.</li>
-</ul>
-
-<h3>
-Resolved Bugs</h3>
-
-<ul>
-<li>
-<a href="http://dev.eclipse.org/bugs/buglist.cgi?bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&email1=&emailtype1=substring&emailassigned_to1=1&email2=&emailtype2=substring&emailreporter2=1&bugidtype=include&bug_id=&changedin=&votes=&chfield=bug_status&chfieldfrom=2002%2F05%2F30&chfieldto=2002%2F05%2F31&chfieldvalue=&product=Platform&component=Ant&short_desc=&short_desc_type=allwordssubstr&long_desc=&long_desc_type=allwordssubstr&keywords=&keywords_type=anywords&field0-0-0=noop&type0-0-0=noop&value0-0-0=&field0-0-1=noop&type0-0-1=noop&value0-0-1=&cmdtype=doit&order=Bug+Number">Click
-here</a> to see PRs which have been marked as RESOLVED, VERIFIED or CLOSED
-since the last integration build.</li>
-</ul>
-
-<hr WIDTH="100%">
-<h1>
-Eclipse Platform Build Notes<br>
-Ant</h1>
-Eclipse SDK Build 20020530
-<h2>
-What's new in this drop</h2>
-
-<h3>
-API changes</h3>
-
-<ul>
-<li>
-None.</li>
-</ul>
-
-<h3>
-Other highlights</h3>
-
-<ul>
-<li>
-None.</li>
-</ul>
-
-<h3>
-Resolved Bugs</h3>
-
-<ul>
-<li>
-<a href="http://dev.eclipse.org/bugs/buglist.cgi?bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&email1=&emailtype1=substring&emailassigned_to1=1&email2=&emailtype2=substring&emailreporter2=1&bugidtype=include&bug_id=&changedin=&votes=&chfield=bug_status&chfieldfrom=2002%2F05%2F29&chfieldto=2002%2F05%2F30&chfieldvalue=&product=Platform&component=Ant&short_desc=&short_desc_type=allwordssubstr&long_desc=&long_desc_type=allwordssubstr&keywords=&keywords_type=anywords&field0-0-0=noop&type0-0-0=noop&value0-0-0=&cmdtype=doit&order=Bug+Number">Click
-here</a> to see PRs which have been marked as RESOLVED, VERIFIED or CLOSED
-since the last integration build.</li>
-</ul>
-
-<h1>
-
-<hr WIDTH="100%">Eclipse Platform Build Notes<br>
-Ant</h1>
-Eclipse SDK Build 20020529
-<h2>
-What's new in this drop</h2>
-
-<h3>
-API changes</h3>
-
-<ul>
-<li>
-None.</li>
-</ul>
-
-<h3>
-Other highlights</h3>
-
-<ul>
-<li>
-None.</li>
-</ul>
-
-<h3>
-Resolved Bugs</h3>
-
-<ul>
-<li>
-<a href="http://dev.eclipse.org/bugs/buglist.cgi?bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&email1=&emailtype1=substring&emailassigned_to1=1&email2=&emailtype2=substring&emailreporter2=1&bugidtype=include&bug_id=&changedin=&votes=&chfield=bug_status&chfieldfrom=2002%2F05%2F21&chfieldto=2002%2F05%2F29&chfieldvalue=&product=Platform&component=Ant&short_desc=&short_desc_type=allwordssubstr&long_desc=&long_desc_type=allwordssubstr&keywords=&keywords_type=anywords&field0-0-0=noop&type0-0-0=noop&value0-0-0=&cmdtype=doit&order=Bug+Number">Click
-here</a> to see PRs which have been marked as RESOLVED, VERIFIED or CLOSED
-since the last integration build.</li>
-</ul>
-
-<h1>
-
-<hr WIDTH="100%">Eclipse Platform Build Notes<br>
-Ant</h1>
-Eclipse SDK Build 20020521
-<h2>
-What's new in this drop</h2>
-
-<h3>
-API changes</h3>
-
-<ul>
-<li>
-The plug-in <b><tt>org.eclipse.ant.ui</tt></b> has been removed in favor
-of <b><tt>org.eclipse.ui.externaltools</tt></b>.</li>
-</ul>
-
-<h3>
-Other highlights</h3>
-
-<ul>
-<li>
-None.</li>
-</ul>
-
-<h3>
-Resolved Bugs</h3>
-
-<ul>
-<li>
-<a href="http://dev.eclipse.org/bugs/buglist.cgi?bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&email1=&emailtype1=substring&emailassigned_to1=1&email2=&emailtype2=substring&emailreporter2=1&bugidtype=include&bug_id=&changedin=&votes=&chfield=bug_status&chfieldfrom=2002%2F05%2F14&chfieldto=2002%2F05%2F21&chfieldvalue=&product=Platform&component=Ant&short_desc=&short_desc_type=allwordssubstr&long_desc=&long_desc_type=allwordssubstr&keywords=&keywords_type=anywords&field0-0-0=noop&type0-0-0=noop&value0-0-0=&cmdtype=doit&order=Bug+Number">Click
-here</a> to see PRs which have been marked as RESOLVED, VERIFIED or CLOSED
-since the last integration build.</li>
-</ul>
-
-<hr WIDTH="100%">
-<h1>
-Eclipse Platform Build Notes<br>
-Ant</h1>
-Eclipse SDK Build 20020514
-<h2>
-What's new in this drop</h2>
-
-<h3>
-API changes</h3>
-
-<ul>
-<li>
-None.</li>
-</ul>
-
-<h3>
-Other highlights</h3>
-
-<ul>
-<li>
-Ant type eclipse.commapatternset has been removed.</li>
-</ul>
-
-<h3>
-Resolved Bugs</h3>
-
-<ul>
-<li>
-<a href="http://dev.eclipse.org/bugs/buglist.cgi?bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&email1=&emailtype1=substring&emailassigned_to1=1&email2=&emailtype2=substring&emailreporter2=1&bugidtype=include&bug_id=&changedin=&votes=&chfield=bug_status&chfieldfrom=2002%2F04%2F30&chfieldto=2002%2F05%2F14&chfieldvalue=&product=Platform&component=Ant&short_desc=&short_desc_type=allwordssubstr&long_desc=&long_desc_type=allwordssubstr&keywords=&keywords_type=anywords&field0-0-0=noop&type0-0-0=noop&value0-0-0=&cmdtype=doit&order=Bug+Number">Click
-here</a> to see PRs which have been marked as RESOLVED, VERIFIED or CLOSED
-since the last integration build.</li>
-</ul>
-
-<h1>
-
-<hr WIDTH="100%">Eclipse Platform Build Notes<br>
-Ant</h1>
-Eclipse SDK Build 20020430
-<h2>
-What's new in this drop</h2>
-
-<h3>
-API changes</h3>
-
-<ul>
-<li>
-None.</li>
-</ul>
-
-<h3>
-Other highlights</h3>
-
-<ul>
-<li>
-Type commapatternset is now called eclipse.commapatternset .</li>
-</ul>
-
-<h3>
-Resolved Bugs</h3>
-
-<ul>
-<li>
-<a href="http://dev.eclipse.org/bugs/buglist.cgi?bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&email1=&emailtype1=substring&emailassigned_to1=1&email2=&emailtype2=substring&emailreporter2=1&bugidtype=include&bug_id=&changedin=&votes=&chfield=bug_status&chfieldfrom=2002%2F04%2F12&chfieldto=2002%2F04%2F30&chfieldvalue=&product=Platform&component=Ant&short_desc=&short_desc_type=allwordssubstr&long_desc=&long_desc_type=allwordssubstr&keywords=&keywords_type=anywords&field0-0-0=noop&type0-0-0=noop&value0-0-0=&cmdtype=doit&order=Bug+Number">Click
-here</a> to see PRs which have been marked as RESOLVED, VERIFIED or CLOSED
-since the last integration build.</li>
-</ul>
-
-<h1>
-
-<hr WIDTH="100%">Eclipse Platform Build Notes<br>
-Ant</h1>
-Eclipse SDK Build 20020411
-<h2>
-What's new in this drop</h2>
-
-<h3>
-API changes</h3>
-
-<ul>
-<li>
-None.</li>
-</ul>
-
-<h3>
-Other highlights</h3>
-
-<ul>
-<li>
-None.</li>
-</ul>
-
-<h3>
-Resolved Bugs</h3>
-
-<ul>
-<li>
-<a href="http://dev.eclipse.org/bugs/buglist.cgi?bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&email1=&emailtype1=substring&emailassigned_to1=1&email2=&emailtype2=substring&emailreporter2=1&bugidtype=include&bug_id=&changedin=&votes=&chfield=bug_status&chfieldfrom=2002%2F04%2F09&chfieldto=2002%2F04%2F12&chfieldvalue=&product=Platform&component=Ant&short_desc=&short_desc_type=allwordssubstr&long_desc=&long_desc_type=allwordssubstr&keywords=&keywords_type=anywords&field0-0-0=noop&type0-0-0=noop&value0-0-0=&cmdtype=doit&namedcmd=Active&newqueryname=&order=Bug+Number">Click
-here</a> to see PRs which have been marked as RESOLVED, VERIFIED or CLOSED
-since the last integration build.</li>
-</ul>
-
-<h1>
-
-<hr WIDTH="100%">Eclipse Platform Build Notes<br>
-Ant</h1>
-Eclipse SDK Build 20020409
-<h2>
-What's new in this drop</h2>
-
-<h3>
-API changes</h3>
-
-<ul>
-<li>
-<b><tt>org.eclipse.ant.core</tt></b> does not export <b><tt>org.apache.ant</tt></b>
-anymore. Plug-ins that need to have access to Ant classes need to require
-<b><tt>org.apache.ant</tt></b>
-directly.</li>
-
-<li>
-Tasks <b><tt>refreshLocal</tt></b> and <b><tt>incrementalBuild</tt></b>
-are not available anymore. Use <b><tt>eclipse.refreshLocal</tt></b> and
-<b><tt>eclipse.incrementalBuild</tt></b>
-instead.</li>
-</ul>
-
-<h3>
-Other highlights</h3>
-
-<ul>
-<li>
-New property <b><tt>eclipse.running</tt></b> is set for scripts running
-inside Eclipse.</li>
-
-<li>
-It is now possible to extend the Ant classpath by adding new JARs, folders,
-tasks and types through a preference (Workbench->Preferences->Ant->Customize).</li>
-</ul>
-
-<h3>
-Resolved Bugs</h3>
-
-<ul>
-<li>
-<a href="http://dev.eclipse.org/bugs/buglist.cgi?bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&email1=&emailtype1=substring&emailassigned_to1=1&email2=&emailtype2=substring&emailreporter2=1&bugidtype=include&bug_id=&changedin=&votes=&chfield=bug_status&chfieldfrom=2002%2F01%2F29&chfieldto=2002%2F04%2F09&chfieldvalue=&product=Platform&component=Ant&short_desc=&short_desc_type=allwordssubstr&long_desc=&long_desc_type=allwordssubstr&keywords=&keywords_type=anywords&field0-0-0=noop&type0-0-0=noop&value0-0-0=&cmdtype=doit&namedcmd=Active&newqueryname=&order=Bug+Number">Click
-here</a> to see PRs which have been marked as RESOLVED, VERIFIED or CLOSED
-since the last integration build.</li>
-</ul>
-
-<h1>
-
-<hr WIDTH="100%">Eclipse Platform Build Notes<br>
-Ant</h1>
-Eclipse SDK Build 20020129
-<h2>
-What's new in this drop</h2>
-
-<h3>
-API changes</h3>
-
-<ul>
-<li>
-None.</li>
-</ul>
-
-<h3>
-Other highlights</h3>
-
-<ul>
-<li>
-None.</li>
-</ul>
-
-<h3>
-Resolved Bugs</h3>
-
-<ul>
-<li>
-<a href="http://dev.eclipse.org/bugs/buglist.cgi?bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&email1=&emailtype1=substring&emailassigned_to1=1&email2=&emailtype2=substring&emailreporter2=1&bugidtype=include&bug_id=&changedin=&votes=&chfield=bug_status&chfieldfrom=2001%2F12%2F17&chfieldto=2002%2F01%2F29&chfieldvalue=&product=Platform&component=Ant&short_desc=&short_desc_type=allwordssubstr&long_desc=&long_desc_type=allwordssubstr&keywords=&keywords_type=anywords&field0-0-0=noop&type0-0-0=noop&value0-0-0=&cmdtype=doit&namedcmd=ant&newqueryname=&order=Bug+Number">Click
-here</a> to see PRs which have been marked as RESOLVED, VERIFIED or CLOSED
-since the last integration build.</li>
-</ul>
-
-<h1>
-
-<hr WIDTH="100%">Eclipse Platform Build Notes<br>
-Ant</h1>
-Eclipse SDK Build 20011218
-<h2>
-What's new in this drop</h2>
-
-<h3>
-API changes</h3>
-
-<ul>
-<li>
-None.</li>
-</ul>
-
-<h3>
-Other highlights</h3>
-
-<ul>
-<li>
-None.</li>
-</ul>
-
-<h3>
-Resolved Bugs</h3>
-
-<ul>
-<li>
-<a href="http://dev.eclipse.org/bugs/buglist.cgi?bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&email1=&emailtype1=substring&emailassigned_to1=1&email2=&emailtype2=substring&emailreporter2=1&bugidtype=include&bug_id=&changedin=&votes=&chfield=bug_status&chfieldfrom=2001%2F12%2F11&chfieldto=2001%2F12%2F17&chfieldvalue=&product=Platform&component=Ant&short_desc=&short_desc_type=allwordssubstr&long_desc=&long_desc_type=allwordssubstr&keywords=&keywords_type=anywords&field0-0-0=noop&type0-0-0=noop&value0-0-0=&cmdtype=doit&namedcmd=ant&newqueryname=&order=Bug+Number">Click
-here</a> to see PRs which have been marked as RESOLVED, VERIFIED or CLOSED
-since the last integration build.</li>
-</ul>
-
-<h1>
-
-<hr WIDTH="100%">Eclipse Platform Build Notes<br>
-Ant</h1>
-Eclipse SDK Build 20011211
-<h2>
-What's new in this drop</h2>
-
-<h3>
-API changes</h3>
-
-<ul>
-<li>
-None.</li>
-</ul>
-
-<h3>
-Other highlights</h3>
-
-<ul>
-<li>
-Ant code from Apache has moved to a new plug-in called org.apache.ant..</li>
-</ul>
-
-<h3>
-Resolved Bugs</h3>
-
-<ul>
-<li>
-<a href="http://dev.eclipse.org/bugs/buglist.cgi?bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&email1=&emailtype1=substring&emailassigned_to1=1&email2=&emailtype2=substring&emailreporter2=1&bugidtype=include&bug_id=&changedin=&votes=&chfield=bug_status&chfieldfrom=2001%2F11%2F27&chfieldto=2001%2F12%2F10&chfieldvalue=&product=Platform&component=Ant&short_desc=&short_desc_type=allwordssubstr&long_desc=&long_desc_type=allwordssubstr&keywords=&keywords_type=anywords&field0-0-0=noop&type0-0-0=noop&value0-0-0=&cmdtype=doit&namedcmd=Active&newqueryname=&order=Bug+Number">Click
-here</a> to see PRs which have been marked as RESOLVED, VERIFIED or CLOSED
-since the last integration build.</li>
-</ul>
-
-<h1>
-
-<hr WIDTH="100%">Eclipse Platform Build Notes<br>
-Ant</h1>
-Eclipse SDK Build 20011127 (v213)
-<h2>
-What's new in this drop</h2>
-
-<h3>
-API changes</h3>
-
-<ul>
-<li>
-None.</li>
-</ul>
-
-<h3>
-Other highlights</h3>
-
-<ul>
-<li>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=5391">5391</a>
-Upgrade to Ant 1.4.1</li>
-</ul>
-
-<h1>
-
-<hr WIDTH="100%">Eclipse Platform Build Notes<br>
-Ant</h1>
-Eclipse SDK Build 20011120 (v211)
-<h2>
-What's new in this drop</h2>
-
-<h3>
-API changes</h3>
-
-<ul>
-<li>
-None.</li>
-</ul>
-
-<h3>
-Other highlights</h3>
-
-<ul>
-<li>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=5331">5331</a>
-Ant does not override optional tasks with org.eclipse.ant.core.antTasks
-extension point</li>
-</ul>
-
-</body>
-</html>
diff --git a/ant/org.eclipse.ant.core/r2_1_buildnotes_platform-ant.html b/ant/org.eclipse.ant.core/r2_1_buildnotes_platform-ant.html
deleted file mode 100644
index 6ce0828..0000000
--- a/ant/org.eclipse.ant.core/r2_1_buildnotes_platform-ant.html
+++ /dev/null
@@ -1,706 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="GENERATOR" content="Mozilla/4.7 [en] (WinNT; I) [Netscape]">
- <title>Eclipse Platform Release Notes Ant</title>
-</head>
-<body>
-
-<h1>
-Eclipse Platform Build Notes<br>
-Ant</h1>
-Eclipse SDK Build March 25, 2003
-
-<h3>
-Resolved Bugs</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=35610">35610</a>: External tools plugin.xml error<br>
-
-<h1>
-Eclipse Platform Build Notes<br>
-Ant</h1>
-Eclipse SDK Build March 17, 2003
-
-<h3>
-Resolved Bugs</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=35138">35138</a>: NPE during shutdown<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=34767">34767</a>: Ant preferences not imported<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=35100">35100</a>: Migrate actions to command extension point<br>
-
-<h1>
-Eclipse Platform Build Notes<br>
-Ant</h1>
-Eclipse SDK Build March 13, 2003
-
-<h3>
-Resolved Bugs</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=34726">34726</a>: Ant tests do not need the overhead of AutomatedSuite.run<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=34922">34922</a>: Typos<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=34439">34439</a>: Index out of bounds editing custom task<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=34496">34496</a>: double click adds type without name<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=34682">34682</a>: External entity with unrecognized protocol<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=34678">34678</a>: Duplicate properties in files<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=34663">34663</a>: Ant attempts to resolve taskdefs before resolving properties<br>
-
-<h1>
-Eclipse Platform Build Notes<br>
-Ant</h1>
-Eclipse SDK Build March 12, 2003
-
-<h3>
-Resolved Bugs</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=34442">34442</a>: Custom task does not work in folder (only in jar)<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=34472">34472</a>: External tools preference is not clear<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=34519">34519</a>: Dialog slow to cancel when Properties/External Tools was selected<br>
-
-<h1>
-Eclipse Platform Build Notes<br>
-Ant</h1>
-Eclipse SDK Build March 6, 2003
-<p>
-<b>Note:</b> Adding the Xerces JARs to your runtime Ant classpath is no longer required.
-In fact, adding these JARs can cause problems. The Xerces classes are loaded from the Xerces plugin provided with Eclipse.
-<h3>
-Resolved Bugs</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=32643">32643</a>: PlantyContentOutlinePage: 'Open With' shows up in context menu for non-existant external entity<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=33682">33682</a>: Ant build file editor causes exceptions when file empty<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=33794">33794</a>: Variables should be sorted in the "Select Variable" dialog<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=33826">33826</a>: Preferences>Editor>Appearance: layout problem<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=33069">33069</a>: Stack traces using ant editor<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=31727">31727</a>: Ant Editor tests fail when run as PDE JUnit tests<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=33838">33838</a>: Have build.xml as a default name for -find emulation<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=32700">32700</a>: Refresh Tab Scope variable selected but no selection widget<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=33685">33685</a>: Ant view: open with not available for targets<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=32657">32657</a>: Ant build stops working after terminating build<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=33861">33861</a>: [External Tools] Pref page too prominent<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=33870">33870</a>: The build.properties for org.eclipse.ant.tests.core is incorrect<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=33837">33837</a>: Ant editor code assist is case sensitive<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=33859">33859</a>: AntEditor: error nodes in outline are inconsistent with the Java editor<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=33867">33867</a>: Misspelling in Ant View context menu<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=33874">33874</a>: AntEditor: no context menu on vertical ruler<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=33857">33857</a>: AntEditor: doesn't support hovers on annotations<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=33928">33928</a>: NPE closing workbench<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=33981">33981</a>: Better positioning of error squiggles in Ant Editor<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=33264">33264</a>: Content assist fails if reference external entity<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=33664">33644</a>: Class org/xml/sax/Parser violates loader constraints with IBM vm 131<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=32890">32890</a>: Coloring bug in ant editor<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=33892">33892</a>: BadLocationException possible during reconciliation of AntEditor<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=33952">33952</a>: AntEditor: possible automatic move of cursor while editing<br>
-
-<h1>
-Eclipse Platform Build Notes<br>
-Ant</h1>
-Eclipse SDK Build March 4, 2003
-
-<h3>
-Resolved Bugs</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=33443">33443</a>: No need for our own Ant version implementation<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=33263">33263</a>: Ant completion of properties is incorrect.<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=32825">32825</a>: Missing NLS strings for Ant Editor preference page<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=32183">32183</a>: Running with Ant1.6 alpha<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=32477">32477</a>: Errors in external entities and nested external entities aren't supported by the editor outline<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=32551">32551</a>: "Run Ant" causes ClassCastException with filesets<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=32587">32587</a>: AntView actions are incorrecly enabled --> NPE<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=32824">32824</a>: BadLocationException creating build.xml file<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=32624">32624</a>: Problem with asyncExec(..) Runnable in PlantyContentOutlinePage if control of treeviewer gets disposed.<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=32787">32787</a>: AssertionFailedException selecting error node in AntEditor outline<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=33043">33043</a>: Custom types are broken<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=33288">33288</a>: Ant View tooltips should use book capitalization<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=32517">32517</a>: No mneumonics on the Choose Configuration Type dialog<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=31433">31433</a>: Ant view will not set its focus when selecting the window<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=33514">33514</a>: Ant integration appears broken in I20030227<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=32715">32715</a>: Cancelling removing a external tool builder fails<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=32836">32836</a>: Cannot remove custom task<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=33284">33284</a>: Ant preferences: additional classpath entries not removed permanently<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=33117">33117</a>: ClassCastException with tasks using Xerces<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=32837">32837</a>: Tasks tab restore defaults<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=32827">32827</a>: Editor selection for external entities can be improved<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=32809">32809</a>: AntView search dialog retains name of removed working set<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=32693">32693</a>: Duplicate mneumonic on Program main tab<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=33534">33534</a>: Ant Editor: range indication not supported<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=33272">33272</a>: Leaking PlantyDocumentProviders<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=32768">32768</a>: Edit launch config from Ant view starts out "dirty"<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=32811">32811</a>: Setting ANT_HOME for specific config does not update classpath<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=32781">32781</a>: Description in Ant preference page is confusing<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=33702">33702</a>: [Ant View] Properties action<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=33346">33346</a>: Move to Ant 1.5.2<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=32521">32521</a>: (minor)AntView status line shows "no description"<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=33670">33670</a>: Ant view error strings are too long<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=32762">32762</a>: ${resource_loc} variable component specific resource tree too small<br>
-
-<h1>
-Eclipse Platform Build Notes<br>
-Ant</h1>
-Eclipse SDK Build Feb 21, 2003
-
-<h3>
-Resolved Bugs</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=23969">23969</a>: Launcher should throw JVM exit code to parent process when build fails<br>
-
-<h1>
-Eclipse Platform Build Notes<br>
-Ant</h1>
-Eclipse SDK Build Feb 20, 2003
-
-<h3>
-Resolved Bugs</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=31819">31819</a>: New support for color in TableViewers and TreeViewers<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=32158">32158</a>: Can't remove erroneous project builders<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=30716">30716</a>: cannot change external tool builder launch configuration properties<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=31949">31949</a>: Use OpenWith menu for external entities in the AntEditor outline<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=32091">32091</a>: AntClassloader should be setting its parent classloader<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=31625">31625</a>: Mixing build files in Ant view does not work<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=31934">31934</a>: Targets tab gets very wide if lots of targets selected<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=19459">19459</a>: [ExternalTools] failure to execute invalid tools should be better handled by ui.<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=32297">32297</a>: "plug-in" should be spelled with a hyphen<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=32276">32276</a>: Stack trace running ant.bat as an external process<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=31955">31955</a>: Outline is not created until initial reconcilation: noticeable delay<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=32345">32345</a>: Ant Editor doesn't support annotations<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=32374">32374</a>: BadLocationException on external entity build file<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=32423">32423</a>: Cannot use Run as Ant build with the Ant Editor outline with focus<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=32419">32419</a>: Put External Tools launch button with Run and Debug launch buttons<br>
-
-<h1>
-Eclipse Platform Build Notes<br>
-Ant</h1>
-Eclipse SDK Build Feb 18, 2003
-
-<h3>
-Resolved Bugs</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=28770">28770</a>: Display default target in project label in Ant view<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=30596">30596</a>: Fixes for the Ant Editor Tests<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=29236">29236</a>: AntView tests & Ant editor tests<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=31780">31780</a>: Workaround JFace selection bug<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=31776">31776</a>: Ant targets cannot be configured within the list box if many targets exist<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=31777">31777</a>: Add reconciling to the Ant editor outline page<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=21793">21793</a>: Ant ProjectHelper not loaded correctly [set thread context classloader]<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=31796">31796</a>: Ant Editor syntax coloring fails over multiple lines<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=30836">30836</a>: XMLElements from external entities have incorrect selection in AntEditor<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=31369">31369</a>: External Processes are not typed<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=31439">31439</a>: PlantyException on opening ant script<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=31588">31588</a>: Show In... support from the Ant<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=31792">31792</a>: Project.init shortcut not working for datatypes<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=31797">31797</a>: AntEditor syntax color does not update until the editor is re-opened<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=31935">31935</a>: No targets selected, yet still have targets in target execution order<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=31876">31876</a>: ClassCastException code assisting in Ant Editor<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=31948">31948</a>: AntEditor reconciling has broken resolution of external entities<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=32069">32069</a>: Color preferences are applied too early<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=27613">27613</a>: Code duplication with Ant preference pages and Ant launch config tabs<br>
-
-<h1>
-Eclipse Platform Build Notes<br>
-Ant</h1>
-Eclipse SDK Build Feb 13, 2003
-
-<h3>
-Resolved Bugs</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=31587">31587</a>: Open Editor for external entities should use selection<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=31561">31561</a>: Parse build files faster<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=31672">31672</a>: Broken backwards compatibility with Ant 1.4.*<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=31678">31678</a>: Disallow the AntClassLoader to load core Ant classes from plugin parents<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=30679">30679</a>: External tool migration and writing to System.err<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=31097">31097</a>: Ant Color Option list needs scrollbars<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=28928">28928</a>: Set minimum size of Runtime class path<br>
-
-<h1>
-Eclipse Platform Build Notes<br>
-Ant</h1>
-Eclipse SDK Build Feb 11, 2003
-
-<h3>
-Resolved Bugs</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=30939">30939</a>: DBCS characters are garbled at the Outline view using non-native workbench encoding<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=31180">31180</a>: Outline colors all elements whose name matches default target's<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=29815">29815</a>: Ant artwork<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=29898">29898</a>: Updating actions in the AntView<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=30931">30931</a>: [Ant View] Run button not enabled when first target added to list<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=30961">30961</a>: Arguments field on the ExternalToolsMain tab needs to be multiline<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=30239">30239</a>: Some bugs in launch configurations for external tools<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=31378">31378</a>: AntTargetsTab order tab does not color default target correctly<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=31200">31200</a>: Unable to uncheck Ant Targets after clicking "Revert"<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=31145">31145</a>: Show external entities as root nodes in the outline page<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=30884">30884</a>: PlantyCompletionProcessor does not handle external entities<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=30844">30844</a>: AntClasspathTab top table will grow unbounded<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=29572">29572</a>: headless Ant support does not properly handle IDE based Ant tasks<br>
-
-<h1>
-Eclipse Platform Build Notes<br>
-Ant</h1>
-Eclipse SDK Build Feb 6, 2003
-
-<h3>
-Resolved Bugs</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=31055">31055</a>: NPE determining if default target<br>
-
-<h1>
-Eclipse Platform Build Notes<br>
-Ant</h1>
-Eclipse SDK Build Feb 5, 2003
-
-<h3>
-Resolved Bugs</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=30239">30239</a>: Some bugs in launch configurations for external tools<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=26750">26750</a>: "Run with..." dialog for AntView<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=29231">29231</a>: Ant view is listed under "External Tools" in menu<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=29824">29824</a>: Ant view toolbars should follow type hierarchy example<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=30220">30220</a>: external builder not readded to projects<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=30228">30228</a>: Mneumonic collision on Refresh tab for resource variable<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=30649">30649</a>: Ant Runtime Classpath Up/Down buttons broken<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=30591">30591</a>: DBCS:After remove all targets, "Run Ant..." will repeat last target<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=29822">29822</a>: Streamline single target case for Ant View<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=30331">30331</a>: [Ant View] Add build files sorts case dependant<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=30318">30318</a>: Planty should be renamed to "Ant Editor"<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=29820">29820</a>: Reduce clutter in Ant View<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=30098">30098</a>: AntSecurityManager throws exception when exiting Eclipse<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=30715">30715</a>: Incorrect string description for ${build_type} variable<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=30420">30420</a>: StringIndexOutOfBoundsException on restart with Ant editor active<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=30744">30744</a>: Activating a target in the Ant view switches view layout<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=30589">30589</a>: DBCS:Clicking "Up" or "Down" make Target lost<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=29318">29318</a>: Two builds at the same time...one starts logging to the DOS console<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=29271">29271</a>: External tools ant output always goes to the console<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=30547">30547</a>: Ant view properties action doesn't handle more than one config<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=30680">30680</a>: "Widget is disposed" setting variable arguments for Ant Build<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=30769">30769</a>: Missing icon for target error node<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=29885">29885</a>: Ant editor (planty) does not handle relative paths nicely<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=29744">29744</a>: [External Tools] refresh ${working_set} does not work<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=30559">30559</a>: ExternalToolsPlugin.log(Throwable) logs no message<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=30770">30770</a>: When things go wrong parsing for the Ant Editor outline<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=30767">30767</a>: NPE on resource changed from AntView<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=30343">30343</a>: Ant Editor outline does not indicate default target<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=24108">24108</a>: Nls external tools<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=26683">26683</a>: Targets tab behavior<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=27325">27325</a>: "activate" terminology<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=29828">29828</a>: Too many preference pages<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=30915">30915</a>: Selected resource tracking fails<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=30932">30932</a>: Restore defaults does not work for color preferences<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=30845">30845</a>: org.eclipse.ui.externaltools.internal.ant.dtd.test.dumper.java<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=30093">30093</a>: Handling bad definitions of extension points<br>
-
-<h1>
-Eclipse Platform Build Notes<br>
-Ant</h1>
-Eclipse SDK Build Jan 28, 2003
-
-<h3>
-Resolved Bugs</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=29878">29878</a>: Chkpii failures for Ant / external tools<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=29857">29857</a>: Open with "Planty"<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=28877">28877</a>: Double clicking active target should run the active target<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=29816">29816</a>: Support "delete" key in the Ant view for active targets<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=30035">30035</a>: NPE running build file in external project<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=29315">29315</a>: AntProgressBuildListener writing to .log on build cancelled<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=29321">29321</a>: Set ANT_HOME does not force you to enter location<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=29249">29249</a>: Ant view updates for resource changes inefficiently<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=27675">27675</a>: Show custom Eclipse tasks / types<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=30083">30083</a>: Adding -logger XmlLogger cause Exception on build finished<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=27627">27627</a>: API review<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=30086">30086</a>: Ant view not updated when project deleted<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=29743">29743</a>: [External Tools] Apply button does not enable in "refresh tab"<br>
-
-<h1>
-Eclipse Platform Build Notes<br>
-Ant</h1>
-Eclipse SDK Build Jan 21, 2003
-
-<h3>
-Resolved Bugs</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=26532">26532</a>: [External Tools] the external tools menu in the run menu<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=25860">25860</a>: Ant runner sets basedir incorrectly<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=26667">26667</a>: External Tool variables are expanded in launch config dialog<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=29504">29504</a>: External Tools' Eclipse variables are disallowed to have text before/after<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=16618">16618</a>: [ExternalTools] Re-launch last External Tool hotkey <br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=26523">26523</a>: NPE in getHyperLink<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=29573">29573</a>: External tool variable scope is too restrictive<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=29672">29672</a>: When external tool builders go bad<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=29152">29152</a>: Migrate extension point schema ownership<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=29148">29148</a>: Contribution of Planty 0.9.1<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=28746">28746</a>: Please sort build targets alphabetically<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=29322">29322</a>: Revert has no effect on Build Options tab<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=29806">29806</a>: Default script name<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=29812">29812</a>: Define placeholder for Ant View<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=29811">29811</a>: Add "Ant View" to top level menu<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=28306">28306</a>: External tool builder not deleted on cancel<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=28577">28577</a>: External tool builder not added<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=28769">28769</a>: New Ant View doesn't gracefully handle missing targets<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=29449">29449</a>: SearchForBuildFilesDialog.searchForBuildFiles optimization<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=29663">29663</a>: Descriptions in the AntView<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=29818">29818</a>: Replace "Go To File" with "Open With ->"<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=3079">3079</a>: [ExternalTools] Clicking on output should open resource<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=27684">27684</a>: Tasks and Types lists need to be sorted<br>
-
-<h1>
-Eclipse Platform Build Notes<br>
-Ant</h1>
-Eclipse SDK Build Jan 14, 2003
-
-<h3>
-Resolved Bugs</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=26688">26688</a>: Rendering of Ant projects in the Ant View<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=27699">27699</a>: Move up/down enabled when no selection and only one target<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=29180">29180</a>: Support double-click in the selection dialog<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=28809">28809</a>: ANT_HOME not set on first run of Ant tool<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=27540">27540</a>: Run Ant vs. Ant View<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=19623">19623</a>: [ExternalTools] Display full command line for external tool<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=29220">29220</a>: Ant view execution order contains extra node<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=29221">29221</a>: Run as Ant does not report anything on some failures<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=24338">24338</a>: Cancelling an Ant run can take a long time<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=21012">21012</a>: [ExternalTools] Cancel tool does not cancel tool<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=28933">28933</a>: Cannot add tasks/types from folder<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=28876">28876</a>: Ant View in M4 should split vertical<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=29269">29269</a>: ClassNotFoundException: TaskLineTracker<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=26978">26978</a>: Ant targets tab shouldn't add all targets by defaultt<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=26882">26882</a>: Need "run for build kinds" UI for project builders<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=28431">28431</a>: Variable expansion is using incorrect path separators<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=28569">28569</a>: Browse workspace dialog needs colon<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=28570">28570</a>: Missing mneumonic for copy button in External Tools builders page<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=28305">28305</a>: Edit properties for Launch Configuration for External tools<br>
-
-<h1>
-Eclipse Platform Build Notes<br>
-Ant</h1>
-Eclipse SDK Build Jan 7, 2003
-
-<h3>
-Resolved Bugs</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=27983">27983</a>: Ant logger does not respect console buffer size<br>
-
-<h1>
-Eclipse Platform Build Notes<br>
-Ant</h1>
-Eclipse SDK Build Dec 17, 2002
-
-<h3>
-Resolved Bugs</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=28276">28276</a>: Should not expose "ant class loader" option to user<br>
-
-<h1>
-Eclipse Platform Build Notes<br>
-Ant</h1>
-Eclipse SDK Build Dec 16, 2002
-
-<h3>
-Resolved Bugs</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=28301">28301</a>: Creation of an External Tool Builder gets name wrong.<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=28306">28306</a>: External tool builder not deleted on cancel<br>
-<h1>
-Eclipse Platform Build Notes<br>
-Ant</h1>
-Eclipse SDK Build Dec 13, 2002
-
-<h3>
-Resolved Bugs</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=27984">27984</a>: Total build time wrong<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=23661">23661</a>: [ExternalTools] Launching Ant on xml file that is in the active editor<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=20581">20581</a>: [ExternalTools] Variables should insert at caret<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=26182">26182</a>: Ant preference page has conflicting mnemonics<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=26200">26200</a>: External tools menu is missing mnemonics<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=27525">27525</a>: Remove All Projects and Remove all build files<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=28052">28052</a>: AntProcessBuildLogger doesn't handle empty locations<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=27804">27804</a>: VariableContextManager and ExternalToolsPlugin#startup<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=28130">28130</a>: 1.3 incompatible compile when target, source set to "1.3" using 1.4.* vm<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=28136">28136</a>: Ant view "Run" button is ambiguous<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=28213">28213</a>: Adding a file to the Ant view that already exists takes way too long<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=26689">26689</a>: navigate from ant view to editor<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=26554">26554</a>: Ant view should update when projects closed/removed<br>
-
-<h1>
-Eclipse Platform Build Notes<br>
-Ant</h1>
-Eclipse SDK Build Dec 10, 2002
-
-<h3>
-Resolved Bugs</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=27328">27328</a>: Search for build file does not remeber last search text<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=27541">27541</a>: Cannot add an Ant External Tool Builder<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=27050">27050</a>: NullBuildLogger no longer needed<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=16574">16574</a>: [ExternalTools] External tool builders should use same set of external tools<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=27101">27101</a>: AntView enhancement<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=27686">27686</a>: Having both Run Ant and Run Ant... in the same menu is problematic<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=27669">27669</a>: Ant view toolbar is misleading<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=27615">27615</a>: Incorrect button enablement on AntClasspathPage<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=22793">22793</a>: [ExternalTools] Ant preference page jar area changes size<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=27814">27814</a>: AntLaunchShortcut refererences internal debug UI class<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=27665">27665</a>: Buildfile hyperlink off by 1<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=27323">27323</a>: can only single-select active targets<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=27700">27700</a>: Ant View: I can activate a target more than once<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=27810">27810</a>: BuilderPropertyPage makes multiple dispatching listeners<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=15405">15405</a>: Make all ANT configuration defined at config level<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=27841">27841</a>: Illegal reference to LaunchGroup and DebugUIPlugin<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=27832">27832</a>: Easy to cut off the "Reuse Ant classloader" option<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=27831">27831</a>: Save changes prompt from classpath tab<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=25649">25649</a>: Add action to add ant project to ant view<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=27505">27505</a>: Ant specific actions in External tools base<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=27865">27865</a>: Can't cancel AntView search<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=27702">27702</a>: IllegalArgumentException in AntView<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=27846">27846</a>: Cannot add new ext tool builer<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=20856">20856</a>: [ExternalTools] Preferences/Ant/Classpath inconsistency<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=27440">27440</a>: Cached classloader misses changes to tasks / types<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=25650">25650</a>: Add action to ant view to search for build files<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=27954">27954</a>: Merge Main and Options tabs<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=27841">27841</a>: Ext tool builders have wrong icon and NPE'd<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=17782">17782</a>: [ExternalTools] Custom tasks not checked for validity<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=26455">26455</a>: -find option not yet implemented<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=27703">27703</a>: Add classpath tab for Ant<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=27776">27776</a>: Don't use the term "Ant Script"<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=27780">27780</a>: Ant Preference page reorganization<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=27856">27856</a>: Description field on ExternalToolsMainTab<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=27964">27964</a>: NoSuchElement exception in AddCustomDialog<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=27956">27956</a>: Create Ant Main tab to limit location selection<br>
-
-<h1>
-Eclipse Platform Build Notes<br>
-Ant</h1>
-Eclipse SDK Build Dec 03, 2002
-
-<h3>
-Resolved Bugs</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=20014">20014</a>: [ExternalTools] Tool location should accept only files<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=26918">26918</a>: Projects with external builders cause NPEs when built in headless mode<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=26671">26671</a>: Ant external tool hangs Eclipse<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=25709">25709</a>: Lists on Targets page of External Tools properties need scrollbars<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=26637">26637</a>: Process timestamp showing as launch configuration property<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=26638">26638</a>: Too much logging to the log<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=26995">26995</a>: Run Ant action should prompt for config<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=26449">26449</a>: pref page: set ANT_HOME 'Browse' button size is unusual<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=27500">27500</a>: Ant tasks do not always have a name<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=25712">25712</a>: external tools tabs missing mneumonics<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=27124">27124</a>: Adjust hyperlink for adorned tasks in Ant output<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=27049">27049</a>: AntProcessBuildLogger does not write to logfile<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=24704">24704</a>: Tasks with the same name can be entered via the pref page<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=27345">27345</a>: "Don't ask again" preference when migrating external tool builders<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=27128">27128</a>: Hyperlinking for Ant tasks does not work on older Ants<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=27141">27141</a>: [External Tools] Unexpected Run Ant dialog behaviour.<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=27531">27531</a>: Browse for Ant home should store last location<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=27157">27157</a>: Two launch histories for external tools<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=27534">27534</a>: Extra runtime classpath entries lost if Ant home specified<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=25500">25500</a>: Add JAR to classpath should default to workspace root<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=13144">13144</a>: [ExternalTools] Ant preference page details<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=27449">27449</a>: External Tools/Ant should honour dialog font<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=27206">27206</a>: Additional ant classpath urls do not show up for adding tasks/types<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=24865">24865</a>: Misc Restricted to Selected Objects in Breakpoint Properties dialog<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=27265">27265</a>: Adornment adjustment is incorrect for long task names.<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=20921">20921</a>: [ExternalTools] Project properties runs autobuild for all projects<br>
-
-<h1>
-Eclipse Platform Build Notes<br>
-Ant</h1>
-Eclipse SDK Build Nov 26, 2002
-
-<h3>
-Resolved Bugs</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=27009">27009</a>: External tool option tab defaults to "run in background"<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=24699">24699</a>: Ant classpath should be separated into two components?<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=26405">26405</a>: AntTargetsTab doesn't save target selection<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=26415">26415</a>: Migrate external tool project builders to use launch configurations<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=26704">26704</a>: Remove External Tools View<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=26705">26705</a>: Remove "ExternalTool" UI code<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=26708">26708</a>: output should be the same as from command line<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=27014">27014</a>: Prompt for argument checkbox should be temporarily removed<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=27033">27033</a>: AntView uses JDK 1.4 method String.split(...)<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=26744">26744</a>: [ExternalTools] Console always opens build file with Text editor<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=26636">26636</a>: Cached Ant classloader not reset with classpath change<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=16849">16849</a>: [ExternalTools] Ant does not respect output level preference<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=26948">26948</a>: Requesting invalid target execution causes NPE in ProgressBuildListener<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=26042">26042</a>: Can't run Ant script with new Ant on MacOS X<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=26606">26606</a>: Ant errors not showing in console<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=19520">19520</a>: [ExternalTools] Performance suffers with console log ouput enabled<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=22402">22402</a>: [ExternalTools] Port fix for handling spaces in arguments...<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=26192">26192</a>: NPE from ant targets tab<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=26729">26729</a>: External tools menu does not update<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=26714">26714</a>: Ant loses preferences<br>
-
-<h1>
-Eclipse Platform Build Notes<br>
-Ant</h1>
-Eclipse SDK Build Nov 19, 2002
-
-<h3>
-Resolved Bugs</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=26112">26112</a>: "Run Ant..." implies dialog<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=6498">6498</a>: [ExternalTools] selecting and building individual targets in ANT scripts<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=18971">18971</a>: [ExternalTools] Using external tool configs in other contexts<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=19450">19450</a>: [ExternalTools] menu should limit itself to the first n tools (perhaps n = 20)<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=21809">21809</a>: Let user specify installation directory of Ant<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=24718">24718</a>: Run Ant should be programmatically available<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=25059">25059</a>: [ExternalTools] Refresh Scopes dialog should be wizard<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=25062">25062</a>: Support execution of ant tasks in a seperate thread<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=25821">25821</a>: External Tool] Error Message "External Tool runner internal error"<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=26061">26061</a>: Changes to Ant classpath don't persist<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=26418">26418</a>: Remove "launch configuration mode" as an option in external tools<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=26629">26629</a>: Error message has reversed arguments<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=19450">19450</a>: [ExternalTools] menu should limit itself to the first n tools (perhaps n = 20)<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=22738">22738</a>: [ExternalTools] Tool arguments should be a wizard<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=13275">13275</a>: [ExternalTools] Ant Wizard should not "always" be modal<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=20857">20857</a>: Problems with Ant classpath not being picked up<br>
-
-<h1>
-Eclipse Platform Build Notes<br>
-Ant</h1>
-Eclipse SDK Build Nov 13, 2002
-
-<h3>
-Resolved Bugs</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=26050">26050</a>: Unnamed projects cause NPE in Ant View<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=16982">16982</a>: [ExternalTools] Console font setting should be workbench text font<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=25592">25592</a>: [External Tools] Log console should have autoscroll<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=18478">18478</a>: [External Tools] Minor: output not always in right order<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=22727">22727</a>: [External Tools] Program tool output not shown on log console<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=25762">25762</a>: Problem starting JUnit plugin tests<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=25746">25746</a>: Runtime exec support should be in debug core<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=25877">25877</a>: should save all files before execute ant script<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=23662">23662</a>: [ExternalTools] External tools history manipulation<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=25907">25907</a>: [ExternalTools] ExternalToolMenuDelegate leaking menus<br>
-<h1>
-Eclipse Platform Build Notes<br>
-Ant</h1>
-Eclipse SDK Build Nov 12, 2002
-
-<h3>
-Resolved Bugs</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=25759">25759</a>: NPE trying to open the antview preferences page<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=22730">22730</a>: [ExternalTools] Capture output<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=25397">25397</a>: AntPage flashes when resized<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=25493">25493</a>: NPE if default target does not exist in external tool builder ant file<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=25648">25648</a>: Add remove action to ant view<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=25468">25468</a>: Backwards compatibility with Ant 1.4.1<br>
-
-<h1>
-Eclipse Platform Build Notes<br>
-Ant</h1>
-Eclipse SDK Build Nov 05, 2002
-
-<h3>
-Resolved Bugs</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=25509">25509</a>: NPE from InternalAntRunner<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=25639">25639</a>: Double click in tasks and types tabs should invoke edit<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=25656">25656</a>: [ant] Cannot add multiple Jars to ant classpath at the same time<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=25693">25693</a>: Implement support for the -diagnostics option<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=25647">25647</a>: Add Ant View to Eclipse<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=25698">25698</a>: Global properties<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=25699">25699</a>: Global property files<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=25702">25702</a>: [External Tools] Restore defaults does not work<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=24525">24525</a>: Active targets not shown in ant tool property page<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=24578">24578</a>: Can't add variable to tool arguments<br>
-
-<h1>
-Eclipse Platform Build Notes<br>
-Ant</h1>
-Eclipse SDK Build Oct 29, 2002
-
-<h3>
-Resolved Bugs</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=24847">24847</a>: duplicate options not handled the same as cmd line Ant<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=25133">25133</a>: Implement support for the 1.5.1 feature: -propertyfile<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=25213">25213</a>: -propertyfile should not abort build if the property file is not found<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=24580">24580</a>: Expose more information in TargetInfo<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=17803">17803</a>: [ExternalTools] AntPage table should scroll horizontally<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=18294">18294</a>: [ExternalTools] Ant preference page: classpath list too wide<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=24383">24383</a>: Update the printUsage of InternalAntRunner<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=24824">24824</a>: DefaultLogger should be used for headless Ant<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=20576">20576</a>: [ExternalTools] Should specify order of jars on classpath<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=24234">24234</a>: Ant test suite<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=24318">24318</a>: Move to Ant 1.5.1<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=25134">25134</a>: Implement support for the 1.5.1 feature: -inputhandler<br>
-
-<h1>
-Eclipse Platform Build Notes<br>
-Ant</h1>
-Eclipse SDK Build Oct 22, 2002
-
-<h3>
-Resolved Bugs</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=24756">24756</a>: -projecthelp indicates BUILD SUCCESSFUL<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=24831">24831</a>: Same URL multiple times in the AntClassLoader<br>
-
-
-<h1>
-Eclipse Platform Build Notes<br>
-Ant</h1>
-Eclipse SDK Build Oct 16, 2002
-
-<h3>
-Resolved Bugs</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=15821">15821</a>: [ExternalTools] Minor: Ant console "steals" focus<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=22400">22400</a>: [ExternalTools] Run Ant... action displayed for invalid resources (build I0813)<br>
-
-<h1>
-Eclipse Platform Build Notes<br>
-Ant</h1>
-Eclipse SDK Build Oct 15, 2002
-
-<h3>
-Resolved Bugs</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=6020">6020</a>: Tasks calling System.exit crash Eclipse<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=23651">23651</a>: [doc] AntTasks and AntTypes refer to non-existant API<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=23653">23653</a>: [doc] Extra Ant classpath entries extension<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=24459">24459</a>: AntCorePlugin startup<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=19899">19899</a>: If the user never changes the Ant classpath, it should always be computed<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=23917">23917</a>: logfile not created in the correct location when path not fully specified<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=24587">24587</a>: Project properties not set properly if no arguments passed<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=24696">24696</a>: ExternalTools antrunner.jar is still in the HEAD stream<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=24418">24418</a>: Option without necessary corresponding argument not handled correctly<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=24594">24594</a>: Targets specified as arguments not recognized<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=23995">23995</a>: deadlock while running build.xml<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=24733">24733</a>: Help text is wrong<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=24710">24710</a>: Custom ant task classes not found<br>
-
-<h1>
-Eclipse Platform Build Notes<br>
-Ant</h1>
-Eclipse SDK Build Oct 09, 2002
-
-<h3>
-Resolved Bugs</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=24527">24527</a>: java.io.FileNotFoundException occurs when invoking AntRunner<br>
-
-<h1>
-Eclipse Platform Build Notes<br>
-Ant</h1>
-Eclipse SDK Build Oct 08, 2002
-
-<h3>
-Resolved Bugs</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=20557">20557</a>: Running an empty ant script takes about 2 seconds<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=22459">22459</a>: AntRunner prints stack trace on OperationCanceledException<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=23383">23383</a>: API: Add @since tags<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=24290">24290</a>: Ant preferences are only saved at shutdown<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=23584">23584</a>: Java should be capitalized<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=17484">17484</a>: [ExternalTools] Adding tasks from JARs in the Ant Preference Page<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=23664">23664</a>: Better reporting of errors when reading Ant build file<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=24415">24415</a>: Running an Ant script with console logging turned off writes to OS console<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=24452">24452</a>: Key clashes within extension point definitions<br>
-
-<h3>
-Problem Reports Closed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=23350">23350</a>: Possible NPE<br>
-
-<h1>
-Eclipse Platform Build Notes<br>
-Ant</h1>
-Eclipse SDK Build Oct 01, 2002
-
-<h3>
-Resolved Bugs</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=23482">23482</a>: Rework the Core Ant code to be able to use the NLS tools<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=14180">14180</a>: Ant -help not function<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=19801">19801</a>: AntCorePreferences, Type, Tasks could be a public class<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=23881">23881</a>: Same error logged three times<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=23913">23913</a>: Issues with InternalAntRunner#printHelp(Project)<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=22714">22714</a>: Arguments line lose spaces when printed to console<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=23132">23132</a>: -logfile option for ant doesnt seem to work<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=16740">16740</a>: [ExternalTools] Irrelevant stack trace for errors in Ant build file<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=19838">19838</a>: Error codes for Ant Core should be public<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=21478">21478</a>: Insufficient Ant activation error reporting<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=23658">23658</a>: Build file is not logged to log console view<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=22465">22465</a>: Wrong ant script causes fatal error written to console<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=23924">23924</a>: handling of incorrect / unrecognized arguments<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=23720">23720</a>: [doc] Extension point listing is incorrect<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=22702">22702</a>: XmlLogger not working?<br>
-
-<h3>
-Problem Reports Closed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=21479">21479</a>: Ant classpath refers to old 'xerces.jar'<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=23832">23832</a>: Update Ant pages on dev.eclipse.org<br>
-
-</body>
-</html>
diff --git a/ant/org.eclipse.ant.core/schema/antTasks.exsd b/ant/org.eclipse.ant.core/schema/antTasks.exsd
deleted file mode 100644
index 9f236b2..0000000
--- a/ant/org.eclipse.ant.core/schema/antTasks.exsd
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.ant.core">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.ant.core" id="antTasks" name="Ant Tasks"/>
- </appInfo>
- <documentation>
- Allows plug-ins to define arbitrary Ant tasks for use
-by the Ant infrastructure. The standard Ant infrastructure
-allows for the addition of arbitrary tasks.
-Unfortunately, it is unlikely that the Ant Core plug-in
-would have the classes required by these tasks on its
-classpath (or that of any of its prerequisites).
-To address this, clients should define an extension
-which plugs into this extension-point and maps a
-task name onto a class. The Ant plug-in can then
-request that the declaring plug-in load the specified class.
- </documentation>
-</annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="antTask" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
- a fully qualified identifier of the target extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
- an optional identifier of the extension instance
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
- an optional name of the extension instance
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="antTask">
- <annotation>
- <appInfo>
- <meta.element labelAttribute="name"/>
- </appInfo>
- </annotation>
- <complexType>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
- name of the task to be defined
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- the fully qualified name of a Java class implementing
-the task. Generally this class must be a subclass of
-<samp>org.apache.tools.ant.Task</samp>.
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.apache.tools.ant.Task"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="library" type="string" use="required">
- <annotation>
- <documentation>
- a path relative to the plug-in install location
-for the library containing the task.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="headless" type="string" use="optional">
- <annotation>
- <documentation>
- indicates whether this task is suitable for use in a "headless" Ant environment. If running headless and the attribute is "false",
- the task will not be loaded or defined. As well, the plugin class loader will not be added as a parent classloader to the Ant classloader.
- The implied value is true, when not specified.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- The following is an example of an Ant tasks extension point:
-<p>
-<pre>
- <extension point="org.eclipse.ant.core.antTasks">
- <antTask name="coolTask" class="com.example.CoolTask"/>
- </extension>
-</pre>
-</p>
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- The platform itself supplies a number of tasks including
-eclipse.incrementalBuild and eclipse.refreshLocal.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- <a href="hglegal.htm"><img SRC="ngibmcpy.gif" ALT="Copyright IBM Corp. 2000, 2003. All Rights Reserved." BORDER=0 height=12 width=195></a>
- </documentation>
- </annotation>
-
-</schema>
diff --git a/ant/org.eclipse.ant.core/schema/antTypes.exsd b/ant/org.eclipse.ant.core/schema/antTypes.exsd
deleted file mode 100644
index 345b38f..0000000
--- a/ant/org.eclipse.ant.core/schema/antTypes.exsd
+++ /dev/null
@@ -1,123 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.ant.core">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.ant.core" id="antTypes" name="Ant Types"/>
- </appInfo>
- <documentation>
- Allows plug-ins to define arbitrary Ant datatypes for
-use by the Ant infrastructure. The standard Ant
-infrastructure allows for the addition of arbitrary
-datatypes. Unfortunately, it is unlikely that the
-Ant Core plug-in would have the classes required
-by these datatypes on its classpath (or that of any
-of its prerequisites). To address this, clients
-should define an extension which plugs into this
-extension-point and maps a datatype name onto a class.
-The Ant plug-in can then request that the declaring
-plug-in load the specified class.
- </documentation>
-</annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="antType" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
- a fully qualified identifier of the target extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
- an optional identifier of the extension instance
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
- an optional name of the extension instance
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="antType">
- <annotation>
- <appInfo>
- <meta.element labelAttribute="name"/>
- </appInfo>
- </annotation>
- <complexType>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
- name of the type to be defined
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- the fully qualified name of a Java class implementing
-the datatype. Generally this class must be a subclass of
-<samp>org.apache.tools.ant.types.DataType</samp>.
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.apache.tools.ant.types.DataType"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="library" type="string" use="required">
- <annotation>
- <documentation>
- a path relative to the plug-in install location
-for the library containing the type.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="headless" type="string" use="optional">
- <annotation>
- <documentation>
- indicates whether this type is suitable for use in a "headless" Ant environment. If running headless and the attribute is "false",
- the type will not be loaded or defined. As well, the plugin class loader will not be added as a parent classloader to the Ant classloader.
- The implied value is true, when not specified.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- The following is an example of an Ant types extension point:
-<p>
-<pre>
- <extension point="org.eclipse.ant.core.antTypes">
- <antType name="coolType" class="com.example.CoolType"/>
- </extension>
-</pre>
-</p>
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- <a href="hglegal.htm"><img SRC="ngibmcpy.gif" ALT="Copyright IBM Corp. 2000, 2003. All Rights Reserved." BORDER=0 height=12 width=195></a>
- </documentation>
- </annotation>
-
-</schema>
diff --git a/ant/org.eclipse.ant.core/schema/extraClasspathEntries.exsd b/ant/org.eclipse.ant.core/schema/extraClasspathEntries.exsd
deleted file mode 100644
index 323465b..0000000
--- a/ant/org.eclipse.ant.core/schema/extraClasspathEntries.exsd
+++ /dev/null
@@ -1,101 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.ant.core">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.ant.core" id="extraClasspathEntries" name="Extra Ant Classpath Entries"/>
- </appInfo>
- <documentation>
- Allows plug-ins to define arbitrary JARs for use by the Ant infrastructure.
-These JARs are put into the Ant classpath at runtime. Besides
-the JAR, the plug-in classloader of the plug-in providing the
-JAR is also added to the classpath.
- </documentation>
-</annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="extraClasspathEntry" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
- a fully qualified identifier of the target extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
- an optional identifier of the extension instance
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
- an optional name of the extension instance
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="extraClasspathEntry">
- <complexType>
- <attribute name="library" type="string" use="required">
- <annotation>
- <documentation>
- a path relative to the plug-in install location for the library.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="headless" type="string" use="optional">
- <annotation>
- <documentation>
- indicates whether this extra classpath entry is suitable for use in a "headless" Ant environment. If running headless and the attribute is "false",
- this entry will not be added to the Ant classpath. As well, the plugin class loader will not be added as a parent classloader to the Ant classloader.
- The implied value is true, when not specified.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- The following is an example of an extra classpath entries extension point:
-
-<p>
-<pre>
- <extension point="org.eclipse.ant.core.extraClasspathEntries">
- <extraClasspathEntry library="myExtraLibrary.jar"/>
- </extension>
-</pre>
-</p>
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- The platform itself supplies an Ant support jar (antsupportlib.jar).
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- <a href="hglegal.htm"><img SRC="ngibmcpy.gif" ALT="Copyright IBM Corp. 2000, 2003. All Rights Reserved." BORDER=0 height=12 width=195></a>
- </documentation>
- </annotation>
-
-</schema>
diff --git a/ant/org.eclipse.ant.core/scripts/buildExtraJAR.xml b/ant/org.eclipse.ant.core/scripts/buildExtraJAR.xml
deleted file mode 100644
index e8f0215..0000000
--- a/ant/org.eclipse.ant.core/scripts/buildExtraJAR.xml
+++ /dev/null
@@ -1,69 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project name="Build Ant support JAR" default="main" basedir="..">
-
- <property name="bootclasspath" value=""/>
-
- <target name="main">
- <condition property="fullBuild">
- <equals arg1="${buildType}" arg2="full"/>
- </condition>
- <antcall target="build"/>
- </target>
-
- <target name="build" if="fullBuild">
- <antcall target="clean"/>
- <antcall target="lib/antsupportlib.jar"/>
- <antcall target="refresh"/>
- </target>
-
- <target name="init" depends="properties">
- <property name="plugin" value="org.eclipse.ant.core"/>
- <property name="version.suffix" value="_2.1.0"/>
- <property name="full.name" value="${plugin}${version.suffix}"/>
- <property name="temp.folder" value="${basedir}/temp.folder"/>
- <property name="plugin.destination" value="${basedir}"/>
- <property name="build.result.folder" value="${basedir}"/>
- </target>
-
- <target name="properties" if="eclipse.running">
- <property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
- </target>
-
- <target name="lib/antsupportlib.jar" depends="init">
- <property name="destdir" value="${temp.folder}/lib/antsupportlib.jar.bin"/>
- <delete dir="${temp.folder}/lib/antsupportlib.jar.bin"/>
- <mkdir dir="${temp.folder}/lib/antsupportlib.jar.bin"/>
- <!-- compile the source code -->
- <javac target="1.3" source="1.3" destdir="${temp.folder}/lib/antsupportlib.jar.bin"
- failonerror="false"
- verbose="false"
- debug="on"
- includeAntRuntime="no"
- bootclasspath="${bootclasspath}"
- classpath="${basedir}/../org.eclipse.core.runtime/runtime.jar;
- ${basedir}/../org.apache.ant/ant.jar;
- ${basedir}/../org.apache.xerces/xercesImpl.jar;
- ${basedir}/../org.apache.xerces/xmlParserAPIs.jar;
- ${basedir}/bin;
- ${basedir}/../org.eclipse.core.boot/boot.jar">
- <src path="src_ant/"/>
- </javac>
- <!-- copy necessary resources -->
- <copy todir="${temp.folder}/lib/antsupportlib.jar.bin">
- <fileset dir="src_ant/" excludes="**/*.java"/>
- </copy>
- <mkdir dir="${build.result.folder}/lib"/>
- <jar jarfile="${build.result.folder}/lib/antsupportlib.jar" basedir="${temp.folder}/lib/antsupportlib.jar.bin"/>
- <delete dir="${temp.folder}"/>
- </target>
-
- <target name="clean" depends="init">
- <delete file="${build.result.folder}/lib/antsupportlib.jar"/>
- <delete dir="${temp.folder}"/>
- </target>
-
- <target name="refresh" depends="init" if="eclipse.running">
- <eclipse.refreshLocal resource="${plugin}" depth="infinite"/>
- </target>
-
-</project>
diff --git a/ant/org.eclipse.ant.core/scripts/exportplugin.xml b/ant/org.eclipse.ant.core/scripts/exportplugin.xml
deleted file mode 100644
index 323bc5a..0000000
--- a/ant/org.eclipse.ant.core/scripts/exportplugin.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<!-- Export a jar of .class files for the org.eclipse.ant.core Eclipse plug-in
- along with other important plugin files to the "plugin-export" subdirectory
- of the target Eclipse installation -->
-<project name="Export ant.core" default="export" basedir="..">
-
- <!-- Set the timestamp and important properties -->
- <target name="init">
- <tstamp/>
- <property name="destdir" value="../../plugin-export" />
- <property name="dest" value="${destdir}/org.eclipse.ant.core_2.1.0" />
- </target>
-
- <!-- Create the jar of .class files, and copy other important files to export dir -->
- <target name="export" depends="init">
- <mkdir dir="${destdir}" />
- <delete dir="${dest}" />
- <mkdir dir="${dest}" />
- <delete dir="${dest}/lib"/>
- <mkdir dir="${dest}/lib"/>
- <jar jarfile="${dest}/antsupport.jar">
- <fileset dir="bin">
- <exclude name="org/eclipse/ant/internal/core/ant/*"/>
- </fileset>
- </jar>
- <!-- Create the source zip -->
- <zip zipfile="${dest}/antsupportsrc.zip">
- <fileset dir="src"/>
- </zip>
- <copy file="plugin.xml" todir="${dest}"/>
- <copy file="plugin.properties" todir="${dest}"/>
- <copy file=".classpath" todir="${dest}"/>
- <copy file=".options" todir="${dest}"/>
- <ant antfile="scripts/buildExtraJAR.xml" target="build"/>
- <copy file="lib/antsupportlib.jar" todir="${dest}/lib"/>
- </target>
-
-</project>
diff --git a/ant/org.eclipse.ant.core/scripts/updateTarget.xml b/ant/org.eclipse.ant.core/scripts/updateTarget.xml
deleted file mode 100644
index 9ee4aa8..0000000
--- a/ant/org.eclipse.ant.core/scripts/updateTarget.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-<!--
- For use in development of the Ant core plugin
- This script can be used to update a target for testing/debugging
- Export a jar of .class files for the org.eclipse.ant.core Eclipse plugin
- along with other important plugin files to the "plugin-export" subdirectory
- of the target Eclipse installation
- As well the export of the plugin is copied to a target installation.
- -->
-<project name="Update target" default="export" basedir="..">
-
- <!-- Set the timestamp and important properties -->
- <target name="init">
- <tstamp/>
- <property name="bootclasspath" value=""/>
- <property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
- <property name="destdir" value="../../plugin-export" />
- <property name="pluginName" value= "org.eclipse.ant.core_2.1.0"/>
- <property name="destBin" value="${destdir}/${pluginName}" />
- <property name="destSrc" value="${destdir}/org.eclipse.platform.source/src/org.eclipse.ant.core_2.1.0" />
- <property name="temp.folder" value="${destdir}/temp.folder"/>
-
- <property name="currentBuild" value="../../Debugger/Ant/eclipse"/>
- <property name="currentBuildPlugins" value="${currentBuild}/plugins/${pluginName}"/>
- </target>
-
- <!-- Create the jar of .class files, and copy other important files to export dir -->
- <target name="export" depends="init">
- <mkdir dir="${destdir}" />
- <delete dir="${destBin}" />
- <mkdir dir="${destBin}" />
- <delete dir="${destSrc}" />
- <mkdir dir="${destSrc}" />
- <delete dir="${destBin}/lib" />
- <jar
- jarfile="${destBin}/antsupport.jar"
- basedir="bin"
- excludes="bin/org/eclipse/ant/internal/core/ant"
- />
- <!-- Create the source zip -->
- <zip zipfile="${destSrc}/antsuppportsrc.zip">
- <fileset dir="src"/>
- </zip>
- <copy file="plugin.xml" todir="${destBin}"/>
- <copy file="plugin.properties" todir="${destBin}"/>
- <copy file="about.html" todir="${destBin}"/>
- <copy file=".classpath" todir="${destBin}"/>
- <copy file=".options" todir="${destBin}"/>
-
- <delete dir="${temp.folder}/lib/antsupportlib.jar.bin"/>
- <mkdir dir="${temp.folder}/lib/antsupportlib.jar.bin"/>
- <!-- compile the source code -->
- <javac target="1.3" source="1.3" destdir="${temp.folder}/lib/antsupportlib.jar.bin" failonerror="false" verbose="false" debug="on" includeAntRuntime="no" bootclasspath="${bootclasspath}" classpath="${basedir}/../org.eclipse.core.runtime/runtime.jar;${basedir}/../org.apache.ant/ant.jar;${basedir}/../org.apache.xerces/xercesImpl.jar;${basedir}/../org.apache.xerces/xmlParserAPIs.jar;${basedir}/bin;${basedir}/../org.eclipse.core.boot/boot.jar;">
- <src path="src_ant/"/>
- </javac>
- <!-- copy necessary resources -->
- <copy todir="${temp.folder}/lib/antsupportlib.jar.bin">
- <fileset dir="src_ant/" excludes="**/*.java"/>
- </copy>
- <mkdir dir="${destBin}/lib"/>
- <jar jarfile="${destBin}/lib/antsupportlib.jar" basedir="${temp.folder}/lib/antsupportlib.jar.bin"/>
- <delete dir="${temp.folder}"/>
-
- </target>
-
- <target name="copy" depends="init">
- <copy todir="${currentBuildPlugins}">
- <fileset dir="${destBin}"/>
- </copy>
- </target>
-</project>
diff --git a/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/AntCorePlugin.java b/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/AntCorePlugin.java
deleted file mode 100644
index 9c96ef0..0000000
--- a/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/AntCorePlugin.java
+++ /dev/null
@@ -1,207 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.core;
-
-
-import java.net.URL;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.ant.internal.core.AntClassLoader;
-import org.eclipse.core.runtime.*;
-
-/**
- * The plug-in runtime class for the Ant Core plug-in.
- */
-public class AntCorePlugin extends Plugin {
-
- /**
- * Status code indicating an unexpected internal error.
- * @since 2.1
- */
- public static final int INTERNAL_ERROR = 120;
-
- /**
- * The single instance of this plug-in runtime class.
- */
- private static AntCorePlugin plugin;
-
- /**
- * The preferences class for this plugin.
- */
- private AntCorePreferences preferences;
-
- /**
- * Unique identifier constant (value <code>"org.eclipse.ant.core"</code>)
- * for the Ant Core plug-in.
- */
- public static final String PI_ANTCORE = "org.eclipse.ant.core"; //$NON-NLS-1$
-
- /**
- * Simple identifier constant (value <code>"antTasks"</code>)
- * for the Ant tasks extension point.
- */
- public static final String PT_TASKS = "antTasks"; //$NON-NLS-1$
-
- /**
- * Simple identifier constant (value <code>"extraClasspathEntries"</code>)
- * for the extra classpath entries extension point.
- */
- public static final String PT_EXTRA_CLASSPATH = "extraClasspathEntries"; //$NON-NLS-1$
-
- /**
- * Simple identifier constant (value <code>"antTypes"</code>)
- * for the Ant types extension point.
- */
- public static final String PT_TYPES = "antTypes"; //$NON-NLS-1$
-
- /**
- * Simple identifier constant (value <code>"class"</code>)
- * of a tag that appears in Ant extensions.
- */
- public static final String CLASS = "class"; //$NON-NLS-1$
-
- /**
- * Simple identifier constant (value <code>"name"</code>)
- * of a tag that appears in Ant extensions.
- */
- public static final String NAME = "name"; //$NON-NLS-1$
-
- /**
- * Simple identifier constant (value <code>"library"</code>)
- * of a tag that appears in Ant extensions.
- */
- public static final String LIBRARY = "library"; //$NON-NLS-1$
-
- /**
- * Simple identifier constant (value <code>"headless"</code>) of a tag
- * that appears in Ant extensions.
- * @since 2.1
- */
- public static final String HEADLESS = "headless"; //$NON-NLS-1$
-
- /**
- * Key to access the <code>IProgressMonitor</code> reference. When a
- * progress monitor is passed to the <code>AntRunner.run(IProgressMonitor)</code>
- * method, the object is available as a reference for the current
- * Ant project.
- */
- public static final String ECLIPSE_PROGRESS_MONITOR = "eclipse.progress.monitor"; //$NON-NLS-1$
-
- /**
- * Status code indicating an error occurred running a build.
- * @since 2.1
- */
- public static final int ERROR_RUNNING_BUILD = 1;
-
- /**
- * Status code indicating an error occurred due to a malformed URL.
- * @since 2.1
- */
- public static final int ERROR_MALFORMED_URL = 2;
-
- /**
- * Status code indicating an error occurred as a library was not specified
- * @since 2.1
- */
- public static final int ERROR_LIBRARY_NOT_SPECIFIED = 3;
-
- /**
- * Constructs an instance of this plug-in runtime class.
- * <p>
- * An instance of this plug-in runtime class is automatically created
- * when the facilities provided by the Ant Core plug-in are required.
- * <b>Clients must never explicitly instantiate a plug-in runtime class.</b>
- * </p>
- *
- * @param pluginDescriptor the plug-in descriptor for the
- * Ant Core plug-in
- */
- public AntCorePlugin(IPluginDescriptor descriptor) {
- super(descriptor);
- plugin = this;
- }
-
- /**
- * @see Plugin#shutdown()
- */
- public void shutdown() throws CoreException {
- if (preferences == null) {
- return;
- }
- preferences.updatePluginPreferences();
- savePluginPreferences();
- }
-
- /**
- * Given an extension point name, extract its extensions and return them
- * as a List.
- */
- private List extractExtensions(String point) {
- IExtensionPoint extensionPoint = getDescriptor().getExtensionPoint(point);
- if (extensionPoint == null) {
- return null;
- }
- IConfigurationElement[] extensions = extensionPoint.getConfigurationElements();
- return Arrays.asList(extensions);
- }
-
- /**
- * Returns an object representing this plug-in's preferences.
- *
- * @return the Ant core object representing the preferences for this plug-in.
- */
- public AntCorePreferences getPreferences() {
- if (preferences == null) {
- preferences = new AntCorePreferences(extractExtensions(PT_TASKS), extractExtensions(PT_EXTRA_CLASSPATH), extractExtensions(PT_TYPES), false);
- }
- return preferences;
- }
-
- /**
- * Set this plug-in's preferences for running headless.
- */
- protected void setRunningHeadless() {
- preferences = new AntCorePreferences(extractExtensions(PT_TASKS), extractExtensions(PT_EXTRA_CLASSPATH), extractExtensions(PT_TYPES), true);
- }
-
- /**
- * Returns this plug-in instance.
- *
- * @return the single instance of this plug-in runtime class
- */
- public static AntCorePlugin getPlugin() {
- return plugin;
- }
-
- /**
- * Returns a new class loader to use when executing Ant builds.
- *
- * @return the new class loader
- */
- protected ClassLoader getNewClassLoader() {
- AntCorePreferences preferences = getPreferences();
- URL[] urls = preferences.getURLs();
- ClassLoader[] pluginLoaders = preferences.getPluginClassLoaders();
- return new AntClassLoader(urls, pluginLoaders);
- }
-
- /**
- * Logs the specified throwable with this plug-in's log.
- *
- * @param t throwable to log
- * @since 2.1
- */
- public static void log(Throwable t) {
- IStatus status= new Status(IStatus.ERROR, PI_ANTCORE, INTERNAL_ERROR, "Error logged from Ant Core: ", t); //$NON-NLS-1$
- getPlugin().getLog().log(status);
- }
-}
diff --git a/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/AntCorePreferences.java b/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/AntCorePreferences.java
deleted file mode 100644
index 9695b25..0000000
--- a/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/AntCorePreferences.java
+++ /dev/null
@@ -1,960 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.core;
-
-
-import java.io.File;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.text.MessageFormat;
-import java.util.*;
-
-import org.eclipse.ant.internal.core.IAntCoreConstants;
-import org.eclipse.ant.internal.core.InternalCoreAntMessages;
-import org.eclipse.core.boot.BootLoader;
-import org.eclipse.core.internal.plugins.PluginClassLoader;
-import org.eclipse.core.runtime.*;
-
-
-/**
- * Represents the Ant Core plug-in's preferences providing utilities for
- * extracting, changing and updating the underlying preferences.
- * @since 2.1
- */
-public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.IPropertyChangeListener {
-
- protected List defaultTasks;
- protected List defaultTypes;
- protected List extraClasspathURLs;
- protected URL[] defaultAntURLs;
-
- protected Task[] customTasks;
- protected Type[] customTypes;
- protected URL[] antURLs;
- protected URL[] customURLs;
- protected Property[] customProperties;
- protected String[] customPropertyFiles;
-
- protected List pluginClassLoaders;
-
- private ClassLoader[] orderedPluginClassLoaders;
-
- private String antHome;
-
- private boolean runningHeadless= false;
-
- protected AntCorePreferences(List defaultTasks, List defaultExtraClasspath, List defaultTypes, boolean headless) {
- runningHeadless= headless;
- initializePluginClassLoaders();
- extraClasspathURLs = new ArrayList(20);
- this.defaultTasks = computeDefaultTasks(defaultTasks);
- this.defaultTypes = computeDefaultTypes(defaultTypes);
- computeDefaultExtraClasspathEntries(defaultExtraClasspath);
- restoreCustomObjects();
- }
-
- /**
- * When a preference changes, update the in-memory cache of the preference.
- * @see org.eclipse.core.runtime.Preferences.IPropertyChangeListener#propertyChange(org.eclipse.core.runtime.Preferences.PropertyChangeEvent)
- */
- public void propertyChange(Preferences.PropertyChangeEvent event) {
- Preferences prefs = AntCorePlugin.getPlugin().getPluginPreferences();
- String property= event.getProperty();
- if (property.equals(IAntCoreConstants.PREFERENCE_TASKS) || property.startsWith(IAntCoreConstants.PREFIX_TASK)) {
- restoreTasks(prefs);
- } else if (property.equals(IAntCoreConstants.PREFERENCE_TYPES) || property.startsWith(IAntCoreConstants.PREFIX_TYPE)) {
- restoreTypes(prefs);
- } else if (property.equals(IAntCoreConstants.PREFERENCE_ANT_URLS)) {
- restoreAntURLs(prefs);
- } else if (property.equals(IAntCoreConstants.PREFERENCE_URLS)) {
- restoreCustomURLs(prefs);
- } else if (property.equals(IAntCoreConstants.PREFERENCE_ANT_HOME)) {
- restoreAntHome(prefs);
- } else if (property.equals(IAntCoreConstants.PREFERENCE_PROPERTIES) || property.startsWith(IAntCoreConstants.PREFIX_PROPERTY)) {
- restoreCustomProperties(prefs);
- } else if (property.equals(IAntCoreConstants.PREFERENCE_PROPERTY_FILES)) {
- restoreCustomPropertyFiles(prefs);
- }
- }
-
- /**
- * Restores the in-memory model of the preferences from the preference store
- */
- private void restoreCustomObjects() {
- Preferences prefs = AntCorePlugin.getPlugin().getPluginPreferences();
- restoreTasks(prefs);
- restoreTypes(prefs);
- restoreAntURLs(prefs);
- restoreCustomURLs(prefs);
- restoreAntHome(prefs);
- restoreCustomProperties(prefs);
- restoreCustomPropertyFiles(prefs);
- prefs.addPropertyChangeListener(this);
- }
-
- private void restoreTasks(Preferences prefs) {
- String tasks = prefs.getString(IAntCoreConstants.PREFERENCE_TASKS);
- if (tasks.equals("")) { //$NON-NLS-1$
- customTasks = new Task[0];
- } else {
- customTasks = extractTasks(prefs, getArrayFromString(tasks));
- }
- }
-
- private void restoreTypes(Preferences prefs) {
- String types = prefs.getString(IAntCoreConstants.PREFERENCE_TYPES);
- if (types.equals("")) {//$NON-NLS-1$
- customTypes = new Type[0];
- } else {
- customTypes = extractTypes(prefs, getArrayFromString(types));
- }
- }
-
- private void restoreAntURLs(Preferences prefs) {
- String urls = prefs.getString(IAntCoreConstants.PREFERENCE_ANT_URLS);
- if (urls.equals("")) {//$NON-NLS-1$
- antURLs = getDefaultAntURLs();
- } else {
- antURLs = extractURLs(getArrayFromString(urls));
- }
- }
-
- private void restoreCustomURLs(Preferences prefs) {
- String urls = prefs.getString(IAntCoreConstants.PREFERENCE_URLS);
- if (urls.equals("")) {//$NON-NLS-1$
- customURLs = new URL[0];
- } else {
- customURLs = extractURLs(getArrayFromString(urls));
- }
- }
-
- private void restoreAntHome(Preferences prefs) {
- antHome= prefs.getString(IAntCoreConstants.PREFERENCE_ANT_HOME);
- }
-
- private void restoreCustomProperties(Preferences prefs) {
- String properties = prefs.getString(IAntCoreConstants.PREFERENCE_PROPERTIES);
- if (properties.equals("")) {//$NON-NLS-1$
- customProperties = new Property[0];
- } else {
- customProperties = extractProperties(prefs, getArrayFromString(properties));
- }
- }
-
- private void restoreCustomPropertyFiles(Preferences prefs) {
- String propertyFiles= prefs.getString(IAntCoreConstants.PREFERENCE_PROPERTY_FILES);
- if (propertyFiles.equals("")) { //$NON-NLS-1$
- customPropertyFiles= new String[0];
- } else {
- customPropertyFiles= getArrayFromString(propertyFiles);
- }
- }
-
- protected Task[] extractTasks(Preferences prefs, String[] tasks) {
- List result = new ArrayList(tasks.length);
- for (int i = 0; i < tasks.length; i++) {
- try {
- String taskName = tasks[i];
- String[] values = getArrayFromString(prefs.getString(IAntCoreConstants.PREFIX_TASK + taskName));
- if (values.length < 2) {
- continue;
- }
- Task task = new Task();
- task.setTaskName(taskName);
- task.setClassName(values[0]);
- task.setLibrary(new URL(values[1]));
- result.add(task);
- } catch (MalformedURLException e) {
- // if the URL does not have a valid format, just log and ignore the exception
- IStatus status = new Status(IStatus.ERROR, AntCorePlugin.PI_ANTCORE, AntCorePlugin.ERROR_MALFORMED_URL, InternalCoreAntMessages.getString("AntCorePreferences.Malformed_URL._1"), e); //$NON-NLS-1$
- AntCorePlugin.getPlugin().getLog().log(status);
- }
- }
- return (Task[]) result.toArray(new Task[result.size()]);
- }
-
- protected Type[] extractTypes(Preferences prefs, String[] types) {
- List result = new ArrayList(types.length);
- for (int i = 0; i < types.length; i++) {
- try {
- String typeName = types[i];
- String[] values = getArrayFromString(prefs.getString(IAntCoreConstants.PREFIX_TYPE + typeName));
- if (values.length < 2) {
- continue;
- }
- Type type = new Type();
- type.setTypeName(typeName);
- type.setClassName(values[0]);
- type.setLibrary(new URL(values[1]));
- result.add(type);
- } catch (MalformedURLException e) {
- // if the URL does not have a valid format, just log and ignore the exception
- IStatus status = new Status(IStatus.ERROR, AntCorePlugin.PI_ANTCORE, AntCorePlugin.ERROR_MALFORMED_URL, InternalCoreAntMessages.getString("AntCorePreferences.Malformed_URL._1"), e); //$NON-NLS-1$
- AntCorePlugin.getPlugin().getLog().log(status);
- }
- }
- return (Type[]) result.toArray(new Type[result.size()]);
- }
-
- protected Property[] extractProperties(Preferences prefs, String[] properties) {
- Property[] result = new Property[properties.length];
- for (int i = 0; i < properties.length; i++) {
- String propertyName = properties[i];
- String[] values = getArrayFromString(prefs.getString(IAntCoreConstants.PREFIX_PROPERTY + propertyName));
- if (values.length < 1) {
- continue;
- }
- Property property = new Property();
- property.setName(propertyName);
- property.setValue(values[0]);
- result[i]= property;
- }
- return result;
- }
-
- protected URL[] extractURLs(String[] urls) {
- List result = new ArrayList(urls.length);
- for (int i = 0; i < urls.length; i++) {
- try {
- result.add(new URL(urls[i]));
- } catch (MalformedURLException e) {
- // if the URL does not have a valid format, just log and ignore the exception
- IStatus status = new Status(IStatus.ERROR, AntCorePlugin.PI_ANTCORE, AntCorePlugin.ERROR_MALFORMED_URL, InternalCoreAntMessages.getString("AntCorePreferences.Malformed_URL._1"), e); //$NON-NLS-1$
- AntCorePlugin.getPlugin().getLog().log(status);
- }
- }
- return (URL[]) result.toArray(new URL[result.size()]);
- }
-
- /**
- * Returns the array of URLs that is the default set of URLs defining
- * the Ant classpath.
- * The Xerces JARs are included when the plugin classloader for org.eclipse.ant.core
- * is set as one of the plugin classloaders of the AntClassLoader.
- *
- * Ant running through the command line tries to find tools.jar to help the
- * user. Try emulating the same behaviour here.
- *
- * @return the default set of URLs defining the Ant classpath
- */
- public URL[] getDefaultAntURLs() {
- if (defaultAntURLs == null) {
- List result = new ArrayList(3);
- Plugin antPlugin= Platform.getPlugin("org.apache.ant"); //$NON-NLS-1$
- if (antPlugin != null) {
- IPluginDescriptor descriptor = antPlugin.getDescriptor();
- addLibraries(descriptor, result);
- }
-
- URL toolsURL= getToolsJarURL();
- if (toolsURL != null) {
- result.add(toolsURL);
- }
- defaultAntURLs= (URL[]) result.toArray(new URL[result.size()]);
- }
- return defaultAntURLs;
- }
-
- /**
- * Returns the array of URLs that is the set of URLs defining the Ant
- * classpath.
- *
- * @return the set of URLs defining the Ant classpath
- */
- public URL[] getAntURLs() {
- return antURLs;
- }
-
- protected List computeDefaultTasks(List tasks) {
- List result = new ArrayList(tasks.size());
- for (Iterator iterator = tasks.iterator(); iterator.hasNext();) {
- IConfigurationElement element = (IConfigurationElement) iterator.next();
- if (runningHeadless) {
- String headless = element.getAttribute(AntCorePlugin.HEADLESS);
- if (headless != null) {
- boolean headlessType= Boolean.valueOf(headless).booleanValue();
- if (!headlessType) {
- continue;
- }
- }
- }
- Task task = new Task();
- task.setIsDefault(true);
- task.setTaskName(element.getAttribute(AntCorePlugin.NAME));
- task.setClassName(element.getAttribute(AntCorePlugin.CLASS));
- String library = element.getAttribute(AntCorePlugin.LIBRARY);
- if (library == null) {
- IStatus status = new Status(IStatus.ERROR, AntCorePlugin.PI_ANTCORE, AntCorePlugin.ERROR_LIBRARY_NOT_SPECIFIED, MessageFormat.format(InternalCoreAntMessages.getString("AntCorePreferences.Library_not_specified_for__{0}_4"), new String[]{task.getTaskName()}), null); //$NON-NLS-1$
- AntCorePlugin.getPlugin().getLog().log(status);
- continue;
- }
-
- IPluginDescriptor descriptor = element.getDeclaringExtension().getDeclaringPluginDescriptor();
- try {
- URL url = Platform.asLocalURL(new URL(descriptor.getInstallURL(), library));
- if (new File(url.getPath()).exists()) {
- if (!extraClasspathURLs.contains(url)) {
- extraClasspathURLs.add(url);
- }
- result.add(task);
- addPluginClassLoader(descriptor.getPluginClassLoader());
- task.setLibrary(url);
- } else {
- //task specifies a library that does not exist
- IStatus status = new Status(IStatus.ERROR, AntCorePlugin.PI_ANTCORE, AntCorePlugin.ERROR_LIBRARY_NOT_SPECIFIED, MessageFormat.format(InternalCoreAntMessages.getString("AntCorePreferences.No_library_for_task"), new String[]{url.toExternalForm(), descriptor.getLabel()}), null); //$NON-NLS-1$
- AntCorePlugin.getPlugin().getLog().log(status);
- continue;
- }
- } catch (Exception e) {
- // if the URL does not have a valid format, just log and ignore the exception
- IStatus status = new Status(IStatus.ERROR, AntCorePlugin.PI_ANTCORE, AntCorePlugin.ERROR_MALFORMED_URL, InternalCoreAntMessages.getString("AntCorePreferences.Malformed_URL._1"), e); //$NON-NLS-1$
- AntCorePlugin.getPlugin().getLog().log(status);
- continue;
- }
- }
- return result;
- }
-
- protected List computeDefaultTypes(List types) {
- List result = new ArrayList(types.size());
- for (Iterator iterator = types.iterator(); iterator.hasNext();) {
- IConfigurationElement element = (IConfigurationElement) iterator.next();
- if (runningHeadless) {
- String headless = element.getAttribute(AntCorePlugin.HEADLESS);
- if (headless != null) {
- boolean headlessTask= Boolean.valueOf(headless).booleanValue();
- if (!headlessTask) {
- continue;
- }
- }
- }
- Type type = new Type();
- type.setIsDefault(true);
- type.setTypeName(element.getAttribute(AntCorePlugin.NAME));
- type.setClassName(element.getAttribute(AntCorePlugin.CLASS));
- String library = element.getAttribute(AntCorePlugin.LIBRARY);
- if (library == null) {
- IStatus status = new Status(IStatus.ERROR, AntCorePlugin.PI_ANTCORE, AntCorePlugin.ERROR_LIBRARY_NOT_SPECIFIED, MessageFormat.format(InternalCoreAntMessages.getString("AntCorePreferences.Library_not_specified_for__{0}_4"), new String[]{type.getTypeName()}), null); //$NON-NLS-1$
- AntCorePlugin.getPlugin().getLog().log(status);
- continue;
- }
- IPluginDescriptor descriptor = element.getDeclaringExtension().getDeclaringPluginDescriptor();
- try {
- URL url = Platform.asLocalURL(new URL(descriptor.getInstallURL(), library));
- if (new File(url.getPath()).exists()) {
- if (!extraClasspathURLs.contains(url)) {
- extraClasspathURLs.add(url);
- }
- result.add(type);
- addPluginClassLoader(descriptor.getPluginClassLoader());
- type.setLibrary(url);
- } else {
- //type specifies a library that does not exist
- IStatus status = new Status(IStatus.ERROR, AntCorePlugin.PI_ANTCORE, AntCorePlugin.ERROR_LIBRARY_NOT_SPECIFIED, MessageFormat.format(InternalCoreAntMessages.getString("AntCorePreferences.No_library_for_type"), new String[]{url.toExternalForm(), descriptor.getLabel()}), null); //$NON-NLS-1$
- AntCorePlugin.getPlugin().getLog().log(status);
- continue;
- }
- } catch (Exception e) {
- // if the URL does not have a valid format, just log and ignore the exception
- IStatus status = new Status(IStatus.ERROR, AntCorePlugin.PI_ANTCORE, AntCorePlugin.ERROR_MALFORMED_URL, InternalCoreAntMessages.getString("AntCorePreferences.Malformed_URL._1"), e); //$NON-NLS-1$
- AntCorePlugin.getPlugin().getLog().log(status);
- continue;
- }
- }
- return result;
- }
-
- /**
- * Computes the extra classpath entries defined plugins and fragments.
- */
- protected void computeDefaultExtraClasspathEntries(List entries) {
- for (Iterator iterator = entries.iterator(); iterator.hasNext();) {
- IConfigurationElement element = (IConfigurationElement) iterator.next();
- if (runningHeadless) {
- String headless = element.getAttribute(AntCorePlugin.HEADLESS);
- if (headless != null) {
- boolean headlessEntry= Boolean.valueOf(headless).booleanValue();
- if (!headlessEntry) {
- continue;
- }
- }
- }
- String library = (String) element.getAttribute(AntCorePlugin.LIBRARY);
- IPluginDescriptor descriptor = element.getDeclaringExtension().getDeclaringPluginDescriptor();
- try {
- URL url = Platform.asLocalURL(new URL(descriptor.getInstallURL(), library));
-
- if (new File(url.getPath()).exists()) {
- if (!extraClasspathURLs.contains(url)) {
- extraClasspathURLs.add(url);
- }
- addPluginClassLoader(descriptor.getPluginClassLoader());
- } else {
- //extra classpath entry that does not exist
- IStatus status = new Status(IStatus.ERROR, AntCorePlugin.PI_ANTCORE, AntCorePlugin.ERROR_LIBRARY_NOT_SPECIFIED, MessageFormat.format(InternalCoreAntMessages.getString("AntCorePreferences.No_library_for_extraClasspathEntry"), new String[]{url.toExternalForm(), descriptor.getLabel()}), null); //$NON-NLS-1$
- AntCorePlugin.getPlugin().getLog().log(status);
- continue;
- }
- } catch (Exception e) {
- // if the URL does not have a valid format, just log and ignore the exception
- IStatus status = new Status(IStatus.ERROR, AntCorePlugin.PI_ANTCORE, AntCorePlugin.ERROR_MALFORMED_URL, InternalCoreAntMessages.getString("AntCorePreferences.Malformed_URL._1"), e); //$NON-NLS-1$
- AntCorePlugin.getPlugin().getLog().log(status);
- continue;
- }
- }
- }
-
- /**
- * Returns the URL for the tools.jar associated with the "java.home"
- * location. May return <code>null</code> if no tools.jar is found (e.g. "java.home"
- * points to a JRE install).
- *
- * @return URL tools.jar URL or <code>null</code>
- */
- public URL getToolsJarURL() {
- IPath path = new Path(System.getProperty("java.home")); //$NON-NLS-1$
- if (path.lastSegment().equalsIgnoreCase("jre")) { //$NON-NLS-1$
- path = path.removeLastSegments(1);
- }
- path = path.append("lib").append("tools.jar"); //$NON-NLS-1$ //$NON-NLS-2$
- File tools = path.toFile();
- if (!tools.exists()) {
- //attempt to find in the older 1.1.*
- path= path.removeLastSegments(1);
- path= path.append("classes.zip"); //$NON-NLS-1$
- tools = path.toFile();
- if (!tools.exists()) {
- return null;
- }
- }
- try {
- return new URL("file:" + tools.getAbsolutePath()); //$NON-NLS-1$
- } catch (MalformedURLException e) {
- // if the URL does not have a valid format, just log and ignore the exception
- IStatus status = new Status(IStatus.ERROR, AntCorePlugin.PI_ANTCORE, AntCorePlugin.ERROR_MALFORMED_URL, InternalCoreAntMessages.getString("AntCorePreferences.Malformed_URL._1"), e); //$NON-NLS-1$
- AntCorePlugin.getPlugin().getLog().log(status);
- }
- return null;
- }
-
- protected void addLibraries(IPluginDescriptor source, List destination) {
- URL root = source.getInstallURL();
- ILibrary[] libraries = source.getRuntimeLibraries();
- for (int i = 0; i < libraries.length; i++) {
- try {
- URL url = new URL(root, libraries[i].getPath().toString());
- destination.add(Platform.asLocalURL(url));
- } catch (Exception e) {
- // if the URL does not have a valid format, just log and ignore the exception
- IStatus status = new Status(IStatus.ERROR, AntCorePlugin.PI_ANTCORE, AntCorePlugin.ERROR_MALFORMED_URL, InternalCoreAntMessages.getString("AntCorePreferences.Malformed_URL._1"), e); //$NON-NLS-1$
- AntCorePlugin.getPlugin().getLog().log(status);
- continue;
- }
- }
- }
-
- protected void addPluginClassLoader(ClassLoader loader) {
- if (!pluginClassLoaders.contains(loader)) {
- pluginClassLoaders.add(loader);
- }
- }
-
- /**
- * Returns the list of urls added to the classpath by the extra classpath
- * entries extension point.
- *
- * @return the list of extra classpath URLs
- */
- public URL[] getExtraClasspathURLs() {
- return (URL[])extraClasspathURLs.toArray(new URL[extraClasspathURLs.size()]);
- }
-
- /**
- * Returns the entire set of URLs that define the Ant runtime classpath.
- * Includes the Ant URLs, the custom URLs and extra classpath URLs.
- *
- * @return the entire runtime classpath of URLs
- */
- public URL[] getURLs() {
- List result = new ArrayList(20);
- if (antURLs != null) {
- result.addAll(Arrays.asList(antURLs));
- }
- if (customURLs != null && customURLs.length > 0) {
- result.addAll(Arrays.asList(customURLs));
- }
- if (extraClasspathURLs != null) {
- result.addAll(extraClasspathURLs);
- }
- return (URL[]) result.toArray(new URL[result.size()]);
- }
-
- protected ClassLoader[] getPluginClassLoaders() {
- if (orderedPluginClassLoaders == null) {
- Iterator classLoaders= pluginClassLoaders.iterator();
- Map idToLoader= new HashMap(pluginClassLoaders.size());
- IPluginDescriptor[] descriptors= new IPluginDescriptor[pluginClassLoaders.size()];
- int i= 0;
- while (classLoaders.hasNext()) {
- PluginClassLoader loader = (PluginClassLoader) classLoaders.next();
- IPluginDescriptor descriptor= loader.getPluginDescriptor();
- idToLoader.put(descriptor.getUniqueIdentifier(), loader);
- descriptors[i]= descriptor;
- i++;
- }
- String[] ids= computePrerequisiteOrderPlugins(descriptors);
- orderedPluginClassLoaders= new ClassLoader[pluginClassLoaders.size()];
- for (int j = 0; j < ids.length; j++) {
- String id = ids[j];
- orderedPluginClassLoaders[j]= (ClassLoader)idToLoader.get(id);
- }
- }
- return orderedPluginClassLoaders;
- }
-
- /**
- * Copied from org.eclipse.pde.internal.build.Utils
- */
- private String[] computePrerequisiteOrderPlugins(IPluginDescriptor[] plugins) {
- List prereqs = new ArrayList(9);
- Set pluginList = new HashSet(plugins.length);
- for (int i = 0; i < plugins.length; i++) {
- pluginList.add(plugins[i].getUniqueIdentifier());
- }
-
- // create a collection of directed edges from plugin to prereq
- for (int i = 0; i < plugins.length; i++) {
- boolean boot = false;
- boolean runtime = false;
- boolean found = false;
- IPluginPrerequisite[] prereqList = plugins[i].getPluginPrerequisites();
- if (prereqList != null) {
- for (int j = 0; j < prereqList.length; j++) {
- // ensure that we only include values from the original set.
- String prereq = prereqList[j].getUniqueIdentifier();
- boot = boot || prereq.equals(BootLoader.PI_BOOT);
- runtime = runtime || prereq.equals(Platform.PI_RUNTIME);
- if (pluginList.contains(prereq)) {
- found = true;
- prereqs.add(new String[] { plugins[i].getUniqueIdentifier(), prereq });
- }
- }
- }
-
- // if we didn't find any prereqs for this plugin, add a null prereq
- // to ensure the value is in the output
- if (!found) {
- prereqs.add(new String[] { plugins[i].getUniqueIdentifier(), null });
- }
-
- // if we didn't find the boot or runtime plugins as prereqs and they are in the list
- // of plugins to build, add prereq relations for them. This is required since the
- // boot and runtime are implicitly added to a plugin's requires list by the platform runtime.
- // Note that we should skip the xerces plugin as this would cause a circularity.
- if (plugins[i].getUniqueIdentifier().equals("org.apache.xerces")) //$NON-NLS-1$
- continue;
- if (!boot && pluginList.contains(BootLoader.PI_BOOT) && !plugins[i].getUniqueIdentifier().equals(BootLoader.PI_BOOT))
- prereqs.add(new String[] { plugins[i].getUniqueIdentifier(), BootLoader.PI_BOOT });
- if (!runtime && pluginList.contains(Platform.PI_RUNTIME) && !plugins[i].getUniqueIdentifier().equals(Platform.PI_RUNTIME) && !plugins[i].getUniqueIdentifier().equals(BootLoader.PI_BOOT))
- prereqs.add(new String[] { plugins[i].getUniqueIdentifier(), Platform.PI_RUNTIME });
- }
-
- // do a topological sort, insert the fragments into the sorted elements
- String[][] prereqArray = (String[][]) prereqs.toArray(new String[prereqs.size()][]);
- return computeNodeOrder(prereqArray);
- }
-
- /**
- * Copied from org.eclipse.pde.internal.build.Utils
- */
- private String[] computeNodeOrder(String[][] specs) {
- Map counts = computeCounts(specs);
- List nodes = new ArrayList(counts.size());
- while (!counts.isEmpty()) {
- List roots = findRootNodes(counts);
- if (roots.isEmpty())
- break;
- for (Iterator i = roots.iterator(); i.hasNext();)
- counts.remove(i.next());
- nodes.addAll(roots);
- removeArcs(specs, roots, counts);
- }
- String[] result = new String[nodes.size()];
- nodes.toArray(result);
-
- return result;
- }
-
- /**
- * Copied from org.eclipse.pde.internal.build.Utils
- */
- private void removeArcs(String[][] mappings, List roots, Map counts) {
- for (Iterator j = roots.iterator(); j.hasNext();) {
- String root = (String) j.next();
- for (int i = 0; i < mappings.length; i++) {
- if (root.equals(mappings[i][1])) {
- String input = mappings[i][0];
- Integer count = (Integer) counts.get(input);
- if (count != null)
- counts.put(input, new Integer(count.intValue() - 1));
- }
- }
- }
- }
-
- /**
- * Copied from org.eclipse.pde.internal.build.Utils
- */
- private List findRootNodes(Map counts) {
- List result = new ArrayList(5);
- for (Iterator i = counts.keySet().iterator(); i.hasNext();) {
- String node = (String) i.next();
- int count = ((Integer) counts.get(node)).intValue();
- if (count == 0)
- result.add(node);
- }
- return result;
- }
-
- /**
- * Copied from org.eclipse.pde.internal.build.Utils
- */
- private Map computeCounts(String[][] mappings) {
- Map counts = new HashMap(5);
- for (int i = 0; i < mappings.length; i++) {
- String from = mappings[i][0];
- Integer fromCount = (Integer) counts.get(from);
- String to = mappings[i][1];
- if (to == null)
- counts.put(from, new Integer(0));
- else {
- if (((Integer) counts.get(to)) == null)
- counts.put(to, new Integer(0));
- fromCount = fromCount == null ? new Integer(1) : new Integer(fromCount.intValue() + 1);
- counts.put(from, fromCount);
- }
- }
- return counts;
- }
-
- private void initializePluginClassLoaders() {
- pluginClassLoaders = new ArrayList(10);
- // ant.core should always be present (provides access to Xerces as well)
- pluginClassLoaders.add(Platform.getPlugin(AntCorePlugin.PI_ANTCORE).getDescriptor().getPluginClassLoader());
- }
-
- /**
- * Returns the default and custom tasks.
- *
- * @return the list of default and custom tasks.
- */
- public List getTasks() {
- List result = new ArrayList(10);
- if (defaultTasks != null && !defaultTasks.isEmpty()) {
- result.addAll(defaultTasks);
- }
- if (customTasks != null && customTasks.length != 0) {
- result.addAll(Arrays.asList(customTasks));
- }
- return result;
- }
-
- /**
- * Returns the user defined custom tasks
- * @return the user defined tasks
- */
- public Task[] getCustomTasks() {
- return customTasks;
- }
-
- /**
- * Returns the user defined custom types
- * @return the user defined types
- */
- public Type[] getCustomTypes() {
- return customTypes;
- }
-
- /**
- * Returns the custom user properties specified for Ant builds.
- *
- * @return the properties defined for Ant builds.
- */
- public Property[] getCustomProperties() {
- return customProperties;
- }
-
- /**
- * Returns the custom property files specified for Ant builds.
- *
- * @return the property files defined for Ant builds.
- */
- public String[] getCustomPropertyFiles() {
- return customPropertyFiles;
- }
-
- /**
- * Returns the custom URLs specified for the Ant classpath
- *
- * @return the urls defining the Ant classpath
- */
- public URL[] getCustomURLs() {
- return customURLs;
- }
-
- /**
- * Sets the user defined custom tasks
- * @param tasks
- */
- public void setCustomTasks(Task[] tasks) {
- customTasks = tasks;
- }
-
- /**
- * Sets the user defined custom types
- * @param tasks
- */
- public void setCustomTypes(Type[] types) {
- customTypes = types;
- }
-
- /**
- * Sets the custom URLs specified for the Ant classpath.
- * To commit the changes, updatePluginPreferences must be
- * called.
- *
- * @param the urls defining the Ant classpath
- */
- public void setCustomURLs(URL[] urls) {
- customURLs = urls;
- }
-
- /**
- * Sets the Ant URLs specified for the Ant classpath. To commit the changes,
- * updatePluginPreferences must be called.
- *
- * @param the urls defining the Ant classpath
- */
- public void setAntURLs(URL[] urls) {
- antURLs = urls;
- }
-
- /**
- * Sets the custom property files specified for Ant builds. To commit the
- * changes, updatePluginPreferences must be called.
- *
- * @param the absolute paths defining the property files to use.
- */
- public void setCustomPropertyFiles(String[] paths) {
- customPropertyFiles = paths;
- }
-
- /**
- * Sets the custom user properties specified for Ant builds. To commit the
- * changes, updatePluginPreferences must be called.
- *
- * @param the properties defining the Ant properties
- */
- public void setCustomProperties(Property[] properties) {
- customProperties = properties;
- }
-
- /**
- * Returns the default and custom types.
- *
- * @return all of the defined types
- */
- public List getTypes() {
- List result = new ArrayList(10);
- if (defaultTypes != null && !defaultTypes.isEmpty()) {
- result.addAll(defaultTypes);
- }
- if (customTypes != null && customTypes.length != 0) {
- result.addAll(Arrays.asList(customTypes));
- }
- return result;
- }
-
- /**
- * Returns the default types defined via the type extension point
- *
- * @return all of the default types
- */
- public List getDefaultTypes() {
- List result = new ArrayList(10);
- if (defaultTypes != null && !defaultTypes.isEmpty()) {
- result.addAll(defaultTypes);
- }
- return result;
- }
-
- /**
- * Returns the default tasks defined via the task extension point
- *
- * @return all of the default tasks
- */
- public List getDefaultTasks() {
- List result = new ArrayList(10);
- if (defaultTasks != null && !defaultTasks.isEmpty()) {
- result.addAll(defaultTasks);
- }
- return result;
- }
-
- /**
- * Convert a list of tokens into an array using "," as the tokenizer.
- */
- protected String[] getArrayFromString(String list) {
- String separator= ","; //$NON-NLS-1$
- if (list == null || list.trim().equals("")) { //$NON-NLS-1$
- return new String[0];
- }
- ArrayList result = new ArrayList();
- for (StringTokenizer tokens = new StringTokenizer(list, separator); tokens.hasMoreTokens();) {
- String token = tokens.nextToken().trim();
- if (!token.equals("")) { //$NON-NLS-1$
- result.add(token);
- }
- }
- return (String[]) result.toArray(new String[result.size()]);
- }
-
- /**
- * Updates the underlying plugin preferences to the current state.
- */
- public void updatePluginPreferences() {
- Preferences prefs = AntCorePlugin.getPlugin().getPluginPreferences();
- prefs.removePropertyChangeListener(this);
- updateTasks(prefs);
- updateTypes(prefs);
- updateAntURLs(prefs);
- updateURLs(prefs);
- updateProperties(prefs);
- updatePropertyFiles(prefs);
- AntCorePlugin.getPlugin().savePluginPreferences();
- prefs.addPropertyChangeListener(this);
- }
-
- protected void updateTasks(Preferences prefs) {
- if (customTasks.length == 0) {
- prefs.setValue(IAntCoreConstants.PREFERENCE_TASKS, ""); //$NON-NLS-1$
- return;
- }
- StringBuffer tasks = new StringBuffer();
- for (int i = 0; i < customTasks.length; i++) {
- tasks.append(customTasks[i].getTaskName());
- tasks.append(',');
- prefs.setValue(IAntCoreConstants.PREFIX_TASK + customTasks[i].getTaskName(), customTasks[i].getClassName() + "," + customTasks[i].getLibrary().toExternalForm()); //$NON-NLS-1$
- }
- prefs.setValue(IAntCoreConstants.PREFERENCE_TASKS, tasks.toString());
- }
-
- protected void updateTypes(Preferences prefs) {
- if (customTypes.length == 0) {
- prefs.setValue(IAntCoreConstants.PREFERENCE_TYPES, ""); //$NON-NLS-1$
- return;
- }
- StringBuffer types = new StringBuffer();
- for (int i = 0; i < customTypes.length; i++) {
- types.append(customTypes[i].getTypeName());
- types.append(',');
- prefs.setValue(IAntCoreConstants.PREFIX_TYPE + customTypes[i].getTypeName(), customTypes[i].getClassName() + "," + customTypes[i].getLibrary().toExternalForm()); //$NON-NLS-1$
- }
- prefs.setValue(IAntCoreConstants.PREFERENCE_TYPES, types.toString());
- }
-
- protected void updateProperties(Preferences prefs) {
- if (customProperties.length == 0) {
- prefs.setValue(IAntCoreConstants.PREFERENCE_PROPERTIES, ""); //$NON-NLS-1$
- return;
- }
- StringBuffer properties = new StringBuffer();
- for (int i = 0; i < customProperties.length; i++) {
- properties.append(customProperties[i].getName());
- properties.append(',');
- prefs.setValue(IAntCoreConstants.PREFIX_PROPERTY + customProperties[i].getName(), customProperties[i].getValue()); //$NON-NLS-1$
- }
- prefs.setValue(IAntCoreConstants.PREFERENCE_PROPERTIES, properties.toString());
- }
-
- protected void updateURLs(Preferences prefs) {
- StringBuffer urls = new StringBuffer();
- for (int i = 0; i < customURLs.length; i++) {
- urls.append(customURLs[i].toExternalForm());
- urls.append(',');
- }
-
- prefs.setValue(IAntCoreConstants.PREFERENCE_URLS, urls.toString());
- String prefAntHome= ""; //$NON-NLS-1$
- if (antHome != null) {
- prefAntHome= antHome;
- }
- prefs.setValue(IAntCoreConstants.PREFERENCE_ANT_HOME, prefAntHome);
- }
-
- protected void updateAntURLs(Preferences prefs) {
- //see if the custom URLS are just the default URLS
- URL[] dcUrls= getDefaultAntURLs();
- boolean dflt= false;
- if (dcUrls.length == antURLs.length) {
- dflt= true;
- for (int i = 0; i < antURLs.length; i++) {
- if (!antURLs[i].equals(dcUrls[i])) {
- dflt= false;
- break;
- }
- }
- }
- if (dflt) {
- //always want to recalculate the default Ant urls
- //to pick up any changes in the default Ant classpath
- prefs.setValue(IAntCoreConstants.PREFERENCE_ANT_URLS, ""); //$NON-NLS-1$
- return;
- }
- StringBuffer urls = new StringBuffer();
- for (int i = 0; i < antURLs.length; i++) {
- urls.append(antURLs[i].toExternalForm());
- urls.append(',');
- }
-
- prefs.setValue(IAntCoreConstants.PREFERENCE_ANT_URLS, urls.toString());
- }
-
- protected void updatePropertyFiles(Preferences prefs) {
- StringBuffer files = new StringBuffer();
- for (int i = 0; i < customPropertyFiles.length; i++) {
- files.append(customPropertyFiles[i]);
- files.append(',');
- }
-
- prefs.setValue(IAntCoreConstants.PREFERENCE_PROPERTY_FILES, files.toString());
- }
-
- /**
- * Sets the string that defines the Ant home set by the user.
- * May be set to <code>null</code>.
- *
- * @param the fully qualified path to Ant home
- */
- public void setAntHome(String antHome) {
- this.antHome= antHome;
- }
-
- /**
- * Returns the string that defines the Ant home set by the user.
- * May be <code>null</code> if Ant home has not been set.
- *
- * @return the fully qualified path to Ant home
- */
- public String getAntHome() {
- return antHome;
- }
-}
diff --git a/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/AntRunner.java b/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/AntRunner.java
deleted file mode 100644
index 6b1d703..0000000
--- a/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/AntRunner.java
+++ /dev/null
@@ -1,533 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.core;
-
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.net.URL;
-import java.text.MessageFormat;
-import java.util.*;
-
-import org.eclipse.ant.internal.core.AntClassLoader;
-import org.eclipse.ant.internal.core.IAntCoreConstants;
-import org.eclipse.ant.internal.core.InternalCoreAntMessages;
-import org.eclipse.core.boot.BootLoader;
-import org.eclipse.core.boot.IPlatformRunnable;
-import org.eclipse.core.runtime.*;
-
-/**
- * Entry point for running Ant builds inside Eclipse.
- */
-public class AntRunner implements IPlatformRunnable {
-
- private static boolean buildRunning= false;
- protected String buildFileLocation = IAntCoreConstants.DEFAULT_BUILD_FILENAME;
- protected List buildListeners;
- protected String[] targets;
- protected Map userProperties;
- protected int messageOutputLevel = 2; // Project.MSG_INFO
- protected String buildLoggerClassName;
- protected String inputHandlerClassName;
- protected String[] arguments;
- protected String[] propertyFiles;
- protected URL[] customClasspath;
- protected String antHome;
-
- /**
- * Sets the build file location on the file system.
- *
- * @param buildFileLocation the file system location of the build file
- */
- public void setBuildFileLocation(String buildFileLocation) {
- if (buildFileLocation == null) {
- this.buildFileLocation = IAntCoreConstants.DEFAULT_BUILD_FILENAME;
- } else {
- this.buildFileLocation = buildFileLocation;
- }
- }
-
- /**
- * Set the message output level.
- * <p>
- * Valid values are:
- * <ul>
- * <li><code>org.apache.tools.ant.Project.ERR</code>,
- * <li><code>org.apache.tools.ant.Project.WARN</code>,
- * <li><code>org.apache.tools.ant.Project.INFO</code>,
- * <li><code>org.apache.tools.ant.Project.VERBOSE</code> or
- * <li><code>org.apache.tools.ant.Project.DEBUG</code>
- * </ul>
- *
- * @param level the message output level
- */
- public void setMessageOutputLevel(int level) {
- messageOutputLevel = level;
- }
-
- /**
- * Sets the arguments to be passed to the build (e.g. -Dos=win32 -Dws=win32
- * - verbose).
- *
- * @param arguments the arguments to be passed to the build
- */
- public void setArguments(String arguments) {
- this.arguments = getArray(arguments);
- }
-
- /**
- * Helper method to ensure an array is converted into an ArrayList.
- */
- private String[] getArray(String args) {
- StringBuffer sb = new StringBuffer();
- boolean waitingForQuote = false;
- ArrayList result = new ArrayList();
- for (StringTokenizer tokens = new StringTokenizer(args, ", \"", true); tokens.hasMoreTokens();) { //$NON-NLS-1$
- String token = tokens.nextToken();
- if (waitingForQuote) {
- if (token.equals("\"")) { //$NON-NLS-1$
- result.add(sb.toString());
- sb.setLength(0);
- waitingForQuote = false;
- } else {
- sb.append(token);
- }
- } else {
- if (token.equals("\"")) { //$NON-NLS-1$
- // test if we have something like -Dproperty="value"
- if (result.size() > 0) {
- int index = result.size() - 1;
- String last = (String) result.get(index);
- if (last.charAt(last.length() - 1) == '=') {
- result.remove(index);
- sb.append(last);
- }
- }
- waitingForQuote = true;
- } else {
- if (!(token.equals(",") || token.equals(" "))) //$NON-NLS-1$ //$NON-NLS-2$
- result.add(token);
- }
- }
- }
- return (String[]) result.toArray(new String[result.size()]);
- }
-
- /**
- * Sets the arguments to be passed to the build (e.g. -Dos=win32 -Dws=win32 -verbose).
- *
- * @param arguments the arguments to be passed to the build
- * @since 2.1
- */
- public void setArguments(String[] arguments) {
- this.arguments = arguments;
- }
-
- /**
- * Sets the targets and execution order.
- *
- * @param executionTargets which targets should be run and in which order
- */
- public void setExecutionTargets(String[] executionTargets) {
- this.targets = executionTargets;
- }
-
- /**
- * Adds a build listener. The parameter <code>className</code>
- * is the class name of a <code>org.apache.tools.ant.BuildListener</code>
- * implementation. The class will be instantiated at runtime and the
- * listener will be called on build events
- * (<code>org.apache.tools.ant.BuildEvent</code>).
- *
- * @param className a build listener class name
- */
- public void addBuildListener(String className) {
- if (className == null) {
- return;
- }
- if (buildListeners == null) {
- buildListeners = new ArrayList(5);
- }
- buildListeners.add(className);
- }
-
- /**
- * Sets the build logger. The parameter <code>className</code>
- * is the class name of a <code>org.apache.tools.ant.BuildLogger</code>
- * implementation. The class will be instantiated at runtime and the
- * logger will be called on build events
- * (<code>org.apache.tools.ant.BuildEvent</code>).
- * Only one build logger is permitted for any build.
- *
- *
- * @param className a build logger class name
- */
- public void addBuildLogger(String className) {
- buildLoggerClassName = className;
- }
-
- /**
- * Adds user-defined properties. Keys and values must be String objects.
- *
- * @param properties a Map of user-defined properties
- */
- public void addUserProperties(Map properties) {
- userProperties = properties;
- }
-
- /**
- * Returns the build file target information.
- *
- * @return an array containing the target information
- *
- * @see TargetInfo
- * @since 2.1
- */
- public synchronized TargetInfo[] getAvailableTargets() throws CoreException {
- Class classInternalAntRunner= null;
- Object runner= null;
- ClassLoader originalClassLoader= Thread.currentThread().getContextClassLoader();
- try {
- ClassLoader loader = AntCorePlugin.getPlugin().getNewClassLoader();
- Thread.currentThread().setContextClassLoader(loader);
- classInternalAntRunner = loader.loadClass("org.eclipse.ant.internal.core.ant.InternalAntRunner"); //$NON-NLS-1$
- runner = classInternalAntRunner.newInstance();
- // set build file
- Method setBuildFileLocation = classInternalAntRunner.getMethod("setBuildFileLocation", new Class[] { String.class }); //$NON-NLS-1$
- setBuildFileLocation.invoke(runner, new Object[] { buildFileLocation });
-
- setProperties(runner, classInternalAntRunner);
-
- if (arguments != null && arguments.length > 0) {
- Method setArguments = classInternalAntRunner.getMethod("setArguments", new Class[] { String[].class }); //$NON-NLS-1$
- setArguments.invoke(runner, new Object[] { arguments });
- }
-
- // get the info for each targets
- Method getTargets = classInternalAntRunner.getMethod("getTargets", null); //$NON-NLS-1$
- Object results = getTargets.invoke(runner, null);
- // get the default target
- Method getDefault= classInternalAntRunner.getMethod("getDefaultTarget", null); //$NON-NLS-1$
- String defaultName= (String)getDefault.invoke(runner, null);
- // collect the info into target objects
- List infos = (List) results;
-
- ProjectInfo project= new ProjectInfo((String)infos.remove(0), (String)infos.remove(0));
- int i= 0;
- Iterator iter= infos.iterator();
- List info;
- TargetInfo[] targets= new TargetInfo[infos.size()];
-
- while (iter.hasNext()) {
- info= (List)iter.next();
- targets[i++] = new TargetInfo(project, (String)info.get(0), (String)info.get(1), (String[])info.get(2), info.get(0).equals(defaultName));
- }
- return targets;
- } catch (NoClassDefFoundError e) {
- problemLoadingClass(e);
- //not possible to reach this line
- return new TargetInfo[0];
- } catch (ClassNotFoundException e) {
- problemLoadingClass(e);
- //not possible to reach this line
- return new TargetInfo[0];
- } catch (InvocationTargetException e) {
- handleInvocationTargetException(runner, classInternalAntRunner, e);
- //not possible to reach this line
- return new TargetInfo[0];
- } catch (Exception e) {
- String message = (e.getMessage() == null) ? InternalCoreAntMessages.getString("AntRunner.Build_Failed._3") : e.getMessage(); //$NON-NLS-1$
- throw new CoreException(new Status(IStatus.ERROR, AntCorePlugin.PI_ANTCORE, AntCorePlugin.ERROR_RUNNING_BUILD, message, e));
- } finally {
- Thread.currentThread().setContextClassLoader(originalClassLoader);
- }
- }
-
- /**
- * Runs the build file. If a progress monitor is specified it will be
- * available during the script execution as a reference in the Ant Project
- * (<code>org.apache.tools.ant.Project.getReferences()</code>). A long-
- * running task could, for example, get the monitor during its execution and
- * check for cancellation. The key value to retrieve the progress monitor
- * instance is <code>AntCorePlugin.ECLIPSE_PROGRESS_MONITOR</code>.
- *
- * Only one build can occur at any given time.
- *
- * Sets the current threads context class loader to the AntClassLoader
- * for the duration of the build.
- *
- * @param monitor a progress monitor, or <code>null</code> if progress
- * reporting and cancellation are not desired
- */
- public void run(IProgressMonitor monitor) throws CoreException {
- if (buildRunning) {
- IStatus status= new Status(IStatus.ERROR, AntCorePlugin.PI_ANTCORE, AntCorePlugin.ERROR_RUNNING_BUILD, MessageFormat.format(InternalCoreAntMessages.getString("AntRunner.Already_in_progess"), new String[]{buildFileLocation}), null); //$NON-NLS-1$
- throw new CoreException(status);
- }
- buildRunning= true;
- Object runner= null;
- Class classInternalAntRunner= null;
- ClassLoader originalClassLoader= Thread.currentThread().getContextClassLoader();
- try {
- ClassLoader loader = getClassLoader();
- Thread.currentThread().setContextClassLoader(loader);
- classInternalAntRunner = loader.loadClass("org.eclipse.ant.internal.core.ant.InternalAntRunner"); //$NON-NLS-1$
- runner = classInternalAntRunner.newInstance();
- // set build file
- Method setBuildFileLocation = classInternalAntRunner.getMethod("setBuildFileLocation", new Class[] { String.class }); //$NON-NLS-1$
- setBuildFileLocation.invoke(runner, new Object[] { buildFileLocation });
- // add listeners
- if (buildListeners != null) {
- Method addBuildListeners = classInternalAntRunner.getMethod("addBuildListeners", new Class[] { List.class }); //$NON-NLS-1$
- addBuildListeners.invoke(runner, new Object[] { buildListeners });
- }
-
- if (buildLoggerClassName == null) {
- //indicate that the default logger is not to be used
- buildLoggerClassName= ""; //$NON-NLS-1$
- }
- // add build logger
- Method addBuildLogger = classInternalAntRunner.getMethod("addBuildLogger", new Class[] { String.class }); //$NON-NLS-1$
- addBuildLogger.invoke(runner, new Object[] { buildLoggerClassName });
-
- if (inputHandlerClassName != null) {
- // add the input handler
- Method setInputHandler = classInternalAntRunner.getMethod("setInputHandler", new Class[] { String.class }); //$NON-NLS-1$
- setInputHandler.invoke(runner, new Object[] { inputHandlerClassName });
- }
-
- if (antHome != null) {
- Method setAntHome = classInternalAntRunner.getMethod("setAntHome", new Class[] { String.class }); //$NON-NLS-1$
- setAntHome.invoke(runner, new Object[] { antHome });
- }
-
- // add progress monitor
- if (monitor != null) {
- Method setProgressMonitor = classInternalAntRunner.getMethod("setProgressMonitor", new Class[] { IProgressMonitor.class }); //$NON-NLS-1$
- setProgressMonitor.invoke(runner, new Object[] { monitor });
- }
-
- setProperties(runner, classInternalAntRunner);
-
- // set message output level
- Method setMessageOutputLevel = classInternalAntRunner.getMethod("setMessageOutputLevel", new Class[] { int.class }); //$NON-NLS-1$
- setMessageOutputLevel.invoke(runner, new Object[] { new Integer(messageOutputLevel)});
- // set execution targets
- if (targets != null) {
- Method setExecutionTargets = classInternalAntRunner.getMethod("setExecutionTargets", new Class[] { String[].class }); //$NON-NLS-1$
- setExecutionTargets.invoke(runner, new Object[] { targets });
- }
- // set extra arguments
- if (arguments != null && arguments.length > 0) {
- Method setArguments = classInternalAntRunner.getMethod("setArguments", new Class[] { String[].class }); //$NON-NLS-1$
- setArguments.invoke(runner, new Object[] { arguments });
- }
- // run
- Method run = classInternalAntRunner.getMethod("run", null); //$NON-NLS-1$
- run.invoke(runner, null);
- } catch (NoClassDefFoundError e) {
- problemLoadingClass(e);
- } catch (ClassNotFoundException e) {
- problemLoadingClass(e);
- } catch (InvocationTargetException e) {
- handleInvocationTargetException(runner, classInternalAntRunner, e);
- } catch (Exception e) {
- String message = (e.getMessage() == null) ? InternalCoreAntMessages.getString("AntRunner.Build_Failed._3") : e.getMessage(); //$NON-NLS-1$
- IStatus status= new Status(IStatus.ERROR, AntCorePlugin.PI_ANTCORE, AntCorePlugin.ERROR_RUNNING_BUILD, message, e);
- throw new CoreException(status);
- } finally {
- buildRunning= false;
- Thread.currentThread().setContextClassLoader(originalClassLoader);
- }
- }
-
- private void setProperties(Object runner, Class classInternalAntRunner)
- throws NoSuchMethodException, IllegalAccessException, InvocationTargetException {
- // add properties
- if (userProperties != null) {
- Method addUserProperties = classInternalAntRunner.getMethod("addUserProperties", new Class[] { Map.class }); //$NON-NLS-1$
- addUserProperties.invoke(runner, new Object[] { userProperties });
- }
-
- // add property files
- if (propertyFiles != null) {
- Method addPropertyFiles = classInternalAntRunner.getMethod("addPropertyFiles", new Class[] { String[].class }); //$NON-NLS-1$
- addPropertyFiles.invoke(runner, new Object[] { propertyFiles });
- }
- }
-
- /**
- * Handles exceptions that are loaded by the Ant Class Loader by
- * asking the Internal Ant Runner class for the correct error message.
- *
- * Handles OperationCanceledExceptions, nested NoClassDefFoundError and
- * nested ClassNotFoundException
- */
- protected void handleInvocationTargetException(Object runner, Class classInternalAntRunner, InvocationTargetException e) throws CoreException {
- Throwable realException = e.getTargetException();
- if (realException instanceof OperationCanceledException) {
- return;
- }
- String message= null;
- if (runner != null) {
- try {
- Method getBuildErrorMessage = classInternalAntRunner.getMethod("getBuildExceptionErrorMessage", new Class[] { Throwable.class }); //$NON-NLS-1$
- message= (String)getBuildErrorMessage.invoke(runner, new Object[] { realException });
- } catch (Exception ex) {
- //do nothing as already in error state
- }
- }
- // J9 throws NoClassDefFoundError nested in a InvocationTargetException
- if (message == null && ((realException instanceof NoClassDefFoundError) || (realException instanceof ClassNotFoundException))) {
- problemLoadingClass(realException);
- return;
- }
- boolean internalError= false;
- if (message == null) {
- //error did not result from a BuildException
- internalError= true;
- message = (realException.getMessage() == null) ? InternalCoreAntMessages.getString("AntRunner.Build_Failed._3") : realException.getMessage(); //$NON-NLS-1$
- }
- IStatus status= new Status(IStatus.ERROR, AntCorePlugin.PI_ANTCORE, AntCorePlugin.ERROR_RUNNING_BUILD, message, realException);
- if (internalError) {
- AntCorePlugin.getPlugin().getLog().log(status);
- }
- throw new CoreException(status);
- }
-
- protected void problemLoadingClass(Throwable e) throws CoreException {
- String missingClassName= e.getMessage();
- String message;
- if (missingClassName != null) {
- missingClassName= missingClassName.replace('/', '.');
- message= InternalCoreAntMessages.getString("AntRunner.Could_not_find_one_or_more_classes._Please_check_the_Ant_classpath._2"); //$NON-NLS-1$
- message= MessageFormat.format(message, new String[]{missingClassName});
- } else {
- message= InternalCoreAntMessages.getString("AntRunner.Could_not_find_one_or_more_classes._Please_check_the_Ant_classpath._1"); //$NON-NLS-1$
- }
- IStatus status= new Status(IStatus.ERROR, AntCorePlugin.PI_ANTCORE, AntCorePlugin.ERROR_RUNNING_BUILD, message, e);
- AntCorePlugin.getPlugin().getLog().log(status);
- throw new CoreException(status);
- }
-
- /**
- * Runs the build file.
- */
- public void run() throws CoreException {
- run((IProgressMonitor) null);
- }
-
- /**
- * Invokes the building of a project object and executes a build using either a given
- * target or the default target. This method is called when running Eclipse headless
- * and specifying <code>org.eclipse.ant.core.antRunner</code> as the application.
- *
- * Sets the current threads context class loader to the AntClassLoader
- * for the duration of the build.
- *
- * @param argArray the command line arguments
- * @exception Exception if a problem occurred during the script execution
- */
- public Object run(Object argArray) throws Exception {
- ClassLoader originalClassLoader= Thread.currentThread().getContextClassLoader();
- try {
- //set the preferences for headless mode
- AntCorePlugin.getPlugin().setRunningHeadless();
-
- // Add debug information if necessary - fix for bug 5672.
- // Since the platform parses the -debug command line arg
- // and removes it from the args passed to the applications,
- // we have to check if Eclipse is in debug mode in order to
- // forward the -debug argument to Ant.
- if (BootLoader.inDebugMode()) {
- String[] args = (String[]) argArray;
- String[] newArgs = new String[args.length + 1];
- for (int i = 0; i < args.length; i++) {
- newArgs[i] = args[i];
- }
- newArgs[args.length] = "-debug"; //$NON-NLS-1$
- argArray = newArgs;
- }
- ClassLoader loader = getClassLoader();
- Thread.currentThread().setContextClassLoader(loader);
- Class classInternalAntRunner = loader.loadClass("org.eclipse.ant.internal.core.ant.InternalAntRunner"); //$NON-NLS-1$
- Object runner = classInternalAntRunner.newInstance();
- Method run = classInternalAntRunner.getMethod("run", new Class[] { Object.class }); //$NON-NLS-1$
- run.invoke(runner, new Object[] { argArray });
- } finally {
- Thread.currentThread().setContextClassLoader(originalClassLoader);
- }
- return null;
- }
-
- private ClassLoader getClassLoader() {
- if (customClasspath == null) {
- return AntCorePlugin.getPlugin().getNewClassLoader();
- } else {
- AntCorePreferences preferences = AntCorePlugin.getPlugin().getPreferences();
- List fullClasspath= new ArrayList();
- fullClasspath.addAll(Arrays.asList(customClasspath));
- fullClasspath.addAll(Arrays.asList(preferences.getExtraClasspathURLs()));
- return new AntClassLoader((URL[])fullClasspath.toArray(new URL[fullClasspath.size()]), preferences.getPluginClassLoaders());
- }
- }
-
- /**
- * Sets the input handler. The parameter <code>className</code>
- * is the class name of a <code>org.apache.tools.ant.input.InputHandler</code>
- * implementation. The class will be instantiated at runtime and the
- * input handler will be used to respond to <input> requests
- * Only one input handler is permitted for any build.
- *
- * @param className an input handler class name
- * @since 2.1
- */
- public void setInputHandler(String className) {
- inputHandlerClassName= className;
- }
-
- /**
- * Sets the user specified property files.
- * @param array of property file paths
- * @since 2.1
- */
- public void setPropertyFiles(String[] propertyFiles) {
- this.propertyFiles= propertyFiles;
- }
-
- /**
- * Sets the custom classpath to use for this build
- * @param array of URLs that define the custom classpath
- */
- public void setCustomClasspath(URL[] customClasspath) {
- this.customClasspath = customClasspath;
- }
-
- /**
- * Sets the Ant home to use for this build
- * @param String specifying the Ant home to use
- * @since 2.1
- */
- public void setAntHome(String antHome) {
- this.antHome= antHome;
- }
- /**
- * Returns whether an Ant build is already in progress
- *
- * Only one Ant build can occur at any given time.
- *
- * @since 2.1
- * @return boolean
- */
- public static boolean isBuildRunning() {
- return buildRunning;
- }
-}
diff --git a/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/AntSecurityException.java b/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/AntSecurityException.java
deleted file mode 100644
index 75fd911..0000000
--- a/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/AntSecurityException.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.core;
-
-
-/**
- * A security exception that is thrown by the AntSecurityManager if
- * an Ant task in some way attempts to halt or exit the Java Virtual Machine.
- *
- * @since 2.1
- */
-public class AntSecurityException extends SecurityException {
-
-}
diff --git a/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/ProjectInfo.java b/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/ProjectInfo.java
deleted file mode 100644
index 8c6ee56..0000000
--- a/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/ProjectInfo.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.core;
-
-
-/**
- * Represents information about a project within an Ant build file.
- * @since 2.1
- */
-
-public class ProjectInfo {
-
- private String name = null;
- private String description = null;
-
- /**
- * Create a project information
- *
- * @param name project name
- * @param description a brief explanation of the project's purpose or
- * <code>null</code> if not specified
- */
- /*package*/
- ProjectInfo(String name, String description) {
- this.name = name == null ? "" : name; //$NON-NLS-1$
- this.description = description;
- }
-
- /**
- * Returns the project name.
- *
- * @return the project name
- */
- public String getName() {
- return name;
- }
-
- /**
- * Returns the project description or <code>null</code> if no
- * description is provided.
- *
- * @return the project description or <code>null</code> if none
- */
- public String getDescription() {
- return description;
- }
-}
diff --git a/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/Property.java b/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/Property.java
deleted file mode 100644
index 3eb27eb..0000000
--- a/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/Property.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.core;
-
-
-/**
- * Represents a Ant user property.
- * @since 2.1
- */
-public class Property {
-
- private String name;
- private String value;
-
- public Property(String name, String value) {
- this.name= name;
- this.value= value;
- }
-
- public Property() {
- }
- /**
- * Gets the name
- * @return Returns a String
- */
- public String getName() {
- return name;
- }
-
- /**
- * Sets the name
- * @param name The name to set
- */
- public void setName(String name) {
- this.name= name;
- }
-
- /*
- * @see Object#equals()
- */
- public boolean equals(Object other) {
- if (other.getClass().equals(getClass())) {
- Property elem= (Property)other;
- return name.equals(elem.getName());
- }
- return false;
- }
-
- /*
- * @see Object#hashCode()
- */
- public int hashCode() {
- return name.hashCode();
- }
- /**
- * Returns the value.
- * @return String
- */
- public String getValue() {
- return value;
- }
-
- /**
- * Sets the value.
- * @param value The value to set
- */
- public void setValue(String value) {
- this.value = value;
- }
- /**
- * @see java.lang.Object#toString()
- */
- public String toString() {
- StringBuffer buff= new StringBuffer("\""); //$NON-NLS-1$
- buff.append(getName());
- buff.append("\"= \""); //$NON-NLS-1$
- buff.append(getValue());
- buff.append("\""); //$NON-NLS-1$
- return buff.toString();
- }
-}
diff --git a/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/TargetInfo.java b/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/TargetInfo.java
deleted file mode 100644
index ef50a59..0000000
--- a/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/TargetInfo.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.core;
-
-
-/**
- * Represents information about a target within an Ant build file.
- * @since 2.1
- */
-public class TargetInfo {
-
- private String name = null;
- private String description = null;
- private ProjectInfo project = null;
- private String[] dependencies = null;
- private boolean isDefault = false;
-
- /**
- * Create a target information
- *
- * @param name target name
- * @param description a brief explanation of the target's purpose
- * or <code>null</code> if not specified
- * @param project enclosing project
- * @param dependencies names of prerequisite projects
- * @param isDefault whether this is the build file default target
- */
- /*package*/
- TargetInfo(ProjectInfo project, String name, String description, String[] dependencies, boolean isDefault) {
- this.name = name == null ? "" : name; //$NON-NLS-1$
- this.description = description;
- this.project = project;
- this.dependencies = dependencies;
- this.isDefault = isDefault;
- }
-
- /**
- * Returns the target name.
- *
- * @return the target name
- */
- public String getName() {
- return name;
- }
-
- /**
- * Returns the target description or <code>null</code> if no
- * description is provided.
- *
- * @return the target description or <code>null</code> if none
- */
- public String getDescription() {
- return description;
- }
-
- /**
- * Returns the ProjectInfo of the enclosing project.
- *
- * @return the project info for the enclosing project
- */
- public ProjectInfo getProject() {
- return project;
- }
-
- /**
- * Return the names of the targets that this target depends on.
- *
- * @return the dependent names
- */
- public String[] getDependencies() {
- return dependencies;
- }
-
- /**
- * Returns whether this is the build file default target.
- *
- * @return whether this is the build file default target
- */
- public boolean isDefault() {
- return isDefault;
- }
- /**
- * @see java.lang.Object#equals(java.lang.Object)
- */
- public boolean equals(Object obj) {
- if (!(obj instanceof TargetInfo)) {
- return false;
- }
- TargetInfo other= (TargetInfo)obj;
- return getName().equals(other.getName());
- }
-
- /**
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
- return getName().hashCode();
- }
-
- /**
- * @see java.lang.Object#toString()
- */
- public String toString() {
- return getName();
- }
-
-}
diff --git a/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/Task.java b/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/Task.java
deleted file mode 100644
index 7b9df05..0000000
--- a/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/Task.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.core;
-
-
-import org.eclipse.ant.internal.core.AntObject;
-
-/**
- * Represents an Ant task.
- * @since 2.1
- */
-public class Task extends AntObject {
-
- /**
- * Returns the name of the task
- * @return the name of the task
- */
- public String getTaskName() {
- return fName;
- }
-
- /**
- * Sets the name of the task
- * @param taskName The taskName to set
- */
- public void setTaskName(String taskName) {
- fName= taskName;
- }
-}
diff --git a/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/Type.java b/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/Type.java
deleted file mode 100644
index a9c8f8e..0000000
--- a/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/Type.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.core;
-
-
-import org.eclipse.ant.internal.core.AntObject;
-
-/**
- * Represents an Ant type.
- * @since 2.1
- */
-public class Type extends AntObject {
-
- /**
- * Returns the type name
- * @return Returns a String
- */
- public String getTypeName() {
- return fName;
- }
-
- /**
- * Sets the taskName.
- * @param taskName The taskName to set
- */
- public void setTypeName(String taskName) {
- fName = taskName;
- }
-}
diff --git a/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/package.html b/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/package.html
deleted file mode 100644
index a931089..0000000
--- a/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/package.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Provides support for running the Ant build tool in the platform.
-<h2>
-Package Specification</h2>
-This package defines a number of task and data types and various infrastructure
-pieces which make Ant in the platform easier and more powerful.
-</body>
-</html>
diff --git a/ant/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntClassLoader.java b/ant/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntClassLoader.java
deleted file mode 100644
index 5d9e1a3..0000000
--- a/ant/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntClassLoader.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.internal.core;
-
-
-import java.net.URL;
-import java.net.URLClassLoader;
-
-import org.eclipse.core.boot.BootLoader;
-
-public class AntClassLoader extends URLClassLoader {
-
- protected ClassLoader[] pluginLoaders;
- private static final String ANT_PACKAGES_PREFIX= "org.apache.tools.ant"; //$NON-NLS-1$
- private static final String[] ECLIPSE_ANT_PACKAGES_PREFIXES= new String[4];
- private static final boolean devMode= BootLoader.inDevelopmentMode();
-
- static {
- if (devMode) {
- ECLIPSE_ANT_PACKAGES_PREFIXES[0]= "org.eclipse.ant.internal.core.ant"; //$NON-NLS-1$
- ECLIPSE_ANT_PACKAGES_PREFIXES[1]= "org.eclipse.ui.externaltools.internal.ant.logger"; //$NON-NLS-1$
- ECLIPSE_ANT_PACKAGES_PREFIXES[2]= "org.eclipse.ui.externaltools.internal.ant.inputhandler"; //$NON-NLS-1$
- ECLIPSE_ANT_PACKAGES_PREFIXES[3]= "org.eclipse.ant.tests.core.support"; //$NON-NLS-1$
- }
- }
-
- public AntClassLoader(URL[] urls, ClassLoader[] pluginLoaders) {
- super(urls, ClassLoader.getSystemClassLoader());
- this.pluginLoaders = pluginLoaders;
- }
-
- public Class loadClass(String name) throws ClassNotFoundException {
- Class result = null;
- //do not load the "base" ant classes from the plugin class loaders
- //these should only be specified from the Ant runtime classpath preferences setting
- if (!(name.startsWith(ANT_PACKAGES_PREFIX))) {
- if (devMode) {
- if (shouldPluginsLoad(name)) {
- result= loadClassPlugins(name);
- }
- } else {
- result= loadClassPlugins(name);
- }
- }
- if (result == null) {
- result = loadClassURLs(name);
- }
- if (result == null) {
- throw new ClassNotFoundException(name);
- }
- return result;
- }
-
- /**
- * Used during development mode to disallow plugins from loading classes
- * that should be loaded only be this class loader.
- */
- private boolean shouldPluginsLoad(String name) {
- for (int i = 0; i < ECLIPSE_ANT_PACKAGES_PREFIXES.length; i++) {
- String prefix = ECLIPSE_ANT_PACKAGES_PREFIXES[i];
- if (name.startsWith(prefix)) {
- return false;
- }
- }
- return true;
- }
-
- protected Class loadClassURLs(String name) {
- try {
- return super.loadClass(name);
- } catch (ClassNotFoundException e) {
- // Ignore exception now. If necessary we'll throw
- // a ClassNotFoundException in loadClass(String)
- }
- return null;
- }
-
- protected Class loadClassPlugins(String name) {
- Class result = null;
- if (pluginLoaders != null) {
- for (int i = 0; (i < pluginLoaders.length) && (result == null); i++) {
- try {
- result = pluginLoaders[i].loadClass(name);
- } catch (ClassNotFoundException e) {
- // Ignore exception now. If necessary we'll throw
- // a ClassNotFoundException in loadClass(String)
- }
- }
- }
- return result;
- }
-}
diff --git a/ant/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntObject.java b/ant/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntObject.java
deleted file mode 100644
index e516860..0000000
--- a/ant/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntObject.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.internal.core;
-
-
-import java.net.URL;
-
-public abstract class AntObject {
-
- protected String fClassName;
- protected URL fLibrary;
- protected String fName;
- private boolean fIsDefault= false;
-
- /**
- * Gets the className.
- * @return Returns a String
- */
- public String getClassName() {
- return fClassName;
- }
- /**
- * Sets the className.
- * @param className The className to set
- */
- public void setClassName(String className) {
- fClassName = className;
- }
- /**
- * Gets the library.
- * @return Returns a URL
- */
- public URL getLibrary() {
- return fLibrary;
- }
- /**
- * Sets the library.
- * @param library The library to set
- */
- public void setLibrary(URL library) {
- fLibrary = library;
- }
-
- /**
- * @see java.lang.Object#toString()
- */
- public String toString() {
- return fName;
- }
- /**
- * Returns whether this ant object has been created because of an extension
- * point definition.
- * @return boolean
- */
- public boolean isDefault() {
- return fIsDefault;
- }
-
- /**
- * Sets that this ant object has been created by the appropriate extension
- * point.
- * @param isDefault Whether this ant object has been created because of an
- * extension point defintion.
- */
- public void setIsDefault(boolean isDefault) {
- this.fIsDefault = isDefault;
- }
-
-}
diff --git a/ant/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/IAntCoreConstants.java b/ant/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/IAntCoreConstants.java
deleted file mode 100644
index f63245a..0000000
--- a/ant/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/IAntCoreConstants.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.internal.core;
-
-
-/**
- * Common constants.
- */
-public interface IAntCoreConstants {
-
- // default values
- public static final String DEFAULT_BUILD_FILENAME = "build.xml"; //$NON-NLS-1$
-
- // preferences
- public static final String PREFERENCE_TASKS = "tasks"; //$NON-NLS-1$
- public static final String PREFERENCE_TYPES = "types"; //$NON-NLS-1$
- public static final String PREFERENCE_URLS = "urls"; //$NON-NLS-1$
-
- public static final String PREFIX_TASK = "task."; //$NON-NLS-1$
- public static final String PREFIX_TYPE = "type."; //$NON-NLS-1$
-
- /**
- * Preferences
- * @since 2.1
- */
- public static final String PREFERENCE_ANT_URLS = "ant_urls"; //$NON-NLS-1$
- public static final String PREFERENCE_ANT_HOME = "ant_home"; //$NON-NLS-1$
- public static final String PREFERENCE_PROPERTIES = "properties"; //$NON-NLS-1$
- public static final String PREFERENCE_PROPERTY_FILES = "propertyfiles"; //$NON-NLS-1$
- public static final String PREFIX_PROPERTY = "property."; //$NON-NLS-1$
-}
diff --git a/ant/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/InternalCoreAntMessages.java b/ant/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/InternalCoreAntMessages.java
deleted file mode 100644
index 6c78b5f..0000000
--- a/ant/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/InternalCoreAntMessages.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.internal.core;
-
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class InternalCoreAntMessages {
-
- private static final String BUNDLE_NAME = "org.eclipse.ant.internal.core.InternalCoreAntMessages"; //$NON-NLS-1$
-
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
-
- private InternalCoreAntMessages() {
- }
-
- public static String getString(String key) {
- try {
- return RESOURCE_BUNDLE.getString(key);
- } catch (MissingResourceException e) {
- return '!' + key + '!';
- }
- }
-}
diff --git a/ant/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/InternalCoreAntMessages.properties b/ant/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/InternalCoreAntMessages.properties
deleted file mode 100644
index ed99e4c..0000000
--- a/ant/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/InternalCoreAntMessages.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-
-AntCorePreferences.Malformed_URL._1=Malformed URL.
-AntCorePreferences.Library_not_specified_for__{0}_4=Library not specified for: {0}
-AntCorePreferences.No_library_for_task=The library {0} specified via the antTasks extension point of {1} does not exist
-AntCorePreferences.No_library_for_type=The library {0} specified via the antTypes extension point of {1} does not exist
-AntCorePreferences.No_library_for_extraClasspathEntry=The library {0} specified via the extraClasspathEntries extension point of {1} does not exist
-
-AntRunner.Could_not_find_one_or_more_classes._Please_check_the_Ant_classpath._1=Could not find one or more classes. Please check the Ant classpath.
-AntRunner.Could_not_find_one_or_more_classes._Please_check_the_Ant_classpath._2=Could not find one or more classes: \"{0}\". Please check the Ant classpath.
-AntRunner.Build_Failed._3=BUILD FAILED
-AntRunner.Already_in_progess=Ant build {0} already in progress
diff --git a/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/AntSecurityManager.java b/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/AntSecurityManager.java
deleted file mode 100644
index f246339..0000000
--- a/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/AntSecurityManager.java
+++ /dev/null
@@ -1,404 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.internal.core.ant;
-
-
-import java.io.FileDescriptor;
-import java.net.InetAddress;
-import java.net.SocketPermission;
-import java.security.Permission;
-
-import org.eclipse.ant.core.AntSecurityException;
-
-/**
- * A security manager that always throws an <code>AntSecurityException</code>
- * if the calling thread attempts to cause the Java Virtual Machine to
- * exit/halt.
- * Otherwise this manager just delegates to the pre-existing manager
- * passed in the constructor.
- */
-public class AntSecurityManager extends SecurityManager {
-
- protected SecurityManager securityManager= null;
-
- protected AntSecurityManager(SecurityManager securityManager) {
- this.securityManager= securityManager;
- }
- /**
- * @see java.lang.SecurityManager#checkExit(int)
- */
- public void checkExit(int status) {
- //no exit allowed...System.exit is being called
- //by some ant task...do not want Eclipse to exit if
- //in the same VM,
- //The message is used in loggers to determine that this is
- //not really an exception case.
- throw new AntSecurityException();
- }
- /**
- * @see java.lang.SecurityManager#checkAccept(java.lang.String, int)
- */
- public void checkAccept(String host, int port) {
- if (securityManager != null) {
- securityManager.checkAccept(host, port);
- }
- }
-
- /**
- * @see java.lang.SecurityManager#checkAccess(java.lang.Thread)
- */
- public void checkAccess(Thread t) {
- if (securityManager != null) {
- securityManager.checkAccess(t);
- }
- }
-
- /**
- * @see java.lang.SecurityManager#checkAccess(java.lang.ThreadGroup)
- */
- public void checkAccess(ThreadGroup g) {
- if (securityManager != null) {
- securityManager.checkAccess(g);
- }
- }
-
- /**
- * @see java.lang.SecurityManager#checkAwtEventQueueAccess()
- */
- public void checkAwtEventQueueAccess() {
- if (securityManager != null) {
- securityManager.checkAwtEventQueueAccess();
- }
- }
-
- /**
- * @see java.lang.SecurityManager#checkConnect(java.lang.String, int, java.lang.Object)
- */
- public void checkConnect(String host, int port, Object context) {
- if (securityManager != null) {
- securityManager.checkConnect(host, port, context);
- }
- }
-
- /**
- * @see java.lang.SecurityManager#checkConnect(java.lang.String, int)
- */
- public void checkConnect(String host, int port) {
- if (securityManager != null) {
- securityManager.checkConnect(host, port);
- }
- }
-
- /**
- * @see java.lang.SecurityManager#checkCreateClassLoader()
- */
- public void checkCreateClassLoader() {
- if (securityManager != null) {
- securityManager.checkCreateClassLoader();
- }
- }
-
- /**
- * @see java.lang.SecurityManager#checkDelete(java.lang.String)
- */
- public void checkDelete(String file) {
- if (securityManager != null) {
- securityManager.checkDelete(file);
- }
- }
-
- /**
- * @see java.lang.SecurityManager#checkExec(java.lang.String)
- */
- public void checkExec(String cmd) {
- if (securityManager != null) {
- securityManager.checkExec(cmd);
- }
- }
-
- /**
- * @see java.lang.SecurityManager#checkLink(java.lang.String)
- */
- public void checkLink(String lib) {
- if (securityManager != null) {
- securityManager.checkLink(lib);
- }
- }
-
- /**
- * @see java.lang.SecurityManager#checkListen(int)
- */
- public void checkListen(int port) {
- if (securityManager != null) {
- securityManager.checkListen(port);
- }
- }
-
- /**
- * @see java.lang.SecurityManager#checkMemberAccess(java.lang.Class, int)
- */
- public void checkMemberAccess(Class clazz, int which) {
- if (securityManager != null) {
- securityManager.checkMemberAccess(clazz, which);
- }
- }
-
- /**
- * @see java.lang.SecurityManager#checkMulticast(java.net.InetAddress, byte)
- * @deprecated
- */
- public void checkMulticast(InetAddress maddr, byte ttl) {
- if (securityManager != null) {
- String host = maddr.getHostAddress();
- if (!host.startsWith("[") && host.indexOf(':') != -1) { //$NON-NLS-1$
- host = "[" + host + "]"; //$NON-NLS-1$ //$NON-NLS-2$
- }
- checkPermission(new SocketPermission(host, "accept,connect")); //$NON-NLS-1$
- }
- }
-
- /**
- * @see java.lang.SecurityManager#checkMulticast(java.net.InetAddress)
- */
- public void checkMulticast(InetAddress maddr) {
- if (securityManager != null) {
- securityManager.checkMulticast(maddr);
- }
- }
-
- /**
- * @see java.lang.SecurityManager#checkPackageAccess(java.lang.String)
- */
- public void checkPackageAccess(String pkg) {
- if (securityManager != null) {
- securityManager.checkPackageAccess(pkg);
- }
- }
-
- /**
- * @see java.lang.SecurityManager#checkPackageDefinition(java.lang.String)
- */
- public void checkPackageDefinition(String pkg) {
- if (securityManager != null) {
- securityManager.checkPackageDefinition(pkg);
- }
- }
-
- /**
- * @see java.lang.SecurityManager#checkPermission(java.security.Permission, java.lang.Object)
- */
- public void checkPermission(Permission perm, Object context) {
- if (securityManager != null) {
- securityManager.checkPermission(perm, context);
- }
- }
-
- /**
- * @see java.lang.SecurityManager#checkPermission(java.security.Permission)
- */
- public void checkPermission(Permission perm) {
- if (securityManager != null) {
- securityManager.checkPermission(perm);
- }
- }
-
- /**
- * @see java.lang.SecurityManager#checkPrintJobAccess()
- */
- public void checkPrintJobAccess() {
- if (securityManager != null) {
- securityManager.checkPrintJobAccess();
- }
- }
-
- /**
- * @see java.lang.SecurityManager#checkPropertiesAccess()
- */
- public void checkPropertiesAccess() {
- if (securityManager != null) {
- securityManager.checkPropertiesAccess();
- }
- }
-
- /**
- * @see java.lang.SecurityManager#checkPropertyAccess(java.lang.String)
- */
- public void checkPropertyAccess(String key) {
- if (securityManager != null) {
- securityManager.checkPropertyAccess(key);
- }
- }
-
- /**
- * @see java.lang.SecurityManager#checkRead(java.io.FileDescriptor)
- */
- public void checkRead(FileDescriptor fd) {
- if (securityManager != null) {
- securityManager.checkRead(fd);
- }
- }
-
- /**
- * @see java.lang.SecurityManager#checkRead(java.lang.String, java.lang.Object)
- */
- public void checkRead(String file, Object context) {
- if (securityManager != null) {
- securityManager.checkRead(file, context);
- }
- }
-
- /**
- * @see java.lang.SecurityManager#checkRead(java.lang.String)
- */
- public void checkRead(String file) {
- if (securityManager != null) {
- securityManager.checkRead(file);
- }
- }
-
- /**
- * @see java.lang.SecurityManager#checkSecurityAccess(java.lang.String)
- */
- public void checkSecurityAccess(String target) {
- if (securityManager != null) {
- securityManager.checkSecurityAccess(target);
- }
- }
-
- /**
- * @see java.lang.SecurityManager#checkSetFactory()
- */
- public void checkSetFactory() {
- if (securityManager != null) {
- securityManager.checkSetFactory();
- }
- }
-
- /**
- * @see java.lang.SecurityManager#checkSystemClipboardAccess()
- */
- public void checkSystemClipboardAccess() {
- if (securityManager != null) {
- securityManager.checkSystemClipboardAccess();
- }
- }
-
- /**
- * @see java.lang.SecurityManager#checkTopLevelWindow(java.lang.Object)
- */
- public boolean checkTopLevelWindow(Object window) {
- if (securityManager != null) {
- return securityManager.checkTopLevelWindow(window);
- }
- return false;
- }
-
- /**
- * @see java.lang.SecurityManager#checkWrite(java.io.FileDescriptor)
- */
- public void checkWrite(FileDescriptor fd) {
- if (securityManager != null) {
- securityManager.checkWrite(fd);
- }
- }
-
- /**
- * @see java.lang.SecurityManager#checkWrite(java.lang.String)
- */
- public void checkWrite(String file) {
- if (securityManager != null) {
- securityManager.checkWrite(file);
- }
- }
-
- /**
- * @see java.lang.SecurityManager#classDepth(java.lang.String)
- * @deprecated
- */
- protected int classDepth(String name) {
- return -1;
- }
-
- /**
- * @see java.lang.SecurityManager#classLoaderDepth()
- * @deprecated
- */
- protected int classLoaderDepth() {
- return -1;
- }
-
- /**
- * @see java.lang.SecurityManager#currentClassLoader()
- * @deprecated
- */
- protected ClassLoader currentClassLoader() {
- return null;
- }
-
- /**
- * @see java.lang.SecurityManager#currentLoadedClass()
- * @deprecated
- */
- protected Class currentLoadedClass() {
- return null;
- }
-
- /**
- * @see java.lang.SecurityManager#getClassContext()
- */
- protected Class[] getClassContext() {
- return super.getClassContext();
- }
-
- /**
- * @see java.lang.SecurityManager#getInCheck()
- * @deprecated
- */
- public boolean getInCheck() {
- return false;
- }
-
- /**
- * @see java.lang.SecurityManager#getSecurityContext()
- */
- public Object getSecurityContext() {
- if (securityManager != null) {
- return securityManager.getSecurityContext();
- }
- return null;
- }
-
- /**
- * @see java.lang.SecurityManager#getThreadGroup()
- */
- public ThreadGroup getThreadGroup() {
- if (securityManager != null) {
- securityManager.getThreadGroup();
- }
- return null;
- }
-
- /**
- * @see java.lang.SecurityManager#inClass(java.lang.String)
- * @deprecated
- */
- protected boolean inClass(String name) {
- return false;
- }
-
- /**
- * @see java.lang.SecurityManager#inClassLoader()
- * @deprecated
- */
- protected boolean inClassLoader() {
- return false;
- }
-}
diff --git a/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/InputHandlerSetter.java b/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/InputHandlerSetter.java
deleted file mode 100644
index 772a01c..0000000
--- a/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/InputHandlerSetter.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.internal.core.ant;
-
-
-import java.text.MessageFormat;
-
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.input.DefaultInputHandler;
-import org.apache.tools.ant.input.InputHandler;
-
-/**
- * This class exists so that the Ant integration has backwards compatibility
- * with Ant releases previous to 1.5. InputHandlers are a new feature of Ant 1.5.
- */
-class InputHandlerSetter {
-
- protected void setInputHandler(Project project, String inputHandlerClassname) {
- InputHandler handler = null;
- if (inputHandlerClassname == null) {
- handler = new DefaultInputHandler();
- } else {
- try {
- handler = (InputHandler)(Class.forName(inputHandlerClassname).newInstance());
- } catch (ClassCastException e) {
- String msg = MessageFormat.format(InternalAntMessages.getString("InternalAntRunner.The_specified_input_handler_class_{0}_does_not_implement_the_org.apache.tools.ant.input.InputHandler_interface_5"), new String[]{inputHandlerClassname}); //$NON-NLS-1$
- throw new BuildException(msg, e);
- } catch (Exception e) {
- String msg = MessageFormat.format(InternalAntMessages.getString("InternalAntRunner.Unable_to_instantiate_specified_input_handler_class_{0}___{1}_6"), new String[]{inputHandlerClassname, e.getClass().getName()}); //$NON-NLS-1$
- throw new BuildException(msg, e);
- }
- }
- project.setInputHandler(handler);
- }
-}
diff --git a/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/InternalAntMessages.java b/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/InternalAntMessages.java
deleted file mode 100644
index 957f3b1..0000000
--- a/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/InternalAntMessages.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.internal.core.ant;
-
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class InternalAntMessages {
-
- private static final String BUNDLE_NAME = "org.eclipse.ant.internal.core.ant.InternalAntMessages"; //$NON-NLS-1$
-
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
-
- private InternalAntMessages() {
- }
-
- public static String getString(String key) {
- try {
- return RESOURCE_BUNDLE.getString(key);
- } catch (MissingResourceException e) {
- return '!' + key + '!';
- }
- }
-}
diff --git a/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/InternalAntMessages.properties b/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/InternalAntMessages.properties
deleted file mode 100644
index d15f8d6..0000000
--- a/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/InternalAntMessages.properties
+++ /dev/null
@@ -1,70 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-
-InternalAntRunner.Build_file__{0}_1=Buildfile: {0}
-InternalAntRunner.Arguments__{0}_2=Arguments: {0}
-InternalAntRunner.Default_target__3=Default target:
-InternalAntRunner.Main_targets__4=Main targets:
-InternalAntRunner.Subtargets__5=Subtargets:
-InternalAntRunner.Unable_to_instantiate_logger__{0}_6=Unable to instantiate logger: {0}
-InternalAntRunner.options_13=options
-InternalAntRunner.target_15=target
-InternalAntRunner.Options___21=Options:
-InternalAntRunner.print_this_message_23=print this message
-InternalAntRunner.print_project_help_information_25=print project help information
-InternalAntRunner.print_the_version_information_and_exit_27=print the version information and exit
-InternalAntRunner.be_extra_quiet_29=be extra quiet
-InternalAntRunner.be_extra_verbose_31=be extra verbose
-InternalAntRunner.print_debugging_information_33=print debugging information
-InternalAntRunner.produce_logging_information_without_adornments_35=produce logging information without adornments
-InternalAntRunner.use_given_file_for_log_37=use given file for log
-InternalAntRunner.the_class_which_is_to_perform_logging_39=the class which is to perform logging
-InternalAntRunner.add_an_instance_of_class_as_a_project_listener_41=add an instance of class as a project listener
-InternalAntRunner.use_given_buildfile_43=use given buildfile
-InternalAntRunner.use_value_for_given_property_45=use value for given property
-InternalAntRunner.Using_{0}_file_as_build_log._1=Using {0} file as build log.
-InternalAntRunner.Could_not_write_to_the_specified_log_file__{0}._Make_sure_the_path_exists_and_you_have_write_permissions._2=Cannot write on the specified log file: {0}. Make sure the path exists and you have write permissions.
-InternalAntRunner.BUILD_SUCCESSFUL_1=BUILD SUCCESSFUL
-InternalAntRunner.Unknown_argument__{0}_2=Unknown argument: {0}
-InternalAntRunner.Buildfile__{0}_does_not_exist_!_1=Buildfile: {0} does not exist
-InternalAntRunner.{0}_which_was_specified_to_be_a_build_listener_is_not_an_instance_of_org.apache.tools.ant.BuildListener._1={0} which was specified to be a build listener is not an instance of org.apache.tools.ant.BuildListener.
-InternalAntRunner.{0}_which_was_specified_to_perform_logging_is_not_an_instance_of_org.apache.tools.ant.BuildLogger._2={0} which was specified to perform logging is not an instance of org.apache.tools.ant.BuildLogger.
-InternalAntRunner.You_must_specify_a_classname_when_using_the_-listener_argument_1=You must specify a classname when using the -listener argument
-InternalAntRunner.You_must_specify_a_classname_when_using_the_-logger_argument_2=You must specify a classname when using the -logger argument
-InternalAntRunner.You_must_specify_a_log_file_when_using_the_-log_argument_3=You must specify a log file when using the -log argument
-InternalAntRunner.You_must_specify_a_buildfile_when_using_the_-buildfile_argument_4=You must specify a buildfile when using the -buildfile argument
-InternalAntRunner.print_information_that_might_be_helpful_to_12=print information that might be helpful to
-InternalAntRunner._t_t_t_t_t_t_t_t_t_t_tdiagnose_or_report_problems._13=\t\t\t\t\t\t\t\t\t\t\tdiagnose or report problems.
-InternalAntRunner._t_t_t_t_t_t_t_t_____15=\t\t\t\t\t\t\t\t\'\'
-InternalAntRunner.load_all_properties_from_file_with_-D_19=load all properties from file with -D
-InternalAntRunner._t_t_t_t_t_t_t_t_t_t_tproperties_taking_precedence_20=\t\t\t\t\t\t\t\t\t\t\tproperties taking precedence
-InternalAntRunner.the_class_which_will_handle_input_requests_22=the class which will handle input requests
-InternalAntRunner._t_t_t_t_t_t_t_____1=\t\t\t\t\t\t\t\'\'
-InternalAntRunner.Class_{0}_not_found_for_task_{1}_1=Class {0} not found for task {1}
-InternalAntRunner.Class_{0}_not_found_for_type_{1}_2=Class {0} not found for type {1}
-InternalAntRunner.Only_one_logger_class_may_be_specified_1=Only one logger class may be specified
-InternalAntRunner.You_must_specify_a_classname_when_using_the_-inputhandler_argument_1=You must specify a classname when using the -inputhandler argument
-InternalAntRunner.Only_one_input_handler_class_may_be_specified._2=Only one input handler class may be specified.
-InternalAntRunner.You_must_specify_a_property_filename_when_using_the_-propertyfile_argument_3=You must specify a property filename when using the -propertyfile argument
-InternalAntRunner.Could_not_load_property_file_{0}__{1}_4=Could not load property file {0}: {1}
-InternalAntRunner.The_specified_input_handler_class_{0}_does_not_implement_the_org.apache.tools.ant.input.InputHandler_interface_5=The specified input handler class {0} does not implement the org.apache.tools.ant.input.InputHandler interface
-InternalAntRunner.Unable_to_instantiate_specified_input_handler_class_{0}___{1}_6=Unable to instantiate specified input handler class {0} : {1}
-InternalAntRunner.Specifying_an_InputHandler_is_an_Ant_1.5.*_feature._Please_update_your_Ant_classpath_to_include_an_Ant_version_greater_than_this._2=Specifying an InputHandler is an Ant 1.5.* feature. Please update your Ant classpath to include an Ant version greater than this.
-InternalAntRunner.The_diagnositics_options_is_an_Ant_1.5.*_feature._Please_update_your_Ant_classpath_to_include_an_Ant_version_greater_than_this._4=The diagnositics options is an Ant 1.5.* feature. Please update your Ant classpath to include an Ant version greater than this.
-InternalAntRunner.Specifying_property_files_is_a_Ant_1.5.*_feature._Please_update_your_Ant_classpath._6=Specifying property files is a Ant 1.5.* feature. Please update your Ant classpath to include an Ant version greater than this.
-InternalAntRunner.Default_target_{0}{1}{2}_does_not_exist_in_this_project_1=Default target {0}{1}{2} does not exist in this project
-InternalAntRunner.ANT_HOME_must_be_set_to_use_Ant_diagnostics_2=ANT_HOME must be set to use Ant diagnostics
-InternalAntRunner.Buildfile__{0}_is_not_a_file_1=Buildfile: {0} is not a file
-InternalAntRunner.-find_not_supported=-find not supported.\nCan be emulated using Run As > Ant Build located\nin the Run > External Tools menu
-InternalAntRunner.Error_setting_Ant_task=Error setting Ant task {0}
-InternalAntRunner.Missing_Class=Could not load a class required for parsing targets
-
-ProgressBuildListener.Build_cancelled._5=Build cancelled.
diff --git a/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/InternalAntRunner.java b/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/InternalAntRunner.java
deleted file mode 100644
index da45942..0000000
--- a/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/InternalAntRunner.java
+++ /dev/null
Binary files differ
diff --git a/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/InternalProject.java b/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/InternalProject.java
deleted file mode 100644
index 5f4b871..0000000
--- a/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/InternalProject.java
+++ /dev/null
@@ -1,224 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.ant.internal.core.ant;
-
-/*
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 1999, 2000 The Apache Software Foundation. All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- * any, must include the following acknowlegement:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowlegement may appear in the software itself,
- * if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "The Jakarta Project", "Ant", and "Apache Software
- * Foundation" must not be used to endorse or promote products derived
- * from this software without prior written permission. For written
- * permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache"
- * nor may "Apache" appear in their names without prior written
- * permission of the Apache Group.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation. For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-
-/**********************************************************************
-Copyright (c) 2003 IBM Corp. All rights reserved.
-This file is made available under the terms of the Common Public License v1.0
-which accompanies this distribution, and is available at
-http://www.eclipse.org/legal/cpl-v10.html
-**********************************************************************/
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Properties;
-
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.ProjectComponent;
-
-/**
- * A subclass of Project to facilitate "faster" parsing with
- * less garbage generated. This class is not used on Ant 1.6 and newer
- * due to the improvements in lazy loading of these Ant versions.
- *
- * Only three tasks are loaded (property, taskdef and
- * typedef: three tasks that can be defined outside of a target on Ant 1.5.1 or older).
- *
- * Datatypes are loaded if requested.
- *
- * Derived from the original Ant Project class
- */
-public class InternalProject extends Project {
-
- private Hashtable typeNameToClass = null;
-
- public InternalProject() {
- super();
- }
-
- /* (non-Javadoc)
- * @see org.apache.tools.ant.Project#init()
- */
- public void init() throws BuildException {
- setJavaVersionProperty();
-
- try {
- Class taskClass = Class.forName("org.apache.tools.ant.taskdefs.Property"); //$NON-NLS-1$
- addTaskDefinition("property", taskClass); //$NON-NLS-1$
- taskClass = Class.forName("org.apache.tools.ant.taskdefs.Typedef"); //$NON-NLS-1$
- addTaskDefinition("typedef", taskClass); //$NON-NLS-1$
- taskClass = Class.forName("org.apache.tools.ant.taskdefs.Taskdef"); //$NON-NLS-1$
- addTaskDefinition("taskdef", taskClass); //$NON-NLS-1$
- } catch (NoClassDefFoundError e) {
- throw new BuildException(InternalAntMessages.getString("InternalAntRunner.Missing_Class"), e); //$NON-NLS-1$
- } catch (ClassNotFoundException c) {
- throw new BuildException(InternalAntMessages.getString("InternalAntRunner.Missing_Class"), c); //$NON-NLS-1$
- }
-
- setSystemProperties();
- }
-
- /* (non-Javadoc)
- * @see org.apache.tools.ant.Project#createDataType(java.lang.String)
- */
- public Object createDataType(String typeName) throws BuildException {
- if (typeNameToClass == null) {
- initializeTypes();
- }
- Class typeClass = (Class) typeNameToClass.get(typeName);
-
- if (typeClass == null) {
- return null;
- }
-
- try {
- Constructor ctor = null;
- boolean noArg = false;
- // DataType can have a "no arg" constructor or take a single
- // Project argument.
- try {
- ctor = typeClass.getConstructor(new Class[0]);
- noArg = true;
- } catch (NoSuchMethodException nse) {
- ctor = typeClass.getConstructor(new Class[] { Project.class });
- noArg = false;
- }
-
- Object o = null;
- if (noArg) {
- o = ctor.newInstance(new Object[0]);
- } else {
- o = ctor.newInstance(new Object[] { this });
- }
- if (o instanceof ProjectComponent) {
- ((ProjectComponent) o).setProject(this);
- }
- return o;
- } catch (InvocationTargetException ite) {
- return null;
- } catch (Throwable t) {
- return null;
- }
- }
-
- /**
- * Initialize the mapping of data type name to data type classname
- */
- private void initializeTypes() {
- typeNameToClass = new Hashtable(18);
- String dataDefs = "/org/apache/tools/ant/types/defaults.properties"; //$NON-NLS-1$
- try {
- Properties props = new Properties();
- InputStream in = Project.class.getResourceAsStream(dataDefs);
- if (in == null) {
- return;
- }
- props.load(in);
- in.close();
-
- Enumeration enum = props.propertyNames();
- while (enum.hasMoreElements()) {
- String typeName = (String) enum.nextElement();
- String className = props.getProperty(typeName);
- try {
- Class typeClass= Class.forName(className);
- typeNameToClass.put(typeName, typeClass);
- } catch (NoClassDefFoundError e) {
- //ignore
- } catch (ClassNotFoundException c) {
- //ignore
- }
- }
- } catch (IOException ioe) {
- return;
- }
-
- }
-
- /* (non-Javadoc)
- * @see org.apache.tools.ant.Project#getDataTypeDefinitions()
- */
- public Hashtable getDataTypeDefinitions() {
- if (typeNameToClass == null) {
- initializeTypes();
- }
- return typeNameToClass;
- }
-
- /* (non-Javadoc)
- * @see org.apache.tools.ant.Project#addDataTypeDefinition(java.lang.String, java.lang.Class)
- */
- public void addDataTypeDefinition(String typeName, Class typeClass) {
- getDataTypeDefinitions();
- typeNameToClass.put(typeName, typeClass);
- }
-}
diff --git a/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/ProgressBuildListener.java b/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/ProgressBuildListener.java
deleted file mode 100644
index 37a98c6..0000000
--- a/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/ProgressBuildListener.java
+++ /dev/null
@@ -1,295 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.internal.core.ant;
-
-
-import java.util.*;
-
-import org.apache.tools.ant.*;
-import org.apache.tools.ant.taskdefs.Ant;
-import org.apache.tools.ant.taskdefs.CallTarget;
-import org.eclipse.ant.core.AntCorePlugin;
-import org.eclipse.core.runtime.*;
-
-/**
- * Reports progress and checks for cancelation of a script execution.
- */
-public class ProgressBuildListener implements BuildListener {
-
- protected Map projects;
- protected Project mainProject;
- protected Project parentProject;
- private Thread currentTaskThread;
-
- /**
- * Contains the progress monitor instances for the various
- * projects in a chain.
- */
- protected class ProjectMonitors {
- /**
- * This field is null for the main project
- */
- private Target mainTarget;
- private IProgressMonitor mainMonitor;
- private IProgressMonitor targetMonitor;
- private IProgressMonitor taskMonitor;
-
- protected IProgressMonitor getMainMonitor() {
- return mainMonitor;
- }
-
- protected Target getMainTarget() {
- return mainTarget;
- }
-
- protected IProgressMonitor getTargetMonitor() {
- return targetMonitor;
- }
-
- protected IProgressMonitor getTaskMonitor() {
- return taskMonitor;
- }
-
- protected void setMainMonitor(IProgressMonitor mainMonitor) {
- this.mainMonitor = mainMonitor;
- }
-
- protected void setMainTarget(Target mainTarget) {
- this.mainTarget = mainTarget;
- }
-
- protected void setTargetMonitor(IProgressMonitor targetMonitor) {
- this.targetMonitor = targetMonitor;
- }
-
- protected void setTaskMonitor(IProgressMonitor taskMonitor) {
- this.taskMonitor = taskMonitor;
- }
-
- }
-
- public ProgressBuildListener(Project project, List targetNames, IProgressMonitor monitor) {
- projects = new HashMap();
- mainProject = project;
- ProjectMonitors monitors = new ProjectMonitors();
- if (monitor == null) {
- monitor= new NullProgressMonitor();
- }
- monitors.setMainMonitor(monitor);
- projects.put(mainProject, monitors);
- List targets= new ArrayList(targetNames.size());
- for (int i = 0; i < targetNames.size(); i++) {
- String targetName = (String) targetNames.get(i);
- Target target= (Target) mainProject.getTargets().get(targetName);
- if (target != null) {
- targets.add(target);
- }
- }
- int work = computeWork(targets);
- monitors.getMainMonitor().beginTask("", work); //$NON-NLS-1$
- }
-
- /**
- * @see org.apache.tools.ant.BuildListener#buildStarted(org.apache.tools.ant.BuildEvent)
- */
- public void buildStarted(BuildEvent event) {
- checkCanceled();
- }
-
- protected int computeWork(List targets) {
- int result = 0;
- for (int i = 0; i < targets.size(); i++) {
- result = result + countTarget((Target)targets.get(i));
- }
- return result;
- }
-
- protected int countTarget(Target target) {
- int result = 1;
- Project project = target.getProject();
- Hashtable targets= project.getTargets();
- for (Enumeration dependencies = target.getDependencies(); dependencies.hasMoreElements();) {
- String targetName = (String) dependencies.nextElement();
- Target dependency = (Target)targets.get(targetName);
- if (dependency != null) {
- result = result + countTarget(dependency);
- }
- }
- // we have to handle antcall tasks as well
- Task[] tasks = target.getTasks();
- for (int i = 0; i < tasks.length; i++) {
- if (tasks[i] instanceof CallTarget) {
- // As we do not have access to the information (at least in Ant 1.4.1)
- // describing what target is executed by this antcall task, we assume
- // a scenario where it depends on all targets of the project but itself.
- result = result + (targets.size() - 1);
- }
- }
- return result;
- }
-
- /**
- * @see org.apache.tools.ant.BuildListener#buildFinished(org.apache.tools.ant.BuildEvent)
- */
- public void buildFinished(BuildEvent event) {
- ProjectMonitors monitors = (ProjectMonitors) projects.get(mainProject);
- monitors.getMainMonitor().done();
- Set keys= projects.keySet();
- Iterator itr= keys.iterator();
- while (itr.hasNext()) {
- Project project = (Project) itr.next();
- project.removeBuildListener(this);
- project.getReferences().remove(AntCorePlugin.ECLIPSE_PROGRESS_MONITOR);
- }
- }
-
- /**
- * @see org.apache.tools.ant.BuildListener#targetStarted(org.apache.tools.ant.BuildEvent)
- */
- public void targetStarted(BuildEvent event) {
- checkCanceled();
- Project currentProject = event.getProject();
- if (currentProject == null) {
- return;
- }
- Target target = event.getTarget();
- ProjectMonitors monitors = (ProjectMonitors) projects.get(currentProject);
-
- // if monitors is null we are in a new script
- if (monitors == null) {
- monitors = createMonitors(currentProject, target);
- }
-
- monitors.setTargetMonitor(subMonitorFor(monitors.getMainMonitor(), 1));
- int work = (target != null) ? target.getTasks().length : 100;
- monitors.getTargetMonitor().beginTask("", work); //$NON-NLS-1$
- }
-
- protected ProjectMonitors createMonitors(Project currentProject, Target target) {
- ProjectMonitors monitors = new ProjectMonitors();
- // remember the target so we can remove this monitors object later
- monitors.setMainTarget(target);
- List targets= new ArrayList(1);
- targets.add(target);
- int work = computeWork(targets);
- ProjectMonitors parentMonitors = null;
- if (parentProject == null) {
- parentMonitors = (ProjectMonitors) projects.get(mainProject);
- monitors.setMainMonitor(subMonitorFor(parentMonitors.getMainMonitor(), 1));
- } else {
- parentMonitors = (ProjectMonitors) projects.get(parentProject);
- parentProject = null;
- monitors.setMainMonitor(subMonitorFor(parentMonitors.getTaskMonitor(), 1));
- }
- monitors.getMainMonitor().beginTask("", work); //$NON-NLS-1$
- projects.put(currentProject, monitors);
- return monitors;
- }
-
- /**
- * @see org.apache.tools.ant.BuildListener#targetFinished(org.apache.tools.ant.BuildEvent)
- */
- public void targetFinished(BuildEvent event) {
- checkCanceled();
- Project currentProject = event.getProject();
- if (currentProject == null) {
- return;
- }
- ProjectMonitors monitors = (ProjectMonitors) projects.get(currentProject);
- if (monitors == null) {
- return;
- }
- monitors.getTargetMonitor().done();
- // if this is not the main project test if we are done with this project
- if ((currentProject != mainProject) && (monitors.getMainTarget() == event.getTarget())) {
- monitors.getMainMonitor().done();
- projects.remove(currentProject);
- }
- }
-
- /**
- * @see org.apache.tools.ant.BuildListener#taskStarted(org.apache.tools.ant.BuildEvent)
- */
- public void taskStarted(BuildEvent event) {
- checkCanceled();
- Project currentProject = event.getProject();
- if (currentProject == null) {
- return;
- }
- currentProject.getReferences().remove(AntCorePlugin.ECLIPSE_PROGRESS_MONITOR);
- ProjectMonitors monitors = (ProjectMonitors) projects.get(currentProject);
- if (monitors == null) {
- return;
- }
- Task task = event.getTask();
- if (task == null) {
- return;
- }
- currentTaskThread= Thread.currentThread();
- monitors.setTaskMonitor(subMonitorFor(monitors.getTargetMonitor(), 1));
- monitors.getTaskMonitor().beginTask("", 1); //$NON-NLS-1$
- // If this script is calling another one, track the project chain.
- if (task instanceof Ant) {
- parentProject = currentProject;
- } else {
- currentProject.addReference(AntCorePlugin.ECLIPSE_PROGRESS_MONITOR, monitors.getTaskMonitor());
- }
- }
-
- /**
- * @see org.apache.tools.ant.BuildListener#taskFinished(org.apache.tools.ant.BuildEvent)
- */
- public void taskFinished(BuildEvent event) {
- checkCanceled();
- Project project = event.getProject();
- if (project == null) {
- return;
- }
- project.getReferences().remove(AntCorePlugin.ECLIPSE_PROGRESS_MONITOR);
- ProjectMonitors monitors = (ProjectMonitors) projects.get(project);
- if (monitors == null) {
- return;
- }
- monitors.getTaskMonitor().done();
- currentTaskThread= null;
- }
-
- /**
- * @see org.apache.tools.ant.BuildListener#messageLogged(org.apache.tools.ant.BuildEvent)
- */
- public void messageLogged(BuildEvent event) {
- checkCanceled();
- }
-
- protected void checkCanceled() {
- //only cancel if the current task thread matches the current thread
- //do not want to throw an exception in a separate thread or process
- //see bug 32657
- if (currentTaskThread != null && currentTaskThread != Thread.currentThread()) {
- return;
- }
- ProjectMonitors monitors = (ProjectMonitors) projects.get(mainProject);
- if (monitors.getMainMonitor().isCanceled()) {
- currentTaskThread= null;
- throw new OperationCanceledException(InternalAntMessages.getString("ProgressBuildListener.Build_cancelled._5")); //$NON-NLS-1$
- }
- }
-
- protected IProgressMonitor subMonitorFor(IProgressMonitor monitor, int ticks) {
- if (monitor == null) {
- return new NullProgressMonitor();
- }
- if (monitor instanceof NullProgressMonitor) {
- return monitor;
- }
- return new SubProgressMonitor(monitor, ticks);
- }
-}
diff --git a/ant/org.eclipse.ant.tests.core/.classpath b/ant/org.eclipse.ant.tests.core/.classpath
deleted file mode 100644
index 6026612..0000000
--- a/ant/org.eclipse.ant.tests.core/.classpath
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="test plugin"/>
- <classpathentry kind="src" path="tests"/>
- <classpathentry kind="src" path="test support"/>
- <classpathentry kind="src" path="/org.apache.ant"/>
- <classpathentry kind="src" path="/org.junit"/>
- <classpathentry kind="src" path="/org.eclipse.core.resources"/>
- <classpathentry kind="src" path="/org.apache.xerces"/>
- <classpathentry kind="src" path="/org.eclipse.jdt.core"/>
- <classpathentry kind="src" path="/org.eclipse.ui"/>
- <classpathentry kind="src" path="/org.eclipse.ant.core"/>
- <classpathentry kind="src" path="/org.eclipse.update.core"/>
- <classpathentry kind="src" path="/org.eclipse.core.runtime"/>
- <classpathentry kind="src" path="/org.eclipse.core.boot"/>
- <classpathentry kind="var" path="JRE_LIB" rootpath="JRE_SRCROOT" sourcepath="JRE_SRC"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/ant/org.eclipse.ant.tests.core/.cvsignore b/ant/org.eclipse.ant.tests.core/.cvsignore
deleted file mode 100644
index 57b480f..0000000
--- a/ant/org.eclipse.ant.tests.core/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-bin
-lib
diff --git a/ant/org.eclipse.ant.tests.core/.project b/ant/org.eclipse.ant.tests.core/.project
deleted file mode 100644
index 87d1449..0000000
--- a/ant/org.eclipse.ant.tests.core/.project
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.ant.tests.core</name>
- <comment></comment>
- <projects>
- <project>org.apache.ant</project>
- <project>org.apache.xerces</project>
- <project>org.eclipse.ant.core</project>
- <project>org.eclipse.core.boot</project>
- <project>org.eclipse.core.resources</project>
- <project>org.eclipse.core.runtime</project>
- <project>org.eclipse.jdt.core</project>
- <project>org.eclipse.ui</project>
- <project>org.eclipse.update.core</project>
- <project>org.junit</project>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/ant/org.eclipse.ant.tests.core/about.html b/ant/org.eclipse.ant.tests.core/about.html
deleted file mode 100644
index d57b432..0000000
--- a/ant/org.eclipse.ant.tests.core/about.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>16th October, 2002</p>
-<h3>License</h3>
-<p>Eclipse.org makes available all content in this plug-in ("Content"). Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
-Common Public License Version 1.0 ("CPL"). A copy of the CPL is available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>.
-For purposes of the CPL, "Program" will mean the Content.</p>
-
-<h3>Contributions</h3>
-
-<p>If this Content is licensed to you under the terms and conditions of the CPL, any Contributions, as defined in the CPL, uploaded, submitted, or otherwise
-made available to Eclipse.org, members of Eclipse.org and/or the host of Eclipse.org web site, by you that relate to such
-Content are provided under the terms and conditions of the CPL and can be made available to others under the terms of the CPL.</p>
-
-<p>If this Content is licensed to you under license terms and conditions other than the CPL ("Other License"), any modifications, enhancements and/or
-other code and/or documentation ("Modifications") uploaded, submitted, or otherwise made available to Eclipse.org, members of Eclipse.org and/or the
-host of Eclipse.org, by you that relate to such Content are provided under terms and conditions of the Other License and can be made available
-to others under the terms of the Other License. In addition, with regard to Modifications for which you are the copyright holder, you are also
-providing the Modifications under the terms and conditions of the CPL and such Modifications can be made available to others under the terms of
-the CPL.</p>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/ant/org.eclipse.ant.tests.core/build.properties b/ant/org.eclipse.ant.tests.core/build.properties
deleted file mode 100644
index b5a6a8b..0000000
--- a/ant/org.eclipse.ant.tests.core/build.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = plugin.xml,\
- plugin.properties,\
- test.xml,\
- about.html,\
- testbuildfiles/,\
- testresources/,\
- testlib/,\
- lib/,\
- lib/*.jar,\
- *.jar
-
-source.anttestscore.jar = test plugin/,\
- tests/,\
- buildfiles/
-source.lib/antTestsSupport.jar = test support/
diff --git a/ant/org.eclipse.ant.tests.core/buildfiles/buildAntTestsSupportJAR.xml b/ant/org.eclipse.ant.tests.core/buildfiles/buildAntTestsSupportJAR.xml
deleted file mode 100644
index 8e963b8..0000000
--- a/ant/org.eclipse.ant.tests.core/buildfiles/buildAntTestsSupportJAR.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project name="build tests support jar" default="build" basedir="..">
-
- <property name="bootclasspath" value=""/>
-
- <target name="build" description="Removes all build artifacts, recreates the support jar, and refreshes this plugin's resources">
- <antcall target="clean"/>
- <antcall target="lib/antTestsSupport.jar"/>
- <antcall target="refresh"/>
- </target>
-
- <target name="init" depends="properties">
- <property name="plugin" value="org.eclipse.ant.tests.core"/>
- <property name="version.suffix" value="_2.1.0"/>
- <property name="full.name" value="${plugin}${version.suffix}"/>
- <property name="temp.folder" value="${basedir}/temp.folder"/>
- <property name="plugin.destination" value="${basedir}"/>
- <property name="build.result.folder" value="${basedir}"/>
- <property name="win32.jar" value="${basedir}/../org.eclipse.swt.win32/ws/win32/swt.jar"/>
- <property name="gtk.jar" value="${basedir}/../org.eclipse.swt.gtk/ws/gtk/swt.jar"/>
- <property name="motif.jar" value="${basedir}/../org.eclipse.swt.motif/ws/motif/swt.jar"/>
- <available file="${win32.jar}" property="swt.jar" value="${win32.jar}"/>
- <available file="${gtk.jar}" property="swt.jar" value="${gtk.jar}"/>
- <available file="${motif.jar}" property="swt.jar" value="${motif.jar}"/>
- </target>
-
- <target name="properties" if="eclipse.running">
- <property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
- </target>
-
- <target name="lib/antTestsSupport.jar" depends="init" description= "Builds the support JAR">
- <property name="destdir" value="${temp.folder}/lib/antTestsSupport.jar.bin"/>
- <delete dir="${temp.folder}/lib/antTestsSupport.jar.bin"/>
- <mkdir dir="${temp.folder}/lib/antTestsSupport.jar.bin"/>
- <!-- compile the source code -->
- <javac target="1.3" source="1.3" destdir="${temp.folder}/lib/antTestsSupport.jar.bin" failonerror="false" verbose="false" debug="on" includeAntRuntime="no" bootclasspath="${bootclasspath}" classpath="${basedir}/../org.eclipse.core.runtime/runtime.jar;${basedir}/../org.apache.ant/ant.jar;${basedir}/../org.apache.xerces/xercesImpl.jar;${basedir}/../org.apache.xerces/xmlParserAPIs.jar;${basedir}/bin;${basedir}/../org.eclipse.core.boot/boot.jar;${basedir}/../org.eclipse.ant.core/bin">
- <src path="test support/"/>
- </javac>
- <mkdir dir="${build.result.folder}/lib"/>
- <jar jarfile="${build.result.folder}/lib/antTestsSupport.jar" basedir="${temp.folder}/lib/antTestsSupport.jar.bin"/>
- <delete dir="${temp.folder}"/>
- </target>
-
- <target name="clean" depends="init">
- <delete file="${build.result.folder}/lib/antTestsSupport.jar"/>
- <delete dir="${temp.folder}"/>
- </target>
-
- <target name="refresh" depends="init" if="eclipse.running" description= "Refreshes the project's resources">
- <eclipse.refreshLocal resource="${plugin}" depth="infinite"/>
- </target>
-</project>
diff --git a/ant/org.eclipse.ant.tests.core/lib/antTestsSupport.jar b/ant/org.eclipse.ant.tests.core/lib/antTestsSupport.jar
deleted file mode 100644
index 5fd624a..0000000
--- a/ant/org.eclipse.ant.tests.core/lib/antTestsSupport.jar
+++ /dev/null
Binary files differ
diff --git a/ant/org.eclipse.ant.tests.core/plugin.properties b/ant/org.eclipse.ant.tests.core/plugin.properties
deleted file mode 100644
index a815294..0000000
--- a/ant/org.eclipse.ant.tests.core/plugin.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-
-pluginName=Ant Core Test Plugin
-providerName=Eclipse.org
diff --git a/ant/org.eclipse.ant.tests.core/plugin.xml b/ant/org.eclipse.ant.tests.core/plugin.xml
deleted file mode 100644
index 4fd7989..0000000
--- a/ant/org.eclipse.ant.tests.core/plugin.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<plugin
- id="org.eclipse.ant.tests.core"
- name="%pluginName"
- version="2.1.0"
- provider-name="%providerName"
- class="org.eclipse.ant.tests.core.testplugin.AntTestPlugin">
-
- <requires>
- <import plugin="org.apache.ant"/>
- <import plugin="org.junit"/>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.apache.xerces"/>
- <import plugin="org.eclipse.jdt.core"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.ant.core"/>
- <import plugin="org.eclipse.update.core"/>
- </requires>
-
-<runtime>
- <library name="anttestscore.jar" >
- <export name = "*"/>
- </library>
-</runtime>
-
-<extension point="org.eclipse.ant.core.extraClasspathEntries">
- <extraClasspathEntry
- library="lib/antTestsSupport.jar">
- </extraClasspathEntry>
-</extension>
-
-</plugin>
diff --git a/ant/org.eclipse.ant.tests.core/test plugin/org/eclipse/ant/tests/core/testplugin/AntFileRunner.java b/ant/org.eclipse.ant.tests.core/test plugin/org/eclipse/ant/tests/core/testplugin/AntFileRunner.java
deleted file mode 100644
index 64e8216..0000000
--- a/ant/org.eclipse.ant.tests.core/test plugin/org/eclipse/ant/tests/core/testplugin/AntFileRunner.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.tests.core.testplugin;
-
-
-import org.eclipse.ant.core.AntRunner;
-import org.eclipse.ant.tests.core.AbstractAntTest;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.CoreException;
-
-/**
- * Responsible for running test ant build files.
- */
-public class AntFileRunner {
-
- private static final String BASE_DIR_PREFIX = "-Dbasedir="; //$NON-NLS-1$
-
- public void run(IFile buildFile, String[] targets, String[] args, String baseDir, boolean captureOutput) throws CoreException {
-
- AntRunner runner = new AntRunner();
-
- String[] runnerArgs = args;
-
- if (baseDir.length() > 0) {
- // Ant requires the working directory to be specified
- // as one of the arguments, so it needs to be appended.
- int length = 1;
- if (args != null) {
- length = args.length + 1;
- }
-
- runnerArgs = new String[length];
- if (args != null) {
- System.arraycopy(args, 0, runnerArgs, 0, args.length);
- }
- runnerArgs[length - 1] = BASE_DIR_PREFIX + baseDir;
- }
- runner.setArguments(runnerArgs);
-
- if (buildFile != null) {
- runner.setBuildFileLocation(buildFile.getLocation().toFile().toString());
- }
- if (targets != null && targets.length > 0) {
- runner.setExecutionTargets(targets);
- }
- if (captureOutput) {
- runner.addBuildLogger(AbstractAntTest.ANT_TEST_BUILD_LOGGER);
- }
-
- runner.run(null);
- }
-
- public void run(String[] args, String baseDir) throws Exception {
-
- AntRunner runner = new AntRunner();
-
- String[] runnerArgs = args;
-
- if (baseDir.length() > 0) {
- // Ant requires the working directory to be specified
- // as one of the arguments, so it needs to be appended.
- runnerArgs = new String[args.length + 1];
- System.arraycopy(args, 0, runnerArgs, 0, args.length);
- runnerArgs[args.length] = BASE_DIR_PREFIX + baseDir;
- }
- runner.setArguments(runnerArgs);
-
- runner.run(args);
- }
-}
diff --git a/ant/org.eclipse.ant.tests.core/test plugin/org/eclipse/ant/tests/core/testplugin/AntTestChecker.java b/ant/org.eclipse.ant.tests.core/test plugin/org/eclipse/ant/tests/core/testplugin/AntTestChecker.java
deleted file mode 100644
index 56abbf1..0000000
--- a/ant/org.eclipse.ant.tests.core/test plugin/org/eclipse/ant/tests/core/testplugin/AntTestChecker.java
+++ /dev/null
@@ -1,229 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.tests.core.testplugin;
-
-
-import java.util.ArrayList;
-import java.util.Hashtable;
-import java.util.List;
-
-public class AntTestChecker {
-
- private static AntTestChecker deflt= null;
-
- private int taskStartedCount;
-
- private int taskFinishedCount;
-
- private int targetsStartedCount;
-
- private int targetsFinishedCount;
-
- private int buildsStartedCount;
-
- private int buildsFinishedCount;
-
- private List messages= new ArrayList();
-
- private List targets= new ArrayList();
-
- private List tasks= new ArrayList();
-
- private List projects= new ArrayList();
-
- private Hashtable userProperties;
-
- private List nameOfListeners= new ArrayList();
-
- private AntTestChecker() {
- }
-
- /**
- * Returns the singleton AntLoggerChecker
- */
- public static AntTestChecker getDefault() {
- if (deflt == null) {
- deflt= new AntTestChecker();
- }
- return deflt;
- }
-
- /**
- * Returns the singleton AntLoggerChecker
- */
- public static void reset() {
- if (deflt != null) {
- deflt.resetState();
- }
- }
- /**
- * @see org.apache.tools.ant.BuildListener#buildFinished(org.apache.tools.ant.BuildEvent)
- */
- public void buildFinished(String projectName) {
- buildsFinishedCount++;
- }
-
-
- public void buildStarted(String projectName) {
- buildsStartedCount++;
- projects.add(projectName);
- }
-
-
- public void messageLogged(String message) {
- messages.add(message);
- }
-
- /**
- * @see org.apache.tools.ant.BuildListener#targetFinished(org.apache.tools.ant.BuildEvent)
- */
- public void targetFinished(String targetName) {
- targetsFinishedCount++;
- }
-
- /**
- * @see org.apache.tools.ant.BuildListener#targetStarted(org.apache.tools.ant.BuildEvent)
- */
- public void targetStarted(String targetName) {
- targetsStartedCount++;
- targets.add(targetName);
- }
-
- /**
- * @see org.apache.tools.ant.BuildListener#taskFinished(org.apache.tools.ant.BuildEvent)
- */
- public void taskFinished(String taskName) {
- taskFinishedCount++;
- }
-
- /**
- * @see org.apache.tools.ant.BuildListener#taskStarted(org.apache.tools.ant.BuildEvent)
- */
- public void taskStarted(String taskName) {
- taskStartedCount++;
- tasks.add(taskName);
- }
-
- /**
- * Returns the buildsFinishedCount.
- * @return int
- */
- public int getBuildsFinishedCount() {
- return buildsFinishedCount;
- }
-
- /**
- * Returns the buildsStartedCount.
- * @return int
- */
- public int getBuildsStartedCount() {
- return buildsStartedCount;
- }
-
- /**
- * Returns the messagesLoggedCount.
- * @return int
- */
- public int getMessagesLoggedCount() {
- return messages.size();
- }
-
- /**
- * Returns the targetsFinishedCount.
- * @return int
- */
- public int getTargetsFinishedCount() {
- return targetsFinishedCount;
- }
-
- /**
- * Returns the targetsStartedCount.
- * @return int
- */
- public int getTargetsStartedCount() {
- return targetsStartedCount;
- }
-
- /**
- * Returns the taskFinishedCount.
- * @return int
- */
- public int getTaskFinishedCount() {
- return taskFinishedCount;
- }
-
- /**
- * Returns the taskStartedCount.
- * @return int
- */
- public int getTaskStartedCount() {
- return taskStartedCount;
- }
-
- protected void resetState() {
- taskStartedCount= 0;
- taskFinishedCount= 0;
- targetsStartedCount= 0;
- targetsFinishedCount= 0;
- buildsStartedCount= 0;
- buildsFinishedCount= 0;
- messages= new ArrayList();
- tasks= new ArrayList();
- targets= new ArrayList();
- projects= new ArrayList();
- userProperties= null;
- nameOfListeners= new ArrayList();
- }
-
- /**
- * Return the message n from the last:
- * e.g. getLoggedMessage(0) returns the most recent message
- *
- * @param n message index
- * @return the nth last message
- */
- public String getLoggedMessage(int n) {
- n = messages.size() - (n + 1);
- if ((n < 0) || (n >= messages.size())) {
- return null;
- }
- return (String) messages.get(n);
- }
-
- public String getLastMessageLogged() {
- return getLoggedMessage(0);
- }
-
- public void setUserProperties(Hashtable userProperties) {
- this.userProperties= userProperties;
- }
-
- public String getUserProperty(String name) {
- return (String)userProperties.get(name);
- }
-
- public List getMessages() {
- return messages;
- }
-
- public List getListeners() {
- return nameOfListeners;
- }
-
- public String getLastListener() {
- return (String)nameOfListeners.get(nameOfListeners.size() - 1);
- }
-
-
- public void addNameOfListener(String nameOfListener) {
- this.nameOfListeners.add(nameOfListener);
- }
-}
diff --git a/ant/org.eclipse.ant.tests.core/test plugin/org/eclipse/ant/tests/core/testplugin/AntTestPlugin.java b/ant/org.eclipse.ant.tests.core/test plugin/org/eclipse/ant/tests/core/testplugin/AntTestPlugin.java
deleted file mode 100644
index 831c208..0000000
--- a/ant/org.eclipse.ant.tests.core/test plugin/org/eclipse/ant/tests/core/testplugin/AntTestPlugin.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.tests.core.testplugin;
-
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URL;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-
-
-public class AntTestPlugin extends AbstractUIPlugin {
-
- private static AntTestPlugin deflt;
-
- public AntTestPlugin(IPluginDescriptor descriptor) {
- super(descriptor);
- deflt= this;
- }
-
- public static AntTestPlugin getDefault() {
- return deflt;
- }
-
- public static IWorkspace getWorkspace() {
- return ResourcesPlugin.getWorkspace();
- }
-
- public static void enableAutobuild(boolean enable) throws CoreException {
- // disable auto build
- IWorkspace workspace= AntTestPlugin.getWorkspace();
- IWorkspaceDescription desc= workspace.getDescription();
- desc.setAutoBuilding(enable);
- workspace.setDescription(desc);
- }
-
- public File getFileInPlugin(IPath path) {
- try {
- URL installURL= new URL(getDescriptor().getInstallURL(), path.toString());
- URL localURL= Platform.asLocalURL(installURL);
- return new File(localURL.getFile());
- } catch (IOException e) {
- return null;
- }
- }
-}
diff --git a/ant/org.eclipse.ant.tests.core/test plugin/org/eclipse/ant/tests/core/testplugin/ProjectHelper.java b/ant/org.eclipse.ant.tests.core/test plugin/org/eclipse/ant/tests/core/testplugin/ProjectHelper.java
deleted file mode 100644
index 60132c3..0000000
--- a/ant/org.eclipse.ant.tests.core/test plugin/org/eclipse/ant/tests/core/testplugin/ProjectHelper.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.tests.core.testplugin;
-
-
-import java.io.File;
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-import java.util.*;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.ui.dialogs.IOverwriteQuery;
-import org.eclipse.ui.wizards.datatransfer.*;
-
-/**
- * Helper methods to set up an IProject.
- */
-public class ProjectHelper {
-
- public static final IPath TEST_BUILDFILES_DIR= new Path("testbuildfiles");
- public static final IPath TEST_RESOURCES_DIR= new Path("testresources");
- public static final IPath TEST_LIB_DIR= new Path("testlib");
-
- /**
- * Creates a IProject.
- */
- public static IProject createProject(String projectName, String binFolderName) throws CoreException {
- IWorkspaceRoot root= ResourcesPlugin.getWorkspace().getRoot();
- IProject project= root.getProject(projectName);
- if (!project.exists()) {
- project.create(null);
- } else {
- project.refreshLocal(IResource.DEPTH_INFINITE, null);
- }
-
- if (!project.isOpen()) {
- project.open(null);
- }
-
- return project;
- }
-
- /**
- * Removes an IProject.
- */
- public static void delete(IProject project) throws CoreException {
- project.delete(true, true, null);
- }
-
-
- /**
- * Adds a folder to an IProject.
- */
- public static IFolder addFolder(IProject project, String containerName) throws CoreException {
-
- IFolder folder= project.getFolder(containerName);
- if (!folder.exists()) {
- folder.create(false, true, null);
- }
-
- return folder;
-
- }
-
- public static void importFilesFromDirectory(File rootDir, IPath destPath, IProgressMonitor monitor) throws InvocationTargetException, IOException {
- IImportStructureProvider structureProvider = FileSystemStructureProvider.INSTANCE;
- List files = new ArrayList(100);
- addFiles(rootDir, files);
- try {
- ImportOperation op= new ImportOperation(destPath, rootDir, structureProvider, new ImportOverwriteQuery(), files);
- op.setCreateContainerStructure(false);
- op.run(monitor);
- } catch (InterruptedException e) {
- // should not happen
- }
- }
-
- private static void addFiles(File dir, List collection) throws IOException {
- File[] files = dir.listFiles();
- List subDirs = new ArrayList(2);
- for (int i = 0; i < files.length; i++) {
- if (files[i].isFile()) {
- collection.add(files[i]);
- } else if (files[i].isDirectory()) {
- subDirs.add(files[i]);
- }
- }
- Iterator iter = subDirs.iterator();
- while (iter.hasNext()) {
- File subDir = (File)iter.next();
- addFiles(subDir, collection);
- }
- }
-
- private static class ImportOverwriteQuery implements IOverwriteQuery {
- public String queryOverwrite(String file) {
- return ALL;
- }
- }
-}
-
diff --git a/ant/org.eclipse.ant.tests.core/test support/org/eclipse/ant/tests/core/support/inputHandlers/AntTestInputHandler.java b/ant/org.eclipse.ant.tests.core/test support/org/eclipse/ant/tests/core/support/inputHandlers/AntTestInputHandler.java
deleted file mode 100644
index 9441b1f..0000000
--- a/ant/org.eclipse.ant.tests.core/test support/org/eclipse/ant/tests/core/support/inputHandlers/AntTestInputHandler.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.tests.core.support.inputHandlers;
-
-
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.input.DefaultInputHandler;
-import org.apache.tools.ant.input.InputRequest;
-
-/**
- * A test input handler when using Ant within Eclipse.
- * This is the class that will respond to <input> requests from
- * within an Ant build file.
- */
-public class AntTestInputHandler extends DefaultInputHandler {
-
- /**
- * @see org.apache.tools.ant.input.InputHandler#handleInput(org.apache.tools.ant.input.InputRequest)
- */
- public void handleInput(InputRequest request) throws BuildException {
- request.setInput("testing handling input requests");
- }
-}
diff --git a/ant/org.eclipse.ant.tests.core/test support/org/eclipse/ant/tests/core/support/tasks/AntTestTask.java b/ant/org.eclipse.ant.tests.core/test support/org/eclipse/ant/tests/core/support/tasks/AntTestTask.java
deleted file mode 100644
index c73c836..0000000
--- a/ant/org.eclipse.ant.tests.core/test support/org/eclipse/ant/tests/core/support/tasks/AntTestTask.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.tests.core.support.tasks;
-
-
-
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Task;
-import org.apache.tools.ant.taskdefs.Echo;
-
-
-public class AntTestTask extends Task {
-
- public AntTestTask() {
- super();
- }
-
- /**
- * @see org.apache.tools.ant.Task#execute()
- */
- public void execute() throws BuildException {
- Echo echo= new Echo();
- echo.setProject(getProject());
- echo.setMessage("Testing Ant in Eclipse with a custom task");
- echo.execute();
- }
-}
diff --git a/ant/org.eclipse.ant.tests.core/test support/org/eclipse/ant/tests/core/support/tasks/AntTestTask2.java b/ant/org.eclipse.ant.tests.core/test support/org/eclipse/ant/tests/core/support/tasks/AntTestTask2.java
deleted file mode 100644
index 59dddc7..0000000
--- a/ant/org.eclipse.ant.tests.core/test support/org/eclipse/ant/tests/core/support/tasks/AntTestTask2.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.tests.core.support.tasks;
-
-
-
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Task;
-import org.apache.tools.ant.taskdefs.Echo;
-
-
-public class AntTestTask2 extends Task {
-
- public AntTestTask2() {
- super();
- }
-
- /**
- * @see org.apache.tools.ant.Task#execute()
- */
- public void execute() throws BuildException {
- Echo echo= new Echo();
- echo.setProject(getProject());
- echo.setMessage("Testing Ant in Eclipse with a custom task");
- echo.execute();
- }
-}
diff --git a/ant/org.eclipse.ant.tests.core/test support/org/eclipse/ant/tests/core/support/testloggers/TestBuildListener.java b/ant/org.eclipse.ant.tests.core/test support/org/eclipse/ant/tests/core/support/testloggers/TestBuildListener.java
deleted file mode 100644
index 30d4ddf..0000000
--- a/ant/org.eclipse.ant.tests.core/test support/org/eclipse/ant/tests/core/support/testloggers/TestBuildListener.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.tests.core.support.testloggers;
-
-
-import org.apache.tools.ant.BuildEvent;
-import org.apache.tools.ant.BuildListener;
-import org.eclipse.ant.tests.core.testplugin.AntTestChecker;
-
-
-public class TestBuildListener implements BuildListener {
-
- /**
- * @see org.apache.tools.ant.BuildListener#buildFinished(org.apache.tools.ant.BuildEvent)
- */
- public void buildFinished(BuildEvent event) {
- }
-
- /**
- * @see org.apache.tools.ant.BuildListener#buildStarted(org.apache.tools.ant.BuildEvent)
- */
- public void buildStarted(BuildEvent event) {
- AntTestChecker.getDefault().addNameOfListener(this.getClass().getName());
- }
-
- /**
- * @see org.apache.tools.ant.BuildListener#messageLogged(org.apache.tools.ant.BuildEvent)
- */
- public void messageLogged(BuildEvent event) {
- }
-
- /**
- * @see org.apache.tools.ant.BuildListener#targetFinished(org.apache.tools.ant.BuildEvent)
- */
- public void targetFinished(BuildEvent event) {
- }
-
- /**
- * @see org.apache.tools.ant.BuildListener#targetStarted(org.apache.tools.ant.BuildEvent)
- */
- public void targetStarted(BuildEvent event) {
- }
-
- /**
- * @see org.apache.tools.ant.BuildListener#taskFinished(org.apache.tools.ant.BuildEvent)
- */
- public void taskFinished(BuildEvent event) {
- }
-
- /**
- * @see org.apache.tools.ant.BuildListener#taskStarted(org.apache.tools.ant.BuildEvent)
- */
- public void taskStarted(BuildEvent event) {
- }
-
-}
diff --git a/ant/org.eclipse.ant.tests.core/test support/org/eclipse/ant/tests/core/support/testloggers/TestBuildLogger.java b/ant/org.eclipse.ant.tests.core/test support/org/eclipse/ant/tests/core/support/testloggers/TestBuildLogger.java
deleted file mode 100644
index d9c1414..0000000
--- a/ant/org.eclipse.ant.tests.core/test support/org/eclipse/ant/tests/core/support/testloggers/TestBuildLogger.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.tests.core.support.testloggers;
-
-
-import java.io.PrintStream;
-
-import org.apache.tools.ant.*;
-import org.eclipse.ant.core.AntSecurityException;
-import org.eclipse.ant.tests.core.testplugin.AntTestChecker;
-import org.eclipse.core.runtime.OperationCanceledException;
-
-public class TestBuildLogger implements BuildLogger {
-
- private int messageOutputLevel =Project.MSG_INFO;
- private PrintStream fErr= null;
- private PrintStream fOut= null;
-
- /**
- * An exception that has already been logged.
- */
- private Throwable fHandledException= null;
-
-
- public TestBuildLogger() {
- }
-
- /**
- * @see org.apache.tools.ant.BuildLogger#setMessageOutputLevel(int)
- */
- public void setMessageOutputLevel(int level) {
- messageOutputLevel= level;
- }
-
- protected int getMessageOutputLevel() {
- return messageOutputLevel;
- }
-
- /**
- * @see org.apache.tools.ant.BuildLogger#setEmacsMode(boolean)
- */
- public void setEmacsMode(boolean emacsMode) {
- }
-
- /**
- * @see org.apache.tools.ant.BuildListener#buildStarted(org.apache.tools.ant.BuildEvent)
- */
- public void buildStarted(BuildEvent event) {
- AntTestChecker.getDefault().buildStarted(event.getProject().getName());
- AntTestChecker.getDefault().setUserProperties(event.getProject().getProperties());
- }
-
- /**
- * @see org.apache.tools.ant.BuildListener#buildFinished(org.apache.tools.ant.BuildEvent)
- */
- public void buildFinished(BuildEvent event) {
- handleException(event);
- fHandledException= null;
- AntTestChecker.getDefault().buildFinished(event.getProject().getName());
- }
-
- /**
- * @see org.apache.tools.ant.BuildListener#targetStarted(org.apache.tools.ant.BuildEvent)
- */
- public void targetStarted(BuildEvent event) {
- AntTestChecker.getDefault().targetStarted(event.getTarget().getName());
- }
-
- /**
- * @see org.apache.tools.ant.BuildListener#targetFinished(org.apache.tools.ant.BuildEvent)
- */
- public void targetFinished(BuildEvent event) {
- handleException(event);
- AntTestChecker.getDefault().targetFinished(event.getTarget().getName());
- }
-
- /**
- * @see org.apache.tools.ant.BuildListener#taskStarted(org.apache.tools.ant.BuildEvent)
- */
- public void taskStarted(BuildEvent event) {
- AntTestChecker.getDefault().taskStarted(event.getTask().getTaskName());
- }
-
- /**
- * @see org.apache.tools.ant.BuildListener#taskFinished(org.apache.tools.ant.BuildEvent)
- */
- public void taskFinished(BuildEvent event) {
- handleException(event);
- AntTestChecker.getDefault().targetFinished(event.getTask().getTaskName());
- }
-
- /**
- * @see BuildListener#messageLogged(BuildEvent)
- */
- public void messageLogged(BuildEvent event) {
- if (event.getPriority() > getMessageOutputLevel()) {
- return;
- }
- logMessage(event.getMessage(), event.getPriority());
- AntTestChecker.getDefault().messageLogged(event.getMessage());
- }
-
- protected PrintStream getErrorPrintStream() {
- return fErr;
- }
-
- protected PrintStream getOutputPrintStream() {
- return fOut;
- }
-
- /**
- * @see org.apache.tools.ant.BuildLogger#setErrorPrintStream(java.io.PrintStream)
- */
- public void setErrorPrintStream(PrintStream err) {
- //this build logger logs to "null" unless
- //the user has explicitly set a logfile to use
- if (err == System.err) {
- fErr= null;
- } else {
- fErr= err;
- }
- }
-
- /**
- * @see org.apache.tools.ant.BuildLogger#setOutputPrintStream(java.io.PrintStream)
- */
- public void setOutputPrintStream(PrintStream output) {
- //this build logger logs to "null" unless
- //the user has explicitly set a logfile to use
- if (output == System.out) {
- fOut= null;
- } else {
- fOut= output;
- }
- }
-
- protected void logMessage(String message, int priority) {
- if (priority > getMessageOutputLevel()) {
- return;
- }
-
- if (priority == Project.MSG_ERR) {
- if (getErrorPrintStream() != null && getErrorPrintStream() != System.err) {
- //user has designated to log to a logfile
- getErrorPrintStream().println(message);
- }
- } else {
- if (getOutputPrintStream() != null && getOutputPrintStream() != System.out) {
- //user has designated to log to a logfile
- getOutputPrintStream().println(message);
- }
- }
- }
-
- protected void handleException(BuildEvent event) {
- Throwable exception = event.getException();
- if (exception == null || exception == fHandledException
- || exception instanceof OperationCanceledException
- || exception instanceof AntSecurityException) {
- return;
- }
- fHandledException= exception;
- }
-}
diff --git a/ant/org.eclipse.ant.tests.core/test support/org/eclipse/ant/tests/core/support/types/AntTestPath.java b/ant/org.eclipse.ant.tests.core/test support/org/eclipse/ant/tests/core/support/types/AntTestPath.java
deleted file mode 100644
index 408ac4a..0000000
--- a/ant/org.eclipse.ant.tests.core/test support/org/eclipse/ant/tests/core/support/types/AntTestPath.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.tests.core.support.types;
-
-
-
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.types.Path;
-
-public class AntTestPath extends Path {
-
- String message;
-
- public AntTestPath(Project project) {
- super(project);
- }
-
- public void setMessage(String message) {
- this.message= message;
- }
-
- public String getMessage() {
- return message;
- }
-
-}
diff --git a/ant/org.eclipse.ant.tests.core/test.xml b/ant/org.eclipse.ant.tests.core/test.xml
deleted file mode 100644
index 47d3ab0..0000000
--- a/ant/org.eclipse.ant.tests.core/test.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0"?>
-
-<project name="testsuite" default="run" basedir=".">
- <!-- sets the properties eclipse-home, and library-file -->
- <!-- The property ${eclipse-home} should be passed into this script -->
- <!-- Set a meaningful default value for when it is not. -->
- <property name="eclipse-home" value="${basedir}\..\.."/>
-<property name="plugin-name" value="org.eclipse.ant.tests.core"/>
- <property name="library-file"
- value="${eclipse-home}/plugins/org.eclipse.test/library.xml"/>
-
- <!-- This target holds all initialization code that needs to be done for -->
- <!-- all tests that are to be run. Initialization for individual tests -->
- <!-- should be done within the body of the suite target. -->
- <target name="init">
- <tstamp/>
- <delete>
- <fileset dir="${eclipse-home}" includes="org*.xml"/>
- </delete>
- </target>
-
- <!-- This target defines the tests that need to be run. -->
- <target name="suite">
- <property name="jdt-folder"
- value="${eclipse-home}/jdt_folder"/>
- <delete dir="${jdt-folder}" quiet="true"/>
- <ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}">
- <property name="data-dir" value="${jdt-folder}"/>
- <property name="plugin-name" value="${plugin-name}"/>
- <property name="classname"
- value="org.eclipse.ant.tests.core.AutomatedSuite"/>
- </ant>
- </target>
-
- <!-- This target holds code to cleanup the testing environment after -->
- <!-- after all of the tests have been run. You can use this target to -->
- <!-- delete temporary files that have been created. -->
- <target name="cleanup">
- </target>
-
- <!-- This target runs the test suite. Any actions that need to happen -->
- <!-- after all the tests have been run should go here. -->
- <target name="run" depends="init,suite,cleanup">
- <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
- <property name="includes" value="org*.xml"/>
- <property name="output-file" value="${plugin-name}.xml"/>
- </ant>
- </target>
-
-</project>
diff --git a/ant/org.eclipse.ant.tests.core/testbuildfiles/Bug32551.xml b/ant/org.eclipse.ant.tests.core/testbuildfiles/Bug32551.xml
deleted file mode 100644
index e543997..0000000
--- a/ant/org.eclipse.ant.tests.core/testbuildfiles/Bug32551.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<project name="bug" default="all">
- <path id="myclasspath">
- <fileset dir="..\lib">
- <include name="antTestsSupport.jar" />
- </fileset>
- </path>
-
- <taskdef name="hello" classname="org.eclipse.ant.tests.core.support.tasks.AntTestTask">
- <classpath refid="myclasspath" />
- </taskdef>
-
- <target name="all">
- <hello />
- </target>
- </project>
\ No newline at end of file
diff --git a/ant/org.eclipse.ant.tests.core/testbuildfiles/Bug34663.xml b/ant/org.eclipse.ant.tests.core/testbuildfiles/Bug34663.xml
deleted file mode 100644
index 4ba03f1..0000000
--- a/ant/org.eclipse.ant.tests.core/testbuildfiles/Bug34663.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<project name="34663.xml" default="echoP">
-
-<taskdef file="${ROOTDIR}/taskdefs.properties" />
-
- <target name="echoP">
- <echoProperties/>
- </target>
-</project>
\ No newline at end of file
diff --git a/ant/org.eclipse.ant.tests.core/testbuildfiles/ClasspathOrdering.xml b/ant/org.eclipse.ant.tests.core/testbuildfiles/ClasspathOrdering.xml
deleted file mode 100644
index c99b65e..0000000
--- a/ant/org.eclipse.ant.tests.core/testbuildfiles/ClasspathOrdering.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<project name="ClasspathOrdering" default="ordered" basedir="..">
-
- <target name="ordered">
- <java classname= "ClasspathOrdering"/>
- </target>
-</project>
diff --git a/ant/org.eclipse.ant.tests.core/testbuildfiles/CustomTask.xml b/ant/org.eclipse.ant.tests.core/testbuildfiles/CustomTask.xml
deleted file mode 100644
index c9dc442..0000000
--- a/ant/org.eclipse.ant.tests.core/testbuildfiles/CustomTask.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<project name="Custom Task" default="Custom Task" basedir=".">
- <target name="init">
- <tstamp/>
- </target>
-
- <target name="Custom Task" description= "Test adding a custom task" depends="init">
- <AntTestTask/>
- </target>
-</project>
diff --git a/ant/org.eclipse.ant.tests.core/testbuildfiles/CustomType.xml b/ant/org.eclipse.ant.tests.core/testbuildfiles/CustomType.xml
deleted file mode 100644
index 1ae1ef5..0000000
--- a/ant/org.eclipse.ant.tests.core/testbuildfiles/CustomType.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<project name="Custom Type" default="Custom Type" basedir=".">
-
- <anttestpath id="compile.classpath">
- <fileset dir="lib">
- <include name="**/*.jar"/>
- </fileset>
- </anttestpath>
-
- <target name="init">
- <tstamp/>
- </target>
-
- <target name="Custom Type" description= "Test adding a custom type" depends="init">
- <echo message="Test adding a custom type"/>
- </target>
-</project>
diff --git a/ant/org.eclipse.ant.tests.core/testbuildfiles/NoDefault.xml b/ant/org.eclipse.ant.tests.core/testbuildfiles/NoDefault.xml
deleted file mode 100644
index 305d7e9..0000000
--- a/ant/org.eclipse.ant.tests.core/testbuildfiles/NoDefault.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<project name= "Testing" default="build">
-
- <target name= "test">
- <echo message="testing"/>
- </target>
-</project>
\ No newline at end of file
diff --git a/ant/org.eclipse.ant.tests.core/testbuildfiles/TestForEcho.xml b/ant/org.eclipse.ant.tests.core/testbuildfiles/TestForEcho.xml
deleted file mode 100644
index 2213e5e..0000000
--- a/ant/org.eclipse.ant.tests.core/testbuildfiles/TestForEcho.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<project name="Echo Test" default="Test for Echo" basedir=".">
- <target name="init">
- <tstamp/>
- </target>
-
- <target name="Test for Echo" description= "Calls other echos" depends="init">
- <ant antfile="buildfiles/echoing.xml" dir="../../AntTests" target="echo1"/>
- <ant antfile="buildfiles/echoing.xml" dir="../../AntTests" target="echo2"/>
- <ant antfile="buildfiles/echoing.xml" dir="../../AntTests" target="echo3"/>
- </target>
-</project>
diff --git a/ant/org.eclipse.ant.tests.core/testbuildfiles/build.xml b/ant/org.eclipse.ant.tests.core/testbuildfiles/build.xml
deleted file mode 100644
index 7638a53..0000000
--- a/ant/org.eclipse.ant.tests.core/testbuildfiles/build.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<project name="Eching" default="echo1" basedir="..">
-
- <target name="echo1">
- <echo message="echo1"/>
- </target>
-
- <target name="echo2">
- <echo message="echo2"/>
- </target>
-
- <target name="echo3" description= "An echo3!">
- <echo message="echo3"/>
- </target>
-</project>
diff --git a/ant/org.eclipse.ant.tests.core/testbuildfiles/echoing.xml b/ant/org.eclipse.ant.tests.core/testbuildfiles/echoing.xml
deleted file mode 100644
index 7638a53..0000000
--- a/ant/org.eclipse.ant.tests.core/testbuildfiles/echoing.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<project name="Eching" default="echo1" basedir="..">
-
- <target name="echo1">
- <echo message="echo1"/>
- </target>
-
- <target name="echo2">
- <echo message="echo2"/>
- </target>
-
- <target name="echo3" description= "An echo3!">
- <echo message="echo3"/>
- </target>
-</project>
diff --git a/ant/org.eclipse.ant.tests.core/testbuildfiles/input.xml b/ant/org.eclipse.ant.tests.core/testbuildfiles/input.xml
deleted file mode 100644
index 8d70ab5..0000000
--- a/ant/org.eclipse.ant.tests.core/testbuildfiles/input.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<project name="input testing" default= "input test">
- <target name="input test">
- <input message="Enter for echo" addproperty= "inputTest">
- </input>
- <echo message="${inputTest}"/>
- </target>
-</project>
\ No newline at end of file
diff --git a/ant/org.eclipse.ant.tests.core/testbuildfiles/javac.xml b/ant/org.eclipse.ant.tests.core/testbuildfiles/javac.xml
deleted file mode 100644
index 42f0225..0000000
--- a/ant/org.eclipse.ant.tests.core/testbuildfiles/javac.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project name="org.eclipse.ant.core" default="build" basedir="..">
-
-
- <target name="init" depends="properties">
- <property name="plugin" value="AntTests"/>
- <property name="temp.folder" value="${basedir}/temp.folder"/>
- <property name="plugin.destination" value="${basedir}"/>
- <property name="build.result.folder" value="${basedir}"/>
- </target>
-
- <target name="properties" if="use.eclipse.JDTCompiler">
- <property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
- </target>
-
- <target name="build" depends="init">
- <property name="destdir" value="${temp.folder}/javac.bin"/>
- <delete dir="${temp.folder}/javac.bin"/>
- <mkdir dir="${temp.folder}/javac.bin"/>
- <!-- compile the source code -->
- <javac destdir="${temp.folder}/javac.bin" failonerror="false" verbose="false" debug="on" includeAntRuntime="yes">
- <src path="resources"/>
- </javac>
- </target>
-
- <target name="clean" depends="init">
- <delete dir="${temp.folder}"/>
- </target>
-
- <target name="refresh" depends="init" if="eclipse.running">
- <eclipse.refreshLocal resource="${plugin}" depth="infinite"/>
- </target>
-</project>
diff --git a/ant/org.eclipse.ant.tests.core/testlib/classpathOrdering1.jar b/ant/org.eclipse.ant.tests.core/testlib/classpathOrdering1.jar
deleted file mode 100644
index b10cb7f..0000000
--- a/ant/org.eclipse.ant.tests.core/testlib/classpathOrdering1.jar
+++ /dev/null
Binary files differ
diff --git a/ant/org.eclipse.ant.tests.core/testlib/classpathOrdering2.jar b/ant/org.eclipse.ant.tests.core/testlib/classpathOrdering2.jar
deleted file mode 100644
index 6816741..0000000
--- a/ant/org.eclipse.ant.tests.core/testlib/classpathOrdering2.jar
+++ /dev/null
Binary files differ
diff --git a/ant/org.eclipse.ant.tests.core/testlib/taskFolder/org/eclipse/ant/tests/core/support/tasks/AntTestTask2.class b/ant/org.eclipse.ant.tests.core/testlib/taskFolder/org/eclipse/ant/tests/core/support/tasks/AntTestTask2.class
deleted file mode 100644
index 6a37eb5..0000000
--- a/ant/org.eclipse.ant.tests.core/testlib/taskFolder/org/eclipse/ant/tests/core/support/tasks/AntTestTask2.class
+++ /dev/null
Binary files differ
diff --git a/ant/org.eclipse.ant.tests.core/testresources/AntTestTask.java b/ant/org.eclipse.ant.tests.core/testresources/AntTestTask.java
deleted file mode 100644
index bc4f602..0000000
--- a/ant/org.eclipse.ant.tests.core/testresources/AntTestTask.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-
-
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Task;
-import org.apache.tools.ant.taskdefs.Echo;
-
-
-public class AntTestTask extends Task {
-
- public AntTestTask() {
- super();
- }
-
- /**
- * @see org.apache.tools.ant.Task#execute()
- */
- public void execute() throws BuildException {
- Echo echo= new Echo();
- echo.setProject(getProject());
- echo.setMessage("Testing Ant in Eclipse with a custom task");
- echo.execute();
- }
-}
diff --git a/ant/org.eclipse.ant.tests.core/testresources/taskdefs.properties b/ant/org.eclipse.ant.tests.core/testresources/taskdefs.properties
deleted file mode 100644
index 52049ff..0000000
--- a/ant/org.eclipse.ant.tests.core/testresources/taskdefs.properties
+++ /dev/null
@@ -1 +0,0 @@
-echoProperties=org.apache.tools.ant.taskdefs.optional.EchoProperties
\ No newline at end of file
diff --git a/ant/org.eclipse.ant.tests.core/testresources/test.properties b/ant/org.eclipse.ant.tests.core/testresources/test.properties
deleted file mode 100644
index 7eacd3a..0000000
--- a/ant/org.eclipse.ant.tests.core/testresources/test.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-AntTests=testing from properties file
-eclipse.is.cool=Yep
diff --git a/ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/AbstractAntTest.java b/ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/AbstractAntTest.java
deleted file mode 100644
index 8531967..0000000
--- a/ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/AbstractAntTest.java
+++ /dev/null
@@ -1,213 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.tests.core;
-
-
-import java.net.URL;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-import org.eclipse.ant.core.*;
-import org.eclipse.ant.tests.core.testplugin.AntFileRunner;
-import org.eclipse.ant.tests.core.testplugin.AntTestChecker;
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-
-
-
-/**
- * Tests for Ant core
- */
-public abstract class AbstractAntTest extends TestCase {
-
- protected static final String BUILD_SUCCESSFUL= "BUILD SUCCESSFUL";
- public static final String ANT_TEST_BUILD_LOGGER = "org.eclipse.ant.tests.core.support.testloggers.TestBuildLogger"; //$NON-NLS-1$
- public static final String ANT_TEST_BUILD_LISTENER= "org.eclipse.ant.tests.core.support.testloggers.TestBuildListener";
-
- /**
- * Returns the 'AntTests' project.
- *
- * @return the test project
- */
- protected IProject getProject() {
- return ResourcesPlugin.getWorkspace().getRoot().getProject("AntTests");
- }
-
- public static IProject project;
-
-
- public AbstractAntTest(String name) {
- super(name);
- }
-
- protected IFile getBuildFile(String buildFileName) {
- IFile file = getProject().getFolder("buildfiles").getFile(buildFileName);
- assertTrue("Could not find script file named: " + buildFileName, file.exists());
- return file;
- }
-
- protected IFolder getWorkingDirectory(String workingDirectoryName) {
- IFolder folder = getProject().getFolder(workingDirectoryName);
- assertTrue("Could not find the working directory named: " + workingDirectoryName, folder.exists());
- return folder;
- }
-
- protected IFile checkFileExists(String fileName) throws CoreException {
- getProject().refreshLocal(IProject.DEPTH_INFINITE, null);
- IFile file = getProject().getFolder("buildfiles").getFile(fileName);
- assertTrue("Could not find file named: " + fileName, file.exists());
- return file;
- }
-
- public void run(String buildFileName) throws CoreException {
- run(buildFileName, null, true);
- }
-
- public void run(String buildFileName, String[] args) throws CoreException {
- run(buildFileName, args, true);
- }
-
- public void run(String buildFileName, String[] args, boolean retrieveTargets) throws CoreException {
- run(buildFileName, args, retrieveTargets, "");
- }
-
- public void run(String buildFileName, String[] args, boolean retrieveTargets, String workingDir) throws CoreException {
- AntTestChecker.reset();
- IFile buildFile= null;
- if (buildFileName != null) {
- buildFile= getBuildFile(buildFileName);
- }
- AntFileRunner runner= new AntFileRunner();
- String[] targets= null;
- if (retrieveTargets) {
- targets= getTargetNames(buildFileName);
- }
- if (workingDir.length() > 0) {
- workingDir= getWorkingDirectory(workingDir).getLocation().toFile().getAbsolutePath();
- }
- runner.run(buildFile, targets, args, workingDir, true);
- assertTrue("Build starts did not equal build finishes", AntTestChecker.getDefault().getBuildsStartedCount() == AntTestChecker.getDefault().getBuildsFinishedCount());
- }
-
- protected TargetInfo[] getTargets(String buildFileName) throws CoreException {
- IFile buildFile= getBuildFile(buildFileName);
-
- AntRunner runner = new AntRunner();
- runner.setBuildFileLocation(buildFile.getLocation().toFile().getAbsolutePath());
- return runner.getAvailableTargets();
- }
-
- protected String[] getTargetNames(String buildFileName) throws CoreException {
- TargetInfo[] infos= getTargets(buildFileName);
- String[] names= new String[infos.length];
- for (int i = 0; i < infos.length; i++) {
- TargetInfo info = infos[i];
- names[i]= info.getName();
- }
- return names;
- }
-
- protected String[] getTargetDescriptions(String buildFileName) throws CoreException {
- TargetInfo[] infos= getTargets(buildFileName);
- String[] descriptions= new String[infos.length];
- for (int i = 0; i < infos.length; i++) {
- TargetInfo info = infos[i];
- descriptions[i]= info.getDescription();
- }
- return descriptions;
- }
-
- /**
- * Returns the name of the project containing the given target in the given build file or
- * <code>null</code> if no project name can be found.
- */
- protected String getProjectName(String buildFileName, String targetName) throws CoreException {
- TargetInfo info= getTarget(buildFileName, targetName);
- if (info != null) {
- return info.getProject().getName();
- }
- return null;
- }
-
- /**
- * Returns the dependencies of the target with the given name in the given build file or <code>null</code>
- * if no such target can be found.
- */
- protected String[] getDependencies(String buildFileName, String targetName) throws CoreException {
- TargetInfo info= getTarget(buildFileName, targetName);
- if (info != null) {
- return info.getDependencies();
- }
- return null;
- }
-
- /**
- * Returns the target with the given name in the given build file or <code>null</code>
- * if no such target can be found.
- */
- protected TargetInfo getTarget(String buildFileName, String targetName) throws CoreException {
- TargetInfo[] infos= getTargets(buildFileName);
- for (int i= 0, numTargets= infos.length; i < numTargets; i++) {
- if (infos[i].getName().equals(targetName)) {
- return infos[i];
- }
- }
- return null;
- }
-
- /**
- * Return the log message n from the last:
- * e.g. getLoggedMessage(0) returns the most recent message
- *
- * @param n message index
- * @return the nth last message
- */
- protected String getLoggedMessage(int n) {
- return AntTestChecker.getDefault().getLoggedMessage(n);
- }
-
- protected String getLastMessageLogged() {
- return getLoggedMessage(0);
- }
-
- protected void assertSuccessful() {
- List messages= AntTestChecker.getDefault().getMessages();
- String success= (String)messages.get(messages.size() - 1);
- assertTrue("Build was not flagged as successful: " + success, BUILD_SUCCESSFUL.equals(success));
- }
-
- protected String getPropertyFileName() {
- return getProject().getFolder("resources").getFile("test.properties").getLocation().toFile().getAbsolutePath();
- }
-
- protected void restorePreferenceDefaults() {
- AntCorePreferences prefs= AntCorePlugin.getPlugin().getPreferences();
- prefs.setCustomURLs(prefs.getDefaultAntURLs());
- prefs.setCustomTasks(new Task[]{});
- prefs.setCustomTypes(new Type[]{});
- prefs.setCustomPropertyFiles(new String[]{});
- prefs.setCustomProperties(new Property[]{});
- prefs.setAntHome("");
- }
-
- protected String getAntHome() {
- AntCorePreferences prefs= AntCorePlugin.getPlugin().getPreferences();
- URL[] urls= prefs.getDefaultAntURLs();
- URL antjar= urls[0];
- IPath antHomePath= new Path(antjar.getFile());
- antHomePath= antHomePath.removeLastSegments(1);
- return antHomePath.toFile().getAbsolutePath();
- }
-}
-
diff --git a/ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/AutomatedSuite.java b/ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/AutomatedSuite.java
deleted file mode 100644
index 379baba..0000000
--- a/ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/AutomatedSuite.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.tests.core;
-
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.ant.tests.core.tests.*;
-
-/**
- * Test all areas of Ant.
- *
- * To run this test suite:
- * <ol>
- * <li>Create a new JUnit plugin test launch configuration</li>
- * <li>Set the Test class to "org.eclipse.ant.tests.core.AutomatedSuite"</li>
- * <li>Set the Project to "org.eclipse.ant.tests.core"</li>
- * <li>Run the launch configuration. Output from the tests will be displayed in a JUnit view</li>
- * </ol>
- */
-public class AutomatedSuite extends TestSuite {
-
- /**
- * Flag that indicates test are in progress
- */
- protected boolean testing = true;
-
- /**
- * Returns the suite. This is required to
- * use the JUnit Launcher.
- */
- public static Test suite() {
- return new AutomatedSuite();
- }
-
- /**
- * Construct the test suite.
- */
- public AutomatedSuite() {
- addTest(new TestSuite(ProjectCreationDecorator.class));
- addTest(new TestSuite(FrameworkTests.class));
- addTest(new TestSuite(TargetTests.class));
- addTest(new TestSuite(ProjectTests.class));
- addTest(new TestSuite(OptionTests.class));
- addTest(new TestSuite(TaskTests.class));
- addTest(new TestSuite(TypeTests.class));
- }
-
- /**
- * Runs the tests and collects their result in a TestResult without blocking.
- * the UI thread. Not normally needed but nice to have to check on the state of
- * environment during a test run.
- */
-// public void run(final TestResult result) {
-// final Display display = Display.getCurrent();
-// Thread thread = null;
-// try {
-// Runnable r = new Runnable() {
-// public void run() {
-// for (Enumeration e= tests(); e.hasMoreElements(); ) {
-// if (result.shouldStop() )
-// break;
-// Test test= (Test)e.nextElement();
-// runTest(test, result);
-// }
-// testing = false;
-// display.wake();
-// }
-// };
-// thread = new Thread(r);
-// thread.start();
-// } catch (Exception e) {
-// e.printStackTrace();
-// }
-//
-// while (testing) {
-// try {
-// if (!display.readAndDispatch())
-// display.sleep();
-// } catch (Throwable e) {
-// e.printStackTrace();
-// }
-// }
-// }
-}
-
diff --git a/ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/ProjectCreationDecorator.java b/ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/ProjectCreationDecorator.java
deleted file mode 100644
index 535089f..0000000
--- a/ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/ProjectCreationDecorator.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.tests.core;
-
-
-import java.io.File;
-
-import org.eclipse.ant.tests.core.testplugin.AntTestPlugin;
-import org.eclipse.ant.tests.core.testplugin.ProjectHelper;
-import org.eclipse.core.resources.*;
-
-/**
- * Test to close the workbench, since debug tests do not run in the UI
- * thread.
- */
-public class ProjectCreationDecorator extends AbstractAntTest {
-
- public ProjectCreationDecorator(String name) {
- super(name);
- }
-
- public void testProjectCreation() throws Exception {
- // delete any pre-existing project
- IProject pro = ResourcesPlugin.getWorkspace().getRoot().getProject("AntTests");
- if (pro.exists()) {
- pro.delete(true, true, null);
- }
- // create project and import buildfiles and support files
- project = ProjectHelper.createProject("AntTests", "bin");
- IFolder folder = ProjectHelper.addFolder(project, "buildfiles");
- File root = AntTestPlugin.getDefault().getFileInPlugin(ProjectHelper.TEST_BUILDFILES_DIR);
- ProjectHelper.importFilesFromDirectory(root, folder.getFullPath(), null);
-
- folder = ProjectHelper.addFolder(project, "resources");
- root = AntTestPlugin.getDefault().getFileInPlugin(ProjectHelper.TEST_RESOURCES_DIR);
- ProjectHelper.importFilesFromDirectory(root, folder.getFullPath(), null);
-
- folder = ProjectHelper.addFolder(project, "lib");
- root = AntTestPlugin.getDefault().getFileInPlugin(ProjectHelper.TEST_LIB_DIR);
- ProjectHelper.importFilesFromDirectory(root, folder.getFullPath(), null);
- }
-}
diff --git a/ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/tests/FrameworkTests.java b/ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/tests/FrameworkTests.java
deleted file mode 100644
index 1f5df28..0000000
--- a/ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/tests/FrameworkTests.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.tests.core.tests;
-
-
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import org.eclipse.ant.core.AntCorePlugin;
-import org.eclipse.ant.core.AntCorePreferences;
-import org.eclipse.ant.core.Property;
-import org.eclipse.ant.tests.core.AbstractAntTest;
-import org.eclipse.ant.tests.core.testplugin.AntTestChecker;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.CoreException;
-
-public class FrameworkTests extends AbstractAntTest {
-
- public FrameworkTests(String name) {
- super(name);
- }
-
- public void testClasspathOrdering() throws MalformedURLException, CoreException {
- AntCorePreferences prefs =AntCorePlugin.getPlugin().getPreferences();
-
- String path= getProject().getFolder("lib").getFile("classpathOrdering1.jar").getLocation().toFile().getAbsolutePath();
- URL url= new URL("file:" + path);
-
- path= getProject().getFolder("lib").getFile("classpathOrdering2.jar").getLocation().toFile().getAbsolutePath();
- URL url2= new URL("file:" + path);
-
- URL urls[] = prefs.getCustomURLs();
- URL newUrls[] = new URL[urls.length + 2];
- System.arraycopy(urls, 0, newUrls, 0, urls.length);
- newUrls[urls.length] = url;
- newUrls[urls.length + 1] = url2;
- prefs.setCustomURLs(newUrls);
-
- prefs.updatePluginPreferences();
-
- run("ClasspathOrdering.xml");
- String msg= (String)AntTestChecker.getDefault().getMessages().get(1);
- assertTrue("Message incorrect: " + msg, msg.equals("classpathOrdering1"));
- assertSuccessful();
-
- restorePreferenceDefaults();
-
- urls = prefs.getCustomURLs();
- newUrls = new URL[urls.length + 2];
- System.arraycopy(urls, 0, newUrls, 0, urls.length);
- newUrls[urls.length] = url2;
- newUrls[urls.length + 1] = url;
- prefs.setCustomURLs(newUrls);
-
- prefs.updatePluginPreferences();
-
- run("ClasspathOrdering.xml");
- msg= (String)AntTestChecker.getDefault().getMessages().get(1);
- assertTrue("Message incorrect: " + msg, msg.equals("classpathOrdering2"));
- assertSuccessful();
- }
-
- public void testNoDefaultTarget() {
- try {
- run("NoDefault.xml", new String[]{"test"}, false);
- } catch (CoreException e) {
- String msg= e.getMessage();
- assertTrue("Message incorrect: " + msg, msg.equals("Default target 'build' does not exist in this project"));
- return;
- }
- assertTrue("Build files with no default targets should not be accepted", false);
- }
-
- /**
- * Ensures that tasks like javac work when includeAntRuntime is specified
- * bug 20857.
- * This test will just return if the tests are conducted on a JRE (no tools.jar).
- */
- public void testIncludeAntRuntime() throws CoreException {
- URL toolsURL= AntCorePlugin.getPlugin().getPreferences().getToolsJarURL();
- if (toolsURL == null) {
- //running on a JRE where tools.jar could not be found
- return;
- }
- run("javac.xml", new String[]{"build","refresh"}, false); //standard compiler
- assertSuccessful();
- IFile classFile= getProject().getFolder("temp.folder").getFolder("javac.bin").getFile("AntTestTask.class");
- assertTrue("Class file was not generated", classFile.exists());
- run("javac.xml", new String[]{"-Duse.eclipse.compiler=true", "clean", "build", "refresh"}, false); //JDTCompiler
- assertSuccessful();
- classFile= getProject().getFolder("temp.folder").getFolder("javac.bin").getFile("AntTestTask.class");
- assertTrue("Class file was not generated", classFile.exists());
- }
-
- /**
- * Tests the properties added using a global property file
- */
- public void testGlobalPropertyFile() throws CoreException {
-
- AntCorePreferences prefs =AntCorePlugin.getPlugin().getPreferences();
-
- String path= getPropertyFileName();
- prefs.setCustomPropertyFiles(new String[]{path});
-
- run("TestForEcho.xml", new String[]{});
- assertSuccessful();
- assertTrue("eclipse.is.cool should have been set as Yep", "Yep".equals(AntTestChecker.getDefault().getUserProperty("eclipse.is.cool")));
- assertTrue("AntTests should have a value of testing", "testing from properties file".equals(AntTestChecker.getDefault().getUserProperty("AntTests")));
- assertNull("my.name was not set and should be null", AntTestChecker.getDefault().getUserProperty("my.name"));
-
- restorePreferenceDefaults();
- }
-
- /**
- * Tests the properties added using a global property
- */
- public void testGlobalProperty() throws CoreException {
-
- AntCorePreferences prefs =AntCorePlugin.getPlugin().getPreferences();
- prefs.setCustomProperties(new Property[]{new Property("eclipse.is.cool", "Yep"), new Property("JUnitTest", "true")});
-
- run("TestForEcho.xml", new String[]{});
- assertSuccessful();
- assertTrue("eclipse.is.cool should have been set as Yep", "Yep".equals(AntTestChecker.getDefault().getUserProperty("eclipse.is.cool")));
- assertTrue("JUnitTests should have a value of true", "true".equals(AntTestChecker.getDefault().getUserProperty("JUnitTest")));
- assertNull("my.name was not set and should be null", AntTestChecker.getDefault().getUserProperty("my.name"));
-
- restorePreferenceDefaults();
- }
-
- public void testGlobalPropertyFileWithMinusDTakingPrecedence() throws CoreException {
- AntCorePreferences prefs =AntCorePlugin.getPlugin().getPreferences();
-
- String path= getPropertyFileName();
- prefs.setCustomPropertyFiles(new String[]{path});
-
- run("echoing.xml", new String[]{"-DAntTests=testing", "-Declipse.is.cool=true"}, false);
- assertSuccessful();
- assertTrue("eclipse.is.cool should have been set as true", "true".equals(AntTestChecker.getDefault().getUserProperty("eclipse.is.cool")));
- assertTrue("AntTests should have a value of testing", "testing".equals(AntTestChecker.getDefault().getUserProperty("AntTests")));
- assertNull("my.name was not set and should be null", AntTestChecker.getDefault().getUserProperty("my.name"));
- restorePreferenceDefaults();
- }
-
- /**
- * Tests setting ANT_HOME
- */
- public void testSettingAntHome() throws CoreException {
- try {
- AntCorePlugin.getPlugin().getPreferences().setAntHome(getAntHome());
- run("echoing.xml");
- assertTrue("ANT_HOME not set correctly", getAntHome().equals(System.getProperty("ant.home")));
- AntCorePlugin.getPlugin().getPreferences().setAntHome("");
- run("echoing.xml");
- assertTrue("ANT_HOME not set correctly", null == System.getProperty("ant.home"));
- } finally {
- restorePreferenceDefaults();
- }
-
-
- }
-}
diff --git a/ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/tests/OptionTests.java b/ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/tests/OptionTests.java
deleted file mode 100644
index dc4d01f..0000000
--- a/ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/tests/OptionTests.java
+++ /dev/null
@@ -1,444 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.tests.core.tests;
-
-
-import java.io.BufferedInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.util.List;
-
-import org.eclipse.ant.core.AntCorePlugin;
-import org.eclipse.ant.tests.core.AbstractAntTest;
-import org.eclipse.ant.tests.core.testplugin.AntTestChecker;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.CoreException;
-
-public class OptionTests extends AbstractAntTest {
-
- protected static final String START_OF_HELP= "ant [options] [target [target2 [target3] ...]]";
- protected static final String VERSION= "Apache Ant version 1.5.3 compiled on April 9 2003";
-
- public OptionTests(String name) {
- super(name);
- }
-
- /**
- * Tests the "-help" option
- */
- public void testHelp() throws CoreException {
- run("TestForEcho.xml", new String[]{"-help"});
- assertTrue("One message should have been logged", AntTestChecker.getDefault().getMessagesLoggedCount() == 1);
- assertTrue("Help is incorrect", getLastMessageLogged() != null && getLastMessageLogged().startsWith(START_OF_HELP));
- }
-
- /**
- * Tests the "-version" option
- */
- public void testVersion() throws CoreException {
- run("TestForEcho.xml", new String[]{"-version"});
- assertTrue("One message should have been logged", AntTestChecker.getDefault().getMessagesLoggedCount() == 1);
- assertTrue("Version is incorrect", VERSION.equals(getLastMessageLogged()));
- }
-
- /**
- * Tests the "-projecthelp" option when it will not show (quite mode)
- */
- public void testProjecthelp() throws CoreException {
- run("TestForEcho.xml", new String[]{"-projecthelp"});
- assertTrue("4 messages should have been logged; was " + AntTestChecker.getDefault().getMessagesLoggedCount(), AntTestChecker.getDefault().getMessagesLoggedCount() == 4);
- assertTrue("Project help is incorrect", getLastMessageLogged().startsWith("Subtargets:"));
- }
-
- /**
- * Tests the "-projecthelp" option when it will not show (quite mode)
- */
- public void testProjecthelpQuiet() throws CoreException {
- run("TestForEcho.xml", new String[]{"-projecthelp", "-q"});
- assertTrue("no messages should have been logged; was " + AntTestChecker.getDefault().getMessagesLoggedCount(), AntTestChecker.getDefault().getMessagesLoggedCount() == 0);
- }
-
- /**
- * Tests the "-listener" option with a listener that is not an instance of BuildListener
- */
- public void testListenerBad() throws CoreException {
- try {
- run("TestForEcho.xml", new String[]{"-listener", "java.lang.String"});
- } catch (CoreException ce) {
- String msg= ce.getMessage();
- assertTrue("Message incorrect!: " + msg, msg.equals("java.lang.String which was specified to be a build listener is not an instance of org.apache.tools.ant.BuildListener."));
- return;
- }
- assertTrue("A core exception should have occurred wrappering a class cast exception", false);
- }
-
- /**
- * Tests passing an unrecognized argument
- */
- public void testUnknownArg() throws CoreException {
- run("TestForEcho.xml", new String[]{"-listenr"});
- //unknown arg, print usage
- assertTrue("Two message should have been logged", AntTestChecker.getDefault().getMessagesLoggedCount() == 2);
- assertTrue("Should have printed the usage", getLastMessageLogged() != null && getLastMessageLogged().startsWith(START_OF_HELP));
- }
-
- /**
- * Tests specifying the -logfile with no arg
- */
- public void testLogFileWithNoArg() throws CoreException {
- try {
- run("TestForEcho.xml", new String[]{"-logfile"});
- } catch (CoreException ce) {
- return;
- }
- assertTrue("You must specify a log file when using the -log argument", false);
- }
-
- /**
- * Tests specifying the -logfile
- */
- public void testLogFile() throws CoreException, IOException {
- run("TestForEcho.xml", new String[]{"-logfile", "TestLogFile.txt"});
- IFile file= checkFileExists("TestLogFile.txt");
- InputStream stream =file.getContents();
-
- InputStreamReader in= null;
- try {
- in= new InputStreamReader(new BufferedInputStream(stream));
- StringBuffer buffer= new StringBuffer();
- char[] readBuffer= new char[2048];
- int n= in.read(readBuffer);
- while (n > 0) {
- buffer.append(readBuffer, 0, n);
- n= in.read(readBuffer);
- }
- assertTrue("File should have started with Buildfile", buffer.toString().startsWith("Buildfile"));
- } finally {
- in.close();
- stream.close();
- }
-
- }
-
- /**
- * Tests specifying the -logger with no arg
- */
- public void testLoggerWithNoArg() throws CoreException {
- try {
- run("TestForEcho.xml", new String[]{"-logger"});
- } catch (CoreException ce) {
- return;
- }
- assertTrue("You must specify a classname when using the -logger argument", false);
- }
-
- /**
- * Tests the "-logger" option with a logger that is not an instance of BuildLogger
- */
- public void testLoggerBad() throws CoreException {
- try {
- run("TestForEcho.xml", new String[]{"-logger", "java.lang.String"});
- } catch (CoreException ce) {
- return;
- }
- assertTrue("A core exception should have occurred wrappering a class cast exception", false);
- }
-
- /**
- * Tests the "-logger" option with two loggers specified...only one is allowed
- */
- public void testTwoLoggers() throws CoreException {
- try {
- run("TestForEcho.xml", new String[]{"-logger", "java.lang.String", "-q", "-logger", "java.lang.String"});
- } catch (CoreException ce) {
- return;
- }
- assertTrue("As only one logger can be specified", false);
- }
-
- /**
- * Tests specifying the -listener with no arg
- */
- public void testListenerWithNoArg() throws CoreException {
- try {
- run("TestForEcho.xml", new String[]{"-listener"});
- } catch (CoreException ce) {
- return;
- }
- assertTrue("You must specify a listeners when using the -listener argument ", false);
- }
-
- /**
- * Tests specifying the -listener with a class that will not be found
- */
- public void testListenerClassNotFound() throws CoreException {
- try {
- run("TestForEcho.xml", new String[]{"-listener", "TestBuildListener"});
- } catch (CoreException e) {
- String message= e.getStatus().getException().getMessage();
- assertTrue("Should be ClassNotFoundException", "java.lang.ClassNotFoundException: TestBuildListener".equals(message));
- return;
- }
- assertTrue("A CoreException should have occurred as the listener class will not be found", false);
-
- }
- /**
- * Tests specifying the -listener option
- */
- public void testListener() throws CoreException {
- run("TestForEcho.xml", new String[]{"-listener", ANT_TEST_BUILD_LISTENER});
- assertSuccessful();
- assertTrue("A listener should have been added named: " + ANT_TEST_BUILD_LISTENER, ANT_TEST_BUILD_LISTENER.equals(AntTestChecker.getDefault().getLastListener()));
- }
-
- /**
- * Tests specifying the -listener option multiple times...which is allowed
- */
- public void testListenerMultiple() throws CoreException {
- run("TestForEcho.xml", new String[]{"-listener", ANT_TEST_BUILD_LISTENER, "-listener", ANT_TEST_BUILD_LISTENER});
- assertSuccessful();
- assertTrue("A listener should have been added named: " + ANT_TEST_BUILD_LISTENER, ANT_TEST_BUILD_LISTENER.equals(AntTestChecker.getDefault().getLastListener()));
- assertTrue("Two listeners should have been added", AntTestChecker.getDefault().getListeners().size() == 2);
- }
-
- /**
- * Tests specifying the -listener option multiple times, with one missing the arg
- */
- public void testListenerMultipleWithBad() throws CoreException {
- try {
- run("TestForEcho.xml", new String[]{"-listener", ANT_TEST_BUILD_LISTENER, "-q", "-listener", "-verbose"});
- } catch(CoreException e) {
- //You must specify a listener for all -listener arguments
- return;
- }
- assertTrue("You must specify a listener for all -listener arguments ", false);
- }
-
- /**
- * Tests specifying the -buildfile with no arg
- */
- public void testBuildFileWithNoArg() throws CoreException {
- try {
- run("TestForEcho.xml", new String[]{"-buildfile"});
- } catch (CoreException ce) {
- //You must specify a buildfile when using the -buildfile argument
- return;
- }
- assertTrue("You must specify a buildfile when using the -buildfile argument", false);
- }
-
- /**
- * Tests specifying the -buildfile
- */
- public void testBuildFile() throws CoreException {
- String buildFileName= getProject().getFolder("buildfiles").getFile("echoing.xml").getLocation().toFile().getAbsolutePath();
- run("TestForEcho.xml", new String[]{"-buildfile", buildFileName}, false, "buildfiles");
-
- assertTrue("Should have been 1 tasks, was: " + AntTestChecker.getDefault().getTaskStartedCount(), AntTestChecker.getDefault().getTaskStartedCount() == 1);
- }
-
- /**
- * Tests specifying a target at the command line that does not exist.
- */
- public void testSpecifyBadTargetAsArg() throws CoreException {
- try {
- run("TestForEcho.xml", new String[]{"echo2"}, false);
- } catch (CoreException ce) {
- return;
- }
- assertTrue("A core exception should have occurred as the target does not exist", false);
- }
-
- /**
- * Tests specifying a target at the command line
- */
- public void testSpecifyTargetAsArg() throws CoreException {
- run("echoing.xml", new String[]{"echo3"}, false);
- assertTrue("3 messages should have been logged; was " + AntTestChecker.getDefault().getMessagesLoggedCount(), AntTestChecker.getDefault().getMessagesLoggedCount() == 3);
- assertSuccessful();
- }
-
- /**
- * Tests specifying a target at the command line with other options
- */
- public void testSpecifyTargetAsArgWithOtherOptions() throws CoreException {
- run("echoing.xml", new String[]{"-logfile", "TestLogFile.txt", "echo3"}, false);
- assertTrue("4 messages should have been logged; was " + AntTestChecker.getDefault().getMessagesLoggedCount(), AntTestChecker.getDefault().getMessagesLoggedCount() == 4);
- List messages= AntTestChecker.getDefault().getMessages();
- //ensure that echo3 target executed and only that target
- assertTrue("echo3 target not executed", messages.get(2).equals("echo3"));
- assertSuccessful();
- }
-
- /**
- * Tests specifying targets at the command line with other options
- */
- public void testSpecifyTargetsAsArgWithOtherOptions() throws CoreException {
- run("echoing.xml", new String[]{"-logfile", "TestLogFile.txt", "echo2", "echo3"}, false);
- assertTrue("5 messages should have been logged; was " + AntTestChecker.getDefault().getMessagesLoggedCount(), AntTestChecker.getDefault().getMessagesLoggedCount() == 5);
- List messages= AntTestChecker.getDefault().getMessages();
- //ensure that echo2 target executed
- assertTrue("echo2 target not executed", messages.get(2).equals("echo2"));
- assertSuccessful();
- }
-
- /**
- * Tests specifying a target at the command line and quiet reporting
- */
- public void testSpecifyTargetAsArgAndQuiet() throws CoreException {
- run("echoing.xml", new String[]{"-logfile", "TestLogFile.txt", "echo3", "-quiet"}, false);
- assertTrue("1 message should have been logged; was " + AntTestChecker.getDefault().getMessagesLoggedCount(), AntTestChecker.getDefault().getMessagesLoggedCount() == 1);
- }
-
- /**
- * Tests specifying a target at the command line and quiet reporting
- */
- public void testMinusD() throws CoreException {
- run("echoing.xml", new String[]{"-DAntTests=testing", "-Declipse.is.cool=true"}, false);
- assertSuccessful();
- assertTrue("eclipse.is.cool should have been set as true", "true".equals(AntTestChecker.getDefault().getUserProperty("eclipse.is.cool")));
- assertTrue("AntTests should have a value of testing", "testing".equals(AntTestChecker.getDefault().getUserProperty("AntTests")));
- assertNull("my.name was not set and should be null", AntTestChecker.getDefault().getUserProperty("my.name"));
- }
-
- public void testPropertyFileWithNoArg() throws CoreException {
- try {
- run("TestForEcho.xml", new String[]{"-propertyfile"});
- } catch (CoreException ce) {
- String msg= (String)AntTestChecker.getDefault().getMessages().get(0);
- assertTrue("Message incorrect!: " + msg, msg.equals("You must specify a property filename when using the -propertyfile argument"));
- return;
- }
- assertTrue("You must specify a property filename when using the -propertyfile argument", false);
- }
-
- /**
- * A build should succeed when a property file is not found.
- * The error is reported and the build continues.
- */
- public void testPropertyFileFileNotFound() throws CoreException {
-
- run("TestForEcho.xml", new String[]{"-propertyfile", "qq.txt"});
- assertSuccessful();
- String msg= (String)AntTestChecker.getDefault().getMessages().get(0);
- assertTrue("Message incorrect!: " + msg, msg.startsWith("Could not load property file qq.txt:"));
- }
-
- public void testPropertyFile() throws CoreException {
- run("TestForEcho.xml", new String[]{"-propertyfile", getPropertyFileName()});
- assertSuccessful();
- assertTrue("eclipse.is.cool should have been set as Yep", "Yep".equals(AntTestChecker.getDefault().getUserProperty("eclipse.is.cool")));
- assertTrue("AntTests should have a value of testing", "testing from properties file".equals(AntTestChecker.getDefault().getUserProperty("AntTests")));
- assertNull("my.name was not set and should be null", AntTestChecker.getDefault().getUserProperty("my.name"));
- }
-
- public void testPropertyFileWithMinusDTakingPrecedence() throws CoreException {
- run("echoing.xml", new String[]{"-propertyfile", getPropertyFileName(), "-DAntTests=testing", "-Declipse.is.cool=true"}, false);
- assertSuccessful();
- assertTrue("eclipse.is.cool should have been set as true", "true".equals(AntTestChecker.getDefault().getUserProperty("eclipse.is.cool")));
- assertTrue("AntTests should have a value of testing", "testing".equals(AntTestChecker.getDefault().getUserProperty("AntTests")));
- assertNull("my.name was not set and should be null", AntTestChecker.getDefault().getUserProperty("my.name"));
- }
-
- public void testInputHandlerWithNoArg() throws CoreException {
- try {
- run("TestForEcho.xml", new String[]{"-inputhandler"});
- } catch (CoreException ce) {
- String msg= ce.getMessage();
- assertTrue("Message incorrect!: " + msg, msg.equals("You must specify a classname when using the -inputhandler argument"));
- return;
- }
- assertTrue("You must specify a classname when using the -inputhandler argument", false);
- }
-
- /**
- * Tests the "-inputhandler" option with two handlers specified...only one is allowed
- */
- public void testInputHandlerMultiple() throws CoreException {
- try {
- run("TestForEcho.xml", new String[]{"-inputhandler", "org.apache.tools.ant.input.DefaultInputHandler", "-q", "-inputhandler", "org.apache.tools.ant.input.DefaultInputHandler"});
- } catch (CoreException ce) {
- String msg= ce.getMessage();
- assertTrue("Message incorrect!: " + msg, msg.equals("Only one input handler class may be specified."));
- return;
- }
- assertTrue("As only one input handler can be specified", false);
- }
-
- /**
- * Tests the "-inputhandler" option with a input handler that is not an instance of InputHandler
- */
- public void testInputHandlerBad() throws CoreException {
- try {
- run("TestForEcho.xml", new String[]{"-inputhandler", "java.lang.StringBuffer"});
- } catch (CoreException ce) {
- String msg= ce.getMessage();
- assertTrue("Message incorrect!: " + msg, msg.equals("The specified input handler class java.lang.StringBuffer does not implement the org.apache.tools.ant.input.InputHandler interface"));
- return;
- }
- assertTrue("Incorrect inputhandler", false);
- }
-
- /**
- * Tests the "-inputhandler" option with a input handler that is not a defined class
- */
- public void testInputHandlerBad2() throws CoreException {
- try {
- run("TestForEcho.xml", new String[]{"-inputhandler", "ja.lang.StringBuffer"});
- } catch (CoreException ce) {
- String msg= ce.getMessage();
- assertTrue("Message incorrect!: " + msg, msg.startsWith("Unable to instantiate specified input handler class ja.lang.StringBuffer"));
- return;
- }
- assertTrue("Incorrect inputhandler", false);
- }
-
- /**
- * Tests the "-inputhandler" option with a test input handler
- */
- public void testInputHandler() throws CoreException {
-
- run("input.xml", new String[]{"-inputhandler", "org.eclipse.ant.tests.core.support.inputHandlers.AntTestInputHandler"});
- assertSuccessful();
- String msg= (String)AntTestChecker.getDefault().getMessages().get(1);
- assertTrue("Message incorrect: " + msg, msg.equals("testing handling input requests"));
-
- }
-
- /**
- * Tests the "-diagnostics" option with no ANT_HOME set
- * bug 25693
- */
- public void testDiagnosticsWithNoAntHome() throws CoreException {
-
- run("input.xml", new String[]{"-diagnostics"});
- String msg= (String)AntTestChecker.getDefault().getMessages().get(0);
- assertTrue("Message incorrect: " + msg, msg.equals("------- Ant diagnostics report -------"));
- }
-
- /**
- * Tests the "-diagnostics" option with ANT_HOME set
- * bug 25693
- */
- public void testDiagnostics() throws CoreException {
- AntCorePlugin.getPlugin().getPreferences().setAntHome(getAntHome());
- try {
- run("input.xml", new String[]{"-diagnostics"});
- } finally {
- restorePreferenceDefaults();
- }
-
- String msg= (String)AntTestChecker.getDefault().getMessages().get(12);
- //msg depends on whether self hosting testing or build testing
- assertTrue("Message incorrect: " + msg, msg.endsWith("org.apache.ant") || msg.endsWith("org.apache.ant_1.5.3"));
- }
-}
diff --git a/ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/tests/ProjectTests.java b/ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/tests/ProjectTests.java
deleted file mode 100644
index 1b25ce8..0000000
--- a/ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/tests/ProjectTests.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.tests.core.tests;
-
-
-import org.eclipse.ant.tests.core.AbstractAntTest;
-import org.eclipse.ant.tests.core.testplugin.AntTestChecker;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.CoreException;
-
-
-public class ProjectTests extends AbstractAntTest {
-
- public ProjectTests(String name) {
- super(name);
- }
-
- /**
- * Tests that the three properties that should always be set are correct
- */
- public void testBasePropertiesSet() throws CoreException {
- String buildFileName="TestForEcho.xml";
- run(buildFileName);
- IFile buildFile= getBuildFile(buildFileName);
- String fullName= buildFile.getLocation().toFile().getAbsolutePath();
- assertTrue("eclipse.running should have been set as true", "true".equals(AntTestChecker.getDefault().getUserProperty("eclipse.running")));
- assertTrue("ant.file should have been set as the build file name", fullName.equals(AntTestChecker.getDefault().getUserProperty("ant.file")));
- assertNotNull("ant.version should have been set", AntTestChecker.getDefault().getUserProperty("ant.version"));
- }
-}
-
diff --git a/ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/tests/TargetTests.java b/ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/tests/TargetTests.java
deleted file mode 100644
index 19de044..0000000
--- a/ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/tests/TargetTests.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.tests.core.tests;
-
-
-import java.io.File;
-
-import org.eclipse.ant.core.TargetInfo;
-import org.eclipse.ant.tests.core.AbstractAntTest;
-import org.eclipse.ant.tests.core.testplugin.AntTestChecker;
-import org.eclipse.core.runtime.CoreException;
-
-
-public class TargetTests extends AbstractAntTest {
-
- public TargetTests(String name) {
- super(name);
- }
-
- /**
- * Ensures that a default target is found
- */
- public void testDefaultTarget() throws CoreException {
- TargetInfo[] targets= getTargets("TestForEcho.xml");
- assertTrue("Should be two targets in TestForEcho.xml", targets.length == 2);
- assertTrue("Test for Echo should be the default target", targets[1].isDefault());
- }
-
- /**
- * Ensures that targets are found in a build file with data types
- */
- public void testGetTargetsWithDataTypes() throws CoreException {
- TargetInfo[] targets= getTargets("Bug32551.xml");
- assertTrue("Should be one targets in Bug32551.xml", targets.length == 1);
- }
-
- /**
- * Ensures that target names are retrieved properly
- */
- public void testTargetNames() throws CoreException {
- String[] targetNames= getTargetNames("TestForEcho.xml");
- assertTrue("Should be two targets in TestForEcho.xml", targetNames.length == 2);
- assertTrue("First name should be init", targetNames[0].equals("init"));
- assertTrue("Second name should be Test for Echo", targetNames[1].equals("Test for Echo"));
- }
-
- /**
- * Ensures that target descriptions are retrieved properly
- */
- public void testTargetDescription() throws CoreException {
- String[] targetDescriptions= getTargetDescriptions("TestForEcho.xml");
- assertTrue("Should be two targets in TestForEcho.xml", targetDescriptions.length == 2);
- assertNull("First description should be null", targetDescriptions[0]);
- assertTrue("Second description should be Calls other targets", targetDescriptions[1].equals("Calls other echos"));
- }
-
- /**
- * Ensures that target projects are retrieved properly
- */
- public void testTargetProject() throws CoreException {
- String targetProject= getProjectName("TestForEcho.xml", "Test for Echo");
- assertTrue("Project name should be Echo Test", "Echo Test".equals(targetProject));
- }
-
- /**
- * Ensures that target dependencies are retrieved properly
- */
- public void testTargetDependencies() throws CoreException {
- String[] dependencies= getDependencies("TestForEcho.xml", "Test for Echo");
- assertNotNull("Dependencies should not be null", dependencies);
- assertTrue("Should be one dependency in Test for Echo", dependencies.length == 1);
- assertTrue("First dependency should be init", "init".equals(dependencies[0]));
- }
-
- /**
- * Runs an Ant build and ensure that the build file location is logged
- */
- public void testRunScript() throws CoreException {
- run("TestForEcho.xml");
- String message= (String)AntTestChecker.getDefault().getMessages().get(0);
- assertTrue("Build file location should be logged as the first message", message != null && message.endsWith("AntTests" + File.separator + "buildfiles" + File.separator + "TestForEcho.xml"));
- assertSuccessful();
- }
-}
-
diff --git a/ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/tests/TaskTests.java b/ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/tests/TaskTests.java
deleted file mode 100644
index 9f370cd..0000000
--- a/ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/tests/TaskTests.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.tests.core.tests;
-
-import java.io.File;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import org.eclipse.ant.core.AntCorePlugin;
-import org.eclipse.ant.core.AntCorePreferences;
-import org.eclipse.ant.core.Property;
-import org.eclipse.ant.core.Task;
-import org.eclipse.ant.tests.core.AbstractAntTest;
-import org.eclipse.ant.tests.core.testplugin.AntTestChecker;
-import org.eclipse.core.runtime.CoreException;
-
-public class TaskTests extends AbstractAntTest {
-
-
- public TaskTests(String name) {
- super(name);
- }
-
- public void testAddTask() throws MalformedURLException, CoreException {
- AntCorePreferences prefs =AntCorePlugin.getPlugin().getPreferences();
- Task newTask= new Task();
- String path= getProject().getFolder("lib").getFile("antTestsSupport.jar").getLocation().toFile().getAbsolutePath();
- URL url= new URL("file:" + path);
- URL urls[] = prefs.getCustomURLs();
- URL newUrls[] = new URL[urls.length + 1];
- System.arraycopy(urls, 0, newUrls, 0, urls.length);
- newUrls[urls.length] = url;
- prefs.setCustomURLs(newUrls);
-
- newTask.setLibrary(url);
- newTask.setTaskName("AntTestTask");
- newTask.setClassName("org.eclipse.ant.tests.core.support.tasks.AntTestTask");
- prefs.setCustomTasks(new Task[]{newTask});
-
- prefs.updatePluginPreferences();
-
- run("CustomTask.xml");
- String msg= (String)AntTestChecker.getDefault().getMessages().get(1);
- assertTrue("Message incorrect: " + msg, msg.equals("Testing Ant in Eclipse with a custom task"));
- assertSuccessful();
- }
-
- public void testRemoveTask() throws CoreException {
- AntCorePreferences prefs =AntCorePlugin.getPlugin().getPreferences();
- prefs.setCustomTasks(new Task[]{});
- try {
- run("CustomTask.xml");
- } catch (CoreException ce) {
- assertTrue("Exception from undefined task is incorrect", ce.getMessage().endsWith("as this is not an Ant bug."));
- return;
- }
- assertTrue("Build should have failed as task no longer defined", false);
- restorePreferenceDefaults();
- }
-
- public void testAddTaskFromFolder() throws MalformedURLException, CoreException {
- try {
- AntCorePreferences prefs =AntCorePlugin.getPlugin().getPreferences();
- Task newTask= new Task();
- String path= getProject().getFolder("lib").getFile("taskFolder").getLocation().toFile().getAbsolutePath();
- URL url= new URL("file:" + path + File.separatorChar);
- URL urls[] = prefs.getCustomURLs();
- URL newUrls[] = new URL[urls.length + 1];
- System.arraycopy(urls, 0, newUrls, 0, urls.length);
- newUrls[urls.length] = url;
- prefs.setCustomURLs(newUrls);
-
- newTask.setLibrary(url);
- newTask.setTaskName("AntTestTask");
- newTask.setClassName("org.eclipse.ant.tests.core.support.tasks.AntTestTask2");
- prefs.setCustomTasks(new Task[]{newTask});
-
- prefs.updatePluginPreferences();
-
- run("CustomTask.xml");
- String msg= (String)AntTestChecker.getDefault().getMessages().get(1);
- assertTrue("Message incorrect: " + msg, msg.equals("Testing Ant in Eclipse with a custom task"));
- assertSuccessful();
- } finally {
- restorePreferenceDefaults();
- }
- }
-
- public void testTasksDefinedInPropertyFile() throws CoreException {
- try {
- AntCorePreferences prefs =AntCorePlugin.getPlugin().getPreferences();
- Property newProp= new Property("ROOTDIR", "..//resources");
- prefs.setCustomProperties(new Property[]{newProp});
- run("Bug34663.xml");
- } finally {
- restorePreferenceDefaults();
- }
- }
-}
diff --git a/ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/tests/TypeTests.java b/ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/tests/TypeTests.java
deleted file mode 100644
index e029705..0000000
--- a/ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/tests/TypeTests.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.tests.core.tests;
-
-
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import org.eclipse.ant.core.AntCorePlugin;
-import org.eclipse.ant.core.AntCorePreferences;
-import org.eclipse.ant.core.Type;
-import org.eclipse.ant.tests.core.AbstractAntTest;
-import org.eclipse.ant.tests.core.testplugin.AntTestChecker;
-import org.eclipse.core.runtime.CoreException;
-
-public class TypeTests extends AbstractAntTest {
-
- public TypeTests(String name) {
- super(name);
- }
-
- public void testAddType() throws MalformedURLException, CoreException {
- AntCorePreferences prefs =AntCorePlugin.getPlugin().getPreferences();
- Type newType= new Type();
- String path= getProject().getFolder("lib").getFile("antTestsSupport.jar").getLocation().toFile().getAbsolutePath();
- URL url= new URL("file:" + path);
- newType.setLibrary(url);
- newType.setTypeName("anttestpath");
- newType.setClassName("org.eclipse.ant.tests.core.support.types.AntTestPath");
- prefs.setCustomTypes(new Type[]{newType});
-
- run("CustomType.xml");
- String msg= (String)AntTestChecker.getDefault().getMessages().get(1);
- assertTrue("Message incorrect: " + msg, msg.equals("Test adding a custom type"));
- assertSuccessful();
- }
-
- public void testRemoveType() throws CoreException {
- AntCorePreferences prefs =AntCorePlugin.getPlugin().getPreferences();
- prefs.setCustomTypes(new Type[]{});
- try {
- run("CustomType.xml");
- } catch (CoreException ce) {
- assertTrue("Exception from undefined type is incorrect", ce.getMessage().endsWith("Unexpected element \"anttestpath\""));
- return;
- }
- assertTrue("Build should have failed as type no longer defined", false);
- restorePreferenceDefaults();
- }
-}
diff --git a/update/org.eclipse.update.ui/.classpath b/update/org.eclipse.update.ui/.classpath
deleted file mode 100644
index c5b3d09..0000000
--- a/update/org.eclipse.update.ui/.classpath
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src/"/>
- <classpathentry kind="src" output="webapp/WEB-INF/classes" path="src_webapp"/>
- <classpathentry kind="src" path="/org.eclipse.core.runtime"/>
- <classpathentry kind="src" path="/org.eclipse.ui"/>
- <classpathentry kind="src" path="/org.eclipse.update.core"/>
- <classpathentry kind="src" path="/org.eclipse.update.ui.forms"/>
- <classpathentry kind="src" path="/org.eclipse.core.resources"/>
- <classpathentry kind="src" path="/org.apache.xerces"/>
- <classpathentry kind="src" path="/org.eclipse.help.appserver"/>
- <classpathentry kind="src" path="/org.eclipse.help"/>
- <classpathentry kind="src" path="/org.eclipse.core.boot"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="lib" path="/org.eclipse.tomcat/servlet.jar" sourcepath="/org.eclipse.platform.source/src/org.eclipse.tomcat_4.0.6/tomcatwrappersrc.zip"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/update/org.eclipse.update.ui/.cvsignore b/update/org.eclipse.update.ui/.cvsignore
deleted file mode 100644
index ba077a4..0000000
--- a/update/org.eclipse.update.ui/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/update/org.eclipse.update.ui/.project b/update/org.eclipse.update.ui/.project
deleted file mode 100644
index 3869dac..0000000
--- a/update/org.eclipse.update.ui/.project
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.update.ui</name>
- <comment></comment>
- <projects>
- <project>org.apache.xerces</project>
- <project>org.eclipse.core.boot</project>
- <project>org.eclipse.core.resources</project>
- <project>org.eclipse.core.runtime</project>
- <project>org.eclipse.help</project>
- <project>org.eclipse.help.appserver</project>
- <project>org.eclipse.ui</project>
- <project>org.eclipse.update.core</project>
- <project>org.eclipse.update.ui.forms</project>
- </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.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
diff --git a/update/org.eclipse.update.ui/Graphics_update.html b/update/org.eclipse.update.ui/Graphics_update.html
deleted file mode 100644
index fdae1a3..0000000
--- a/update/org.eclipse.update.ui/Graphics_update.html
+++ /dev/null
@@ -1,955 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<!-- saved from url=(0110)http://design.torolab.ibm.com/aim/WSWB-eclipse/1020_PDE/implementation_icons/org.eclipse.pde/Graphics_pde.html -->
-<HTML><HEAD><TITLE>graphics</TITLE>
-<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<META content="Greg Adams" name=Author>
-<META content="Microsoft FrontPage 4.0" name=GENERATOR></HEAD>
-<BODY bgColor=white>
-<H2>org.eclipse.update.ui - Graphics Summary</H2><FONT size=-1><STRONG>Competency
-lead: </STRONG>Vlad Klicnik / TOL <BR><STRONG>Technical lead: </STRONG>Dejan
-Glozic / TOL <BR><STRONG>UCD designer: </STRONG>Julian Jones / TOL
-<BR><STRONG>UI designer: </STRONG>Andrée Proulx / TOL <BR><STRONG>ID writer:
-</STRONG>-</FONT>
-<HR width="100%" SIZE=1>
-<B><FONT size=-1>History:</FONT></B>
-<p><font size="-1">April 19, 2002 : Template Submission</font></p>
-<HR width="100%" SIZE=1>
-<!--- Start Here --->
-<TABLE cellSpacing=0 cellPadding=3 width="100%" border=0 height="3147">
-
- <TR bgColor=#bfbf7f>
- <TD colSpan=7><B><FONT size=+2>View</FONT></B></TD></TR>
- <TR bgColor=#dfdf9f>
- <TD> </TD>
- <TD><B><FONT size=-1>Item</FONT></B></TD>
- <TD><B><FONT size=-1>File Name (.gif)</FONT></B></TD>
- <TD><B><FONT size=-1>Description/Hoover Help</FONT></B></TD>
- <TD>
- <CENTER><B><FONT size=-1>Old</FONT></B> </CENTER></TD>
- <TD>
- <CENTER><B><FONT size=-1>New Full</FONT></B> </CENTER></TD>
- <TD><B><FONT size=-1>Status</FONT></B></TD></TR>
- <TR bgColor=#ffffff>
- <TD>1</TD>
- <TD>Configurations</TD>
- <TD><FONT size=-1>configs</FONT></TD>
- <TD><FONT size=-1> shows the configurations of the Eclipse-based application</FONT></TD>
- <TD><IMG height=16 alt=""
- src="../old.icons/full/view16/configs.gif" width=16 border=0></TD>
- <TD><IMG height=16 alt=""
- src="icons/full/cview16/configs.gif" width=16 border=0> <IMG height=16
- alt="" src="icons/full/eview16/configs.gif" width=16 border=0> </TD>
- <TD><FONT size=-1> </FONT></TD></TR>
- <TR bgColor=#dfdfb>
- <TD>2</TD>
- <TD>Updates</TD>
- <TD><FONT size=-1>updates</FONT></TD>
- <TD><FONT size=-1>shows sites an Eclipse app can be updated from</FONT></TD>
- <TD><IMG height=16 alt=""
- src="../old.icons/full/view16/updates.gif" width=16 border=0></TD>
- <TD><IMG height=16 alt=""
- src="icons/full/cview16/updates.gif" width=16 border=0> <IMG height=16
- alt="" src="icons/full/eview16/updates.gif" width=16 border=0> </TD>
- <TD><FONT size=-1> </FONT></TD></TR>
- <TR bgColor=#ffffff>
- <TD>3</TD>
- <TD>Preview</TD>
- <TD><font size="-1">preview</font></TD>
- <TD><font size="-1">shows details of the selected object</font></TD>
- <TD><IMG height=16 alt=""
- src="../old.icons/full/view16/preview.gif" width=16 border=0></TD>
- <TD><IMG height=16 alt=""
- src="icons/full/cview16/preview.gif" width=16 border=0> <IMG height=16
- alt="" src="icons/full/eview16/preview.gif" width=16 border=0> </TD>
- <TD><FONT size=-1> </FONT></TD></TR>
- <TR bgColor=#dfdfb>
- <TD>4</TD>
- <TD>Web Browser</TD>
- <TD><font size="-1">browser</font></TD>
- <TD><font size="-1">a fully-functioning Web browser (hosts IE5 - Windows only)</font></TD>
- <TD><IMG height=16 alt=""
- src="../old.icons/full/view16/browser.gif" width=16 border=0></TD>
- <TD><IMG height=16 alt=""
- src="icons/full/cview16/browser.gif" width=16 border=0> <IMG height=16
- alt="" src="icons/full/eview16/browser.gif" width=16 border=0> </TD>
- <TD><FONT size=-1> </FONT></TD></TR>
- <TR bgColor=#ffffff>
- <TD>5</TD>
- <TD>Update Perspective</TD>
- <TD><font size="-1">update_pers</font></TD>
- <TD><font size="-1">Represents Install/Update
- perspective in the UI</font></TD>
- <TD></TD>
- <TD><IMG height=16 alt=""
- src="icons/full/cview16/update_pers.gif" width=16 border=0> <IMG height=16
- alt="" src="icons/full/eview16/update_pers.gif" width=16
-border=0> </TD>
- <TD><FONT size=-1> </FONT></TD>
- </TR>
-
- <TR bgColor=#bfbf7f>
- <TD colSpan=7><B><FONT size=+2>Toolbar Wizard</FONT></B></TD></TR>
- <TR bgColor=#ffffff>
- <TD>1</TD>
- <TD> </TD>
- <TD><FONT size=-1> </FONT></TD>
- <TD>
- <TABLE cellSpacing=2 cellPadding=0 width="100%" border=0>
-
- <TR>
- <TD vAlign=top><font size="-1"> description</font></TD>
- <TD vAlign=center align=right>
- <TABLE>
-
- <TR>
- <TD
- style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid"
- align=middle bgColor=#ffffe1><FONT
- size=-2> tool tip </FONT></TD></TR></TABLE></TD></TR></TABLE></TD>
- <TD></TD>
- <TD bgColor=#cccccc><IMG height=16 alt=""
- src="icons/full/ctool16/config_wiz.gif" width=16 border=0> <IMG
- height=16 alt="" src="icons/full/etool16/config_wiz.gif" width=16
- border=0> <IMG height=16 alt=""
- src="icons/full/dtool16/config_wiz.gif" width=16 border=0> </TD>
- <TD><FONT size=-1> </FONT></TD></TR>
-
- <TR bgColor=#dfdf9f>
- <TD>2</TD>
- <TD> </TD>
- <TD><FONT size=-1></FONT></TD>
- <TD>
- <TABLE cellSpacing=2 cellPadding=0 width="100%" border=0>
-
- <TR>
- <TD vAlign=top><font size="-1"> description</font></TD>
- <TD vAlign=center align=right>
- <TABLE>
-
- <TR>
- <TD
- style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid"
- align=middle bgColor=#ffffe1><FONT
- size=-2> tool tip </FONT></TD></TR></TABLE></TD></TR></TABLE></TD>
- <TD></TD>
- <TD bgColor=#cccccc><IMG height=16 alt=""
- src="icons/full/ctool16/install_wiz.gif" width=16 border=0> <IMG
- height=16 alt="" src="icons/full/etool16/install_wiz.gif" width=16
- border=0> <IMG height=16 alt=""
- src="icons/full/dtool16/install_wiz.gif" width=16 border=0> </TD>
- <TD><FONT size=-1> </FONT></TD></TR>
-
- <TR bgColor=#ffffff>
- <TD>3</TD>
- <TD> </TD>
- <TD><FONT size=-1> </FONT></TD>
- <TD>
- <TABLE cellSpacing=2 cellPadding=0 width="100%" border=0>
-
- <TR>
- <TD vAlign=top><font size="-1"> description</font></TD>
- <TD vAlign=center align=right>
- <TABLE>
-
- <TR>
- <TD
- style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid"
- align=middle bgColor=#ffffe1><FONT
- size=-2> tool tip </FONT></TD></TR></TABLE></TD></TR></TABLE></TD>
- <TD></TD>
- <TD bgColor=#cccccc><IMG height=16 alt=""
- src="icons/full/ctool16/new_bookmark_wiz.gif" width=16 border=0> <IMG
- height=16 alt="" src="icons/full/etool16/new_bookmark_wiz.gif" width=16
- border=0> <IMG height=16 alt=""
- src="icons/full/dtool16/new_bookmark_wiz.gif" width=16 border=0> </TD>
- <TD><FONT size=-1> </FONT></TD></TR>
-
- <TR bgColor=#dfdf9f>
- <TD>4</TD>
- <TD> </TD>
- <TD><FONT size=-1> </FONT></TD>
- <TD>
- <TABLE cellSpacing=2 cellPadding=0 width="100%" border=0>
-
- <TR>
- <TD vAlign=top><font size="-1"> description</font></TD>
- <TD vAlign=center align=right>
- <TABLE>
-
- <TR>
- <TD
- style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid"
- align=middle bgColor=#ffffe1><FONT
- size=-2> tool tip </FONT></TD></TR></TABLE></TD></TR></TABLE></TD>
- <TD></TD>
- <TD bgColor=#cccccc><IMG height=16 alt=""
- src="icons/full/ctool16/new_folder_wiz.gif" width=16 border=0> <IMG
- height=16 alt="" src="icons/full/etool16/new_folder_wiz.gif" width=16
- border=0> <IMG height=16 alt=""
- src="icons/full/dtool16/new_folder_wiz.gif" width=16 border=0> </TD>
- <TD><FONT size=-1> </FONT></TD></TR>
- <TR bgColor=#ffffff>
- <TD>5</TD>
- <TD> </TD>
- <TD><FONT size=-1> </FONT></TD>
- <TD>
- <TABLE cellSpacing=2 cellPadding=0 width="100%" border=0>
-
- <TR>
- <TD vAlign=top><font size="-1"> description</font></TD>
- <TD vAlign=center align=right>
- <TABLE>
-
- <TR>
- <TD
- style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid"
- align=middle bgColor=#ffffe1><FONT
- size=-2> tool tip </FONT></TD></TR></TABLE></TD></TR></TABLE></TD>
- <TD></TD>
- <TD bgColor=#cccccc><IMG height=16 alt=""
- src="icons/full/ctool16/new_search_wiz.gif" width=16 border=0> <IMG
- height=16 alt="" src="icons/full/etool16/new_search_wiz.gif" width=16
- border=0> <IMG height=16 alt=""
- src="icons/full/dtool16/new_search_wiz.gif" width=16 border=0> </TD>
- <TD><FONT size=-1> </FONT></TD></TR>
-
- <TR bgColor=#dfdf9f>
- <TD>6</TD>
- <TD> </TD>
- <TD><FONT size=-1> </FONT></TD>
- <TD>
- <TABLE cellSpacing=2 cellPadding=0 width="100%" border=0>
-
- <TR>
- <TD vAlign=top><font size="-1"> description</font></TD>
- <TD vAlign=center align=right>
- <TABLE>
-
- <TR>
- <TD
- style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid"
- align=middle bgColor=#ffffe1><FONT
- size=-2> tool tip </FONT></TD></TR></TABLE></TD></TR></TABLE></TD>
- <TD></TD>
- <TD bgColor=#cccccc><IMG height=16 alt=""
- src="icons/full/ctool16/uninstall_wiz.gif" width=16 border=0> <IMG
- height=16 alt="" src="icons/full/etool16/uninstall_wiz.gif" width=16
- border=0> <IMG height=16 alt=""
- src="icons/full/dtool16/uninstall_wiz.gif" width=16 border=0> </TD>
- <TD><FONT size=-1> </FONT></TD></TR>
- <TR bgColor=#ffffff>
- <TD>7</TD>
- <TD> </TD>
- <TD><FONT size=-1> </FONT></TD>
- <TD>
- <TABLE cellSpacing=2 cellPadding=0 width="100%" border=0>
-
- <TR>
- <TD vAlign=top><font size="-1"> description</font></TD>
- <TD vAlign=center align=right>
- <TABLE>
-
- <TR>
- <TD
- style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid"
- align=middle bgColor=#ffffe1><FONT
- size=-2> tool tip </FONT></TD></TR></TABLE></TD></TR></TABLE></TD>
- <TD></TD>
- <TD bgColor=#cccccc><IMG height=16 alt=""
- src="icons/full/ctool16/update_wiz.gif" width=16 border=0> <IMG
- height=16 alt="" src="icons/full/etool16/update_wiz.gif" width=16
- border=0> <IMG height=16 alt=""
- src="icons/full/dtool16/update_wiz.gif" width=16 border=0> </TD>
- <TD><FONT size=-1> </FONT></TD></TR>
-
-
- <TR bgColor=#bfbf7f>
- <TD colSpan=7><B><FONT size=+2>Local Toolbar</FONT></B></TD></TR>
- <TR bgColor=#ffffff>
- <TD>1</TD>
- <TD>Go Backward</TD>
- <TD><FONT size=-1> backward_nav</FONT></TD>
- <TD>
- <TABLE cellSpacing=2 cellPadding=0 width="100%" border=0>
-
- <TR>
- <TD vAlign=top><font size="-1">A standard browser 'backward' button</font></TD>
- <TD vAlign=center align=right>
- <TABLE>
-
- <TR>
- <TD
- style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid"
- align=middle bgColor=#ffffe1><FONT
- size=-2> Go Backward </FONT></TD></TR></TABLE></TD></TR></TABLE></TD>
- <TD><IMG height=16 alt=""
- src="../old.icons/full/clcl16/backward_nav.gif" width=16 border=0> <IMG
- height=16 alt=""
- src="../old.icons/full/elcl16/backward_nav.gif"
- width=16 border=0> <IMG height=16 alt=""
- src="../old.icons/full/dlcl16/backward_nav.gif"
- width=16 border=0></TD>
- <TD bgColor=#cccccc><IMG height=16 alt=""
- src="icons/full/clcl16/backward_nav.gif" width=16 border=0> <IMG
- height=16 alt="" src="icons/full/elcl16/backward_nav.gif" width=16
- border=0> <IMG height=16 alt=""
- src="icons/full/dlcl16/backward_nav.gif" width=16 border=0> </TD>
- <TD><FONT size=-1> </FONT></TD></TR>
-
- <TR bgColor=#dfdf9f>
- <TD>2</TD>
- <TD>Go Forward</TD>
- <TD><FONT size=-1> forward_nav</FONT></TD>
- <TD>
- <TABLE cellSpacing=2 cellPadding=0 width="100%" border=0>
-
- <TR>
- <TD vAlign=top><font size="-1">A standard browser 'forward' button</font></TD>
- <TD vAlign=center align=right>
- <TABLE>
-
- <TR>
- <TD
- style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid"
- align=middle bgColor=#ffffe1><FONT
- size=-2> Go Forward </FONT></TD></TR></TABLE></TD></TR></TABLE></TD>
- <TD><IMG height=16 alt=""
- src="../old.icons/full/clcl16/forward_nav.gif" width=16 border=0> <IMG height=16 alt=""
- src="../old.icons/full/elcl16/forward_nav.gif" width=16 border=0> <IMG height=16 alt=""
- src="../old.icons/full/dlcl16/forward_nav.gif" width=16 border=0></TD>
- <TD bgColor=#cccccc><IMG height=16 alt=""
- src="icons/full/clcl16/forward_nav.gif" width=16 border=0> <IMG
- height=16 alt="" src="icons/full/elcl16/forward_nav.gif" width=16
- border=0> <IMG height=16 alt=""
- src="icons/full/dlcl16/forward_nav.gif" width=16 border=0> </TD>
- <TD><FONT size=-1> </FONT></TD></TR>
- <TR bgColor=#ffffff>
- <TD>3</TD>
- <TD>Go</TD>
- <TD><FONT size=-1> go_nav</FONT></TD>
- <TD>
- <TABLE cellSpacing=2 cellPadding=0 width="100%" border=0>
-
- <TR>
- <TD vAlign=top><font size="-1">A standard browser button for
- navigating to a URL.</font></TD>
- <TD vAlign=center align=right>
- <TABLE>
-
- <TR>
- <TD
- style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid"
- align=middle bgColor=#ffffe1><FONT
- size=-2> Go </FONT></TD></TR></TABLE></TD></TR></TABLE></TD>
- <TD><IMG height=16 alt=""
- src="../old.icons/full/clcl16/go_nav.gif" width=16 border=0> <IMG height=16 alt=""
- src="../old.icons/full/elcl16/go_nav.gif" width=16 border=0> <IMG height=16 alt=""
- src="../old.icons/full/dlcl16/go_nav.gif" width=16 border=0></TD>
- <TD bgColor=#cccccc><IMG height=16 alt=""
- src="icons/full/clcl16/go_nav.gif" width=16 border=0> <IMG height=16
- alt="" src="icons/full/elcl16/go_nav.gif" width=16 border=0> <IMG
- height=16 alt="" src="icons/full/dlcl16/go_nav.gif" width=16
- border=0> </TD>
- <TD><FONT size=-1> </FONT></TD></TR>
-
- <TR bgColor=#dfdf9f>
- <TD>4</TD>
- <TD>Go Home</TD>
- <TD><FONT size=-1> home_nav</FONT></TD>
- <TD >
- <TABLE cellSpacing=2 cellPadding=0 border=0>
-
- <TR>
- <TD vAlign=top><font size="-1">A standard browser button
- for going to the home location</font></TD>
- <TD>
- <TABLE>
-
- <TR>
- <TD
- style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid"
- align=middle bgColor=#ffffe1><FONT
- size=-2> Go Home </FONT></TD></TR></TABLE></TD></TR></TABLE></TD>
- <TD><IMG height=16 alt=""
- src="../old.icons/full/clcl16/home_nav.gif" width=16 border=0> <IMG height=16 alt=""
- src="../old.icons/full/elcl16/home_nav.gif" width=16 border=0> <IMG height=16 alt=""
- src="../old.icons/full/dlcl16/home_nav.gif" width=16 border=0></TD>
- <TD bgColor=#cccccc><IMG height=16 alt=""
- src="icons/full/clcl16/home_nav.gif" width=16 border=0> <IMG
- height=16 alt="" src="icons/full/elcl16/home_nav.gif" width=16
- border=0> <IMG height=16 alt="" src="icons/full/dlcl16/home_nav.gif"
- width=16 border=0> </TD>
- <TD><FONT size=-1> </FONT></TD></TR>
- <TR bgColor=#ffffff>
- <TD>5</TD>
- <TD>Refresh</TD>
- <TD><FONT size=-1> refresh_nav</FONT></TD>
- <TD>
- <TABLE cellSpacing=2 cellPadding=0 width="100%" border=0>
-
- <TR>
- <TD vAlign=top><font size="-1">Refresh the contents of the view</font></TD>
- <TD vAlign=center align=right>
- <TABLE>
-
- <TR>
- <TD
- style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid"
- align=middle bgColor=#ffffe1><FONT
- size=-2> Refresh </FONT></TD></TR></TABLE></TD></TR></TABLE></TD>
- <TD><IMG height=16 alt=""
- src="../old.icons/full/clcl16/refresh_nav.gif" width=16 border=0> <IMG height=16 alt=""
- src="../old.icons/full/elcl16/refresh_nav.gif" width=16 border=0> <IMG height=16 alt=""
- src="../old.icons/full/dlcl16/refresh_nav.gif" width=16 border=0></TD>
- <TD bgColor=#cccccc><IMG height=16 alt=""
- src="icons/full/clcl16/refresh_nav.gif" width=16 border=0> <IMG
- height=16 alt="" src="icons/full/elcl16/refresh_nav.gif" width=16
- border=0> <IMG height=16 alt=""
- src="icons/full/dlcl16/refresh_nav.gif" width=16 border=0> </TD>
- <TD><FONT size=-1> </FONT></TD></TR>
- <TR bgColor=#dfdf9f>
- <TD>6</TD>
- <TD>Stop</TD>
- <TD><font size="-1">stop_nav</font></TD>
- <TD>
- <TABLE cellSpacing=2 cellPadding=0 width="100%" border=0>
-
- <TR>
- <TD vAlign=top><font size="-1">A standard browser button for stopping
- the navigation in progress</font></TD>
- <TD vAlign=center align=right>
- <TABLE>
-
- <TR>
- <TD
- style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid"
- align=middle bgColor=#ffffe1><FONT
- size=-2> Stop </FONT></TD></TR></TABLE></TD></TR></TABLE></TD>
- <TD><IMG height=16 alt=""
- src="../old.icons/full/clcl16/stop_nav.gif" width=16 border=0> <IMG height=16 alt=""
- src="../old.icons/full/elcl16/stop_nav.gif" width=16 border=0> <IMG height=16 alt=""
- src="../old.icons/full/dlcl16/stop_nav.gif" width=16 border=0></TD>
- <TD bgColor=#cccccc><IMG height=16 alt=""
- src="icons/full/clcl16/stop_nav.gif" width=16 border=0> <IMG
- height=16 alt="" src="icons/full/elcl16/stop_nav.gif" width=16
- border=0> <IMG height=16 alt="" src="icons/full/dlcl16/stop_nav.gif"
- width=16 border=0> </TD>
- <TD><FONT size=-1> </FONT></TD></TR>
- <TR>
- <TD>7</TD>
- <TD>Show Unconfigured Features</TD>
- <TD>show_unconf</TD>
- <TD>
- <TABLE cellSpacing=2 cellPadding=0 width="100%" border=0>
-
- <TR>
- <TD vAlign=top><font size="-1">A toggle button that allows
- unconfigured features to show in the view</font></TD>
- <TD vAlign=center align=right>
- <TABLE>
-
- <TR>
- <TD
- style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid"
- align=middle bgColor=#ffffe1><FONT
- size=-2> Show Unconfigured Features </FONT></TD></TR></TABLE></TD></TR></TABLE></TD>
- <TD><IMG height=16 alt=""
- src="../old.icons/full/clcl16/show_unconf.gif" width=16 border=0> </TD>
- <TD BGCOLOR=#cccccc><IMG height=16 alt=""
- src="icons/full/clcl16/show_unconf.gif" width=16 border=0> <IMG
- height=16 alt="" src="icons/full/elcl16/show_unconf.gif" width=16
- border=0> <IMG height=16 alt=""
- src="icons/full/dlcl16/show_unconf.gif" width=16 border=0></TD>
- <TD></TD></TR>
-
- <TR bgColor=#bfbf7f>
- <TD colSpan=7><B><FONT size=+2>Model Object</FONT></B></TD></TR>
- <TR bgColor=#ffffff>
- <TD>1</TD>
- <TD> Application Configuration</TD>
- <TD><FONT size=-1> app_obj</FONT></TD>
- <TD><font size="-1">the current configuration used to load the current
- application</font></TD>
- <TD><IMG height=16 alt=""
- src="../old.icons/full/obj16/app_obj.gif" width=16
- align=left border=0></TD>
- <TD><IMG height=16 alt="" src="icons/full/obj16/app_obj.gif" width=16 border=0></TD>
- <TD><FONT size=-1> </FONT></TD></TR>
-
- <TR bgColor=#dfdfb>
- <TD>2</TD>
- <TD>My Computer</TD>
- <TD><FONT size=-1> computer_obj</FONT></TD>
- <TD><font size="-1">the file system root</font></TD>
- <TD><IMG height=16 alt=""
- src="../old.icons/full/obj16/computer_obj.gif" width=16
- align=left border=0></TD>
- <TD bgColor=#ffffff>
- <IMG height=16 alt=""
- src="icons/full/obj16/computer_obj.gif" width=16 border=0>
- <P></P></TD>
- <TD><FONT size=-1> </FONT></TD></TR>
- <TR bgColor=#ffffff>
- <TD>3</TD>
- <TD> Feature</TD>
- <TD><FONT size=-1> feature_obj</FONT></TD>
- <TD><font size="-1">feature object</font></TD>
- <TD><IMG height=16 alt=""
- src="../old.icons/full/obj16/feature_obj.gif" width=16
-align=left border=0></TD>
- <TD bgColor=#ffffff>
- <IMG height=16 alt=""
- src="icons/full/obj16/feature_obj.gif" width=16 border=0>
- <P></P></TD>
- <TD><FONT size=-1> </FONT></TD></TR>
- <TR bgColor=#dfdfb>
- <TD>4</TD>
- <TD>Unconfigured Feature</TD>
- <TD><FONT size=-1> unconf_feature_obj</FONT></TD>
- <TD><font size="-1">feature that is currently unconfigured (i.e. still
- present but disabled in the current configuration)</font></TD>
- <TD><IMG height=16 alt=""
- src="../old.icons/full/obj16/unconf_feature_obj.gif" width=16
- align=left border=0></TD>
- <TD bgColor=#ffffff>
- <IMG height=16 alt=""
- src="icons/full/obj16/unconf_feature_obj.gif" width=16 border=0>
- <P></P></TD>
- <TD><FONT size=-1> </FONT></TD></TR>
- <TR bgColor=#ffffff>
- <TD>5</TD>
- <TD>Places to Visit</TD>
- <TD>places_obj</TD>
- <TD>a folder that contains bookmarks to remote sites that
- contain cool features</TD>
- <TD><IMG height=16 alt=""
- src="../old.icons/full/obj16/places_obj.gif" width=16
-align=left border=0></TD>
- <TD bgColor=#ffffff><IMG height=16 alt=""
- src="icons/full/obj16/places_obj.gif" width=16 border=0>
- </TD>
- <TD></TD></TR>
- <TR bgColor=#dfdfb>
- <TD>6</TD>
- <TD>Site</TD>
- <TD><font size="-1">site_obj </font></TD>
- <TD><font size="-1">update site object that represent a provider
- site (site that is set up to act as a source of features)</font></TD>
- <TD><IMG height=16 alt=""
- src="../old.icons/full/obj16/site_obj.gif" width=16
-align=left border=0></TD>
- <TD bgColor=#ffffff>
- <IMG height=16 alt=""
- src="icons/full/obj16/site_obj.gif" width=16 border=0>
- <P></P></TD>
- <TD><FONT size=-1> </FONT></TD></TR>
- <TR>
- <TD>7</TD>
- <TD><font size="-1">Local Site</font></TD>
- <TD><font size="-1">lsite_obj</font></TD>
- <TD>update site object that represents a receiver site (site
- that is set up to act as a target of the feature installation)</TD>
- <TD><IMG height=16
- alt=""
-src="../old.icons/full/obj16/lsite_obj.gif" width=16 align=left border=0></TD>
- <TD bgColor=#ffffff><IMG height=16 alt=""
- src="icons/full/obj16/lsite_obj.gif" width=16 border=0>
- </TD>
- <TD></TD></TR>
- <TR bgColor=#dfdfb>
- <TD>8</TD>
- <TD><font size="-1">Feature Category</font></TD>
- <TD><font size="-1">category_obj</font></TD>
- <TD>sites can classify features they host into hierarchical
- categories</TD>
- <TD>
- <P align=left><IMG height=16 src="../old.icons/full/obj16/category_obj.gif" width=16 border=0></P></TD>
- <TD bgColor=#ffffff><IMG height=16 alt=""
- src="icons/full/obj16/category_obj.gif" width=16 border=0>
- </TD>
- <TD></TD></TR>
- <TR>
- <TD>9</TD>
- <TD><font size="-1">Bookmark Folder</font></TD>
- <TD><font size="-1">bfolder_obj</font></TD>
- <TD>folder object in the view that provides for
- organizing site bookmarks and search objects</TD>
- <TD>
- <P align=left><IMG height=16 src="../old.icons/full/obj16/bfolder_obj.gif" width=16 border=0></P></TD>
- <TD bgColor=#ffffff ><IMG height=16 alt=""
- src="icons/full/obj16/bfolder_obj.gif" width=16 border=0>
- </TD>
- <TD></TD></TR>
- <TR bgColor=#dfdfb>
- <TD>10</TD>
- <TD>Text Search</TD>
- <TD><font size="-1">tsearch_obj</font></TD>
- <TD><font size="-1">Text search object </font></TD>
- <TD><IMG height=16 alt=""
- src="../old.icons/full/obj16/tsearch_obj.gif" width=16 align=left border=0></TD>
- <TD bgColor=#ffffff>
- <IMG height=16 alt=""
- src="icons/full/obj16/tsearch_obj.gif" width=16 border=0>
- <P></P></TD>
- <TD><FONT size=-1> </FONT></TD></TR>
- <TR>
- <TD>11</TD>
- <TD>Update Search</TD>
- <TD>usearch_obj</TD>
- <TD>Available Updates search object</TD>
- <TD><IMG height=16 alt=""
- src="../old.icons/full/obj16/usearch_obj.gif" width=16 align=left border=0></TD>
- <TD bgColor=#ffffff>
- <IMG height=16 alt=""
- src="icons/full/obj16/usearch_obj.gif" width=16 border=0>
- <P></P>
- </TD>
- <TD></TD></TR>
- <TR bgColor=#dfdfb>
- <TD>12</TD>
- <TD>Plug-in Search</TD>
- <TD>psearch_obj</TD>
- <TD>Plug-in search object</TD>
- <TD><IMG height=16 alt=""
- src="../old.icons/full/obj16/psearch_obj.gif" width=16 align=left border=0></TD>
- <TD bgColor=#ffffff>
- <IMG height=16 alt=""
- src="icons/full/obj16/psearch_obj.gif" width=16 border=0>
- <P></P>
- </TD>
- <TD></TD></TR>
- <TR>
- <TD>13</TD>
- <TD>Fixed Volume</TD>
- <TD>vfixed_obj</TD>
- <TD>Local file system volume that represents a fixed drive (Windows) or
- folder (Linux)</TD>
- <TD><IMG height=16
- alt="" src="../old.icons/full/obj16/vfixed_obj.gif" width=16 align=left border=0>
- </TD>
- <TD bgColor=#ffffff><IMG height=16 alt=""
- src="icons/full/obj16/vfixed_obj.gif" width=16 border=0>
-
- </TD>
- <TD></TD></TR>
- <TR bgColor=#dfdfb>
- <TD>14</TD>
- <TD>Remote Volume</TD>
- <TD>vremote_obj</TD>
- <TD>Remote file system volume that represents a shared drive (Window) or
- mounted volume (Linux)</TD>
- <TD height =16
- alt="" <IMG src="../old.icons/full/obj16/vremote_obj.gif" width=16 align=left border="1"
- >
- </TD>
- <TD bgColor=#ffffff><IMG height=16 alt=""
- src="icons/full/obj16/vremote_obj.gif" width=16 border=0>
-
- </TD>
- <TD></TD></TR>
- <TR>
- <TD>15</TD>
- <TD>Removable Volume</TD>
- <TD>vremovable_obj</TD>
- <TD>Removable file system volume that is neither CD-ROM nor Floppy Disk.
- This image is used for all other removable volumes like DVD-ROM, various
- PCMCIA cards etc.</TD>
- <TD><IMG height=16
- alt="" src="../old.icons/full/obj16/vremovable_obj.gif" width=16 align=left border=0>
- </TD>
- <TD bgColor=#ffffff><IMG height=16 alt=""
- src="icons/full/obj16/vremovable_obj.gif" width=16 border=0>
-
- </TD>
- <TD></TD></TR>
- <TR bgColor=#dfdfb>
- <TD>16</TD>
- <TD>CD-ROM</TD>
- <TD>cd_obj</TD>
- <TD>File system volume that represent a CD-ROM drive</TD>
- <TD><IMG height=16 alt=""
- src="../old.icons/full/obj16/cd_obj.gif" width=16 align=left border=0></TD>
- <TD bgColor=#ffffff>
- <IMG height=16 alt=""
- src="icons/full/obj16/cd_obj.gif" width=16 border=0>
- <P></P>
- </TD>
- <TD></TD></TR>
- <TR>
- <TD>17</TD>
- <TD>Floppy Disk</TD>
- <TD><font size="-1">floppy_obj</font></TD>
- <TD><font size="-1">File system volume that represents a 3 1/2 inch floppy
- disk drive</font></TD>
- <TD><IMG height=16 alt=""
- src="../old.icons/full/obj16/floppy_obj.gif" width=16 align=left border=0></TD>
- <TD bgColor=#ffffff>
- <IMG height=16 alt=""
- src="icons/full/obj16/floppy_obj.gif" width=16 border=0>
- <P></P></TD>
- <TD><FONT size=-1> </FONT></TD></TR>
- <TR bgColor=#dfdfb>
- <TD>18</TD>
- <TD>Saved Configurations</TD>
- <TD>saved_obj</TD>
- <TD><font size="2">Folder that holds past configurations that have been preserved and/or
- renamed</font></TD>
- <TD><IMG height=16
- alt="" src="../old.icons/full/obj16/saved_obj.gif" width=16 align=left border=0></TD>
- <TD bgColor=#ffffff ><IMG height=16 alt=""
- src="icons/full/obj16/saved_obj.gif" width=16 border=0></TD>
- <TD></TD></TR>
- <TR>
- <TD>19</TD>
- <TD>Configuration History</TD>
- <TD>history_obj</TD>
- <TD>Folder that holds past configurations</TD>
- <TD><IMG height=16
- alt="" src="../old.icons/full/obj16/history_obj.gif" width=16 align=left border=0></TD>
- <TD bgColor=#ffffff ><IMG height=16 alt=""
- src="icons/full/obj16/history_obj.gif" width=16 border=0></TD>
- <TD></TD></TR>
- <TR bgColor=#dfdfb>
- <TD>20</TD>
- <TD>Available Updates</TD>
- <TD>updates_obj</TD>
- <TD>Update Search object that is pre-configured to look for
- available updates of all the installed features. It cannot be removed from
- the view.</TD>
- <TD><IMG height=16
- alt="" src="../old.icons/full/obj16/updates_obj.gif" width=16 align=left border=0></TD>
- <TD bgColor=#ffffff ><IMG height=16 alt=""
- src="icons/full/obj16/updates_obj.gif" width=16 border=0></TD>
- <TD></TD></TR>
- <TR>
- <TD>21</TD>
- <TD>Configuration</TD>
- <TD>config_obj</TD>
- <TD>A configuration history entry that represents one
- configuration</TD>
- <TD><IMG height=16
- alt="" src="../old.icons/full/obj16/config_obj.gif" width=16 align=left border=0></TD>
- <TD bgColor=#ffffff ><IMG height=16 alt=""
- src="icons/full/obj16/config_obj.gif" width=16 border=0></TD>
- <TD></TD></TR>
-
-
-
- <TR bgColor=#cccccc>
- <TD colSpan=7><B><FONT size=+2>Object Overlay </FONT></B></TD></TR>
- <TR bgColor=#ffffff>
- <TD>1</TD>
- <TD> current</TD>
- <TD><font size="-1">current_co </font></TD>
- <TD><FONT size=-1> indicates that the configuration is current i.e. in
- effect</FONT></TD>
- <TD><IMG height=8 alt=""
- src="../old.icons/full/ovr16/current_co.gif" width=7 border=0></TD>
- <TD bgColor=#ffffff>
- <IMG height=8 alt=""
- src="icons/full/ovr16/current_co.gif" width=7 border=0>
- <P></P></TD>
- <TD> </TD></TR>
- <TR bgColor=#dfdfb>
- <TD>2</TD>
- <TD> error</TD>
- <TD><FONT size=-1>error_co </FONT></TD>
- <TD><FONT size=-1>will be overlayed over PDE editor objects that are
- somehow associated with XML syntax or validation errors </FONT></TD>
- <TD><IMG height=8 alt=""
- src="../old.icons/full/ovr16/error_co.gif" width=7 border=0></TD>
- <TD bgColor=#ffffff>
- <IMG height=8 alt=""
- src="icons/full/ovr16/error_co.gif" width=7 border=0>
- <P></P></TD>
- <TD> </TD></TR>
- <TR bgColor=#ffffff>
- <TD>3</TD>
- <TD> installable</TD>
- <TD><font size="-1">installable_co </font></TD>
- <TD><font size="-1">indicates that site can accept features during
- installation</font></TD>
- <TD><IMG height=8 alt=""
- src="../old.icons/full/ovr16/installable_co.gif" width=7 border=0></TD>
- <TD bgColor=#ffffff>
- <IMG height=8 alt=""
- src="icons/full/ovr16/installable_co.gif" width=7 border=0>
- <P></P></TD>
- <TD> </TD></TR>
- <TR bgColor=#dfdfb>
- <TD>4</TD>
- <TD> linked</TD>
- <TD><font size="-1">linked_co </font></TD>
- <TD><font size="-1">indicates that the site is only linked to the
- configuration</font></TD>
- <TD><IMG height=10 alt=""
- src="../old.icons/full/ovr16/linked_co.gif" width=11 border=0></TD>
- <TD bgColor=#ffffff>
- <IMG height=8 alt=""
- src="icons/full/ovr16/linked_co.gif" width=7 border=0>
- <P></P></TD>
- <TD> </TD></TR>
- <TR bgColor=#ffffff>
- <TD>5</TD>
- <TD>unconfigured</TD>
- <TD><font size="-1">unconfigured_co </font></TD>
- <TD><font size="-1">
- </font></TD>
- <TD></TD>
- <TD bgColor=#ffffff>
- <P></P><IMG height=8 alt="" src="icons/full/ovr16/unconfigured_co.gif"
- width=7 border=0></TD>
- <TD> </TD></TR>
-
-
-
- <tr bgColor=#cccccc>
- <TD colSpan=7><b><font size="+2">Forms Artwork</font></b></TD>
- </tr>
- <tr>
- <TD>1</TD>
- <TD> Topic</TD>
- <TD><font size="-1">topic </font></TD>
- <TD><FONT size=-1> an image to be used as a custom bullet for items in
- a 'Welcome' page</FONT></TD>
- <TD><IMG height=16 alt=""
- src="../old.icons/full/forms/topic.gif" width=16 border=0></TD>
- <TD bgColor=#ffffff><IMG height=16 alt=""
- src="icons/full/forms/topic.gif" width=16 border=0></TD>
- <TD> </TD>
- </tr>
- <tr bgColor=#dfdfb>
- <TD>2</TD>
- <TD>Default Provider</TD>
- <TD><font size="-1">def_provider </font></TD>
- <TD><font size="-1">an image to be used in a feature description page in
- cases where one was not supplied by feature provider (should be JPEG)<IMG
- height=48 alt="" src="../old.icons/full/forms/def_provider.gif" width=109
- border=0>
- </font></TD>
- <TD></TD>
- <TD bgColor=#ffffff><IMG height=150 alt=""
- src="icons/full/forms/def_provider.gif" width=190 border=0> </TD>
- <TD> </TD>
- </tr>
- <tr>
- <TD>3</TD>
- <TD> Form Banner</TD>
- <TD><font size="-1">form_banner </font></TD>
- <TD><font size="-1">a banner image used in all form pages behind the heading
- (shown here in 1:10 zoom out)</font></TD>
- <TD><IMG height=3 alt=""
- src="../old.icons/full/forms/form_banner.gif" width=60 border=0></TD>
- <TD bgColor=#ffffff>
- <P></P></TD>
- <TD> </TD>
- </tr>
- <tr bgColor=#dfdfb>
- <TD>4</TD>
- <TD> Form Banner Underline</TD>
- <TD><font size="-1">form_underline </font></TD>
- <TD><font size="-1">a second portion of the banner used under the heading
- text (shown here in 1:10 zoom out)</font></TD>
- <TD><IMG height=1 alt=""
- src="../old.icons/full/forms/form_underline.gif" width=60 border=0></TD>
- <TD bgColor=#ffffff>
- <P></P></TD>
- <TD> </TD>
- </tr>
-
-
-
-
- <TR bgColor=#cccccc>
- <TD colSpan=7><B><FONT size=+2>Wizard Graphic</FONT></B></TD></TR>
- <TR bgColor=#ffffff>
- <TD>1</TD>
- <TD>New Bookmark wizard</TD>
- <TD><FONT size=-1> new_bookmark_wiz</FONT></TD>
- <TD><font size="-1">creates a new update site bookmark</font></TD>
- <TD><IMG height=58 alt=""
- src="../old.icons/full/wizban/new_bookmark_wiz.gif"
- width=75 border=0></TD>
- <TD bgColor=#ffffff><IMG height=58 alt=""
- src="icons/full/wizban/new_bookmark_wiz.gif" width=75 border=0> </TD>
- <TD> </TD></TR>
- <TR bgColor=#dfdfb>
- <TD>2</TD>
- <TD>New Folder wizard</TD>
- <TD><FONT size=-1> new_folder_wiz</FONT></TD>
- <TD><font size="-1">creates a new bookmark folder</font></TD>
- <TD><IMG height=58 alt=""
- src="../old.icons/full/wizban/new_folder_wiz.gif"
- width=75 border=0></TD>
- <TD bgColor=#ffffff><IMG height=58 alt=""
- src="icons/full/wizban/new_folder_wiz.gif" width=75 border=0> </TD>
- <TD> </TD></TR>
- <TR bgColor=#ffffff>
- <TD>3</TD>
- <TD>New Search wizard</TD>
- <TD><FONT size=-1> new_search_wiz</FONT></TD>
- <TD><FONT size=-1>creates a new search object</FONT></TD>
- <TD><IMG height=58 alt=""
- src="../old.icons/full/wizban/new_search_wiz.gif"
- width=75 border=0></TD>
- <TD bgColor=#ffffff><IMG height=58 alt=""
- src="icons/full/wizban/new_search_wiz.gif" width=75 border=0> </TD>
- <TD> </TD></TR>
- <TR bgColor=#dfdfb>
- <TD>4</TD>
- <TD>Install Feature wizard</TD>
- <TD><FONT size=-1> install_wiz</FONT></TD>
- <TD><font size="-1">installs a new feature into the platform</font></TD>
- <TD><IMG height=58 alt=""
- src="../old.icons/full/wizban/install_wiz.gif"
- width=75 border=0></TD>
- <TD bgColor=#ffffff><IMG height=58 alt=""
- src="icons/full/wizban/install_wiz.gif" width=75 border=0> </TD>
- <TD> </TD></TR>
- <TR bgColor=#ffffff>
- <TD >5</TD>
- <TD>Update Feature wizard</TD>
- <TD><FONT size=-1> update_wiz</FONT></TD>
- <TD><font size="-1">installs a newer version of an already installed feature</font></TD>
- <TD><IMG height=58 alt=""
- src="../old.icons/full/wizban/update_wiz.gif"
- width=75 border=0></TD>
- <TD bgColor=#ffffff><IMG height=58 alt=""
- src="icons/full/wizban/update_wiz.gif" width=75 border=0> </TD>
- <TD> </TD></TR>
- <TR bgColor=#dfdfb>
- <TD >6</TD>
- <TD>Configure Feature wizard</TD>
- <TD><FONT size=-1> config_wiz</FONT></TD>
- <TD><font size="-1">configures or unconfigures an installed feature</font></TD>
- <TD><IMG height=58 alt=""
- src="../old.icons/full/wizban/config_wiz.gif"
- width=75 border=0></TD>
- <TD bgColor=#ffffff><IMG height=58 alt=""
- src="icons/full/wizban/config_wiz.gif" width=75 border=0> </TD>
- <TD> </TD></TR>
- <TR>
- <TD>7</TD>
- <TD>Uninstall Feature wizard</TD>
- <TD><FONT size=-1> uninstall_wiz</FONT></TD>
- <TD><font size="-1">permanently removes a feature from the platform</font></TD>
- <TD><IMG height=58 alt=""
- src="../old.icons/full/wizban/uninstall_wiz.gif"
- width=75 border=0></TD>
- <TD bgColor=#ffffff><IMG height=58 alt=""
- src="icons/full/wizban/uninstall_wiz.gif" width=75 border=0> </TD>
- <TD> </TD></TR>
- <TR bgColor=#dfdfb>
- <TD>8</TD>
- <TD>Default Install Wizard banner</TD>
- <TD><FONT size=-1> def_wizban</FONT></TD>
- <TD><font size="-1">a default image shown in install wizard pages when
- one is not supplied by feature providers<IMG height=258 alt=""
- src="../old.icons/full/wizban/def_wizban.jpg" width=118
-border=0>
- </font></TD>
- <TD></TD>
- <TD bgColor=#ffffff><IMG height=258 alt=""
- src="icons/full/wizban/def_wizban.jpg" width=118 border=0> </TD>
- <TD> </TD></TR></TABLE>
-<P></P></BODY></HTML>
diff --git a/update/org.eclipse.update.ui/about.html b/update/org.eclipse.update.ui/about.html
deleted file mode 100644
index 9db411a..0000000
--- a/update/org.eclipse.update.ui/about.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>20th June, 2002</p>
-<h3>License</h3>
-<p>Eclipse.org makes available all content in this plug-in ("Content"). Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
-Common Public License Version 1.0 ("CPL"). A copy of the CPL is available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>.
-For purposes of the CPL, "Program" will mean the Content.</p>
-
-<h3>Contributions</h3>
-
-<p>If this Content is licensed to you under the terms and conditions of the CPL, any Contributions, as defined in the CPL, uploaded, submitted, or otherwise
-made available to Eclipse.org, members of Eclipse.org and/or the host of Eclipse.org web site, by you that relate to such
-Content are provided under the terms and conditions of the CPL and can be made available to others under the terms of the CPL.</p>
-
-<p>If this Content is licensed to you under license terms and conditions other than the CPL ("Other License"), any modifications, enhancements and/or
-other code and/or documentation ("Modifications") uploaded, submitted, or otherwise made available to Eclipse.org, members of Eclipse.org and/or the
-host of Eclipse.org, by you that relate to such Content are provided under terms and conditions of the Other License and can be made available
-to others under the terms of the Other License. In addition, with regard to Modifications for which you are the copyright holder, you are also
-providing the Modifications under the terms and conditions of the CPL and such Modifications can be made available to others under the terms of
-the CPL.</p>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/update/org.eclipse.update.ui/build.properties b/update/org.eclipse.update.ui/build.properties
deleted file mode 100644
index 790bd1a..0000000
--- a/update/org.eclipse.update.ui/build.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = plugin.properties,\
- icons/,\
- *.jar,\
- plugin.xml,\
- about.html,\
- webapp/
-jars.compile.order = updateui.jar,\
- webapp/WEB-INF/lib/update-servlets.jar
-src.includes = about.html,\
- schema/
-source.updateui.jar = src/
-source.webapp/WEB-INF/lib/update-servlets.jar = src_webapp
-jars.extra.classpath = ../org.eclipse.tomcat/servlet.jar
diff --git a/update/org.eclipse.update.ui/icons/full/clcl16/backward_nav.gif b/update/org.eclipse.update.ui/icons/full/clcl16/backward_nav.gif
deleted file mode 100644
index 740419b..0000000
--- a/update/org.eclipse.update.ui/icons/full/clcl16/backward_nav.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/clcl16/forward_nav.gif b/update/org.eclipse.update.ui/icons/full/clcl16/forward_nav.gif
deleted file mode 100644
index 7a1511d..0000000
--- a/update/org.eclipse.update.ui/icons/full/clcl16/forward_nav.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/clcl16/go_nav.gif b/update/org.eclipse.update.ui/icons/full/clcl16/go_nav.gif
deleted file mode 100644
index bb20d88..0000000
--- a/update/org.eclipse.update.ui/icons/full/clcl16/go_nav.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/clcl16/home_nav.gif b/update/org.eclipse.update.ui/icons/full/clcl16/home_nav.gif
deleted file mode 100644
index 949c2db..0000000
--- a/update/org.eclipse.update.ui/icons/full/clcl16/home_nav.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/clcl16/refresh_nav.gif b/update/org.eclipse.update.ui/icons/full/clcl16/refresh_nav.gif
deleted file mode 100644
index a063c23..0000000
--- a/update/org.eclipse.update.ui/icons/full/clcl16/refresh_nav.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/clcl16/show_unconf.gif b/update/org.eclipse.update.ui/icons/full/clcl16/show_unconf.gif
deleted file mode 100644
index 4c75f55..0000000
--- a/update/org.eclipse.update.ui/icons/full/clcl16/show_unconf.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/clcl16/stop_nav.gif b/update/org.eclipse.update.ui/icons/full/clcl16/stop_nav.gif
deleted file mode 100644
index 4eb53ec..0000000
--- a/update/org.eclipse.update.ui/icons/full/clcl16/stop_nav.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/ctool16/config_wiz.gif b/update/org.eclipse.update.ui/icons/full/ctool16/config_wiz.gif
deleted file mode 100644
index 1042460..0000000
--- a/update/org.eclipse.update.ui/icons/full/ctool16/config_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/ctool16/install_wiz.gif b/update/org.eclipse.update.ui/icons/full/ctool16/install_wiz.gif
deleted file mode 100644
index 675effa..0000000
--- a/update/org.eclipse.update.ui/icons/full/ctool16/install_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/ctool16/new_bookmark_wiz.gif b/update/org.eclipse.update.ui/icons/full/ctool16/new_bookmark_wiz.gif
deleted file mode 100644
index a707b8e..0000000
--- a/update/org.eclipse.update.ui/icons/full/ctool16/new_bookmark_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/ctool16/new_folder_wiz.gif b/update/org.eclipse.update.ui/icons/full/ctool16/new_folder_wiz.gif
deleted file mode 100644
index 69611f9..0000000
--- a/update/org.eclipse.update.ui/icons/full/ctool16/new_folder_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/ctool16/new_search_wiz.gif b/update/org.eclipse.update.ui/icons/full/ctool16/new_search_wiz.gif
deleted file mode 100644
index 8a3389e..0000000
--- a/update/org.eclipse.update.ui/icons/full/ctool16/new_search_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/ctool16/uninstall_wiz.gif b/update/org.eclipse.update.ui/icons/full/ctool16/uninstall_wiz.gif
deleted file mode 100644
index 0306fcb..0000000
--- a/update/org.eclipse.update.ui/icons/full/ctool16/uninstall_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/ctool16/update_wiz.gif b/update/org.eclipse.update.ui/icons/full/ctool16/update_wiz.gif
deleted file mode 100644
index 966a48a..0000000
--- a/update/org.eclipse.update.ui/icons/full/ctool16/update_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/cview16/browser.gif b/update/org.eclipse.update.ui/icons/full/cview16/browser.gif
deleted file mode 100644
index 2180454..0000000
--- a/update/org.eclipse.update.ui/icons/full/cview16/browser.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/cview16/configs.gif b/update/org.eclipse.update.ui/icons/full/cview16/configs.gif
deleted file mode 100644
index 4fc0ad8..0000000
--- a/update/org.eclipse.update.ui/icons/full/cview16/configs.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/cview16/featuresrc_result.gif b/update/org.eclipse.update.ui/icons/full/cview16/featuresrc_result.gif
deleted file mode 100644
index 16973cd..0000000
--- a/update/org.eclipse.update.ui/icons/full/cview16/featuresrc_result.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/cview16/preview.gif b/update/org.eclipse.update.ui/icons/full/cview16/preview.gif
deleted file mode 100644
index 11a9913..0000000
--- a/update/org.eclipse.update.ui/icons/full/cview16/preview.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/cview16/selected_updates.gif b/update/org.eclipse.update.ui/icons/full/cview16/selected_updates.gif
deleted file mode 100644
index 47a2da4..0000000
--- a/update/org.eclipse.update.ui/icons/full/cview16/selected_updates.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/cview16/update_pers.gif b/update/org.eclipse.update.ui/icons/full/cview16/update_pers.gif
deleted file mode 100644
index 9eb88fa..0000000
--- a/update/org.eclipse.update.ui/icons/full/cview16/update_pers.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/cview16/updates.gif b/update/org.eclipse.update.ui/icons/full/cview16/updates.gif
deleted file mode 100644
index 0615b8b..0000000
--- a/update/org.eclipse.update.ui/icons/full/cview16/updates.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/dlcl16/backward_nav.gif b/update/org.eclipse.update.ui/icons/full/dlcl16/backward_nav.gif
deleted file mode 100644
index e2179ad..0000000
--- a/update/org.eclipse.update.ui/icons/full/dlcl16/backward_nav.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/dlcl16/forward_nav.gif b/update/org.eclipse.update.ui/icons/full/dlcl16/forward_nav.gif
deleted file mode 100644
index 0c5af08..0000000
--- a/update/org.eclipse.update.ui/icons/full/dlcl16/forward_nav.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/dlcl16/go_nav.gif b/update/org.eclipse.update.ui/icons/full/dlcl16/go_nav.gif
deleted file mode 100644
index 472f005..0000000
--- a/update/org.eclipse.update.ui/icons/full/dlcl16/go_nav.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/dlcl16/home_nav.gif b/update/org.eclipse.update.ui/icons/full/dlcl16/home_nav.gif
deleted file mode 100644
index 3c80080..0000000
--- a/update/org.eclipse.update.ui/icons/full/dlcl16/home_nav.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/dlcl16/refresh_nav.gif b/update/org.eclipse.update.ui/icons/full/dlcl16/refresh_nav.gif
deleted file mode 100644
index b2281b4..0000000
--- a/update/org.eclipse.update.ui/icons/full/dlcl16/refresh_nav.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/dlcl16/show_unconf.gif b/update/org.eclipse.update.ui/icons/full/dlcl16/show_unconf.gif
deleted file mode 100644
index 493f498..0000000
--- a/update/org.eclipse.update.ui/icons/full/dlcl16/show_unconf.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/dlcl16/stop_nav.gif b/update/org.eclipse.update.ui/icons/full/dlcl16/stop_nav.gif
deleted file mode 100644
index 7f0f9b9..0000000
--- a/update/org.eclipse.update.ui/icons/full/dlcl16/stop_nav.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/dtool16/config_wiz.gif b/update/org.eclipse.update.ui/icons/full/dtool16/config_wiz.gif
deleted file mode 100644
index 9c6868c..0000000
--- a/update/org.eclipse.update.ui/icons/full/dtool16/config_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/dtool16/install_wiz.gif b/update/org.eclipse.update.ui/icons/full/dtool16/install_wiz.gif
deleted file mode 100644
index e6ebfa8..0000000
--- a/update/org.eclipse.update.ui/icons/full/dtool16/install_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/dtool16/new_bookmark_wiz.gif b/update/org.eclipse.update.ui/icons/full/dtool16/new_bookmark_wiz.gif
deleted file mode 100644
index aae317b..0000000
--- a/update/org.eclipse.update.ui/icons/full/dtool16/new_bookmark_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/dtool16/new_folder_wiz.gif b/update/org.eclipse.update.ui/icons/full/dtool16/new_folder_wiz.gif
deleted file mode 100644
index 21832b9..0000000
--- a/update/org.eclipse.update.ui/icons/full/dtool16/new_folder_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/dtool16/new_search_wiz.gif b/update/org.eclipse.update.ui/icons/full/dtool16/new_search_wiz.gif
deleted file mode 100644
index 913d568..0000000
--- a/update/org.eclipse.update.ui/icons/full/dtool16/new_search_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/dtool16/uninstall_wiz.gif b/update/org.eclipse.update.ui/icons/full/dtool16/uninstall_wiz.gif
deleted file mode 100644
index 04a5302..0000000
--- a/update/org.eclipse.update.ui/icons/full/dtool16/uninstall_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/dtool16/update_wiz.gif b/update/org.eclipse.update.ui/icons/full/dtool16/update_wiz.gif
deleted file mode 100644
index e613e42..0000000
--- a/update/org.eclipse.update.ui/icons/full/dtool16/update_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/elcl16/backward_nav.gif b/update/org.eclipse.update.ui/icons/full/elcl16/backward_nav.gif
deleted file mode 100644
index 85188b7..0000000
--- a/update/org.eclipse.update.ui/icons/full/elcl16/backward_nav.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/elcl16/collapseall.gif b/update/org.eclipse.update.ui/icons/full/elcl16/collapseall.gif
deleted file mode 100644
index 72c7ca2..0000000
--- a/update/org.eclipse.update.ui/icons/full/elcl16/collapseall.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/elcl16/forward_nav.gif b/update/org.eclipse.update.ui/icons/full/elcl16/forward_nav.gif
deleted file mode 100644
index dc28ee1..0000000
--- a/update/org.eclipse.update.ui/icons/full/elcl16/forward_nav.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/elcl16/go_nav.gif b/update/org.eclipse.update.ui/icons/full/elcl16/go_nav.gif
deleted file mode 100644
index 7683327..0000000
--- a/update/org.eclipse.update.ui/icons/full/elcl16/go_nav.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/elcl16/home_nav.gif b/update/org.eclipse.update.ui/icons/full/elcl16/home_nav.gif
deleted file mode 100644
index bf2ba86..0000000
--- a/update/org.eclipse.update.ui/icons/full/elcl16/home_nav.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/elcl16/refresh_nav.gif b/update/org.eclipse.update.ui/icons/full/elcl16/refresh_nav.gif
deleted file mode 100644
index 919423d..0000000
--- a/update/org.eclipse.update.ui/icons/full/elcl16/refresh_nav.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/elcl16/show_unconf.gif b/update/org.eclipse.update.ui/icons/full/elcl16/show_unconf.gif
deleted file mode 100644
index bdf381a..0000000
--- a/update/org.eclipse.update.ui/icons/full/elcl16/show_unconf.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/elcl16/stop_nav.gif b/update/org.eclipse.update.ui/icons/full/elcl16/stop_nav.gif
deleted file mode 100644
index a519f44..0000000
--- a/update/org.eclipse.update.ui/icons/full/elcl16/stop_nav.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/etool16/config_wiz.gif b/update/org.eclipse.update.ui/icons/full/etool16/config_wiz.gif
deleted file mode 100644
index 16ee5ae..0000000
--- a/update/org.eclipse.update.ui/icons/full/etool16/config_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/etool16/install_wiz.gif b/update/org.eclipse.update.ui/icons/full/etool16/install_wiz.gif
deleted file mode 100644
index e1a6c88..0000000
--- a/update/org.eclipse.update.ui/icons/full/etool16/install_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/etool16/new_bookmark_wiz.gif b/update/org.eclipse.update.ui/icons/full/etool16/new_bookmark_wiz.gif
deleted file mode 100644
index b3c5bf3..0000000
--- a/update/org.eclipse.update.ui/icons/full/etool16/new_bookmark_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/etool16/new_folder_wiz.gif b/update/org.eclipse.update.ui/icons/full/etool16/new_folder_wiz.gif
deleted file mode 100644
index 05368bd..0000000
--- a/update/org.eclipse.update.ui/icons/full/etool16/new_folder_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/etool16/new_search_wiz.gif b/update/org.eclipse.update.ui/icons/full/etool16/new_search_wiz.gif
deleted file mode 100644
index ba1c90e..0000000
--- a/update/org.eclipse.update.ui/icons/full/etool16/new_search_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/etool16/uninstall_wiz.gif b/update/org.eclipse.update.ui/icons/full/etool16/uninstall_wiz.gif
deleted file mode 100644
index f51d550..0000000
--- a/update/org.eclipse.update.ui/icons/full/etool16/uninstall_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/etool16/update_wiz.gif b/update/org.eclipse.update.ui/icons/full/etool16/update_wiz.gif
deleted file mode 100644
index 8e2d78e..0000000
--- a/update/org.eclipse.update.ui/icons/full/etool16/update_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/eview16/browser.gif b/update/org.eclipse.update.ui/icons/full/eview16/browser.gif
deleted file mode 100644
index 85f69d0..0000000
--- a/update/org.eclipse.update.ui/icons/full/eview16/browser.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/eview16/configs.gif b/update/org.eclipse.update.ui/icons/full/eview16/configs.gif
deleted file mode 100644
index ecb090d..0000000
--- a/update/org.eclipse.update.ui/icons/full/eview16/configs.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/eview16/featuresrc_result.gif b/update/org.eclipse.update.ui/icons/full/eview16/featuresrc_result.gif
deleted file mode 100644
index 0f9bedc..0000000
--- a/update/org.eclipse.update.ui/icons/full/eview16/featuresrc_result.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/eview16/preview.gif b/update/org.eclipse.update.ui/icons/full/eview16/preview.gif
deleted file mode 100644
index 165f997..0000000
--- a/update/org.eclipse.update.ui/icons/full/eview16/preview.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/eview16/selected_updates.gif b/update/org.eclipse.update.ui/icons/full/eview16/selected_updates.gif
deleted file mode 100644
index 8a05ad6..0000000
--- a/update/org.eclipse.update.ui/icons/full/eview16/selected_updates.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/eview16/update_pers.gif b/update/org.eclipse.update.ui/icons/full/eview16/update_pers.gif
deleted file mode 100644
index d281673..0000000
--- a/update/org.eclipse.update.ui/icons/full/eview16/update_pers.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/eview16/updates.gif b/update/org.eclipse.update.ui/icons/full/eview16/updates.gif
deleted file mode 100644
index c01cb40..0000000
--- a/update/org.eclipse.update.ui/icons/full/eview16/updates.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/forms/def_provider.jpg b/update/org.eclipse.update.ui/icons/full/forms/def_provider.jpg
deleted file mode 100644
index a43cbeb..0000000
--- a/update/org.eclipse.update.ui/icons/full/forms/def_provider.jpg
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/forms/form_banner.jpg b/update/org.eclipse.update.ui/icons/full/forms/form_banner.jpg
deleted file mode 100644
index 253e2d2..0000000
--- a/update/org.eclipse.update.ui/icons/full/forms/form_banner.jpg
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/forms/form_underline.jpg b/update/org.eclipse.update.ui/icons/full/forms/form_underline.jpg
deleted file mode 100644
index 0ff3d0b..0000000
--- a/update/org.eclipse.update.ui/icons/full/forms/form_underline.jpg
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/forms/topic.gif b/update/org.eclipse.update.ui/icons/full/forms/topic.gif
deleted file mode 100644
index 10137e9..0000000
--- a/update/org.eclipse.update.ui/icons/full/forms/topic.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/obj16/app_obj.gif b/update/org.eclipse.update.ui/icons/full/obj16/app_obj.gif
deleted file mode 100644
index 723a3c8..0000000
--- a/update/org.eclipse.update.ui/icons/full/obj16/app_obj.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/obj16/bfolder_obj.gif b/update/org.eclipse.update.ui/icons/full/obj16/bfolder_obj.gif
deleted file mode 100644
index 44a382d..0000000
--- a/update/org.eclipse.update.ui/icons/full/obj16/bfolder_obj.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/obj16/category_obj.gif b/update/org.eclipse.update.ui/icons/full/obj16/category_obj.gif
deleted file mode 100644
index 8647df5..0000000
--- a/update/org.eclipse.update.ui/icons/full/obj16/category_obj.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/obj16/cd_obj.gif b/update/org.eclipse.update.ui/icons/full/obj16/cd_obj.gif
deleted file mode 100644
index b7b2370..0000000
--- a/update/org.eclipse.update.ui/icons/full/obj16/cd_obj.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/obj16/computer_obj.gif b/update/org.eclipse.update.ui/icons/full/obj16/computer_obj.gif
deleted file mode 100644
index b5c20ba..0000000
--- a/update/org.eclipse.update.ui/icons/full/obj16/computer_obj.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/obj16/config_obj.gif b/update/org.eclipse.update.ui/icons/full/obj16/config_obj.gif
deleted file mode 100644
index 45d6148..0000000
--- a/update/org.eclipse.update.ui/icons/full/obj16/config_obj.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/obj16/efix2_obj.gif b/update/org.eclipse.update.ui/icons/full/obj16/efix2_obj.gif
deleted file mode 100644
index 4235aa5..0000000
--- a/update/org.eclipse.update.ui/icons/full/obj16/efix2_obj.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/obj16/efix_obj.gif b/update/org.eclipse.update.ui/icons/full/obj16/efix_obj.gif
deleted file mode 100644
index 6a08981..0000000
--- a/update/org.eclipse.update.ui/icons/full/obj16/efix_obj.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/obj16/esite_obj.gif b/update/org.eclipse.update.ui/icons/full/obj16/esite_obj.gif
deleted file mode 100644
index d8bd0f1..0000000
--- a/update/org.eclipse.update.ui/icons/full/obj16/esite_obj.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/obj16/feature_obj.gif b/update/org.eclipse.update.ui/icons/full/obj16/feature_obj.gif
deleted file mode 100644
index 84f66f1..0000000
--- a/update/org.eclipse.update.ui/icons/full/obj16/feature_obj.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/obj16/floppy_obj.gif b/update/org.eclipse.update.ui/icons/full/obj16/floppy_obj.gif
deleted file mode 100644
index 501a04b..0000000
--- a/update/org.eclipse.update.ui/icons/full/obj16/floppy_obj.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/obj16/history_obj.gif b/update/org.eclipse.update.ui/icons/full/obj16/history_obj.gif
deleted file mode 100644
index 1f62f65..0000000
--- a/update/org.eclipse.update.ui/icons/full/obj16/history_obj.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/obj16/lsite_obj.gif b/update/org.eclipse.update.ui/icons/full/obj16/lsite_obj.gif
deleted file mode 100644
index 7143695..0000000
--- a/update/org.eclipse.update.ui/icons/full/obj16/lsite_obj.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/obj16/notinstalled_feature_obj.gif b/update/org.eclipse.update.ui/icons/full/obj16/notinstalled_feature_obj.gif
deleted file mode 100644
index b3db899..0000000
--- a/update/org.eclipse.update.ui/icons/full/obj16/notinstalled_feature_obj.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/obj16/places_obj.gif b/update/org.eclipse.update.ui/icons/full/obj16/places_obj.gif
deleted file mode 100644
index 4934698..0000000
--- a/update/org.eclipse.update.ui/icons/full/obj16/places_obj.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/obj16/psearch_obj.gif b/update/org.eclipse.update.ui/icons/full/obj16/psearch_obj.gif
deleted file mode 100644
index 76769ed..0000000
--- a/update/org.eclipse.update.ui/icons/full/obj16/psearch_obj.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/obj16/psite_obj.gif b/update/org.eclipse.update.ui/icons/full/obj16/psite_obj.gif
deleted file mode 100644
index 4d46c29..0000000
--- a/update/org.eclipse.update.ui/icons/full/obj16/psite_obj.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/obj16/saved_obj.gif b/update/org.eclipse.update.ui/icons/full/obj16/saved_obj.gif
deleted file mode 100644
index 117bc61..0000000
--- a/update/org.eclipse.update.ui/icons/full/obj16/saved_obj.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/obj16/site_obj.gif b/update/org.eclipse.update.ui/icons/full/obj16/site_obj.gif
deleted file mode 100644
index 701608b..0000000
--- a/update/org.eclipse.update.ui/icons/full/obj16/site_obj.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/obj16/tsearch_obj.gif b/update/org.eclipse.update.ui/icons/full/obj16/tsearch_obj.gif
deleted file mode 100644
index a126e8a..0000000
--- a/update/org.eclipse.update.ui/icons/full/obj16/tsearch_obj.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/obj16/unconf_feature_obj.gif b/update/org.eclipse.update.ui/icons/full/obj16/unconf_feature_obj.gif
deleted file mode 100644
index d4953e3..0000000
--- a/update/org.eclipse.update.ui/icons/full/obj16/unconf_feature_obj.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/obj16/updates_obj.gif b/update/org.eclipse.update.ui/icons/full/obj16/updates_obj.gif
deleted file mode 100644
index 972332c..0000000
--- a/update/org.eclipse.update.ui/icons/full/obj16/updates_obj.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/obj16/usearch_obj.gif b/update/org.eclipse.update.ui/icons/full/obj16/usearch_obj.gif
deleted file mode 100644
index 0b4a334..0000000
--- a/update/org.eclipse.update.ui/icons/full/obj16/usearch_obj.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/obj16/vfixed_obj.gif b/update/org.eclipse.update.ui/icons/full/obj16/vfixed_obj.gif
deleted file mode 100644
index f084a99..0000000
--- a/update/org.eclipse.update.ui/icons/full/obj16/vfixed_obj.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/obj16/vremote_obj.gif b/update/org.eclipse.update.ui/icons/full/obj16/vremote_obj.gif
deleted file mode 100644
index daacbc7..0000000
--- a/update/org.eclipse.update.ui/icons/full/obj16/vremote_obj.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/obj16/vremovable_obj.gif b/update/org.eclipse.update.ui/icons/full/obj16/vremovable_obj.gif
deleted file mode 100644
index ec89917..0000000
--- a/update/org.eclipse.update.ui/icons/full/obj16/vremovable_obj.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/obj16/web_bkmrk_obj.gif b/update/org.eclipse.update.ui/icons/full/obj16/web_bkmrk_obj.gif
deleted file mode 100644
index 4a7cccb..0000000
--- a/update/org.eclipse.update.ui/icons/full/obj16/web_bkmrk_obj.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/ovr16/add_stat.gif b/update/org.eclipse.update.ui/icons/full/ovr16/add_stat.gif
deleted file mode 100644
index 2a81156..0000000
--- a/update/org.eclipse.update.ui/icons/full/ovr16/add_stat.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/ovr16/current_co.gif b/update/org.eclipse.update.ui/icons/full/ovr16/current_co.gif
deleted file mode 100644
index a794943..0000000
--- a/update/org.eclipse.update.ui/icons/full/ovr16/current_co.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/ovr16/del_stat.gif b/update/org.eclipse.update.ui/icons/full/ovr16/del_stat.gif
deleted file mode 100644
index 5a5429a..0000000
--- a/update/org.eclipse.update.ui/icons/full/ovr16/del_stat.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/ovr16/error_co.gif b/update/org.eclipse.update.ui/icons/full/ovr16/error_co.gif
deleted file mode 100644
index 8612eaf..0000000
--- a/update/org.eclipse.update.ui/icons/full/ovr16/error_co.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/ovr16/installable_co.gif b/update/org.eclipse.update.ui/icons/full/ovr16/installable_co.gif
deleted file mode 100644
index 2663d5c..0000000
--- a/update/org.eclipse.update.ui/icons/full/ovr16/installable_co.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/ovr16/linked_co.gif b/update/org.eclipse.update.ui/icons/full/ovr16/linked_co.gif
deleted file mode 100644
index 5f5c8f6..0000000
--- a/update/org.eclipse.update.ui/icons/full/ovr16/linked_co.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/ovr16/mod_co.gif b/update/org.eclipse.update.ui/icons/full/ovr16/mod_co.gif
deleted file mode 100644
index 67b25c4..0000000
--- a/update/org.eclipse.update.ui/icons/full/ovr16/mod_co.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/ovr16/unconfigured_co.gif b/update/org.eclipse.update.ui/icons/full/ovr16/unconfigured_co.gif
deleted file mode 100644
index f13f7b0..0000000
--- a/update/org.eclipse.update.ui/icons/full/ovr16/unconfigured_co.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/ovr16/updated_co.gif b/update/org.eclipse.update.ui/icons/full/ovr16/updated_co.gif
deleted file mode 100644
index 3d0a37f..0000000
--- a/update/org.eclipse.update.ui/icons/full/ovr16/updated_co.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/ovr16/warning_co.gif b/update/org.eclipse.update.ui/icons/full/ovr16/warning_co.gif
deleted file mode 100644
index 3af228c..0000000
--- a/update/org.eclipse.update.ui/icons/full/ovr16/warning_co.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/wizban/config_wiz.gif b/update/org.eclipse.update.ui/icons/full/wizban/config_wiz.gif
deleted file mode 100644
index da59ae3..0000000
--- a/update/org.eclipse.update.ui/icons/full/wizban/config_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/wizban/def_wizban.jpg b/update/org.eclipse.update.ui/icons/full/wizban/def_wizban.jpg
deleted file mode 100644
index 912a504..0000000
--- a/update/org.eclipse.update.ui/icons/full/wizban/def_wizban.jpg
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/wizban/install_wiz.gif b/update/org.eclipse.update.ui/icons/full/wizban/install_wiz.gif
deleted file mode 100644
index 89b6c04..0000000
--- a/update/org.eclipse.update.ui/icons/full/wizban/install_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/wizban/new_bookmark_wiz.gif b/update/org.eclipse.update.ui/icons/full/wizban/new_bookmark_wiz.gif
deleted file mode 100644
index fc247d4..0000000
--- a/update/org.eclipse.update.ui/icons/full/wizban/new_bookmark_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/wizban/new_folder_wiz.gif b/update/org.eclipse.update.ui/icons/full/wizban/new_folder_wiz.gif
deleted file mode 100644
index 093cd16..0000000
--- a/update/org.eclipse.update.ui/icons/full/wizban/new_folder_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/wizban/new_search_wiz.gif b/update/org.eclipse.update.ui/icons/full/wizban/new_search_wiz.gif
deleted file mode 100644
index 4c70954..0000000
--- a/update/org.eclipse.update.ui/icons/full/wizban/new_search_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/wizban/uninstall_wiz.gif b/update/org.eclipse.update.ui/icons/full/wizban/uninstall_wiz.gif
deleted file mode 100644
index 86d96c8..0000000
--- a/update/org.eclipse.update.ui/icons/full/wizban/uninstall_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/icons/full/wizban/update_wiz.gif b/update/org.eclipse.update.ui/icons/full/wizban/update_wiz.gif
deleted file mode 100644
index 259fd25..0000000
--- a/update/org.eclipse.update.ui/icons/full/wizban/update_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/plugin.properties b/update/org.eclipse.update.ui/plugin.properties
deleted file mode 100644
index 3d2b656..0000000
--- a/update/org.eclipse.update.ui/plugin.properties
+++ /dev/null
@@ -1,61 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-#
-# Update UI plugin.xml resources
-#
-pluginName = Install/Update UI
-providerName = Eclipse.org
-fragmentNameWin = Install/Update UI for Windows
-
-updateMenu.label = &Software Updates
-actionSets.softwareUpdates.label = Software Updates
-actionSets.newUpdates.label = &New Updates
-actionSets.pendingChanges.label = &Pending Changes...
-actionSets.updateManager.label = &Update Manager
-
-searchCategory.name = Search Category
-searchCategories.updates = Available Updates
-searchCategories.updates.desc = <form><p>Search for updates to \
-features currently installed in this application. Updates are \
-features that have the same identifier as the installed features, \
-but newer versions.</p>\
-<p>Use scope settings to control the \
-extent of the search and the update sites that will be visited.</p>\
-<p>Note that the settings in <b>Preferences</b> affect whether the new feature \
-versions will be considered valid as updates.</p></form>
-
-searchCategories.expression = Regular Expressions
-searchCategories.expression.desc = <form><p>Search for features that \
-contain desired text or reqular expression. Use the query settings \
-to configure search options.</p></form>
-
-searchCategories.plugin = Plug-ins in Features
-searchCategories.plugin.desc = <form><p>Look for plug-ins that \
-are packaged in the features. This search category is useful \
-when required plug-ins of the feature you wanted to install \
-were not found in this application.</p></form>
-
-mainPreference.name = Install/Update
-appServerPreference.name = Web-triggered Updates
-
-views.category.label = Update Manager
-views.updates.label = Feature Updates
-views.configuration.label = Install Configuration
-views.preview.label = Preview
-views.webBrowser.label = External Preview
-views.searchResults.label = Feature Search Results
-views.updateItems.label = Selected Updates
-perspective.label = Install/Update
-properties.site.label = Site Info
-properties.folder.label = Folder Info
-properties.search.label = Search Info
-properties.configuration.label = Configuration
-properties.preserved.label = Preserved Configuration
\ No newline at end of file
diff --git a/update/org.eclipse.update.ui/plugin.xml b/update/org.eclipse.update.ui/plugin.xml
deleted file mode 100644
index ce80ba8..0000000
--- a/update/org.eclipse.update.ui/plugin.xml
+++ /dev/null
@@ -1,227 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<plugin
- id="org.eclipse.update.ui"
- name="%pluginName"
- version="2.1.2"
- provider-name="%providerName"
- class="org.eclipse.update.internal.ui.UpdateUI">
-
- <runtime>
- <library name="updateui.jar">
- <export name="*"/>
- <packages prefixes="org.eclipse.update.internal.ui"/>
- </library>
- </runtime>
- <requires>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.update.core"/>
- <import plugin="org.eclipse.update.ui.forms"/>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.apache.xerces"/>
- <import plugin="org.eclipse.help.appserver"/>
- <import plugin="org.eclipse.help"/>
- </requires>
-
-
- <extension-point id="searchCategory" name="%searchCategory.name" schema="schema/searchCategory.exsd"/>
-
- <extension
- point="org.eclipse.ui.actionSets">
- <actionSet
- label="%actionSets.softwareUpdates.label"
- visible="true"
- id="org.eclipse.update.ui.softwareUpdates">
- <menu
- label="%updateMenu.label"
- path="help/helpEnd"
- id="org.eclipse.update.ui.updateMenu">
- <separator
- name="group1">
- </separator>
- <separator
- name="group2">
- </separator>
- </menu>
- <action
- label="%actionSets.newUpdates.label"
- icon="icons/full/obj16/usearch_obj.gif"
- helpContextId="org.eclipse.update.ui.newUpdates"
- class="org.eclipse.update.internal.ui.NewUpdatesAction"
- menubarPath="help/org.eclipse.update.ui.updateMenu/group1"
- id="org.eclipse.update.ui.newUpdates">
- </action>
- <action
- label="%actionSets.pendingChanges.label"
- helpContextId="org.eclipse.update.ui.pendingChanges"
- class="org.eclipse.update.internal.ui.DeltaWizardAction"
- menubarPath="help/org.eclipse.update.ui.updateMenu/group2"
- id="org.eclipse.update.ui.pendingChanges">
- </action>
- <action
- label="%actionSets.updateManager.label"
- icon="icons/full/cview16/update_pers.gif"
- helpContextId="org.eclipse.update.ui.updateManager"
- class="org.eclipse.update.internal.ui.UpdateManagerAction"
- menubarPath="help/org.eclipse.update.ui.updateMenu/group2"
- id="org.eclipse.update.ui.updateManager">
- </action>
- </actionSet>
- </extension>
- <extension
- point="org.eclipse.ui.views">
- <category
- name="%views.category.label"
- id="org.eclipse.update.ui">
- </category>
- <view
- name="%views.updates.label"
- icon="icons/full/cview16/updates.gif"
- category="org.eclipse.update.ui"
- class="org.eclipse.update.internal.ui.views.UpdatesView"
- id="org.eclipse.update.ui.UpdatesView">
- </view>
- <view
- name="%views.configuration.label"
- icon="icons/full/cview16/configs.gif"
- category="org.eclipse.update.ui"
- class="org.eclipse.update.internal.ui.views.ConfigurationView"
- id="org.eclipse.update.ui.ConfigurationView">
- </view>
- <view
- name="%views.preview.label"
- icon="icons/full/cview16/preview.gif"
- category="org.eclipse.update.ui"
- class="org.eclipse.update.internal.ui.views.DetailsView"
- id="org.eclipse.update.ui.DetailsView">
- </view>
- <view
- name="%views.searchResults.label"
- icon="icons/full/cview16/featuresrc_result.gif"
- category="org.eclipse.update.ui"
- class="org.eclipse.update.internal.ui.views.SearchResultView"
- id="org.eclipse.update.ui.SearchResultsView">
- </view>
- <view
- name="%views.updateItems.label"
- icon="icons/full/cview16/selected_updates.gif"
- category="org.eclipse.update.ui"
- class="org.eclipse.update.internal.ui.views.SelectedUpdatesView"
- id="org.eclipse.update.ui.ItemsView">
- </view>
- </extension>
- <extension
- point="org.eclipse.ui.perspectives">
- <perspective
- name="%perspective.label"
- icon="icons/full/cview16/update_pers.gif"
- class="org.eclipse.update.internal.ui.UpdatePerspective"
- id="org.eclipse.update.ui.UpdatePerspective">
- </perspective>
- </extension>
- <extension
- point="org.eclipse.ui.propertyPages">
- <page
- objectClass="org.eclipse.update.internal.ui.model.SiteBookmark"
- name="%properties.site.label"
- class="org.eclipse.update.internal.ui.properties.SiteBookmarkPropertyPage"
- id="org.eclipse.update.ui.sitePropertyPage">
- </page>
- <page
- objectClass="org.eclipse.update.configuration.IInstallConfiguration"
- name="%properties.configuration.label"
- class="org.eclipse.update.internal.ui.properties.ConfigurationPropertyPage"
- id="org.eclipse.update.ui.configPropertyPage">
- </page>
- <page
- objectClass="org.eclipse.update.internal.ui.model.PreservedConfiguration"
- name="%properties.preserved.label"
- class="org.eclipse.update.internal.ui.properties.ConfigurationPropertyPage"
- id="org.eclipse.update.ui.configPropertyPage">
- </page>
- <page
- objectClass="org.eclipse.update.internal.ui.model.BookmarkFolder"
- name="%properties.folder.label"
- class="org.eclipse.update.internal.ui.properties.NamedObjectPropertyPage"
- id="org.eclipse.update.ui.folderPropertyPage">
- </page>
- <page
- objectClass="org.eclipse.update.internal.ui.search.SearchObject"
- name="%properties.search.label"
- class="org.eclipse.update.internal.ui.properties.SearchObjectPropertyPage"
- id="org.eclipse.update.ui.searchPropertyPage">
- </page>
- </extension>
- <extension
- point="org.eclipse.update.ui.searchCategory">
- <search
- name="%searchCategories.updates"
- icon="icons/full/obj16/usearch_obj.gif"
- class="org.eclipse.update.internal.ui.search.UpdatesSearchCategory"
- id="org.eclipse.update.ui.updates">
- <description>
- %searchCategories.updates.desc
- </description>
- </search>
- <search
- name="%searchCategories.expression"
- icon="icons/full/obj16/tsearch_obj.gif"
- class="org.eclipse.update.internal.ui.search.ExpressionSearchCategory"
- id="org.eclipse.update.ui.expression">
- <description>
- %searchCategories.expression.desc
- </description>
- </search>
- <search
- name="%searchCategories.plugin"
- icon="icons/full/obj16/psearch_obj.gif"
- class="org.eclipse.update.internal.ui.search.PluginsSearchCategory"
- id="org.eclipse.update.ui.plugins">
- <description>
- %searchCategories.plugin.desc
- </description>
- </search>
- </extension>
- <extension
- point="org.eclipse.ui.preferencePages">
- <page
- name="%mainPreference.name"
- class="org.eclipse.update.internal.ui.preferences.MainPreferencePage"
- id="org.eclipse.update.internal.ui.preferences.MainPreferencePage">
- </page>
- <page
- name="%appServerPreference.name"
- category="org.eclipse.update.internal.ui.preferences.MainPreferencePage"
- class="org.eclipse.update.internal.ui.preferences.AppServerPreferencePage"
- id="org.eclipse.update.internal.ui.preferences.AppServerPreferencePage">
- </page>
- </extension>
- <extension
- point="org.eclipse.update.core.deltaHandler">
- <display
- class="org.eclipse.update.internal.ui.wizards.InstallDeltaWizard">
- </display>
- </extension>
- <extension
- point="org.eclipse.ui.perspectiveExtensions">
- <perspectiveExtension
- targetID="org.eclipse.update.ui.UpdatePerspective">
- <viewShortcut
- id="org.eclipse.update.ui.UpdatesView">
- </viewShortcut>
- <viewShortcut
- id="org.eclipse.update.ui.ConfigurationView">
- </viewShortcut>
- <viewShortcut
- id="org.eclipse.update.ui.DetailsView">
- </viewShortcut>
- <viewShortcut
- id="org.eclipse.update.ui.SearchResultsView">
- </viewShortcut>
- <viewShortcut
- id="org.eclipse.update.ui.ItemsView">
- </viewShortcut>
- </perspectiveExtension>
- </extension>
-
-</plugin>
diff --git a/update/org.eclipse.update.ui/schema/searchCategory.exsd b/update/org.eclipse.update.ui/schema/searchCategory.exsd
deleted file mode 100644
index dfd6624..0000000
--- a/update/org.eclipse.update.ui/schema/searchCategory.exsd
+++ /dev/null
@@ -1,135 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.update.ui">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.update.ui" id="searchCategory" name="Search Category"/>
- </appInfo>
- <documentation>
- <b>This is an internal extension point and is not supposed to be used by plug-ins other than Update UI.</b>
- </documentation>
-</annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="search" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="search">
- <annotation>
- <appInfo>
- <meta.element labelAttribute="name" icon="icon"/>
- </appInfo>
- </annotation>
- <complexType>
- <sequence>
- <element ref="description" minOccurs="0" maxOccurs="1"/>
- </sequence>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- unique identifier of this search category
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
- translatable name of this search category
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string">
- <annotation>
- <documentation>
- a fully qualified name of the class that implements
-<samp>org.eclipse.update.internal.ui.search.ISearchQuery</samp>.
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.update.internal.ui.search.ISearchCategory"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="icon" type="string">
- <annotation>
- <documentation>
- a relative path to the image that will be used to represent
-instances of this search category in the UI.
- </documentation>
- <appInfo>
- <meta.attribute kind="resource"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="description" type="string">
- <annotation>
- <documentation>
- a short description of this search category
- </documentation>
- </annotation>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
-</schema>
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/DeltaWizardAction.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/DeltaWizardAction.java
deleted file mode 100644
index 76f7d34..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/DeltaWizardAction.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.ui.*;
-import org.eclipse.update.core.SiteManager;
-
-/**
- * Insert the type's description here.
- * @see IWorkbenchWindowActionDelegate
- */
-public class DeltaWizardAction implements IWorkbenchWindowActionDelegate {
- private IWorkbenchWindow window;
- /**
- * The constructor.
- */
- public DeltaWizardAction() {
- }
-
- /**
- * Insert the method's description here.
- * @see IWorkbenchWindowActionDelegate#run
- */
- public void run(IAction action) {
- BusyIndicator.showWhile(window.getShell().getDisplay(), new Runnable() {
- public void run() {
- try {
- SiteManager.handleNewChanges();
- }
- catch (CoreException e) {
- UpdateUI.logException(e);
- }
- }
- });
- }
-
- /**
- * Insert the method's description here.
- * @see IWorkbenchWindowActionDelegate#selectionChanged
- */
- public void selectionChanged(IAction arg0, ISelection arg1) {
- }
-
- /**
- * Insert the method's description here.
- * @see IWorkbenchWindowActionDelegate#dispose
- */
- public void dispose() {
- }
-
- /**
- * Insert the method's description here.
- * @see IWorkbenchWindowActionDelegate#init
- */
- public void init(IWorkbenchWindow window) {
- this.window = window;
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/NewUpdatesAction.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/NewUpdatesAction.java
deleted file mode 100644
index 7dd0b27..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/NewUpdatesAction.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.ui.*;
-import org.eclipse.update.core.ISite;
-import org.eclipse.update.internal.ui.search.*;
-import org.eclipse.update.internal.ui.wizards.*;
-import org.eclipse.update.internal.ui.wizards.NewUpdatesWizard;
-
-/**
- * Insert the type's description here.
- * @see IWorkbenchWindowActionDelegate
- */
-public class NewUpdatesAction implements IWorkbenchWindowActionDelegate {
- private static final String KEY_TITLE = "NewUpdates.noUpdates.title";
- private static final String KEY_MESSAGE = "NewUpdates.noUpdates.message";
- IWorkbenchWindow window;
- SearchObject searchObject;
- ISearchCategory category;
- /**
- * The constructor.
- */
- public NewUpdatesAction() {
- }
-
- private void initialize() {
- searchObject = new DefaultUpdatesSearchObject();
- String categoryId = searchObject.getCategoryId();
- SearchCategoryDescriptor desc =
- SearchCategoryRegistryReader.getDefault().getDescriptor(categoryId);
- category = desc.createCategory();
- }
-
- /**
- * Insert the method's description here.
- * @see IWorkbenchWindowActionDelegate#run
- */
- public void run(IAction action) {
- BusyIndicator
- .showWhile(window.getShell().getDisplay(), new Runnable() {
- public void run() {
- doRun();
- }
- });
- }
-
- private void doRun() {
- initialize();
- ProgressMonitorDialog pmd =
- new ProgressMonitorDialog(window.getShell());
- try {
- pmd.run(true, true, getOperation());
- showResults();
- } catch (InterruptedException e) {
- UpdateUI.logException(e);
- } catch (InvocationTargetException e) {
- Throwable t = e.getTargetException();
- if (t instanceof CoreException) {
- CoreException ce = (CoreException)t;
- IStatus status = ce.getStatus();
- if (status!=null &&
- status.getCode()==ISite.SITE_ACCESS_EXCEPTION) {
- // Just show this but do not throw exception
- // because there may be results anyway.
- showConnectionErrors(status);
- showResults();
- return;
- }
- }
- UpdateUI.logException(e);
- }
- }
-
- private void showResults() {
- if (searchObject.hasChildren())
- openNewUpdatesWizard();
- else
- showNoUpdatesMessage();
- }
-
- private void showConnectionErrors(IStatus status) {
- ErrorDialog.openError(window.getShell(),
- UpdateUI.getString(KEY_TITLE),
- null,
- status);
- }
-
-
- private void showNoUpdatesMessage() {
- MessageDialog.openInformation(
- window.getShell(),
- UpdateUI.getString(KEY_TITLE),
- UpdateUI.getString(KEY_MESSAGE));
- }
-
- private void openNewUpdatesWizard() {
- NewUpdatesWizard wizard = new NewUpdatesWizard(searchObject);
- WizardDialog dialog = new ResizableWizardDialog(window.getShell(), wizard);
- dialog.create();
- dialog.getShell().setText(UpdateUI.getString(KEY_TITLE));
- dialog.getShell().setSize(600, 500);
- dialog.open();
- if (wizard.isSuccessfulInstall())
- UpdateUI.informRestartNeeded();
- }
-
- private IRunnableWithProgress getOperation() {
- return searchObject.getSearchOperation(
- window.getShell().getDisplay(),
- category.getQueries());
- }
-
- /**
- * Insert the method's description here.
- * @see IWorkbenchWindowActionDelegate#selectionChanged
- */
- public void selectionChanged(IAction action, ISelection selection) {
- }
-
- /**
- * Insert the method's description here.
- * @see IWorkbenchWindowActionDelegate#dispose
- */
- public void dispose() {
- }
-
- /**
- * Insert the method's description here.
- * @see IWorkbenchWindowActionDelegate#init
- */
- public void init(IWorkbenchWindow window) {
- this.window = window;
- }
-}
\ No newline at end of file
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/PatchCleaner.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/PatchCleaner.java
deleted file mode 100644
index 6ca825f..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/PatchCleaner.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.update.configuration.*;
-import org.eclipse.update.core.*;
-
-/**
- * This utility class attaches as a listened to the provided
- * configured site, and for every unconfigured feature
- * it tests if it is a patch and cleans up its backup configuration.
- */
-
-public class PatchCleaner {
- private IConfiguredSite csite;
- private IFeature root;
- private SiteListener listener;
- class SiteListener implements IConfiguredSiteChangedListener {
- public void featureInstalled(IFeature feature) {
- }
- public void featureRemoved(IFeature feature) {
- cleanSavedConfigs(feature);
- }
- public void featureConfigured(IFeature feature) {
- }
- public void featureUnconfigured(IFeature feature) {
- cleanSavedConfigs(feature);
- }
- }
- public PatchCleaner(IConfiguredSite csite, IFeature root) {
- this.csite = csite;
- listener = new SiteListener();
- csite.addConfiguredSiteChangedListener(listener);
- }
-
- public void dispose() {
- csite.removeConfiguredSiteChangedListener(listener);
- }
- private void cleanSavedConfigs(IFeature feature) {
- if (feature.isPatch()) {
- IInstallConfiguration backupConfig = UpdateUI.getBackupConfigurationFor(feature);
- if (backupConfig!=null) {
- // clean it
- remove(backupConfig);
- }
- }
- }
- private void remove(IInstallConfiguration config) {
- try {
- ILocalSite localSite = SiteManager.getLocalSite();
- localSite.removeFromPreservedConfigurations(config);
- }
- catch (CoreException e) {
- }
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/UpdateLabelProvider.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/UpdateLabelProvider.java
deleted file mode 100644
index e98e0c6..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/UpdateLabelProvider.java
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/UpdateManagerAction.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/UpdateManagerAction.java
deleted file mode 100644
index c42f85c..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/UpdateManagerAction.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.ui.*;
-
-/**
- * Insert the type's description here.
- * @see IWorkbenchWindowActionDelegate
- */
-public class UpdateManagerAction implements IWorkbenchWindowActionDelegate {
- /**
- * The constructor.
- */
- public UpdateManagerAction() {
- }
-
- /**
- * Insert the method's description here.
- * @see IWorkbenchWindowActionDelegate#run
- */
- public void run(IAction action) {
- IWorkbenchWindow currentWindow =
- UpdateUI.getActiveWorkbenchWindow();
- IWorkbenchPage currentPage = currentWindow.getActivePage();
-
- if (currentPage != null
- && currentPage.getPerspective().getId().equals(
- UpdatePerspective.PERSPECTIVE_ID)) {
- ensureCriticalViewsVisible(currentPage);
- return;
- }
- IWorkbenchWindow window =
- currentPage != null
- ? currentPage.getWorkbenchWindow()
- : currentWindow;
-
- try {
- IWorkbenchPage updatePage =
- window.getWorkbench().showPerspective(
- UpdatePerspective.PERSPECTIVE_ID,
- window);
- ensureCriticalViewsVisible(updatePage);
- } catch (WorkbenchException e) {
- UpdateUI.logException(e, true);
- }
- }
-
- private void ensureCriticalViewsVisible(IWorkbenchPage page) {
- ensureViewVisible(page, UpdatePerspective.ID_ITEMS, false);
- ensureViewVisible(page, UpdatePerspective.ID_UPDATES, false);
- ensureViewVisible(page, UpdatePerspective.ID_DETAILS, true);
- ensureViewVisible(page, UpdatePerspective.ID_CONFIGURATION, true);
- }
-
- private void ensureViewVisible(IWorkbenchPage page, String viewId, boolean top) {
- try {
- IViewPart view = page.findView(viewId);
- if (view == null) {
- page.showView(viewId);
- }
- else if (top) {
- page.bringToTop(view);
- }
- } catch (PartInitException e) {
- UpdateUI.logException(e, true);
- }
- }
-
- /**
- * Insert the method's description here.
- * @see IWorkbenchWindowActionDelegate#selectionChanged
- */
- public void selectionChanged(IAction arg0, ISelection arg1) {
- }
-
- /**
- * Insert the method's description here.
- * @see IWorkbenchWindowActionDelegate#dispose
- */
- public void dispose() {
- }
-
- /**
- * Insert the method's description here.
- * @see IWorkbenchWindowActionDelegate#init
- */
- public void init(IWorkbenchWindow arg0) {
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/UpdatePerspective.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/UpdatePerspective.java
deleted file mode 100644
index c5f8d8a..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/UpdatePerspective.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.ui.*;
-
-public class UpdatePerspective implements IPerspectiveFactory {
- private static final String PREFIX = "org.eclipse.update.ui.";
- public static final String PERSPECTIVE_ID = PREFIX + "UpdatePerspective";
- public static final String ID_UPDATES = PREFIX + "UpdatesView";
- public static final String ID_CONFIGURATION = PREFIX + "ConfigurationView";
- public static final String ID_DETAILS = PREFIX + "DetailsView";
- public static final String ID_BROWSER = PREFIX + "WebBrowser";
- public static final String ID_SEARCH_RESULTS = PREFIX + "SearchResultsView";
- public static final String ID_ITEMS = PREFIX + "ItemsView";
-
- public UpdatePerspective() {
- super();
- }
-
- public void createInitialLayout(IPageLayout factory) {
- factory.setEditorAreaVisible(false);
- IFolderLayout upperFolder = factory.createFolder("upper",
- IPageLayout.LEFT,
- 0.33f,
- factory.getEditorArea());
- upperFolder.addView(ID_CONFIGURATION);
- upperFolder.addView(ID_ITEMS);
-
- factory.addView(ID_UPDATES, IPageLayout.BOTTOM, 0.5f, "upper");
- IFolderLayout detailsFolder = factory.createFolder("details", IPageLayout.TOP, 0.67f, factory.getEditorArea());
- detailsFolder.addView(ID_DETAILS);
- if (SWT.getPlatform().equals("win32"))
- detailsFolder.addPlaceholder(ID_BROWSER);
- factory.addPlaceholder(ID_SEARCH_RESULTS, IPageLayout.BOTTOM, 0.67f, ID_DETAILS);
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/UpdateUI.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/UpdateUI.java
deleted file mode 100644
index a841c8c..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/UpdateUI.java
+++ /dev/null
@@ -1,442 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui;
-
-
-import java.lang.reflect.InvocationTargetException;
-import java.net.*;
-import java.util.*;
-
-import org.eclipse.core.boot.*;
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.help.internal.appserver.WebappManager;
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.*;
-import org.eclipse.ui.internal.WorkbenchPlugin;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.eclipse.update.configuration.*;
-import org.eclipse.update.core.*;
-import org.eclipse.update.internal.model.SiteLocalModel;
-import org.eclipse.update.internal.ui.forms.UpdateAdapterFactory;
-import org.eclipse.update.internal.ui.model.*;
-import org.eclipse.update.internal.ui.parts.AboutInfo;
-import org.eclipse.update.internal.ui.preferences.*;
-import org.eclipse.update.internal.ui.security.UpdateManagerAuthenticator;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class UpdateUI extends AbstractUIPlugin {
- public static final String PLUGIN_ID = "org.eclipse.update.ui";
- public static final String WEB_APP_ID = "org.eclipse.update";
- //The shared instance.
- private static UpdateUI plugin;
- //Resource bundle.
- private ResourceBundle resourceBundle;
- private UpdateAdapterFactory adapterFactory;
- private UpdateModel model;
- private UpdateManagerAuthenticator authenticator;
- private AboutInfo aboutInfo;
- private String appServerHost;
- private int appServerPort;
- private UpdateLabelProvider labelProvider;
-
- /**
- * The constructor.
- */
- public UpdateUI(IPluginDescriptor descriptor) {
- super(descriptor);
- plugin = this;
- try {
- resourceBundle = ResourceBundle.getBundle("org.eclipse.update.internal.ui.UpdateUIPluginResources");
- } catch (MissingResourceException x) {
- resourceBundle = null;
- }
- }
-
- /**
- * Returns the shared instance.
- */
- public static UpdateUI getDefault() {
- return plugin;
- }
-
- public static IWorkbenchPage getActivePage() {
- return getDefault().internalGetActivePage();
- }
-
- private IWorkbenchPage internalGetActivePage() {
- IWorkbenchWindow window = getWorkbench().getActiveWorkbenchWindow();
- if (window != null)
- return window.getActivePage();
- return null;
- }
-
- public static Shell getActiveWorkbenchShell() {
- IWorkbenchWindow window = getActiveWorkbenchWindow();
- return window != null ? window.getShell() : null;
- }
-
- public static IWorkbenchWindow getActiveWorkbenchWindow() {
- return getDefault().getWorkbench().getActiveWorkbenchWindow();
- }
-
- public static String getPluginId() {
- return getDefault().getDescriptor().getUniqueIdentifier();
- }
-
- public AboutInfo getAboutInfo() {
- return aboutInfo;
- }
-
- public UpdateLabelProvider getLabelProvider() {
- if (labelProvider == null)
- labelProvider = new UpdateLabelProvider();
- return labelProvider;
- }
-
- /**
- * Returns the workspace instance.
- */
- public static IWorkspace getWorkspace() {
- return ResourcesPlugin.getWorkspace();
- }
-
- /**
- * Returns the string from the plugin's resource bundle,
- * or 'key' if not found.
- */
- public static String getString(String key) {
- ResourceBundle bundle = UpdateUI.getDefault().getResourceBundle();
- try {
- return bundle.getString(key);
- } catch (MissingResourceException e) {
- return key;
- }
- }
-
- public static String getFormattedMessage(String key, String[] args) {
- String text = getString(key);
- return java.text.MessageFormat.format(text, args);
- }
-
- public static String getFormattedMessage(String key, String arg) {
- String text = getString(key);
- return java.text.MessageFormat.format(text, new String[] { arg });
- }
-
- /**
- * Returns the plugin's resource bundle,
- */
- public ResourceBundle getResourceBundle() {
- return resourceBundle;
- }
-
- public void startup() throws CoreException {
- super.startup();
- readInfo();
- model = new UpdateModel();
- model.startup();
- IAdapterManager manager = Platform.getAdapterManager();
- adapterFactory = new UpdateAdapterFactory();
- manager.registerAdapters(adapterFactory, UIModelObject.class);
- authenticator = new UpdateManagerAuthenticator();
- Authenticator.setDefault(authenticator);
- int historyPref = getPluginPreferences().getInt(MainPreferencePage.P_HISTORY_SIZE);
- if (historyPref > 0) {
- SiteLocalModel.DEFAULT_HISTORY = historyPref;
- }
- if (AppServerPreferencePage.getUseApplicationServer()) {
- try {
- startWebApp();
- } catch (CoreException e) {
- logException(e);
- }
- }
- }
-
- public void startWebApp() throws CoreException {
-
- // configure web install handler
- try {
- WebappManager.start(WEB_APP_ID, PLUGIN_ID, new Path("webapp"));
- } catch (CoreException e) {
- UpdateUI.logException(e);
- return;
- }
-
- appServerHost = WebappManager.getHost();
- appServerPort = WebappManager.getPort();
- }
-
- public void stopWebApp() throws CoreException {
- try {
- // unconfigure web install handler
- WebappManager.stop(WEB_APP_ID);
- } finally {
- appServerHost = null;
- appServerPort = 0;
- }
- }
-
- public boolean isWebAppStarted() {
- return appServerHost != null;
- }
-
- public String getAppServerHost() {
- return appServerHost;
- }
-
- public int getAppServerPort() {
- return appServerPort;
- }
-
- public void shutdown() throws CoreException {
- IAdapterManager manager = Platform.getAdapterManager();
- manager.unregisterAdapters(adapterFactory);
- model.shutdown();
- UpdateColors.disposeColors();
- if (labelProvider != null)
- labelProvider.dispose();
- super.shutdown();
-
- }
-
- public UpdateModel getUpdateModel() {
- return model;
- }
-
- public static void logException(Throwable e) {
- logException(e, true);
- }
-
- public static void logException(Throwable e, boolean showErrorDialog) {
- if (e instanceof InvocationTargetException) {
- e = ((InvocationTargetException) e).getTargetException();
- }
-
- IStatus status = null;
- if (e instanceof CoreException) {
- status = ((CoreException) e).getStatus();
- } else {
- String message = e.getMessage();
- if (message == null)
- message = e.toString();
- status = new Status(IStatus.ERROR, getPluginId(), IStatus.OK, message, e);
- }
- log(status, showErrorDialog);
- }
-
- public static void log(IStatus status, boolean showErrorDialog) {
- if (status.getSeverity() != IStatus.INFO) {
- if (showErrorDialog)
- ErrorDialog.openError(getActiveWorkbenchShell(), null, null, status);
- //ResourcesPlugin.getPlugin().getLog().log(status);
- Platform.getPlugin("org.eclipse.core.runtime").getLog().log(status);
- } else {
- MessageDialog.openInformation(getActiveWorkbenchShell(), null, status.getMessage());
- }
- }
-
- public static IFeature[] searchSite(String featureId, IConfiguredSite site, boolean onlyConfigured) throws CoreException {
- IFeatureReference[] references = null;
-
- if (onlyConfigured)
- references = site.getConfiguredFeatures();
- else
- references = site.getSite().getFeatureReferences();
- Vector result = new Vector();
-
- for (int i = 0; i < references.length; i++) {
- IFeature feature = references[i].getFeature(null);
- String id = feature.getVersionedIdentifier().getIdentifier();
- if (featureId.equals(id)) {
- result.add(feature);
- }
- }
- return (IFeature[]) result.toArray(new IFeature[result.size()]);
- }
-
- public static IFeature[] getInstalledFeatures(IFeature feature) {
- return getInstalledFeatures(feature, true);
- }
-
- public static IFeature[] getInstalledFeatures(IFeature feature, boolean onlyConfigured) {
- return getInstalledFeatures(feature.getVersionedIdentifier(), onlyConfigured);
- }
-
- public static IFeature[] getInstalledFeatures(VersionedIdentifier vid, boolean onlyConfigured) {
- Vector features = new Vector();
- try {
- ILocalSite localSite = SiteManager.getLocalSite();
- IInstallConfiguration config = localSite.getCurrentConfiguration();
- IConfiguredSite[] isites = config.getConfiguredSites();
- String id = vid.getIdentifier();
-
- for (int i = 0; i < isites.length; i++) {
- IConfiguredSite isite = isites[i];
- IFeature[] result = UpdateUI.searchSite(id, isite, onlyConfigured);
- for (int j = 0; j < result.length; j++) {
- IFeature installedFeature = result[j];
- features.add(installedFeature);
- }
- }
- } catch (CoreException e) {
- UpdateUI.logException(e);
- }
- return (IFeature[]) features.toArray(new IFeature[features.size()]);
- }
-
- public static boolean isPatch(IFeature candidate) {
- IImport[] imports = candidate.getImports();
-
- for (int i = 0; i < imports.length; i++) {
- IImport iimport = imports[i];
- if (iimport.isPatch()) return true;
- }
- return false;
- }
-
- public static boolean isPatch(IFeature target, IFeature candidate) {
- VersionedIdentifier vid = target.getVersionedIdentifier();
- IImport[] imports = candidate.getImports();
-
- for (int i = 0; i < imports.length; i++) {
- IImport iimport = imports[i];
- if (iimport.isPatch()) {
- VersionedIdentifier ivid = iimport.getVersionedIdentifier();
- if (vid.equals(ivid)) {
- // Bingo.
- return true;
- }
- }
- }
- return false;
- }
-
- public static IInstallConfiguration getBackupConfigurationFor(IFeature feature) {
- VersionedIdentifier vid = feature.getVersionedIdentifier();
- String key = "@" + vid.getIdentifier() + "_" + vid.getVersion();
- try {
- ILocalSite lsite = SiteManager.getLocalSite();
- IInstallConfiguration[] configs = lsite.getPreservedConfigurations();
- for (int i = 0; i < configs.length; i++) {
- IInstallConfiguration config = configs[i];
- if (config.getLabel().startsWith(key))
- return config;
- }
- } catch (CoreException e) {
- }
- return null;
- }
-
- /**
- * Gets the authenticator.
- * @return Returns a UpdateManagerAuthenticator
- */
- public UpdateManagerAuthenticator getAuthenticator() {
- return authenticator;
- }
-
- public static URL getOriginatingURL(String id) {
- IDialogSettings section = getOriginatingURLSection();
- String value = section.get(id);
- if (value != null) {
- try {
- return new URL(value);
- } catch (MalformedURLException e) {
- }
- }
- return null;
- }
-
- public static void setOriginatingURL(String id, URL url) {
- IDialogSettings section = getOriginatingURLSection();
- section.put(id, url.toString());
- }
-
- private static IDialogSettings getOriginatingURLSection() {
- IDialogSettings settings = getDefault().getDialogSettings();
- IDialogSettings section = settings.getSection("originatingURLs");
- if (section == null)
- section = settings.addNewSection("originatingURLs");
- return section;
- }
-
- private void readInfo() {
- // determine the identifier of the "dominant" application
- IPlatformConfiguration conf = BootLoader.getCurrentPlatformConfiguration();
- String versionedFeatureId = conf.getPrimaryFeatureIdentifier();
-
- if (versionedFeatureId == null) {
- aboutInfo = new AboutInfo(null, null); // Ok to pass null
- } else {
- int index = versionedFeatureId.lastIndexOf("_"); //$NON-NLS-1$
- if (index == -1)
- aboutInfo = new AboutInfo(versionedFeatureId, null);
- else {
- String mainPluginName = versionedFeatureId.substring(0, index);
- PluginVersionIdentifier mainPluginVersion = null;
- try {
- mainPluginVersion = new PluginVersionIdentifier(versionedFeatureId.substring(index + 1));
- } catch (Exception e) {
- IStatus iniStatus = new Status(IStatus.ERROR, WorkbenchPlugin.getDefault().getDescriptor().getUniqueIdentifier(), 0, "Unknown plugin version " + versionedFeatureId, e); //$NON-NLS-1$
- log(iniStatus, true); //$NON-NLS-1$
- }
- aboutInfo = new AboutInfo(mainPluginName, mainPluginVersion);
- }
- }
- try {
- aboutInfo.readINIFile();
- } catch (CoreException e) {
- log(e.getStatus(), true); //$NON-NLS-1$
- }
- }
- public static void informRestartNeeded() {
- String title = UpdateUI.getString("RestartTitle");
- String message = UpdateUI.getString("RestartMessage");
- boolean restart = MessageDialog.openQuestion(getActiveWorkbenchShell(), title, message);
- if (restart)
- PlatformUI.getWorkbench().restart();
- }
- /**
- * Initializes a preference store with default preference values
- * for this plug-in.
- * <p>
- * This method is called after the preference store is initially loaded
- * (default values are never stored in preference stores).
- * </p>
- * <p>
- * The default implementation of this method does nothing.
- * Subclasses should reimplement this method if the plug-in has any preferences.
- * </p>
- * <p>
- * A subclass may reimplement this method to set default values for the
- * preference store using JFace API. This is the older way of initializing
- * default values. If this method is reimplemented, do not override
- * <code>initializeDefaultPluginPreferences()</code>.
- * </p>
- *
- * @param store the preference store to fill
- */
- protected void initializeDefaultPreferences(IPreferenceStore store) {
- store.setDefault(MainPreferencePage.P_CHECK_SIGNATURE, true);
- store.setDefault(MainPreferencePage.P_HISTORY_SIZE, 50);
- store.setDefault(MainPreferencePage.P_BROWSER, MainPreferencePage.EMBEDDED_VALUE);
- store.setDefault(MainPreferencePage.P_UPDATE_VERSIONS, MainPreferencePage.EQUIVALENT_VALUE);
- store.setDefault(AppServerPreferencePage.P_MASTER_SWITCH, false);
- store.setDefault(AppServerPreferencePage.P_ENCODE_URLS, true);
- UpdateColors.setDefaults(store);
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/UpdateUIImages.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/UpdateUIImages.java
deleted file mode 100644
index 70b86e6..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/UpdateUIImages.java
+++ /dev/null
@@ -1,223 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui;
-
-import java.net.*;
-
-import org.eclipse.core.runtime.IPluginDescriptor;
-import org.eclipse.jface.resource.*;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * Bundle of all images used by the PDE plugin.
- */
-public class UpdateUIImages {
-
-
- private static final String NAME_PREFIX= UpdateUI.getPluginId()+".";
- private static final int NAME_PREFIX_LENGTH= NAME_PREFIX.length();
-
-
- private final static URL BASE_URL = UpdateUI.getDefault().getDescriptor().getInstallURL();
-
-
- private static ImageRegistry PLUGIN_REGISTRY;
-
- public final static String ICONS_PATH = "icons/full/";
-
- /**
- * Set of predefined Image Descriptors.
- */
-
- private static final String PATH_OBJ= ICONS_PATH+"obj16/";
- private static final String PATH_VIEW = ICONS_PATH+"cview16/";
- private static final String PATH_LCL= ICONS_PATH+"elcl16/";
- private static final String PATH_LCL_HOVER= ICONS_PATH+"clcl16/";
- private static final String PATH_LCL_DISABLED= ICONS_PATH+"dlcl16/";
- private static final String PATH_TOOL = ICONS_PATH + "etool16/";
- private static final String PATH_TOOL_HOVER = ICONS_PATH + "ctool16/";
- private static final String PATH_TOOL_DISABLED = ICONS_PATH + "dtool16/";
- private static final String PATH_OVR = ICONS_PATH + "ovr16/";
- private static final String PATH_WIZBAN = ICONS_PATH + "wizban/";
- private static final String PATH_FORMS = ICONS_PATH + "forms/";
-
-
- /**
- * Frequently used images
- */
- public static final String IMG_FORM_BANNER = NAME_PREFIX+"FORM_BANNER";
- public static final String IMG_FORM_UNDERLINE = NAME_PREFIX + "FORM_UNDERLINE";
-
- /**
- * OBJ16
- */
- public static final ImageDescriptor DESC_APP_OBJ = create(PATH_OBJ, "app_obj.gif");
- public static final ImageDescriptor DESC_BFOLDER_OBJ = create(PATH_OBJ, "bfolder_obj.gif");
- public static final ImageDescriptor DESC_CATEGORY_OBJ = create(PATH_OBJ, "category_obj.gif");
- public static final ImageDescriptor DESC_CD_OBJ = create(PATH_OBJ, "cd_obj.gif");
- public static final ImageDescriptor DESC_COMPUTER_OBJ = create(PATH_OBJ, "computer_obj.gif");
- public static final ImageDescriptor DESC_CONFIG_OBJ = create(PATH_OBJ, "config_obj.gif");
- public static final ImageDescriptor DESC_FEATURE_OBJ = create(PATH_OBJ, "feature_obj.gif");
- public static final ImageDescriptor DESC_EFIX_OBJ = create(PATH_OBJ, "efix2_obj.gif");
- public static final ImageDescriptor DESC_FLOPPY_OBJ = create(PATH_OBJ, "floppy_obj.gif");
- public static final ImageDescriptor DESC_HISTORY_OBJ = create(PATH_OBJ, "history_obj.gif");
- public static final ImageDescriptor DESC_LSITE_OBJ = create(PATH_OBJ, "lsite_obj.gif");
- public static final ImageDescriptor DESC_PSITE_OBJ = create(PATH_OBJ, "psite_obj.gif");
- public static final ImageDescriptor DESC_ESITE_OBJ = create(PATH_OBJ, "esite_obj.gif");
- public static final ImageDescriptor DESC_SITE_OBJ = create(PATH_OBJ, "site_obj.gif");
- public static final ImageDescriptor DESC_WEB_SITE_OBJ = create(PATH_OBJ, "web_bkmrk_obj.gif");
- public static final ImageDescriptor DESC_PLACES_OBJ = create(PATH_OBJ, "places_obj.gif");
- public static final ImageDescriptor DESC_SAVED_OBJ = create(PATH_OBJ, "saved_obj.gif");
- public static final ImageDescriptor DESC_UNCONF_FEATURE_OBJ = create(PATH_OBJ, "unconf_feature_obj.gif");
- public static final ImageDescriptor DESC_UPDATES_OBJ = create(PATH_OBJ, "updates_obj.gif");
- public static final ImageDescriptor DESC_VFIXED_OBJ = create(PATH_OBJ, "vfixed_obj.gif");
- public static final ImageDescriptor DESC_VREMOTE_OBJ = create(PATH_OBJ, "vremote_obj.gif");
- public static final ImageDescriptor DESC_VREMOVABLE_OBJ = create(PATH_OBJ, "vremovable_obj.gif");
- public static final ImageDescriptor DESC_NOTINST_FEATURE_OBJ = create(PATH_OBJ, "notinstalled_feature_obj.gif");
- public static final ImageDescriptor DESC_SHOW_SEARCH = create(PATH_OBJ, "tsearch_obj.gif");
-
-
- /**
- * OVR16
- */
- public static final ImageDescriptor DESC_LINKED_CO = create(PATH_OVR, "linked_co.gif");
- public static final ImageDescriptor DESC_UPDATED_CO = create(PATH_OVR, "updated_co.gif");
- public static final ImageDescriptor DESC_INSTALLABLE_CO = create(PATH_OVR, "installable_co.gif");
- public static final ImageDescriptor DESC_CURRENT_CO = create(PATH_OVR, "current_co.gif");
- public static final ImageDescriptor DESC_ERROR_CO = create(PATH_OVR, "error_co.gif");
- public static final ImageDescriptor DESC_WARNING_CO = create(PATH_OVR, "warning_co.gif");
- public static final ImageDescriptor DESC_MOD_CO = create(PATH_OVR, "mod_co.gif");
- public static final ImageDescriptor DESC_ADD_CO = create(PATH_OVR, "add_stat.gif");
- public static final ImageDescriptor DESC_DEL_CO = create(PATH_OVR, "del_stat.gif");
- public static final ImageDescriptor DESC_UNCONF_CO = create(PATH_OVR, "unconfigured_co.gif");
-
- /**
- * VIEW16
- */
-
- public static final ImageDescriptor DESC_CONFIGS_VIEW = create(PATH_VIEW, "configs.gif");
- public static final ImageDescriptor DESC_SITES_VIEW = create(PATH_VIEW, "updates.gif");
- public static final ImageDescriptor DESC_SELECTED_UPDATES_VIEW = create(PATH_VIEW, "selected_updates.gif");
-
- /**
- * LCL
- */
- public static final ImageDescriptor DESC_BACKWARD_NAV = create(PATH_LCL, "backward_nav.gif");
- public static final ImageDescriptor DESC_BACKWARD_NAV_H = create(PATH_LCL_HOVER, "backward_nav.gif");
- public static final ImageDescriptor DESC_BACKWARD_NAV_D = create(PATH_LCL_DISABLED, "backward_nav.gif");
- public static final ImageDescriptor DESC_FORWARD_NAV = create(PATH_LCL, "forward_nav.gif");
- public static final ImageDescriptor DESC_FORWARD_NAV_H = create(PATH_LCL_HOVER, "forward_nav.gif");
- public static final ImageDescriptor DESC_FORWARD_NAV_D = create(PATH_LCL_DISABLED, "forward_nav.gif");
- public static final ImageDescriptor DESC_HOME_NAV = create(PATH_LCL, "home_nav.gif");
- public static final ImageDescriptor DESC_HOME_NAV_H = create(PATH_LCL_HOVER, "home_nav.gif");
- public static final ImageDescriptor DESC_HOME_NAV_D = create(PATH_LCL_DISABLED, "home_nav.gif");
- public static final ImageDescriptor DESC_REFRESH_NAV = create(PATH_LCL, "refresh_nav.gif");
- public static final ImageDescriptor DESC_REFRESH_NAV_H = create(PATH_LCL_HOVER, "refresh_nav.gif");
- public static final ImageDescriptor DESC_REFRESH_NAV_D = create(PATH_LCL_DISABLED, "refresh_nav.gif");
- public static final ImageDescriptor DESC_STOP_NAV = create(PATH_LCL, "stop_nav.gif");
- public static final ImageDescriptor DESC_STOP_NAV_H = create(PATH_LCL_HOVER, "stop_nav.gif");
- public static final ImageDescriptor DESC_STOP_NAV_D = create(PATH_LCL_DISABLED, "stop_nav.gif");
- public static final ImageDescriptor DESC_GO_NAV = create(PATH_LCL, "go_nav.gif");
- public static final ImageDescriptor DESC_GO_NAV_H = create(PATH_LCL_HOVER, "go_nav.gif");
- public static final ImageDescriptor DESC_GO_NAV_D = create(PATH_LCL_DISABLED, "go_nav.gif");
- public static final ImageDescriptor DESC_SHOW_UNCONF = create(PATH_LCL, "show_unconf.gif");
- public static final ImageDescriptor DESC_SHOW_UNCONF_H = create(PATH_LCL_HOVER, "show_unconf.gif");
- public static final ImageDescriptor DESC_SHOW_UNCONF_D = create(PATH_LCL_DISABLED, "show_unconf.gif");
- public static final ImageDescriptor DESC_COLLAPSE_ALL = create(PATH_LCL, "collapseall.gif");
-
- /**
- * WIZ
- */
- public static final ImageDescriptor DESC_INSTALL_WIZ = create(PATH_WIZBAN, "install_wiz.gif");
- public static final ImageDescriptor DESC_UPDATE_WIZ = create(PATH_WIZBAN, "update_wiz.gif");
- public static final ImageDescriptor DESC_CONFIG_WIZ = create(PATH_WIZBAN, "config_wiz.gif");
- public static final ImageDescriptor DESC_UNINSTALL_WIZ = create(PATH_WIZBAN, "uninstall_wiz.gif");
- public static final ImageDescriptor DESC_INSTALL_BANNER = create(PATH_WIZBAN, "def_wizban.jpg");
- public static final ImageDescriptor DESC_FORM_BANNER = create(PATH_FORMS, "form_banner.jpg");
- public static final ImageDescriptor DESC_FORM_UNDERLINE = create(PATH_FORMS, "form_underline.jpg");
- public static final ImageDescriptor DESC_PROVIDER = create(PATH_FORMS, "def_provider.jpg");
- public static final ImageDescriptor DESC_ITEM = create(PATH_FORMS, "topic.gif");
- public static final ImageDescriptor DESC_NEW_BOOKMARK = create(PATH_WIZBAN, "new_bookmark_wiz.gif");
- public static final ImageDescriptor DESC_NEW_FOLDER = create(PATH_WIZBAN, "new_folder_wiz.gif");
- public static final ImageDescriptor DESC_NEW_SEARCH = create(PATH_WIZBAN, "new_search_wiz.gif");
-
- private static ImageDescriptor create(String prefix, String name) {
- return ImageDescriptor.createFromURL(makeImageURL(prefix, name));
- }
-
-
- public static Image get(String key) {
- if (PLUGIN_REGISTRY==null) initialize();
- return PLUGIN_REGISTRY.get(key);
- }
-
-
-public static ImageDescriptor getImageDescriptorFromPlugin(
- IPluginDescriptor pluginDescriptor,
- String subdirectoryAndFilename) {
- URL installURL = pluginDescriptor.getInstallURL();
- try {
- URL newURL = new URL(installURL, subdirectoryAndFilename);
- return ImageDescriptor.createFromURL(newURL);
- }
- catch (MalformedURLException e) {
- }
- return null;
-}
-
-
-public static Image getImageFromPlugin(
- IPluginDescriptor pluginDescriptor,
- String subdirectoryAndFilename) {
- URL installURL = pluginDescriptor.getInstallURL();
- Image image = null;
- try {
- URL newURL = new URL(installURL, subdirectoryAndFilename);
- String key = newURL.toString();
- if (PLUGIN_REGISTRY==null) initialize();
- image = PLUGIN_REGISTRY.get(key);
- if (image==null) {
- ImageDescriptor desc = ImageDescriptor.createFromURL(newURL);
- image = desc.createImage();
- PLUGIN_REGISTRY.put(key, image);
- }
- }
- catch (MalformedURLException e) {
- }
- return image;
-}
-/* package */
-private static final void initialize() {
- PLUGIN_REGISTRY = new ImageRegistry();
- manage(IMG_FORM_BANNER, DESC_FORM_BANNER);
- manage(IMG_FORM_UNDERLINE, DESC_FORM_UNDERLINE);
-}
-
-
-private static URL makeImageURL(String prefix, String name) {
- String path = prefix + name;
- URL url = null;
- try {
- url = new URL(BASE_URL, path);
- }
- catch (MalformedURLException e) {
- return null;
- }
- return url;
-}
-
-public static Image manage(String key, ImageDescriptor desc) {
- Image image = desc.createImage();
- PLUGIN_REGISTRY.put(key, image);
- return image;
-}
-
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/UpdateUIPluginResources.properties b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/UpdateUIPluginResources.properties
deleted file mode 100644
index 7846266..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/UpdateUIPluginResources.properties
+++ /dev/null
@@ -1,696 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-#
-#
-#
-
-RestartTitle = Install/Update
-RestartMessage = You will need to restart the workbench for the changes to take effect. \
-Would you like to restart now?
-
-InstallConfigurationPage.createdOn = Created On
-InstallConfigurationPage.currentConfig = \nCurrent Configuration
-InstallConfigurationPage.yes = Yes
-InstallConfigurationPage.no = No
-InstallConfigurationPage.ActivitySection.title=Activities
-InstallConfigurationPage.ActivitySection.desc=The following list shows \
-activities that caused the creation of this configuration:
-InstallConfigurationPage.ActivitySection.headers.date= Date
-InstallConfigurationPage.ActivitySection.headers.target= Target
-InstallConfigurationPage.ActivitySection.headers.action= Action
-InstallConfigurationPage.ActivitySection.headers.status= Status
-InstallConfigurationPage.ActivitySection.action.configure= Enabled
-InstallConfigurationPage.ActivitySection.action.featureInstall= Feature Installed
-InstallConfigurationPage.ActivitySection.action.featureRemove= Feature Removed
-InstallConfigurationPage.ActivitySection.action.siteInstall= Site Installed
-InstallConfigurationPage.ActivitySection.action.siteRemove= Site Removed
-InstallConfigurationPage.ActivitySection.action.unconfigure= Disabled
-InstallConfigurationPage.ActivitySection.action.unknown= Unknown
-InstallConfigurationPage.ActivitySection.status.ok = Success
-InstallConfigurationPage.ActivitySection.status.nok = Failure
-InstallConfigurationPage.ActivitySection.action.revert = Revert
-InstallConfigurationPage.ActivitySection.action.reconcile = Reconcile
-InstallConfigurationPage.ActivitySection.action.addpreserved = Preserved
-
-InstallConfigurationPage.RevertSection.title =Configuration Reversal
-InstallConfigurationPage.RevertSection.desc=You can revert from the current \
-to any of the compatible previous configurations. Configurations are \
-compatible if they are not separated by a full system reconcilation in the \
-timeline. Note that the reversal \
-will be only partial if some of the features that are part of the \
-desired configuration have since been deleted.
-
-InstallConfigurationPage.PreserveSection.title = Saving the Configuration
-InstallConfigurationPage.PreserveSection.text= <form><p>\
-Configurations can be saved so that they can be restored at a later date. \
-Saved configurations appear in <b>Saved Configurations</b> folder \
-in the <img href="image"/> <a href="link">Install Configuration</a> view.\
-</p></form>
-InstallConfigurationPage.PreserveSection.preserveText = To save this configuration, press:
-InstallConfigurationPage.PreserveSection.preserveButton = Save
-
-InstallConfigurationPage.RevertSection.currentText=This is the current configuration.
-InstallConfigurationPage.RevertSection.revertText= \ To revert to the previous one, press:
-InstallConfigurationPage.RevertSection.revertButton=Revert
-InstallConfigurationPage.RevertSection.restoreText=To restore this configuration, press:
-InstallConfigurationPage.RevertSection.restoreButton=Restore
-InstallConfigurationPage.RevertSection.dialog.title=Revert/Restore configuration.
-InstallConfigurationPage.RevertSection.dialog.message=The configuration has been successfully \
-restored. You will need to restart the workbench for the changes to take effect. \
-Would you like to restart the workbench now?
-
-
-Revert.ProblemDialog.title = Restore Problems
-
-BaseView.Popup.ShowDetails = Show &Details
-
-MyComputer.label = My Computer
-MyComputerPage.title= My Computer - {0}
-MyComputerPage.desc = Browse the file system in order to find a valid update site.
-
-ExtensionRootPage.title = Product Extension Directory
-ExtensionRootPage.desc = <p>Product extension directory is a file system directory \
-that is marked as <b>extension root.</b> Extension roots contain plug-ins \
-that are designed to augment other applications when they link \
-these directories into their configurations.</p>\
-<p>You can link this extension root to your application by selecting \
-<b>Link Product Extension</b> from the pop-up menu for this object.</p>
-
-VolumeLabelProvider.cdrom = Compact Disc
-VolumeLabelProvider.floppy3 = 3.5 Floppy
-VolumeLabelProvider.floppy5 = 5.25 Floppy
-VolumeLabelProvider.localDisk = Local Disc
-
-CategoryPage.title = Category
-CategoryPage.moreInfo = More Info
-
-FeaturePage.provider = Provider
-FeaturePage.version = \nVersion
-FeaturePage.installedVersion = \nInstalled Version
-FeaturePage.pendingVersion = {0} (changes pending)
-FeaturePage.size = \nDownload Size
-FeaturePage.estimate = \nEstimate Download Time
-FeaturePage.os = Operating System
-FeaturePage.ws = \nWindowing System
-FeaturePage.nl = \nSupported Languages
-FeaturePage.arch = \nSupported Operating System Architecture
-FeaturePage.platforms = Supported Platforms
-FeaturePage.all = All
-FeaturePage.description = \nDescription
-FeaturePage.infoLink = More Info
-FeaturePage.licenseLink = License
-FeaturePage.copyrightLink = Copyright
-FeaturePage.notInstalled = Not Installed
-FeaturePage.sizeValue = {0} KB
-FeaturePage.estimateValue = {0} Hours {1} minutes
-FeaturePage.minuteEstimateValue = Less than one minute
-FeaturePage.unknownSizeValue = Unknown Size
-FeaturePage.unknownEstimateValue = Unknown Download Time
-FeaturePage.doButton.uninstall = Uninstall Now
-FeaturePage.doButton.unconfigure = Disable Now
-FeaturePage.doButton.configure = Enable Now
-FeaturePage.doButton.update = Update Now
-FeaturePage.doButton.install = Install Now
-FeaturePage.doButton.repair = Repair Now
-FeaturePage.doButton.change = Change Now
-FeaturePage.disabledVersion = (disabled)
-
-FeaturePage.batchButton.unconfigure = Disable by adding to the Selected Updates.
-FeaturePage.batchButton.configure = Enable by adding to the Selected Updates.
-FeaturePage.batchButton.repair = Repair by adding to the Selected Updates.
-FeaturePage.batchButton.change = Change by adding to the Selected Updates.
-FeaturePage.batchButton.update = Update by adding to the Selected Updates.
-FeaturePage.batchButton.install = Install by adding to the Selected Updates.
-FeaturePage.batchButton.uninstall = Uninstall by adding to the Selected Updates.
-FeaturePage.batch = Group Updates
-FeaturePage.selectedUpdates = Selected Updates
-
-FeaturePage.dialog.utitle = Uninstall
-FeaturePage.dialog.title = Install
-FeaturePage.dialog.ctitle = Enable
-FeaturePage.dialog.uctitle = Disable
-
-FeaturePage.duplicatesEnabled.title = Conflict Warning
-FeaturePage.duplicatesEnabled.message = Another version of this feature is already enabled.
-
-FeaturePage.missing.title = Missing Plug-ins
-FeaturePage.missing.message = The feature you want to install requires plug-ins \
-that cannot be found in the current configuration. You can search for features that \
-contain required plug-ins and install them before this one or abort.
-
-FeaturePage.missing.search = &Search
-FeaturePage.missing.abort = &Abort
-FeaturePage.missing.searchObjectName = Missing plug-ins of {0}
-
-FeaturePage.optionalInstall.message = Feature cannot be found using {0}.
-FeaturePage.optionalInstall.title = Optional Install
-
-ActivityConstraints.rootMessage = Requested operation cannot be performed because it would invalidate the current configuration. See details for more information.
-ActivityConstraints.rootMessageInitial = Current configuration contains errors that are not corrected by the requested operation. See details for more information.
-ActivityConstraints.platform = Resulting configuration does not contain the platform.
-ActivityConstraints.primary = Resulting configuration does not contain the primary feature.
-ActivityConstaints.prereq.plugin = plug-in
-ActivityConstaints.prereq.feature = feature
-ActivityConstraints.prereq = Feature requires {0} "{1}".
-ActivityConstraints.prereqPerfect = Feature requires {0} "{1} ({2})".
-ActivityConstraints.prereqEquivalent = Feature requires {0} "{1} ({2})", or equivalent.
-ActivityConstraints.prereqCompatible = Feature requires {0} "{1} ({2})", or compatible.
-ActivityConstraints.prereqGreaterOrEqual = Feature requires {0} "{1} ({2})", or later version.
-ActivityConstraints.os = Feature operating system does not match current environment.
-ActivityConstraints.ws = Feature windowing system does not match current environment.
-ActivityConstraints.arch = Feature platform architecture does not match current environment.
-ActivityConstraints.cycle = Feature definition contains a nested features cycle.
-ActivityConstraints.conflict = Update conflict detected (see details). Please deselect this update and try again.
-ActivityConstraints.childMessage = {0} ({1}): {2}
-ActivityConstraints.optionalChild = Feature included in another feature cannot be enabled if the parent is disabled. Enable the parent first.
-ActivityConstraints.patchRegression = Included feature "{0} ({1})" is older than the currently active feature.
-ActivityConstraints.patchUnconfigure = This feature is a patch and cannot be directly disabled. Use 'Revert' to restore \
-the last configuration before the patch was installed.
-ActivityConstraints.patchUnconfigureBackup = This feature is a patch and cannot be directly disabled. Use 'Revert' to restore \
-configuration "{0}" in Saved Configurations.
-ActivityConstraints.patchMissingTarget = Older version of feature "{0} ({1})" must be present for a patch to be applied.
-ActivityConstraints.timeline = Cannot revert to "{0}" because it is not compatible with the current configuration.
-ActivityConstraints.exclusive = The feature must be processed separately from other features.
-ActivityConstraints.noLicense = The feature does not have a valid license agreement.
-
-DetailsView.home.label=Go Home
-DetailsView.backward.label=Go Backward
-DetailsView.forward.label=Go Forward
-
-DetailsView.home.tooltip=Go to the Update Manager home page
-DetailsView.backward.tooltip=Go Back
-DetailsView.forward.tooltip=Go Forward
-
-InfoGroup.plainTextVersion = Plain Text Version
-InfoGroup.htmlVersion = HTML Version
-
-InstallableSitePage.title = Install Location
-InstallableSitePage.desc = <form><p>\
-Install location is the place on your disk where features are \
-installed. A <b>product</b> location is always present. <b>Extension</b> \
-location can be installed when the base product is extended by another \
-product. When \
-installed using Update Manager, features can be placed in a different \
-folder in the file system. The folder then becomes <b>user</b> location.</p>\
-<p>Install location can be enabled or disabled as a whole. When \
-a disabled location is enabled, previous feature states are restored.</p>\
-</form>
-InstallableSiteForm.url = URL
-InstallableSiteForm.type = \nType
-InstallableSiteForm.type.product = Product
-InstallableSiteForm.type.extension = Product Extension
-InstallableSiteForm.type.private = User
-InstallableSiteForm.state = \nState
-InstallableSiteForm.stateButton.disable = Disable
-InstallableSiteForm.stateButton.enable = Enable
-InstallableSiteForm.stateLabel.enabled = This location is currently enabled.
-InstallableSiteForm.stateLabel.disabled = This location is currently disabled.
-
-LocalSitePage.title = Current Configuration
-ConfigurationView.current = Current Configuration
-ConfigurationView.showUnconfFeatures = Show Disabled Features
-ConfigurationView.showUnconfFeatures.tooltip = Show Disabled Features
-ConfigurationView.Popup.restore = &Restore
-ConfigurationView.Popup.preserve = &Save
-ConfigurationView.Popup.removePreserved=&Remove
-ConfigurationView.Popup.unlink = &Unlink
-ConfigurationView.Popup.showStatus = Sho&w Status...
-ConfigurationView.historyFolder = Configuration History
-ConfigurationView.savedFolder = Saved Configurations
-ConfigurationView.statusTitle = Feature Status
-ConfigurationView.statusDefault = The feature is configured properly.
-ConfigurationView.missingFeature = {0} (not installed)
-ConfigurationView.missingOptionalStatus = This optional feature is currently not installed.
-ConfigurationView.missingStatus = Referenced feature not found.
-ConfigurationView.savingErrors = Errors while saving the selected configurations.
-ConfigurationView.loading = Loading:\
-
-HomePage.title = Welcome to Eclipse Update
-
-HomePage.updates.title= Feature Updates
-HomePage.updates.desc=<form><p>To check for updates for features you \
-have installed, go to <img href="image1"/> <a href="action1">Feature Updates</a> and select \
-<b>Available Updates</b>. <b>Search</b> page will \
-be shown allowing you to initiate and customize the search.</p></form>
-
-HomePage.installs.title = Installing New Features
-HomePage.installs.desc = <form><p>To install new features, open \
-<img href="image1"/> <a href="action1">Feature Updates</a> view and expand the desired site \
-(this operation may take time). Select features and read about \
-them in the <b>Preview</b>.</p>\
-<p>If you have a removable device (e.g. a CD-ROM) that contains updates, \
-you can navigate to them from <b>My Computer</b> object. You can also create \
-configurable searches in order to locate features that match a specific query. To \
-create a search, select <b>New</b>, <b>Search...</b> from the pop-up menu in <b>Feature Updates</b></p></form>
-
-HomePage.uninstalls.title = Working With Installed Features
-HomePage.uninstals.desc = <form><p>Features that have been previously installed can be \
-<b>disabled</b> to make them invisible to you application, or re-<b>enabled</b> to make \
-them visible again. Disabled features are still physically present on your computer.</p>\
-<p>To view the currently enabled features, expand <b>Current Configuration</b> object in \
-<img href="image1"/> <a href="action1">Install Configurations</a> view.</p></form>
-
-HomePage.history.title = Installation History
-HomePage.history.desc = <form><p>The history of your activity is kept in the <b>installation history</b>. \
-You can review it by expanding <b>History</b> folder in the <a href="action1">Install Configurations</a> view. \
-Only a limited number of history objects are kept. You can preserve stable configurations \
-in order to be able to recreate them at a later date.</p></form>
-
-NewSiteDialog.title = New Site Bookmark
-NewSiteDialog.url = &Site URL:
-NewSiteDialog.name = Site &Name:
-
-NewFolderDialog.title = New Folder
-NewFolderDialog.name= &Folder Name:
-
-NewSearchDialog.title = New Search
-NewSearchDialog.name = &Search Name:
-NewSearchDialog.category = Search &Category:
-
-ConfirmDelete.title = Confirm Delete
-ConfirmDelete.multiple = Are you sure you want to delete these {0} items?
-ConfirmDelete.single = Are you sure you want to delete "{0}"?
-
-SiteBookmarkPropertyPage.name = &Name:
-SiteBookmarkPropertyPage.address = A&ddress:
-SiteBookmarkPropertyPage.updateSite = &Update site
-SiteBookmarkPropertyPage.webSite = &Web site
-NamedObjectPropertyPage.name = &Name:
-NamedObjectPropertyPage.exists = "{0}" already exists.
-ConfigurationPropertyPage.name = &Configuration Name:
-SiteCategory.other.label = Other
-SiteCategory.other.description = Features found under this category are either not categorized or their categories could not be found on server.
-
-SiteBookmarkPropertySource.url.label=Site URL
-SiteBookmarkPropertySource.url.desc=a URL of the update site
-SiteBookmarkPropertySource.name.label=Site name
-SiteBookmarkPropertySource.name.desc=a display name of the update site
-
-SitePage.desc = <form><p>Expand the site folder to browse the \
-features available for download. By default, features are categorized if \
-category information exists on the site.</p><p>To view features in \
-a flat list, uncheck <b>Show Site Categories</b> option available on \
-the pull-down menu of the <img href="updateSites"/> <b>Feature Updates</b> view.</p>\
-<p>Features can be designed to work on certain platforms only. These features \
-will not show up in the <b>Feature Updates</b> view unless you uncheck \
-<b>Show Matching Features Only</b> option on the same pull-down menu.\
-</p></form>
-SitePage.link = Site home page
-
-SitePage.wdesc = <form>\
-<p>The Web site bookmark can be used to preserve addresses of regular \
-Web sites. When opened, Web site bookmark will open into the currently \
-configured Web browser.\
-</p></form>
-SitePage.wlink = Open Web site
-
-UpdatesView.Popup.new=&New
-UpdatesView.Popup.newSite = Site &Bookmark...
-UpdatesView.Popup.newFolder = &Folder...
-UpdatesView.Popup.newSearch = &Search...
-UpdatesView.Popup.newLocalSite = Bookmark &Location...
-UpdatesView.Popup.delete = &Delete
-UpdatesView.Popup.openWeb = &Open
-UpdatesView.Popup.cut = Cu&t
-UpdatesView.Popup.copy = &Copy
-UpdatesView.Popup.paste = &Paste
-UpdatesView.Popup.refresh = &Refresh
-UpdatesView.Popup.refresh.tooltip = Refresh
-UpdatesView.Popup.showSearchResult = &Show Search Results
-UpdatesView.Popup.linkExtension = Link Product &Extension
-UpdatesView.menu.showFiles = &Show My Computer Files
-UpdatesView.menu.showCategories = Show Site &Categories
-UpdatesView.menu.filterEnvironment = Show &Matching Features Only
-UpdatesView.newSearch.title = New Search
-UpdatesView.newBookmark.title = New Site Bookmark
-UpdatesView.newFolder.title = New Folder
-UpdatesView.connecting = Connecting...
-UpdatesView.updating = Updating...
-
-SearchResultView.column.feature = Feature
-SearchResultView.column.provider = Provider
-SearchResultView.column.site = Site
-SearchResultView.column.version = Version
-SearchResultView.column.size = Size
-SearchResultView.column.sizeUnknown = N/A
-SearchResultView.title = {0} - {1} ({2})
-SearchResultView.showSearch.label = &Show Search Page
-SearchResultView.showSearch.tooltip = Show Search Page
-
-ItemsView.title = {0} ({1} tasks, {2} completed)
-ItemsView.popup.delete = D&elete
-ItemsView.popup.process = &Process
-ItemsView.popup.processAll = Process &All
-
-DiscoveryFolder = Sites to Visit
-DiscoveryFolderPage.title = Sites to Visit
-DiscoveryFolderPage.desc = This folder contains links to the update sites provided by features \
-installed in this application. Feature providers include them to let you know about sites \
-that contain features you might want to try out.
-
-BaseNewWizardPage.name = &Name:
-BaseNewWizardPage.createIn = &Create in:
-BaseNewWizardPage.existing = &Existing folders:
-BaseNewWizardPage.invalid = Container path is invalid
-BaseNewWizardPage.missingName = Name must be specified.
-
-NewFolderWizardPage.title = Create New Folder
-NewFolderWizardPage.desc = You can \
-choose an existing folder as a container or create a new root folder.
-
-NewSearchWizardPage.title = New Feature Search
-NewSearchWizardPage.desc = Create a new search for features. Use folders to organize \
-your search objects.
-NewSearchWizardPage.category = Cate&gory:
-
-NewSiteBookmarkWizardPage.title = New Update Site Bookmark
-NewSiteBookmarkWizardPage.desc = Bookmark an update site. Use folders to organize \
-your bookmarks.
-NewSiteBookmarkWizardPage.url = &URL:
-NewSiteBookmarkWizardPage.http = http://
-NewSiteBookmarkWizardPage.invalid = Invalid URL format
-NewSiteBookmarkWizardPage.type = Bookmark type:
-NewSiteBookmarkWizardPage.updateType = Ec&lipse update site
-NewSiteBookmarkWizardPage.webType = &Web site
-
-UpdatesPage.title = Available Updates
-SearchPage.title = Search
-SearchPage.lastSearch = Last search: {0}
-SearchPage.noLastSearch = Last search: n/a
-SearchPage.searchNow = Search Now
-SearchPage.cancel = Cancel
-SearchPage.desc=<form><p>Search the update sites for features using various search criteria.\
-</p></form>
-SearchPage.query.label= Query Settings
-SearchPage.query.category= Search Category:
-SearchPage.options.label = Scope Settings
-SearchPage.options.myComputerCheck = Include My Computer in the search
-SearchPage.options.myComputerSettings.title = Search Settings
-SearchPage.options.myComputerSettings = Settings...
-SearchPage.options.fullModeCheck = Show results in extended form
-SearchPage.options.bookmarkCheck = Search bookmarked sites
-SearchPage.options.discoveryCheck = Search sites in "Sites to Visit" folder
-SearchPage.options.filterCheck = Only include features applicable to this environment
-
-MyComputerSearchDialog.label = Select the volumes that should be searched:
-
-ExpressionSearchCategory.expression = Expression:
-ExpressionSearchCategory.case = Case sensitive
-ExpressionSearchCategory.look = Look for expression in:
-ExpressionSearchCategory.name = Feature name
-ExpressionSearchCategory.provider = Feature provider
-ExpressionSearchCategory.description = Feature description
-
-UpdatesSearchCategory.currentSearch = Available Feature Updates
-PluginSearchCategory.new = Add...
-PluginSearchCategory.new.title = New Plug-in
-PluginSearchCategory.delete = Delete
-
-AvailableUpdates.name = Available Updates
-Search.begin = Searching for updates:
-Search.myComputer = Scanning My Computer:
-Search.contacting = Contacting site "{0}" ...
-Search.checking = Searching "{0}"...
-
-UpdatesPage.SearchResultSection.title = Search Results
-UpdatesPage.SearchResultSection.desc = The following features satisfy the search criteria ({0}):
-UpdatesPage.SearchResultSection.nodesc = No features found.
-UpdatesPage.SearchResultSection.startdesc = Search in progress ...
-UpdatesPage.SearchResultSection.resultEntry = \
-<form><p><a href="openFeature">{0}</a></p>\
-<p>Provider: <b>{1}</b></p>\
-<p addVerticalSpace="false">Found at: <a href="openSite">{2}</a></p>\
-{3}\
-</form>
-
-BrowserPage.address = Address:
-BrowserPage.stop = Stop
-BrowserPage.go = Go
-BrowserPage.refresh = Refresh
-
-WebBrowserView.notAvailable = Embedded Web browser is not available. \
-Requiests for opening URLs are processed using Web browser registered to handle \
-Web pages on your system.
-WebBrowserView.address = Address:
-WebBrowserView.stop = Stop
-WebBrowserView.go = Go
-WebBrowserView.refresh = Refresh
-WebBrowserView.backward = Go Back
-WebBrowserView.forward = Go Forward
-
-
-NewUpdates.noUpdates.title = New Updates
-NewUpdates.noUpdates.message = There are no new updates for the installed features. \
-Note that the settings in the Preferences (Install/Update page) affect \
-the search results.
-NewUpdatesWizard.installing = Installing updates...
-NewUpdatesWizard.MainPage.title = Available Updates
-NewUpdatesWizard.MainPage.tableLabel = Available &updates (see Preferences for search constraints):
-NewUpdatesWizard.MainPage.desc = New updates have been found for the installed features. \
-Select the updates you want to install.
-NewUpdatesWizard.MainPage.selectAll = &Select All
-NewUpdatesWizard.MainPage.deselectAll = Deselect &All
-NewUpdatesWizard.MainPage.moreInfo = &More Info
-NewUpdatesWizard.MainPage.column.feature = Feature
-NewUpdatesWizard.MainPage.column.version = Version
-NewUpdatesWizard.MainPage.column.provider = Provider
-NewUpdatesWizard.MainPage.column.size = Size
-NewUpdatesWizard.MainPage.column.sizeUnknown = N/A
-NewUpdatesWizard.MainPage.featureDesc = &Description:
-NewUpdatesWizard.MainPage.counter = {0} out of {1} selected.
-
-NewUpdatesWizard.MainPage.filterCheck = Fil&ter features included in other features on the list
-NewUpdatesWizard.MainPage.duplicateWarning = Some of the selected features are already contained in others. Use filter button to avoid duplicates.
-
-InstallWizard.wtitle = Install
-InstallWizard.LicensePage.title = Feature License
-InstallWizard.LicensePage.desc = This feature has a license \
-agreement that you need to accept before proceeding with \
-the installation.
-InstallWizard.LicensePage.desc2 = Some of the features have license \
-agreements that you need to accept before proceeding with \
-the installation.
-InstallWizard.LicensePage.up=&Previous License
-InstallWizard.LicensePage.down=Next &License
-InstallWizard.LicensePage.header={0} out of {1}: {2} ({3})
-InstallWizard.LicensePage.accept = I &accept the terms in the license agreement
-InstallWizard.LicensePage.decline = I &do not accept the terms in the license agreement
-InstallWizard.LicensePage.accept2 = I &accept the terms in the license agreements
-InstallWizard.LicensePage.decline2 = I &do not accept the terms in the license agreements
-
-InstallWizard.ReviewPage.title = Feature Install
-InstallWizard.ReviewPage.desc =This wizard helps you install \
-new, update or uninstall existing features of your product.
-InstallWizard.ReviewPage.about.install = You are about to install the following feature:
-InstallWizard.ReviewPage.about.uninstall = You are about to uninstall the following feature:
-InstallWizard.ReviewPage.about.unconfigure = You are about to disable the following feature:
-InstallWizard.ReviewPage.about.configure = You are about to enable the following feature:
-InstallWizard.ReviewPage.name = Name:
-InstallWizard.ReviewPage.provider = Provider:
-InstallWizard.ReviewPage.version = Version:
-InstallWizard.ReviewPage.correct.install = \nIf that is correct, select Next to continue.
-InstallWizard.ReviewPage.correct.uninstall = \nIf that is correct, select Finish.
-
-InstallWizard.TargetPage.title = Install Location
-InstallWizard.TargetPage.desc = Choose the location where the feature will be installed.
-InstallWizard.TargetPage.new = &Add...
-InstallWizard.TargetPage.delete = &Remove
-InstallWizard.TargetPage.requiredSpace = Required space:
-InstallWizard.TargetPage.availableSpace = Free space:
-InstallWizard.TargetPage.location = Target Location
-InstallWizard.TargetPage.location.message = Select a new install location
-InstallWizard.TargetPage.location.empty = Target install location must be selected. If none is available, create a new one.
-InstallWizard.TargetPage.location.exists = Target location already exists.
-InstallWizard.TargetPage.location.error.title = Invalid Location
-InstallWizard.TargetPage.location.error.message = The selected location cannot be used to install features: {0}
-InstallWizard.TargetPage.location.error.reason = Reason: {0}
-InstallWizard.TargetPage.size = {0}KB
-InstallWizard.TargetPage.unknownSize = Unknown
-
-InstallWizard.OptionalFeaturesPage.title= Optional Features
-InstallWizard.OptionalFeaturesPage.desc = Some of the features that are included in this feature are optional.
-InstallWizard.OptionalFeaturesPage.treeLabel = &Available optional features:
-InstallWizard.OptionalFeaturesPage.selectAll = &Select All
-InstallWizard.OptionalFeaturesPage.deselectAll = &Deselect All
-
-InstallWizard.error.unable=Unable to locate configuration site for the feature
-InstallWizard.error.old= Error while updating the old feature version
-InstallWizard.savedConfig = {0} backup
-
-InstallDeltaWizard.wtitle = Configuration Changes
-InstallDeltaWizard.processing = Processing pending changes:
-InstallDeltaWizard.title = Pending Configuration Changes
-InstallDeltaWizard.desc = Check the changes you wish to process now. Remove changes that should never be processed.
-InstallDeltaWizard.label = Detected &changes:
-InstallDeltaWizard.delete = &Remove
-InstallDeltaWizard.errors = &Error Details...
-InstallDeltaWizard.message = Selected update will result in an invalid configuration.
-
-DuplicateConflictsDialog.title = Duplicate Conflicts
-DuplicateConflictsDialog.message = If you continue with the update/install, \
-the resulting configuration will contain duplication conflicts \
-that may cause parts of the product to be unusable. Do you want to \
-continue?
-DuplicateConflictsDialog.treeLabel = &Detected conflicts:
-DuplicateConflictsDialog.conflict = Version {0} in {1}
-
-MainPreferencePage.description = General settings for Install/Update Manager.
-MainPreferencePage.checkSignature = Check digital &signatures of downloaded archives
-MainPreferencePage.historySize = &Maximum number of 'History' configurations:
-MainPreferencePage.browserChoice = Web browser to use
-MainPreferencePage.browserChoice.embedded = &Embedded browser
-MainPreferencePage.browserChoice.system = De&fault system browser
-MainPreferencePage.updateVersions = Valid updates
-MainPreferencePage.updateVersions.equivalent = e&quivalent (1.0.1 -> 1.0.2 - only service increments)
-MainPreferencePage.updateVersions.compatible = &compatible (1.0.9 -> 1.1.0 - service and minor increments)
-MainPreferencePage.topicColor = Section &title color:
-MainPreferencePage.proxyGroup = Proxy settings
-MainPreferencePage.enableHttpProxy = E&nable HTTP proxy connection
-MainPreferencePage.httpProxyHost = &HTTP proxy host address:
-MainPreferencePage.httpProxyPort = HTTP &proxy host port:
-MainPreferencePage.digitalSignature.title = Digital Signature Check
-MainPreferencePage.digitalSignature.message = You have chosen to disable digital signature \
-checks for downloaded archives. Note that unsigned archives may \
-contain software that can harm your computer.
-
-AppServerPreferencePage.description = Settings for Update Web service:
-AppServerPreferencePage.masterSwitch = Accept &Internet connections for the Web-triggered updates
-AppServerPreferencePage.encodeURLs = &Encode local host and port in URLs passed to the browser
-
-JarVerificationDialog.wtitle = Jar Verification
-JarVerificationDialog.Title= Feature verification
-JarVerificationDialog.Verification=Verification
-JarVerificationDialog.ComponentNotInstalled=This feature will not be installed.
-
-JarVerificationDialog.AboutToInstall.File=Warning: You are about to install an unsigned feature file.
-JarVerificationDialog.NotDigitallySigned.File= Warning: This feature file has not been digitally signed.
-JarVerificationDialog.CannotVerifyProvider.File=The provider of this feature file cannot be verified.
-JarVerificationDialog.CorruptedContent.File=The content of this feature file has been corrupted
-JarVerificationDialog.SignedComponent.File=You are about to install a signed feature file.
-JarVerificationDialog.UnknownCertificate.File=The certificates used to authenticate this feature file are not recognized.
-JarVerificationDialog.UnableToVerifyProvider.File=The provider of this feature file cannot be verified.
-JarVerificationDialog.ProviderKnown.File=The provider of this feature file has been validated by a trusted third party.
-JarVerificationDialog.KnownCertificate.File=One of the certificates used to authenticate this feature file was recognized.
-
-JarVerificationDialog.AboutToInstall.Feature=Warning: You are about to install an unsigned feature.
-JarVerificationDialog.NotDigitallySigned.Feature= Warning: This feature has not been digitally signed.
-JarVerificationDialog.CannotVerifyProvider.Feature=The provider of this feature cannot be verified.
-JarVerificationDialog.CorruptedContent.Feature=The content of this feature has been corrupted
-JarVerificationDialog.SignedComponent.Feature=You are about to install a signed feature.
-JarVerificationDialog.UnknownCertificate.Feature=The certificates used to authenticate this feature are not recognized.
-JarVerificationDialog.UnableToVerifyProvider.Feature=The provider of this feature cannot be verified.
-JarVerificationDialog.ProviderKnown.Feature=The provider of this feature has been validated by a trusted third party.
-JarVerificationDialog.KnownCertificate.Feature=One of the certificates used to authenticate this feature was recognized.
-
-JarVerificationDialog.Caution=\r\nCaution: \"{0}\" asserts that the content of this feature is safe. \r\nYou should only install this feature if you trust \"{0}\" to make that assertion
-JarVerificationDialog.FileName=File Identifier:
-JarVerificationDialog.FeatureName=Feature name:
-JarVerificationDialog.FeatureIdentifier=Feature Identifier:
-JarVerificationDialog.Provider= Provider:
-JarVerificationDialog.MayChooseToInstall=You may choose to install the feature or cancel its installation.
-JarVerificationDialog.MayChooseToContinue=You may choose to continue to install the feature or cancel its installation.
-JarVerificationDialog.Install=&Install
-JarVerificationDialog.Continue=C&ontinue
-JarVerificationDialog.Cancel=&Cancel
-JarVerificationDialog.RootCA= According to:
-JarVerificationDialog.SubjectCA= File signed by:
-JarVerificationDialog.CertificateInfo= Certificate:
-
-UserVerificationDialog.PasswordRequired=Password Required
-UserVerificationDialog.EnterNameAndPassword=Enter user name and password for:
-UserVerificationDialog.Domain=At the following domain:
-UserVerificationDialog.Password=Password:
-UserVerificationDialog.UserName=User name:
-
-NewPluginEntryDialog.id=&Plug-in Id:
-NewPluginEntryDialog.version=Plug-in &Version:
-
-InstallConfigurationPage.RevertSection.confirm.message=Are you sure you want to revert to this configuration?
-Search.networkProblems=Network connection problems encountered during search.
-MissingFeature.id=unknown
-MissingFeature.desc.unknown=This feature reference cannot be resolved.
-MissingFeature.desc.optional=This feature is referenced as optional and is currently not installed.
-MissingFeature.provider=Unknown
-
-UpdatesDropAdapter.nameConflict = Name Conflict
-RenameDialog.label = &Enter a new name for this object:
-RenameDialog.exists = Object ''{0}'' already exists.
-
-MultiInstallWizard.wtitle = Install
-MultiInstallWizard.MultiReviewPage.title = Update Tasks
-MultiInstallWizard.MultiReviewPage.desc = This wizard helps you install \
-new, update or uninstall existing features of your product.
-MultiInstallWizard.MultiReviewPage.c.task = Task
-MultiInstallWizard.MultiReviewPage.c.feature = Feature
-MultiInstallWizard.MultiReviewPage.c.version = Version
-MultiInstallWizard.MultiReviewPage.c.provider = Provider
-MultiInstallWizard.MultiReviewPage.counter = {0} of {1} selected.
-MultiInstallWizard.MultiReviewPage.filterCheck = &Filter features included in other features on the list
-
-MultiInstallWizard.TargetPage.title = Install Location
-MultiInstallWizard.TargetPage.desc = Choose the location where the features will be installed.
-MultiInstallWizard.TargetPage.jobsLabel = &Features to install:
-MultiInstallWizard.TargetPage.siteLabel = &Target sites (selected site will be used for the feature selected above):
-MultiInstallWizard.TargetPage.new = &Add...
-MultiInstallWizard.TargetPage.delete = &Remove
-MultiInstallWizard.TargetPage.requiredSpace = Required space:
-MultiInstallWizard.TargetPage.availableSpace = Free space:
-MultiInstallWizard.TargetPage.location = Target Location
-MultiInstallWizard.TargetPage.location.message = Select a new install location
-MultiInstallWizard.TargetPage.location.empty = Target install location must be selected. If none is available, create a new one.
-MultiInstallWizard.TargetPage.location.exists = Target location already exists.
-MultiInstallWizard.TargetPage.location.error.title = Invalid Location
-MultiInstallWizard.TargetPage.location.error.message = The selected location cannot be used to install features: {0}
-MultiInstallWizard.TargetPage.location.error.reason = Reason: {0}
-MultiInstallWizard.TargetPage.size = {0}KB
-MultiInstallWizard.TargetPage.unknownSize = Unknown
-
-MultiInstallWizard.installing = Initializing...
-MultiInstallWizard.error.unable={0}: unable to locate configuration site
-MultiInstallWizard.error.old= {0}: Error while updating the old feature version
-MultiInstallWizard.savedConfig = {0} backup
-
-SiteStateAction.disableLabel=Disable
-SiteStateAction.enableLabel=Enable
-SiteStateAction.enableMessage=Do you want to enable features in "{0}"?
-SiteStateAction.disableMessage=Do you want to disable all the features in "{0}"?
-SiteStateAction.dialogTitle=Update Manager
-
-SiteBookmark.connecting = Connecting to "{0}"...
-SiteBookmark.downloading = Downloading:\
-
-MultipleSelectionForm.title = Multiple Selection
-MultipleSelectionForm.counter = {0} items selected.
-DeltaFeatureAdapter.shortName = {0} ({1})
-DeltaFeatureAdapter.longName = {0} ({1}) in {2}
-InstallServlet.unknownServerURL=Update server URL is unknown.
-InstallServlet.noFeatures=No features to install.
-InstallServlet.incorrectURLFormat=Update server URL has incorrect format: {0}
-InstallServlet.contactWebmaster=Contact Web master that maintains the page that initiated this operation.
-InstallServlet.multipleInstall=Multiple feature install not supported.
-InstallServlet.alreadyInstalled=The feature is already installed.
-InstallServlet.alreadyHaveIt=Nothing - you already have it.
-InstallServlet.inProgress = Another install session is already in progress.
-InstallServlet.olderFeature=The feature is older than the one already installed
-InstallServlet.nothing2=Nothing - update can only install features that you do not have or that are updates to the one already installed.
-DetailsForm.locatingFeature=Locating feature on the server...
-DetailsForm.downloadingInfo=Downloading feature information...
-DetailsForm.featureAPatch=This feature is a patch and cannot be directly disabled. Locate a configuration before it was installed and revert to it instead.
-DetailsForm.disableFeature.title=Disable Feature
-ServletsUtil.responseTitle=Eclipse Install
-ServletsUtil.updateFailed=Web update failed
-ServletsUtil.problem=Problem
-ServletsUtil.whatToDo=What you can do
-ServletsUtil.updateInProgress=Web Update in progress
-ServletsUtil.updateInitiated=Web update has been initiated. You should see install wizard being open from the running Eclipse window.
-ServletsUtil.back=Back
-ConfigurationPropertyPage.invalidCharacter=Configuration label cannot start with a ''@''
-DetailsForm.downloadingIncluded = Downloading complete feature information...
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/WebInstallHandler.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/WebInstallHandler.java
deleted file mode 100644
index 4709276..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/WebInstallHandler.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui;
-
-import java.net.URLEncoder;
-
-import org.eclipse.update.internal.ui.preferences.AppServerPreferencePage;
-
-
-/**
- * This is a utility class used find information about the update
- * web application (handling web-triggered requests)
- *
- * @since 2.0
- */
-public abstract class WebInstallHandler {
-
- /**
- * Returns the host identifier for the web application server
- * listener for install requests
- *
- * @return host identifier, or <code>null</code> if web application
- * server is not available
- * @since 2.0
- */
- public static String getWebAppServerHost() {
- return UpdateUI.getDefault().getAppServerHost();
- }
-
- /**
- * Returns the port identifier for the web application server
- * listener for install requests
- *
- * @return port identifier, or <code>0</code> if web application
- * server is not available
- * @since 2.0
- */
- public static int getWebAppServerPort() {
- return UpdateUI.getDefault().getAppServerPort();
- }
-
- public static String getEncodedURLName(String urlName) {
- if (AppServerPreferencePage.getUseApplicationServer() == false
- || AppServerPreferencePage.getEncodeURLs() == false)
- return urlName;
- return encode(urlName);
- }
-
- private static String encode(String urlName) {
- String callbackURL = getCallbackURLAsString();
- if (callbackURL == null)
- return urlName;
- String callbackParameter = "updateURL=" + callbackURL;
- if (urlName.indexOf('?') != -1)
- return urlName + "&" + callbackParameter;
- else
- return urlName + "?" + callbackParameter;
- }
-
- /**
- * Returns the callback URL (as string) to be passed to the web page
- * containing install triggers.
- *
- * @return callback URL as string
- * @since 2.0
- */
- public static String getCallbackURLAsString() {
- String host = getWebAppServerHost();
- int port = getWebAppServerPort();
- if (host == null || port == 0)
- return null;
- else {
- String value =
- "http://"
- + host
- + ":"
- + port
- + "/"
- + UpdateUI.WEB_APP_ID
- + "/install";
- return URLEncoder.encode(value);
- }
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/ActivityConstraints.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/ActivityConstraints.java
deleted file mode 100644
index 2d02340..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/ActivityConstraints.java
+++ /dev/null
@@ -1,1362 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.forms;
-
-import java.util.*;
-
-import org.eclipse.core.boot.BootLoader;
-import org.eclipse.core.runtime.*;
-import org.eclipse.update.configuration.*;
-import org.eclipse.update.core.*;
-import org.eclipse.update.internal.ui.UpdateUI;
-import org.eclipse.update.internal.ui.model.PendingChange;
-
-/**
- *
- */
-public class ActivityConstraints {
- private static final String KEY_ROOT_MESSAGE =
- "ActivityConstraints.rootMessage";
- private static final String KEY_ROOT_MESSAGE_INIT =
- "ActivityConstraints.rootMessageInitial";
- private static final String KEY_CHILD_MESSAGE =
- "ActivityConstraints.childMessage";
- private static final String KEY_PLATFORM = "ActivityConstraints.platform";
- private static final String KEY_PRIMARY = "ActivityConstraints.primary";
- private static final String KEY_OS = "ActivityConstraints.os";
- private static final String KEY_WS = "ActivityConstraints.ws";
- private static final String KEY_ARCH = "ActivityConstraints.arch";
- private static final String KEY_PREREQ = "ActivityConstraints.prereq";
- private static final String KEY_PREREQ_PLUGIN =
- "ActivityConstaints.prereq.plugin";
- private static final String KEY_PREREQ_FEATURE =
- "ActivityConstaints.prereq.feature";
- private static final String KEY_PREREQ_PERFECT =
- "ActivityConstraints.prereqPerfect";
- private static final String KEY_PREREQ_EQUIVALENT =
- "ActivityConstraints.prereqEquivalent";
- private static final String KEY_PREREQ_COMPATIBLE =
- "ActivityConstraints.prereqCompatible";
- private static final String KEY_PREREQ_GREATER =
- "ActivityConstraints.prereqGreaterOrEqual";
- private static final String KEY_PATCH_REGRESSION =
- "ActivityConstraints.patchRegression";
- private static final String KEY_PATCH_UNCONFIGURE =
- "ActivityConstraints.patchUnconfigure";
- private static final String KEY_PATCH_UNCONFIGURE_BACKUP =
- "ActivityConstraints.patchUnconfigureBackup";
- private static final String KEY_PATCH_MISSING_TARGET =
- "ActivityConstraints.patchMissingTarget";
- private static final String KEY_OPTIONAL_CHILD =
- "ActivityConstraints.optionalChild";
- private static final String KEY_CYCLE = "ActivityConstraints.cycle";
- private static final String KEY_CONFLICT = "ActivityConstraints.conflict";
- private static final String KEY_EXCLUSIVE = "ActivityConstraints.exclusive";
- private static final String KEY_WRONG_TIMELINE =
- "ActivityConstraints.timeline";
- private static final String KEY_NO_LICENSE =
- "ActivityConstraints.noLicense";
-
- /*
- * Called by UI before performing operation
- */
- public static IStatus validatePendingChange(PendingChange job) {
- // check initial state
- ArrayList beforeStatus = new ArrayList();
- validateInitialState(beforeStatus);
-
- // check proposed change
- ArrayList status = new ArrayList();
- switch (job.getJobType()) {
- case PendingChange.UNCONFIGURE :
- validateUnconfigure(job.getFeature(), status);
- break;
- case PendingChange.CONFIGURE :
- validateConfigure(job.getFeature(), status);
- break;
- case PendingChange.INSTALL :
- validateInstall(job.getOldFeature(), job.getFeature(), status);
- break;
- }
-
- // report status
- if (status.size() > 0) {
- if (beforeStatus.size() > 0)
- return createMultiStatus(KEY_ROOT_MESSAGE_INIT, beforeStatus);
- else
- return createMultiStatus(KEY_ROOT_MESSAGE, status);
- }
- return null;
- }
-
- /*
- * Called by UI before processing a delta
- */
- public static IStatus validateSessionDelta(
- ISessionDelta delta,
- IFeatureReference[] deltaRefs) {
- // check initial state
- ArrayList beforeStatus = new ArrayList();
- validateInitialState(beforeStatus);
-
- // check proposed change
- ArrayList status = new ArrayList();
- switch (delta.getType()) {
- case ISessionDelta.ENABLE :
- validateDeltaConfigure(delta, deltaRefs, status);
- break;
- }
-
- // report status
- if (status.size() > 0) {
- if (beforeStatus.size() > 0)
- return createMultiStatus(KEY_ROOT_MESSAGE_INIT, beforeStatus);
- else
- return createMultiStatus(KEY_ROOT_MESSAGE, status);
- }
- return null;
- }
-
- /*
- * Called by the UI before doing a revert/ restore operation
- */
- public static IStatus validatePendingRevert(IInstallConfiguration config) {
- // check initial state
- ArrayList beforeStatus = new ArrayList();
- validateInitialState(beforeStatus);
-
- // check proposed change
- ArrayList status = new ArrayList();
- validateRevert(config, status);
-
- // report status
- if (status.size() > 0) {
- if (beforeStatus.size() > 0)
- return createMultiStatus(KEY_ROOT_MESSAGE_INIT, beforeStatus);
- else
- return createMultiStatus(KEY_ROOT_MESSAGE, status);
- }
- return null;
- }
-
- /*
- * Called by the UI before doing a one-click update operation
- */
- public static IStatus validatePendingOneClickUpdate(PendingChange[] jobs) {
- // check initial state
- ArrayList beforeStatus = new ArrayList();
- validateInitialState(beforeStatus);
-
- // check proposed change
- ArrayList status = new ArrayList();
-
- // report status
- if (status.size() > 0) {
- if (beforeStatus.size() > 0)
- return createMultiStatus(KEY_ROOT_MESSAGE_INIT, beforeStatus);
- else
- return createMultiStatus(KEY_ROOT_MESSAGE, status);
- }
- return null;
- }
-
- /*
- * Called by the UI before doing a batched processing of
- * several pending changes.
- */
- public static IStatus validatePendingChanges(PendingChange[] jobs) {
- // check initial state
- ArrayList beforeStatus = new ArrayList();
- validateInitialState(beforeStatus);
-
- // check proposed change
- ArrayList status = new ArrayList();
- validatePendingChanges(jobs, status);
-
- // report status
- if (status.size() > 0) {
- if (beforeStatus.size() > 0)
- return createMultiStatus(KEY_ROOT_MESSAGE_INIT, beforeStatus);
- else
- return createMultiStatus(KEY_ROOT_MESSAGE, status);
- }
- return null;
- }
-
- /*
- * Check the current state.
- */
- public static IStatus validateCurrentState() {
- // check the state
- ArrayList status = new ArrayList();
- validateInitialState(status);
-
- // report status
- if (status.size() > 0)
- return createMultiStatus(KEY_ROOT_MESSAGE, status);
- return null;
- }
-
- /*
- * Check to see if we are not broken even before we start
- */
- private static void validateInitialState(ArrayList status) {
- try {
- ArrayList features = computeFeatures();
- checkConstraints(features, status);
- } catch (CoreException e) {
- status.add(e.getStatus());
- }
- }
-
- /*
- * handle unconfigure
- */
- private static void validateUnconfigure(
- IFeature feature,
- ArrayList status) {
- try {
- if (validateUnconfigurePatch(feature, status))
- return;
- ArrayList features = computeFeatures();
- features = computeFeaturesAfterOperation(features, null, feature);
- checkConstraints(features, status);
- } catch (CoreException e) {
- status.add(e.getStatus());
- }
- }
-
- private static boolean validateUnconfigurePatch(
- IFeature feature,
- ArrayList status)
- throws CoreException {
- if (feature.isPatch()) {
- IInstallConfiguration backup =
- UpdateUI.getBackupConfigurationFor(feature);
- String msg;
- if (backup != null)
- msg =
- UpdateUI.getFormattedMessage(
- KEY_PATCH_UNCONFIGURE_BACKUP,
- backup.getLabel());
- else
- msg = UpdateUI.getString(KEY_PATCH_UNCONFIGURE);
- status.add(createStatus(feature, msg));
- return true;
- }
- return false;
- }
-
- /*
- * handle configure
- */
- private static void validateConfigure(IFeature feature, ArrayList status) {
- try {
- ArrayList features = computeFeatures();
- checkOptionalChildConfiguring(feature, status);
- features = computeFeaturesAfterOperation(features, feature, null);
- checkConstraints(features, status);
-
- } catch (CoreException e) {
- status.add(e.getStatus());
- }
- }
-
- /*
- * handle install and update
- */
- private static void validateInstall(
- IFeature oldFeature,
- IFeature newFeature,
- ArrayList status) {
- try {
- ArrayList features = computeFeatures();
- if (oldFeature == null && isPatch(newFeature))
- checkUnique(newFeature, features, status);
- features =
- computeFeaturesAfterOperation(features, newFeature, oldFeature);
- checkConstraints(features, status);
- checkLicense(newFeature, status);
- } catch (CoreException e) {
- status.add(e.getStatus());
- }
- }
-
- /*
- * handle revert and restore
- */
- private static void validateRevert(
- IInstallConfiguration config,
- ArrayList status) {
- try {
- // check the timeline and don't bother
- // to check anything else if negative
- if (!checkTimeline(config, status))
- return;
- ArrayList features = computeFeaturesAfterRevert(config);
- checkConstraints(features, status);
- checkRevertConstraints(features, status);
-
- } catch (CoreException e) {
- status.add(e.getStatus());
- }
- }
-
- /*
- * Handle delta addition
- */
- private static void validateDeltaConfigure(
- ISessionDelta delta,
- IFeatureReference[] deltaRefs,
- ArrayList status) {
- try {
- ArrayList features = computeFeaturesAfterDelta(delta, deltaRefs);
- checkConstraints(features, status);
-
- } catch (CoreException e) {
- status.add(e.getStatus());
- }
- }
-
- /*
- * Handle one-click changes as a batch
- */
- private static void validatePendingChanges(
- PendingChange[] jobs,
- ArrayList status) {
- try {
- ArrayList features = computeFeatures();
- ArrayList savedFeatures = features;
- int nexclusives = 0;
-
- // pass 1: see if we can process the entire "batch"
- ArrayList tmpStatus = new ArrayList();
- for (int i = 0; i < jobs.length; i++) {
- PendingChange job = jobs[i];
- int mode = job.getJobType();
-
- IFeature newFeature = job.getFeature();
- IFeature oldFeature = job.getOldFeature();
- checkLicense(newFeature, status);
- if (jobs.length > 1 && newFeature.isExclusive()) {
- nexclusives++;
- status.add(
- createStatus(
- newFeature,
- UpdateUI.getString(KEY_EXCLUSIVE)));
- continue;
- }
- if (mode == PendingChange.UNCONFIGURE
- && validateUnconfigurePatch(newFeature, status))
- continue;
- switch (mode) {
- case PendingChange.INSTALL :
- features =
- computeFeaturesAfterOperation(
- features,
- newFeature,
- oldFeature);
- break;
- case PendingChange.CONFIGURE :
- features =
- computeFeaturesAfterOperation(
- features,
- newFeature,
- null);
- break;
- case PendingChange.UNCONFIGURE :
- features =
- computeFeaturesAfterOperation(
- features,
- null,
- newFeature);
- break;
- }
- }
- if (nexclusives > 0)
- return;
- checkConstraints(features, tmpStatus);
- if (tmpStatus.size() == 0) // the whole "batch" is OK
- return;
-
- // pass 2: we have conflicts
- features = savedFeatures;
- for (int i = 0; i < jobs.length; i++) {
- PendingChange job = jobs[i];
- int mode = job.getJobType();
- IFeature newFeature = job.getFeature();
- IFeature oldFeature = job.getOldFeature();
- switch (mode) {
- case PendingChange.INSTALL :
- features =
- computeFeaturesAfterOperation(
- features,
- newFeature,
- oldFeature);
- break;
- case PendingChange.CONFIGURE :
- features =
- computeFeaturesAfterOperation(
- features,
- newFeature,
- null);
- break;
- case PendingChange.UNCONFIGURE :
- features =
- computeFeaturesAfterOperation(
- features,
- null,
- newFeature);
- break;
- }
- checkConstraints(features, status);
- if (status.size() > 0) {
- IStatus conflict =
- createStatus(
- newFeature,
- UpdateUI.getString(KEY_CONFLICT));
- status.add(0, conflict);
- return;
- }
- }
- } catch (CoreException e) {
- status.add(e.getStatus());
- }
- }
-
- /*
- * Handle one-click changes as a batch
- */
- private static void validateOneClickUpdate(
- PendingChange[] jobs,
- ArrayList status) {
- try {
- ArrayList features = computeFeatures();
- ArrayList savedFeatures = features;
-
- // pass 1: see if we can process the entire "batch"
- ArrayList tmpStatus = new ArrayList();
- for (int i = 0; i < jobs.length; i++) {
- IFeature newFeature = jobs[i].getFeature();
- IFeature oldFeature = jobs[i].getOldFeature();
- features =
- computeFeaturesAfterOperation(
- features,
- newFeature,
- oldFeature);
- }
- checkConstraints(features, tmpStatus);
- if (tmpStatus.size() == 0) // the whole "batch" is OK
- return;
-
- // pass 2: we have conflicts
- features = savedFeatures;
- for (int i = 0; i < jobs.length; i++) {
- IFeature newFeature = jobs[i].getFeature();
- IFeature oldFeature = jobs[i].getOldFeature();
- features =
- computeFeaturesAfterOperation(
- features,
- newFeature,
- oldFeature);
- checkConstraints(features, status);
- checkLicense(newFeature, status);
- if (status.size() > 0) {
- IStatus conflict =
- createStatus(
- newFeature,
- UpdateUI.getString(KEY_CONFLICT));
- status.add(0, conflict);
- return;
- }
- }
- } catch (CoreException e) {
- status.add(e.getStatus());
- }
- }
-
- /*
- * Compute a list of configured features
- */
- private static ArrayList computeFeatures() throws CoreException {
- return computeFeatures(true);
- }
- /*
- * Compute a list of configured features
- */
- private static ArrayList computeFeatures(boolean configuredOnly)
- throws CoreException {
- ArrayList features = new ArrayList();
- ILocalSite localSite = SiteManager.getLocalSite();
- IInstallConfiguration config = localSite.getCurrentConfiguration();
- IConfiguredSite[] csites = config.getConfiguredSites();
-
- for (int i = 0; i < csites.length; i++) {
- IConfiguredSite csite = csites[i];
-
- IFeatureReference[] crefs;
-
- if (configuredOnly)
- crefs = csite.getConfiguredFeatures();
- else
- crefs = csite.getSite().getFeatureReferences();
- for (int j = 0; j < crefs.length; j++) {
- IFeatureReference cref = crefs[j];
- IFeature cfeature = cref.getFeature(null);
- features.add(cfeature);
- }
- }
-
- return features;
- }
-
- /*
- * Compute the nested feature subtree starting at the specified base feature
- */
- private static ArrayList computeFeatureSubtree(
- IFeature top,
- IFeature feature,
- ArrayList features,
- boolean tolerateMissingChildren)
- throws CoreException {
- return computeFeatureSubtree(
- top,
- feature,
- features,
- tolerateMissingChildren,
- null);
- }
-
- /*
- * Compute the nested feature subtree starting at the specified base feature
- */
- private static ArrayList computeFeatureSubtree(
- IFeature top,
- IFeature feature,
- ArrayList features,
- boolean tolerateMissingChildren,
- ArrayList configuredFeatures)
- throws CoreException {
-
- // check arguments
- if (features == null)
- features = new ArrayList();
- if (top == null)
- return features;
- if (feature == null)
- feature = top;
-
- // check for <includes> cycle
- if (features.contains(feature)) {
- IStatus status = createStatus(top, UpdateUI.getString(KEY_CYCLE));
- throw new CoreException(status);
- }
-
- // return specified base feature and all its children
- features.add(feature);
- IIncludedFeatureReference[] children =
- feature.getIncludedFeatureReferences();
- for (int i = 0; i < children.length; i++) {
- try {
- IFeature child;
- if (configuredFeatures == null)
- child = children[i].getFeature(null);
- else
- child = getBestMatch(children[i], configuredFeatures);
- features =
- computeFeatureSubtree(
- top,
- child,
- features,
- tolerateMissingChildren);
- } catch (CoreException e) {
- if (!children[i].isOptional() && !tolerateMissingChildren)
- throw e;
- }
- }
- return features;
- }
- /*
- * This method fixes the defect 34241. Included feature reference
- * of the feature from the remote server always returns
- * a perfect match. However, the actual install behaviour is
- * different if that feature already exists (as disabled)
- * while a better one is enabled. This typically happens
- * through branch updates or patches.
- *
- * To avoid this problem, we need to check if a better feature
- * that still matches the reference is enabled in the current
- * configuration. If it is, it will be used instead of the
- * 'perfect' match. If not, we should default to the old
- * behaviour.
- */
-
- private static IFeature getBestMatch(
- IIncludedFeatureReference ref,
- ArrayList configuredFeatures)
- throws CoreException {
- int match = ref.getMatch();
- ISite site = ref.getSite();
- IConfiguredSite csite = site.getCurrentConfiguredSite();
- // If the feature is from the remote server and
- // it can handle better features, see if you can
- // resolve locally.
- if (csite == null && match != IUpdateConstants.RULE_PERFECT) {
- // there is a chance that there is a better match
- // in the platform
- VersionedIdentifier vid = ref.getVersionedIdentifier();
- PluginVersionIdentifier version = vid.getVersion();
-
- for (int i = 0; i < configuredFeatures.size(); i++) {
- IFeature feature = (IFeature) configuredFeatures.get(i);
- VersionedIdentifier fvid = feature.getVersionedIdentifier();
- if (fvid.getIdentifier().equals(vid.getIdentifier())) {
- // Feature found in local configuration.
- // Ignore if the same version.
- // Use it if better
- PluginVersionIdentifier fversion = fvid.getVersion();
- if (fversion.isGreaterThan(version)) {
- boolean matches = false;
- switch (match) {
- case IImport.RULE_COMPATIBLE :
- matches =
- fvid.getVersion().isCompatibleWith(
- vid.getVersion());
- break;
- case IImport.RULE_EQUIVALENT :
- matches =
- fvid.getVersion().isEquivalentTo(
- vid.getVersion());
- break;
- case IImport.RULE_GREATER_OR_EQUAL :
- matches =
- fvid.getVersion().isGreaterOrEqualTo(
- vid.getVersion());
- break;
- }
- if (matches)
- return feature;
- }
- }
- }
- }
- // fallback - just get the feature from the reference.
- return ref.getFeature(null);
- }
-
- private static void checkLicense(IFeature feature, ArrayList status) {
- IURLEntry licenseEntry = feature.getLicense();
- if (licenseEntry != null) {
- String license = licenseEntry.getAnnotation();
- if (license != null && license.trim().length() > 0)
- return;
- }
- status.add(createStatus(feature, UpdateUI.getString(KEY_NO_LICENSE)));
- }
-
- /*
- * Compute a list of features that will be configured after the operation
- */
- private static ArrayList computeFeaturesAfterOperation(
- ArrayList features,
- IFeature add,
- IFeature remove)
- throws CoreException {
-
- ArrayList addTree =
- computeFeatureSubtree(
- add,
- null,
- null,
- false,
- /* do not tolerate missing children */
- features);
- ArrayList removeTree =
- computeFeatureSubtree(
- remove,
- null,
- null,
- true /* tolerate missing children */
- );
- if (remove != null) {
- // Patches to features are removed together with
- // those features. Include them in the list.
- contributePatchesFor(removeTree, features, removeTree);
- }
-
- if (remove != null)
- features.removeAll(removeTree);
-
- if (add != null)
- features.addAll(addTree);
-
- return features;
- }
-
- private static void contributePatchesFor(
- ArrayList removeTree,
- ArrayList features,
- ArrayList result)
- throws CoreException {
-
- for (int i = 0; i < removeTree.size(); i++) {
- IFeature feature = (IFeature) removeTree.get(i);
- contributePatchesFor(feature, features, result);
- }
- }
-
- private static void contributePatchesFor(
- IFeature feature,
- ArrayList features,
- ArrayList result)
- throws CoreException {
- for (int i = 0; i < features.size(); i++) {
- IFeature candidate = (IFeature) features.get(i);
- if (UpdateUI.isPatch(feature, candidate)) {
- ArrayList removeTree =
- computeFeatureSubtree(candidate, null, null, true);
- result.addAll(removeTree);
- }
- }
- }
-
- /*
- * Compute a list of features that will be configured after performing the revert
- */
- private static ArrayList computeFeaturesAfterRevert(IInstallConfiguration config)
- throws CoreException {
-
- ArrayList list = new ArrayList();
- IConfiguredSite[] csites = config.getConfiguredSites();
- for (int i = 0; i < csites.length; i++) {
- IConfiguredSite csite = csites[i];
- IFeatureReference[] features = csite.getConfiguredFeatures();
- for (int j = 0; j < features.length; j++) {
- list.add(features[j].getFeature(null));
- }
- }
- return list;
- }
-
- /*
- * Compute a list of features that will be configured after applying the
- * specified delta
- */
- private static ArrayList computeFeaturesAfterDelta(
- ISessionDelta delta,
- IFeatureReference[] deltaRefs)
- throws CoreException {
-
- if (delta == null || deltaRefs == null)
- deltaRefs = new IFeatureReference[0];
- else if (deltaRefs == null)
- deltaRefs = delta.getFeatureReferences();
-
- ArrayList features = new ArrayList(); // cumulative results list
- ILocalSite localSite = SiteManager.getLocalSite();
- IInstallConfiguration config = localSite.getCurrentConfiguration();
- IConfiguredSite[] csites = config.getConfiguredSites();
-
- // compute changes for each site
- for (int i = 0; i < csites.length; i++) {
- IConfiguredSite csite = csites[i];
- ArrayList siteFeatures = new ArrayList();
-
- // collect currently configured features on site
- IFeatureReference[] crefs = csite.getConfiguredFeatures();
- for (int j = 0; crefs != null && j < crefs.length; j++) {
- IFeatureReference cref = crefs[j];
- IFeature cfeature = cref.getFeature(null);
- siteFeatures.add(cfeature);
- }
-
- // add deltas for the site
- for (int j = 0; j < deltaRefs.length; j++) {
- ISite deltaSite = deltaRefs[j].getSite();
- if (deltaSite.equals(csite.getSite())) {
- IFeature dfeature = deltaRefs[j].getFeature(null);
- if (!siteFeatures.contains(dfeature)) // don't add dups
- siteFeatures.add(dfeature);
- }
- }
-
- // reduce the list if needed
- IFeature[] array =
- (IFeature[]) siteFeatures.toArray(
- new IFeature[siteFeatures.size()]);
- ArrayList removeTree = new ArrayList();
- for (int j = 0; j < array.length; j++) {
- VersionedIdentifier id1 = array[j].getVersionedIdentifier();
- for (int k = 0; k < array.length; k++) {
- if (j == k)
- continue;
- VersionedIdentifier id2 = array[k].getVersionedIdentifier();
- if (id1.getIdentifier().equals(id2.getIdentifier())) {
- if (id2.getVersion().isGreaterThan(id1.getVersion())) {
- removeTree.add(array[j]);
- siteFeatures.remove(array[j]);
- break;
- }
- }
- }
- }
- // Compute patches that will need to be removed together with
- // the removed features
- ArrayList patchesTree = new ArrayList();
- contributePatchesFor(removeTree, siteFeatures, patchesTree);
- siteFeatures.removeAll(patchesTree);
-
- // accumulate site results
- features.addAll(siteFeatures);
- }
-
- return features;
- }
-
- /*
- * Compute a list of plugin entries for the specified features.
- */
- private static ArrayList computePluginsForFeatures(ArrayList features)
- throws CoreException {
- if (features == null)
- return new ArrayList();
-
- HashMap plugins = new HashMap();
- for (int i = 0; i < features.size(); i++) {
- IFeature feature = (IFeature) features.get(i);
- IPluginEntry[] entries = feature.getPluginEntries();
- for (int j = 0; j < entries.length; j++) {
- IPluginEntry entry = entries[j];
- plugins.put(entry.getVersionedIdentifier(), entry);
- }
- }
- ArrayList result = new ArrayList();
- result.addAll(plugins.values());
- return result;
- }
-
- private static boolean isPatch(IFeature feature) {
- IImport[] imports = feature.getImports();
- for (int i = 0; i < imports.length; i++) {
- IImport iimport = imports[i];
- if (iimport.isPatch()) {
- return true;
- }
- }
- return false;
- }
-
- /*
- *
- */
- private static void checkUnique(
- IFeature feature,
- ArrayList features,
- ArrayList status)
- throws CoreException {
- if (features == null)
- return;
- IIncludedFeatureReference[] irefs =
- feature.getIncludedFeatureReferences();
- for (int i = 0; i < irefs.length; i++) {
- IIncludedFeatureReference iref = irefs[i];
- IFeature ifeature = iref.getFeature(null);
- boolean patch = isPatch(ifeature);
- VersionedIdentifier vid = ifeature.getVersionedIdentifier();
- String id = vid.getIdentifier();
- PluginVersionIdentifier version = vid.getVersion();
- boolean found = false;
- for (int j = 0; j < features.size(); j++) {
- IFeature candidate = (IFeature) features.get(j);
- VersionedIdentifier cvid = candidate.getVersionedIdentifier();
- String cid = cvid.getIdentifier();
- PluginVersionIdentifier cversion = cvid.getVersion();
- if (cid.equals(id)) {
- // The same identifier - this one will
- // be unconfigured. Check if it is lower,
- // otherwise flag.
- found = true;
- // Ignore equal - will be filtered in the download
- if (version.equals(cversion))
- continue;
- // Flag only the case when the installed one is
- // newer than the one that will be installed.
- if (!version.isGreaterThan(cversion)) {
- // Don't allow this.
- String msg =
- UpdateUI.getFormattedMessage(
- KEY_PATCH_REGRESSION,
- new String[] {
- ifeature.getLabel(),
- version.toString()});
- status.add(createStatus(feature, msg));
-
- }
- }
- }
- if (!found) {
- // All the features carried in a patch must
- // already be present, unless this feature
- // is a patch itself
-
- // 30849: optional feature does not
- // need to be present.
- if (!patch && iref.isOptional() == false) {
- String msg =
- UpdateUI.getFormattedMessage(
- KEY_PATCH_MISSING_TARGET,
- new String[] {
- ifeature.getLabel(),
- version.toString()});
- status.add(createStatus(feature, msg));
- }
- }
- if (patch)
- checkUnique(ifeature, features, status);
- }
- }
-
- /*
- * validate constraints
- */
- private static void checkConstraints(ArrayList features, ArrayList status)
- throws CoreException {
- if (features == null)
- return;
-
- ArrayList plugins = computePluginsForFeatures(features);
-
- checkEnvironment(features, status);
- checkPlatformFeature(features, plugins, status);
- checkPrimaryFeature(features, status);
- checkPrereqs(features, plugins, status);
- }
-
- /*
- * Verify all features are either portable, or match the current environment
- */
- private static void checkEnvironment(
- ArrayList features,
- ArrayList status) {
-
- String os = BootLoader.getOS();
- String ws = BootLoader.getWS();
- String arch = BootLoader.getOSArch();
-
- for (int i = 0; i < features.size(); i++) {
- IFeature feature = (IFeature) features.get(i);
- ArrayList fos = createList(feature.getOS());
- ArrayList fws = createList(feature.getWS());
- ArrayList farch = createList(feature.getOSArch());
-
- if (fos.size() > 0) {
- if (!fos.contains(os)) {
- status.add(
- createStatus(feature, UpdateUI.getString(KEY_OS)));
- continue;
- }
- }
-
- if (fws.size() > 0) {
- if (!fws.contains(ws)) {
- status.add(
- createStatus(feature, UpdateUI.getString(KEY_WS)));
- continue;
- }
- }
-
- if (farch.size() > 0) {
- if (!farch.contains(arch)) {
- status.add(
- createStatus(feature, UpdateUI.getString(KEY_ARCH)));
- continue;
- }
- }
- }
- }
-
- /*
- * Verify we end up with a version of platform configured
- */
- private static void checkPlatformFeature(
- ArrayList features,
- ArrayList plugins,
- ArrayList status) {
-
- String[] bootstrapPlugins =
- BootLoader
- .getCurrentPlatformConfiguration()
- .getBootstrapPluginIdentifiers();
-
- for (int i = 0; i < bootstrapPlugins.length; i++) {
- boolean found = false;
- for (int j = 0; j < plugins.size(); j++) {
- IPluginEntry plugin = (IPluginEntry) plugins.get(j);
- if (bootstrapPlugins[i]
- .equals(plugin.getVersionedIdentifier().getIdentifier())) {
- found = true;
- break;
- }
- }
- if (!found) {
- status.add(
- createStatus(null, UpdateUI.getString(KEY_PLATFORM)));
- return;
- }
- }
- }
-
- /*
- * Verify we end up with a version of primary feature configured
- */
- private static void checkPrimaryFeature(
- ArrayList features,
- ArrayList status) {
-
- String featureId =
- BootLoader
- .getCurrentPlatformConfiguration()
- .getPrimaryFeatureIdentifier();
-
- for (int i = 0; i < features.size(); i++) {
- IFeature feature = (IFeature) features.get(i);
- if (featureId
- .equals(feature.getVersionedIdentifier().getIdentifier()))
- return;
- }
-
- status.add(createStatus(null, UpdateUI.getString(KEY_PRIMARY)));
- }
-
- /*
- * Verify we do not break prereqs
- */
- private static void checkPrereqs(
- ArrayList features,
- ArrayList plugins,
- ArrayList status) {
-
- for (int i = 0; i < features.size(); i++) {
- IFeature feature = (IFeature) features.get(i);
- IImport[] imports = feature.getImports();
-
- for (int j = 0; j < imports.length; j++) {
- IImport iimport = imports[j];
- // for each import determine plugin or feature, version, match we need
- VersionedIdentifier iid = iimport.getVersionedIdentifier();
- String id = iid.getIdentifier();
- PluginVersionIdentifier version = iid.getVersion();
- boolean featurePrereq =
- iimport.getKind() == IImport.KIND_FEATURE;
- boolean ignoreVersion =
- version.getMajorComponent() == 0
- && version.getMinorComponent() == 0
- && version.getServiceComponent() == 0;
- int rule = iimport.getRule();
- if (rule == IImport.RULE_NONE)
- rule = IImport.RULE_COMPATIBLE;
-
- boolean found = false;
-
- ArrayList candidates;
-
- if (featurePrereq)
- candidates = features;
- else
- candidates = plugins;
- for (int k = 0; k < candidates.size(); k++) {
- VersionedIdentifier cid;
- if (featurePrereq) {
- // the candidate is a feature
- IFeature candidate = (IFeature) candidates.get(k);
- // skip self
- if (feature.equals(candidate))
- continue;
- cid = candidate.getVersionedIdentifier();
- } else {
- // the candidate is a plug-in
- IPluginEntry plugin = (IPluginEntry) candidates.get(k);
- cid = plugin.getVersionedIdentifier();
- }
- PluginVersionIdentifier cversion = cid.getVersion();
- if (id.equals(cid.getIdentifier())) {
- // have a candidate
- if (ignoreVersion)
- found = true;
- else if (
- rule == IImport.RULE_PERFECT
- && cversion.isPerfect(version))
- found = true;
- else if (
- rule == IImport.RULE_EQUIVALENT
- && cversion.isEquivalentTo(version))
- found = true;
- else if (
- rule == IImport.RULE_COMPATIBLE
- && cversion.isCompatibleWith(version))
- found = true;
- else if (
- rule == IImport.RULE_GREATER_OR_EQUAL
- && cversion.isGreaterOrEqualTo(version))
- found = true;
- }
- if (found)
- break;
- }
-
- if (!found) {
- // report status
- String target =
- featurePrereq
- ? UpdateUI.getString(KEY_PREREQ_FEATURE)
- : UpdateUI.getString(KEY_PREREQ_PLUGIN);
- String msg =
- UpdateUI.getFormattedMessage(
- KEY_PREREQ,
- new String[] { target, id });
-
- if (!ignoreVersion) {
- if (rule == IImport.RULE_PERFECT)
- msg =
- UpdateUI.getFormattedMessage(
- KEY_PREREQ_PERFECT,
- new String[] {
- target,
- id,
- version.toString()});
- else if (rule == IImport.RULE_EQUIVALENT)
- msg =
- UpdateUI.getFormattedMessage(
- KEY_PREREQ_EQUIVALENT,
- new String[] {
- target,
- id,
- version.toString()});
- else if (rule == IImport.RULE_COMPATIBLE)
- msg =
- UpdateUI.getFormattedMessage(
- KEY_PREREQ_COMPATIBLE,
- new String[] {
- target,
- id,
- version.toString()});
- else if (rule == IImport.RULE_GREATER_OR_EQUAL)
- msg =
- UpdateUI.getFormattedMessage(
- KEY_PREREQ_GREATER,
- new String[] {
- target,
- id,
- version.toString()});
- }
- status.add(createStatus(feature, msg));
- }
- }
- }
- }
-
- /*
- * Verify we end up with valid nested features after revert
- */
- private static void checkRevertConstraints(
- ArrayList features,
- ArrayList status) {
-
- for (int i = 0; i < features.size(); i++) {
- IFeature feature = (IFeature) features.get(i);
- try {
- computeFeatureSubtree(
- feature,
- null,
- null,
- false /* do not tolerate missing children */
- );
- } catch (CoreException e) {
- status.add(e.getStatus());
- }
- }
- }
-
- /*
- * Verify that a parent of an optional child is configured
- * before we allow the child to be configured as well
- */
-
- private static void checkOptionalChildConfiguring(
- IFeature feature,
- ArrayList status)
- throws CoreException {
- ILocalSite localSite = SiteManager.getLocalSite();
- IInstallConfiguration config = localSite.getCurrentConfiguration();
- IConfiguredSite[] csites = config.getConfiguredSites();
-
- boolean included = false;
- for (int i = 0; i < csites.length; i++) {
- IConfiguredSite csite = csites[i];
- ISiteFeatureReference[] crefs =
- csite.getSite().getFeatureReferences();
- for (int j = 0; j < crefs.length; j++) {
- IFeatureReference cref = crefs[j];
- IFeature cfeature = null;
- try {
- cfeature = cref.getFeature(null);
- } catch (CoreException e) {
- //FIXME: cannot ask 'isOptional' here
- // Ignore missing optional feature.
- /* if (cref.isOptional())
- continue;
- else */
- throw e;
- }
- if (isParent(cfeature, feature, true)) {
- // Included in at least one feature as optional
- included = true;
- if (csite.isConfigured(cfeature)) {
- // At least one feature parent
- // is enabled - it is OK to
- // configure optional child.
- return;
- }
- }
- }
- }
- if (included) {
- // feature is included as optional but
- // no parent is currently configured.
- String msg = UpdateUI.getString(KEY_OPTIONAL_CHILD);
- status.add(createStatus(feature, msg));
- } else {
- //feature is root - can be configured
- }
- }
-
- private static boolean isParent(
- IFeature candidate,
- IFeature feature,
- boolean optionalOnly)
- throws CoreException {
- IIncludedFeatureReference[] refs =
- candidate.getIncludedFeatureReferences();
- for (int i = 0; i < refs.length; i++) {
- IIncludedFeatureReference child = refs[i];
- VersionedIdentifier fvid = feature.getVersionedIdentifier();
- VersionedIdentifier cvid = child.getVersionedIdentifier();
-
- if (fvid.getIdentifier().equals(cvid.getIdentifier()) == false)
- continue;
- // same ID
- PluginVersionIdentifier fversion = fvid.getVersion();
- PluginVersionIdentifier cversion = cvid.getVersion();
-
- int match = child.getMatch();
- boolean matched = false;
-
- switch (match) {
- case IUpdateConstants.RULE_EQUIVALENT :
- if (fversion.isEquivalentTo(cversion))
- matched = true;
- break;
- case IUpdateConstants.RULE_COMPATIBLE :
- if (fversion.isCompatibleWith(cversion))
- matched = true;
- break;
- case IUpdateConstants.RULE_GREATER_OR_EQUAL :
- if (fversion.isGreaterOrEqualTo(cversion))
- matched = true;
- break;
- default :
- if (fversion.equals(cversion))
- matched = true;
-
- }
- if (matched) {
- // included and matched; return true if optionality is not
- // important or it is and the inclusion is optional
- return optionalOnly == false || child.isOptional();
- }
- }
- return false;
- }
-
- private static boolean checkTimeline(
- IInstallConfiguration config,
- ArrayList status) {
- try {
- ILocalSite lsite = SiteManager.getLocalSite();
- IInstallConfiguration cconfig = lsite.getCurrentConfiguration();
- if (cconfig.getTimeline() != config.getTimeline()) {
- // Not the same timeline - cannot revert
- String msg =
- UpdateUI.getFormattedMessage(
- KEY_WRONG_TIMELINE,
- config.getLabel());
- status.add(createStatus(null, msg));
- return false;
- }
- } catch (CoreException e) {
- status.add(e.getStatus());
- }
- return true;
- }
-
- private static IStatus createMultiStatus(
- String rootKey,
- ArrayList children) {
- IStatus[] carray =
- (IStatus[]) children.toArray(new IStatus[children.size()]);
- String message = UpdateUI.getString(rootKey);
- return new MultiStatus(
- UpdateUI.getPluginId(),
- IStatus.ERROR,
- carray,
- message,
- null);
- }
-
- private static IStatus createStatus(IFeature feature, String message) {
-
- String fullMessage;
- if (feature == null)
- fullMessage = message;
- else {
- PluginVersionIdentifier version =
- feature.getVersionedIdentifier().getVersion();
- fullMessage =
- UpdateUI.getFormattedMessage(
- KEY_CHILD_MESSAGE,
- new String[] {
- feature.getLabel(),
- version.toString(),
- message });
- }
-
- return new Status(
- IStatus.ERROR,
- UpdateUI.getPluginId(),
- IStatus.OK,
- fullMessage,
- null);
- }
-
- private static ArrayList createList(String commaSeparatedList) {
- ArrayList list = new ArrayList();
- if (commaSeparatedList != null) {
- StringTokenizer t =
- new StringTokenizer(commaSeparatedList.trim(), ",");
- while (t.hasMoreTokens()) {
- String token = t.nextToken().trim();
- if (!token.equals(""))
- list.add(token);
- }
- }
- return list;
- }
-}
\ No newline at end of file
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/ActivitySection.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/ActivitySection.java
deleted file mode 100644
index 1b2749f..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/ActivitySection.java
+++ /dev/null
@@ -1,169 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.forms;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CLabel;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.update.configuration.*;
-import org.eclipse.update.core.Utilities;
-import org.eclipse.update.internal.ui.UpdateUI;
-import org.eclipse.update.internal.ui.pages.UpdateFormPage;
-import org.eclipse.update.ui.forms.internal.FormWidgetFactory;
-
-
-public class ActivitySection extends UpdateSection {
-// NL resource keys
- private static final String KEY_TITLE = "InstallConfigurationPage.ActivitySection.title";
- private static final String KEY_DESC = "InstallConfigurationPage.ActivitySection.desc";
- private static final String KEY_DATE = "InstallConfigurationPage.ActivitySection.headers.date";
- private static final String KEY_TARGET = "InstallConfigurationPage.ActivitySection.headers.target";
- private static final String KEY_ACTION = "InstallConfigurationPage.ActivitySection.headers.action";
- private static final String KEY_STATUS = "InstallConfigurationPage.ActivitySection.headers.status";
- private static final String KEY_CONFIGURE = "InstallConfigurationPage.ActivitySection.action.configure";
- private static final String KEY_FEATURE_INSTALL = "InstallConfigurationPage.ActivitySection.action.featureInstall";
- private static final String KEY_FEATURE_REMOVE = "InstallConfigurationPage.ActivitySection.action.featureRemove";
- private static final String KEY_SITE_INSTALL = "InstallConfigurationPage.ActivitySection.action.siteInstall";
- private static final String KEY_SITE_REMOVE = "InstallConfigurationPage.ActivitySection.action.siteRemove";
- private static final String KEY_UNCONFIGURE = "InstallConfigurationPage.ActivitySection.action.unconfigure";
- private static final String KEY_UNKNOWN = "InstallConfigurationPage.ActivitySection.action.unknown";
- private static final String KEY_REVERT = "InstallConfigurationPage.ActivitySection.action.revert";
- private static final String KEY_RECONCILIATION = "InstallConfigurationPage.ActivitySection.action.reconcile";
- private static final String KEY_ADD_PRESERVED = "InstallConfigurationPage.ActivitySection.action.addpreserved";
- private static final String KEY_OK = "InstallConfigurationPage.ActivitySection.status.ok";
- private static final String KEY_NOK = "InstallConfigurationPage.ActivitySection.status.nok";
-
- private Composite container;
- private FormWidgetFactory factory;
- private Control [] headers;
- public ActivitySection(UpdateFormPage page) {
- super(page);
- setAddSeparator(false);
- setHeaderText(UpdateUI.getString(KEY_TITLE));
- setDescription(UpdateUI.getString(KEY_DESC));
- }
-
- public Composite createClient(Composite parent, FormWidgetFactory factory) {
- GridLayout layout = new GridLayout();
- this.factory = factory;
- //header.setForeground(factory.getColor(factory.COLOR_COMPOSITE_SEPARATOR));
- updateHeaderColor();
- layout.marginWidth = 0;
- layout.horizontalSpacing = 10;
- container = factory.createComposite(parent);
- container.setLayout(layout);
- layout.numColumns = 4;
-
- headers = new Control [5];
-
- headers[0] = createHeader(container, factory, UpdateUI.getString(KEY_DATE));
- headers[1] = createHeader(container, factory, UpdateUI.getString(KEY_TARGET));
- headers[2] = createHeader(container, factory, UpdateUI.getString(KEY_ACTION));
- headers[3] = createHeader(container, factory, UpdateUI.getString(KEY_STATUS));
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- headers[3].setLayoutData(gd);
- Composite separator = factory.createCompositeSeparator(container);
- headers[4] = separator;
- gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.heightHint = 1;
- gd.horizontalSpan = 4;
- separator.setLayoutData(gd);
- separator.setBackground(factory.getBorderColor());
- return container;
- }
-
- private boolean isHeader(Control c) {
- for (int i=0; i<headers.length; i++) {
- if (c.equals(headers[i])) return true;
- }
- return false;
- }
-
- public void configurationChanged(IInstallConfiguration config) {
- Control [] children = container.getChildren();
- for (int i=0; i<children.length; i++) {
- Control child = children[i];
- if (!isHeader(child))
- children[i].dispose();
- }
-
- IActivity [] activities = config.getActivities();
- for (int i=0; i<activities.length; i++) {
- IActivity activity = activities[i];
- factory.createLabel(container, Utilities.format(activity.getDate()));
- createLimitedLabel(container, activity.getLabel(), 300, factory);
- factory.createLabel(container, getActionLabel(activity));
- factory.createLabel(container, getStatusLabel(activity));
- }
- Composite separator = factory.createCompositeSeparator(container);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.heightHint = 1;
- gd.horizontalSpan = 4;
- separator.setLayoutData(gd);
- separator.setBackground(factory.getBorderColor());
- factory.createLabel(container, null);
- container.layout(true);
- //container.getParent().layout(true);
- }
-
- private void createLimitedLabel(Composite container, String text, int limit, FormWidgetFactory factory) {
- CLabel clabel = new CLabel(container, SWT.NULL);
- clabel.setBackground(factory.getBackgroundColor());
- clabel.setForeground(factory.getForegroundColor());
- clabel.setText(text);
- GridData gd = new GridData();
- gd.widthHint = limit;
- clabel.setLayoutData(gd);
- }
-
- private Label createHeader(Composite parent, FormWidgetFactory factory, String text) {
- Label label = factory.createLabel(parent, text);
- label.setFont(JFaceResources.getBannerFont());
- return label;
- }
-
- private String getActionLabel(IActivity activity) {
- int action = activity.getAction();
- switch (action) {
- case IActivity.ACTION_CONFIGURE:
- return UpdateUI.getString(KEY_CONFIGURE);
- case IActivity.ACTION_FEATURE_INSTALL:
- return UpdateUI.getString(KEY_FEATURE_INSTALL);
- case IActivity.ACTION_FEATURE_REMOVE:
- return UpdateUI.getString(KEY_FEATURE_REMOVE);
- case IActivity.ACTION_SITE_INSTALL:
- return UpdateUI.getString(KEY_SITE_INSTALL);
- case IActivity.ACTION_SITE_REMOVE:
- return UpdateUI.getString(KEY_SITE_REMOVE);
- case IActivity.ACTION_UNCONFIGURE:
- return UpdateUI.getString(KEY_UNCONFIGURE);
- case IActivity.ACTION_REVERT:
- return UpdateUI.getString(KEY_REVERT);
- case IActivity.ACTION_RECONCILIATION:
- return UpdateUI.getString(KEY_RECONCILIATION);
- case IActivity.ACTION_ADD_PRESERVED:
- return UpdateUI.getString(KEY_ADD_PRESERVED);
- default:
- return UpdateUI.getString(KEY_UNKNOWN);
- }
- }
-
- private String getStatusLabel(IActivity activity) {
- switch (activity.getStatus()) {
- case IActivity.STATUS_OK:
- return UpdateUI.getString(KEY_OK);
- case IActivity.STATUS_NOK:
- return UpdateUI.getString(KEY_NOK);
- }
- return UpdateUI.getString(KEY_UNKNOWN);
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/CategoryForm.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/CategoryForm.java
deleted file mode 100644
index bfb94fc..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/CategoryForm.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.forms;
-
-import java.net.URL;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.update.core.*;
-import org.eclipse.update.internal.ui.UpdateUI;
-import org.eclipse.update.internal.ui.model.SiteCategory;
-import org.eclipse.update.internal.ui.pages.UpdateFormPage;
-import org.eclipse.update.internal.ui.views.DetailsView;
-import org.eclipse.update.ui.forms.internal.*;
-
-
-public class CategoryForm extends UpdateWebForm {
- private final static String KEY_TITLE = "CategoryPage.title";
- private final static String KEY_MORE_INFO = "CategoryPage.moreInfo";
- SiteCategory currentCategory;
- Label textLabel;
- SelectableFormLabel link;
-
-public CategoryForm(UpdateFormPage page) {
- super(page);
-}
-
-public void dispose() {
- super.dispose();
-}
-
-public void initialize(Object modelObject) {
- setHeadingText(UpdateUI.getString(KEY_TITLE));
- super.initialize(modelObject);
- //((Composite)getControl()).layout(true);
-}
-
-protected void createContents(Composite parent) {
- HTMLTableLayout layout = new HTMLTableLayout();
- parent.setLayout(layout);
- layout.leftMargin = layout.rightMargin = 10;
- layout.topMargin = 10;
- layout.verticalSpacing = 20;
- layout.numColumns = 1;
- // defect 17123
- //layout.horizontalSpacing = 0;
-
- FormWidgetFactory factory = getFactory();
- textLabel = factory.createLabel(parent, null, SWT.WRAP);
-
- IHyperlinkListener listener;
-
- listener = new HyperlinkAdapter() {
- public void linkActivated(Control link) {
- if (currentCategory==null) return;
- BusyIndicator.showWhile(getControl().getDisplay(),
- new Runnable() {
- public void run() {
- ICategory category = currentCategory.getCategory();
- if (category!=null) {
- IURLEntry info = category.getDescription();
- URL infoURL = info.getURL();
- if (infoURL!=null) {
- DetailsView.showURL(infoURL.toString());
- }
- }
- }
- });
- }
- };
- link = new SelectableFormLabel(parent, SWT.NULL);
- link.setText(UpdateUI.getString(KEY_MORE_INFO));
- factory.turnIntoHyperlink(link, listener);
- link.setVisible(false);
- setFocusControl(link);
- WorkbenchHelp.setHelp(parent, "org.eclipse.update.ui.CategoryForm");
-}
-
-public void expandTo(Object obj) {
- if (obj instanceof SiteCategory) {
- inputChanged((SiteCategory)obj);
- }
-}
-//
-// Defect 17123 - commented out this implementation of inputChanged(...)
-/*private void inputChanged(SiteCategory category) {
- setHeadingText(category.getCategory().getLabel());
- IURLEntry info = category.getCategory().getDescription();
- if (info!=null) {
- String text = info.getAnnotation();
- if (text!=null)
- textLabel.setText(text);
- else
- textLabel.setText("");
- link.setVisible(info.getURL()!=null);
- }
- else {
- textLabel.setText("");
- link.setVisible(false);
- }
- textLabel.getParent().layout();
- ((Composite)getControl()).layout();
- getControl().redraw();
- currentCategory = category;
-}*/
-
-// defect 17123: new implementation of inputChanged(...)
-private void inputChanged(SiteCategory category) {
- setHeadingText(category.getCategory().getLabel());
- IURLEntry info = category.getCategory().getDescription();
- String text = null;
- if (info != null) {
- text = info.getAnnotation();
- if (text != null) {
- Composite parent = textLabel.getParent();
- textLabel.dispose();
- parent.layout();
- textLabel = getFactory().createLabel(parent,text,SWT.WRAP);
- link.setVisible(info.getURL()!= null);
- }
- }
- if (text == null) {
- textLabel.setText("");
- link.setVisible(false);
- }
-
- textLabel.getParent().layout();
- ((Composite)getControl()).layout();
- getControl().redraw();
- currentCategory = category;
-}
-
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/DetailsForm.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/DetailsForm.java
deleted file mode 100644
index 8de020e..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/DetailsForm.java
+++ /dev/null
@@ -1,1385 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.forms;
-
-import java.lang.reflect.InvocationTargetException;
-import java.net.URL;
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Locale;
-import java.util.StringTokenizer;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.PluginVersionIdentifier;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.jface.action.IStatusLineManager;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.SWTException;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IViewSite;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.update.configuration.IConfiguredSite;
-import org.eclipse.update.configuration.IInstallConfiguration;
-import org.eclipse.update.configuration.ILocalSite;
-import org.eclipse.update.core.IFeature;
-import org.eclipse.update.core.IFeatureReference;
-import org.eclipse.update.core.IIncludedFeatureReference;
-import org.eclipse.update.core.ISite;
-import org.eclipse.update.core.SiteManager;
-import org.eclipse.update.core.VersionedIdentifier;
-import org.eclipse.update.internal.ui.UpdatePerspective;
-import org.eclipse.update.internal.ui.UpdateUI;
-import org.eclipse.update.internal.ui.UpdateUIImages;
-import org.eclipse.update.internal.ui.model.IConfiguredSiteContext;
-import org.eclipse.update.internal.ui.model.IFeatureAdapter;
-import org.eclipse.update.internal.ui.model.IUpdateModelChangedListener;
-import org.eclipse.update.internal.ui.model.MissingFeature;
-import org.eclipse.update.internal.ui.model.PendingChange;
-import org.eclipse.update.internal.ui.model.UpdateModel;
-import org.eclipse.update.internal.ui.pages.UpdateFormPage;
-import org.eclipse.update.internal.ui.parts.SWTUtil;
-import org.eclipse.update.internal.ui.preferences.UpdateColors;
-import org.eclipse.update.internal.ui.views.DetailsView;
-import org.eclipse.update.internal.ui.wizards.InstallWizard;
-import org.eclipse.update.internal.ui.wizards.InstallWizardDialog;
-import org.eclipse.update.ui.forms.internal.ExpandableGroup;
-import org.eclipse.update.ui.forms.internal.FormWidgetFactory;
-import org.eclipse.update.ui.forms.internal.HTMLTableLayout;
-import org.eclipse.update.ui.forms.internal.HyperlinkAdapter;
-import org.eclipse.update.ui.forms.internal.HyperlinkHandler;
-import org.eclipse.update.ui.forms.internal.IHyperlinkListener;
-import org.eclipse.update.ui.forms.internal.SelectableFormLabel;
-import org.eclipse.update.ui.forms.internal.TableData;
-
-public class DetailsForm extends PropertyWebForm {
- // NL keys
-
- private static final String KEY_PROVIDER = "FeaturePage.provider"; //$NON-NLS-1$
- private static final String KEY_VERSION = "FeaturePage.version"; //$NON-NLS-1$
- private static final String KEY_IVERSION = "FeaturePage.installedVersion"; //$NON-NLS-1$
- private static final String KEY_PENDING_VERSION =
- "FeaturePage.pendingVersion"; //$NON-NLS-1$
- private static final String KEY_SIZE = "FeaturePage.size"; //$NON-NLS-1$
- private static final String KEY_ESTIMATE = "FeaturePage.estimate"; //$NON-NLS-1$
- private static final String KEY_OS = "FeaturePage.os"; //$NON-NLS-1$
- private static final String KEY_WS = "FeaturePage.ws"; //$NON-NLS-1$
- private static final String KEY_NL = "FeaturePage.nl"; //$NON-NLS-1$
- private static final String KEY_ARCH = "FeaturePage.arch"; //$NON-NLS-1$
- private static final String KEY_PLATFORMS = "FeaturePage.platforms"; //$NON-NLS-1$
- private static final String KEY_DESC = "FeaturePage.description"; //$NON-NLS-1$
- private static final String KEY_INFO_LINK = "FeaturePage.infoLink"; //$NON-NLS-1$
- private static final String KEY_LICENSE_LINK = "FeaturePage.licenseLink"; //$NON-NLS-1$
- private static final String KEY_COPYRIGHT_LINK =
- "FeaturePage.copyrightLink"; //$NON-NLS-1$
- private static final String KEY_NOT_INSTALLED = "FeaturePage.notInstalled"; //$NON-NLS-1$
- private static final String KEY_SIZE_VALUE = "FeaturePage.sizeValue"; //$NON-NLS-1$
- private static final String KEY_ESTIMATE_VALUE =
- "FeaturePage.estimateValue"; //$NON-NLS-1$
- private static final String KEY_MINUTE_ESTIMATE_VALUE =
- "FeaturePage.minuteEstimateValue"; //$NON-NLS-1$
- private static final String KEY_UNKNOWN_SIZE_VALUE =
- "FeaturePage.unknownSizeValue"; //$NON-NLS-1$
- private static final String KEY_UNKNOWN_ESTIMATE_VALUE =
- "FeaturePage.unknownEstimateValue"; //$NON-NLS-1$
- private static final String KEY_DO_UNCONFIGURE =
- "FeaturePage.doButton.unconfigure"; //$NON-NLS-1$
- private static final String KEY_DO_CONFIGURE =
- "FeaturePage.doButton.configure"; //$NON-NLS-1$
- private static final String KEY_DO_REPAIR = "FeaturePage.doButton.repair"; //$NON-NLS-1$
- private static final String KEY_DO_CHANGE = "FeaturePage.doButton.change"; //$NON-NLS-1$
- private static final String KEY_DO_UPDATE = "FeaturePage.doButton.update"; //$NON-NLS-1$
- private static final String KEY_DO_INSTALL = "FeaturePage.doButton.install"; //$NON-NLS-1$
- private static final String KEY_DO_UNINSTALL =
- "FeaturePage.doButton.uninstall"; //$NON-NLS-1$
-
- private static final String KEY_BATCH_UNCONFIGURE =
- "FeaturePage.batchButton.unconfigure"; //$NON-NLS-1$
- private static final String KEY_BATCH_CONFIGURE =
- "FeaturePage.batchButton.configure"; //$NON-NLS-1$
- private static final String KEY_BATCH_REPAIR =
- "FeaturePage.batchButton.repair"; //$NON-NLS-1$
- private static final String KEY_BATCH_CHANGE =
- "FeaturePage.batchButton.change"; //$NON-NLS-1$
- private static final String KEY_BATCH_UPDATE =
- "FeaturePage.batchButton.update"; //$NON-NLS-1$
- private static final String KEY_BATCH_INSTALL =
- "FeaturePage.batchButton.install"; //$NON-NLS-1$
- private static final String KEY_BATCH_UNINSTALL =
- "FeaturePage.batchButton.uninstall"; //$NON-NLS-1$
- private static final String KEY_BATCH = "FeaturePage.batch"; //$NON-NLS-1$
- private static final String KEY_SELECTED_UPDATES =
- "FeaturePage.selectedUpdates"; //$NON-NLS-1$
-
- private static final String KEY_DIALOG_UTITLE = "FeaturePage.dialog.utitle"; //$NON-NLS-1$
- private static final String KEY_DIALOG_TITLE = "FeaturePage.dialog.title"; //$NON-NLS-1$
- private static final String KEY_DIALOG_CTITLE = "FeaturePage.dialog.ctitle"; //$NON-NLS-1$
- private static final String KEY_DIALOG_UCTITLE =
- "FeaturePage.dialog.uctitle"; //$NON-NLS-1$
- private static final String KEY_DIALOG_UMESSAGE =
- "FeaturePage.dialog.umessage"; //$NON-NLS-1$
- private static final String KEY_DIALOG_MESSAGE =
- "FeaturePage.dialog.message"; //$NON-NLS-1$
- private static final String KEY_DIALOG_CMESSAGE =
- "FeaturePage.dialog.cmessage"; //$NON-NLS-1$
- private static final String KEY_DIALOG_UCMESSAGE =
- "FeaturePage.dialog.ucmessage"; //$NON-NLS-1$
- private static final String KEY_MISSING_TITLE = "FeaturePage.missing.title"; //$NON-NLS-1$
- private static final String KEY_MISSING_MESSAGE =
- "FeaturePage.missing.message"; //$NON-NLS-1$
- private static final String KEY_MISSING_SEARCH =
- "FeaturePage.missing.search"; //$NON-NLS-1$
- private static final String KEY_MISSING_ABORT = "FeaturePage.missing.abort"; //$NON-NLS-1$
- private static final String KEY_SEARCH_OBJECT_NAME =
- "FeaturePage.missing.searchObjectName"; //$NON-NLS-1$
- private static final String KEY_OPTIONAL_INSTALL_MESSAGE =
- "FeaturePage.optionalInstall.message"; //$NON-NLS-1$
- private static final String KEY_OPTIONAL_INSTALL_TITLE =
- "FeaturePage.optionalInstall.title"; //$NON-NLS-1$
- //
- private static final int REPAIR = 1;
- private static final int CHANGE = 2;
- private int reinstallCode = 0;
-
- private Label imageLabel;
- private Label providerLabel;
- private Label versionLabel;
- private Label installedVersionLabel;
- private Label sizeLabel;
- private Label estimatedTime;
- private Label osLabel;
- private Label wsLabel;
- private Label nlLabel;
- private Label archLabel;
- private Label descriptionText;
- private Label groupUpdatesLabel;
- private URL infoLinkURL;
- private SelectableFormLabel infoLinkLabel;
- private SelectableFormLabel itemsLink;
- private InfoLink licenseLink;
- private InfoLink copyrightLink;
- private ReflowGroup supportedPlatformsGroup;
- private Image providerImage;
- //private Button uninstallButton;
- private Button addButton;
- private Button doButton;
- private IFeature currentFeature;
- private IFeatureAdapter currentAdapter;
- private ModelListener modelListener;
- private Hashtable imageCache = new Hashtable();
- private HyperlinkHandler sectionHandler;
- private boolean alreadyInstalled;
- private IFeature[] installedFeatures;
- private boolean newerVersion;
- private boolean addBlock;
- private boolean inputBlock;
- private static boolean inProgress;
-
- class ModelListener implements IUpdateModelChangedListener {
- /**
- * @see IUpdateModelChangedListener#objectAdded(Object, Object)
- */
- public void objectsAdded(Object parent, Object[] children) {
- if (isCurrentFeature(children)) {
- SWTUtil.getStandardDisplay().asyncExec(new Runnable() {
- public void run() {
- refresh();
- }
- });
- }
- }
-
- boolean isCurrentFeature(Object[] children) {
- for (int i = 0; i < children.length; i++) {
- Object obj = children[i];
- if (obj instanceof PendingChange) {
- PendingChange job = (PendingChange) obj;
- if (job.getFeature().equals(currentFeature)) {
- return true;
- }
- }
- }
- return false;
- }
-
- /**
- * @see IUpdateModelChangedListener#objectRemoved(Object, Object)
- */
- public void objectsRemoved(Object parent, Object[] children) {
- if (isCurrentFeature(children)) {
- SWTUtil.getStandardDisplay().asyncExec(new Runnable() {
- public void run() {
- //doButton.setEnabled(true);
- refresh();
- }
- });
- }
- }
-
- /**
- * @see IUpdateModelChangedListener#objectChanged(Object, String)
- */
- public void objectChanged(Object object, String property) {
- }
- }
-
- abstract class LinkListener implements IHyperlinkListener {
- public abstract URL getURL();
- public void linkActivated(Control linkLabel) {
- URL url = getURL();
- if (url != null)
- openURL(url.toString());
- }
- public void linkEntered(Control linkLabel) {
- URL url = getURL();
- if (url != null)
- showStatus(url.toString());
- }
- public void linkExited(Control linkLabel) {
- showStatus(null);
- }
-
- private void showStatus(String text) {
- IViewSite site = getPage().getView().getViewSite();
- IStatusLineManager sm = site.getActionBars().getStatusLineManager();
- sm.setMessage(text);
- }
- }
-
- abstract class ReflowGroup extends ExpandableGroup {
- public void expanded() {
- reflow();
- updateSize();
- }
- public void collapsed() {
- reflow();
- updateSize();
- }
- protected SelectableFormLabel createTextLabel(
- Composite parent,
- FormWidgetFactory factory) {
- SelectableFormLabel label = super.createTextLabel(parent, factory);
- label.setFont(JFaceResources.getBannerFont());
- return label;
- }
- protected HyperlinkHandler getHyperlinkHandler(FormWidgetFactory factory) {
- return sectionHandler;
- }
- }
-
- public DetailsForm(UpdateFormPage page) {
- super(page);
- providerImage = UpdateUIImages.DESC_PROVIDER.createImage();
- modelListener = new ModelListener();
- UpdateModel model = UpdateUI.getDefault().getUpdateModel();
- model.addUpdateModelChangedListener(modelListener);
- sectionHandler = new HyperlinkHandler();
- }
-
- public void dispose() {
- UpdateModel model = UpdateUI.getDefault().getUpdateModel();
- model.removeUpdateModelChangedListener(modelListener);
- providerImage.dispose();
- for (Enumeration enum = imageCache.elements();
- enum.hasMoreElements();
- ) {
- Image image = (Image) enum.nextElement();
- image.dispose();
- }
- imageCache.clear();
- sectionHandler.dispose();
- super.dispose();
- }
-
- public void initialize(Object modelObject) {
- setHeadingText(""); //$NON-NLS-1$
- super.initialize(modelObject);
- }
-
- private void configureSectionHandler(
- FormWidgetFactory factory,
- Display display) {
- sectionHandler.setHyperlinkUnderlineMode(
- HyperlinkHandler.UNDERLINE_NEVER);
- sectionHandler.setBackground(factory.getBackgroundColor());
- sectionHandler.setForeground(UpdateColors.getTopicColor(display));
- }
-
- protected void updateHeadings() {
- Control control = getControl();
- if (control==null) return;
- sectionHandler.setForeground(
- UpdateColors.getTopicColor(control.getDisplay()));
- super.updateHeadings();
- }
-
- public void createContents(Composite container) {
- HTMLTableLayout layout = new HTMLTableLayout();
- layout.numColumns = 2;
- container.setLayout(layout);
- //layout.rightMargin = 0;
- GridData gd;
-
- configureSectionHandler(factory, container.getDisplay());
-
- GridLayout glayout = new GridLayout();
- Composite properties = factory.createComposite(container);
- properties.setLayout(glayout);
- glayout.marginWidth = glayout.marginHeight = 0;
- glayout.verticalSpacing = 0;
-
- providerLabel =
- createProperty(properties, UpdateUI.getString(KEY_PROVIDER));
- versionLabel =
- createProperty(properties, UpdateUI.getString(KEY_VERSION));
- installedVersionLabel =
- createProperty(properties, UpdateUI.getString(KEY_IVERSION));
- sizeLabel = createProperty(properties, UpdateUI.getString(KEY_SIZE));
- estimatedTime =
- createProperty(properties, UpdateUI.getString(KEY_ESTIMATE));
- supportedPlatformsGroup = new ReflowGroup() {
- public void fillExpansion(
- Composite expansion,
- FormWidgetFactory factory) {
- GridLayout layout = new GridLayout();
- expansion.setLayout(layout);
- layout.marginWidth = 0;
- osLabel = createProperty(expansion, UpdateUI.getString(KEY_OS));
- wsLabel = createProperty(expansion, UpdateUI.getString(KEY_WS));
- nlLabel = createProperty(expansion, UpdateUI.getString(KEY_NL));
- archLabel =
- createProperty(expansion, UpdateUI.getString(KEY_ARCH));
- }
- };
- supportedPlatformsGroup.setText(UpdateUI.getString(KEY_PLATFORMS));
- new Label(properties, SWT.NULL);
- supportedPlatformsGroup.createControl(properties, factory);
- setFocusControl(supportedPlatformsGroup.getControl());
-
- imageLabel = factory.createLabel(container, null);
- TableData td = new TableData();
- td.align = TableData.CENTER;
- //td.valign = TableData.MIDDLE;
- imageLabel.setLayoutData(td);
-
- Label label = createHeading(container, UpdateUI.getString(KEY_DESC));
- td = new TableData();
- td.colspan = 2;
- label.setLayoutData(td);
- descriptionText = factory.createLabel(container, null, SWT.WRAP);
- td = new TableData();
- td.colspan = 2;
- td.grabHorizontal = true;
- descriptionText.setLayoutData(td);
-
- glayout = new GridLayout();
- glayout.numColumns = 4;
- glayout.horizontalSpacing = 20;
- glayout.marginWidth = 10;
-
- addSeparator(container);
-
- Composite footer = factory.createComposite(container);
- td = new TableData();
- td.colspan = 2;
- td.align = TableData.FILL;
- footer.setLayoutData(td);
- footer.setLayout(glayout);
-
- LinkListener listener = new LinkListener() {
- public URL getURL() {
- return infoLinkURL;
- }
- };
-
- infoLinkLabel = new SelectableFormLabel(footer, SWT.NULL);
- infoLinkLabel.setText(UpdateUI.getString(KEY_INFO_LINK));
- factory.turnIntoHyperlink(infoLinkLabel, listener);
- gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING);
- infoLinkLabel.setLayoutData(gd);
- licenseLink = new InfoLink((DetailsView) getPage().getView());
- licenseLink.setText(UpdateUI.getString(KEY_LICENSE_LINK));
- licenseLink.createControl(footer, factory);
- gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING);
- licenseLink.getControl().setLayoutData(gd);
- copyrightLink = new InfoLink((DetailsView) getPage().getView());
- copyrightLink.setText(UpdateUI.getString(KEY_COPYRIGHT_LINK));
- copyrightLink.createControl(footer, factory);
- gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING);
- copyrightLink.getControl().setLayoutData(gd);
-
- doButton = factory.createButton(footer, "", SWT.PUSH); //$NON-NLS-1$
- doButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- doButtonSelected();
- }
- });
- gd =
- new GridData(
- GridData.HORIZONTAL_ALIGN_CENTER
- | GridData.VERTICAL_ALIGN_BEGINNING);
- gd.grabExcessHorizontalSpace = true;
- doButton.setLayoutData(gd);
-
- Composite batch = factory.createComposite(container);
- glayout = new GridLayout();
- glayout.numColumns = 2;
- glayout.marginWidth = 0;
- glayout.marginHeight = 0;
- batch.setLayout(glayout);
- td = new TableData();
- td.colspan = 2;
- td.align = TableData.FILL;
- //td.grabHorizontal = true;
- batch.setLayoutData(td);
- groupUpdatesLabel = createHeading(batch, UpdateUI.getString(KEY_BATCH));
- gd = new GridData();
- gd.horizontalSpan = 2;
- groupUpdatesLabel.setLayoutData(gd);
- addButton =
- factory.createButton(
- batch,
- UpdateUI.getString(KEY_BATCH_INSTALL),
- SWT.CHECK);
- addButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- if (!addBlock)
- doAdd(addButton.getSelection());
- }
- });
- addButton.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_CENTER));
- itemsLink =
- factory.createSelectableLabel(
- batch,
- UpdateUI.getString(KEY_SELECTED_UPDATES));
- factory.turnIntoHyperlink(itemsLink, new HyperlinkAdapter() {
- public void linkActivated(Control link) {
- openUpdateItems();
- }
- });
- itemsLink.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_CENTER));
-
- //SWTUtil.setButtonDimensionHint(doButton);
- WorkbenchHelp.setHelp(container, "org.eclipse.update.ui.DetailsForm"); //$NON-NLS-1$
-
- }
-
- private void addSeparator(Composite container) {
- Composite l = factory.createCompositeSeparator(container);
- l.setBackground(factory.getBorderColor());
- TableData td = new TableData();
- td.colspan = 2;
- td.heightHint = 1;
- td.align = TableData.FILL;
- l.setLayoutData(td);
- }
-
- private void openUpdateItems() {
- BusyIndicator.showWhile(SWTUtil.getStandardDisplay(), new Runnable() {
- public void run() {
- try {
- IWorkbenchPage page = UpdateUI.getActivePage();
- IViewPart view = page.findView(UpdatePerspective.ID_ITEMS);
- if (view != null)
- page.bringToTop(view);
- else {
- inputBlock = true;
- page.showView(UpdatePerspective.ID_ITEMS);
- inputBlock = false;
- }
- } catch (PartInitException e) {
- UpdateUI.logException(e);
- }
- }
- });
- }
-
- public void expandTo(final Object obj) {
- if (inputBlock)
- return;
- BusyIndicator.showWhile(getControl().getDisplay(), new Runnable() {
- public void run() {
- if (obj instanceof IFeature) {
- currentAdapter = null;
- currentFeature = (IFeature) obj;
- refresh();
- } else if (obj instanceof IFeatureAdapter) {
- IFeatureAdapter adapter = (IFeatureAdapter) obj;
- try {
- currentAdapter = adapter;
- currentFeature = adapter.getFeature(null);
- } catch (CoreException e) {
- //UpdateUI.logException(e);
- currentFeature =
- new MissingFeature(
- adapter.getSite(),
- adapter.getURL());
- } finally {
- refresh();
- }
- } else {
- currentFeature = null;
- currentAdapter = null;
- refresh();
- }
- }
- });
- }
-
- private boolean isConfigured(IFeature feature) {
- ISite site = feature.getSite();
- IConfiguredSite csite = site.getCurrentConfiguredSite();
- if (csite == null)
- return false;
- return csite.isConfigured(feature);
- }
-
- private String getInstalledVersionText(IFeature feature) {
- alreadyInstalled = false;
- VersionedIdentifier vid = feature.getVersionedIdentifier();
- PluginVersionIdentifier version = vid.getVersion();
- newerVersion = installedFeatures.length > 0;
-
- StringBuffer buf = new StringBuffer();
- for (int i = 0; i < installedFeatures.length; i++) {
- IFeature installedFeature = installedFeatures[i];
- boolean enabled = isConfigured(installedFeature);
- VersionedIdentifier ivid =
- installedFeature.getVersionedIdentifier();
- if (buf.length() > 0)
- buf.append(", "); //$NON-NLS-1$
- PluginVersionIdentifier iversion = ivid.getVersion();
- buf.append(iversion.toString());
- if (!enabled) {
- buf.append(" "); //$NON-NLS-1$
- buf.append(UpdateUI.getString("FeaturePage.disabledVersion")); //$NON-NLS-1$
- }
- if (ivid.equals(vid)) {
- alreadyInstalled = true;
- } else {
- if (iversion.isGreaterOrEqualTo(version))
- newerVersion = false;
- }
- }
- if (buf.length() > 0) {
- String versionText = buf.toString();
- UpdateModel model = UpdateUI.getDefault().getUpdateModel();
- PendingChange change = model.findRelatedPendingChange(feature);
- if (change != null) {
- return UpdateUI.getFormattedMessage(
- KEY_PENDING_VERSION,
- versionText);
- } else
- return versionText;
- } else
- return null;
- }
-
- private void refresh() {
- IFeature feature = currentFeature;
-
- if (feature == null)
- return;
-
- installedFeatures = UpdateUI.getInstalledFeatures(feature);
- if (installedFeatures.length == 0)
- installedFeatures = UpdateUI.getInstalledFeatures(feature, false);
-
- setHeadingText(feature.getLabel());
- providerLabel.setText(feature.getProvider());
- versionLabel.setText(
- feature.getVersionedIdentifier().getVersion().toString());
- String installedVersion = getInstalledVersionText(feature);
- if (installedVersion == null)
- installedVersion = UpdateUI.getString(KEY_NOT_INSTALLED);
- installedVersionLabel.setText(installedVersion);
- long size = feature.getDownloadSize();
- String sizeText;
- if (size != -1) {
- String stext = Long.toString(size);
- sizeText = UpdateUI.getFormattedMessage(KEY_SIZE_VALUE, stext);
- } else {
- sizeText = UpdateUI.getString(KEY_UNKNOWN_SIZE_VALUE);
- }
- sizeLabel.setText(sizeText);
- estimatedTime.setText(getEstimatedTimeText(feature, size));
-
- if (feature.getDescription() != null
- && feature.getDescription().getAnnotation() != null)
- descriptionText.setText(feature.getDescription().getAnnotation());
- else
- descriptionText.setText(""); //$NON-NLS-1$
-
- Image logoImage = loadProviderImage(feature);
- if (logoImage == null)
- logoImage = providerImage;
- imageLabel.setImage(logoImage);
- infoLinkURL = null;
- if (feature.getDescription() != null)
- infoLinkURL = feature.getDescription().getURL();
- infoLinkLabel.setVisible(infoLinkURL != null);
-
- setOS(feature.getOS());
- setWS(feature.getWS());
- setNL(feature.getNL());
- setArch(feature.getOSArch());
-
- licenseLink.setInfo(feature.getLicense());
- copyrightLink.setInfo(feature.getCopyright());
- this.reinstallCode = 0;
-
- UpdateModel model = UpdateUI.getDefault().getUpdateModel();
- PendingChange relatedJob =
- model.findRelatedPendingChange(currentFeature);
- doButton.setVisible(getDoButtonVisibility(false, relatedJob));
- addButton.setVisible(getDoButtonVisibility(true, relatedJob));
- itemsLink.setVisible(addButton.isVisible());
- groupUpdatesLabel.setVisible(addButton.isVisible());
- if (addButton.isVisible()) {
- if (relatedJob != null) {
- IFeature relatedFeature = relatedJob.getFeature();
- addButton.setEnabled(
- currentFeature.getVersionedIdentifier().equals(
- relatedFeature.getVersionedIdentifier()));
- } else
- addButton.setEnabled(true);
- }
- addBlock = true;
- addButton.setSelection(
- relatedJob != null && relatedJob.isProcessed() == false);
- addBlock = false;
- updateButtonText(newerVersion);
- reflow();
- updateSize();
- ((Composite) getControl()).redraw();
- }
-
- private String getEstimatedTimeText(IFeature feature, long size) {
- long estimate = SiteManager.getEstimatedTransferRate(feature.getURL());
- String estimateFormat = null;
- if (estimate >= 0 && size != -1) {
- long nhours = estimate / 3600000;
- long nminutes = estimate % 3600000;
-
- if (nhours == 0 && nminutes == 0) {
- estimateFormat = UpdateUI.getString(KEY_MINUTE_ESTIMATE_VALUE);
- } else {
- String hours = Long.toString(nhours);
- String minutes = Long.toString(nminutes);
-
- estimateFormat =
- UpdateUI.getFormattedMessage(
- KEY_ESTIMATE_VALUE,
- new String[] { hours, minutes });
- }
- } else {
- estimateFormat = UpdateUI.getString(KEY_UNKNOWN_ESTIMATE_VALUE);
- }
- return estimateFormat;
- }
-
- private boolean getDoButtonVisibility(
- boolean add,
- PendingChange relatedJob) {
- if (currentFeature instanceof MissingFeature) {
- MissingFeature mf = (MissingFeature) currentFeature;
- if (mf.isOptional() && mf.getOriginatingSiteURL() != null)
- return add ? false : true;
- else
- return false;
- }
-
- if (currentAdapter == null)
- return false;
-
- boolean localContext = currentAdapter instanceof IConfiguredSiteContext;
-
- if (currentAdapter.isIncluded()) {
- if (!localContext)
- return false;
- if (!currentAdapter.isOptional())
- return false;
- }
-
- if (localContext) {
- IConfiguredSiteContext context =
- (IConfiguredSiteContext) currentAdapter;
- if (!context.getInstallConfiguration().isCurrent())
- return false;
- if (context.getConfiguredSite().isEnabled() == false)
- return false;
- }
-
- if (relatedJob != null) {
- /*if (add)
- return false;
- */
- if (relatedJob.isProcessed())
- return false;
- }
-
- if (localContext) {
- IConfiguredSiteContext context =
- (IConfiguredSiteContext) currentAdapter;
- if (!context.getInstallConfiguration().isCurrent())
- return false;
- else
- return true;
- } else {
- // found on a remote site
- // Cannot install feature without a license
- /* Commenting - license is now checked in
- * ActivityConstraints - bug #33582
-
- if (!UpdateModel.hasLicense(currentFeature))
- return false;
- */
- }
- // Random site feature
- if (alreadyInstalled) {
- if (isBrokenFeatureUpdate()) {
- reinstallCode = REPAIR;
- return true;
- }
- if (isOptionalFeatureInstall()) {
- reinstallCode = CHANGE;
- return true;
- }
- return false;
- }
- // Not installed - check if there are other
- // features with this ID that are installed
- // and that are newer than this one
- if (installedFeatures.length > 0 && !newerVersion)
- return false;
- return true;
- }
-
- private boolean isBrokenFeatureUpdate() {
- if (installedFeatures.length != 1)
- return false;
- IFeature installedFeature = installedFeatures[0];
- if (installedFeature
- .getVersionedIdentifier()
- .equals(currentFeature.getVersionedIdentifier())) {
- return isBroken(installedFeature);
- }
- return false;
- }
-
- private boolean isBroken(IFeature feature) {
- try {
- IStatus status =
- SiteManager.getLocalSite().getFeatureStatus(feature);
- if (status != null && status.getSeverity() == IStatus.ERROR)
- return true;
- } catch (CoreException e) {
- }
- return false;
- }
-
- private boolean isOptionalFeatureInstall() {
- return hasMissingOptionalFeatures(installedFeatures[0]);
- }
-
- private boolean hasMissingOptionalFeatures(IFeature feature) {
- try {
- IIncludedFeatureReference refs[] =
- feature.getIncludedFeatureReferences();
- for (int i = 0; i < refs.length; i++) {
- IIncludedFeatureReference ref = refs[i];
-
- try {
- IFeature child = ref.getFeature(null);
-
- // not missing - try children
- if (hasMissingOptionalFeatures(child))
- return true;
- } catch (CoreException e) {
- // missing - if optional, return true
- if (ref.isOptional())
- return true;
- }
- }
- } catch (CoreException e) {
- // problem with the feature itself
- }
- return false;
- }
-
- private boolean getUninstallButtonVisibility() {
- /*
- * We will not allow uninstalls for now.
- if (currentFeature instanceof MissingFeature)
- return false;
- if (currentAdapter == null || currentAdapter.isIncluded())
- return false;
- UpdateModel model = UpdateUI.getDefault().getUpdateModel();
- if (model.isPending(currentFeature))
- return false;
- if (currentAdapter instanceof IConfiguredSiteContext) {
- boolean configured = isConfigured();
- return !configured;
- }
- */
- return false;
- }
-
- private boolean isConfigured() {
- if (currentAdapter instanceof IConfiguredSiteContext) {
- IConfiguredSiteContext context =
- (IConfiguredSiteContext) currentAdapter;
- IConfiguredSite csite = context.getConfiguredSite();
- IFeatureReference fref =
- csite.getSite().getFeatureReference(currentFeature);
- IFeatureReference[] cfeatures = csite.getConfiguredFeatures();
- for (int i = 0; i < cfeatures.length; i++) {
- if (cfeatures[i].equals(fref))
- return true;
- }
- }
- return false;
- }
-
- private void updateButtonText(boolean update) {
- if (reinstallCode == REPAIR) {
- doButton.setText(UpdateUI.getString(KEY_DO_REPAIR));
- addButton.setText(UpdateUI.getString(KEY_BATCH_REPAIR));
- return;
- }
- if (reinstallCode == CHANGE) {
- doButton.setText(UpdateUI.getString(KEY_DO_CHANGE));
- addButton.setText(UpdateUI.getString(KEY_BATCH_CHANGE));
- return;
- }
- if (currentFeature instanceof MissingFeature) {
- MissingFeature mf = (MissingFeature) currentFeature;
- if (mf.isOptional() && mf.getOriginatingSiteURL() != null) {
- doButton.setText(UpdateUI.getString(KEY_DO_INSTALL));
- return;
- }
- }
- if (currentAdapter instanceof IConfiguredSiteContext) {
- boolean configured = isConfigured();
- if (configured) {
- doButton.setText(UpdateUI.getString(KEY_DO_UNCONFIGURE));
- addButton.setText(UpdateUI.getString(KEY_BATCH_UNCONFIGURE));
- } else {
- doButton.setText(UpdateUI.getString(KEY_DO_CONFIGURE));
- addButton.setText(UpdateUI.getString(KEY_BATCH_CONFIGURE));
- }
- } else if (update && !alreadyInstalled) {
- doButton.setText(UpdateUI.getString(KEY_DO_UPDATE));
- addButton.setText(UpdateUI.getString(KEY_BATCH_UPDATE));
- } else {
- doButton.setText(UpdateUI.getString(KEY_DO_INSTALL));
- addButton.setText(UpdateUI.getString(KEY_BATCH_INSTALL));
- }
- }
-
- private Image loadProviderImage(IFeature feature) {
- Image image = null;
- URL imageURL = feature.getImage();
- if (imageURL == null)
- return null;
- // check table
- image = (Image) imageCache.get(imageURL);
- if (image == null) {
- ImageDescriptor id = ImageDescriptor.createFromURL(imageURL);
- try {
- image = id.createImage();
- } catch (SWTException e) {
- image = null;
- }
- if (image != null)
- imageCache.put(imageURL, image);
- }
- return image;
- }
-
- private void reflow() {
- versionLabel.getParent().layout(true);
- doButton.getParent().layout(true);
- imageLabel.getParent().layout(true);
- ((Composite) getControl()).layout(true);
- }
-
- private void setOS(String os) {
- if (os == null)
- osLabel.setText(UpdateUI.getString("FeaturePage.all")); //$NON-NLS-1$
- else {
- String[] array = getTokens(os);
- StringBuffer buf = new StringBuffer();
- for (int i = 0; i < array.length; i++) {
- if (i > 0)
- buf.append("\n"); //$NON-NLS-1$
- buf.append(mapOS(array[i]));
- }
- osLabel.setText(buf.toString());
- }
- }
-
- private String mapOS(String key) {
- return key;
- }
-
- private String mapWS(String key) {
- return key;
- }
-
- private String mapArch(String key) {
- return key;
- }
-
- private String mapNL(String nl) {
- String language, country;
-
- int loc = nl.indexOf('_');
- if (loc != -1) {
- language = nl.substring(0, loc);
- country = nl.substring(loc + 1);
- } else {
- language = nl;
- country = ""; //$NON-NLS-1$
- }
- Locale locale = new Locale(language, country);
- return locale.getDisplayName();
- }
-
- private void setWS(String ws) {
- if (ws == null)
- wsLabel.setText(UpdateUI.getString("FeaturePage.all")); //$NON-NLS-1$
- else {
- String[] array = getTokens(ws);
- StringBuffer buf = new StringBuffer();
- for (int i = 0; i < array.length; i++) {
- if (i > 0)
- buf.append("\n"); //$NON-NLS-1$
- buf.append(mapWS(array[i]));
- }
- wsLabel.setText(buf.toString());
- }
- }
-
- private void setArch(String arch) {
- if (arch == null)
- archLabel.setText(UpdateUI.getString("FeaturePage.all")); //$NON-NLS-1$
- else {
- String[] array = getTokens(arch);
- StringBuffer buf = new StringBuffer();
- for (int i = 0; i < array.length; i++) {
- if (i > 0)
- buf.append("\n"); //$NON-NLS-1$
- buf.append(mapArch(array[i]));
- }
- archLabel.setText(buf.toString());
- }
- }
-
- private void setNL(String nl) {
- if (nl == null)
- nlLabel.setText(UpdateUI.getString("FeaturePage.all")); //$NON-NLS-1$
- else {
- String[] array = getTokens(nl);
- StringBuffer buf = new StringBuffer();
- for (int i = 0; i < array.length; i++) {
- if (i > 0)
- buf.append("\n"); //$NON-NLS-1$
- buf.append(mapNL(array[i]));
- }
- nlLabel.setText(buf.toString());
- }
- }
-
- private String[] getTokens(String source) {
- Vector result = new Vector();
- StringTokenizer stok = new StringTokenizer(source, ","); //$NON-NLS-1$
- while (stok.hasMoreTokens()) {
- String tok = stok.nextToken();
- result.add(tok);
- }
- return (String[]) result.toArray(new String[result.size()]);
- }
-
- private void openURL(final String url) {
- BusyIndicator.showWhile(getControl().getDisplay(), new Runnable() {
- public void run() {
- DetailsView.showURL(url);
- }
- });
- }
-
- private void doAdd(boolean selection) {
- UpdateModel model = UpdateUI.getDefault().getUpdateModel();
- if (selection) {
- int mode = getCurrentJobType();
- PendingChange job = createPendingChange(mode);
- if (!checkEnabledDuplicates(job)) {
- addButton.setSelection(false);
- return;
- }
- model.addPendingChange(job);
- } else {
- PendingChange job = model.findRelatedPendingChange(currentFeature);
- if (job != null)
- model.removePendingChange(job);
- }
- }
-
- private void doUninstall() {
- executeJob(PendingChange.UNINSTALL);
- }
-
- private void executeJob(int mode) {
- if (currentFeature != null) {
- PendingChange job = createPendingChange(mode);
- touchChildren(getControl().getShell(), currentFeature);
- executeJob(getControl().getShell(), job, true);
- }
- }
-
- private void executeOptionalInstall(MissingFeature mf) {
- VersionedIdentifier vid = mf.getVersionedIdentifier();
- URL siteURL = mf.getOriginatingSiteURL();
- IConfiguredSite targetSite = null;
- if (mf.getParent() != null) {
- ISite psite = mf.getParent().getSite();
- targetSite = psite.getCurrentConfiguredSite();
- }
- IFeature feature =
- fetchFeatureFromServer(getControl().getShell(), siteURL, vid);
- if (feature != null) {
- PendingChange job = new PendingChange(feature, targetSite);
- executeJob(getControl().getShell(), job, true);
- }
- }
-
- public static IFeature fetchFeatureFromServer(
- Shell shell,
- final URL siteURL,
- final VersionedIdentifier vid) {
- // Locate remote site, find the optional feature
- // and install it
-
- final IFeature[] result = new IFeature[1];
- final CoreException[] exception = new CoreException[1];
- final boolean aborted[] = new boolean[1];
- aborted[0] = false;
-
- IRunnableWithProgress op = new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException {
- try {
- monitor.beginTask(UpdateUI.getString("DetailsForm.locatingFeature"), 3); //$NON-NLS-1$
- ISite site = SiteManager.getSite(siteURL, new SubProgressMonitor(monitor, 1));
- if (site==null || monitor.isCanceled()) {
- aborted[0] = true;
- return;
- }
- IFeatureReference[] refs = site.getFeatureReferences();
- result[0] = findFeature(vid, refs, new SubProgressMonitor(monitor, 1));
- if (result[0]!=null) {
- monitor.setTaskName(UpdateUI.getString("DetailsForm.downloadingInfo")); //$NON-NLS-1$
- touchFeatureChildren(result[0], new SubProgressMonitor(monitor, 1));
- }
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- }
- finally {
- monitor.done();
- }
- }
- };
-
- ProgressMonitorDialog pmd = new ProgressMonitorDialog(shell);
- try {
- pmd.run(true, true, op);
- }
- catch (InterruptedException e) {
- return null;
- }
- catch (InvocationTargetException e) {
- UpdateUI.logException(e);
- return null;
- }
- IStatus status = null;
- if (result[0] != null) {
- return result[0];
- } else if (!aborted[0]) {
- String message =
- UpdateUI.getFormattedMessage(
- KEY_OPTIONAL_INSTALL_MESSAGE,
- siteURL.toString());
- status =
- new Status(
- IStatus.ERROR,
- UpdateUI.PLUGIN_ID,
- IStatus.OK,
- message,
- null);
- }
- if (status != null) {
- // Show error dialog
- ErrorDialog.openError(
- shell,
- UpdateUI.getString(KEY_OPTIONAL_INSTALL_TITLE),
- null,
- status);
- }
- return null;
- }
-
- private static IFeature findFeature(
- VersionedIdentifier vid,
- IFeatureReference[] refs,
- IProgressMonitor monitor) {
-
- monitor.beginTask("", refs.length*2); //$NON-NLS-1$
-
- for (int i = 0; i < refs.length; i++) {
- IFeatureReference ref = refs[i];
- try {
- VersionedIdentifier refVid = ref.getVersionedIdentifier();
- if (refVid.equals(vid)) {
- return ref.getFeature(null);
- }
- monitor.worked(1);
- // Try children
- IFeature feature = ref.getFeature(null);
- IFeatureReference[] irefs =
- feature.getIncludedFeatureReferences();
- IFeature result = findFeature(vid, irefs, new SubProgressMonitor(monitor, 1));
- if (result != null)
- return result;
- } catch (CoreException e) {
- }
- }
- return null;
- }
-
- private void touchChildren(Shell shell, final IFeature feature) {
- IRunnableWithProgress op = new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) {
- monitor.beginTask(UpdateUI.getString("DetailsForm.downloadingIncluded"), 1); //$NON-NLS-1$
- try {
- touchFeatureChildren(feature, new SubProgressMonitor(monitor, 1));
- }
- catch (CoreException e) {
- // ignore
- }
- finally {
- monitor.done();
- }
- }
- };
- try {
- ProgressMonitorDialog pmd = new ProgressMonitorDialog(shell);
- pmd.run(true, false, op);
- }
- catch (InvocationTargetException e) {
- }
- catch (InterruptedException e) {
- }
- }
-
- private static void touchFeatureChildren(IFeature feature, IProgressMonitor monitor) throws CoreException {
- IFeatureReference[] irefs =
- feature.getIncludedFeatureReferences();
- if (irefs.length>0) {
- monitor.beginTask("", irefs.length*2); //$NON-NLS-1$
- for (int i=0; i<irefs.length; i++) {
- IFeatureReference iref = irefs[i];
- IFeature child = iref.getFeature(null);
- monitor.worked(1);
- touchFeatureChildren(child, new SubProgressMonitor(monitor, 1));
- }
- }
- else {
- monitor.beginTask("", 1); //$NON-NLS-1$
- monitor.worked(1);
- }
- }
-
- public static boolean isInProgress() {
- return inProgress;
- }
-
- public static boolean executeJob(
- Shell shell,
- final PendingChange job,
- final boolean needLicensePage) {
- if (inProgress) {
- return true;
- }
- inProgress = true;
-
- IStatus validationStatus =
- ActivityConstraints.validatePendingChange(job);
- if (validationStatus != null) {
- ErrorDialog.openError(
- UpdateUI.getActiveWorkbenchShell(),
- null,
- null,
- validationStatus);
- inProgress = false;
- return false;
- }
- if (!checkEnabledDuplicates(job)) {
- inProgress = false;
- return false;
- }
-
- if (job.getJobType() == PendingChange.UNCONFIGURE
- && job.getFeature().isPatch()) {
- unconfigurePatch(shell, job.getFeature());
- inProgress = false;
- return false;
- }
- BusyIndicator.showWhile(shell.getDisplay(), new Runnable() {
- public void run() {
- InstallWizard wizard = new InstallWizard(job, needLicensePage);
- WizardDialog dialog =
- new InstallWizardDialog(
- UpdateUI.getActiveWorkbenchShell(),
- wizard);
- dialog.create();
- dialog.getShell().setSize(600, 500);
- dialog.open();
- inProgress = false;
- if (wizard.isSuccessfulInstall())
- UpdateUI.informRestartNeeded();
- }
- });
- return false;
- }
-
- private static void unconfigurePatch(Shell shell, IFeature feature) {
- IInstallConfiguration config =
- UpdateUI.getBackupConfigurationFor(feature);
- if (config == null) {
- String message =
- UpdateUI.getString("DetailsForm.featureAPatch"); //$NON-NLS-1$
- MessageDialog.openError(shell, UpdateUI.getString("DetailsForm.disableFeature.title"), message); //$NON-NLS-1$
- return;
- }
- try {
- ILocalSite localSite = SiteManager.getLocalSite();
- boolean success = RevertSection.performRevert(config, false, false);
- if (success) {
- localSite.removeFromPreservedConfigurations(config);
- localSite.save();
- UpdateUI.informRestartNeeded();
- }
- } catch (CoreException e) {
- UpdateUI.logException(e);
- }
- }
-
- private void doButtonSelected() {
- if (currentFeature != null) {
- if (currentFeature instanceof MissingFeature) {
- MissingFeature mf = (MissingFeature) currentFeature;
- if (mf.isOptional() && mf.getOriginatingSiteURL() != null) {
- executeOptionalInstall(mf);
- return;
- }
- }
- int mode;
- if (currentAdapter instanceof IConfiguredSiteContext) {
- boolean configured = isConfigured();
- if (configured)
- mode = PendingChange.UNCONFIGURE;
- else
- mode = PendingChange.CONFIGURE;
- } else {
- mode = PendingChange.INSTALL;
- }
- executeJob(mode);
- }
- }
-
- private int getCurrentJobType() {
- int mode;
- if (currentAdapter instanceof IConfiguredSiteContext) {
- boolean configured = isConfigured();
- if (configured)
- mode = PendingChange.UNCONFIGURE;
- else
- mode = PendingChange.CONFIGURE;
- } else {
- mode = PendingChange.INSTALL;
- }
- return mode;
- }
-
- private PendingChange createPendingChange(int type) {
- if (type == PendingChange.INSTALL && installedFeatures.length > 0) {
- return new PendingChange(
- installedFeatures[0],
- currentFeature,
- alreadyInstalled);
- } else {
- return new PendingChange(currentFeature, type);
- }
- }
-
- private static boolean checkEnabledDuplicates(PendingChange job) {
- if (job.getJobType() != PendingChange.CONFIGURE)
- return true;
- IFeature[] installedEnabledFeatures =
- UpdateUI.getInstalledFeatures(job.getFeature(), true);
- if (installedEnabledFeatures.length == 0)
- return true;
-
- String title =
- UpdateUI.getString("FeaturePage.duplicatesEnabled.title"); //$NON-NLS-1$
- String message =
- UpdateUI.getString("FeaturePage.duplicatesEnabled.message"); //$NON-NLS-1$
- MessageDialog dialog =
- new MessageDialog(
- UpdateUI.getActiveWorkbenchShell(),
- title,
- null,
- // accept the default window icon
- message,
- MessageDialog.WARNING,
- new String[] {
- IDialogConstants.OK_LABEL,
- IDialogConstants.CANCEL_LABEL },
- 0);
- // OK is the default
- return dialog.open() == 0;
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/DetailsHistory.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/DetailsHistory.java
deleted file mode 100644
index 9a86b35..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/DetailsHistory.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.forms;
-import java.util.*;
-
-public class DetailsHistory {
- private final static int MAX_SIZE = 50;
- private LinkedList history;
- private int current = -1;
-
- public DetailsHistory() {
- history = new LinkedList();
- }
-
- private void resetIterator() {
- current = history.size() -1;
- }
-
- public void add(DetailsHistoryItem item) {
- if (history.isEmpty() ||
- history.getLast().equals(item)==false) {
- //System.out.println("Item added: "+item);
- history.addLast(item);
- if (history.size() > MAX_SIZE)
- history.removeFirst();
- }
- resetIterator();
- }
- public void add(String pageId, Object input) {
- this.add(new DetailsHistoryItem(pageId, input));
- }
- public boolean hasNext() {
- //if (iterator==null) return false;
- //return iterator.hasNext();
- if (current== -1) return false;
- if (current == history.size()-1) return false;
- return true;
- }
- public boolean hasPrevious() {
- //if (iterator==null) return false;
- //return iterator.hasPrevious();
- if (current == -1) return false;
- return (current>0);
- }
- public DetailsHistoryItem getNext() {
- if (hasNext()) {
- DetailsHistoryItem item = (DetailsHistoryItem)history.get(++current);
- //System.out.println("Next returned: "+item);
- return item;
- }
- return null;
- }
- public DetailsHistoryItem getPrevious() {
- if (hasPrevious()) {
- DetailsHistoryItem item = (DetailsHistoryItem)history.get(--current);
- //System.out.println("Prev returned: "+item);
- return item;
- }
- return null;
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/DetailsHistoryItem.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/DetailsHistoryItem.java
deleted file mode 100644
index 55c33f4..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/DetailsHistoryItem.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.forms;
-public class DetailsHistoryItem {
- private String pageId;
- private Object input;
-
- public DetailsHistoryItem(String pageId, Object input) {
- this.pageId = pageId;
- this.input = input;
- }
-
- public String getPageId() {
- return pageId;
- }
-
- public Object getInput() {
- return input;
- }
- public boolean equals(Object itemObj) {
- if (itemObj instanceof DetailsHistoryItem) {
- DetailsHistoryItem item = (DetailsHistoryItem)itemObj;
- if (!pageId.equals(item.getPageId())) return false;
- if (input==null && item.getInput()==null) return true;
- if (input.equals(item.getInput())) return true;
- }
- return false;
- }
- public String toString() {
- return pageId+", "+input;
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/DiscoveryFolderForm.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/DiscoveryFolderForm.java
deleted file mode 100644
index 596ff5f..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/DiscoveryFolderForm.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.forms;
-
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.update.internal.ui.UpdateUI;
-import org.eclipse.update.internal.ui.model.SiteBookmark;
-import org.eclipse.update.internal.ui.pages.UpdateFormPage;
-import org.eclipse.update.ui.forms.internal.*;
-
-
-
-public class DiscoveryFolderForm extends UpdateWebForm {
- private SiteBookmark currentBookmark;
- private static final String KEY_TITLE = "DiscoveryFolderPage.title";
- private static final String KEY_DESC = "DiscoveryFolderPage.desc";
-
-public DiscoveryFolderForm(UpdateFormPage page) {
- super(page);
-}
-
-public void dispose() {
- super.dispose();
-}
-
-public void initialize(Object modelObject) {
- setHeadingText(UpdateUI.getString(KEY_TITLE));
- super.initialize(modelObject);
-}
-
-protected void createContents(Composite parent) {
- HTMLTableLayout layout = new HTMLTableLayout();
- parent.setLayout(layout);
- layout.leftMargin = layout.rightMargin = 10;
- layout.topMargin = 10;
- layout.verticalSpacing = 20;
- // defect 13686
- //layout.horizontalSpacing = 0;
- layout.numColumns = 3;
-
- FormWidgetFactory factory = getFactory();
-
- Label text = factory.createLabel(parent, null, SWT.WRAP);
- text.setText(UpdateUI.getString(KEY_DESC));
- WorkbenchHelp.setHelp(parent, "org.eclipse.update.ui.DiscoveryFolderForm");
-}
-
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/ExtensionRootForm.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/ExtensionRootForm.java
deleted file mode 100644
index 3660730..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/ExtensionRootForm.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.forms;
-
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.update.internal.ui.UpdateUI;
-import org.eclipse.update.internal.ui.model.*;
-import org.eclipse.update.internal.ui.pages.UpdateFormPage;
-import org.eclipse.update.ui.forms.internal.*;
-import org.eclipse.update.ui.forms.internal.engine.FormEngine;
-
-public class ExtensionRootForm extends UpdateWebForm {
- private SiteBookmark currentBookmark;
- private static final String KEY_TITLE = "ExtensionRootPage.title";
- private static final String KEY_DESC = "ExtensionRootPage.desc";
- private Label path;
-
- public ExtensionRootForm(UpdateFormPage page) {
- super(page);
- }
-
- public void dispose() {
- super.dispose();
- }
-
- public void initialize(Object modelObject) {
- setHeadingText(UpdateUI.getString(KEY_TITLE));
- super.initialize(modelObject);
- }
-
- protected void createContents(Composite parent) {
- HTMLTableLayout layout = new HTMLTableLayout();
- parent.setLayout(layout);
- layout.leftMargin = layout.rightMargin = 10;
- layout.topMargin = 10;
- layout.verticalSpacing = 20;
- // defect 13686
- //layout.horizontalSpacing = 0;
- layout.numColumns = 3;
-
- FormWidgetFactory factory = getFactory();
-
- path = factory.createHeadingLabel(parent, "");
- TableData td = new TableData();
- td.colspan = 3;
- path.setLayoutData(td);
-
- FormEngine engine = factory.createFormEngine(parent);
- String markup = UpdateUI.getString(KEY_DESC);
- markup = "<form>"+markup+"</form>";
- engine.load(markup, true, true);
- td = new TableData();
- td.colspan = 3;
- setFocusControl(engine);
- engine.setLayoutData(td);
- WorkbenchHelp.setHelp(parent, "org.eclipse.update.ui.ExtensionRootForm");
- }
-
- public void expandTo(Object obj) {
- if (obj instanceof ExtensionRoot) {
- inputChanged((ExtensionRoot) obj);
- }
- }
-
- private void inputChanged(ExtensionRoot extensionRoot) {
- path.setText(extensionRoot.getInstallableDirectory().getPath());
- path.getParent().layout();
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/IUpdateForm.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/IUpdateForm.java
deleted file mode 100644
index 999d23c..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/IUpdateForm.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.forms;
-import org.eclipse.update.internal.ui.pages.IUpdateFormPage;
-import org.eclipse.update.ui.forms.internal.IForm;
-
-public interface IUpdateForm extends IForm {
- public IUpdateFormPage getPage();
-
-}
-
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/InfoLink.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/InfoLink.java
deleted file mode 100644
index fb9532c..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/InfoLink.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.forms;
-import java.net.URL;
-
-import org.eclipse.swt.widgets.*;
-import org.eclipse.update.core.IURLEntry;
-import org.eclipse.update.internal.ui.views.DetailsView;
-import org.eclipse.update.ui.forms.internal.*;
-
-public class InfoLink extends HyperlinkAdapter {
- private IURLEntry info;
- private SelectableFormLabel linkLabel;
- private DetailsView view;
- private boolean visible = true;
- private String text="";
-
- public InfoLink(DetailsView view) {
- this.view = view;
- }
-
- public void createControl(Composite composite, FormWidgetFactory factory) {
- linkLabel = factory.createSelectableLabel(composite, text);
- factory.turnIntoHyperlink(linkLabel, this);
- linkLabel.setVisible(visible);
- }
-
- public Control getControl() {
- return linkLabel;
- }
-
- public void linkActivated(Control link) {
- if (info==null) return;
- URL url = info.getURL();
- if (url!=null) {
- DetailsView.showURL(url.toString());
- return;
- }
- String annotation = info.getAnnotation();
- if (annotation !=null && annotation.length()>0) {
- view.showText(annotation);
- }
- }
-
- public void setInfo(IURLEntry info) {
- this.info = info;
- if (info!=null) {
- boolean hasText = info.getAnnotation()!=null && info.getAnnotation().length()>0;
- boolean hasURL = info.getURL()!=null;
- setVisible(hasText || hasURL);
- }
- else setVisible(false);
- }
-
- private void setVisible(boolean visible) {
- this.visible = visible;
- if (linkLabel!=null) {
- linkLabel.setVisible(visible);
- }
- }
- /**
- * Gets the text.
- * @return Returns a String
- */
- public String getText() {
- return text;
- }
-
- /**
- * Sets the text.
- * @param text The text to set
- */
- public void setText(String text) {
- this.text = text;
- if (linkLabel != null) {
- linkLabel.setText(text);
- }
- }
-
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/InstallConfigurationForm.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/InstallConfigurationForm.java
deleted file mode 100644
index 8c8dae5..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/InstallConfigurationForm.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.forms;
-
-import java.util.Date;
-
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.update.configuration.IInstallConfiguration;
-import org.eclipse.update.core.Utilities;
-import org.eclipse.update.internal.ui.UpdateUI;
-import org.eclipse.update.internal.ui.model.*;
-import org.eclipse.update.internal.ui.pages.UpdateFormPage;
-import org.eclipse.update.internal.ui.parts.SWTUtil;
-import org.eclipse.update.ui.forms.internal.*;
-
-public class InstallConfigurationForm extends PropertyWebForm {
- private static final String KEY_CREATED_ON =
- "InstallConfigurationPage.createdOn";
- private static final String KEY_CURRENT_CONFIG =
- "InstallConfigurationPage.currentConfig";
- private static final String KEY_YES = "InstallConfigurationPage.yes";
- private static final String KEY_NO = "InstallConfigurationPage.no";
-
- private IInstallConfiguration currentConfiguration;
- private Label dateLabel;
- private Label currentLabel;
- private ActivitySection activitySection;
- private RevertSection revertSection;
- private PreserveSection preserveSection;
- private IUpdateModelChangedListener modelListener;
-
- public InstallConfigurationForm(UpdateFormPage page) {
- super(page);
- }
-
- public void dispose() {
- super.dispose();
- }
-
- public void initialize(Object modelObject) {
- setHeadingText("");
- super.initialize(modelObject);
- UpdateModel model = UpdateUI.getDefault().getUpdateModel();
- modelListener = new IUpdateModelChangedListener() {
- public void objectsAdded(Object parent, Object[] children) {
- }
- public void objectsRemoved(Object parent, Object[] children) {
- }
- public void objectChanged(Object obj, String property) {
- final boolean preserved;
- if (obj instanceof PreservedConfiguration) {
- preserved = true;
- obj = ((PreservedConfiguration) obj).getConfiguration();
- } else
- preserved = false;
- if (obj.equals(currentConfiguration)) {
- SWTUtil.getStandardDisplay().asyncExec(new Runnable() {
- public void run() {
- inputChanged(currentConfiguration, preserved);
- }
- });
- }
- }
- };
- model.addUpdateModelChangedListener(modelListener);
- }
-
- protected void createContents(Composite parent) {
- HTMLTableLayout layout = new HTMLTableLayout();
- parent.setLayout(layout);
- layout.leftMargin = 10;
- layout.rightMargin = 0;
- layout.topMargin = 10;
- layout.horizontalSpacing = 0;
- layout.verticalSpacing = 0;
- layout.numColumns = 1;
-
- FormWidgetFactory factory = getFactory();
-
- dateLabel =
- createProperty(
- parent,
- UpdateUI.getString(KEY_CREATED_ON));
- currentLabel =
- createProperty(
- parent,
- UpdateUI.getString(KEY_CURRENT_CONFIG));
- factory.createLabel(parent, null);
-
- activitySection = new ActivitySection((UpdateFormPage) getPage());
- Control control = activitySection.createControl(parent, factory);
- TableData td = new TableData();
- //td.align = TableData.FILL;
- //td.grabHorizontal = true;
- td.valign = TableData.TOP;
- //td.colspan = 2;
- control.setLayoutData(td);
-
- revertSection = new RevertSection((UpdateFormPage) getPage());
- control = revertSection.createControl(parent, factory);
- td = new TableData();
- td.align = TableData.FILL;
- td.grabHorizontal = true;
- td.valign = TableData.TOP;
- control.setLayoutData(td);
- setFocusControl(revertSection.getFocusControl());
-
- preserveSection = new PreserveSection((UpdateFormPage) getPage());
- control = preserveSection.createControl(parent, factory);
- td = new TableData();
- td.align = TableData.FILL;
- td.grabHorizontal = true;
- td.valign = TableData.TOP;
- control.setLayoutData(td);
-
- registerSection(activitySection);
- registerSection(revertSection);
- registerSection(preserveSection);
- WorkbenchHelp.setHelp(
- parent,
- "org.eclipse.update.ui.InstallConfigurationForm");
- }
-
- protected Object createPropertyLayoutData() {
- TableData td = new TableData();
- //td.indent = 10;
- return td;
- }
-
- public void expandTo(Object obj) {
- boolean preserved = false;
- if (obj instanceof PreservedConfiguration) {
- preserved = true;
- obj = ((PreservedConfiguration) obj).getConfiguration();
- }
- if (obj instanceof IInstallConfiguration) {
- inputChanged((IInstallConfiguration) obj, preserved);
- }
- }
-
- private void inputChanged(
- IInstallConfiguration configuration,
- boolean preserved) {
- setHeadingText(configuration.getLabel());
- Date date = configuration.getCreationDate();
- dateLabel.setText(Utilities.format(date));
- String isCurrent =
- configuration.isCurrent()
- ? UpdateUI.getString(KEY_YES)
- : UpdateUI.getString(KEY_NO);
- currentLabel.setText(isCurrent);
-
- activitySection.configurationChanged(configuration);
- revertSection.configurationChanged(configuration);
- preserveSection.configurationChanged(!preserved ? configuration : null);
- // reflow
- dateLabel.getParent().layout(true);
- ((Composite) getControl()).layout(true);
- getControl().redraw();
- updateSize();
- currentConfiguration = configuration;
- }
-
- public void objectChanged(Object object, String property) {
- if (object.equals(currentConfiguration)) {
- expandTo(object);
- }
- }
-
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/InstallableSiteForm.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/InstallableSiteForm.java
deleted file mode 100644
index 8a31d96..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/InstallableSiteForm.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.forms;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.update.configuration.IConfiguredSite;
-import org.eclipse.update.core.ISite;
-import org.eclipse.update.internal.ui.UpdateUI;
-import org.eclipse.update.internal.ui.model.IConfiguredSiteAdapter;
-import org.eclipse.update.internal.ui.pages.UpdateFormPage;
-import org.eclipse.update.internal.ui.views.SiteStateAction;
-import org.eclipse.update.ui.forms.internal.*;
-import org.eclipse.update.ui.forms.internal.engine.FormEngine;
-
-public class InstallableSiteForm extends PropertyWebForm {
- private static final String KEY_TITLE = "InstallableSitePage.title";
- private static final String KEY_DESC = "InstallableSitePage.desc";
- private static final String KEY_NEW_LOC = "InstallableSitePage.newLocation";
-
- private IConfiguredSite currentSite;
- private Label urlLabel;
- private Label typeLabel;
- private Label stateLabel;
- private Button stateButton;
- private SiteStateAction siteStateAction;
-
- public InstallableSiteForm(UpdateFormPage page) {
- super(page);
- }
-
- public void dispose() {
- super.dispose();
- }
-
- public void initialize(Object modelObject) {
- setHeadingText(UpdateUI.getString(KEY_TITLE));
- super.initialize(modelObject);
- //((Composite)getControl()).layout(true);
- }
-
- protected void createContents(Composite parent) {
- HTMLTableLayout layout = new HTMLTableLayout();
- parent.setLayout(layout);
- layout.leftMargin = 10;
- layout.rightMargin = 0;
- layout.topMargin = 10;
- layout.horizontalSpacing = 0;
- //layout.verticalSpacing = 20;
- layout.numColumns = 1;
-
- FormWidgetFactory factory = getFactory();
- urlLabel =
- createProperty(
- parent,
- UpdateUI.getString(
- "InstallableSiteForm.url"));
- typeLabel =
- createProperty(
- parent,
- UpdateUI.getString(
- "InstallableSiteForm.type"));
- stateLabel =
- createProperty(
- parent,
- UpdateUI.getString(
- "InstallableSiteForm.state"));
-
- stateButton = factory.createButton(parent, "", SWT.PUSH);
- stateButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- siteStateAction.run();
- }
- });
-
- factory.createLabel(parent, "");
-
- FormEngine desc = factory.createFormEngine(parent);
- desc.load(UpdateUI.getString(KEY_DESC), true, true);
- setFocusControl(desc);
- TableData td = new TableData();
- td.align = TableData.FILL;
- td.grabHorizontal = true;
- desc.setLayoutData(td);
-
- siteStateAction = new SiteStateAction();
-
- WorkbenchHelp.setHelp(
- parent,
- "org.eclipse.update.ui.InstallableSiteForm");
- }
-
- protected Object createPropertyLayoutData() {
- TableData td = new TableData();
- //td.indent = 10;
- return td;
- }
-
- public void expandTo(Object obj) {
- if (obj instanceof IConfiguredSiteAdapter) {
- inputChanged(((IConfiguredSiteAdapter) obj).getConfiguredSite());
- }
- }
-
- private String getStateButtonLabel(boolean enabled) {
- return UpdateUI.getString(
- enabled
- ? "InstallableSiteForm.stateButton.disable"
- : "InstallableSiteForm.stateButton.enable");
- }
-
- private String getStateLabel(boolean enabled) {
- return UpdateUI.getString(
- enabled
- ? "InstallableSiteForm.stateLabel.enabled"
- : "InstallableSiteForm.stateLabel.disabled");
- }
-
- private String getSiteType(IConfiguredSite csite) {
- if (csite.isProductSite())
- return UpdateUI.getString("InstallableSiteForm.type.product");
- if (csite.isExtensionSite())
- return UpdateUI.getString("InstallableSiteForm.type.extension");
- return UpdateUI.getString("InstallableSiteForm.type.private");
- }
-
- private void inputChanged(IConfiguredSite csite) {
- ISite site = csite.getSite();
- urlLabel.setText(site.getURL().toString());
- typeLabel.setText(getSiteType(csite));
-
- stateLabel.setText(getStateLabel(csite.isEnabled()));
- stateButton.setText(getStateButtonLabel(csite.isEnabled()));
- siteStateAction.setSite(csite);
- urlLabel.getParent().layout();
- ((Composite) getControl()).layout();
- getControl().redraw();
- currentSite = csite;
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/LocalSiteForm.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/LocalSiteForm.java
deleted file mode 100644
index 535ee35..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/LocalSiteForm.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.forms;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.update.configuration.IInstallConfiguration;
-import org.eclipse.update.core.SiteManager;
-import org.eclipse.update.internal.ui.UpdateUI;
-import org.eclipse.update.internal.ui.model.SiteBookmark;
-import org.eclipse.update.internal.ui.pages.UpdateFormPage;
-import org.eclipse.update.internal.ui.parts.AboutInfo;
-import org.eclipse.update.internal.ui.views.DetailsView;
-import org.eclipse.update.ui.forms.internal.*;
-import org.eclipse.update.ui.forms.internal.engine.*;
-
-public class LocalSiteForm extends UpdateWebForm {
- private static final String KEY_TITLE = "LocalSitePage.title";
-
- private Label url;
- private SiteBookmark currentBookmark;
- private AboutInfo aboutInfo;
- private Image image;
- private PreserveSection preserveSection;
-
- public LocalSiteForm(UpdateFormPage page) {
- super(page);
- aboutInfo = UpdateUI.getDefault().getAboutInfo();
- ImageDescriptor desc = aboutInfo.getAboutImage();
- if (desc != null)
- image = desc.createImage(); // may be null
- }
-
- public void dispose() {
- if (image != null)
- image.dispose();
- super.dispose();
- }
-
- public void initialize(Object modelObject) {
- setHeadingText(UpdateUI.getString(KEY_TITLE));
- super.initialize(modelObject);
- }
-
- protected void createContents(Composite parent) {
- FormWidgetFactory factory = getFactory();
- HTMLTableLayout layout = new HTMLTableLayout();
- parent.setLayout(layout);
- layout.leftMargin = layout.rightMargin = 10;
- layout.topMargin = 10;
- layout.horizontalSpacing = 20;
- layout.verticalSpacing = 20;
- layout.numColumns = image != null ? 2 : 1;
-
- if (image != null) {
- Label ilabel = factory.createLabel(parent, null);
- ilabel.setImage(image);
- }
-
- HTTPAction action = new HTTPAction() {
- public void linkActivated(IHyperlinkSegment link) {
- DetailsView.showURL(link.getText());
- }
- };
- IActionBars bars = getPage().getView().getViewSite().getActionBars();
- action.setStatusLineManager(bars.getStatusLineManager());
- // text on the right
- FormEngine engine = factory.createFormEngine(parent);
- engine.registerTextObject(FormEngine.URL_HANDLER_ID, action);
- engine.setParagraphsSeparated(false);
- engine.setHyperlinkSettings(factory.getHyperlinkHandler());
- engine.marginWidth = 1;
- TableData data = new TableData();
- data.align = TableData.FILL;
- engine.load(getProductText(), false, true);
- engine.setLayoutData(data);
- setFocusControl(engine);
-
- Composite sep = factory.createCompositeSeparator(parent);
- data = new TableData();
- data.align = TableData.FILL;
- data.heightHint = 1;
- data.colspan = image != null ? 2 : 1;
- sep.setLayoutData(data);
-
- preserveSection = new PreserveSection((UpdateFormPage) getPage());
- Control control = preserveSection.createControl(parent, factory);
- data = new TableData();
- data.align = TableData.FILL;
- data.grabHorizontal = true;
- data.colspan = image != null ? 2 : 1;
- data.valign = TableData.TOP;
- control.setLayoutData(data);
-
- registerSection(preserveSection);
- try {
- IInstallConfiguration config = SiteManager.getLocalSite().getCurrentConfiguration();
- preserveSection.configurationChanged(config);
- }
- catch (CoreException e) {
- }
- WorkbenchHelp.setHelp(parent, "org.eclipse.update.ui.LocalSiteForm");
- }
-
- public void expandTo(Object obj) {
- }
-
- private void inputChanged(SiteBookmark site) {
- }
- private String getProductText() {
- return aboutInfo.getAboutText();
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/MainForm.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/MainForm.java
deleted file mode 100644
index b0a488e..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/MainForm.java
+++ /dev/null
@@ -1,239 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.forms;
-import java.util.ArrayList;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.*;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.update.internal.ui.*;
-import org.eclipse.update.internal.ui.pages.UpdateFormPage;
-import org.eclipse.update.internal.ui.preferences.UpdateColors;
-import org.eclipse.update.internal.ui.views.*;
-import org.eclipse.update.ui.forms.internal.*;
-import org.eclipse.update.ui.forms.internal.engine.*;
-
-public class MainForm extends UpdateWebForm {
- private static final String KEY_TITLE = "HomePage.title";
- private static final String KEY_UPDATES_TITLE = "HomePage.updates.title";
- private static final String KEY_UPDATES_DESC = "HomePage.updates.desc";
- private static final String KEY_INSTALLS_TITLE = "HomePage.installs.title";
- private static final String KEY_INSTALLS_DESC = "HomePage.installs.desc";
- private static final String KEY_UNINSTALLS_TITLE =
- "HomePage.uninstalls.title";
- private static final String KEY_UNINSTALLS_DESC = "HomePage.uninstals.desc";
- private static final String KEY_HISTORY_TITLE = "HomePage.history.title";
- private static final String KEY_HISTORY_DESC = "HomePage.history.desc";
-
- Image itemImage;
- Image configsImage;
- Image sitesImage;
- ArrayList topics = new ArrayList();
-
- public MainForm(UpdateFormPage page) {
- super(page);
- itemImage = UpdateUIImages.DESC_ITEM.createImage();
- configsImage = UpdateUIImages.DESC_CONFIGS_VIEW.createImage();
- sitesImage = UpdateUIImages.DESC_SITES_VIEW.createImage();
- }
-
- public void dispose() {
- itemImage.dispose();
- configsImage.dispose();
- sitesImage.dispose();
- super.dispose();
- }
-
- public void initialize(Object modelObject) {
- setHeadingText(UpdateUI.getString(KEY_TITLE));
- super.initialize(modelObject);
- IPreferenceStore pstore =
- UpdateUI.getDefault().getPreferenceStore();
- pstore.addPropertyChangeListener(new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent e) {
- if (e.getProperty().equals(UpdateColors.P_TOPIC_COLOR))
- updateColors();
- }
- });
- }
-
- private void updateColors() {
- for (int i = 0; i < topics.size(); i++) {
- Control topic = (Control) topics.get(i);
- topic.setForeground(UpdateColors.getTopicColor(topic.getDisplay()));
- }
- }
-
- protected int getNumColumns() {
- return 1;
- }
-
- protected void createContents(Composite parent) {
- HTMLTableLayout layout = new HTMLTableLayout();
- parent.setLayout(layout);
- layout.leftMargin = layout.rightMargin = 10;
- layout.topMargin = 15;
- layout.horizontalSpacing = 5;
- layout.verticalSpacing = 0;
- layout.numColumns = 2;
-
- FormWidgetFactory factory = getFactory();
-
- Label topicImage;
- Label topic;
- FormEngine text;
- HyperlinkAction action;
-
- Color topicColor = UpdateColors.getTopicColor(parent.getDisplay());
-
- action = new HyperlinkAction() {
- public void linkActivated(IHyperlinkSegment link) {
- UpdatesView view =
- (UpdatesView) showView(UpdatePerspective.ID_UPDATES);
- if (view != null)
- view.selectUpdateObject();
- }
- };
- topicImage = factory.createLabel(parent, null);
- topicImage.setImage(itemImage);
- topic =
- factory.createHeadingLabel(
- parent,
- UpdateUI.getString(KEY_UPDATES_TITLE),
- SWT.WRAP);
- topic.setForeground(topicColor);
- topics.add(topic);
- factory.createLabel(parent, null);
- text = factory.createFormEngine(parent, true);
- setFocusControl(text);
- text.load(
- UpdateUI.getString(KEY_UPDATES_DESC),
- true,
- false);
- text.registerTextObject("action1", action);
- text.registerTextObject("image1", sitesImage);
- TableData td = new TableData();
- td.grabHorizontal = true;
- text.setLayoutData(td);
-
- addSeparator(parent);
-
- action = new HyperlinkAction() {
- public void linkActivated(IHyperlinkSegment link) {
- showView(UpdatePerspective.ID_UPDATES);
- }
- };
- topicImage = factory.createLabel(parent, null);
- topicImage.setImage(itemImage);
- topic =
- factory.createHeadingLabel(
- parent,
- UpdateUI.getString(KEY_INSTALLS_TITLE),
- SWT.WRAP);
- topic.setForeground(topicColor);
- topics.add(topic);
- factory.createLabel(parent, null);
- text = factory.createFormEngine(parent, true);
- text.load(
- UpdateUI.getString(KEY_INSTALLS_DESC),
- true,
- false);
- text.registerTextObject("action1", action);
- text.registerTextObject("image1", sitesImage);
- td = new TableData();
- td.grabHorizontal = true;
- text.setLayoutData(td);
- addSeparator(parent);
-
- action = new HyperlinkAction() {
- public void linkActivated(IHyperlinkSegment link) {
- ConfigurationView view =
- (ConfigurationView) showView(UpdatePerspective
- .ID_CONFIGURATION);
- if (view != null)
- view.selectCurrentConfiguration();
- }
- };
- topicImage = factory.createLabel(parent, null);
- topicImage.setImage(itemImage);
- topic =
- factory.createHeadingLabel(
- parent,
- UpdateUI.getString(KEY_UNINSTALLS_TITLE),
- SWT.WRAP);
- topic.setForeground(topicColor);
- topics.add(topic);
- factory.createLabel(parent, null);
- text = factory.createFormEngine(parent, true);
- text.load(
- UpdateUI.getString(KEY_UNINSTALLS_DESC),
- true,
- false);
- text.registerTextObject("action1", action);
- text.registerTextObject("image1", configsImage);
- td = new TableData();
- td.grabHorizontal = true;
- text.setLayoutData(td);
-
- addSeparator(parent);
-
- action = new HyperlinkAction() {
- public void linkActivated(IHyperlinkSegment link) {
- ConfigurationView view =
- (ConfigurationView) showView(UpdatePerspective
- .ID_CONFIGURATION);
- if (view != null)
- view.selectHistoryFolder();
- }
- };
- topicImage = factory.createLabel(parent, null);
- topicImage.setImage(itemImage);
- topic =
- factory.createHeadingLabel(
- parent,
- UpdateUI.getString(KEY_HISTORY_TITLE),
- SWT.WRAP);
- topic.setForeground(topicColor);
- topics.add(topic);
- factory.createLabel(parent, null);
- text = factory.createFormEngine(parent, true);
- text.load(
- UpdateUI.getString(KEY_HISTORY_DESC),
- true,
- false);
- text.registerTextObject("action1", action);
- td = new TableData();
- td.grabHorizontal = true;
- text.setLayoutData(td);
- WorkbenchHelp.setHelp(parent, "org.eclipse.update.ui.MainForm");
- }
-
- private void addSeparator(Composite parent) {
- Label label = new Label(parent, SWT.NULL);
- TableData td = new TableData();
- td.colspan = 2;
- label.setLayoutData(td);
- }
-
- private IViewPart showView(String viewId) {
- try {
- IViewPart part = UpdateUI.getActivePage().showView(viewId);
- return part;
- } catch (PartInitException e) {
- return null;
- }
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/MultipleSelectionForm.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/MultipleSelectionForm.java
deleted file mode 100644
index 2ff680a..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/MultipleSelectionForm.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.forms;
-
-import java.util.Iterator;
-
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.update.internal.ui.UpdateUI;
-import org.eclipse.update.internal.ui.pages.UpdateFormPage;
-import org.eclipse.update.internal.ui.parts.DefaultContentProvider;
-import org.eclipse.update.ui.forms.internal.*;
-
-public class MultipleSelectionForm extends UpdateWebForm {
- private IStructuredSelection selection;
- private Label counter;
- private TableViewer tableViewer;
-
- class ViewProvider
- extends DefaultContentProvider
- implements IStructuredContentProvider {
- /**
- * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
- */
- public Object[] getElements(Object inputElement) {
- return selection.toArray();
- }
- }
-
- public MultipleSelectionForm(UpdateFormPage page) {
- super(page);
- }
-
- public void dispose() {
- super.dispose();
- }
-
- public void objectChanged(Object object, String property) {
- if (selection == null)
- return;
- for (Iterator iter = selection.iterator(); iter.hasNext();) {
- Object obj = iter.next();
- if (object.equals(obj)) {
- getControl().getDisplay().asyncExec(new Runnable() {
- public void run() {
- expandTo(selection);
- }
- });
- break;
- }
- }
- }
-
- public void initialize(Object modelObject) {
- setHeadingText(UpdateUI.getString("MultipleSelectionForm.title"));
- super.initialize(modelObject);
- }
-
- protected void createContents(Composite parent) {
- HTMLTableLayout layout = new HTMLTableLayout();
- parent.setLayout(layout);
- layout.leftMargin = layout.rightMargin = 10;
- layout.topMargin = 10;
- layout.horizontalSpacing = 0;
- layout.verticalSpacing = 20;
- layout.numColumns = 1;
-
- FormWidgetFactory factory = getFactory();
- counter = factory.createLabel(parent, "");
- TableData td = new TableData();
- td.align = TableData.FILL;
- counter.setLayoutData(td);
- tableViewer = new TableViewer(factory.createTable(parent, SWT.NULL));
- tableViewer.setContentProvider(new ViewProvider());
- tableViewer.setLabelProvider(UpdateUI.getDefault().getLabelProvider());
- td = new TableData();
- td.align = TableData.FILL;
- td.valign = TableData.FILL;
- tableViewer.getTable().setLayoutData(td);
- }
-
- public void expandTo(Object obj) {
- String name = "";
-
- if (obj != null && obj instanceof IStructuredSelection) {
- selection = (IStructuredSelection) obj;
- refresh();
- tableViewer.getControl().getParent().layout(true);
- tableViewer.getControl().getParent().getParent().layout(true);
- updateSize();
- }
- }
- private void refresh() {
- int size = selection.size();
- counter.setText(
- UpdateUI.getFormattedMessage(
- "MultipleSelectionForm.counter",
- "" + size));
- tableViewer.setInput(selection);
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/MyComputerForm.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/MyComputerForm.java
deleted file mode 100644
index e204ca9..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/MyComputerForm.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.forms;
-
-import java.text.MessageFormat;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.update.internal.ui.UpdateUI;
-import org.eclipse.update.internal.ui.model.*;
-import org.eclipse.update.internal.ui.pages.UpdateFormPage;
-import org.eclipse.update.ui.forms.internal.*;
-
-
-public class MyComputerForm extends UpdateWebForm {
- private SiteBookmark currentBookmark;
- private static final String KEY_TITLE = "MyComputerPage.title";
- private static final String KEY_NTITLE = "MyComputerPage.ntitle";
- private static final String KEY_DESC = "MyComputerPage.desc";
-
-public MyComputerForm(UpdateFormPage page) {
- super(page);
-}
-
-public void dispose() {
- super.dispose();
-}
-
-public void initialize(Object modelObject) {
- setHeadingText(UpdateUI.getString(KEY_TITLE));
- super.initialize(modelObject);
-}
-
-protected void createContents(Composite parent) {
- HTMLTableLayout layout = new HTMLTableLayout();
- parent.setLayout(layout);
- layout.leftMargin = layout.rightMargin = 10;
- layout.topMargin = 10;
- layout.verticalSpacing = 20;
- // defect 13686
- //layout.horizontalSpacing = 0;
- layout.numColumns = 3;
-
- FormWidgetFactory factory = getFactory();
-
- Label text = factory.createLabel(parent, null, SWT.WRAP);
- text.setText(UpdateUI.getString(KEY_DESC));
- WorkbenchHelp.setHelp(parent, "org.eclipse.update.ui.MyComputerForm");
-}
-
-public void expandTo(Object obj) {
- if (obj instanceof MyComputer) {
- inputChanged((MyComputer)obj);
- }
-}
-
-private void inputChanged(MyComputer myComputer) {
- String pattern = UpdateUI.getString(KEY_TITLE);
- String name = System.getProperty("user.name");
- String message = MessageFormat.format(pattern, new Object[] {name});
- setHeadingText(message);
-}
-
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/PreserveSection.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/PreserveSection.java
deleted file mode 100644
index 5a9fa22..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/PreserveSection.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.forms;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.*;
-import org.eclipse.update.configuration.*;
-import org.eclipse.update.core.SiteManager;
-import org.eclipse.update.internal.ui.*;
-import org.eclipse.update.internal.ui.pages.UpdateFormPage;
-import org.eclipse.update.internal.ui.views.ConfigurationView;
-import org.eclipse.update.ui.forms.internal.*;
-import org.eclipse.update.ui.forms.internal.engine.*;
-
-public class PreserveSection extends UpdateSection {
- // NL keys
- private static final String KEY_TITLE = "InstallConfigurationPage.PreserveSection.title"; //$NON-NLS-1$
- private static final String KEY_DESC = "InstallConfigurationPage.PreserveSection.desc"; //$NON-NLS-1$
- private static final String KEY_TEXT = "InstallConfigurationPage.PreserveSection.text"; //$NON-NLS-1$
- private static final String KEY_PRESERVE_TEXT = "InstallConfigurationPage.PreserveSection.preserveText"; //$NON-NLS-1$
- private static final String KEY_PRESERVE_BUTTON = "InstallConfigurationPage.PreserveSection.preserveButton"; //$NON-NLS-1$
-
- private Composite container;
- private FormWidgetFactory factory;
- private IInstallConfiguration config;
- private FormEngine textLabel;
- private Label preserveLabel;
- private Button preserveButton;
-
- public PreserveSection(UpdateFormPage page) {
- super(page);
- setAddSeparator(false);
- setHeaderText(UpdateUI.getString(KEY_TITLE));
- UpdateUI.getDefault().getLabelProvider().connect(this);
- }
-
- public void dispose() {
- UpdateUI.getDefault().getLabelProvider().disconnect(this);
- super.dispose();
- }
-
- public Composite createClient(
- Composite parent,
- FormWidgetFactory factory) {
- HTMLTableLayout layout = new HTMLTableLayout();
- this.factory = factory;
- updateHeaderColor();
- layout.leftMargin = layout.rightMargin = 0;
- layout.topMargin = 0;
- container = factory.createComposite(parent);
- container.setLayout(layout);
- layout.numColumns = 2;
- textLabel = factory.createFormEngine(container); //$NON-NLS-1$
- TableData td = new TableData();
- td.align = TableData.FILL;
- td.grabHorizontal = true;
- td.colspan = 2;
- textLabel.setLayoutData(td);
- textLabel.load(UpdateUI.getString(KEY_TEXT), true, false);
- Image configsImage = UpdateUI.getDefault().getLabelProvider().get(UpdateUIImages.DESC_CONFIGS_VIEW);
- HyperlinkAction action = new HyperlinkAction() {
- public void linkActivated(IHyperlinkSegment link) {
- ConfigurationView view =
- (ConfigurationView) showView(UpdatePerspective
- .ID_CONFIGURATION);
- if (view != null)
- view.expandPreservedConfigurations();
- }
- };
- textLabel.registerTextObject("link", action);
- textLabel.registerTextObject("image", configsImage);
- preserveLabel = factory.createLabel(container, UpdateUI.getString(KEY_PRESERVE_TEXT));
- td = new TableData();
- td.valign = TableData.MIDDLE;
-
- preserveButton = factory.createButton(container, UpdateUI.getString(KEY_PRESERVE_BUTTON), SWT.PUSH); //$NON-NLS-1$
- preserveButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- performPreserve();
- }
- });
- preserveButton.setEnabled(false);
- return container;
- }
-
- public void configurationChanged(IInstallConfiguration config) {
- this.config = config;
- preserveButton.setEnabled(config!=null);
- }
-
- private void performPreserve() {
- try {
- ILocalSite localSite = SiteManager.getLocalSite();
- IInstallConfiguration target = config;
- localSite.addToPreservedConfigurations(config);
- localSite.save();
- IViewPart part = UpdateUI.getActivePage().findView(UpdatePerspective.ID_CONFIGURATION);
- if (part!=null) {
- ((ConfigurationView)part).expandPreservedConfigurations();
- }
- } catch (CoreException e) {
- UpdateUI.logException(e);
- }
- }
-
- private IViewPart showView(String viewId) {
- try {
- IViewPart part = UpdateUI.getActivePage().showView(viewId);
- return part;
- } catch (PartInitException e) {
- return null;
- }
- }
-
- public Control getFocusControl() {
- return preserveButton;
- }
-}
\ No newline at end of file
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/PropertyWebForm.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/PropertyWebForm.java
deleted file mode 100644
index bb1ccc9..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/PropertyWebForm.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.forms;
-
-
-import java.util.ArrayList;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.util.*;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.update.internal.ui.UpdateUI;
-import org.eclipse.update.internal.ui.pages.IUpdateFormPage;
-import org.eclipse.update.internal.ui.preferences.UpdateColors;
-
-public class PropertyWebForm extends UpdateWebForm {
- private ArrayList headings = new ArrayList();
-
- /**
- * Constructor for PropertyWebForm.
- * @param page
- */
- public PropertyWebForm(IUpdateFormPage page) {
- super(page);
- IPreferenceStore pstore =
- UpdateUI.getDefault().getPreferenceStore();
- pstore.addPropertyChangeListener(new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent e) {
- if (e.getProperty().equals(UpdateColors.P_TOPIC_COLOR))
- updateHeadings();
- }
- });
- }
-
- protected void updateHeadings() {
- for (int i = 0; i < headings.size(); i++) {
- Control c = (Control) headings.get(i);
- c.setForeground(UpdateColors.getTopicColor(c.getDisplay()));
- }
- }
-
- protected Label createProperty(Composite parent, String name) {
- createHeading(parent, name);
- Label label = factory.createLabel(parent, null);
- label.setText("");
- label.setLayoutData(createPropertyLayoutData());
- return label;
- }
-
- protected Object createPropertyLayoutData() {
- GridData gd = new GridData();
- gd.horizontalIndent = 10;
- return gd;
- }
-
- protected Label createHeading(Composite parent, String text) {
- Label l = factory.createHeadingLabel(parent, text);
- Color hc = UpdateColors.getTopicColor(parent.getDisplay());
- l.setForeground(hc);
- headings.add(l);
- return l;
- }
-
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/RevertSection.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/RevertSection.java
deleted file mode 100644
index 2feb3d5..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/RevertSection.java
+++ /dev/null
@@ -1,207 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.forms;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.update.configuration.IInstallConfiguration;
-import org.eclipse.update.configuration.ILocalSite;
-import org.eclipse.update.core.SiteManager;
-import org.eclipse.update.internal.ui.UpdateUI;
-import org.eclipse.update.internal.ui.pages.UpdateFormPage;
-import org.eclipse.update.ui.forms.internal.*;
-
-public class RevertSection extends UpdateSection {
- // NL keys
- private static final String KEY_TITLE = "InstallConfigurationPage.RevertSection.title"; //$NON-NLS-1$
- private static final String KEY_DESC = "InstallConfigurationPage.RevertSection.desc"; //$NON-NLS-1$
- private static final String KEY_CURRENT_TEXT = "InstallConfigurationPage.RevertSection.currentText"; //$NON-NLS-1$
- private static final String KEY_REVERT_TEXT = "InstallConfigurationPage.RevertSection.revertText"; //$NON-NLS-1$
- private static final String KEY_REVERT_BUTTON = "InstallConfigurationPage.RevertSection.revertButton"; //$NON-NLS-1$
- private static final String KEY_RESTORE_TEXT = "InstallConfigurationPage.RevertSection.restoreText"; //$NON-NLS-1$
- private static final String KEY_RESTORE_BUTTON = "InstallConfigurationPage.RevertSection.restoreButton"; //$NON-NLS-1$
- private static final String KEY_DIALOG_TITLE = "InstallConfigurationPage.RevertSection.dialog.title"; //$NON-NLS-1$
- private static final String KEY_DIALOG_MESSAGE = "InstallConfigurationPage.RevertSection.dialog.message"; //$NON-NLS-1$
-
- private Composite container;
- private FormWidgetFactory factory;
- private IInstallConfiguration config;
- private Label currentTextLabel;
- private Label textLabel;
- private Button revertButton;
-
- public RevertSection(UpdateFormPage page) {
- super(page);
- setAddSeparator(false);
- setHeaderText(UpdateUI.getString(KEY_TITLE));
- setDescription(UpdateUI.getString(KEY_DESC));
- }
-
- public Composite createClient(
- Composite parent,
- FormWidgetFactory factory) {
- HTMLTableLayout layout = new HTMLTableLayout();
- this.factory = factory;
- //header.setForeground(factory.getColor(factory.COLOR_COMPOSITE_SEPARATOR));
- updateHeaderColor();
- layout.leftMargin = layout.rightMargin = 0;
- layout.horizontalSpacing = 0;
- container = factory.createComposite(parent);
- container.setLayout(layout);
- layout.numColumns = 3;
- currentTextLabel = factory.createLabel(container, ""); //$NON-NLS-1$
- currentTextLabel.setFont(JFaceResources.getBannerFont());
- TableData td = new TableData();
- td.valign = TableData.MIDDLE;
- currentTextLabel.setLayoutData(td);
- textLabel = factory.createLabel(container, "", SWT.WRAP); //$NON-NLS-1$
- td = new TableData();
- td.valign = TableData.MIDDLE;
- textLabel.setLayoutData(td);
- revertButton = factory.createButton(container, "", SWT.PUSH); //$NON-NLS-1$
- revertButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- performRevert();
- }
- });
- td = new TableData();
- td.indent = 5;
- td.valign = TableData.MIDDLE;
- revertButton.setLayoutData(td);
- return container;
- }
-
- public void configurationChanged(IInstallConfiguration config) {
- this.config = config;
- boolean canRevert = false;
- try {
- ILocalSite localSite = SiteManager.getLocalSite();
- IInstallConfiguration[] history =
- localSite.getConfigurationHistory();
- int length = history.length;
- canRevert = length > 1;
- } catch (CoreException e) {
- UpdateUI.logException(e);
- }
- container.getParent().setVisible(canRevert);
- if (!canRevert)
- return;
- if (config.isCurrent()) {
- currentTextLabel.setText(
- UpdateUI.getString(KEY_CURRENT_TEXT));
- textLabel.setText(
- UpdateUI.getString(KEY_REVERT_TEXT));
- revertButton.setText(
- UpdateUI.getString(KEY_REVERT_BUTTON));
- } else {
- currentTextLabel.setText(""); //$NON-NLS-1$
- textLabel.setText(
- UpdateUI.getString(KEY_RESTORE_TEXT));
- revertButton.setText(
- UpdateUI.getString(KEY_RESTORE_BUTTON));
- }
- container.layout(true);
- }
-
- private void performRevert() {
- try {
- ILocalSite localSite = SiteManager.getLocalSite();
- IInstallConfiguration target = config;
- if (config.isCurrent()) {
- // take the previous one
- IInstallConfiguration[] history =
- localSite.getConfigurationHistory();
- target = history[history.length - 2];
- }
- performRevert(target);
- } catch (CoreException e) {
- UpdateUI.logException(e);
- }
- }
-
- public static void performRevert(final IInstallConfiguration target) {
- performRevert(target, true, true);
- }
-
- public static boolean performRevert(
- final IInstallConfiguration target,
- boolean confirm,
- final boolean restart) {
- if (confirm) {
- // ask the user to confirm and bail if canceled
- String title = UpdateUI.getActivePage().getLabel();
- if (!MessageDialog.openConfirm(UpdateUI.getActiveWorkbenchShell(), title, UpdateUI.getString("InstallConfigurationPage.RevertSection.confirm.message"))) //$NON-NLS-1$
- return false;
- }
-
- // make sure we can actually do the revert
- IStatus status = ActivityConstraints.validatePendingRevert(target);
- if (status != null) {
- ErrorDialog.openError(
- UpdateUI.getActiveWorkbenchShell(),
- null,
- null,
- status);
- return false;
- }
-
- // ok to perform the operation
- final boolean [] result = new boolean[1];
- result[0] = false;
- IRunnableWithProgress operation = new IRunnableWithProgress() {
-
- public void run(IProgressMonitor monitor) {
- boolean success = false;
- try {
- ILocalSite localSite = SiteManager.getLocalSite();
- localSite.revertTo(target, monitor, new UIProblemHandler());
- saveLocalSite();
- success = true;
- } catch (CoreException e) {
- UpdateUI.logException(e);
- } finally {
- monitor.done();
- result[0] = success;
- if (success && restart)
- UpdateUI.informRestartNeeded();
- }
- }
- };
- try {
- ProgressMonitorDialog dialog =
- new ProgressMonitorDialog(
- UpdateUI.getActiveWorkbenchShell().getShell());
- dialog.run(false, true, operation);
- } catch (InvocationTargetException e) {
- UpdateUI.logException(e);
- } catch (InterruptedException e) {
- }
- return result[0];
- }
-
- private static void saveLocalSite() throws CoreException {
- ILocalSite localSite = SiteManager.getLocalSite();
- localSite.save();
- }
- public Control getFocusControl() {
- return revertButton;
- }
-}
\ No newline at end of file
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/SearchForm.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/SearchForm.java
deleted file mode 100644
index 89a75c3..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/SearchForm.java
+++ /dev/null
@@ -1,594 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.forms;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.*;
-
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.wizard.ProgressMonitorPart;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.*;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.ui.part.PageBook;
-import org.eclipse.update.core.Utilities;
-import org.eclipse.update.internal.ui.*;
-import org.eclipse.update.internal.ui.model.*;
-import org.eclipse.update.internal.ui.pages.UpdateFormPage;
-import org.eclipse.update.internal.ui.search.*;
-import org.eclipse.update.internal.ui.views.SearchResultView;
-import org.eclipse.update.ui.forms.internal.*;
-import org.eclipse.update.ui.forms.internal.engine.FormEngine;
-
-public class SearchForm extends UpdateWebForm {
- private static final String KEY_TITLE = "SearchPage.title";
- private static final String KEY_LAST_SEARCH = "SearchPage.lastSearch";
- private static final String KEY_NO_LAST_SEARCH = "SearchPage.noLastSearch";
- private static final String KEY_SEARCH_NOW = "SearchPage.searchNow";
- private static final String KEY_CANCEL = "SearchPage.cancel";
- private static final String KEY_DESC = "SearchPage.desc";
- private static final String KEY_QUERY = "SearchPage.query.label";
- private static final String KEY_CATEGORY = "SearchPage.query.category";
- private static final String KEY_OPTIONS = "SearchPage.options.label";
- private static final String KEY_MY_COMPUTER_CHECK =
- "SearchPage.options.myComputerCheck";
- private static final String KEY_MY_COMPUTER_TITLE =
- "SearchPage.options.myComputerSettings.title";
- private static final String KEY_MY_COMPUTER_MORE =
- "SearchPage.options.myComputerSettings";
- private static final String KEY_FULL_MODE_CHECK =
- "SearchPage.options.fullModeCheck";
- private static final String KEY_BOOKMARK_CHECK =
- "SearchPage.options.bookmarkCheck";
- private static final String KEY_DISCOVERY_CHECK =
- "SearchPage.options.discoveryCheck";
- private static final String KEY_FILTER_CHECK =
- "SearchPage.options.filterCheck";
- private static final String UPDATES_IMAGE_ID = "updates";
- private static final String SETTINGS_SECTION = "SearchForm";
- private static final String S_FULL_MODE = "fullMode";
-
- private FormEngine descLabel;
- private Label infoLabel;
- private ExpandableGroup queryGroup;
- private ExpandableGroup optionsGroup;
- private CCombo categoryCombo;
- private Button myComputerCheck;
- private Button discoveryCheck;
- private Button bookmarkCheck;
- private Button filterCheck;
- private Button myComputerSettings;
- //private Button fullModeCheck;
- private Button searchButton;
- private PageBook pagebook;
- private SearchMonitor monitor;
- //private UpdateSearchProgressMonitor statusMonitor;
- //private SearchResultSection searchResultSection;
- private IDialogSettings settings;
- private SearchObject searchObject;
- private ArrayList categories = new ArrayList();
- private Hashtable descTable = new Hashtable();
- private ISearchCategory currentCategory;
-
- abstract class OptionsGroup extends ExpandableGroup {
- protected SelectableFormLabel createTextLabel(
- Composite parent,
- FormWidgetFactory factory) {
- SelectableFormLabel label = super.createTextLabel(parent, factory);
- label.setFont(JFaceResources.getBannerFont());
- return label;
- }
- public void expanded() {
- getControl().getParent().layout();
- reflow();
- updateSize();
- }
- public void collapsed() {
- getControl().getParent().layout();
- reflow();
- updateSize();
- }
- }
-
- class SearchMonitor extends ProgressMonitorPart {
- public SearchMonitor(Composite parent) {
- super(parent, null);
- setBackground(factory.getBackgroundColor());
- fLabel.setBackground(factory.getBackgroundColor());
- fProgressIndicator.setBackground(factory.getBackgroundColor());
- }
- public void done() {
- super.done();
- updateButtonText();
- searchButton.setEnabled(true);
- Date date = new Date();
- String text =
- UpdateUI.getFormattedMessage(
- KEY_LAST_SEARCH,
- Utilities.format(date));
- infoLabel.setText(text);
- infoLabel.getParent().layout();
- reflow(true);
- searchObject.detachProgressMonitor(this);
- enableOptions(true);
- activateSearchResultSelection();
- }
-
- private void activateSearchResultSelection() {
- SearchResultView sview = (SearchResultView)UpdateUI.getActivePage().findView(UpdatePerspective.ID_SEARCH_RESULTS);
- if (sview!=null)
- sview.setSelectionActive(true);
- }
- }
-
- public SearchForm(UpdateFormPage page) {
- super(page);
- IDialogSettings master =
- UpdateUI.getDefault().getDialogSettings();
- settings = master.getSection(SETTINGS_SECTION);
- if (settings == null)
- settings = master.addNewSection(SETTINGS_SECTION);
- }
-
- public void dispose() {
- if (searchObject != null) {
- detachFrom(searchObject);
- }
- super.dispose();
- }
-
- private void detachFrom(SearchObject obj) {
- obj.detachProgressMonitor(monitor);
- }
-
- public void initialize(Object modelObject) {
- updateHeadingText(null);
- super.initialize(modelObject);
- }
-
- private void updateHeadingText(SearchObject obj) {
- String title = UpdateUI.getString(KEY_TITLE);
- if (obj != null)
- title += " - " + obj.getName();
- setHeadingText(title);
- }
-
- protected void createContents(Composite parent) {
- HTMLTableLayout layout = new HTMLTableLayout();
- parent.setLayout(layout);
- layout.leftMargin = 5;
- layout.rightMargin = 5;
- layout.topMargin = 0;
- layout.bottomMargin = 2;
- layout.horizontalSpacing = 15;
- layout.verticalSpacing = 10;
- layout.numColumns = 2;
-
- FormWidgetFactory factory = getFactory();
- TableData td;
-
- descLabel = factory.createFormEngine(parent);
- descLabel.load(UpdateUI.getString(KEY_DESC), true, true);
- td = new TableData();
- td.colspan = 2;
- descLabel.setLayoutData(td);
-
- queryGroup = new OptionsGroup() {
- public void fillExpansion(
- Composite expansion,
- FormWidgetFactory factory) {
- fillQueryGroup(expansion, factory);
- }
- };
- Composite optionContainer = factory.createComposite(parent);
- layout = new HTMLTableLayout();
- layout.numColumns = 2;
- layout.leftMargin = 0;
- layout.rightMargin = 0;
- layout.bottomMargin = 0;
- layout.topMargin = 0;
- layout.horizontalSpacing = 15;
- layout.verticalSpacing = 0;
- optionContainer.setLayout(layout);
- td = new TableData();
- td.colspan = 2;
- optionContainer.setLayoutData(td);
-
- queryGroup.setText(UpdateUI.getString(KEY_QUERY));
- queryGroup.createControl(optionContainer, factory);
- setFocusControl(queryGroup.getControl());
-
- optionsGroup = new OptionsGroup() {
- public void fillExpansion(
- Composite expansion,
- FormWidgetFactory factory) {
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- expansion.setLayout(layout);
-
- myComputerCheck =
- factory.createButton(expansion, null, SWT.CHECK);
- myComputerCheck.setText(
- UpdateUI.getString(KEY_MY_COMPUTER_CHECK));
- myComputerCheck.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- myComputerSettings.setEnabled(
- myComputerCheck.getSelection());
- searchObject.setSearchMyComputer(
- myComputerCheck.getSelection());
- }
- });
-
- myComputerSettings =
- factory.createButton(expansion, null, SWT.PUSH);
- myComputerSettings.setText(
- UpdateUI.getString(KEY_MY_COMPUTER_MORE));
- myComputerSettings
- .addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- BusyIndicator
- .showWhile(
- myComputerSettings.getDisplay(),
- new Runnable() {
- public void run() {
- MyComputerSearchDialog sd =
- new MyComputerSearchDialog(
- myComputerSettings.getShell(),
- searchObject);
- sd.create();
- sd.getShell().setText(
- UpdateUI.getString(
- KEY_MY_COMPUTER_TITLE));
- sd.open();
- }
- });
- }
- });
- GridData gd;
- discoveryCheck =
- factory.createButton(expansion, null, SWT.CHECK);
- discoveryCheck.setText(
- UpdateUI.getString(KEY_DISCOVERY_CHECK));
- discoveryCheck.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- searchObject.setSearchDiscovery(
- discoveryCheck.getSelection());
- }
- });
- gd = new GridData();
- gd.horizontalSpan = 2;
- discoveryCheck.setLayoutData(gd);
-
- bookmarkCheck =
- factory.createButton(expansion, null, SWT.CHECK);
- bookmarkCheck.setText(
- UpdateUI.getString(KEY_BOOKMARK_CHECK));
- bookmarkCheck.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- searchObject.setSearchBookmarks(
- bookmarkCheck.getSelection());
- }
- });
- gd = new GridData();
- gd.horizontalSpan = 2;
- bookmarkCheck.setLayoutData(gd);
-
- filterCheck = factory.createButton(expansion, null, SWT.CHECK);
- filterCheck.setText(
- UpdateUI.getString(KEY_FILTER_CHECK));
- filterCheck.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- searchObject.setFilterEnvironment(
- filterCheck.getSelection());
- }
- });
- gd = new GridData();
- gd.horizontalSpan = 2;
- filterCheck.setLayoutData(gd);
- }
- };
- optionsGroup.setText(UpdateUI.getString(KEY_OPTIONS));
- optionsGroup.createControl(optionContainer, factory);
-
- Composite sep = factory.createCompositeSeparator(parent);
- td = new TableData();
- td.align = TableData.FILL;
- td.heightHint = 1;
- td.colspan = 2;
- sep.setBackground(factory.getColor(FormWidgetFactory.COLOR_BORDER));
- sep.setLayoutData(td);
-
- Composite searchContainer = factory.createComposite(parent);
- GridLayout glayout = new GridLayout();
- glayout.numColumns = 2;
- searchContainer.setLayout(glayout);
- td = new TableData();
- td.align = TableData.FILL;
- td.colspan = 2;
- searchContainer.setLayoutData(td);
- GridData gd;
-
- infoLabel = factory.createLabel(searchContainer, null);
- infoLabel.setText(UpdateUI.getString(KEY_NO_LAST_SEARCH));
- gd = new GridData(GridData.VERTICAL_ALIGN_CENTER);
- infoLabel.setLayoutData(gd);
-
- searchButton =
- factory.createButton(
- searchContainer,
- UpdateUI.getString(KEY_SEARCH_NOW),
- SWT.PUSH);
- searchButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- performSearch();
- }
- });
- gd = new GridData(GridData.VERTICAL_ALIGN_CENTER);
- gd.horizontalIndent = 10;
- searchButton.setLayoutData(gd);
-
- monitor = new SearchMonitor(parent);
- td = new TableData();
- td.align = TableData.FILL;
- td.colspan = 2;
- monitor.setLayoutData(td);
- if (searchObject != null && searchObject.isSearchInProgress()) {
- // sync up with the search
- catchUp();
- }
- WorkbenchHelp.setHelp(parent, "org.eclipse.update.ui.SearchForm");
- }
-
- private void fillQueryGroup(
- Composite container,
- FormWidgetFactory factory) {
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginWidth = 2;
- layout.marginHeight = 2;
- container.setLayout(layout);
- factory.createLabel(
- container,
- UpdateUI.getString(KEY_CATEGORY));
- categoryCombo = new CCombo(container, SWT.READ_ONLY | SWT.FLAT);
- categoryCombo.setBackground(factory.getBackgroundColor());
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- categoryCombo.setLayoutData(gd);
-
- pagebook = new PageBook(container, SWT.NULL);
- pagebook.setBackground(factory.getBackgroundColor());
- gd =
- new GridData(
- GridData.FILL_VERTICAL | GridData.HORIZONTAL_ALIGN_FILL);
- gd.horizontalSpan = 2;
- pagebook.setLayoutData(gd);
- SearchCategoryDescriptor[] descriptors =
- SearchCategoryRegistryReader.getDefault().getCategoryDescriptors();
- for (int i = 0; i < descriptors.length; i++) {
- ISearchCategory category = descriptors[i].createCategory();
- if (category != null) {
- categories.add(category);
- descTable.put(category, descriptors[i]);
- categoryCombo.add(descriptors[i].getName());
- category.createControl(pagebook, factory);
- }
- }
- categoryCombo.pack();
- categoryCombo.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- int index = categoryCombo.getSelectionIndex();
- ISearchCategory category =
- (ISearchCategory) categories.get(index);
- switchTo(category);
- searchObject.setCategoryId(category.getId());
- }
- });
- categoryCombo.select(0);
- factory.paintBordersFor(container);
- }
-
- private void switchTo(ISearchCategory category) {
- pagebook.showPage(category.getControl());
- currentCategory = category;
- SearchCategoryDescriptor desc =
- (SearchCategoryDescriptor) descTable.get(category);
- descLabel.load(desc.getDescription(), true, true);
- reflow();
- updateSize();
- }
-
- private void selectCategory(SearchObject obj) {
- for (int i = 0; i < categories.size(); i++) {
- ISearchCategory category = (ISearchCategory) categories.get(i);
- if (category.getId().equals(obj.getCategoryId())) {
- categoryCombo.select(i);
- switchTo(category);
- category.load(obj.getSettings(), !obj.isCategoryFixed());
- categoryCombo.setEnabled(!obj.isCategoryFixed());
- break;
- }
- }
- }
-
- private void reflow(boolean searchFinished) {
- descLabel.getParent().layout(true);
- ((Composite) getControl()).layout(true);
- updateSize();
- }
-
- private void reflow() {
- reflow(false);
- }
-
- private void performSearch() {
- if (searchObject != null) {
- if (searchObject.isSearchInProgress()) {
- stopSearch();
- } else {
- if (!startSearch())
- return;
- }
- updateButtonText();
- }
- }
-
- private boolean startSearch() {
- try {
- if (!searchObject.isCategoryFixed()) {
- currentCategory.store(searchObject.getSettings());
- if (!searchObject
- .getCategoryId()
- .equals(currentCategory.getId()))
- searchObject.setCategoryId(currentCategory.getId());
- }
- searchObject.attachProgressMonitor(monitor);
- enableOptions(false);
- hookSearchView();
- searchObject.startSearch(getControl().getDisplay(), getQueries());
- } catch (InvocationTargetException e) {
- UpdateUI.logException(e);
- return false;
- } catch (InterruptedException e) {
- UpdateUI.logException(e);
- return false;
- }
- return true;
- }
-
- private void hookSearchView() {
- try {
- String viewId = UpdatePerspective.ID_SEARCH_RESULTS;
- IWorkbenchPage page = UpdateUI.getActivePage();
- SearchResultView sview = (SearchResultView)page.findView(viewId);
-
- if (sview == null) {
- sview = (SearchResultView)page.showView(viewId);
- page.showView(UpdatePerspective.ID_DETAILS);
- }
- else {
- sview.setSelectionActive(false);
- page.bringToTop(sview);
- }
- sview.setCurrentSearch(searchObject);
- } catch (PartInitException e) {
- UpdateUI.logException(e);
- }
- }
-
- private ISearchQuery[] getQueries() {
- int index = categoryCombo.getSelectionIndex();
- ISearchCategory category = (ISearchCategory) categories.get(index);
- return category.getQueries();
- }
-
- private void catchUp() {
- searchObject.attachProgressMonitor(monitor);
- enableOptions(false);
- updateButtonText();
- }
-
- private IStatusLineManager getRootManager(IStatusLineManager manager) {
- IContributionManager parent = manager;
-
- while (parent instanceof SubStatusLineManager) {
- IContributionManager newParent =
- ((SubStatusLineManager) parent).getParent();
- if (newParent == null)
- break;
- parent = newParent;
- }
- return (IStatusLineManager) parent;
- }
-
- private void stopSearch() {
- searchButton.setEnabled(false);
- searchObject.stopSearch();
- }
-
- private void enableOptions(boolean enable) {
- myComputerCheck.setEnabled(enable);
- myComputerSettings.setEnabled(enable);
- discoveryCheck.setEnabled(enable);
- bookmarkCheck.setEnabled(enable);
- filterCheck.setEnabled(enable);
- if (currentCategory.getControl()!=null)
- currentCategory.getControl().setEnabled(enable);
- }
-
- private void updateButtonText() {
- boolean inSearch =
- searchObject != null && searchObject.isSearchInProgress();
- if (inSearch)
- searchButton.setText(UpdateUI.getString(KEY_CANCEL));
- else
- searchButton.setText(
- UpdateUI.getString(KEY_SEARCH_NOW));
- searchButton.getParent().layout(true);
- }
-
- private void updateScopeSettings(SearchObject sobj) {
- myComputerCheck.setSelection(sobj.getSearchMyComputer());
- myComputerSettings.setEnabled(sobj.getSearchMyComputer());
- discoveryCheck.setSelection(sobj.getSearchDiscovery());
- bookmarkCheck.setSelection(sobj.getSearchBookmarks());
- filterCheck.setSelection(sobj.getFilterEnvironment());
- }
-
- public void expandTo(Object obj) {
- if (obj instanceof SearchObject) {
- inputChanged((SearchObject) obj);
- }
- }
- private void inputChanged(final SearchObject obj) {
- BusyIndicator.showWhile(getControl().getDisplay(), new Runnable() {
- public void run() {
- if (searchObject != null) {
- if (searchObject == obj)
- return;
- if (currentCategory != null) {
- if (!searchObject.isCategoryFixed())
- currentCategory.store(searchObject.getSettings());
- searchObject.setCategoryId(currentCategory.getId());
- }
- detachFrom(searchObject);
- }
- searchObject = obj;
- updateHeadingText(searchObject);
- selectCategory(obj);
- updateScopeSettings(obj);
- if (searchObject.isSearchInProgress()) {
- // sync up with the search
- catchUp();
- } else if (searchObject.isInstantSearch()) {
- searchObject.setInstantSearch(false);
- getControl().getDisplay().asyncExec(new Runnable() {
- public void run() {
- performSearch();
- }
- });
- }
- }
- });
- }
-
- public void objectChanged(Object object, String property) {
- if (object.equals(searchObject)) {
- if (NamedModelObject.P_NAME.equals(property))
- updateHeadingText(searchObject);
- }
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/SiteForm.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/SiteForm.java
deleted file mode 100644
index 4112a94..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/SiteForm.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.forms;
-
-import java.net.*;
-
-import org.eclipse.jface.action.IStatusLineManager;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.update.core.*;
-import org.eclipse.update.internal.ui.*;
-import org.eclipse.update.internal.ui.model.ISiteAdapter;
-import org.eclipse.update.internal.ui.model.SiteBookmark;
-import org.eclipse.update.internal.ui.pages.UpdateFormPage;
-import org.eclipse.update.internal.ui.views.DetailsView;
-import org.eclipse.update.ui.forms.internal.*;
-import org.eclipse.update.ui.forms.internal.engine.FormEngine;
-
-public class SiteForm extends UpdateWebForm {
- private static final String KEY_DESC = "SitePage.desc";
- private static final String KEY_LINK = "SitePage.link";
- private static final String KEY_WDESC = "SitePage.wdesc";
- private static final String KEY_WLINK = "SitePage.wlink";
- private Label url;
- private FormEngine desc;
- private SelectableFormLabel link;
- private ISiteAdapter currentAdapter;
- private Image updateSitesImage;
- private static final String KEY_UPDATE_SITES_IMAGE = "updateSites";
-
- public SiteForm(UpdateFormPage page) {
- super(page);
- updateSitesImage = UpdateUIImages.DESC_SITES_VIEW.createImage();
- }
-
- public void dispose() {
- updateSitesImage.dispose();
- super.dispose();
- }
-
- public void initialize(Object modelObject) {
- setHeadingText("");
- super.initialize(modelObject);
- //((Composite)getControl()).layout(true);
- }
-
- protected void createContents(Composite parent) {
- HTMLTableLayout layout = new HTMLTableLayout();
- parent.setLayout(layout);
- layout.leftMargin = layout.rightMargin = 10;
- layout.topMargin = 10;
- layout.horizontalSpacing = 0;
- layout.verticalSpacing = 20;
- layout.numColumns = 1;
- boolean webSiteFlag = computeWebSiteFlag(currentAdapter);
-
- FormWidgetFactory factory = getFactory();
- url = factory.createHeadingLabel(parent, null);
-
- desc = factory.createFormEngine(parent);
- setFocusControl(desc);
- desc.registerTextObject(KEY_UPDATE_SITES_IMAGE, updateSitesImage);
- String text =
- UpdateUI.getString(
- webSiteFlag ? KEY_WDESC : KEY_DESC);
- desc.load(text, true, true);
- TableData td = new TableData();
- td.align = TableData.FILL;
- td.grabHorizontal = true;
- desc.setLayoutData(td);
-
- IHyperlinkListener listener;
- IActionBars bars = getPage().getView().getViewSite().getActionBars();
- final IStatusLineManager manager = bars.getStatusLineManager();
-
- listener = new HyperlinkAdapter() {
- public void linkEntered(Control link) {
- URL currentURL = getCurrentURL(true);
- if (currentURL != null)
- manager.setMessage(currentURL.toString());
- }
- public void linkExited(Control link) {
- manager.setMessage(null);
- }
- public void linkActivated(Control link) {
- final URL currentURL = getCurrentURL(false);
- if (currentURL == null)
- return;
- BusyIndicator
- .showWhile(getControl().getDisplay(), new Runnable() {
- public void run() {
- DetailsView.showURL(currentURL.toString());
- }
- });
- }
- };
- link = new SelectableFormLabel(parent, SWT.NULL);
- link.setText(
- UpdateUI.getString(
- webSiteFlag ? KEY_WLINK : KEY_LINK));
- factory.turnIntoHyperlink(link, listener);
- WorkbenchHelp.setHelp(parent, "org.eclipse.update.ui.SiteForm");
- }
-
- public void expandTo(Object obj) {
- if (obj instanceof ISiteAdapter) {
- inputChanged((ISiteAdapter) obj);
- }
- }
-
- private void inputChanged(ISiteAdapter adapter) {
- boolean oldWebSiteFlag = computeWebSiteFlag(currentAdapter);
- boolean newWebSiteFlag = computeWebSiteFlag(adapter);
-
- if (oldWebSiteFlag != newWebSiteFlag) {
- String text =
- UpdateUI.getString(
- newWebSiteFlag ? KEY_WDESC : KEY_DESC);
- desc.load(text, true, true);
- link.setText(
- UpdateUI.getString(
- newWebSiteFlag ? KEY_WLINK : KEY_LINK));
- }
- setHeadingText(adapter.getLabel());
- url.setText(adapter.getURL().toString());
- updateLinkVisibility(adapter);
- url.getParent().layout();
- ((Composite) getControl()).layout();
- updateSize();
- getControl().redraw();
- currentAdapter = adapter;
- }
-
- private URL getCurrentURL(boolean rawURL) {
- if (currentAdapter == null)
- return null;
- boolean webSite = computeWebSiteFlag(currentAdapter);
- if (webSite)
- return currentAdapter.getURL();
- else {
- ISite site = currentAdapter.getSite(null);
- if (site == null)
- return null;
- if (rawURL)
- return getRawURL(site);
- else
- return getURLforSite(site);
- }
- }
- public URL getURLforSite(ISite site) {
- URL link = getRawURL(site);
- return link;
- /*
- String callback = WebInstallHandler.getCallbackString();
- if (callback == null)
- return link;
- try {
- return new URL(link.toExternalForm() + callback);
- } catch (MalformedURLException e) {
- return link;
- }
- */
- }
-
- private boolean computeWebSiteFlag(ISiteAdapter adapter) {
- return (
- adapter instanceof SiteBookmark
- && ((SiteBookmark) adapter).isWebBookmark())
- ? true
- : false;
- }
-
- public void objectChanged(Object object, String property) {
- if (object.equals(currentAdapter)) {
- inputChanged(currentAdapter);
- }
- }
-
- public URL getRawURL(ISite site) {
- IURLEntry entry = site.getDescription();
- if (entry == null)
- return null;
- return entry.getURL();
- }
-
- private void updateLinkVisibility(ISiteAdapter adapter) {
- /*
- ISite site = adapter.getSite();
- URL infoURL = getRawURL(site);
- link.setVisible(infoURL!=null);
- */
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/UIProblemHandler.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/UIProblemHandler.java
deleted file mode 100644
index e7d9cac..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/UIProblemHandler.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.forms;
-
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.update.configuration.IProblemHandler;
-import org.eclipse.update.internal.ui.UpdateUI;
-
-/**
- *
- */
-public class UIProblemHandler implements IProblemHandler {
- private static final String KEY_TITLE = "Revert.ProblemDialog.title";
-
- /*
- * @see IProblemHandler#reportProblem(String)
- */
- public boolean reportProblem(String problemText) {
- String title = UpdateUI.getString(KEY_TITLE);
- return MessageDialog.openQuestion(UpdateUI.getActiveWorkbenchShell(), title, problemText);
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/UnknownObjectForm.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/UnknownObjectForm.java
deleted file mode 100644
index b0105aa..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/UnknownObjectForm.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.forms;
-
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.update.configuration.IVolume;
-import org.eclipse.update.internal.ui.model.*;
-import org.eclipse.update.internal.ui.pages.UpdateFormPage;
-import org.eclipse.update.internal.ui.parts.VolumeLabelProvider;
-import org.eclipse.update.ui.forms.internal.*;
-
-public class UnknownObjectForm extends UpdateWebForm {
- private Object currentObj;
- private VolumeLabelProvider volumeProvider;
-
- public UnknownObjectForm(UpdateFormPage page) {
- super(page);
- }
-
- public void dispose() {
- if (volumeProvider!=null) volumeProvider.dispose();
- super.dispose();
- }
-
- public void objectChanged(Object object, String property) {
- if (object.equals(currentObj)) {
- expandTo(object);
- }
- }
-
- public void initialize(Object modelObject) {
- setHeadingText("");
- super.initialize(modelObject);
- }
-
- protected void createContents(Composite parent) {
- HTMLTableLayout layout = new HTMLTableLayout();
- parent.setLayout(layout);
- layout.leftMargin = layout.rightMargin = 10;
- layout.topMargin = 10;
- layout.horizontalSpacing = 0;
- layout.verticalSpacing = 20;
- layout.numColumns = 1;
-
- FormWidgetFactory factory = getFactory();
- Composite client = factory.createComposite(parent);
- TableData td = new TableData();
- td.align = TableData.FILL;
- WorkbenchHelp.setHelp(client, "org.eclipse.update.ui.UnknownObjectForm");
- }
-
- public void expandTo(Object obj) {
- String name = "";
-
- if (obj != null && obj instanceof UIModelObject) {
- if (obj instanceof MyComputerDirectory) {
- MyComputerDirectory dir = (MyComputerDirectory)obj;
- IVolume volume = dir.getVolume();
- if (volume!=null) name = getVolumeName(volume);
- }
- if (name.length()==0)
- name = obj.toString();
- }
- setHeadingText(name);
- if (getControl() != null) {
- ((Composite) getControl()).layout();
- getControl().redraw();
- }
- currentObj = obj;
- }
- private String getVolumeName(IVolume volume) {
- if (volumeProvider==null)
- volumeProvider = new VolumeLabelProvider();
- return volumeProvider.getText(volume);
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/UpdateAdapterFactory.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/UpdateAdapterFactory.java
deleted file mode 100644
index 493c41f..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/UpdateAdapterFactory.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.forms;
-import org.eclipse.core.runtime.*;
-import org.eclipse.ui.views.properties.*;
-import org.eclipse.update.internal.ui.model.*;
-import org.eclipse.update.internal.ui.properties.*;
-
-public class UpdateAdapterFactory implements IAdapterFactory {
-
-public Object getAdapter(Object adaptableObject, Class adapterType) {
- if (adapterType.equals(IPropertySource.class))
- return getProperties(adaptableObject);
- return null;
-}
-
-public Class[] getAdapterList() {
- return new Class[] { IPropertySource.class };
-}
-
-private Object getProperties(Object object) {
- if (object instanceof SiteBookmark) {
- return new SiteBookmarkPropertySource((SiteBookmark)object);
- }
- return null;
-}
-
-}
-
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/UpdateSection.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/UpdateSection.java
deleted file mode 100644
index 5cd3ac2..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/UpdateSection.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.forms;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.util.*;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.update.internal.ui.UpdateUI;
-import org.eclipse.update.internal.ui.pages.*;
-import org.eclipse.update.internal.ui.preferences.UpdateColors;
-import org.eclipse.update.ui.forms.internal.*;
-
-public abstract class UpdateSection extends FormSection {
- private UpdateFormPage page;
-
- public UpdateSection(UpdateFormPage page) {
- this.page = page;
- IPreferenceStore pstore = UpdateUI.getDefault().getPreferenceStore();
- pstore.addPropertyChangeListener(new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent e) {
- if (e.getProperty().equals(UpdateColors.P_TOPIC_COLOR))
- updateHeaderColor();
- }
- });
- }
-
- public UpdateFormPage getPage() {
- return page;
- }
-
- protected void updateHeaderColor() {
- header.setForeground(UpdateColors.getTopicColor(header.getDisplay()));
- }
-}
-
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/UpdateWebForm.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/UpdateWebForm.java
deleted file mode 100644
index 3941b91..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/forms/UpdateWebForm.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.forms;
-
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.update.internal.ui.*;
-import org.eclipse.update.internal.ui.model.*;
-import org.eclipse.update.internal.ui.pages.IUpdateFormPage;
-import org.eclipse.update.ui.forms.internal.WebForm;
-
-public class UpdateWebForm extends WebForm implements IUpdateForm, IUpdateModelChangedListener {
- private IUpdateFormPage page;
- private Control focusControl;
-
- public UpdateWebForm(IUpdateFormPage page) {
- this.page = page;
- UpdateModel model = UpdateUI.getDefault().getUpdateModel();
- model.addUpdateModelChangedListener(this);
- }
-
- public void dispose() {
- UpdateModel model = UpdateUI.getDefault().getUpdateModel();
- model.removeUpdateModelChangedListener(this);
- super.dispose();
- }
-
- public void objectsAdded(Object parent, Object [] children) {
- }
- public void objectsRemoved(Object parent, Object [] children) {
- }
- public void objectChanged(Object object, String property) {
- }
-
- public IUpdateFormPage getPage() {
- return page;
- }
-
- public void initialize(Object model) {
- super.initialize(model);
- if (isWhiteBackground()) {
- setHeadingImage(UpdateUIImages.get(UpdateUIImages.IMG_FORM_BANNER));
- setHeadingUnderlineImage(
- UpdateUIImages.get(UpdateUIImages.IMG_FORM_UNDERLINE));
- }
- refreshSize();
- }
- private boolean isWhiteBackground() {
- Color color = getFactory().getBackgroundColor();
- return (
- color.getRed() == 255 && color.getGreen() == 255 && color.getBlue() == 255);
- }
- protected void refreshSize() {
- ((Composite) getControl()).layout();
- updateSize();
- }
- protected void setFocusControl(Control control) {
- focusControl = control;
- }
- public void setFocus() {
- if (focusControl!=null) focusControl.setFocus();
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/BookmarkFolder.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/BookmarkFolder.java
deleted file mode 100644
index 86f2b9f..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/BookmarkFolder.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.model;
-
-import java.util.ArrayList;
-
-public class BookmarkFolder extends NamedModelObject {
- protected ArrayList children= new ArrayList();
- public BookmarkFolder() {
- }
-
- public BookmarkFolder(String name) {
- super(name);
- }
-
- public Object[] getChildren(Object parent) {
- return children.toArray();
- }
-
- public boolean hasChildren() {
- return children.size()>0;
- }
-
- public void addChild(NamedModelObject object) {
- internalAdd(object);
- notifyObjectsAdded(this, new Object[] {object});
- }
-
- public void addChildren(NamedModelObject [] objects) {
- for (int i=0; i<objects.length; i++) {
- internalAdd(objects[i]);
- }
- notifyObjectsAdded(this, objects);
- }
-
- protected void internalAdd(NamedModelObject child) {
- children.add(child);
- child.setModel(getModel());
- child.setParent(this);
- }
-
- public void removeChildren(NamedModelObject [] objects) {
- for (int i=0; i<objects.length; i++) {
- children.remove(objects[i]);
- objects[i].setParent(null);
- }
- notifyObjectsRemoved(this, objects);
- }
-}
\ No newline at end of file
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/BookmarkUtil.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/BookmarkUtil.java
deleted file mode 100644
index 625dbaa..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/BookmarkUtil.java
+++ /dev/null
@@ -1,251 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.model;
-
-import java.io.*;
-import java.net.*;
-import java.util.*;
-
-import org.apache.xerces.parsers.DOMParser;
-import org.eclipse.core.runtime.*;
-import org.eclipse.update.internal.ui.UpdateUI;
-import org.eclipse.update.internal.ui.search.*;
-import org.w3c.dom.*;
-import org.xml.sax.SAXException;
-
-public class BookmarkUtil {
- public static void parse(String fileName, Vector bookmarks) {
- File file = new File(fileName);
- if (!file.exists())
- return;
- DOMParser parser = new DOMParser();
- try {
- parser.parse(fileName);
- Document doc = parser.getDocument();
- Node root = doc.getDocumentElement();
- processRoot(root, bookmarks);
- } catch (SAXException e) {
- UpdateUI.logException(e);
- } catch (IOException e) {
- UpdateUI.logException(e);
- }
- }
-
- public static SiteBookmark[] getBookmarks(Vector bookmarks) {
- ArrayList result = new ArrayList();
- for (int i = 0; i < bookmarks.size(); i++) {
- processEntry(bookmarks.get(i), result);
- }
- return (SiteBookmark[]) result.toArray(new SiteBookmark[result.size()]);
- }
-
- public static BookmarkFolder getFolder(Vector bookmarks, IPath path) {
- NamedModelObject object = find(bookmarks, path);
- if (object != null && object instanceof BookmarkFolder)
- return (BookmarkFolder) object;
- return null;
- }
-
- public static NamedModelObject find(Vector bookmarks, IPath path) {
- Object[] array = bookmarks.toArray();
- return find(array, path);
- }
-
- private static NamedModelObject find(Object[] array, IPath path) {
- String name = path.segment(0);
- for (int i = 0; i < array.length; i++) {
- NamedModelObject obj = (NamedModelObject) array[i];
- if (obj.getName().equals(name)) {
- if (obj instanceof BookmarkFolder) {
- if (path.segmentCount() > 1) {
- IPath childPath = path.removeFirstSegments(1);
- BookmarkFolder folder = (BookmarkFolder) obj;
- return find(folder.getChildren(null), childPath);
- }
- }
- return obj;
- }
- }
- return null;
- }
-
- private static void processRoot(Node root, Vector bookmarks) {
- if (root.getNodeName().equals("bookmarks")) {
- NodeList children = root.getChildNodes();
- processChildren(children, null, bookmarks);
- }
- }
- private static void processChildren(
- NodeList children,
- BookmarkFolder folder,
- Vector bookmarks) {
- UpdateModel model = UpdateUI.getDefault().getUpdateModel();
- for (int i = 0; i < children.getLength(); i++) {
- Node child = children.item(i);
- NamedModelObject object = null;
- if (child.getNodeType() == Node.ELEMENT_NODE) {
- if (child.getNodeName().equals("site")) {
- object = createSite(child);
-
- } else if (child.getNodeName().equals("folder")) {
- object = createFolder(child);
- } else if (child.getNodeName().equals("search")) {
- object = createSearch(child);
- }
- }
- if (object != null) {
- if (folder != null) {
- folder.addChild(object);
- } else {
- bookmarks.add(object);
- }
- object.setModel(model);
- }
- }
- }
-
- private static SiteBookmark createSite(Node child) {
- String name = getAttribute(child, "name");
- URL url = null;
- try {
- url = new URL(getAttribute(child, "url"));
- } catch (MalformedURLException e) {
- }
- boolean webBookmark = false;
- String web = getAttribute(child, "web");
- if (web!=null && web.equals("true"))
- webBookmark = true;
- return new SiteBookmark(name, url, webBookmark);
- }
-
- private static BookmarkFolder createFolder(Node child) {
- BookmarkFolder folder = new BookmarkFolder();
- String name = getAttribute(child, "name");
- folder.setName(name);
- if (child.hasChildNodes()) {
- NodeList children = child.getChildNodes();
- processChildren(children, folder, null);
- }
- return folder;
- }
- private static SearchObject createSearch(Node child) {
- String name = getAttribute(child, "name");
- String categoryId = getAttribute(child, "category");
- String fixed = getAttribute(child, "fixed");
- boolean fixedCategory = fixed.equals("true");
- SearchCategoryDescriptor desc =
- SearchCategoryRegistryReader.getDefault().getDescriptor(categoryId);
- SearchObject search = new SearchObject(name, desc, fixedCategory);
- if (child.hasChildNodes()) {
- NodeList children = child.getChildNodes();
- Hashtable settings = search.getSettings();
- for (int i = 0; i < children.getLength(); i++) {
- Node param = children.item(i);
- if (param.getNodeType() == Node.ELEMENT_NODE
- && param.getNodeName().equals("param")) {
- String key = getAttribute(param, "name");
- String value = getAttribute(param, "value");
- settings.put(key, value);
- }
- }
- }
- return search;
- }
- public static void store(String fileName, Vector bookmarks) {
- try {
- FileOutputStream fos = new FileOutputStream(fileName);
- OutputStreamWriter osw = new OutputStreamWriter(fos, "UTF8");
- PrintWriter writer = new PrintWriter(osw);
- writer.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
- writer.println("<bookmarks>");
- for (int i = 0; i < bookmarks.size(); i++) {
- Object obj = bookmarks.get(i);
- writeObject(" ", obj, writer);
- }
- writer.println("</bookmarks>");
- writer.flush();
- writer.close();
- osw.close();
- fos.close();
- } catch (IOException e) {
- }
- }
- private static void writeObject(
- String indent,
- Object obj,
- PrintWriter writer) {
- if (obj instanceof SiteBookmark) {
- SiteBookmark bookmark = (SiteBookmark) obj;
- String name = bookmark.getName();
- String url = bookmark.getURL().toString();
- String web = bookmark.isWebBookmark()?"true":"false";
- writer.println(indent + "<site name=\"" + name + "\" url=\"" + url + "\" web=\"" + web + "\"/>");
- } else if (obj instanceof BookmarkFolder) {
- BookmarkFolder folder = (BookmarkFolder) obj;
- String name = folder.getName();
- writer.println(indent + "<folder name=\"" + name + "\">");
- Object[] children = folder.getChildren(folder);
- String indent2 = indent + " ";
- for (int i = 0; i < children.length; i++) {
- writeObject(indent2, children[i], writer);
- }
- writer.println(indent + "</folder>");
- } else if (obj instanceof SearchObject) {
- SearchObject search = (SearchObject) obj;
- if (search.isPersistent() == false)
- return;
- String name = search.getName();
- String categoryId = search.getCategoryId();
- String fixed = search.isCategoryFixed() ? "true" : "false";
- writer.println(
- indent
- + "<search name=\""
- + name
- + "\" category=\""
- + categoryId
- + "\" fixed=\""
- + fixed
- + "\">");
- Hashtable settings = search.getSettings();
- String indent2 = indent + " ";
- for (Enumeration enum = settings.keys(); enum.hasMoreElements();) {
- String key = (String) enum.nextElement();
- String value = (String) settings.get(key);
- writer.println(
- indent2 + "<param name=\"" + key + "\" value=\"" + value + "\"/>");
- }
- writer.println(indent + "</search>");
- }
-
- }
-
- private static String getAttribute(Node node, String name) {
- NamedNodeMap atts = node.getAttributes();
- Node att = atts.getNamedItem(name);
- if (att != null) {
- return att.getNodeValue();
- }
- return "";
- }
- private static void processFolder(BookmarkFolder folder, ArrayList result) {
- Object[] children = folder.getChildren(folder);
- for (int i = 0; i < children.length; i++) {
- processEntry(children[i], result);
- }
- }
- private static void processEntry(Object obj, ArrayList result) {
- if (obj instanceof SiteBookmark)
- result.add(obj);
- else if (obj instanceof BookmarkFolder) {
- processFolder((BookmarkFolder) obj, result);
- }
- }
-}
\ No newline at end of file
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/ConfiguredFeatureAdapter.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/ConfiguredFeatureAdapter.java
deleted file mode 100644
index 9ba9711..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/ConfiguredFeatureAdapter.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.model;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.PluginVersionIdentifier;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.update.configuration.*;
-import org.eclipse.update.core.*;
-
-/**
- * @version 1.0
- * @author
- */
-public class ConfiguredFeatureAdapter
- extends SimpleFeatureAdapter
- implements IConfiguredFeatureAdapter {
- private IConfiguredSiteAdapter adapter;
- private boolean configured;
- private boolean updated;
-
- public ConfiguredFeatureAdapter(
- IConfiguredSiteAdapter adapter,
- IFeature feature,
- boolean configured,
- boolean updated,
- boolean optional) {
- super(feature, optional);
- this.adapter = adapter;
- this.configured = configured;
- this.updated = updated;
- }
-
- public boolean equals(Object object) {
- if (object == null)
- return false;
- if (object == this)
- return true;
- if (object instanceof ConfiguredFeatureAdapter) {
- try {
- ConfiguredFeatureAdapter ad = (ConfiguredFeatureAdapter) object;
- return ad.getConfiguredSite().equals(getConfiguredSite())
- && ad.getFeature(null).equals(getFeature(null));
- } catch (CoreException e) {
- }
- }
- return false;
- }
-
- public IConfiguredSite getConfiguredSite() {
- return adapter.getConfiguredSite();
- }
- public IInstallConfiguration getInstallConfiguration() {
- return adapter.getInstallConfiguration();
- }
- public boolean isConfigured() {
- return configured;
- }
-
- public boolean isUpdated() {
- return updated;
- }
- public IFeatureAdapter[] getIncludedFeatures(IProgressMonitor monitor) {
- try {
- IIncludedFeatureReference[] included =
- getFeature(null).getIncludedFeatureReferences();
- ConfiguredFeatureAdapter[] result =
- new ConfiguredFeatureAdapter[included.length];
- if (monitor == null)
- monitor = new NullProgressMonitor();
- SubProgressMonitor subMonitor = new SubProgressMonitor(monitor, 1);
- subMonitor.beginTask("", included.length);
-
- for (int i = 0; i < included.length; i++) {
- IIncludedFeatureReference fref = included[i];
- IFeature feature;
- boolean childConfigured = configured;
- boolean updated = false;
- try {
- feature =
- fref.getFeature(
- !configured,
- getConfiguredSite(),
- new SubProgressMonitor(subMonitor, 1));
- childConfigured =
- adapter.getConfiguredSite().isConfigured(feature);
- ///*
- PluginVersionIdentifier refpid =
- fref.getVersionedIdentifier().getVersion();
- PluginVersionIdentifier fpid =
- feature.getVersionedIdentifier().getVersion();
- updated = !refpid.equals(fpid);
- //*/
- } catch (CoreException e) {
- feature = new MissingFeature(getFeature(null), fref);
- childConfigured = false;
- }
-
- result[i] =
- new ConfiguredFeatureAdapter(
- adapter,
- feature,
- childConfigured,
- updated,
- fref.isOptional());
- result[i].setIncluded(true);
- }
- return result;
- } catch (CoreException e) {
- return new IFeatureAdapter[0];
- }
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/ConfiguredSiteAdapter.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/ConfiguredSiteAdapter.java
deleted file mode 100644
index 7ecdde0..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/ConfiguredSiteAdapter.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.model;
-
-import org.eclipse.update.configuration.*;
-
-/**
- * @version 1.0
- * @author
- */
-public class ConfiguredSiteAdapter
- extends UIModelObject
- implements IConfiguredSiteAdapter {
- private IInstallConfiguration config;
- private IConfiguredSite csite;
-
- public ConfiguredSiteAdapter(IInstallConfiguration config, IConfiguredSite csite) {
- this.csite = csite;
- this.config = config;
- }
-
- public IConfiguredSite getConfiguredSite() {
- return csite;
- }
-
- public IInstallConfiguration getInstallConfiguration() {
- return config;
- }
-
- public boolean equals(Object object) {
- if (object==null) return false;
- if (object == this) return true;
- if (object instanceof ConfiguredSiteAdapter) {
- ConfiguredSiteAdapter adapter = (ConfiguredSiteAdapter)object;
- return csite!=null && csite.getSite().equals(adapter.getConfiguredSite().getSite());
- }
- return false;
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/DiscoveryFolder.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/DiscoveryFolder.java
deleted file mode 100644
index 860be3d..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/DiscoveryFolder.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.model;
-
-import org.eclipse.update.internal.ui.UpdateUI;
-import org.eclipse.update.core.*;
-import org.eclipse.update.configuration.*;
-import org.eclipse.core.runtime.CoreException;
-
-public class DiscoveryFolder extends BookmarkFolder {
- public DiscoveryFolder() {
- super(UpdateUI.getString("DiscoveryFolder"));
- setModel(UpdateUI.getDefault().getUpdateModel());
- }
- public void initialize() {
- children.clear();
- try {
- ILocalSite site = SiteManager.getLocalSite();
- IInstallConfiguration config = site.getCurrentConfiguration();
- IConfiguredSite[] csites = config.getConfiguredSites();
- for (int i = 0; i < csites.length; i++) {
- IConfiguredSite csite = csites[i];
- IFeatureReference[] refs = csite.getConfiguredFeatures();
- for (int j = 0; j < refs.length; j++) {
- IFeatureReference ref = refs[j];
- IFeature feature = ref.getFeature(null);
- IURLEntry[] entries = feature.getDiscoverySiteEntries();
- if (entries.length > 0) {
- // Only add discovery sites if
- // of root features
- if (!isIncluded(ref, refs))
- addBookmarks(entries);
- }
- }
- }
- } catch (CoreException e) {
- UpdateUI.logException(e);
- }
- }
- private boolean isIncluded(
- IFeatureReference ref,
- IFeatureReference[] refs) {
- try {
- VersionedIdentifier vid = ref.getVersionedIdentifier();
- for (int i = 0; i < refs.length; i++) {
- IFeatureReference candidate = refs[i];
- // Ignore self
- if (candidate.equals(ref))
- continue;
- IFeature cfeature = candidate.getFeature(null);
- IFeatureReference[] irefs =
- cfeature.getIncludedFeatureReferences();
- for (int j = 0; j < irefs.length; j++) {
- IFeatureReference iref = irefs[j];
- VersionedIdentifier ivid = iref.getVersionedIdentifier();
- if (ivid.equals(vid)) {
- // bingo - included in at least one feature
- return true;
- }
- }
- }
- } catch (CoreException e) {
- }
- return false;
- }
- private void addBookmarks(IURLEntry[] entries) {
- for (int i = 0; i < entries.length; i++) {
- IURLEntry entry = entries[i];
- SiteBookmark bookmark =
- new SiteBookmark(
- entry.getAnnotation(),
- entry.getURL(),
- entry.getType() == IURLEntry.WEB_SITE);
- if (!contains(bookmark))
- internalAdd(bookmark);
- }
- }
- private boolean contains(SiteBookmark bookmark) {
- for (int i = 0; i < children.size(); i++) {
- Object o = children.get(i);
- if (o instanceof SiteBookmark) {
- // note: match on URL, not the label
- if (bookmark.getURL().equals(((SiteBookmark) o).getURL()))
- return true;
- }
- }
- return false;
- }
- public Object[] getChildren(Object parent) {
- if (hasChildren() == false)
- initialize();
- return super.getChildren(parent);
- }
-}
\ No newline at end of file
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/ExtensionRoot.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/ExtensionRoot.java
deleted file mode 100644
index 9fe287e..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/ExtensionRoot.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.model;
-
-import java.io.File;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-
-public class ExtensionRoot extends UIModelObject implements IWorkbenchAdapter {
- private UIModelObject parent;
- private File root;
-
- public ExtensionRoot(UIModelObject parent, File root) {
- this.parent = parent;
- this.root = root;
- }
-
- public Object getAdapter(Class adapter) {
- if (adapter.equals(IWorkbenchAdapter.class)) {
- return this;
- }
- return super.getAdapter(adapter);
- }
-
- public String getName() {
- return root.getName();
- }
-
- public String toString() {
- return getName();
- }
-
- public File getInstallableDirectory() {
- return root;
- }
-
- /**
- * @see IWorkbenchAdapter#getChildren(Object)
- */
-
- public Object[] getChildren(Object parent) {
- return new Object[0];
- }
-
- public static boolean isExtensionRoot(File directory) {
- File marker = new File(directory, ".eclipseextension");
- if (!marker.exists() || marker.isDirectory()) return false;
- return true;
- }
-
- /**
- * @see IWorkbenchAdapter#getImageDescriptor(Object)
- */
- public ImageDescriptor getImageDescriptor(Object obj) {
- return PlatformUI.getWorkbench().getEditorRegistry().getImageDescriptor(getName());
- }
-
- /**
- * @see IWorkbenchAdapter#getLabel(Object)
- */
- public String getLabel(Object obj) {
- return getName();
- }
-
-
- /**
- * @see IWorkbenchAdapter#getParent(Object)
- */
- public Object getParent(Object arg0) {
- return parent;
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/FeatureAdapter.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/FeatureAdapter.java
deleted file mode 100644
index f8a8a85..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/FeatureAdapter.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.model;
-
-import org.eclipse.update.configuration.*;
-import org.eclipse.update.core.*;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * @version 1.0
- * @author
- */
-public abstract class FeatureAdapter extends UIModelObject implements IFeatureAdapter {
- private boolean included=false;
-
- /*
- * @see IFeatureAdapter#getInstallConfiguration()
- */
- public IInstallConfiguration getInstallConfiguration() {
- return null;
- }
-
- public boolean isIncluded() {
- return included;
- }
-
- protected void setIncluded(boolean included) {
- this.included = included;
- }
-
- public String toString() {
- try {
- IFeature feature = getFeature(null);
- return feature.getLabel();
- }
- catch (CoreException e) {
- return "<failure>";
- }
- }
- public boolean hasIncludedFeatures(IProgressMonitor monitor) {
- try {
- IFeatureReference [] included = getFeature(monitor).getIncludedFeatureReferences();
- return included.length>0;
- }
- catch (CoreException e) {
- return false;
- }
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/FeatureReferenceAdapter.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/FeatureReferenceAdapter.java
deleted file mode 100644
index 6387e67..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/FeatureReferenceAdapter.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.model;
-import java.lang.reflect.InvocationTargetException;
-import java.net.URL;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.jface.operation.IRunnableContext;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.update.core.*;
-import org.eclipse.update.internal.ui.UpdateUI;
-
-public class FeatureReferenceAdapter extends FeatureAdapter {
- private IFeatureReference featureRef;
- private boolean touched;
-
- public FeatureReferenceAdapter(IFeatureReference featureRef) {
- this.featureRef = featureRef;
- setIncluded(featureRef instanceof IIncludedFeatureReference);
- }
-
- public IFeature getFeature(IProgressMonitor monitor) throws CoreException {
- return featureRef.getFeature(monitor);
- }
-
- public String getFastLabel() {
- return featureRef.getURL().toString();
- }
-
- public ISite getSite() {
- return featureRef.getSite();
- }
-
- public URL getURL() {
- return featureRef.getURL();
- }
-
- public boolean isOptional() {
- return featureRef instanceof IIncludedFeatureReference ?
- ((IIncludedFeatureReference)featureRef).isOptional():false;
- }
-
- public void touchIncludedFeatures(IRunnableContext context) {
- if (touched) return;
- final IFeatureReference [] included;
-
- try {
- included = getFeature(null).getIncludedFeatureReferences();
- }
- catch (CoreException e) {
- return;
- }
- if (included.length == 0) return;
- IRunnableWithProgress op = new IRunnableWithProgress () {
- public void run(IProgressMonitor monitor) {
- monitor.beginTask(UpdateUI.getString("SiteBookmark.downloading"), included.length);
- for (int i=0; i<included.length; i++) {
- IFeatureReference ref = included[i];
- try {
- monitor.subTask(ref.getURL().toString());
- ref.getFeature(new SubProgressMonitor(monitor, 1));
- //monitor.worked(1);
- }
- catch (CoreException e) {
- }
- }
- monitor.done();
- }
- };
- try {
- context.run(true, false, op);
- touched=true;
- }
- catch (InvocationTargetException e) {
- }
- catch (InterruptedException e) {
- }
- }
-
- public IFeatureAdapter[] getIncludedFeatures(IProgressMonitor monitor) {
- try {
- IFeatureReference[] included =
- getFeature(monitor).getIncludedFeatureReferences();
- FeatureReferenceAdapter[] result =
- new FeatureReferenceAdapter[included.length];
- for (int i = 0; i < included.length; i++) {
- result[i] = new FeatureReferenceAdapter(included[i]);
- }
- return result;
- } catch (CoreException e) {
- return new IFeatureAdapter[0];
- }
- }
-
- public IFeatureReference getFeatureReference() {
- return featureRef;
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/IConfiguredFeatureAdapter.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/IConfiguredFeatureAdapter.java
deleted file mode 100644
index eb7c42a..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/IConfiguredFeatureAdapter.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.model;
-
-
-/**
- * @version 1.0
- * @author
- */
-public interface IConfiguredFeatureAdapter extends IConfiguredSiteContext {
- public boolean isConfigured();
- public boolean isUpdated();
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/IConfiguredSiteAdapter.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/IConfiguredSiteAdapter.java
deleted file mode 100644
index 85e270d..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/IConfiguredSiteAdapter.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.model;
-
-
-/**
- * @version 1.0
- * @author
- */
-public interface IConfiguredSiteAdapter extends IConfiguredSiteContext {
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/IConfiguredSiteContext.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/IConfiguredSiteContext.java
deleted file mode 100644
index c7e278b..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/IConfiguredSiteContext.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.model;
-
-import org.eclipse.update.configuration.*;
-
-/**
- * @version 1.0
- * @author
- */
-public interface IConfiguredSiteContext {
- public IInstallConfiguration getInstallConfiguration();
- public IConfiguredSite getConfiguredSite();
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/IFeatureAdapter.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/IFeatureAdapter.java
deleted file mode 100644
index 1783126..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/IFeatureAdapter.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.model;
-
-import java.net.URL;
-
-import org.eclipse.update.core.*;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * @version 1.0
- * @author
- */
-public interface IFeatureAdapter {
- public URL getURL();
- public ISite getSite();
- public IFeature getFeature(IProgressMonitor monitor) throws CoreException;
- public IFeatureAdapter [] getIncludedFeatures(IProgressMonitor monitor);
- public boolean hasIncludedFeatures(IProgressMonitor monitor);
- public boolean isIncluded();
- public boolean isOptional();
- public String getFastLabel();
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/ISiteAdapter.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/ISiteAdapter.java
deleted file mode 100644
index 1ebdf6d..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/ISiteAdapter.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.model;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.update.core.ISite;
-import java.net.URL;
-
-public interface ISiteAdapter {
-
- public String getLabel();
- public URL getURL();
- public ISite getSite(IProgressMonitor monitor);
-
-}
-
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/IUpdateModelChangedListener.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/IUpdateModelChangedListener.java
deleted file mode 100644
index 776fe40..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/IUpdateModelChangedListener.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.model;
-
-public interface IUpdateModelChangedListener {
- public void objectsAdded(Object parent, Object [] children);
- public void objectsRemoved(Object parent, Object [] children);
- public void objectChanged(Object object, String property);
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/MissingFeature.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/MissingFeature.java
deleted file mode 100644
index 4fa8f62..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/MissingFeature.java
+++ /dev/null
@@ -1,456 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.model;
-
-import java.io.InputStream;
-import java.net.URL;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.update.core.*;
-import org.eclipse.update.core.model.InstallAbortedException;
-import org.eclipse.update.internal.ui.UpdateUI;
-
-public class MissingFeature implements IFeature {
-
- private URL url;
- private ISite site;
- private IFeatureReference reference;
- private IFeature parent;
- private IURLEntry desc;
- private VersionedIdentifier id = new VersionedIdentifier(UpdateUI.getString("MissingFeature.id"), "0.0.0"); //$NON-NLS-1$ //$NON-NLS-2$
- public MissingFeature(ISite site, URL url) {
- this.site = site;
- this.url = url;
- desc = new IURLEntry() {
- public URL getURL() {
- return null;
- }
- public String getAnnotation() {
- return UpdateUI.getString("MissingFeature.desc.unknown"); //$NON-NLS-1$
- }
- public Object getAdapter(Class key) {
- return null;
- }
- public int getType() {
- return IURLEntry.UPDATE_SITE;
- }
- };
- }
- public MissingFeature(IFeatureReference ref) {
- this(null, ref);
- }
-
- public MissingFeature(IFeature parent, IFeatureReference ref) {
- this(ref.getSite(), ref.getURL());
- this.reference = ref;
- this.parent = parent;
-
- if (isOptional()) {
- desc = new IURLEntry() {
- public URL getURL() {
- return null;
- }
- public String getAnnotation() {
- return UpdateUI.getString("MissingFeature.desc.optional"); //$NON-NLS-1$
- }
- public Object getAdapter(Class key) {
- return null;
- }
- public int getType() {
- return IURLEntry.UPDATE_SITE;
- }
- };
- }
- }
-
- public boolean isOptional() {
- return reference != null
- && reference instanceof IIncludedFeatureReference
- && ((IIncludedFeatureReference) reference).isOptional();
- }
-
- public IFeature getParent() {
- return parent;
- }
-
- public URL getOriginatingSiteURL() {
- VersionedIdentifier vid = getVersionedIdentifier();
- if (vid == null)
- return null;
- String key = vid.getIdentifier();
- return UpdateUI.getOriginatingURL(key);
- }
-
- /*
- * @see IFeature#getIdentifier()
- */
- public VersionedIdentifier getVersionedIdentifier() {
- if (reference != null) {
- try {
- return reference.getVersionedIdentifier();
- } catch (CoreException e) {
- }
- }
- return id;
- }
-
- /*
- * @see IFeature#getSite()
- */
- public ISite getSite() {
- return site;
- }
-
- /*
- * @see IFeature#getLabel()
- */
- public String getLabel() {
- if (reference != null
- && reference instanceof IIncludedFeatureReference) {
- String name = ((IIncludedFeatureReference) reference).getName();
- if (name != null)
- return name;
- }
- return url.toString();
- }
-
- /*
- * @see IFeature#getURL()
- */
- public URL getURL() {
- return url;
- }
-
- /*
- * @see IFeature#getUpdateInfo()
- */
- public IURLEntry getUpdateSiteEntry() {
- return null;
- }
-
- /*
- * @see IFeature#getDiscoveryInfos()
- */
- public IURLEntry[] getDiscoverySiteEntries() {
- return null;
- }
-
- /*
- * @see IFeature#getProvider()
- */
- public String getProvider() {
- return UpdateUI.getString("MissingFeature.provider"); //$NON-NLS-1$
- }
-
- /*
- * @see IFeature#getDescription()
- */
- public IURLEntry getDescription() {
- return desc;
- }
-
- /*
- * @see IFeature#getCopyright()
- */
- public IURLEntry getCopyright() {
- return null;
- }
-
- /*
- * @see IFeature#getLicense()
- */
- public IURLEntry getLicense() {
- return null;
- }
-
- /*
- * @see IFeature#getOS()
- */
- public String getOS() {
- return null;
- }
-
- /*
- * @see IFeature#getWS()
- */
- public String getWS() {
- return null;
- }
-
- /*
- * @see IFeature#getNL()
- */
- public String getNL() {
- return null;
- }
-
- /*
- * @see IFeature#getArch()
- */
- public String getOSArch() {
- return null;
- }
-
- /*
- * @see IFeature#getImage()
- */
- public URL getImage() {
- return null;
- }
-
- /*
- * @see IFeature#getImports()
- */
- public IImport[] getImports() {
- return null;
- }
-
- /*
- * @see IFeature#getArchives()
- */
- public String[] getArchives() {
- return null;
- }
-
- /*
- * @see IFeature#getDataEntries()
- */
- public INonPluginEntry[] getNonPluginEntries() {
- return null;
- }
-
- /*
- * @see IFeature#addDataEntry(IDataEntry)
- */
- public void addNonPluginEntry(INonPluginEntry dataEntry) {
- }
-
- /*
- * @see IFeature#getDownloadSize()
- */
- public long getDownloadSize() {
- return 0;
- }
-
- /*
- * @see IFeature#getInstallSize(ISite)
- */
- public long getInstallSize() {
- return 0;
- }
-
- /*
- * @see IFeature#isPrimary()
- */
- public boolean isPrimary() {
- return false;
- }
-
- /*
- * @see IFeature#getApplication()
- */
- public String getApplication() {
- return null;
- }
-
- /*
- * @see IPluginContainer#getPluginEntries()
- */
- public IPluginEntry[] getPluginEntries() {
- return new IPluginEntry[0];
- }
-
- /*
- * @see IPluginContainer#getPluginEntryCount()
- */
- public int getPluginEntryCount() {
- return 0;
- }
-
- /*
- * @see IPluginContainer#getDownloadSize(IPluginEntry)
- */
- public long getDownloadSize(IPluginEntry entry) {
- return 0;
- }
-
- /*
- * @see IPluginContainer#getInstallSize(IPluginEntry)
- */
- public long getInstallSize(IPluginEntry entry) {
- return 0;
- }
-
- /*
- * @see IPluginContainer#addPluginEntry(IPluginEntry)
- */
- public void addPluginEntry(IPluginEntry pluginEntry) {
- }
-
- /*
- * @see IPluginContainer#store(IPluginEntry, String, InputStream)
- */
- public void store(IPluginEntry entry, String name, InputStream inStream)
- throws CoreException {
- }
-
- /*
- * @see IAdaptable#getAdapter(Class)
- */
- public Object getAdapter(Class adapter) {
- return null;
- }
-
- /*
- * @see IPluginContainer#remove(IPluginEntry)
- */
- public void remove(IPluginEntry entry) throws CoreException {
- }
-
- /*
- * @see IFeature#setFeatureContentProvider(IFeatureContentProvider)
- */
- public void setFeatureContentProvider(IFeatureContentProvider featureContentProvider) {
- }
-
- /*
- * @see IFeature#getFeatureContentConsumer()
- */
- public IFeatureContentConsumer getFeatureContentConsumer()
- throws CoreException {
- return null;
- }
-
- /*
- * @see IFeature#setSite(ISite)
- */
- public void setSite(ISite site) throws CoreException {
- this.site = site;
- }
-
- /*
- * @see IFeature#getFeatureContentProvider()
- */
- public IFeatureContentProvider getFeatureContentProvider()
- throws CoreException {
- return null;
- }
-
- /*
- * @see IFeature#install(IFeature,IVerifier, IProgressMonitor)
- */
- public IFeatureReference install(
- IFeature targetFeature,
- IVerificationListener verificationListener,
- IProgressMonitor monitor)
- throws CoreException {
- return null;
- }
-
- /*
- * @see org.eclipse.update.core.IFeature#install(IFeature, IFeatureReference[], IVerificationListener, IProgressMonitor)
- */
- public IFeatureReference install(
- IFeature targetFeature,
- IFeatureReference[] optionalFeatures,
- IVerificationListener verificationListener,
- IProgressMonitor monitor)
- throws InstallAbortedException, CoreException {
- return null;
- }
- /*
- * @see IFeature#remove(IProgressMonitor)
- */
- public void remove(IProgressMonitor monitor) throws CoreException {
- }
-
- /*
- * @see IPluginContainer#remove(IPluginEntry, IProgressMonitor)
- */
- public void remove(IPluginEntry entry, IProgressMonitor monitor)
- throws CoreException {
- }
-
- /*
- * @see IFeature#getNonPluginEntryCount()
- */
- public int getNonPluginEntryCount() {
- return 0;
- }
-
- /*
- * @see IFeature#getInstallHandlerEntry()
- */
- public IInstallHandlerEntry getInstallHandlerEntry() {
- return null;
- }
- /*
- * @see IFeature#getIncludedFeatureReferences()
- */
- public IIncludedFeatureReference[] getIncludedFeatureReferences()
- throws CoreException {
- return new IIncludedFeatureReference[0];
- }
-
- /**
- * @see IFeature#getAffinityFeature()
- */
- public String getAffinityFeature() {
- return null;
- }
- /**
- * @see org.eclipse.update.core.IFeature#getRawIncludedFeatureReferences()
- */
- public IIncludedFeatureReference[] getRawIncludedFeatureReferences()
- throws CoreException {
- return getIncludedFeatureReferences();
- }
-
- /**
- * @see org.eclipse.update.core.IFeature#getRawNonPluginEntries()
- */
- public INonPluginEntry[] getRawNonPluginEntries() {
- return getNonPluginEntries();
- }
-
- /**
- * @see org.eclipse.update.core.IFeature#getRawPluginEntries()
- */
- public IPluginEntry[] getRawPluginEntries() {
- return getPluginEntries();
- }
-
- /**
- * @see org.eclipse.update.core.IFeature#getPrimaryPluginID()
- */
- public String getPrimaryPluginID() {
- return null;
- }
-
- /**
- * @see org.eclipse.update.core.IFeature#getRawImports()
- */
- public IImport[] getRawImports() {
- return new IImport[0];
- }
-
- /**
- * @see org.eclipse.update.core.IFeature#isPatch()
- */
- public boolean isPatch() {
- return false;
- }
-
- public boolean isExclusive() {
- return false;
- }
-
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/MonitorAdapter.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/MonitorAdapter.java
deleted file mode 100644
index 1c26b34..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/MonitorAdapter.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.model;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-
-public class MonitorAdapter implements IProgressMonitor {
-
- /**
- * @see IProgressMonitor#beginTask(String, int)
- */
- public void beginTask(String taskName, int count) {
- }
-
-
- /**
- * @see IProgressMonitor#done()
- */
- public void done() {
- }
-
-
- /**
- * @see IProgressMonitor#internalWorked(double)
- */
- public void internalWorked(double arg0) {
- }
-
-
- /**
- * @see IProgressMonitor#isCanceled()
- */
- public boolean isCanceled() {
- return false;
- }
-
-
- /**
- * @see IProgressMonitor#setCanceled(boolean)
- */
- public void setCanceled(boolean arg0) {
- }
-
-
- /**
- * @see IProgressMonitor#setTaskName(String)
- */
- public void setTaskName(String arg0) {
- }
-
-
- /**
- * @see IProgressMonitor#subTask(String)
- */
- public void subTask(String arg0) {
- }
-
-
- /**
- * @see IProgressMonitor#worked(int)
- */
- public void worked(int arg0) {
- }
-
-
-}
-
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/MyComputer.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/MyComputer.java
deleted file mode 100644
index d42dc34..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/MyComputer.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.model;
-
-import java.io.File;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-import org.eclipse.update.configuration.*;
-import org.eclipse.update.core.ISite;
-import org.eclipse.update.internal.ui.*;
-import org.eclipse.update.internal.ui.search.*;
-
-public class MyComputer extends UIModelObject implements IWorkbenchAdapter {
- private static final String KEY_LABEL = "MyComputer.label";
- private Object[] children;
- public MyComputer() {
- }
-
- public Object getAdapter(Class adapter) {
- if (adapter.equals(IWorkbenchAdapter.class)) {
- return this;
- }
- return super.getAdapter(adapter);
- }
-
- public String getName() {
- return UpdateUI.getString(KEY_LABEL);
- }
-
- public String toString() {
- return getName();
- }
-
- /**
- * @see IWorkbenchAdapter#getChildren(Object)
- */
- public Object[] getChildren(Object parent) {
- BusyIndicator
- .showWhile(
- UpdateUI.getActiveWorkbenchShell().getDisplay(),
- new Runnable() {
- public void run() {
- IVolume[] volumes = LocalSystemInfo.getVolumes();
- if (volumes != null && volumes.length > 0) {
- children = new MyComputerDirectory[volumes.length];
- for (int i = 0; i < children.length; i++) {
- children[i] =
- new MyComputerDirectory(
- MyComputer.this,
- volumes[i].getFile(),
- volumes[i]);
- }
- } else
- children = new Object[0];
- }
- });
- return children;
- }
-
- /**
- * @see IWorkbenchAdapter#getImageDescriptor(Object)
- */
- public ImageDescriptor getImageDescriptor(Object obj) {
- return UpdateUIImages.DESC_COMPUTER_OBJ;
- }
-
- /**
- * @see IWorkbenchAdapter#getLabel(Object)
- */
- public String getLabel(Object obj) {
- return getName();
- }
-
- /**
- * @see IWorkbenchAdapter#getParent(Object)
- */
- public Object getParent(Object arg0) {
- return null;
- }
-
- public void collectSites(
- Vector sites,
- MyComputerSearchSettings settings,
- IProgressMonitor monitor) {
- IVolume[] volumes = LocalSystemInfo.getVolumes();
- for (int i = 0; i < volumes.length; i++) {
- File drive = volumes[i].getFile();
- if (monitor.isCanceled())
- return;
- DriveSearchSettings ds = settings.getDriveSettings(drive.getPath());
- if (ds.isChecked()) {
- collectSites(drive, true, sites, ds, monitor);
- }
- }
- }
-
- private void collectSites(
- File dir,
- boolean root,
- Vector sites,
- DriveSearchSettings driveSettings,
- IProgressMonitor monitor) {
-
- if (root) {
- // See if the root itself is the site.
- SiteBookmark rootSite = MyComputerDirectory.createSite(dir, true);
- if (rootSite!=null) {
- sites.add(rootSite);
- return;
- }
- }
-
- File[] children = dir.listFiles();
- if (children == null)
- return;
-
- for (int i = 0; i < children.length; i++) {
- File child = children[i];
- if (monitor.isCanceled())
- return;
- if (child.isDirectory()) {
- monitor.subTask(child.getPath());
- SiteBookmark bookmark = MyComputerDirectory.createSite(child, false);
- if (bookmark != null) {
- ISite site = bookmark.getSite(false, null);
- if (site != null)
- sites.add(bookmark);
- } else
- collectSites(child, false, sites, driveSettings, monitor);
- }
- }
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/MyComputerDirectory.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/MyComputerDirectory.java
deleted file mode 100644
index f213120..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/MyComputerDirectory.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.model;
-
-import java.io.File;
-import java.net.URL;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.*;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-import org.eclipse.update.configuration.*;
-import org.eclipse.update.internal.ui.UpdateUI;
-
-public class MyComputerDirectory
- extends UIModelObject
- implements IWorkbenchAdapter {
- private UIModelObject parent;
- private File file;
- private IVolume volume;
- Object[] children;
-
- public MyComputerDirectory(
- UIModelObject parent,
- File file,
- IVolume volume) {
- this.parent = parent;
- this.file = file;
- this.volume = volume;
- }
-
- public MyComputerDirectory(UIModelObject parent, File file) {
- this(parent, file, null);
- }
-
- public Object getAdapter(Class adapter) {
- if (adapter.equals(IWorkbenchAdapter.class)) {
- return this;
- }
- return super.getAdapter(adapter);
- }
-
- public IVolume getVolume() {
- return volume;
- }
-
- public String getName() {
- return file.getPath();
- }
-
- public File getFile() {
- return file;
- }
-
- public String toString() {
- return getName();
- }
-
- public boolean hasChildren(Object parent) {
- if (file.isDirectory()) {
- final boolean[] result = new boolean[1];
- BusyIndicator
- .showWhile(
- UpdateUI.getActiveWorkbenchShell().getDisplay(),
- new Runnable() {
- public void run() {
- File[] children = file.listFiles();
- result[0] = children != null && children.length > 0;
- }
- });
- return result[0];
- }
- return false;
- }
-
- /**
- * @see IWorkbenchAdapter#getChildren(Object)
- */
-
- public Object[] getChildren(Object parent) {
- BusyIndicator
- .showWhile(
- UpdateUI.getActiveWorkbenchShell().getDisplay(),
- new Runnable() {
- public void run() {
- File[] files = file.listFiles();
- if (files==null) {
- children = new Object[0];
- return;
- }
-
- if (volume!=null) {
- // This is volume.
- // Test if the volume itself is a site
- SiteBookmark rootSite = createSite(getFile(), true);
- if (rootSite != null) {
- children = new Object[1];
- children[0] = rootSite;
- return;
- }
- }
-
- children = new Object[files.length];
- for (int i = 0; i < files.length; i++) {
- File file = files[i];
-
- if (file.isDirectory()) {
- SiteBookmark site = createSite(file, false);
- if (site != null)
- children[i] = site;
- else if (ExtensionRoot.isExtensionRoot(file)) {
- children[i] = new ExtensionRoot(MyComputerDirectory.this, file);
- }
- else
- children[i] =
- new MyComputerDirectory(
- MyComputerDirectory.this,
- file);
-
- } else {
- children[i] =
- new MyComputerFile(MyComputerDirectory.this, file);
- }
- }
- }
- });
- return children;
- }
-
- static SiteBookmark createSite(File file, boolean root) {
- try {
- File siteXML = new File(file, "site.xml");
- if (siteXML.exists() == false)
- return null;
- URL url =
- new URL("file:" + file.getAbsolutePath() + File.separator);
- String siteName = root?file.getAbsolutePath():file.getName();
- SiteBookmark site = new SiteBookmark(siteName, url, false);
- site.setType(SiteBookmark.LOCAL);
- return site;
- } catch (Exception e) {
- return null;
- }
- }
-
- /**
- * @see IWorkbenchAdapter#getImageDescriptor(Object)
- */
- public ImageDescriptor getImageDescriptor(Object obj) {
- return PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(
- ISharedImages.IMG_OBJ_FOLDER);
- }
-
- public Image getImage(Object obj) {
- return PlatformUI.getWorkbench().getSharedImages().getImage(
- ISharedImages.IMG_OBJ_FOLDER);
- }
-
- /**
- * @see IWorkbenchAdapter#getLabel(Object)
- */
- public String getLabel(Object obj) {
- return file.getName();
- }
-
- /**
- * @see IWorkbenchAdapter#getParent(Object)
- */
- public Object getParent(Object arg0) {
- return parent;
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/MyComputerFile.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/MyComputerFile.java
deleted file mode 100644
index c45af43..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/MyComputerFile.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.model;
-
-import java.io.File;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-
-public class MyComputerFile extends UIModelObject implements IWorkbenchAdapter {
- private UIModelObject parent;
- private File file;
-
- public MyComputerFile(UIModelObject parent, File file) {
- this.parent = parent;
- this.file = file;
- }
-
- public Object getAdapter(Class adapter) {
- if (adapter.equals(IWorkbenchAdapter.class)) {
- return this;
- }
- return super.getAdapter(adapter);
- }
-
- public String getName() {
- return file.getName();
- }
-
- public String toString() {
- return getName();
- }
-
- /**
- * @see IWorkbenchAdapter#getChildren(Object)
- */
-
- public Object[] getChildren(Object parent) {
- return new Object[0];
- }
-
-
- /**
- * @see IWorkbenchAdapter#getImageDescriptor(Object)
- */
- public ImageDescriptor getImageDescriptor(Object obj) {
- return PlatformUI.getWorkbench().getEditorRegistry().getImageDescriptor(getName());
- }
-
- /**
- * @see IWorkbenchAdapter#getLabel(Object)
- */
- public String getLabel(Object obj) {
- return getName();
- }
-
-
- /**
- * @see IWorkbenchAdapter#getParent(Object)
- */
- public Object getParent(Object arg0) {
- return parent;
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/NamedModelObject.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/NamedModelObject.java
deleted file mode 100644
index 1d4ed63..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/NamedModelObject.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.model;
-
-import java.io.Serializable;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-
-public class NamedModelObject extends UIModelObject
- implements IWorkbenchAdapter, Serializable {
- private String name;
- transient private NamedModelObject parent;
-
- public static final String P_NAME="p_name";
-
- public NamedModelObject() {
- }
-
- public NamedModelObject(String name) {
- this.name = name;
- }
-
- public Object getAdapter(Class adapter) {
- if (adapter.equals(IWorkbenchAdapter.class)) {
- return this;
- }
- return super.getAdapter(adapter);
- }
-
- public String getName() {
- return name;
- }
-
- public IPath getPath() {
- Object parent = getParent(null);
- if (parent!=null && parent instanceof NamedModelObject)
- return ((NamedModelObject)parent).getPath().append(getName());
- else
- return new Path(getName());
- }
-
- public String toString() {
- return getName();
- }
-
- public void setName(String name) {
- this.name = name;
- notifyObjectChanged(P_NAME);
- }
-
- /**
- * @see IWorkbenchAdapter#getChildren(Object)
- */
- public Object[] getChildren(Object parent) {
- return null;
- }
-
-
- /**
- * @see IWorkbenchAdapter#getImageDescriptor(Object)
- */
- public ImageDescriptor getImageDescriptor(Object obj) {
- return null;
- }
-
-
- /**
- * @see IWorkbenchAdapter#getLabel(Object)
- */
- public String getLabel(Object obj) {
- return getName();
- }
-
-
- /**
- * @see IWorkbenchAdapter#getParent(Object)
- */
- public Object getParent(Object arg0) {
- return parent;
- }
- public void setParent(NamedModelObject parent) {
- this.parent = parent;
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/PendingChange.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/PendingChange.java
deleted file mode 100644
index 07a9ec9..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/PendingChange.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.model;
-
-import org.eclipse.update.configuration.IConfiguredSite;
-import org.eclipse.update.core.IFeature;
-
-
-public class PendingChange extends SimpleFeatureAdapter {
- public static final int INSTALL = 0x1;
- public static final int UNINSTALL = 0x2;
- public static final int CONFIGURE = 0x3;
- public static final int UNCONFIGURE = 0x4;
- private int jobType;
- private IFeature oldFeature;
- private boolean optionalDelta;
- private IConfiguredSite defaultTargetSite;
- private boolean processed;
-
- public PendingChange(IFeature feature, int jobType) {
- super(feature);
- this.jobType = jobType;
- }
-
- public PendingChange(IFeature feature, IConfiguredSite targetSite) {
- this(feature, INSTALL);
- this.defaultTargetSite = targetSite;
- }
-
- public PendingChange(IFeature oldFeature, IFeature newFeature) {
- this(newFeature, INSTALL);
- this.oldFeature = oldFeature;
- }
-
- public PendingChange(IFeature oldFeature, IFeature newFeature, boolean optionalDelta) {
- this(oldFeature, newFeature);
- this.optionalDelta = optionalDelta;
- }
-
- public int getJobType() {
- return jobType;
- }
-
- public IFeature getFeature() {
- return feature;
- }
-
- public IFeature getOldFeature() {
- return oldFeature;
- }
- public boolean isOptionalDelta() {
- return optionalDelta;
- }
-
- public IConfiguredSite getDefaultTargetSite() {
- return defaultTargetSite;
- }
-
- public boolean isProcessed() {
- return processed;
- }
-
- public void markProcessed() {
- processed = true;
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/PreservedConfiguration.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/PreservedConfiguration.java
deleted file mode 100644
index 806669d..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/PreservedConfiguration.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.model;
-import org.eclipse.update.configuration.IInstallConfiguration;
-
-public class PreservedConfiguration extends UIModelObject {
- private IInstallConfiguration config;
-
- public PreservedConfiguration(IInstallConfiguration config) {
- this.config = config;
- }
-
- public IInstallConfiguration getConfiguration() {
- return config;
- }
-
- public String toString() {
- return config.getLabel();
- }
-
- public boolean equals(Object object) {
- if (object==null) return false;
- if (object==this) return true;
- if (object instanceof PreservedConfiguration) {
- return ((PreservedConfiguration)object).getConfiguration().equals(config);
- }
- return false;
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/SimpleFeatureAdapter.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/SimpleFeatureAdapter.java
deleted file mode 100644
index 751e1cb..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/SimpleFeatureAdapter.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.model;
-
-import java.net.URL;
-
-import org.eclipse.update.core.*;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * @version 1.0
- * @author
- */
-public class SimpleFeatureAdapter extends FeatureAdapter {
- protected IFeature feature;
- private boolean optional;
- public SimpleFeatureAdapter(IFeature feature) {
- this(feature, false);
- }
- public SimpleFeatureAdapter(IFeature feature, boolean optional) {
- this.feature = feature;
- this.optional = optional;
- }
-
- public IFeature getFeature(IProgressMonitor monitor) throws CoreException {
- return feature;
- }
-
- public String getFastLabel() {
- return feature.getLabel();
- }
-
- public URL getURL() {
- return feature.getURL();
- }
-
- public ISite getSite() {
- return feature.getSite();
- }
-
- public IFeatureAdapter[] getIncludedFeatures(IProgressMonitor monitor) {
- try {
- IIncludedFeatureReference[] included = getFeature(monitor).getIncludedFeatureReferences();
- SimpleFeatureAdapter[] result =
- new SimpleFeatureAdapter[included.length];
- for (int i = 0; i < included.length; i++) {
- result[i] =
- new SimpleFeatureAdapter(included[i].getFeature(null), included[i].isOptional());
- result[i].setIncluded(true);
- }
- return result;
- } catch (CoreException e) {
- return new IFeatureAdapter[0];
- }
- }
- public boolean isOptional() {
- return optional;
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/SiteBookmark.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/SiteBookmark.java
deleted file mode 100644
index 65738b7..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/SiteBookmark.java
+++ /dev/null
@@ -1,210 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.model;
-
-import java.net.URL;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.update.core.*;
-import org.eclipse.update.internal.ui.UpdateUI;
-
-public class SiteBookmark extends NamedModelObject
- implements ISiteAdapter {
- public static final int USER = 0;
- public static final int LOCAL = 1;
- public static final int LOCAL_BOOKMARK = 2;
- public static final String P_URL="p_url";
- public static final String P_TYPE="p_type";
-
- private URL url;
- transient private ISite site;
- transient private Vector catalog;
- transient private SiteCategory otherCategory;
- private int type;
- private boolean webBookmark;
-
-
-
- public SiteBookmark() {
- }
-
- public SiteBookmark(String name, URL url, boolean webBookmark) {
- super(name);
- this.url = url;
- this.webBookmark = webBookmark;
- }
-
- public void setType(int type) {
- this.type = type;
- }
-
- public int getType() {
- return type;
- }
-
- public void setWebBookmark(boolean value) {
- if (type==LOCAL_BOOKMARK) return;
- this.webBookmark = value;
- notifyObjectChanged(P_TYPE);
- }
-
- public boolean isWebBookmark() {
- return webBookmark;
- }
-
- public URL getURL() {
- return url;
- }
-
-
- public void setURL(URL url) {
- this.url = url;
- site = null;
- notifyObjectChanged(P_URL);
- }
-
- public ISite getSite(IProgressMonitor monitor) {
- return getSite(true, monitor);
- }
-
- public ISite getSite(boolean showDialogIfFailed, IProgressMonitor monitor) {
- if (site==null) {
- try {
- connect(monitor);
- }
- catch (CoreException e) {
- UpdateUI.logException(e, showDialogIfFailed);
- }
- }
- return site;
- }
-
- public boolean isSiteConnected() {
- return site!=null;
- }
-
- public void connect(IProgressMonitor monitor) throws CoreException {
- connect(true, monitor);
- }
-
- public void connect(boolean useCache, IProgressMonitor monitor) throws CoreException {
- if (monitor==null) monitor = new NullProgressMonitor();
- monitor.beginTask("", 2);
- monitor.subTask(UpdateUI.getFormattedMessage("SiteBookmark.connecting", url.toString()));
- site = SiteManager.getSite(url, useCache, new SubProgressMonitor(monitor, 1));
- if (site!=null) createCatalog(new SubProgressMonitor(monitor, 1));
- else
- catalog = new Vector();
- }
-
- private void createCatalog(IProgressMonitor monitor) {
- catalog = new Vector();
- otherCategory = new SiteCategory(null, null);
- // Add all the categories
- ICategory [] categories;
- categories = site.getCategories();
-
- ISiteFeatureReference [] featureRefs;
- featureRefs = site.getRawFeatureReferences();
-
- monitor.beginTask("", featureRefs.length + categories.length);
-
- for (int i=0; i<categories.length; i++) {
- ICategory category = categories[i];
- addCategoryToCatalog(category);
- monitor.worked(1);
- }
- // Add features to categories
-
- for (int i=0; i<featureRefs.length; i++) {
- ISiteFeatureReference featureRef = featureRefs[i];
- addFeatureToCatalog(featureRef);
- monitor.worked(1);
- }
- if (otherCategory.getChildCount()>0)
- catalog.add(otherCategory);
- }
-
- public Object [] getCatalog(boolean withCategories, IProgressMonitor monitor) {
- if (withCategories)
- return catalog.toArray();
- else {
- // Make a flat catalog
- Vector flatCatalog = new Vector();
- for (int i=0; i<catalog.size(); i++) {
- SiteCategory category = (SiteCategory)catalog.get(i);
- category.addFeaturesTo(flatCatalog);
- }
- return flatCatalog.toArray();
- }
- }
-
- private void addCategoryToCatalog(ICategory category) {
- String name = category.getName();
- int loc = name.indexOf('/');
- if (loc == -1) {
- // first level
- catalog.add(new SiteCategory(name, category));
- }
- else {
- IPath path = new Path(name);
- name = path.lastSegment().toString();
- path = path.removeLastSegments(1);
- SiteCategory parentCategory = findCategory(path, catalog.toArray());
- if (parentCategory!=null) {
- parentCategory.add(new SiteCategory(name, category));
- }
- }
- }
- private void addFeatureToCatalog(ISiteFeatureReference feature) {
- ICategory [] categories = feature.getCategories();
- boolean orphan = true;
-
- for (int i=0; i<categories.length; i++) {
- ICategory category = categories[i];
- String name = category.getName();
- IPath path = new Path(name);
- SiteCategory parentCategory = findCategory(path, catalog.toArray());
- if (parentCategory!=null) {
- parentCategory.add(new FeatureReferenceAdapter(feature));
- orphan = false;
- }
- }
- if (orphan)
- otherCategory.add(new FeatureReferenceAdapter(feature));
- }
-
- private SiteCategory findCategory(IPath path, Object [] children) {
- for (int i=0; i<children.length; i++) {
- Object child = children[i];
- if (child instanceof SiteCategory) {
- SiteCategory sc = (SiteCategory)child;
- if (sc.getName().equals(path.segment(0))) {
- if (path.segmentCount()==1) return sc;
- else {
- path = path.removeFirstSegments(1);
- return findCategory(path, sc.getChildren());
- }
- }
- }
- }
- return null;
- }
- /**
- * @see ISiteAdapter#getLabel()
- */
- public String getLabel() {
- return getName();
- }
-
-
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/SiteCategory.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/SiteCategory.java
deleted file mode 100644
index a7fbcbb..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/SiteCategory.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.model;
-import java.lang.reflect.InvocationTargetException;
-import java.net.URL;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.operation.*;
-import org.eclipse.update.core.*;
-import org.eclipse.update.internal.ui.UpdateUI;
-
-public class SiteCategory extends UIModelObject {
- private static final String KEY_OTHER_LABEL = "SiteCategory.other.label";
- private static final String KEY_OTHER_DESCRIPTION =
- "SiteCategory.other.description";
-
- Vector children;
- private ICategory category;
- private String name;
- private boolean touched;
- private int featureCount;
- private boolean canceled;
-
- class OtherCategory implements ICategory {
- IURLEntry entry;
- public OtherCategory() {
- entry = new IURLEntry() {
- public String getAnnotation() {
- return UpdateUI.getString(KEY_OTHER_DESCRIPTION);
- }
- public URL getURL() {
- return null;
- }
- public Object getAdapter(Class clazz) {
- return null;
- }
- public int getType() {
- return IURLEntry.UPDATE_SITE;
- }
- };
- }
- public String getName() {
- return SiteCategory.this.getName();
- }
- public String getLabel() {
- return SiteCategory.this.getName();
- }
- public IURLEntry getDescription() {
- return entry;
- }
- public Object getAdapter(Class clazz) {
- return null;
- }
- }
-
- public SiteCategory(String name, ICategory category) {
- if (category == null) {
- this.name = UpdateUI.getString(KEY_OTHER_LABEL);
- this.category = new OtherCategory();
- } else {
- this.name = name;
- this.category = category;
- }
- children = new Vector();
- }
-
- public boolean isOtherCategory() {
- return category instanceof OtherCategory;
- }
-
- public Object[] getChildren() {
- return canceled ? new Object[0] : children.toArray();
- }
-
- public int getChildCount() {
- return canceled ? 0 : children.size();
- }
-
- public String getName() {
- return name;
- }
- public String getFullName() {
- return category.getName();
- }
-
- public String toString() {
- return category.getLabel();
- }
-
- public ICategory getCategory() {
- return category;
- }
-
- void add(Object child) {
- if (child instanceof IFeatureAdapter)
- featureCount++;
- children.add(child);
- }
-
- public void touchFeatures(IRunnableContext context) {
- if (children.size() == 0 || touched || featureCount == 0)
- return;
-
- IRunnableWithProgress op = new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) {
- monitor.beginTask(
- UpdateUI.getString("SiteBookmark.downloading"),
- featureCount);
- for (int i = 0; i < children.size(); i++) {
- Object child = children.get(i);
- if (monitor.isCanceled())
- break;
- if (child instanceof IFeatureAdapter) {
- IFeatureAdapter adapter = (IFeatureAdapter) child;
- monitor.subTask(adapter.getFastLabel());
- try {
- adapter.getFeature(
- new SubProgressMonitor(monitor, 1));
- } catch (CoreException e) {
- }
- }
- }
- monitor.done();
- }
- };
-
- try {
- context.run(true, true, op);
- touched = true;
- } catch (InterruptedException e) {
- canceled = true;
- } catch (InvocationTargetException e) {
- }
- }
-
- public void addFeaturesTo(Vector flatList) {
- for (int i = 0; i < children.size(); i++) {
- Object child = children.get(i);
- if (child instanceof FeatureReferenceAdapter) {
- FeatureReferenceAdapter cfeature =
- (FeatureReferenceAdapter) child;
- // Don't add duplicates - there may be the same
- // feature present in several categories
- if (findFeature(flatList, cfeature.getFeatureReference())
- == null) {
- flatList.add(child);
- }
- } else if (child instanceof SiteCategory) {
- ((SiteCategory) child).addFeaturesTo(flatList);
- }
- }
- }
-
- private FeatureReferenceAdapter findFeature(
- Vector flatList,
- IFeatureReference featureRef) {
- for (int i = 0; i < flatList.size(); i++) {
- FeatureReferenceAdapter cfeature =
- (FeatureReferenceAdapter) flatList.get(i);
- if (cfeature.getFeatureReference().equals(featureRef))
- return cfeature;
- }
- return null;
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/UIModelObject.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/UIModelObject.java
deleted file mode 100644
index 6a0f7c6..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/UIModelObject.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.model;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-import org.eclipse.jface.resource.ImageDescriptor;
-
-
-public class UIModelObject extends PlatformObject implements IWorkbenchAdapter {
- UpdateModel model;
-
- public void setModel(UpdateModel model) {
- this.model = model;
- }
-
- public UpdateModel getModel() {
- return model;
- }
-
- protected void notifyObjectChanged(String property) {
- if (model==null) return;
- model.fireObjectChanged(this, property);
- }
-
- protected void notifyObjectsAdded(Object parent, Object [] objects) {
- if (model==null) return;
- model.fireObjectsAdded(parent, objects);
- }
-
- protected void notifyObjectsRemoved(Object parent, Object [] objects) {
- if (model==null) return;
- model.fireObjectsRemoved(parent, objects);
- }
-
- public Object [] getChildren(Object obj) {
- return new Object[0];
- }
-
- public Object getParent(Object obj) {
- return null;
- }
- public String getLabel(Object obj) {
- return toString();
- }
- public ImageDescriptor getImageDescriptor(Object obj) {
- return null;
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/UpdateModel.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/UpdateModel.java
deleted file mode 100644
index 40ed78c..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/UpdateModel.java
+++ /dev/null
@@ -1,209 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.model;
-
-import java.util.*;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.update.core.*;
-import org.eclipse.update.internal.ui.UpdateUI;
-
-public class UpdateModel implements IAdaptable {
- private Vector changes = new Vector();
- private Vector bookmarks = new Vector();
- private Vector listeners = new Vector();
- private IDialogSettings settings;
- private static final String BOOKMARK_FILE = "bookmarks.xml";
-
- public UpdateModel() {
- settings = UpdateUI.getDefault().getDialogSettings();
- }
-
- public void startup() {
- // load bookmarks
- BookmarkUtil.parse(getBookmarksFileName(), bookmarks);
- }
-
- private String getBookmarksFileName() {
- IPath path = UpdateUI.getDefault().getStateLocation();
- path = path.append(BOOKMARK_FILE);
- return path.toOSString();
- }
-
- public void shutdown() {
- saveBookmarks();
- }
-
- public void saveBookmarks() {
- BookmarkUtil.store(getBookmarksFileName(), bookmarks);
- }
-
- public PendingChange [] getPendingChanges() {
- return (PendingChange[])
- changes.toArray(new PendingChange[changes.size()]);
- }
-
- public PendingChange [] getPendingChanges(int type) {
- Vector v = new Vector();
- for (int i=0; i<changes.size(); i++) {
- PendingChange job = (PendingChange)changes.elementAt(i);
- if (job.getJobType() == type)
- v.add(job);
- }
- return (PendingChange[])
- v.toArray(new PendingChange[v.size()]);
- }
-
- public PendingChange findPendingChange(IFeature feature) {
- for (int i=0; i<changes.size(); i++) {
- PendingChange job = (PendingChange)changes.elementAt(i);
- if (job.getFeature().equals(feature))
- return job;
- }
- return null;
- }
-
- public PendingChange findRelatedPendingChange(IFeature feature) {
- for (int i=0; i<changes.size(); i++) {
- PendingChange job = (PendingChange)changes.elementAt(i);
-
- String jobId = job.getFeature().getVersionedIdentifier().getIdentifier();
- String id = feature.getVersionedIdentifier().getIdentifier();
- if (id.equals(jobId)) return job;
- }
- return null;
- }
-
-
- public boolean isPending(IFeature feature) {
- return findPendingChange(feature)!=null;
- }
-
- public void addPendingChange(PendingChange change) {
- changes.add(change);
- change.setModel(this);
- fireObjectsAdded(this, new Object[] {change});
- }
-
- public void removePendingChange(PendingChange change) {
- changes.remove(change);
- change.setModel(null);
- fireObjectsRemoved(this, new Object[] {change});
- }
-
- public void removePendingChange(IFeature scheduledFeature) {
- PendingChange change = findPendingChange(scheduledFeature);
- if (change!=null)
- removePendingChange(change);
- }
-
- public void addBookmark(NamedModelObject bookmark) {
- bookmarks.add(bookmark);
- bookmark.setModel(this);
- fireObjectsAdded(null, new Object []{bookmark});
- }
-
- public void removeBookmark(NamedModelObject bookmark) {
- bookmarks.remove(bookmark);
- bookmark.setModel(null);
- fireObjectsRemoved(null, new Object []{bookmark});
- }
-
- public NamedModelObject [] getBookmarks() {
- return (NamedModelObject[])bookmarks.toArray(new NamedModelObject[bookmarks.size()]);
- }
-
- public SiteBookmark [] getBookmarkLeafs() {
- return BookmarkUtil.getBookmarks(bookmarks);
- }
-
- public BookmarkFolder getFolder(IPath path) {
- return BookmarkUtil.getFolder(bookmarks, path);
- }
-
- public void addUpdateModelChangedListener(IUpdateModelChangedListener listener) {
- if (!listeners.contains(listener))
- listeners.add(listener);
- }
-
-
- public void removeUpdateModelChangedListener(IUpdateModelChangedListener listener) {
- if (listeners.contains(listener))
- listeners.remove(listener);
- }
-
- public void fireObjectsAdded(Object parent, Object [] children) {
- for (Iterator iter=listeners.iterator();
- iter.hasNext();) {
- IUpdateModelChangedListener listener = (IUpdateModelChangedListener)iter.next();
- listener.objectsAdded(parent, children);
- }
- }
-
-
- public void fireObjectsRemoved(Object parent, Object [] children) {
- for (Iterator iter=listeners.iterator();
- iter.hasNext();) {
- IUpdateModelChangedListener listener = (IUpdateModelChangedListener)iter.next();
- listener.objectsRemoved(parent, children);
- }
- }
-
- public void fireObjectChanged(Object object, String property) {
- for (Iterator iter=listeners.iterator();
- iter.hasNext();) {
- IUpdateModelChangedListener listener = (IUpdateModelChangedListener)iter.next();
- listener.objectChanged(object, property);
- }
- }
- public Object getAdapter(Class key) {
- return null;
- }
-
- public static boolean hasLicense(PendingChange job) {
- IFeature feature = job.getFeature();
- return hasLicense(feature);
- }
-
- public static boolean hasLicense(IFeature feature) {
- IURLEntry info = feature.getLicense();
- if (info == null)
- return false;
- String licenseTxt = info.getAnnotation();
- if (licenseTxt == null)
- return false;
- return licenseTxt.trim().length() > 0;
- }
- public static boolean hasOptionalFeatures(IFeatureReference fref) {
- try {
- return hasOptionalFeatures(fref.getFeature(null));
- } catch (CoreException e) {
- return false;
- }
- }
- public static boolean hasOptionalFeatures(IFeature feature) {
- try {
- IIncludedFeatureReference[] irefs = feature.getIncludedFeatureReferences();
- for (int i = 0; i < irefs.length; i++) {
- IIncludedFeatureReference iref = irefs[i];
- if (iref.isOptional())
- return true;
- // see if it has optional children
- IFeature child = iref.getFeature(null);
- if (hasOptionalFeatures(child))
- return true;
- }
- } catch (CoreException e) {
- }
- return false;
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/CategoryPage.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/CategoryPage.java
deleted file mode 100644
index 9eae72d..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/CategoryPage.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.pages;
-
-import org.eclipse.update.internal.ui.forms.CategoryForm;
-import org.eclipse.update.internal.ui.views.DetailsView;
-import org.eclipse.update.ui.forms.internal.*;
-
-
-public class CategoryPage extends UpdateFormPage {
-
- public CategoryPage(DetailsView view, String title) {
- super(view, title);
- }
-
- public IForm createForm() {
- return new CategoryForm(this);
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/DetailsPage.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/DetailsPage.java
deleted file mode 100644
index 9220454..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/DetailsPage.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.pages;
-
-import org.eclipse.update.internal.ui.forms.DetailsForm;
-import org.eclipse.update.internal.ui.views.DetailsView;
-import org.eclipse.update.ui.forms.internal.*;
-
-
-public class DetailsPage extends UpdateFormPage {
-
- public DetailsPage(DetailsView view, String title) {
- super(view, title);
- }
-
- public IForm createForm() {
- return new DetailsForm(this);
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/DiscoveryFolderPage.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/DiscoveryFolderPage.java
deleted file mode 100644
index 086ccd3..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/DiscoveryFolderPage.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.pages;
-
-import org.eclipse.update.internal.ui.forms.DiscoveryFolderForm;
-import org.eclipse.update.internal.ui.views.DetailsView;
-import org.eclipse.update.ui.forms.internal.*;
-
-
-public class DiscoveryFolderPage extends UpdateFormPage {
-
- public DiscoveryFolderPage(DetailsView view, String title) {
- super(view, title);
- }
-
- public IForm createForm() {
- return new DiscoveryFolderForm(this);
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/ExtensionRootPage.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/ExtensionRootPage.java
deleted file mode 100644
index 9b836f4..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/ExtensionRootPage.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.pages;
-
-import org.eclipse.update.internal.ui.forms.ExtensionRootForm;
-import org.eclipse.update.internal.ui.views.DetailsView;
-import org.eclipse.update.ui.forms.internal.IForm;
-
-
-public class ExtensionRootPage extends UpdateFormPage {
-
- public ExtensionRootPage(DetailsView view, String title) {
- super(view, title);
- }
-
- public IForm createForm() {
- return new ExtensionRootForm(this);
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/IUpdateFormPage.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/IUpdateFormPage.java
deleted file mode 100644
index 135a481..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/IUpdateFormPage.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.pages;
-import org.eclipse.jface.action.*;
-import org.eclipse.update.internal.ui.views.*;
-import org.eclipse.update.ui.forms.internal.IFormPage;
-
-public interface IUpdateFormPage extends IFormPage {
- boolean contextMenuAboutToShow(IMenuManager manager);
- IAction getAction(String id);
- void openTo(Object object);
- void performGlobalAction(String id);
- void update();
- void dispose();
- void setFocus();
- MultiPageView getView();
-}
-
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/InstallConfigurationPage.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/InstallConfigurationPage.java
deleted file mode 100644
index d000b0f..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/InstallConfigurationPage.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.pages;
-
-import org.eclipse.update.internal.ui.forms.InstallConfigurationForm;
-import org.eclipse.update.internal.ui.views.DetailsView;
-import org.eclipse.update.ui.forms.internal.*;
-
-
-public class InstallConfigurationPage extends UpdateFormPage {
-
- public InstallConfigurationPage(DetailsView view, String title) {
- super(view, title);
- }
-
- public IForm createForm() {
- return new InstallConfigurationForm(this);
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/InstallableSitePage.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/InstallableSitePage.java
deleted file mode 100644
index a413aa4..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/InstallableSitePage.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.pages;
-
-import org.eclipse.update.internal.ui.forms.InstallableSiteForm;
-import org.eclipse.update.internal.ui.views.DetailsView;
-import org.eclipse.update.ui.forms.internal.*;
-
-
-public class InstallableSitePage extends UpdateFormPage {
-
- public InstallableSitePage(DetailsView view, String title) {
- super(view, title);
- }
-
- public IForm createForm() {
- return new InstallableSiteForm(this);
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/LocalSitePage.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/LocalSitePage.java
deleted file mode 100644
index 37da261..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/LocalSitePage.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.pages;
-
-import org.eclipse.update.internal.ui.forms.LocalSiteForm;
-import org.eclipse.update.internal.ui.views.DetailsView;
-import org.eclipse.update.ui.forms.internal.*;
-
-
-public class LocalSitePage extends UpdateFormPage {
-
- public LocalSitePage(DetailsView view, String title) {
- super(view, title);
- }
-
- public IForm createForm() {
- return new LocalSiteForm(this);
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/MainPage.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/MainPage.java
deleted file mode 100644
index b869f88..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/MainPage.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.pages;
-
-import org.eclipse.update.internal.ui.forms.MainForm;
-import org.eclipse.update.internal.ui.views.DetailsView;
-import org.eclipse.update.ui.forms.internal.*;
-
-
-public class MainPage extends UpdateFormPage {
-
- public MainPage(DetailsView view, String title) {
- super(view, title);
- }
-
- public IForm createForm() {
- return new MainForm(this);
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/MultipleSelectionPage.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/MultipleSelectionPage.java
deleted file mode 100644
index 5ce8a0e..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/MultipleSelectionPage.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.pages;
-
-import org.eclipse.update.internal.ui.forms.MultipleSelectionForm;
-import org.eclipse.update.internal.ui.views.DetailsView;
-import org.eclipse.update.ui.forms.internal.IForm;
-
-
-public class MultipleSelectionPage extends UpdateFormPage {
-
- public MultipleSelectionPage(DetailsView view, String title) {
- super(view, title);
- }
-
- public IForm createForm() {
- return new MultipleSelectionForm(this);
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/MyComputerPage.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/MyComputerPage.java
deleted file mode 100644
index 724062f..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/MyComputerPage.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.pages;
-
-import org.eclipse.update.internal.ui.forms.MyComputerForm;
-import org.eclipse.update.internal.ui.views.DetailsView;
-import org.eclipse.update.ui.forms.internal.*;
-
-
-public class MyComputerPage extends UpdateFormPage {
-
- public MyComputerPage(DetailsView view, String title) {
- super(view, title);
- }
-
- public IForm createForm() {
- return new MyComputerForm(this);
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/SearchPage.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/SearchPage.java
deleted file mode 100644
index 52895be..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/SearchPage.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.pages;
-
-import org.eclipse.update.internal.ui.forms.SearchForm;
-import org.eclipse.update.internal.ui.views.DetailsView;
-import org.eclipse.update.ui.forms.internal.*;
-
-
-public class SearchPage extends UpdateFormPage {
-
- public SearchPage(DetailsView view, String title) {
- super(view, title);
- }
-
- public IForm createForm() {
- return new SearchForm(this);
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/SitePage.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/SitePage.java
deleted file mode 100644
index 58ea83a..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/SitePage.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.pages;
-
-import org.eclipse.update.internal.ui.forms.SiteForm;
-import org.eclipse.update.internal.ui.views.DetailsView;
-import org.eclipse.update.ui.forms.internal.*;
-
-
-public class SitePage extends UpdateFormPage {
-
- public SitePage(DetailsView view, String title) {
- super(view, title);
- }
-
- public IForm createForm() {
- return new SiteForm(this);
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/UnknownObjectPage.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/UnknownObjectPage.java
deleted file mode 100644
index 3806ddd..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/UnknownObjectPage.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.pages;
-
-import org.eclipse.update.internal.ui.forms.UnknownObjectForm;
-import org.eclipse.update.internal.ui.views.DetailsView;
-import org.eclipse.update.ui.forms.internal.*;
-
-
-public class UnknownObjectPage extends UpdateFormPage {
-
- public UnknownObjectPage(DetailsView view, String title) {
- super(view, title);
- }
-
- public IForm createForm() {
- return new UnknownObjectForm(this);
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/UpdateFormPage.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/UpdateFormPage.java
deleted file mode 100644
index 4f914db..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/pages/UpdateFormPage.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.pages;
-import org.eclipse.update.internal.ui.views.*;
-import org.eclipse.update.ui.forms.internal.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.jface.action.*;
-
-
-public abstract class UpdateFormPage implements IUpdateFormPage {
- private IForm form;
- private MultiPageView view;
- private String title;
- private Control control;
-
-public UpdateFormPage(MultiPageView view, String title) {
- this.view = view;
- form = createForm();
- this.title = title;
-}
-
-public boolean becomesInvisible(IFormPage newPage) {
- return true;
-}
-
-public void becomesVisible(IFormPage oldPage) {
- update();
- //setFocus();
-}
-
-public boolean contextMenuAboutToShow(IMenuManager manager) {
- return true;
-}
-
-protected abstract IForm createForm();
-
-public void createControl(Composite parent) {
- control = form.createControl(parent);
- control.setMenu(view.getContextMenu());
- form.initialize(null);
-}
-
-public void dispose() {
- form.dispose();
-}
-
-public Control getControl() {
- return control;
-}
-
-public MultiPageView getView() {
- return view;
-}
-
-public IForm getForm() {
- return form;
-}
-
-public String getLabel() {
- return title;
-}
-
-public String getTitle() {
- return title;
-}
-
-public boolean isSource() {
- return false;
-}
-
-public boolean isVisible() {
- return getView().getCurrentPage()==this;
-}
-
-public void openTo(Object object) {
- getForm().expandTo(object);
-}
-
-public IAction getAction(String id) {
- return view.getAction(id);
-}
-
-public void performGlobalAction(String id) {
- getForm().doGlobalAction(id);
-}
-
-public void setFocus() {
- getForm().setFocus();
-}
-
-public String toString() {
- return title;
-}
-
-public void update() {
- form.update();
-}
-
-}
-
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/parts/AboutInfo.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/parts/AboutInfo.java
deleted file mode 100644
index 4a44cf7..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/parts/AboutInfo.java
+++ /dev/null
@@ -1,404 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.parts;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Hashtable;
-import java.util.MissingResourceException;
-import java.util.Properties;
-import java.util.PropertyResourceBundle;
-import java.util.zip.CRC32;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPluginDescriptor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.PluginVersionIdentifier;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.internal.NewConfigurationInfo;
-import org.eclipse.ui.internal.WorkbenchMessages;
-
-/**
- * The about info class;
- * <p>
- * The information within this object is obtained from the about "ini" file".
- * This file resides within an install configurations directory and must be a
- * standard java property file.
- * </p>
- */
-public class AboutInfo extends NewConfigurationInfo {
-
- private String appName;
- private ImageDescriptor windowImage;
- private ImageDescriptor aboutImage;
- private ImageDescriptor featureImage;
- private String aboutText;
- private URL welcomePageURL;
- private String welcomePerspective;
- private String tipsAndTricksHref;
- private String featureImageName;
- private Long featureImageCRC;
- private boolean calculatedImageCRC = false;
- private final static int BYTE_ARRAY_SIZE = 2048;
-
- /**
- * Constructs a new instance of the about info.
- */
- public AboutInfo(String featureId, PluginVersionIdentifier versionId) {
- super(featureId, versionId, "about.ini", "about.properties", "about.mappings"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
-
- /**
- * Returns the descriptor for an image which can be shown in an "about" dialog
- * for this product.
- * Products designed to run "headless" typically would not have such an image.
- *
- * @return the descriptor for an about image, or <code>null</code> if none
- */
- public ImageDescriptor getAboutImage() {
- return aboutImage;
- }
-
- /**
- * Returns the descriptor for an image which can be shown in an "about features"
- * dialog.
- * Products designed to run "headless" typically would not have such an image.
- *
- * @return the descriptor for a feature image, or <code>null</code> if none
- */
- public ImageDescriptor getFeatureImage() {
- return featureImage;
- }
-
- /**
- * Returns the name of the feature image as supplied in the properties file.
- *
- * @return the name of the feature image, or <code>null</code> if none
- */
- public String getFeatureImageName() {
- return featureImageName;
- }
-
- /**
- * Returns the CRC of the feature image as supplied in the properties file.
- *
- * @return the CRC of the feature image, or <code>null</code> if none
- */
- public Long getFeatureImageCRC() {
- if (!calculatedImageCRC && featureImageName != null) {
- featureImageCRC = calculateFeatureImageCRC();
- calculatedImageCRC = true;
- }
- return featureImageCRC;
- }
-
- /**
- * Calculate a CRC for the feature image
- */
- private Long calculateFeatureImageCRC() {
- URL url = null;
- if (featureImageName != null) {
- IPluginDescriptor desc = getDescriptor();
- if(desc == null)
- return null;
- url = desc.find(new Path("$nl$").append(featureImageName)); //$NON-NLS-1$
- }
- if (url == null)
- return null;
- // Get the image bytes
- InputStream in = null;
- ByteArrayOutputStream out = null;
- try {
- in = url.openStream();
- out = new ByteArrayOutputStream();
- byte[] buffer = new byte[BYTE_ARRAY_SIZE];
- int readResult = BYTE_ARRAY_SIZE;
- while (readResult == BYTE_ARRAY_SIZE) {
- readResult = in.read(buffer);
- if (readResult > 0)
- out.write(buffer, 0, readResult);
- }
- byte[] contents = out.toByteArray();
- // Calculate the crc
- CRC32 crc = new CRC32();
- crc.update(contents);
- return new Long(crc.getValue());
- } catch (IOException e) {
- return null;
- } finally {
- if (in != null)
- try {
- in.close();
- } catch (IOException e) {
- }
- if (out != null)
- try {
- out.close();
- } catch (IOException e) {
- }
- }
- }
-
-
- /**
- * Returns a label for the feature, we use the descriptor label
- */
- public String getFeatureLabel() {
- if (getDescriptor() == null)
- return null;
- return getDescriptor().getLabel();
- }
-
- /**
- * Returns the text to show in an "about" dialog for this product.
- * Products designed to run "headless" typically would not have such text.
- *
- * @return the about text, or <code>null</code> if none
- */
- public String getAboutText() {
- return aboutText;
- }
-
- /**
- * Returns the app name or <code>null</code>.
- * Note this is never shown to the user.
- * It is used to initialize the SWT Display.
- * <p>
- * On Motif, for example, this can be used
- * to set the name used for resource lookup.
- * </p>
- *
- * @return the app name, or <code>null</code>
- *
- * @see org.eclipse.swt.widgets.Display#setAppName
- */
- public String getAppName() {
- return appName;
- }
-
- /**
- * Returns the product name or <code>null</code>.
- * This is shown in the window title and the About action.
- *
- * @return the product name, or <code>null</code>
- */
- public String getProductName() {
- IPluginDescriptor desc = getDescriptor();
- if (desc == null)
- return null;
- return desc.getLabel();
- }
-
- /**
- * Returns the provider name or <code>null</code>.
- *
- * @return the provider name, or <code>null</code>
- */
- public String getProviderName() {
- IPluginDescriptor desc = getDescriptor();
- if (desc == null)
- return null;
- return desc.getProviderName();
- }
-
- /**
- * Returns the version or <code>null</code>.
- *
- * @return the version, or <code>null</code>
- */
- public String getVersion() {
- PluginVersionIdentifier versionId = getVersionId();
- if (versionId == null)
- return null;
- return versionId.toString();
- }
-
- /**
- * Returns a <code>URL</code> for the welcome page.
- * Products designed to run "headless" typically would not have such an page.
- *
- * @return the welcome page, or <code>null</code> if none
- */
- public URL getWelcomePageURL() {
- return welcomePageURL;
- }
-
- /**
- * Returns the id of a perspective in which to show the welcome page.
- * May be <code>null</code>.
- *
- * @return the welcome page perspective id, or <code>null</code> if none
- */
- public String getWelcomePerspective() {
- return welcomePerspective;
- }
-
- /**
- * Returns a <code>String</code> for the tips and trick href.
- *
- * @return the tips and tricks href, or <code>null</code> if none
- */
- public String getTipsAndTricksHref() {
- return tipsAndTricksHref;
- }
-
- /**
- * Returns the image descriptor for the window image to use for this product.
- * Products designed to run "headless" typically would not have such an image.
- *
- * @return the image descriptor for the window image, or <code>null</code> if none
- */
- public ImageDescriptor getWindowImage() {
- return windowImage;
- }
-
- /**
- * Reads the ini file.
- */
- protected void readINIFile(URL iniURL, URL propertiesURL, URL mappingsURL)
- throws CoreException {
-
- Properties ini = new Properties();
- InputStream is = null;
- try {
- is = iniURL.openStream();
- ini.load(is);
- } catch (IOException e) {
- reportINIFailure(e, "Cannot read about info file " + iniURL); //$NON-NLS-1$
- return;
- } finally {
- try {
- if (is != null)
- is.close();
- } catch (IOException e) {
- }
- }
-
- PropertyResourceBundle bundle = null;
-
- if (propertiesURL != null) {
- InputStream bundleStream = null;
- try {
- bundleStream = propertiesURL.openStream();
- bundle = new PropertyResourceBundle(bundleStream);
- } catch (IOException e) {
- reportINIFailure(e, "Cannot read about properties file " + propertiesURL); //$NON-NLS-1$
- bundle = null;
- } finally {
- try {
- if (bundleStream != null)
- bundleStream.close();
- } catch (IOException e) {
- }
- }
- }
-
- PropertyResourceBundle mappingsBundle = null;
-
- if (mappingsURL != null) {
- InputStream bundleStream = null;
- try {
- bundleStream = mappingsURL.openStream();
- mappingsBundle = new PropertyResourceBundle(bundleStream);
- } catch (IOException e) {
- reportINIFailure(e, "Cannot read about mappings file " + mappingsURL); //$NON-NLS-1$
- mappingsBundle = null;
- } finally {
- try {
- if (bundleStream != null)
- bundleStream.close();
- } catch (IOException e) {
- }
- }
- }
-
- // Create the mappings array
- ArrayList mappingsList = new ArrayList();
- if (mappingsBundle != null) {
- boolean found = true;
- String readValue;
- int i = 0;
- while (found) {
- try {
- // Substitute $featureVersion if Applicable
- readValue = mappingsBundle.getString(Integer.toString(i));
- if("$featureVersion".equals(readValue)) { //$NON-NLS-1$
- readValue = getVersion();
- if (readValue == null)
- readValue = WorkbenchMessages.getString("AboutDialog.notSpecified"); //$NON-NLS-1$
- }
- mappingsList.add(readValue);
- } catch (MissingResourceException e) {
- found = false;
- }
- i++;
- }
- }
- String[] mappingsArray = (String[])mappingsList.toArray(new String[mappingsList.size()]);
-
- Hashtable runtimeMappings = new Hashtable();
- String featureVersion = getVersion();
- if (featureVersion==null)
- featureVersion=WorkbenchMessages.getString("AboutDialog.notSpecified"); //$NON-NLS-1$
- runtimeMappings.put("{featureVersion}", featureVersion); //$NON-NLS-1$
-
- windowImage = getImage(ini, "windowImage"); //$NON-NLS-1$
-
- aboutText = (String) ini.get("aboutText"); //$NON-NLS-1$
- aboutText = getResourceString(aboutText, bundle, mappingsArray, runtimeMappings);
-
- aboutImage = getImage(ini, "aboutImage"); //$NON-NLS-1$
-
- featureImageName = (String) ini.get("featureImage"); //$NON-NLS-1$
- featureImage = getImage(ini, "featureImage"); //$NON-NLS-1$
-
- welcomePageURL = getURL(ini, "welcomePage"); //$NON-NLS-1$
- welcomePerspective = (String) ini.get("welcomePerspective"); //$NON-NLS-1$
-
- tipsAndTricksHref = (String) ini.get("tipsAndTricksHref"); //$NON-NLS-1$
-
- appName = (String) ini.get("appName"); //$NON-NLS-1$
- appName = getResourceString(appName, bundle, mappingsArray, null);
-
- }
-
- /**
- * Returns a URL for the given key, or <code>null</code>.
- *
- * @return a URL for the given key, or <code>null</code>
- */
- private URL getURL(Properties ini, String key) {
- URL url = null;
- String fileName = (String) ini.get(key);
- if (fileName != null) {
- IPluginDescriptor desc = getDescriptor();
- if(desc == null)
- return null;
- url = desc.find(new Path(fileName));
- }
- return url;
- }
-
- /**
- * Returns an image descriptor for the given key, or <code>null</code>.
- *
- * @return an image descriptor for the given key, or <code>null</code>
- */
- private ImageDescriptor getImage(Properties ini, String key) {
- URL url = getURL(ini, key);
- if (url != null) {
- return ImageDescriptor.createFromURL(url);
- }
- return null;
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/parts/AbstractOverlayIcon.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/parts/AbstractOverlayIcon.java
deleted file mode 100644
index 58a3edb..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/parts/AbstractOverlayIcon.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.parts;
-
-import org.eclipse.swt.graphics.ImageData;
-import org.eclipse.swt.graphics.Point;
-
-import org.eclipse.jface.resource.CompositeImageDescriptor;
-import org.eclipse.jface.resource.ImageDescriptor;
-
-/**
- * An OverlayIcon consists of a main icon and several adornments.
- */
-public abstract class AbstractOverlayIcon extends CompositeImageDescriptor {
-
- static final int DEFAULT_WIDTH = 16;
- static final int DEFAULT_HEIGHT = 16;
-
- private Point fSize = null;
-
- private ImageDescriptor fOverlays[][];
-
- public AbstractOverlayIcon(ImageDescriptor[][] overlays) {
- this(overlays, null);
- }
-
- public AbstractOverlayIcon(ImageDescriptor[][] overlays, Point size) {
- fOverlays = overlays;
- if (size != null)
- fSize = size;
- else
- fSize = new Point(DEFAULT_WIDTH, DEFAULT_HEIGHT);
- }
- protected void drawBottomLeft(ImageDescriptor[] overlays) {
- if (overlays == null)
- return;
- int length = overlays.length;
- int x = 0;
- for (int i = 0; i < 3; i++) {
- if (i < length && overlays[i] != null) {
- ImageData id = overlays[i].getImageData();
- drawImage(id, x, getSize().y - id.height);
- x += id.width;
- }
- }
- }
- protected void drawBottomRight(ImageDescriptor[] overlays) {
- if (overlays == null)
- return;
- int length = overlays.length;
- int x = getSize().x;
- for (int i = 2; i >= 0; i--) {
- if (i < length && overlays[i] != null) {
- ImageData id = overlays[i].getImageData();
- x -= id.width;
- drawImage(id, x, getSize().y - id.height);
- }
- }
- }
-
- protected abstract ImageData getBaseImageData();
-
- protected void drawCompositeImage(int width, int height) {
- ImageData base = getBaseImageData();
- drawImage(base, 0, 0);
- if (fOverlays != null) {
- if (fOverlays.length > 0)
- drawTopRight(fOverlays[0]);
-
- if (fOverlays.length > 1)
- drawBottomRight(fOverlays[1]);
-
- if (fOverlays.length > 2)
- drawBottomLeft(fOverlays[2]);
-
- if (fOverlays.length > 3)
- drawTopLeft(fOverlays[3]);
- }
- }
- protected void drawTopLeft(ImageDescriptor[] overlays) {
- if (overlays == null)
- return;
- int length = overlays.length;
- int x = 0;
- for (int i = 0; i < 3; i++) {
- if (i < length && overlays[i] != null) {
- ImageData id = overlays[i].getImageData();
- drawImage(id, x, 0);
- x += id.width;
- }
- }
- }
- protected void drawTopRight(ImageDescriptor[] overlays) {
- if (overlays == null)
- return;
- int length = overlays.length;
- int x = getSize().x;
- for (int i = 2; i >= 0; i--) {
- if (i < length && overlays[i] != null) {
- ImageData id = overlays[i].getImageData();
- x -= id.width;
- drawImage(id, x, 0);
- }
- }
- }
-
- protected Point getSize() {
- return fSize;
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/parts/ConfigurationInfo.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/parts/ConfigurationInfo.java
deleted file mode 100644
index a570622..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/parts/ConfigurationInfo.java
+++ /dev/null
@@ -1,198 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.parts;
-
-
-import java.net.URL;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-import org.eclipse.core.boot.BootLoader;
-import org.eclipse.core.boot.IPlatformConfiguration;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPluginDescriptor;
-import org.eclipse.core.runtime.IPluginRegistry;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.PluginVersionIdentifier;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.ui.internal.WorkbenchPlugin;
-
-/**
- * Configuation info class;
- * <p>
- * The information within subclasses of this object is obtained from a configuration
- * "ini" file". This file resides within an install configurations directory and must
- * be a standard java property file. A properties file may also be used to NL values
- * in the ini file.
- * </p>
- */
-
-public abstract class ConfigurationInfo {
-
- private IPluginDescriptor desc;
- private URL baseURL;
- private String iniFilename;
- private String propertiesFilename;
-
- private static final String KEY_PREFIX = "%"; //$NON-NLS-1$
- private static final String KEY_DOUBLE_PREFIX = "%%"; //$NON-NLS-1$
-
- protected ConfigurationInfo(String ini, String properties) {
- iniFilename = ini;
- propertiesFilename = properties;
- }
-
- /**
- * R1.0 platform.ini handling using "main" plugin and fragments for NL
- */
- public void readINIFile() throws CoreException {
- // determine the identifier of the "dominant" application
- IPlatformConfiguration conf = BootLoader.getCurrentPlatformConfiguration();
- String configName = conf.getPrimaryFeatureIdentifier();
- if (configName == null) {
- reportINIFailure(null, "Unknown configuration identifier"); //$NON-NLS-1$
- return;
- }
-
- // attempt to locate its corresponding "main" plugin
- IPluginRegistry reg = Platform.getPluginRegistry();
- if (reg == null) {
- reportINIFailure(null, "Plugin registry is null"); //$NON-NLS-1$
- return;
- }
- int index = configName.lastIndexOf("_"); //$NON-NLS-1$
- if (index == -1)
- this.desc = reg.getPluginDescriptor(configName);
- else {
- String mainPluginName = configName.substring(0, index);
- PluginVersionIdentifier mainPluginVersion = null;
- try {
- mainPluginVersion =
- new PluginVersionIdentifier(configName.substring(index + 1));
- } catch (Exception e) {
- reportINIFailure(e, "Unknown plugin version " + configName); //$NON-NLS-1$
- return;
- }
- this.desc = reg.getPluginDescriptor(mainPluginName, mainPluginVersion);
- }
- if (this.desc == null) {
- reportINIFailure(null, "Missing plugin descriptor for " + configName); //$NON-NLS-1$
- return;
- }
- this.baseURL = desc.getInstallURL();
-
- // load the platform.ini and platform.properties file
- URL iniURL = desc.find(new Path(iniFilename));
- if (iniURL == null) {
- reportINIFailure(null, "Unable to load plugin file: " + iniFilename); //$NON-NLS-1$
- return;
- }
-
- URL propertiesURL = desc.find(new Path(propertiesFilename));
- // OK to pass null properties file
- readINIFile(iniURL, propertiesURL);
- }
-
- /**
- * Gets the descriptor
- * @return Returns a IPluginDescriptor
- */
- protected IPluginDescriptor getDescriptor() {
- return desc;
- }
- /**
- * Gets the baseURL
- * @return Returns a URL
- */
- protected URL getBaseURL() {
- return baseURL;
- }
- /**
- * Returns a resource string corresponding to the given argument
- * value and bundle.
- * If the argument value specifies a resource key, the string
- * is looked up in the given resource bundle. If the argument does not
- * specify a valid key, the argument itself is returned as the
- * resource string. The key lookup is performed against the
- * specified resource bundle. If a resource string
- * corresponding to the key is not found in the resource bundle
- * the key value, or any default text following the key in the
- * argument value is returned as the resource string.
- * A key is identified as a string begining with the "%" character.
- * Note that the "%" character is stripped off prior to lookup
- * in the resource bundle.
- * <p>
- * For example, assume resource bundle plugin.properties contains
- * name = Project Name
- * <pre>
- * <li>getResourceString("Hello World") returns "Hello World"</li>
- * <li>getResourceString("%name") returns "Project Name"</li>
- * <li>getResourceString("%name Hello World") returns "Project Name"</li>
- * <li>getResourceString("%abcd Hello World") returns "Hello World"</li>
- * <li>getResourceString("%abcd") returns "%abcd"</li>
- * <li>getResourceString("%%name") returns "%name"</li>
- * <li>getResourceString(<code>null</code>) returns <code>null</code></li>
- * </pre>
- * </p>
- *
- * @param value the value or <code>null</code>
- * @param b the resource bundle or <code>null</code>
- * @return the resource string
- */
- protected String getResourceString(String value, ResourceBundle b) {
-
- if(value == null)
- return null;
- String s = value.trim();
-
- if (!s.startsWith(KEY_PREFIX))
- return s;
-
- if (s.startsWith(KEY_DOUBLE_PREFIX))
- return s.substring(1);
-
- int ix = s.indexOf(" "); //$NON-NLS-1$
- String key = ix == -1 ? s : s.substring(0, ix);
- String dflt = ix == -1 ? s : s.substring(ix + 1);
-
- if (b == null)
- return dflt;
-
- try {
- return b.getString(key.substring(1));
- } catch (MissingResourceException e) {
- reportINIFailure(e, "Property \"" + key + "\" not found");//$NON-NLS-1$ //$NON-NLS-2$
- return dflt;
- }
- }
-
- /**
- * Read the ini file.
- */
- protected abstract void readINIFile(URL iniURL, URL propertiesURL)
- throws CoreException;
-
- /**
- * Report an ini failure
- */
- protected void reportINIFailure(Exception e, String message) {
- if (!WorkbenchPlugin.DEBUG) {
- // only report ini problems if the -debug command line argument is used
- return;
- }
-
- IStatus iniStatus = new Status(IStatus.ERROR, WorkbenchPlugin.getDefault().getDescriptor().getUniqueIdentifier(),
- 0, message, e);
- WorkbenchPlugin.log("Problem reading configuration info.", iniStatus);//$NON-NLS-1$
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/parts/DefaultContentProvider.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/parts/DefaultContentProvider.java
deleted file mode 100644
index 5a67a7b..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/parts/DefaultContentProvider.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.parts;
-
-import org.eclipse.jface.viewers.*;
-
-public class DefaultContentProvider implements IContentProvider {
-
-public DefaultContentProvider() {
- super();
-}
-public void dispose() {}
-public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {}
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/parts/ImageOverlayIcon.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/parts/ImageOverlayIcon.java
deleted file mode 100644
index 5c61ab4..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/parts/ImageOverlayIcon.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.parts;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.swt.graphics.*;
-
-/**
- * An OverlayIcon consists of a main icon and several adornments.
- */
-public class ImageOverlayIcon extends AbstractOverlayIcon {
- private Image base;
-
- public ImageOverlayIcon(Image base, ImageDescriptor[][] overlays) {
- this(base, overlays, null);
- }
-
- public ImageOverlayIcon(Image base, ImageDescriptor[][] overlays, Point size) {
- super(overlays, size);
- this.base = base;
- }
-
- protected ImageData getBaseImageData() {
- return base.getImageData();
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/parts/OverlayIcon.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/parts/OverlayIcon.java
deleted file mode 100644
index c541351..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/parts/OverlayIcon.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.parts;
-
-import org.eclipse.swt.graphics.ImageData;
-import org.eclipse.swt.graphics.Point;
-
-import org.eclipse.jface.resource.CompositeImageDescriptor;
-import org.eclipse.jface.resource.ImageDescriptor;
-
-/**
- * An OverlayIcon consists of a main icon and several adornments.
- */
-public class OverlayIcon extends CompositeImageDescriptor {
-
- static final int DEFAULT_WIDTH= 16;
- static final int DEFAULT_HEIGHT= 16;
-
- private Point fSize= null;
-
- private ImageDescriptor fBase;
- private ImageDescriptor fOverlays[][];
-
- public OverlayIcon(ImageDescriptor base, ImageDescriptor[][] overlays) {
- fBase= base;
- if (fBase == null)
- fBase= ImageDescriptor.getMissingImageDescriptor();
- fOverlays= overlays;
- fSize= new Point(DEFAULT_WIDTH, DEFAULT_HEIGHT);
- }
- public OverlayIcon(ImageDescriptor base, ImageDescriptor[][] overlays, Point size) {
- fBase= base;
- if (fBase == null)
- fBase= ImageDescriptor.getMissingImageDescriptor();
- fOverlays= overlays;
- fSize= size;
- }
- protected void drawBottomLeft(ImageDescriptor[] overlays) {
- if (overlays == null)
- return;
- int length= overlays.length;
- int x= 0;
- for (int i= 0; i < 3; i++) {
- if (i < length && overlays[i] != null) {
- ImageData id= overlays[i].getImageData();
- drawImage(id, x, getSize().y-id.height);
- x+= id.width;
- }
- }
- }
- protected void drawBottomRight(ImageDescriptor[] overlays) {
- if (overlays == null)
- return;
- int length= overlays.length;
- int x= getSize().x;
- for (int i= 2; i >= 0; i--) {
- if (i < length && overlays[i] != null) {
- ImageData id= overlays[i].getImageData();
- x-= id.width;
- drawImage(id, x, getSize().y-id.height);
- }
- }
- }
- protected void drawCompositeImage(int width, int height) {
- ImageData bg= fBase.getImageData();
- drawImage(bg, 0, 0);
-
- if (fOverlays != null) {
- if (fOverlays.length > 0)
- drawTopRight( fOverlays[0]);
-
- if (fOverlays.length > 1)
- drawBottomRight(fOverlays[1]);
-
- if (fOverlays.length > 2)
- drawBottomLeft(fOverlays[2]);
-
- if (fOverlays.length > 3)
- drawTopLeft(fOverlays[3]);
- }
- }
- protected void drawTopLeft(ImageDescriptor[] overlays) {
- if (overlays == null)
- return;
- int length= overlays.length;
- int x= 0;
- for (int i= 0; i < 3; i++) {
- if (i < length && overlays[i] != null) {
- ImageData id= overlays[i].getImageData();
- drawImage(id, x, 0);
- x+= id.width;
- }
- }
- }
- protected void drawTopRight(ImageDescriptor[] overlays) {
- if (overlays == null)
- return;
- int length= overlays.length;
- int x= getSize().x;
- for (int i= 2; i >= 0; i--) {
- if (i < length && overlays[i] != null) {
- ImageData id= overlays[i].getImageData();
- x-= id.width;
- drawImage(id, x, 0);
- }
- }
- }
-
- protected Point getSize() {
- return fSize;
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/parts/PixelConverter.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/parts/PixelConverter.java
deleted file mode 100644
index 184e9b5..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/parts/PixelConverter.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.parts;
-/**
- * @version 1.0
- * @author
- */
-import org.eclipse.swt.graphics.FontMetrics;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.widgets.Control;
-
-import org.eclipse.jface.dialogs.Dialog;
-
-public class PixelConverter {
-
- private FontMetrics fFontMetrics;
-
- public PixelConverter(Control control) {
- GC gc = new GC(control);
- gc.setFont(control.getFont());
- fFontMetrics= gc.getFontMetrics();
- gc.dispose();
- }
-
- private FontMetrics fgFontMetrics;
-
- /**
- * @see DialogPage#convertHeightInCharsToPixels
- */
- public int convertHeightInCharsToPixels(int chars) {
- return Dialog.convertHeightInCharsToPixels(fFontMetrics, chars);
- }
-
- /**
- * @see DialogPage#convertHorizontalDLUsToPixels
- */
- public int convertHorizontalDLUsToPixels(int dlus) {
- return Dialog.convertHorizontalDLUsToPixels(fFontMetrics, dlus);
- }
-
- /**
- * @see DialogPage#convertVerticalDLUsToPixels
- */
- public int convertVerticalDLUsToPixels(int dlus) {
- return Dialog.convertVerticalDLUsToPixels(fFontMetrics, dlus);
- }
-
- /**
- * @see DialogPage#convertWidthInCharsToPixels
- */
- public int convertWidthInCharsToPixels(int chars) {
- return Dialog.convertWidthInCharsToPixels(fFontMetrics, chars);
- }
-
-}
-
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/parts/SWTUtil.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/parts/SWTUtil.java
deleted file mode 100644
index 3905287..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/parts/SWTUtil.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.parts;
-/**
- * @version 1.0
- * @author
- */
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.util.Assert;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.dnd.DragSource;
-import org.eclipse.swt.dnd.DropTarget;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Caret;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.ScrollBar;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Widget;
-
-/**
- * Utility class to simplify access to some SWT resources.
- */
-public class SWTUtil {
-
- /**
- * Returns the standard display to be used. The method first checks, if
- * the thread calling this method has an associated disaply. If so, this
- * display is returned. Otherwise the method returns the default display.
- */
- public static Display getStandardDisplay() {
- Display display;
- display= Display.getCurrent();
- if (display == null)
- display= Display.getDefault();
- return display;
- }
-
- /**
- * Returns the shell for the given widget. If the widget doesn't represent
- * a SWT object that manage a shell, <code>null</code> is returned.
- *
- * @return the shell for the given widget
- */
- public static Shell getShell(Widget widget) {
- if (widget instanceof Control)
- return ((Control)widget).getShell();
- if (widget instanceof Caret)
- return ((Caret)widget).getParent().getShell();
- if (widget instanceof DragSource)
- return ((DragSource)widget).getControl().getShell();
- if (widget instanceof DropTarget)
- return ((DropTarget)widget).getControl().getShell();
- if (widget instanceof Menu)
- return ((Menu)widget).getParent().getShell();
- if (widget instanceof ScrollBar)
- return ((ScrollBar)widget).getParent().getShell();
-
- return null;
- }
-
-
- /**
- * Returns a width hint for a button control.
- */
- public static int getButtonWidthHint(Button button) {
- PixelConverter converter= new PixelConverter(button);
- int widthHint= converter.convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
- return Math.max(widthHint, button.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
- }
-
- /**
- * Returns a height hint for a button control.
- */
- public static int getButtonHeigthHint(Button button) {
- PixelConverter converter= new PixelConverter(button);
- return converter.convertVerticalDLUsToPixels(IDialogConstants.BUTTON_HEIGHT);
- }
-
-
- /**
- * Sets width and height hint for the button control.
- * <b>Note:</b> This is a NOP if the button's layout data is not
- * an instance of <code>GridData</code>.
- *
- * @param the button for which to set the dimension hint
- */
- public static void setButtonDimensionHint(Button button) {
- Assert.isNotNull(button);
- Object gd= button.getLayoutData();
- if (gd instanceof GridData) {
- ((GridData)gd).heightHint= getButtonHeigthHint(button);
- ((GridData)gd).widthHint= getButtonWidthHint(button);
- }
- }
-
-
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/parts/SharedLabelProvider.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/parts/SharedLabelProvider.java
deleted file mode 100644
index c43946c..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/parts/SharedLabelProvider.java
+++ /dev/null
@@ -1,209 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.parts;
-
-import java.net.*;
-import java.util.*;
-
-import org.eclipse.core.runtime.IPluginDescriptor;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.SWTException;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.update.internal.ui.UpdateUIImages;
-
-/**
- * @version 1.0
- * @author
- */
-public class SharedLabelProvider
- extends LabelProvider
- implements ITableLabelProvider {
- public static final int F_ERROR = 1;
- public static final int F_WARNING = 2;
- public static final int F_CURRENT = 4;
- public static final int F_INSTALLABLE = 8;
- public static final int F_LINKED = 16;
- public static final int F_MOD = 32;
- public static final int F_UPDATED = 64;
- public static final int F_UNCONFIGURED = 128;
- public static final int F_ADD = 256;
- public static final int F_DEL = 512;
-
- Hashtable images = new Hashtable();
- ArrayList consumers = new ArrayList();
-
- public SharedLabelProvider() {
- }
-
- public void connect(Object consumer) {
- if (!consumers.contains(consumer))
- consumers.add(consumer);
- }
-
- public void disconnect(Object consumer) {
- consumers.remove(consumer);
- if (consumers.size() == 0) {
- reset();
- }
- }
-
- public void dispose() {
- reset();
- super.dispose();
- }
-
- private void reset() {
- for (Enumeration enum = images.elements(); enum.hasMoreElements();) {
- Image image = (Image) enum.nextElement();
- image.dispose();
- }
- images.clear();
- }
-
- public Image get(ImageDescriptor desc) {
- return get(desc, 0);
- }
-
- public Image get(ImageDescriptor desc, int flags) {
- Object key = desc;
-
- if (flags != 0) {
- key = getKey(desc.hashCode(), flags);
- }
- Image image = (Image) images.get(key);
- if (image == null) {
- image = createImage(desc, flags);
- images.put(key, image);
- }
- return image;
- }
-
- public Image get(Image image, int flags) {
- if (flags==0) return image;
- String key = getKey(image.hashCode(), flags);
- Image resultImage = (Image)images.get(key);
- if (resultImage == null) {
- resultImage = createImage(image, flags);
- images.put(key, resultImage);
- }
- return resultImage;
- }
-
- private String getKey(long hashCode, int flags) {
- return (""+hashCode) + ":"+flags;
- }
-
- private Image createImage(ImageDescriptor baseDesc, int flags) {
- if (flags == 0) {
- return baseDesc.createImage();
- }
- ImageDescriptor[] lowerLeft = getLowerLeftOverlays(flags);
- ImageDescriptor[] upperRight = getUpperRightOverlays(flags);
- ImageDescriptor[] lowerRight = getLowerRightOverlays(flags);
- ImageDescriptor[] upperLeft = getUpperLeftOverlays(flags);
- OverlayIcon compDesc =
- new OverlayIcon(
- baseDesc,
- new ImageDescriptor[][] { upperRight, lowerRight, lowerLeft, upperLeft });
- return compDesc.createImage();
- }
-
- private Image createImage(Image baseImage, int flags) {
- if (flags == 0) {
- return baseImage;
- }
- ImageDescriptor[] lowerLeft = getLowerLeftOverlays(flags);
- ImageDescriptor[] upperRight = getUpperRightOverlays(flags);
- ImageDescriptor[] lowerRight = getLowerRightOverlays(flags);
- ImageDescriptor[] upperLeft = getUpperLeftOverlays(flags);
- ImageOverlayIcon compDesc =
- new ImageOverlayIcon(
- baseImage,
- new ImageDescriptor[][] { upperRight, lowerRight, lowerLeft, upperLeft });
- return compDesc.createImage();
- }
-
- private ImageDescriptor[] getLowerLeftOverlays(int flags) {
- if ((flags & F_ERROR) != 0)
- return new ImageDescriptor[] { UpdateUIImages.DESC_ERROR_CO };
- if ((flags & F_WARNING) != 0)
- return new ImageDescriptor[] { UpdateUIImages.DESC_WARNING_CO };
- return null;
- }
-
- private ImageDescriptor[] getUpperRightOverlays(int flags) {
- if ((flags & F_ADD) != 0)
- return new ImageDescriptor[] { UpdateUIImages.DESC_ADD_CO };
- if ((flags & F_DEL) != 0)
- return new ImageDescriptor[] { UpdateUIImages.DESC_DEL_CO };
- if ((flags & F_UNCONFIGURED) != 0)
- return new ImageDescriptor[] { UpdateUIImages.DESC_UNCONF_CO };
- if ((flags & F_LINKED) != 0)
- return new ImageDescriptor[] { UpdateUIImages.DESC_LINKED_CO };
- return null;
- }
-
- private ImageDescriptor[] getLowerRightOverlays(int flags) {
- if ((flags & F_CURRENT) != 0)
- return new ImageDescriptor[] { UpdateUIImages.DESC_CURRENT_CO };
- if ((flags & F_MOD) != 0)
- return new ImageDescriptor[] { UpdateUIImages.DESC_MOD_CO };
- /*
- if ((flags & F_ADD) != 0)
- return new ImageDescriptor[] { UpdateUIImages.DESC_ADD_CO };
- if ((flags & F_DEL) != 0)
- return new ImageDescriptor[] { UpdateUIImages.DESC_DEL_CO };
- if ((flags & F_UNCONFIGURED) != 0)
- return new ImageDescriptor[] { UpdateUIImages.DESC_UNCONF_CO };
- */
- return null;
- }
-
- private ImageDescriptor[] getUpperLeftOverlays(int flags) {
- if ((flags & F_UPDATED) != 0)
- return new ImageDescriptor[] { UpdateUIImages.DESC_UPDATED_CO };
- return null;
- }
-
- public String getColumnText(Object obj, int index) {
- return getText(obj);
- }
- public Image getColumnImage(Object obj, int index) {
- return getImage(obj);
- }
-
- public Image getImageFromPlugin(
- IPluginDescriptor pluginDescriptor,
- String subdirectoryAndFilename) {
- URL installURL = pluginDescriptor.getInstallURL();
- return getImageFromURL(installURL, subdirectoryAndFilename);
- }
-
- public Image getImageFromURL(
- URL installURL,
- String subdirectoryAndFilename) {
- Image image = null;
- try {
- URL newURL = new URL(installURL, subdirectoryAndFilename);
- String key = newURL.toString();
- image = (Image)images.get(key);
- if (image == null) {
- ImageDescriptor desc = ImageDescriptor.createFromURL(newURL);
- image = desc.createImage();
- images.put(key, image);
- }
- } catch (MalformedURLException e) {
- } catch (SWTException e) {
- }
- return image;
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/parts/Sorter.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/parts/Sorter.java
deleted file mode 100644
index 1de3090..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/parts/Sorter.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.parts;
-
-
-public abstract class Sorter {
-
-public abstract boolean compare(Object elementOne, Object elementTwo);
-
-private Object[] quickSort(Object[] sortedCollection, int left, int right) {
- int originalLeft = left;
- int originalRight = right;
- Object mid = sortedCollection[ (left + right) / 2];
- do {
- while (compare(sortedCollection[left], mid))
- left++;
- while (compare(mid, sortedCollection[right]))
- right--;
- if (left <= right) {
- Object tmp = sortedCollection[left];
- sortedCollection[left] = sortedCollection[right];
- sortedCollection[right] = tmp;
- left++;
- right--;
- }
- } while (left <= right);
- if (originalLeft < right)
- sortedCollection = quickSort(sortedCollection, originalLeft, right);
- if (left < originalRight)
- sortedCollection = quickSort(sortedCollection, left, originalRight);
- return sortedCollection;
-}
-
-public Object[] sort(Object[] unSortedCollection) {
- int size = unSortedCollection.length;
- Object[] sortedCollection = new Object[size];
- //copy the array so can return a new sorted collection
- System.arraycopy(unSortedCollection, 0, sortedCollection, 0, size);
- if (size > 1)
- quickSort(sortedCollection, 0, size - 1);
- return sortedCollection;
-}
-
-public void sortInPlace(Object[] unSortedCollection) {
- int size = unSortedCollection.length;
- if (size > 1)
- quickSort(unSortedCollection, 0, size - 1);
-}
-
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/parts/VolumeLabelProvider.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/parts/VolumeLabelProvider.java
deleted file mode 100644
index ea45973..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/parts/VolumeLabelProvider.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.parts;
-
-import java.io.File;
-
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.update.configuration.*;
-import org.eclipse.update.internal.ui.*;
-
-public class VolumeLabelProvider extends LabelProvider {
- private static final String KEY_VOLUME_CDROM = "VolumeLabelProvider.cdrom";
- private static final String KEY_VOLUME_FLOPPY_3 =
- "VolumeLabelProvider.floppy3";
- private static final String KEY_VOLUME_FLOPPY_5 =
- "VolumeLabelProvider.floppy5";
- private static final String KEY_LOCAL_DISK =
- "VolumeLabelProvider.localDisk";
- private Image cdImage;
- private Image vfixedImage;
- private Image floppyImage;
- private Image vremovableImage;
- private Image vremoteImage;
- /**
- * Constructor for VolumeLabelProvider.
- */
- public VolumeLabelProvider() {
- floppyImage = UpdateUIImages.DESC_FLOPPY_OBJ.createImage();
- cdImage = UpdateUIImages.DESC_CD_OBJ.createImage();
- vfixedImage = UpdateUIImages.DESC_VFIXED_OBJ.createImage();
- vremoteImage = UpdateUIImages.DESC_VREMOTE_OBJ.createImage();
- vremovableImage =
- UpdateUIImages.DESC_VREMOVABLE_OBJ.createImage();
- }
-
- public String getText(Object obj) {
- if (obj instanceof IVolume) {
- return getVolumeText((IVolume) obj);
- }
- return obj.toString();
- }
-
- private String getVolumeText(IVolume volume) {
- String fileName = getVolumeName(volume);
- String nativeLabel = volume.getLabel();
- if (nativeLabel == null || nativeLabel.length() == 0) {
- // set well-known names for types
- int type = volume.getType();
- switch (type) {
- case LocalSystemInfo.VOLUME_CDROM :
- nativeLabel =
- UpdateUI.getString(KEY_VOLUME_CDROM);
- break;
- case LocalSystemInfo.VOLUME_FLOPPY_3 :
- nativeLabel =
- UpdateUI.getString(KEY_VOLUME_FLOPPY_3);
- break;
- case LocalSystemInfo.VOLUME_FLOPPY_5 :
- nativeLabel =
- UpdateUI.getString(KEY_VOLUME_FLOPPY_5);
- break;
- case LocalSystemInfo.VOLUME_FIXED:
- nativeLabel =
- UpdateUI.getString(KEY_LOCAL_DISK);
- break;
- }
- }
- if (nativeLabel != null && nativeLabel.length() > 0) {
- return nativeLabel + " (" + fileName + ")";
- } else {
- return fileName;
- }
- }
- private String getVolumeName(IVolume volume) {
- String name = volume.getFile().getPath();
- if (name.endsWith(File.separator) && name.length()>1) {
- name = name.substring(0, name.length()-1);
- }
- return name;
- }
-
- public Image getImage(Object obj) {
- if (obj instanceof IVolume) {
- return getVolumeImage((IVolume) obj);
- }
- return vfixedImage;
- }
- private Image getVolumeImage(IVolume volume) {
- switch (volume.getType()) {
- case LocalSystemInfo.VOLUME_CDROM :
- return cdImage;
- case LocalSystemInfo.VOLUME_FIXED :
- return vfixedImage;
- case LocalSystemInfo.VOLUME_FLOPPY_3 :
- case LocalSystemInfo.VOLUME_FLOPPY_5 :
- return floppyImage;
- case LocalSystemInfo.VOLUME_RAMDISK :
- case LocalSystemInfo.VOLUME_REMOVABLE :
- return vremovableImage;
- case LocalSystemInfo.VOLUME_REMOTE :
- return vremoteImage;
- }
- return null;
- }
-}
\ No newline at end of file
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/preferences/AppServerPreferencePage.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/preferences/AppServerPreferencePage.java
deleted file mode 100644
index 0fc17f5..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/preferences/AppServerPreferencePage.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.preferences;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.preference.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.*;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.update.internal.ui.UpdateUI;
-import org.eclipse.jface.dialogs.Dialog;
-
-/**
- * Insert the type's description here.
- * @see PreferencePage
- */
-public class AppServerPreferencePage
- extends FieldEditorPreferencePage
- implements IWorkbenchPreferencePage {
- private static final String KEY_DESCRIPTION =
- "AppServerPreferencePage.description";
- private static final String PREFIX = UpdateUI.getPluginId();
- public static final String P_MASTER_SWITCH = PREFIX + ".appServer";
- public static final String P_ENCODE_URLS = PREFIX + ".encodeURLs";
- private static final String KEY_MASTER_SWITCH =
- "AppServerPreferencePage.masterSwitch";
- private static final String KEY_ENCODE_URLS =
- "AppServerPreferencePage.encodeURLs";
- //private MasterField masterField;
- private BooleanFieldEditor masterField;
-
-/*
- class MasterField extends BooleanFieldEditor {
- BooleanFieldEditor slave;
- public MasterField(String property, String key, Composite parent) {
- super(property, key, parent);
- }
-
- protected void valueChanged(boolean oldValue, boolean newValue) {
- super.valueChanged(oldValue, newValue);
- slave.setEnabled(newValue, getFieldEditorParent());
- }
-
- void update() {
- slave.setEnabled(getBooleanValue(), getFieldEditorParent());
- }
-
- public void setSlave(BooleanFieldEditor slave) {
- this.slave = slave;
- }
- }
-*/
-
- /**
- * The constructor.
- */
- public AppServerPreferencePage() {
- super(GRID);
- setPreferenceStore(UpdateUI.getDefault().getPreferenceStore());
- setDescription(UpdateUI.getString(KEY_DESCRIPTION));
- }
-
- /**
- * Insert the method's description here.
- * @see PreferencePage#init
- */
- public void init(IWorkbench workbench) {
- }
- public void createFieldEditors() {
- WorkbenchHelp.setHelp(
- getFieldEditorParent(),
- "org.eclipse.update.ui.AppServerPreferencePage");
- masterField =
- new BooleanFieldEditor(
- P_MASTER_SWITCH,
- UpdateUI.getString(KEY_MASTER_SWITCH),
- getFieldEditorParent());
- addField(masterField);
- /*
- BooleanFieldEditor encodeURLs =
- new BooleanFieldEditor(
- P_ENCODE_URLS,
- UpdateUI.getString(KEY_ENCODE_URLS),
- getFieldEditorParent());
- addField(encodeURLs);
- masterField.setSlave(encodeURLs);
- */
- }
-
- public void createControl(Composite parent) {
- super.createControl(parent);
- Dialog.applyDialogFont(getControl());
- WorkbenchHelp.setHelp(
- parent,"org.eclipse.update.ui.AppServerPreferencePage");
- }
-/*
- protected void initialize() {
- super.initialize();
- masterField.update();
- }
-*/
- protected void createSpacer(Composite composite, int columnSpan) {
- Label label = new Label(composite, SWT.NONE);
- GridData gd = new GridData();
- gd.horizontalSpan = columnSpan;
- label.setLayoutData(gd);
- }
- public static boolean getUseApplicationServer() {
- IPreferenceStore store =
- UpdateUI.getDefault().getPreferenceStore();
- return store.getBoolean(P_MASTER_SWITCH);
- }
-
- public static boolean getEncodeURLs() {
- return true;
- /*
- IPreferenceStore store =
- UpdateUI.getDefault().getPreferenceStore();
- return store.getBoolean(P_ENCODE_URLS);
- */
- }
-
- public boolean performOk() {
- boolean result = super.performOk();
- if (result) {
- final boolean bag[] = new boolean[1];
- BusyIndicator.showWhile(getControl().getDisplay(), new Runnable() {
- public void run() {
- try {
- handleServerActivation();
- bag[0] = true;
- } catch (CoreException e) {
- UpdateUI.logException(e);
- bag[0] = false;
- }
- }
- });
- result = bag[0];
- }
- if (result)
- UpdateUI.getDefault().savePluginPreferences();
- return result;
- }
-
- private void handleServerActivation() throws CoreException {
- boolean masterSwitch = getUseApplicationServer();
- boolean webAppRunning = UpdateUI.getDefault().isWebAppStarted();
-
- if (!masterSwitch && webAppRunning) {
- // remove Web app
- UpdateUI.getDefault().stopWebApp();
- } else if (masterSwitch && !webAppRunning) {
- // add Web app
- UpdateUI.getDefault().startWebApp();
- }
- }
-}
\ No newline at end of file
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/preferences/MainPreferencePage.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/preferences/MainPreferencePage.java
deleted file mode 100644
index 94bbd82..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/preferences/MainPreferencePage.java
+++ /dev/null
@@ -1,302 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.preferences;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.preference.*;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.*;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.update.core.SiteManager;
-import org.eclipse.update.internal.ui.UpdateUI;
-import org.eclipse.jface.dialogs.Dialog;
-
-/**
- * Insert the type's description here.
- * @see PreferencePage
- */
-public class MainPreferencePage
- extends FieldEditorPreferencePage
- implements IWorkbenchPreferencePage {
- private static final String KEY_DESCRIPTION =
- "MainPreferencePage.description";
- private static final String PREFIX = UpdateUI.getPluginId();
- public static final String P_HISTORY_SIZE = PREFIX + ".historySize";
- public static final String P_CHECK_SIGNATURE = PREFIX + ".checkSignature";
- public static final String P_BROWSER = PREFIX + ".browser";
- public static final String EMBEDDED_VALUE = "embedded";
- private static final String SYSTEM_VALUE = "system";
- private static final String KEY_CHECK_SIGNATURE =
- "MainPreferencePage.checkSignature";
- private static final String KEY_HISTORY_SIZE =
- "MainPreferencePage.historySize";
- private static final String KEY_TOPIC_COLOR =
- "MainPreferencePage.topicColor";
- private static final String KEY_BROWSER_CHOICE =
- "MainPreferencePage.browserChoice";
- private static final String KEY_BROWSER_CHOICE_EMBEDDED =
- "MainPreferencePage.browserChoice.embedded";
- private static final String KEY_BROWSER_CHOICE_SYSTEM =
- "MainPreferencePage.browserChoice.system";
-
- public static final String P_UPDATE_VERSIONS = PREFIX + ".updateVersions";
- private static final String KEY_UPDATE_VERSIONS =
- "MainPreferencePage.updateVersions";
- private static final String KEY_UPDATE_VERSIONS_EQUIVALENT =
- "MainPreferencePage.updateVersions.equivalent";
- private static final String KEY_UPDATE_VERSIONS_COMPATIBLE =
- "MainPreferencePage.updateVersions.compatible";
- public static final String EQUIVALENT_VALUE = "equivalent";
- public static final String COMPATIBLE_VALUE = "compatible";
-
- private BooleanFieldEditor checkSignatureEditor;
- private Label httpProxyHostLabel;
- private Label httpProxyPortLabel;
- private Text httpProxyHostText;
- private Text httpProxyPortText;
- private Button enableHttpProxy;
- private static final String KEY_ENABLE_HTTP_PROXY =
- "MainPreferencePage.enableHttpProxy";
- private static final String KEY_HTTP_PROXY_SERVER =
- "MainPreferencePage.httpProxyHost";
- private static final String KEY_HTTP_PROXY_PORT =
- "MainPreferencePage.httpProxyPort";
-
- /**
- * The constructor.
- */
- public MainPreferencePage() {
- super(GRID);
- setPreferenceStore(UpdateUI.getDefault().getPreferenceStore());
- setDescription(UpdateUI.getString(KEY_DESCRIPTION));
- }
-
- /**
- * Insert the method's description here.
- * @see PreferencePage#init
- */
- public void init(IWorkbench workbench) {
- }
- public void createFieldEditors() {
- WorkbenchHelp.setHelp(
- getFieldEditorParent(),
- "org.eclipse.update.ui.MainPreferencePage");
- IntegerFieldEditor maxLevel =
- new IntegerFieldEditor(
- P_HISTORY_SIZE,
- UpdateUI.getString(KEY_HISTORY_SIZE),
- getFieldEditorParent());
- maxLevel.setValidRange(1, Integer.MAX_VALUE);
- addField(maxLevel);
- checkSignatureEditor =
- new BooleanFieldEditor(
- P_CHECK_SIGNATURE,
- UpdateUI.getString(KEY_CHECK_SIGNATURE),
- getFieldEditorParent());
- addField(checkSignatureEditor);
- if ("win32".equals(SWT.getPlatform())) {
- RadioGroupFieldEditor browser =
- new RadioGroupFieldEditor(
- P_BROWSER,
- UpdateUI.getString(KEY_BROWSER_CHOICE),
- 1,
- new String[][] {
- {
- UpdateUI.getString(KEY_BROWSER_CHOICE_EMBEDDED),
- EMBEDDED_VALUE },
- {
- UpdateUI.getString(KEY_BROWSER_CHOICE_SYSTEM),
- SYSTEM_VALUE }
- }, getFieldEditorParent(), true);
- addField(browser);
- }
- createSpacer(getFieldEditorParent(), 2);
-
- RadioGroupFieldEditor updateVersions =
- new RadioGroupFieldEditor(
- P_UPDATE_VERSIONS,
- UpdateUI.getString(KEY_UPDATE_VERSIONS),
- 1,
- new String[][] {
- {
- UpdateUI.getString(KEY_UPDATE_VERSIONS_EQUIVALENT),
- EQUIVALENT_VALUE },
- {
- UpdateUI.getString(KEY_UPDATE_VERSIONS_COMPATIBLE),
- COMPATIBLE_VALUE }
- }, getFieldEditorParent(), true);
- addField(updateVersions);
-
- createSpacer(getFieldEditorParent(), 2);
-
- ColorFieldEditor topicColor =
- new ColorFieldEditor(
- UpdateColors.P_TOPIC_COLOR,
- UpdateUI.getString(KEY_TOPIC_COLOR),
- getFieldEditorParent());
- addField(topicColor);
-
- createSpacer(getFieldEditorParent(), 2);
- createHttpProxy(getFieldEditorParent(), 2);
-
- }
-
- public void createControl(Composite parent) {
- super.createControl(parent);
- Dialog.applyDialogFont(getControl());
- }
-
- protected void createSpacer(Composite composite, int columnSpan) {
- Label label = new Label(composite, SWT.NONE);
- GridData gd = new GridData();
- gd.horizontalSpan = columnSpan;
- label.setLayoutData(gd);
- }
- protected void createHttpProxy(Composite composite, int columnSpan) {
- Group group = new Group(composite, SWT.NONE);
- group.setText(UpdateUI.getString("MainPreferencePage.proxyGroup"));
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- group.setLayout(layout);
- GridData gd = new GridData();
- gd.horizontalSpan = columnSpan;
- gd.horizontalAlignment = GridData.FILL;
- group.setLayoutData(gd);
- group.setFont(composite.getFont());
-
- enableHttpProxy = new Button(group, SWT.CHECK);
- enableHttpProxy.setText(UpdateUI.getString(KEY_ENABLE_HTTP_PROXY));
- gd = new GridData();
- gd.horizontalSpan = 2;
- enableHttpProxy.setLayoutData(gd);
-
- httpProxyHostLabel = new Label(group, SWT.NONE);
- httpProxyHostLabel.setText(UpdateUI.getString(KEY_HTTP_PROXY_SERVER));
-
- httpProxyHostText = new Text(group, SWT.SINGLE | SWT.BORDER);
- httpProxyHostText.setFont(group.getFont());
- gd = new GridData(GridData.FILL_HORIZONTAL);
- httpProxyHostText.setLayoutData(gd);
-
- httpProxyPortLabel = new Label(group, SWT.NONE);
- httpProxyPortLabel.setText(UpdateUI.getString(KEY_HTTP_PROXY_PORT));
-
- httpProxyPortText = new Text(group, SWT.SINGLE | SWT.BORDER);
- httpProxyPortText.setFont(group.getFont());
- gd = new GridData(GridData.FILL_HORIZONTAL);
- httpProxyPortText.setLayoutData(gd);
-
- performDefaults();
-
- enableHttpProxy.addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent e) {
- boolean enable = enableHttpProxy.getSelection();
- httpProxyPortLabel.setEnabled(enable);
- httpProxyHostLabel.setEnabled(enable);
- httpProxyPortText.setEnabled(enable);
- httpProxyHostText.setEnabled(enable);
- }
- public void widgetDefaultSelected(SelectionEvent e) {
- }
- });
-
- }
- private int getHistorySize() {
- IPreferenceStore store = UpdateUI.getDefault().getPreferenceStore();
- return store.getInt(P_HISTORY_SIZE);
- }
-
- public static boolean getCheckDigitalSignature() {
- IPreferenceStore store = UpdateUI.getDefault().getPreferenceStore();
- return store.getBoolean(P_CHECK_SIGNATURE);
- }
-
- public static boolean getUseEmbeddedBrowser() {
- IPreferenceStore store = UpdateUI.getDefault().getPreferenceStore();
- return store.getString(P_BROWSER).equals(EMBEDDED_VALUE);
- }
-
- public static String getUpdateVersionsMode() {
- IPreferenceStore store = UpdateUI.getDefault().getPreferenceStore();
- return store.getString(P_UPDATE_VERSIONS);
- }
-
- public boolean performOk() {
- boolean result = super.performOk();
- if (result) {
- BusyIndicator.showWhile(getControl().getDisplay(), new Runnable() {
- public void run() {
- try {
- SiteManager.getLocalSite().setMaximumHistoryCount(
- getHistorySize());
- SiteManager.setHttpProxyInfo(
- enableHttpProxy.getSelection(),
- httpProxyHostText.getText(),
- httpProxyPortText.getText());
- } catch (CoreException e) {
- UpdateUI.logException(e);
- }
- }
- });
- }
- UpdateUI.getDefault().savePluginPreferences();
- return result;
- }
- public void performApply() {
- super.performApply();
- BusyIndicator.showWhile(getControl().getDisplay(), new Runnable() {
- public void run() {
- SiteManager.setHttpProxyInfo(
- enableHttpProxy.getSelection(),
- httpProxyHostText.getText(),
- httpProxyPortText.getText());
- }
- });
- }
- public void performDefaults() {
- super.performDefaults();
-
- enableHttpProxy.setSelection(SiteManager.isHttpProxyEnable());
- String serverValue = SiteManager.getHttpProxyServer();
- if (serverValue != null)
- httpProxyHostText.setText(serverValue);
- String portValue = SiteManager.getHttpProxyPort();
- if (portValue != null)
- httpProxyPortText.setText(portValue);
-
- httpProxyPortLabel.setEnabled(enableHttpProxy.getSelection());
- httpProxyHostLabel.setEnabled(enableHttpProxy.getSelection());
- httpProxyPortText.setEnabled(enableHttpProxy.getSelection());
- httpProxyHostText.setEnabled(enableHttpProxy.getSelection());
- }
-
- public void propertyChange(PropertyChangeEvent event) {
- super.propertyChange(event);
- if (event.getSource().equals(checkSignatureEditor)) {
- if (event.getNewValue().equals(Boolean.FALSE)) {
- warnSignatureCheck(getShell());
- }
- }
- }
-
- private void warnSignatureCheck(Shell shell) {
- MessageDialog.openWarning(
- shell,
- UpdateUI.getString("MainPreferencePage.digitalSignature.title"),
- UpdateUI.getString("MainPreferencePage.digitalSignature.message"));
- }
-}
\ No newline at end of file
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/preferences/UpdateColors.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/preferences/UpdateColors.java
deleted file mode 100644
index c840c1b..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/preferences/UpdateColors.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.preferences;
-
-import java.util.ArrayList;
-import java.util.Hashtable;
-import java.util.Iterator;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.update.internal.ui.UpdateUI;
-
-public class UpdateColors {
- public static final String P_TOPIC_COLOR = "UpdateColors.topicColor";
-
- private static Hashtable colorTable = new Hashtable();
- //Keep a list of the Colors we have allocated seperately
- //as system colors do not need to be disposed.
- private static ArrayList allocatedColors = new ArrayList();
-
- /**
- * Get the Color used for banner backgrounds
- */
-
- public static Color getTopicColor(Display display) {
- return getColorSetting(display, P_TOPIC_COLOR);
- }
-
- public static void clearColor(String colorName) {
- colorTable.remove(colorName);
- }
-
- /**
- * Get the color setting for the name.
- */
- private static Color getColorSetting(
- Display display,
- String preferenceName) {
- if (colorTable.contains(preferenceName))
- return (Color) colorTable.get(preferenceName);
-
- IPreferenceStore store =
- UpdateUI.getDefault().getPreferenceStore();
- if (store == null) {
- Color color = getDefaultColor(display, preferenceName);
- colorTable.put(preferenceName, color);
- return color;
- } else {
- setDefaults(store);
- Color color =
- new Color(
- display,
- PreferenceConverter.getColor(store, preferenceName));
- allocatedColors.add(color);
- colorTable.put(preferenceName, color);
- return color;
- }
- }
-
- public static void setDefaults(IPreferenceStore store) {
- PreferenceConverter.setDefault(store, P_TOPIC_COLOR, new RGB(91, 120, 172));
- }
-
- /**
- * Return the default color for the preferenceName. If there is
- * no setting return the system black.
- */
- private static Color getDefaultColor(
- Display display,
- String preferenceName) {
-
- if (preferenceName.equals(P_TOPIC_COLOR)) {
- Color color = new Color(display, 91, 120, 172);
- allocatedColors.add(color);
- return color;
- }
- return display.getSystemColor(SWT.COLOR_BLACK);
- }
-
- /**
- * Dispose of all allocated colors. Called on workbench
- * shutdown.
- */
- public static void disposeColors() {
- Iterator colors = allocatedColors.iterator();
- while (colors.hasNext()) {
- ((Color) colors.next()).dispose();
- }
- }
-}
\ No newline at end of file
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/properties/ConfigurationPropertyPage.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/properties/ConfigurationPropertyPage.java
deleted file mode 100644
index fbfeb6d..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/properties/ConfigurationPropertyPage.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.properties;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.dialogs.PropertyPage;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.ui.IWorkbenchPropertyPage;
-import org.eclipse.swt.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.update.internal.ui.model.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.update.internal.ui.UpdateUI;
-import org.eclipse.update.configuration.*;
-import org.eclipse.update.core.*;
-import org.eclipse.core.runtime.CoreException;
-
-/**
- * Insert the type's description here.
- * @see PropertyPage
- */
-public class ConfigurationPropertyPage extends PropertyPage implements IWorkbenchPropertyPage {
- private static final String KEY_NAME = "ConfigurationPropertyPage.name"; //$NON-NLS-1$
- private Text nameText;
- private boolean changed;
- /**
- * The constructor.
- */
- public ConfigurationPropertyPage() {
- }
-
- /**
- * Insert the method's description here.
- * @see PropertyPage#createContents
- */
- protected Control createContents(Composite parent) {
- Composite container = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- container.setLayout(layout);
-
- Label label = new Label(container, SWT.NULL);
- label.setText(UpdateUI.getString(KEY_NAME));
- nameText = new Text(container, SWT.SINGLE|SWT.BORDER);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- nameText.setLayoutData(gd);
- initializeFields();
- WorkbenchHelp.setHelp(container, "org.eclipse.update.ui.ConfigurationPropertyPage");
- return container;
- }
-
- public void performDefaults() {
- IInstallConfiguration config = getConfiguration();
- nameText.setText(config.getLabel());
- super.performDefaults();
- }
-
- public boolean performOk() {
- if (changed) {
- IInstallConfiguration config = getConfiguration();
- config.setLabel(nameText.getText());
- UpdateModel model = UpdateUI.getDefault().getUpdateModel();
- model.fireObjectChanged(getElement(), null);
- try {
- SiteManager.getLocalSite().save();
- }
- catch (CoreException e) {
- UpdateUI.logException(e);
- }
- }
- return true;
- }
-
- private IInstallConfiguration getConfiguration() {
- Object obj = getElement();
- if (obj instanceof PreservedConfiguration)
- return ((PreservedConfiguration)obj).getConfiguration();
- return (IInstallConfiguration)obj;
- }
-
- private void initializeFields() {
- IInstallConfiguration config = getConfiguration();
- nameText.setText(config.getLabel());
- nameText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- checkFields();
- }
- });
- }
- private void checkFields() {
- boolean valid = true;
- String error = null;
- // check the value
- String text = nameText.getText();
- if (text.length()==0) valid = false;
- else if (text.charAt(0)=='@') {
- error = UpdateUI.getString("ConfigurationPropertyPage.invalidCharacter"); //$NON-NLS-1$
- valid=false;
- }
- setValid(valid);
- setErrorMessage(error);
- changed=true;
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/properties/NamedObjectPropertyPage.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/properties/NamedObjectPropertyPage.java
deleted file mode 100644
index 6a9f553..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/properties/NamedObjectPropertyPage.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.properties;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.IWorkbenchPropertyPage;
-import org.eclipse.ui.dialogs.PropertyPage;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.update.internal.ui.UpdateUI;
-import org.eclipse.update.internal.ui.model.*;
-
-/**
- * @see PropertyPage
- */
-public class NamedObjectPropertyPage
- extends PropertyPage
- implements IWorkbenchPropertyPage {
- private static final String KEY_NAME = "NamedObjectPropertyPage.name";
- private static final String KEY_EXISTS = "NamedObjectPropertyPage.exists";
- protected Text objectName;
- private boolean changed;
-
- /**
- * The constructor.
- */
- public NamedObjectPropertyPage() {
- }
-
- /**
- * Insert the method's description here.
- * @see PropertyPage#createContents
- */
- protected Control createContents(Composite parent) {
- Composite container = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- container.setLayout(layout);
-
- Label label = new Label(container, SWT.NULL);
- label.setText(UpdateUI.getString(KEY_NAME));
- objectName = new Text(container, SWT.SINGLE | SWT.BORDER);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- objectName.setLayoutData(gd);
- initializeFields();
- WorkbenchHelp.setHelp(container, "org.eclipse.update.ui.NamedObjectPropertyPage");
- return container;
- }
-
- public void performDefaults() {
- NamedModelObject object = (NamedModelObject) getElement();
- objectName.setText(object.getName());
- super.performDefaults();
- }
-
- public boolean performOk() {
- if (changed) {
- NamedModelObject object = (NamedModelObject) getElement();
- object.setName(objectName.getText());
- }
- return true;
- }
-
- private void initializeFields() {
- NamedModelObject object = (NamedModelObject) getElement();
- objectName.setText(object.getName());
-
- objectName.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- checkFields();
- }
- });
- }
- private void checkFields() {
- boolean valid = true;
- String errorMessage = null;
- String newName = objectName.getText();
- if (newName.length() == 0)
- valid = false;
- else {
- valid = !exists(newName);
- if (!valid)
- errorMessage =
- UpdateUI.getFormattedMessage(KEY_EXISTS, newName);
- }
- setValid(valid);
- setErrorMessage(errorMessage);
- changed = true;
- }
- private boolean exists(String name) {
- NamedModelObject object = (NamedModelObject) getElement();
- NamedModelObject parent = (NamedModelObject) object.getParent(null);
- Object[] candidates = null;
- if (parent == null) {
- // root level
- UpdateModel model = object.getModel();
- candidates = model.getBookmarks();
- } else {
- candidates = parent.getChildren(parent);
- }
- for (int i = 0; i < candidates.length; i++) {
- NamedModelObject candidate = (NamedModelObject) candidates[i];
- if (candidate.equals(object))
- continue;
- if (candidate.getName().equals(name))
- return true;
- }
- return false;
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/properties/SearchObjectPropertyPage.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/properties/SearchObjectPropertyPage.java
deleted file mode 100644
index 3bd6aa5..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/properties/SearchObjectPropertyPage.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.properties;
-
-import org.eclipse.swt.widgets.*;
-import org.eclipse.update.internal.ui.search.SearchObject;
-
-public class SearchObjectPropertyPage extends NamedObjectPropertyPage {
-
- /**
- * Constructor for SearchObjectPropertyPage.
- */
- public SearchObjectPropertyPage() {
- super();
- }
-
- protected Control createContents(Composite parent) {
- Control control = super.createContents(parent);
- SearchObject searchObject = (SearchObject)getElement();
- objectName.setEditable(!searchObject.isCategoryFixed());
- return control;
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/properties/SiteBookmarkPropertyPage.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/properties/SiteBookmarkPropertyPage.java
deleted file mode 100644
index 33cdd3b..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/properties/SiteBookmarkPropertyPage.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.properties;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.dialogs.PropertyPage;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.ui.IWorkbenchPropertyPage;
-import org.eclipse.swt.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.update.internal.ui.model.*;
-import org.eclipse.swt.events.*;
-import java.net.*;
-import org.eclipse.update.internal.ui.UpdateUI;
-
-/**
- * Insert the type's description here.
- * @see PropertyPage
- */
-public class SiteBookmarkPropertyPage
- extends PropertyPage
- implements IWorkbenchPropertyPage {
- private static final String KEY_NAME = "SiteBookmarkPropertyPage.name";
- private static final String KEY_ADDRESS = "SiteBookmarkPropertyPage.address";
- private static final String KEY_UPDATE_SITE = "SiteBookmarkPropertyPage.updateSite";
- private static final String KEY_WEB_SITE = "SiteBookmarkPropertyPage.webSite";
- private Text siteName;
- private Text siteURL;
- private Button updateButton;
- private Button webButton;
- private boolean changed;
- private boolean urlChanged;
- private boolean typeChanged;
- /**
- * The constructor.
- */
- public SiteBookmarkPropertyPage() {
- }
-
- /**
- * Insert the method's description here.
- * @see PropertyPage#createContents
- */
- protected Control createContents(Composite parent) {
- Composite container = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- container.setLayout(layout);
-
- Label label = new Label(container, SWT.NULL);
- label.setText(UpdateUI.getString(KEY_NAME));
- siteName = new Text(container, SWT.SINGLE | SWT.BORDER);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- siteName.setLayoutData(gd);
- label = new Label(container, SWT.NULL);
- label.setText(UpdateUI.getString(KEY_ADDRESS));
- siteURL = new Text(container, SWT.SINGLE | SWT.BORDER);
- gd = new GridData(GridData.FILL_HORIZONTAL);
- siteURL.setLayoutData(gd);
-
- updateButton = new Button(container, SWT.RADIO);
- updateButton.setText(UpdateUI.getString(KEY_UPDATE_SITE));
- gd = new GridData();
- gd.horizontalSpan = 2;
- updateButton.setLayoutData(gd);
-
- webButton = new Button(container, SWT.RADIO);
- webButton.setText(UpdateUI.getString(KEY_WEB_SITE));
- gd = new GridData();
- gd.horizontalSpan = 2;
- webButton.setLayoutData(gd);
-
- initializeFields();
- WorkbenchHelp.setHelp(container, "org.eclipse.update.ui.SiteBookmarkPropertyPage");
- return container;
- }
-
- public boolean performOk() {
- if (changed) {
- SiteBookmark site = (SiteBookmark) getElement();
- site.setName(siteName.getText());
-
- if (urlChanged) {
-
- try {
- URL url = new URL(siteURL.getText());
- site.setURL(url);
- } catch (MalformedURLException e) {
- }
- }
- if (typeChanged) {
- site.setWebBookmark(webButton.getSelection());
- }
- }
- return true;
- }
-
- public void performDefaults() {
- doInitialize();
- super.performDefaults();
- }
-
- private void doInitialize() {
- SiteBookmark site = (SiteBookmark) getElement();
- siteName.setText(site.getName());
- siteURL.setText(site.getURL().toString());
- siteName.setEnabled(site.getType() != SiteBookmark.LOCAL);
- siteURL.setEnabled(site.getType() == SiteBookmark.USER);
- updateButton.setSelection(site.isWebBookmark()==false);
- updateButton.setEnabled(siteURL.isEnabled());
- webButton.setSelection(site.isWebBookmark());
- webButton.setEnabled(updateButton.isEnabled());
- }
-
- private void initializeFields() {
- doInitialize();
-
- siteName.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- checkFields();
- }
- });
- siteURL.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- urlChanged = true;
- checkFields();
- }
- });
- updateButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- typeChanged = true;
- checkFields();
- }
- });
- webButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- typeChanged = true;
- checkFields();
- }
- });
- }
-
- private void checkFields() {
- boolean valid = true;
- if (siteName.getText().length() == 0)
- valid = false;
- try {
- new URL(siteURL.getText());
- } catch (MalformedURLException e) {
- valid = false;
- }
- setValid(valid);
- changed = true;
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/properties/SiteBookmarkPropertySource.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/properties/SiteBookmarkPropertySource.java
deleted file mode 100644
index 8e79961..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/properties/SiteBookmarkPropertySource.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.properties;
-import java.net.*;
-
-import org.eclipse.ui.views.properties.*;
-import org.eclipse.update.internal.ui.UpdateUI;
-import org.eclipse.update.internal.ui.model.SiteBookmark;
-
-public class SiteBookmarkPropertySource implements IPropertySource {
- private static final String KEY_URL_LABEL =
- "SiteBookmarkPropertySource.url.label";
- private static final String KEY_URL_DESC =
- "SiteBookmarkPropertySource.url.desc";
- private static final String KEY_NAME_LABEL =
- "SiteBookmarkPropertySource.name.label";
- private static final String KEY_NAME_DESC =
- "SiteBookmarkPropertySource.name.desc";
-
- private SiteBookmark bookmark;
-
- public SiteBookmarkPropertySource(SiteBookmark bookmark) {
- this.bookmark = bookmark;
- }
- /**
- * @see IPropertySource#getEditableValue()
- */
- public Object getEditableValue() {
- return null;
- }
-
- /**
- * @see IPropertySource#getPropertyDescriptors()
- */
- public IPropertyDescriptor[] getPropertyDescriptors() {
- IPropertyDescriptor[] descriptors = new IPropertyDescriptor[2];
- PropertyDescriptor desc;
- if (bookmark.getType() != SiteBookmark.LOCAL)
- desc =
- new TextPropertyDescriptor(
- SiteBookmark.P_URL,
- UpdateUI.getString(KEY_URL_LABEL));
- else
- desc =
- new PropertyDescriptor(
- SiteBookmark.P_URL,
- UpdateUI.getString(KEY_URL_LABEL));
- desc.setDescription(UpdateUI.getString(KEY_URL_DESC));
- descriptors[0] = desc;
-
- if (bookmark.getType() == SiteBookmark.USER)
- desc =
- new TextPropertyDescriptor(
- SiteBookmark.P_NAME,
- UpdateUI.getString(KEY_NAME_LABEL));
- else
- desc =
- new PropertyDescriptor(
- SiteBookmark.P_NAME,
- UpdateUI.getString(KEY_NAME_LABEL));
- desc.setDescription(UpdateUI.getString(KEY_NAME_DESC));
- descriptors[1] = desc;
- return descriptors;
- }
-
- /**
- * @see IPropertySource#getPropertyValue(Object)
- */
- public Object getPropertyValue(Object property) {
- if (property.equals(SiteBookmark.P_NAME))
- return bookmark.getName();
- if (property.equals(SiteBookmark.P_URL))
- return bookmark.getURL().toString();
- return "";
- }
-
- /**
- * @see IPropertySource#isPropertySet(Object)
- */
- public boolean isPropertySet(Object arg0) {
- return false;
- }
-
- /**
- * @see IPropertySource#resetPropertyValue(Object)
- */
- public void resetPropertyValue(Object arg0) {
- }
-
- /**
- * @see IPropertySource#setPropertyValue(Object, Object)
- */
- public void setPropertyValue(Object property, Object value) {
- if (property.equals(SiteBookmark.P_NAME))
- bookmark.setName(value.toString());
- if (property.equals(SiteBookmark.P_URL)) {
- try {
- URL url = new URL(value.toString());
- bookmark.setURL(url);
- } catch (MalformedURLException e) {
- }
- }
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/BackgroundProgressMonitor.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/BackgroundProgressMonitor.java
deleted file mode 100644
index 91f89ae..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/BackgroundProgressMonitor.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.search;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-
-import java.io.Serializable;
-import java.util.*;
-import org.eclipse.swt.widgets.Display;
-
-public class BackgroundProgressMonitor implements IProgressMonitor, Serializable {
- private Vector monitors;
- private transient boolean canceled;
- private transient String taskName;
- private transient String subTaskName;
- private transient double totalWorked=0.0;
- private transient int taskCount;
- private transient boolean inProgress;
- private transient Display display;
-
- public BackgroundProgressMonitor() {
- monitors =new Vector();
- }
-
- public void setDisplay(Display display) {
- this.display = display;
- }
-
- public Display getDisplay() {
- return display;
- }
-
- public void addProgressMonitor(final IProgressMonitor monitor) {
- if (monitors.contains(monitor)==false) {
- monitors.add(monitor);
- if (inProgress && display!=null) {
- display.asyncExec(new Runnable() {
- public void run() {
- // we are late - catch up
- monitor.beginTask(taskName, taskCount);
- monitor.internalWorked(totalWorked);
- if (subTaskName!=null)
- monitor.subTask(subTaskName);
- }
- });
- }
- }
- }
-
- public IProgressMonitor [] getProgressMonitors() {
- synchronized (monitors) {
- return (IProgressMonitor [])monitors.toArray(new IProgressMonitor[monitors.size()]);
- }
- }
-
- public void removeProgressMonitor(IProgressMonitor monitor) {
- if (monitors.contains(monitor))
- monitors.remove(monitor);
- }
-
- /**
- * @see IProgressMonitor#beginTask(String, int)
- */
- public void beginTask(final String taskName, final int count) {
- totalWorked = 0.0;
- taskCount = count;
- this.taskName = taskName;
- subTaskName = null;
- canceled = false;
- inProgress = true;
- display.asyncExec(new Runnable() {
- public void run() {
- for (Iterator iter=monitors.iterator(); iter.hasNext();) {
- IProgressMonitor m = (IProgressMonitor)iter.next();
- m.beginTask(taskName, count);
- }
- }
- });
- }
-
-
- /**
- * @see IProgressMonitor#done()
- */
- public void done() {
- if (inProgress==false) return;
- else inProgress = false;
- totalWorked = 0.0;
- final Vector safeMonitors = (Vector)monitors.clone();
- display.asyncExec(new Runnable() {
- public void run() {
- for (Iterator iter=safeMonitors.iterator(); iter.hasNext();) {
- IProgressMonitor m = (IProgressMonitor)iter.next();
- m.done();
- }
- }
- });
- }
-
-
- /**
- * @see IProgressMonitor#isCanceled()
- */
- public boolean isCanceled() {
- return canceled;
- }
-
-
- /**
- * @see IProgressMonitor#setCanceled(boolean)
- */
- public void setCanceled(final boolean canceled) {
- display.asyncExec(new Runnable() {
- public void run() {
- for (Iterator iter=monitors.iterator(); iter.hasNext();) {
- IProgressMonitor m = (IProgressMonitor)iter.next();
- m.setCanceled(canceled);
- }
- BackgroundProgressMonitor.this.canceled = canceled;
- }
- });
- }
-
-
- /**
- * @see IProgressMonitor#setTaskName(String)
- */
- public void setTaskName(final String name) {
- display.asyncExec(new Runnable() {
- public void run() {
- for (Iterator iter=monitors.iterator(); iter.hasNext();) {
- IProgressMonitor m = (IProgressMonitor)iter.next();
- m.setTaskName(name);
- }
- BackgroundProgressMonitor.this.taskName = name;
- }
- });
- }
-
-
- /**
- * @see IProgressMonitor#subTask(String)
- */
- public void subTask(final String name) {
- subTaskName = name;
- display.asyncExec(new Runnable() {
- public void run() {
- for (Iterator iter=monitors.iterator(); iter.hasNext();) {
- IProgressMonitor m = (IProgressMonitor)iter.next();
- m.subTask(name);
- }
- }
- });
- }
-
- /**
- * @see IProgressMonitor#internalWorked(double)
- */
- public void internalWorked(final double amount) {
- totalWorked += amount;
- display.asyncExec(new Runnable() {
- public void run() {
- for (Iterator iter=monitors.iterator(); iter.hasNext();) {
- IProgressMonitor m = (IProgressMonitor)iter.next();
- m.internalWorked(amount);
- }
- }
- });
- }
-
- /**
- * @see IProgressMonitor#worked(int)
- */
- public void worked(final int amount) {
- internalWorked(amount);
- }
-}
-
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/BackgroundThread.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/BackgroundThread.java
deleted file mode 100644
index e2b72f1..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/BackgroundThread.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.search;
-
-import org.eclipse.jface.operation.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.update.internal.ui.UpdateUI;
-
-import java.lang.reflect.InvocationTargetException;
-import org.eclipse.jface.util.Assert;
-
-public class BackgroundThread extends Thread {
- /**
- * The operation to be run.
- */
- private IRunnableWithProgress runnable;
-
- /**
- * The exception thrown by the operation starter.
- */
- private Throwable throwable;
-
- /**
- * The progress monitor used for progress and cancelation.
- */
- private IProgressMonitor progressMonitor;
-
- /**
- * The display used for event dispatching.
- */
- private Display display;
-
- /**
- * Indicates whether to continue event queue dispatching.
- */
- private volatile boolean continueEventDispatching = true;
-
- public BackgroundThread(IRunnableWithProgress operation, IProgressMonitor monitor, Display display) {
- super("BackgroundThread"); //$NON-NLS-1$
- Assert.isTrue(monitor != null && display != null);
- runnable = operation;
- this.progressMonitor = monitor;
- this.display = display;
- }
- /* (non-Javadoc)
- * Method declared on Thread.
- */
- public void run() {
- try {
- if (runnable != null)
- runnable.run(progressMonitor);
- } catch (InvocationTargetException e) {
- throwable= e;
- } catch (InterruptedException e) {
- throwable= e;
- } catch (RuntimeException e) {
- //throwable= e;
- throw e;
- } catch (ThreadDeath e) {
- // Make sure to propagate ThreadDeath, or threads will never fully terminate
- throw e;
- } catch (Error e) {
- throwable= e;
- } finally {
- // Make sure that all events in the asynchronous event queue
- // are dispatched.
- display.syncExec(new Runnable() {
- public void run() {
- // do nothing
- }
- });
-
- // Stop event dispatching
- continueEventDispatching= false;
-
- // Force the event loop to return from sleep () so that
- // it stops event dispatching.
- display.asyncExec(null);
- if (throwable!=null) {
- display.asyncExec(new Runnable() {
- public void run() {
- UpdateUI.logException(throwable);
- }
- });
- }
- }
- }
- public Throwable getThrowable() {
- return throwable;
- }
-}
-
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/DefaultUpdatesSearchObject.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/DefaultUpdatesSearchObject.java
deleted file mode 100644
index 6e9b1bb..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/DefaultUpdatesSearchObject.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.search;
-
-import org.eclipse.update.internal.ui.UpdateUI;
-import org.eclipse.jface.dialogs.IDialogSettings;
-
-public class DefaultUpdatesSearchObject extends SearchObject {
- private static final String KEY_NAME = "AvailableUpdates.name";
- private static final String SECTION_ID = "defaultUpdateSearch";
-
- public DefaultUpdatesSearchObject() {
- super(
- UpdateUI.getString(KEY_NAME),
- SearchCategoryRegistryReader.getDefault().getDescriptor(
- "org.eclipse.update.ui.updates"),
- true);
- setModel(UpdateUI.getDefault().getUpdateModel());
- }
- private IDialogSettings getSection() {
- IDialogSettings master = UpdateUI.getDefault().getDialogSettings();
- IDialogSettings section = master.getSection(SECTION_ID);
- if (section == null) {
- section = master.addNewSection(SECTION_ID);
- }
- return section;
- }
- public boolean getSearchMyComputer() {
- return getSection().getBoolean(S_MY_COMPUTER);
- }
-
- public void setSearchMyComputer(boolean value) {
- getSection().put(S_MY_COMPUTER, value);
- }
-
- public void setSearchBookmarks(boolean value) {
- getSection().put(S_BOOKMARKS, value);
- }
- public boolean getSearchBookmarks() {
- return getSection().getBoolean(S_BOOKMARKS);
- }
-
- public void setSearchDiscovery(boolean value) {
- getSection().put(S_DISCOVERY, value);
- }
- public boolean getSearchDiscovery() {
- return getSection().getBoolean(S_DISCOVERY);
- }
- public String getDriveSettings() {
- return getSection().get(S_DRIVES);
- }
- public void setDriveSettings(String drives) {
- getSection().put(S_DRIVES, drives);
- }
-}
\ No newline at end of file
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/DriveSearchSettings.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/DriveSearchSettings.java
deleted file mode 100644
index e9db9df..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/DriveSearchSettings.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.search;
-
-/**
- * @version 1.0
- * @author
- */
-public class DriveSearchSettings {
-public static final int DISABLED = 0;
-public static final int DEEP = - 1;
-public static final int SHALLOW = -2;
-public static final int CUSTOM = -3;
-
- private String name;
- private boolean checked = false;
- private int searchDepth = DEEP;
- private int numberOfLevels = Integer.MAX_VALUE;
-
- public DriveSearchSettings() {
- }
-
- public DriveSearchSettings(String name) {
- this.name = name;
- }
-
- /**
- * Gets the name.
- * @return Returns a String
- */
- public String getName() {
- return name;
- }
-
- /**
- * Sets the name.
- * @param name The name to set
- */
- public void setName(String name) {
- this.name = name;
- }
-
- /**
- * Gets the checked.
- * @return Returns a boolean
- */
- public boolean isChecked() {
- return checked;
- }
-
- /**
- * Sets the checked.
- * @param checked The checked to set
- */
- public void setChecked(boolean checked) {
- this.checked = checked;
- }
-
- /**
- * Gets the searchDepth.
- * @return Returns a int
- */
- public int getSearchDepth() {
- return searchDepth;
- }
-
- /**
- * Sets the searchDepth.
- * @param searchDepth The searchDepth to set
- */
- public void setSearchDepth(int searchDepth) {
- this.searchDepth = searchDepth;
- }
-
- /**
- * Gets the numberOfLevels.
- * @return Returns a int
- */
- public int getNumberOfLevels() {
- return numberOfLevels;
- }
-
- /**
- * Sets the numberOfLevels.
- * @param numberOfLevels The numberOfLevels to set
- */
- public void setNumberOfLevels(int numberOfLevels) {
- this.numberOfLevels = numberOfLevels;
- }
-
- void load(String value) {
- int loc = value.indexOf(',');
- name = value.substring(0, loc);
- checked = true;
- String depth = value.substring(loc+1);
- int idepth = DEEP;
-
- try {
- idepth = Integer.parseInt(depth);
- if (idepth>0) {
- searchDepth = CUSTOM;
- numberOfLevels = idepth;
- }
- else if (idepth<0) {
- searchDepth = idepth;
- }
- else checked = false;
- }
- catch (NumberFormatException e) {
- }
- }
-
- String encode() {
- int idepth=DISABLED;
-
- if (checked)
- idepth = searchDepth == CUSTOM ? numberOfLevels:searchDepth;
- String result = name + ","+idepth;
- return result;
- }
-
- public String toString() {
- return getName();
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/ExpressionSearchCategory.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/ExpressionSearchCategory.java
deleted file mode 100644
index 122b386..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/ExpressionSearchCategory.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.search;
-
-import java.util.ArrayList;
-import java.util.Map;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.update.core.IFeature;
-import org.eclipse.update.core.IFeatureReference;
-import org.eclipse.update.core.ISite;
-import org.eclipse.update.internal.ui.UpdateUI;
-import org.eclipse.update.internal.ui.model.ISiteAdapter;
-import org.eclipse.update.ui.forms.internal.FormWidgetFactory;
-
-public class ExpressionSearchCategory extends SearchCategory {
- private static final String KEY_EXPRESSION = "ExpressionSearchCategory.expression";
- private static final String KEY_CASE = "ExpressionSearchCategory.case";
- private static final String KEY_LOOK = "ExpressionSearchCategory.look";
- private static final String KEY_NAME = "ExpressionSearchCategory.name";
- private static final String KEY_PROVIDER = "ExpressionSearchCategory.provider";
- private static final String KEY_DESCRIPTION = "ExpressionSearchCategory.description";
-
- private Text expressionText;
- private Button caseCheck;
- private Button nameCheck;
- private Button providerCheck;
- private Button descriptionCheck;
- private boolean caseSensitive = false;
- private boolean searchName = true;
- private boolean searchProvider = false;
- private boolean searchDesc = false;
- private String expression="";
- private String noCaseExpression;
-
- public ExpressionSearchCategory() {
- }
-
- public void createControl(Composite parent, FormWidgetFactory factory) {
- Composite container = factory.createComposite(parent);
- GridLayout layout = new GridLayout();
- layout.marginWidth = 2;
- layout.numColumns = 2;
- container.setLayout(layout);
- factory.createLabel(container, UpdateUI.getString(KEY_EXPRESSION));
- expressionText = factory.createText(container, "");
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- expressionText.setLayoutData(gd);
- caseCheck = factory.createButton(container, UpdateUI.getString(KEY_CASE), SWT.CHECK);
- fillHorizontal(caseCheck, 0);
- Label label = factory.createLabel(container, UpdateUI.getString(KEY_LOOK));
- fillHorizontal(label, 0);
- nameCheck = factory.createButton(container, UpdateUI.getString(KEY_NAME), SWT.CHECK);
- fillHorizontal(nameCheck, 10);
- providerCheck = factory.createButton(container, UpdateUI.getString(KEY_PROVIDER), SWT.CHECK);
- fillHorizontal(providerCheck, 10);
- descriptionCheck = factory.createButton(container, UpdateUI.getString(KEY_DESCRIPTION), SWT.CHECK);
- fillHorizontal(descriptionCheck, 10);
- factory.paintBordersFor(container);
- initializeWidgets(false);
- setControl(container);
- }
- private void fillHorizontal(Control control, int indent) {
- GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- gd.horizontalSpan = 2;
- gd.horizontalIndent = indent;
- control.setLayoutData(gd);
- }
-
- /**
- * @see ISearchCategory#matches(IFeature)
- */
- public ISearchQuery [] getQueries() {
- storeSettingsFromWidgets();
- ISearchQuery query = new ISearchQuery() {
- public ISiteAdapter getSearchSite() {
- return null;
- }
- public IFeature [] getMatchingFeatures(ISite site, IProgressMonitor monitor) {
- ArrayList result = new ArrayList();
- ArrayList candidates = getCandidates(site, monitor);
- for (int i=0; i<candidates.size(); i++) {
- if (internalMatches((IFeature)candidates.get(i)))
- result.add(candidates.get(i));
- }
- return (IFeature[])result.toArray(new IFeature[result.size()]);
- }
- };
- return new ISearchQuery [] { query };
- }
-
- private ArrayList getCandidates(ISite site, IProgressMonitor monitor) {
- IFeatureReference [] references = site.getFeatureReferences();
- ArrayList result = new ArrayList();
- monitor.beginTask("", references.length);
- for (int i=0; i<references.length; i++) {
- try {
- IFeature feature = references[i].getFeature(new SubProgressMonitor(monitor, 1));
- result.add(feature);
- }
- catch (CoreException e) {
- }
- }
- monitor.done();
- return result;
- }
-
- private void storeSettingsFromWidgets() {
- caseSensitive = caseCheck.getSelection();
- searchName = nameCheck.getSelection();
- searchProvider = providerCheck.getSelection();
- searchDesc = descriptionCheck.getSelection();
- expression = expressionText.getText().trim();
- noCaseExpression = expression.toLowerCase();
- }
- private void initializeWidgets(boolean editable) {
- caseCheck.setSelection(caseSensitive);
- nameCheck.setSelection(searchName);
- providerCheck.setSelection(searchProvider);
- descriptionCheck.setSelection(searchDesc);
- expressionText.setText(expression);
-
- caseCheck.setEnabled(editable);
- nameCheck.setEnabled(editable);
- providerCheck.setEnabled(editable);
- descriptionCheck.setEnabled(editable);
- expressionText.setEnabled(editable);
- }
-
- public String getCurrentSearch() {
- return "\""+expressionText.getText()+"\"";
- }
- private boolean internalMatches(IFeature feature) {
- if (searchName) {
- if (matches(feature.getLabel())) return true;
- }
- if (searchProvider) {
- if (matches(feature.getProvider())) return true;
- }
- if (searchDesc) {
- String annotation = null;
- if (feature.getDescription()!=null)
- annotation = feature.getDescription().getAnnotation();
- if (annotation!=null) {
- if (matches(annotation)) return true;
- }
- }
- return false;
- }
- private boolean matches(String text) {
- if (!caseSensitive) {
- String noCaseText = text.toLowerCase();
- return noCaseText.indexOf(noCaseExpression)!= -1;
- }
- return text.indexOf(expression)!= -1;
- }
- public void load(Map map, boolean editable) {
- caseSensitive = getBoolean("case", map);
- searchName = getBoolean("name", map);
- searchProvider = getBoolean("provider", map);
- searchDesc = getBoolean("desc", map);
- expression = getString("expression", map);
- if (caseCheck!=null)
- initializeWidgets(editable);
- }
-
- public void store(Map map) {
- storeSettingsFromWidgets();
- map.put("case", caseSensitive?"true":"false");
- map.put("name", searchName?"true":"false");
- map.put("provider", searchProvider?"true":"false");
- map.put("desc", searchDesc?"true":"false");
- map.put("expression", expression);
- }
-}
\ No newline at end of file
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/ISearchCategory.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/ISearchCategory.java
deleted file mode 100644
index 54de55b..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/ISearchCategory.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.search;
-
-import org.eclipse.swt.widgets.*;
-import org.eclipse.update.ui.forms.internal.FormWidgetFactory;
-import java.util.Map;
-
-public interface ISearchCategory {
-/**
- * Returns the unique identifier of this search category.
- */
- public String getId();
-/**
- * Accepts the identifier assigned to this category during
- * the registry reading.
- */
- public void setId(String id);
-/**
- * Returns an array of queries that need to be executed
- * when search of this category is initiated.
- */
- public ISearchQuery [] getQueries();
-/**
- * Creates a control that contains widgets users can use to
- * customize category settings.
- */
- public void createControl(Composite parent, FormWidgetFactory factory);
-/**
- * Returns the control that hosts widgets users can use to
- * customize category settings.
- */
- public Control getControl();
-/**
- * Returns a textual representation of the current search. This
- * text will be used in the UI
- */
- public String getCurrentSearch();
-/**
- * Load the category settings from the provided object.
- */
- public void load(Map settings, boolean editable);
-/**
- * Save the category settings into the provided object.
- */
- public void store(Map settings);
-}
\ No newline at end of file
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/ISearchObjectAdapter.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/ISearchObjectAdapter.java
deleted file mode 100644
index ed85701..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/ISearchObjectAdapter.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.search;
-
-public interface ISearchObjectAdapter {
- void setSearchObject(SearchObject sobj);
- SearchObject getSearchObject();
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/ISearchQuery.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/ISearchQuery.java
deleted file mode 100644
index 568a117..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/ISearchQuery.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.search;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.update.core.IFeature;
-import org.eclipse.update.core.ISite;
-import org.eclipse.update.internal.ui.model.ISiteAdapter;
-
-public interface ISearchQuery {
-/**
- * Returns a URL of an explicit site that needs to
- * be used for this query. This site is searched first.
- * In addition, local file system and bookmarked sites
- * can be searched as well if selected in search options.
- * @return a url of a site that needs to be searched for
- * this query or <samp>null</samp> if a general scan
- * should be used.
- */
- public ISiteAdapter getSearchSite();
-
-/**
- * Returns an array of features that match the search query
- * using the provided site as a source.
- */
- public IFeature [] getMatchingFeatures(ISite site, IProgressMonitor monitor);
-}
\ No newline at end of file
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/MyComputerSearchDialog.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/MyComputerSearchDialog.java
deleted file mode 100644
index e90cb1b..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/MyComputerSearchDialog.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.search;
-
-import java.util.*;
-
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.update.configuration.*;
-import org.eclipse.update.internal.ui.UpdateUI;
-import org.eclipse.update.internal.ui.parts.*;
-import org.eclipse.jface.dialogs.Dialog;
-
-/**
- * @version 1.0
- * @author
- */
-public class MyComputerSearchDialog extends Dialog {
- private static final String KEY_LABEL = "MyComputerSearchDialog.label";
- private MyComputerSearchSettings settings;
- private Button okButton;
- private VolumeLabelProvider volumeLabelProvider;
- private CheckboxTableViewer viewer;
- private boolean loaded = false;
- private SearchObject search;
- private Hashtable driveMap = new Hashtable();
-
- class DriveContentProvider
- extends DefaultContentProvider
- implements IStructuredContentProvider {
- public Object[] getElements(Object input) {
- if (!loaded)
- initializeDrives();
- return settings.getDriveSettings();
- }
- }
-
- class DriveLabelProvider extends LabelProvider {
- public String getText(Object obj) {
- IVolume volume = (IVolume)driveMap.get(obj);
- if (volume!=null) return volumeLabelProvider.getText(volume);
- return ((DriveSearchSettings) obj).getName();
- }
- public Image getImage(Object obj) {
- IVolume volume = (IVolume)driveMap.get(obj);
- return volumeLabelProvider.getImage(volume);
- }
- }
-
- /**
- * Constructor for MyComputerSearchDialog.
- * @param parentShell
- */
- public MyComputerSearchDialog(Shell parentShell, SearchObject search) {
- super(parentShell);
- settings = new MyComputerSearchSettings(search);
- volumeLabelProvider = new VolumeLabelProvider();
- }
-
- public boolean close() {
- boolean value = super.close();
- volumeLabelProvider.dispose();
- return value;
- }
-
- public void buttonPressed(int id) {
- if (id == IDialogConstants.OK_ID) {
- storeSettings();
- }
- super.buttonPressed(id);
- }
-
- protected void createButtonsForButtonBar(Composite parent) {
- // create OK and Cancel buttons by default
- okButton =
- createButton(
- parent,
- IDialogConstants.OK_ID,
- IDialogConstants.OK_LABEL,
- true);
- createButton(
- parent,
- IDialogConstants.CANCEL_ID,
- IDialogConstants.CANCEL_LABEL,
- false);
- }
-
- public Control createDialogArea(Composite parent) {
- Composite container = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- layout.marginHeight = 10;
- layout.marginWidth = 10;
- container.setLayout(layout);
- container.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- Label label = new Label(container, SWT.NULL);
- label.setText(UpdateUI.getString(KEY_LABEL));
-
- viewer = CheckboxTableViewer.newCheckList(container, SWT.BORDER);
- viewer.setContentProvider(new DriveContentProvider());
- viewer.setLabelProvider(new DriveLabelProvider());
- viewer.addCheckStateListener(new ICheckStateListener() {
- public void checkStateChanged(CheckStateChangedEvent event) {
- handleDriveChecked(
- (DriveSearchSettings) event.getElement(),
- event.getChecked());
- }
- });
- viewer.setInput(UpdateUI.getDefault());
- GridData gd = new GridData(GridData.FILL_BOTH);
- gd.widthHint = 200;
- gd.heightHint = 300;
- viewer.getTable().setLayoutData(gd);
- loadSettings();
- WorkbenchHelp.setHelp(container, "org.eclipse.update.ui.MyComputerSearchDialog");
- return container;
- }
-
- private void loadSettings() {
- Vector selected = new Vector();
- DriveSearchSettings[] drives = settings.getDriveSettings();
- for (int i = 0; i < drives.length; i++) {
- if (drives[i].isChecked())
- selected.add(drives[i]);
- }
- viewer.setCheckedElements(selected.toArray());
- }
-
- private void initializeDrives() {
- IVolume[] volumes = LocalSystemInfo.getVolumes();
- for (int i = 0; i < volumes.length; i++) {
- // Ensure settings exists
- String label = volumes[i].getLabel();
- if (label == null || "".equals(label))
- label = volumes[i].getFile().getPath();
- else
- label = label + " (" + volumes[i].getFile().getPath() + ")";
- DriveSearchSettings drive = settings.getDriveSettings(label);
- driveMap.put(drive, volumes[i]);
- }
- }
-
- private void handleDriveChecked(
- DriveSearchSettings drive,
- boolean checked) {
- drive.setChecked(checked);
- }
-
- private void storeSettings() {
- settings.store();
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/MyComputerSearchSettings.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/MyComputerSearchSettings.java
deleted file mode 100644
index 221bdd8..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/MyComputerSearchSettings.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.search;
-
-import java.io.File;
-import java.util.*;
-/**
- * @version 1.0
- * @author
- */
-public class MyComputerSearchSettings {
- private static final String SECTION = "myComputerSearchSettings";
- SearchObject search;
- private Vector drives = new Vector();
- private boolean masterSettings=false;
-
- public boolean isMyComputerSearched() {
- return false;
- }
-
- public MyComputerSearchSettings(SearchObject search) {
- this.search = search;
- load();
- }
-
- public DriveSearchSettings[] getDriveSettings() {
- return (DriveSearchSettings[]) drives.toArray(
- new DriveSearchSettings[drives.size()]);
- }
-
- public DriveSearchSettings getDriveSettings(String driveName) {
- for (int i = 0; i < drives.size(); i++) {
- DriveSearchSettings drive = (DriveSearchSettings) drives.get(i);
- if (drive.getName().equalsIgnoreCase(driveName)) {
- return drive;
- }
- }
- DriveSearchSettings drive = new DriveSearchSettings(driveName);
- drives.add(drive);
- return drive;
- }
-
- private void load() {
- String drivesString = search.getDriveSettings();
- if (drivesString != null) {
- StringTokenizer stok = new StringTokenizer(drivesString, File.pathSeparator);
- while (stok.hasMoreTokens()) {
- String driveString = stok.nextToken();
- DriveSearchSettings drive = new DriveSearchSettings();
- drive.load(driveString);
- drives.add(drive);
- }
- }
- }
-
- public void store() {
- StringBuffer buf = new StringBuffer();
- for (int i = 0; i < drives.size(); i++) {
- DriveSearchSettings drive = (DriveSearchSettings) drives.get(i);
- buf.append(drive.encode());
- buf.append(File.pathSeparator);
- }
- search.setDriveSettings(buf.toString());
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/NewPluginEntryDialog.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/NewPluginEntryDialog.java
deleted file mode 100644
index e27fd5e..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/NewPluginEntryDialog.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.search;
-
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.update.core.Import;
-import org.eclipse.update.internal.ui.UpdateUI;
-
-/**
- * @author dejan
- *
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates.
- * To enable and disable the creation of type comments go to
- * Window>Preferences>Java>Code Generation.
- */
-public class NewPluginEntryDialog extends Dialog {
- private Text idText;
- private Text versionText;
- private Import iimport;
-
- public NewPluginEntryDialog(Shell shell) {
- super(shell);
- }
-
- protected Control createDialogArea(Composite parent) {
- Composite container = new Composite(parent, SWT.NULL);
- GridData gd = new GridData(GridData.FILL_BOTH);
- container.setLayoutData(gd);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- container.setLayout(layout);
-
- Label label = new Label(container, SWT.NULL);
- label.setText(UpdateUI.getString("NewPluginEntryDialog.id")); //$NON-NLS-1$
-
- idText = new Text(container, SWT.SINGLE | SWT.BORDER);
- gd = new GridData(GridData.FILL_HORIZONTAL);
- idText.setLayoutData(gd);
- idText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- dialogChanged();
- }
- });
-
- label = new Label(container, SWT.NULL);
- label.setText(UpdateUI.getString("NewPluginEntryDialog.version")); //$NON-NLS-1$
-
- versionText = new Text(container, SWT.SINGLE | SWT.BORDER);
- gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.widthHint = 200;
- versionText.setLayoutData(gd);
- WorkbenchHelp.setHelp(container, "org.eclipse.update.ui.NewPluginEntryDialog");
- return container;
- }
-
- public void create() {
- super.create();
- dialogChanged();
- }
-
- private void dialogChanged() {
- getButton(IDialogConstants.OK_ID).setEnabled(idText.getText().length()>0);
- }
-
- protected void okPressed() {
- iimport = new Import();
- iimport.setIdentifier(idText.getText());
- iimport.setVersion(versionText.getText());
- super.okPressed();
- }
- public Import getImport() {
- return iimport;
- }
-}
-
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/PluginsSearchCategory.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/PluginsSearchCategory.java
deleted file mode 100644
index 4040f09..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/PluginsSearchCategory.java
+++ /dev/null
@@ -1,268 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.search;
-
-import java.util.*;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.update.core.*;
-import org.eclipse.update.internal.ui.UpdateUI;
-import org.eclipse.update.internal.ui.model.ISiteAdapter;
-import org.eclipse.update.internal.ui.parts.DefaultContentProvider;
-import org.eclipse.update.ui.forms.internal.FormWidgetFactory;
-
-public class PluginsSearchCategory extends SearchCategory {
- private static final String KEY_NEW = "PluginSearchCategory.new";
- private static final String KEY_NEW_TITLE =
- "PluginSearchCategory.new.title";
- private static final String KEY_DELETE = "PluginSearchCategory.delete";
- private ArrayList imports;
- private TableViewer tableViewer;
- private Button newButton;
- private Button deleteButton;
-
- class ImportContentProvider
- extends DefaultContentProvider
- implements IStructuredContentProvider {
- public Object[] getElements(Object parent) {
- if (imports == null)
- return new Object[0];
- return imports.toArray();
- }
- }
-
- class ImportLabelProvider extends LabelProvider {
- public String getText(Object obj) {
- if (obj instanceof IImport) {
- IImport iimport = (IImport) obj;
- return iimport.getVersionedIdentifier().toString();
- }
- return obj.toString();
- }
- }
-
- public PluginsSearchCategory() {
- }
-
- public void initialize() {
- if (imports == null)
- imports = new ArrayList();
- }
- public ISearchQuery[] getQueries() {
- initialize();
- ISearchQuery query = new ISearchQuery() {
- public ISiteAdapter getSearchSite() {
- return null;
- }
-
- public IFeature[] getMatchingFeatures(
- ISite site,
- IProgressMonitor monitor) {
- ArrayList result = new ArrayList();
- IFeatureReference[] refs = site.getFeatureReferences();
- addMatchingFeatures(refs, result, monitor);
- return (IFeature[]) result.toArray(new IFeature[result.size()]);
- }
- private void addMatchingFeatures(
- IFeatureReference[] refs,
- ArrayList result,
- IProgressMonitor monitor) {
- monitor.beginTask("", refs.length * 2);
-
- for (int i = 0; i < refs.length; i++) {
- try {
- IFeature feature =
- refs[i].getFeature(
- new SubProgressMonitor(monitor, 1));
- if (matches(feature))
- result.add(feature);
- if (monitor.isCanceled())
- break;
- IFeatureReference[] included =
- feature.getIncludedFeatureReferences();
- addMatchingFeatures(
- included,
- result,
- new SubProgressMonitor(monitor, 1));
- } catch (CoreException e) {
- }
- if (monitor.isCanceled())
- break;
- }
- }
-
- private boolean matches(IFeature feature) {
- for (int i = 0; i < imports.size(); i++) {
- IImport iimport = (IImport) imports.get(i);
- if (!contains(feature, iimport))
- return false;
- }
- return true;
- }
- };
- return new ISearchQuery[] { query };
- }
- private boolean contains(IFeature feature, IImport iimport) {
- IPluginEntry[] entries = feature.getPluginEntries();
- VersionedIdentifier importId = iimport.getVersionedIdentifier();
- PluginVersionIdentifier importVersion = importId.getVersion();
- boolean ignoreVersion =
- (importVersion.getMajorComponent() == 0
- && importVersion.getMinorComponent() == 0
- && importVersion.getServiceComponent() == 0);
- for (int i = 0; i < entries.length; i++) {
- IPluginEntry entry = entries[i];
- VersionedIdentifier entryId = entry.getVersionedIdentifier();
- if (ignoreVersion) {
- if (entryId.getIdentifier().equals(importId.getIdentifier()))
- return true;
- } else if (entryId.equals(importId))
- return true;
- }
- return false;
- }
-
- public String getCurrentSearch() {
- return encodeImports(imports);
- }
- public void createControl(Composite parent, FormWidgetFactory factory) {
- Composite container = factory.createComposite(parent);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginWidth = 2;
- layout.marginHeight = 2;
- container.setLayout(layout);
- tableViewer =
- new TableViewer(container, SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL);
- tableViewer.setContentProvider(new ImportContentProvider());
- tableViewer.setLabelProvider(new ImportLabelProvider());
- tableViewer
- .addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent e) {
- PluginsSearchCategory.this.selectionChanged(
- (IStructuredSelection) e.getSelection());
- }
- });
- tableViewer.setInput(this);
- GridData gd = new GridData(GridData.FILL_BOTH);
- gd.heightHint = 100;
- gd.verticalSpan = 2;
- tableViewer.getControl().setLayoutData(gd);
- newButton =
- factory.createButton(
- container,
- UpdateUI.getString(KEY_NEW),
- SWT.PUSH);
- newButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- handleNew();
- }
- });
- gd =
- new GridData(
- GridData.HORIZONTAL_ALIGN_FILL
- | GridData.VERTICAL_ALIGN_BEGINNING);
- newButton.setLayoutData(gd);
- deleteButton =
- factory.createButton(
- container,
- UpdateUI.getString(KEY_DELETE),
- SWT.PUSH);
- deleteButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- handleDelete();
- }
- });
- gd =
- new GridData(
- GridData.HORIZONTAL_ALIGN_FILL
- | GridData.VERTICAL_ALIGN_BEGINNING);
- deleteButton.setLayoutData(gd);
- deleteButton.setEnabled(false);
-
- gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING);
- newButton.setLayoutData(gd);
- factory.paintBordersFor(container);
- setControl(container);
- }
-
- private void handleNew() {
- NewPluginEntryDialog dialog =
- new NewPluginEntryDialog(tableViewer.getControl().getShell());
- dialog.create();
- dialog.getShell().setText(UpdateUI.getString(KEY_NEW_TITLE));
- dialog.getShell().pack();
- if (dialog.open() == NewPluginEntryDialog.OK) {
- if (imports == null)
- imports = new ArrayList();
- imports.add(dialog.getImport());
- tableViewer.refresh();
- }
- }
- private void selectionChanged(IStructuredSelection selection) {
- deleteButton.setEnabled(selection.isEmpty() == false);
- }
- private void handleDelete() {
- IStructuredSelection selection =
- (IStructuredSelection) tableViewer.getSelection();
- for (Iterator iter = selection.iterator(); iter.hasNext();) {
- imports.remove(iter.next());
- }
- tableViewer.refresh();
- }
- public void load(Map map, boolean editable) {
- String key = "imports";
- String value = (String) map.get(key);
- imports = new ArrayList();
- if (value != null)
- decodeImports(value, imports);
- tableViewer.refresh();
- newButton.setEnabled(editable);
- deleteButton.setEnabled(false);
- }
- public void store(Map map) {
- String value = encodeImports(imports);
- map.put("imports", value);
- }
- public static String encodeImports(ArrayList imports) {
- if (imports == null)
- return "";
- StringBuffer buf = new StringBuffer();
- for (int i = 0; i < imports.size(); i++) {
- IImport iimport = (IImport) imports.get(i);
- String entry = iimport.getVersionedIdentifier().toString();
- if (i > 0)
- buf.append(",");
- buf.append(entry);
- }
- return buf.toString();
- }
- public static void decodeImports(String text, ArrayList result) {
- StringTokenizer stok = new StringTokenizer(text, ",");
- while (stok.hasMoreTokens()) {
- String token = stok.nextToken();
- int uloc = token.lastIndexOf('_');
- String id = token.substring(0, uloc);
- String version = token.substring(uloc + 1);
- Import iimport = new Import();
- iimport.setIdentifier(id);
- iimport.setVersion(version);
- result.add(iimport);
- }
- }
-}
\ No newline at end of file
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/SearchCategory.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/SearchCategory.java
deleted file mode 100644
index abf3c55..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/SearchCategory.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.search;
-
-import java.util.Map;
-
-import org.eclipse.swt.widgets.Control;
-
-public abstract class SearchCategory implements ISearchCategory {
- private Control control;
- private String id;
-
- public String getId() {
- return id;
- }
- public void setId(String id) {
- this.id = id;
- }
- public Control getControl() {
- return control;
- }
-
- public void setControl(Control control) {
- this.control = control;
- }
- protected String getString(String key, Map map) {
- Object obj = map.get(key);
- if (obj!=null) return obj.toString();
- return "";
- }
- protected boolean getBoolean(String key, Map map) {
- return getString(key, map).equals("true");
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/SearchCategoryDescriptor.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/SearchCategoryDescriptor.java
deleted file mode 100644
index c17fa6f..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/SearchCategoryDescriptor.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.search;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.update.internal.ui.*;
-import org.eclipse.swt.graphics.Image;
-
-public class SearchCategoryDescriptor {
- private IConfigurationElement config;
- private ISearchCategory category;
- public SearchCategoryDescriptor(IConfigurationElement config) {
- this.config = config;
- }
- public String getId() {
- return config.getAttribute("id");
- }
- public String getName() {
- return config.getAttribute("name");
- }
-
- public ImageDescriptor getImageDescriptor() {
- String imageName = config.getAttribute("icon");
- if (imageName == null)
- return null;
- return UpdateUIImages.getImageDescriptorFromPlugin(
- config.getDeclaringExtension().getDeclaringPluginDescriptor(),
- imageName);
- }
- public Image getImage() {
- String imageName = config.getAttribute("icon");
- if (imageName == null)
- return null;
- return UpdateUIImages.getImageFromPlugin(
- config.getDeclaringExtension().getDeclaringPluginDescriptor(),
- imageName);
- }
- public String getDescription() {
- IConfigurationElement children [] = config.getChildren("description");
- if (children.length==1) {
- return children[0].getValue();
- }
- return "<form></form>";
- }
- public ISearchCategory createCategory() {
- if (category!=null) return category;
- try {
- Object obj = config.createExecutableExtension("class");
- if (obj instanceof ISearchCategory) {
- ISearchCategory category = (ISearchCategory)obj;
- category.setId(getId());
- this.category = category;
- return category;
- }
- } catch (CoreException e) {
- UpdateUI.logException(e);
- }
- return null;
- }
-}
\ No newline at end of file
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/SearchCategoryRegistryReader.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/SearchCategoryRegistryReader.java
deleted file mode 100644
index 57ed35b..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/SearchCategoryRegistryReader.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.search;
-
-import java.util.ArrayList;
-import org.eclipse.core.runtime.*;
-
-public class SearchCategoryRegistryReader {
- private ArrayList descriptors;
-
- static SearchCategoryRegistryReader instance;
-
- SearchCategoryRegistryReader() {
- }
-
- public static SearchCategoryRegistryReader getDefault() {
- if (instance == null)
- instance = new SearchCategoryRegistryReader();
- return instance;
- }
-
- public SearchCategoryDescriptor[] getCategoryDescriptors() {
- if (descriptors == null)
- load();
- return (SearchCategoryDescriptor[]) descriptors.toArray(
- new SearchCategoryDescriptor[descriptors.size()]);
- }
-
- public SearchCategoryDescriptor getDescriptor(String categoryId) {
- if (descriptors == null)
- load();
- for (int i = 0; i < descriptors.size(); i++) {
- SearchCategoryDescriptor desc = (SearchCategoryDescriptor) descriptors.get(i);
- if (desc.getId().equals(categoryId))
- return desc;
- }
- return null;
- }
-
- private void load() {
- descriptors = new ArrayList();
- IPluginRegistry registry = Platform.getPluginRegistry();
- IConfigurationElement[] elements =
- registry.getConfigurationElementsFor("org.eclipse.update.ui.searchCategory");
- for (int i = 0; i < elements.length; i++) {
- IConfigurationElement element = elements[i];
- if (element.getName().equals("search"))
- descriptors.add(new SearchCategoryDescriptor(element));
- }
- }
-}
\ No newline at end of file
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/SearchObject.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/SearchObject.java
deleted file mode 100644
index 7b3e169..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/SearchObject.java
+++ /dev/null
@@ -1,461 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.search;
-
-import java.io.Serializable;
-import java.lang.reflect.InvocationTargetException;
-import java.net.URL;
-import java.util.*;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.update.core.*;
-import org.eclipse.update.internal.core.UpdateManagerUtils;
-import org.eclipse.update.internal.ui.UpdateUI;
-import org.eclipse.update.internal.ui.model.*;
-
-public class SearchObject extends NamedModelObject {
- public static final String P_REFRESH = "p_refresh"; //$NON-NLS-1$
- public static final String P_CATEGORY = "p_category"; //$NON-NLS-1$
-
- private static final String KEY_NAME = "Search.name"; //$NON-NLS-1$
- private static final String KEY_BEGIN = "Search.begin"; //$NON-NLS-1$
- private static final String KEY_MY_COMPUTER = "Search.myComputer"; //$NON-NLS-1$
- private static final String KEY_CONTACTING = "Search.contacting"; //$NON-NLS-1$
- private static final String KEY_CHECKING = "Search.checking"; //$NON-NLS-1$
- protected static final String S_MY_COMPUTER = "searchMyComputer"; //$NON-NLS-1$
- protected static final String S_BOOKMARKS = "searchBookmarks"; //$NON-NLS-1$
- protected static final String S_DISCOVERY = "searchDiscovery"; //$NON-NLS-1$
- protected static final String S_FILTER = "searchFilter"; //$NON-NLS-1$
- protected static final String S_DRIVES = "searchDrives"; //$NON-NLS-1$
-
- transient private Vector result;
- transient private boolean searchInProgress;
- private BackgroundProgressMonitor backgroundProgress;
- transient private BackgroundThread searchThread;
- transient private SiteBookmark[] myComputerSites = null;
- private String categoryId;
- private boolean categoryFixed;
- private Hashtable settings = new Hashtable();
- private boolean persistent = true;
- private boolean instantSearch = false;
-
- class SearchAdapter extends MonitorAdapter implements Serializable {
- public void done() {
- searchInProgress = false;
- }
- }
-
- public SearchObject() {
- this("", null, false); //$NON-NLS-1$
- }
- public SearchObject(String name, SearchCategoryDescriptor descriptor) {
- this(name, descriptor, false);
- }
- public SearchObject(
- String name,
- SearchCategoryDescriptor descriptor,
- boolean categoryFixed) {
- super(name);
- this.categoryId = descriptor.getId();
- this.categoryFixed = categoryFixed;
- backgroundProgress = new BackgroundProgressMonitor();
- backgroundProgress.addProgressMonitor(new SearchAdapter());
- result = new Vector();
- }
-
- public boolean isCategoryFixed() {
- return categoryFixed;
- }
-
- public boolean isPersistent() {
- return persistent;
- }
-
- public void setPersistent(boolean value) {
- this.persistent = value;
- }
-
- public boolean isInstantSearch() {
- return instantSearch;
- }
-
- public void setInstantSearch(boolean value) {
- this.instantSearch = value;
- }
-
- public String getCategoryId() {
- return categoryId;
- }
-
- public void setCategoryId(String id) {
- if (categoryId != null && !categoryId.equals(id)) {
- settings.clear();
- }
- this.categoryId = id;
- notifyObjectChanged(P_CATEGORY);
- }
-
- public void setDisplay(Display display) {
- backgroundProgress.setDisplay(display);
- }
-
- public Hashtable getSettings() {
- return settings;
- }
-
- public boolean getSearchMyComputer() {
- return getBooleanValue(S_MY_COMPUTER);
- }
-
- public void setSearchMyComputer(boolean value) {
- settings.put(S_MY_COMPUTER, value ? "true" : "false"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- public void setSearchBookmarks(boolean value) {
- setBooleanValue(S_BOOKMARKS, value);
- }
- public boolean getSearchBookmarks() {
- return getBooleanValue(S_BOOKMARKS);
- }
-
- public void setSearchDiscovery(boolean value) {
- setBooleanValue(S_DISCOVERY, value);
- }
- public boolean getSearchDiscovery() {
- return getBooleanValue(S_DISCOVERY);
- }
- public String getDriveSettings() {
- return (String) settings.get(S_DRIVES);
- }
- public void setDriveSettings(String drives) {
- settings.put(S_DRIVES, drives);
- }
-
- public void setFilterEnvironment(boolean value) {
- setBooleanValue(S_FILTER, !value);
- }
- public boolean getFilterEnvironment() {
- return !getBooleanValue(S_FILTER);
- }
-
- private boolean getBooleanValue(String key) {
- String value = (String) settings.get(key);
- if (value != null && value.equals("true")) //$NON-NLS-1$
- return true;
- return false;
- }
- private void setBooleanValue(String key, boolean value) {
- settings.put(key, value ? "true" : "false"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * @see IWorkbenchAdapter#getChildren(Object)
- */
- public Object[] getChildren(Object parent) {
- return result.toArray();
- }
-
- public boolean hasChildren() {
- return result.size() > 0;
- }
-
- public void reconnect() {
- IProgressMonitor [] monitors = backgroundProgress.getProgressMonitors();
- for (int i=0; i<monitors.length; i++) {
- IProgressMonitor monitor = monitors[i];
- if (monitor instanceof ISearchObjectAdapter) {
- ((ISearchObjectAdapter)monitor).setSearchObject(this);
- }
- }
- result = new Vector();
- }
-
- public void attachProgressMonitor(IProgressMonitor monitor) {
- backgroundProgress.addProgressMonitor(monitor);
- }
- public void detachProgressMonitor(IProgressMonitor monitor) {
- backgroundProgress.removeProgressMonitor(monitor);
- }
-
- public void startSearch(Display display, ISearchQuery[] queries)
- throws InvocationTargetException, InterruptedException {
- if (searchInProgress)
- return;
- backgroundProgress.setDisplay(display);
- IRunnableWithProgress operation = getSearchOperation(display, queries);
- searchThread =
- new BackgroundThread(operation, backgroundProgress, display);
- searchInProgress = true;
- searchThread.start();
- Throwable throwable = searchThread.getThrowable();
- if (throwable != null) {
- UpdateUI.logException(throwable);
- if (throwable instanceof InvocationTargetException) {
- throw (InvocationTargetException) throwable;
- } else if (throwable instanceof InterruptedException) {
- throw (InterruptedException) throwable;
- } else if (throwable instanceof OperationCanceledException) {
- // See 1GAN3L5: ITPUI:WIN2000 - ModalContext converts OperationCancelException into InvocationTargetException
- throw new InterruptedException(throwable.getMessage());
- } else {
- throw new InvocationTargetException(throwable);
- }
- }
- }
-
- public boolean isSearchInProgress() {
- return searchInProgress;
- }
-
- public void stopSearch() {
- if (!searchInProgress || searchThread == null)
- return;
- backgroundProgress.setCanceled(true);
- }
-
- public IRunnableWithProgress getSearchOperation(
- final Display display,
- final ISearchQuery[] queries) {
- return new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor)
- throws InvocationTargetException {
- try {
- doSearch(display, queries, monitor);
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- }
- }
- };
- }
-
- private void doSearch(
- Display display,
- ISearchQuery[] queries,
- IProgressMonitor monitor)
- throws CoreException {
- result.clear();
- asyncFireObjectChanged(display, this, P_REFRESH);
-
- ArrayList candidates = new ArrayList();
-
- monitor.beginTask(
- UpdateUI.getString(KEY_BEGIN),
- IProgressMonitor.UNKNOWN);
-
- if (getSearchMyComputer()) {
- monitor.setTaskName(
- UpdateUI.getString(KEY_MY_COMPUTER));
- initializeMyComputerSites(monitor);
- }
- ArrayList statusList = new ArrayList();
- if (!monitor.isCanceled()) {
- computeSearchSources(candidates);
- int ntasks = queries.length * (1 + candidates.size());
-
- monitor.beginTask(
- UpdateUI.getString(KEY_BEGIN),
- ntasks);
-
- for (int i = 0; i < queries.length; i++) {
- ISearchQuery query = queries[i];
- ISiteAdapter site = query.getSearchSite();
- if (site != null) {
- SubProgressMonitor subMonitor =
- new SubProgressMonitor(monitor, 1);
- UpdateUI.getString(KEY_CHECKING);
- IStatus status =
- searchOneSite(display, site, query, subMonitor);
- if (status != null)
- statusList.add(status);
- if (monitor.isCanceled())
- break;
- }
- for (int j = 0; j < candidates.size(); j++) {
- if (monitor.isCanceled()) {
- break;
- }
- Object source = candidates.get(j);
- SubProgressMonitor subMonitor =
- new SubProgressMonitor(monitor, 1);
- IStatus status =
- searchOneSite(
- display,
- (ISiteAdapter) source,
- query,
- subMonitor);
- if (status != null)
- statusList.add(status);
- monitor.worked(1);
- }
- if (monitor.isCanceled())
- break;
- }
- }
- searchInProgress = false;
- monitor.done();
- asyncFireObjectChanged(display, this, P_REFRESH);
- if (statusList.size() > 0) {
- IStatus[] children =
- (IStatus[]) statusList.toArray(new IStatus[statusList.size()]);
- MultiStatus multiStatus = new MultiStatus(UpdateUI.getPluginId(), ISite.SITE_ACCESS_EXCEPTION, children, UpdateUI.getString("Search.networkProblems"), //$NON-NLS-1$
- null);
- throw new CoreException(multiStatus);
- }
- }
-
- public void computeSearchSources(ArrayList sources) {
- addMyComputerSites(sources);
- addDiscoverySites(sources);
- addBookmarks(sources);
- }
-
- private IStatus searchOneSite(
- Display display,
- ISiteAdapter siteAdapter,
- ISearchQuery query,
- SubProgressMonitor monitor)
- throws CoreException {
- String text =
- UpdateUI.getFormattedMessage(KEY_CONTACTING, siteAdapter.getLabel());
- monitor.subTask(text);
- URL siteURL = siteAdapter.getURL();
-
- ISite site;
- try {
- site = SiteManager.getSite(siteURL, new SubProgressMonitor(monitor, 1));
- } catch (CoreException e) {
- // Test the exception. If the exception is
- // due to the site connection problems,
- // allow the search to move on to
- // the next site. Otherwise,
- // rethrow the exception, causing the search
- // to terminate.
- IStatus status = e.getStatus();
- if (status == null
- || status.getCode() != ISite.SITE_ACCESS_EXCEPTION)
- throw e;
- monitor.worked(1);
- return status;
- }
- // If frozen connection was canceled, there will be no site.
- if (site==null) return null;
- text = UpdateUI.getFormattedMessage(KEY_CHECKING,
- siteAdapter.getLabel());
- monitor.getWrappedProgressMonitor().subTask(text);
-
- monitor.beginTask("", 2); //$NON-NLS-1$
-
- IFeature[] matches =
- query.getMatchingFeatures(site, new SubProgressMonitor(monitor, 1));
-
- for (int i = 0; i < matches.length; i++) {
- if (monitor.isCanceled())
- return null;
- if (getFilterEnvironment() && !isValidEnvironment(matches[i]))
- continue;
- // bingo - add this
- SearchResultSite searchSite = findResultSite(site);
- if (searchSite == null) {
- searchSite =
- new SearchResultSite(this, siteAdapter.getLabel(), site);
- result.add(searchSite);
- asyncFireObjectAdded(display, this, searchSite);
- }
- SimpleFeatureAdapter featureAdapter =
- new SimpleFeatureAdapter(matches[i]);
- searchSite.addCandidate(featureAdapter);
- asyncFireObjectAdded(display, searchSite, featureAdapter);
- }
- monitor.worked(1);
- return null;
- }
-
- private SearchResultSite findResultSite(ISite site) {
- for (int i = 0; i < result.size(); i++) {
- SearchResultSite resultSite = (SearchResultSite) result.get(i);
- if (resultSite.getSite(null).equals(site))
- return resultSite;
- }
- return null;
- }
-
- private boolean isValidEnvironment(IFeature candidate) {
- return UpdateManagerUtils.isValidEnvironment(candidate);
- }
-
- private void asyncFireObjectAdded(
- Display display,
- final Object parent,
- final Object child) {
- final UpdateModel model = getModel();
- display.asyncExec(new Runnable() {
- public void run() {
- model.fireObjectsAdded(parent, new Object[] { child });
- }
- });
- }
-
- private void asyncFireObjectChanged(
- Display display,
- final Object obj,
- final String property) {
- final UpdateModel model = getModel();
- display.asyncExec(new Runnable() {
- public void run() {
- model.fireObjectChanged(obj, property);
- }
- });
- }
-
- private void initializeMyComputerSites(IProgressMonitor monitor) {
- Vector sites = new Vector();
- MyComputer myComputer = new MyComputer();
- MyComputerSearchSettings settings = new MyComputerSearchSettings(this);
- myComputer.collectSites(sites, settings, monitor);
- if (sites.size() > 0) {
- myComputerSites =
- (SiteBookmark[]) sites.toArray(new SiteBookmark[sites.size()]);
- } else
- myComputerSites = null;
- }
-
- private void addMyComputerSites(ArrayList result) {
- if (myComputerSites != null && getSearchMyComputer()) {
- for (int i = 0; i < myComputerSites.length; i++) {
- result.add(myComputerSites[i]);
- }
- }
- }
- private void addBookmarks(ArrayList result) {
- if (getSearchBookmarks() == false)
- return;
- UpdateModel model = UpdateUI.getDefault().getUpdateModel();
- SiteBookmark[] bookmarks = model.getBookmarkLeafs();
- for (int i = 0; i < bookmarks.length; i++) {
- SiteBookmark bookmark = bookmarks[i];
- result.add(bookmark);
- }
- }
- private void addDiscoverySites(ArrayList result) {
- if (getSearchDiscovery() == false)
- return;
- DiscoveryFolder dfolder = new DiscoveryFolder();
- Object[] children = dfolder.getChildren(dfolder);
- for (int i = 0; i < children.length; i++) {
- SiteBookmark bookmark = (SiteBookmark) children[i];
- result.add(bookmark);
- }
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/SearchResultSite.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/SearchResultSite.java
deleted file mode 100644
index 3d6f7da..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/SearchResultSite.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.search;
-
-import java.net.URL;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-import org.eclipse.update.core.ISite;
-import org.eclipse.update.internal.ui.model.*;
-
-public class SearchResultSite
- extends UIModelObject
- implements IWorkbenchAdapter, ISiteAdapter {
- private ISite site;
- private Vector candidates;
- private String label;
- private SearchObject search;
-
- public Object getAdapter(Class adapter) {
- if (adapter.equals(IWorkbenchAdapter.class)) {
- return this;
- }
- return super.getAdapter(adapter);
- }
-
- public SearchResultSite(SearchObject search, String label, ISite site) {
- this.search = search;
- this.label = label;
- this.site = site;
- candidates = new Vector();
- }
-
- public SearchObject getSearch() {
- return search;
- }
-
- public ISite getSite(IProgressMonitor monitor) {
- return site;
- }
-
- public String getLabel() {
- return label;
- }
-
- public String toString() {
- return getLabel();
- }
-
- /**
- * @see IWorkbenchAdapter#getChildren(Object)
- */
- public Object[] getChildren(Object parent) {
- return candidates.toArray();
- }
- public int getChildCount() {
- return candidates.size();
- }
-
- /**
- * @see IWorkbenchAdapter#getImageDescriptor(Object)
- */
- public ImageDescriptor getImageDescriptor(Object obj) {
- return null;
- }
-
- /**
- * @see IWorkbenchAdapter#getLabel(Object)
- */
- public String getLabel(Object obj) {
- return getLabel();
- }
-
- /**
- * @see IWorkbenchAdapter#getParent(Object)
- */
- public Object getParent(Object arg0) {
- return null;
- }
-
- public void addCandidate(IFeatureAdapter candidate) {
- candidates.add(candidate);
- }
- /**
- * @see ISiteAdapter#getURL()
- */
- public URL getURL() {
- return site.getURL();
- }
-
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/UpdatesSearchCategory.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/UpdatesSearchCategory.java
deleted file mode 100644
index 0f70d9c..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/search/UpdatesSearchCategory.java
+++ /dev/null
@@ -1,656 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.search;
-
-import java.net.URL;
-import java.util.*;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.update.configuration.*;
-import org.eclipse.update.core.*;
-import org.eclipse.update.internal.ui.UpdateUI;
-import org.eclipse.update.internal.ui.forms.ActivityConstraints;
-import org.eclipse.update.internal.ui.model.*;
-import org.eclipse.update.internal.ui.parts.*;
-import org.eclipse.update.internal.ui.preferences.MainPreferencePage;
-import org.eclipse.update.internal.ui.wizards.FeatureHierarchyElement;
-import org.eclipse.update.ui.forms.internal.FormWidgetFactory;
-
-public class UpdatesSearchCategory extends SearchCategory {
- private static final String KEY_CURRENT_SEARCH =
- "UpdatesSearchCategory.currentSearch";
- private CheckboxTableViewer tableViewer;
-
- class Candidate {
- ArrayList children;
- Candidate parent;
- IFeatureReference ref;
- public Candidate(IFeatureReference ref) {
- this.ref = ref;
- }
- public Candidate(IFeatureReference ref, Candidate parent) {
- this(ref);
- this.parent = parent;
- }
- public void add(Candidate child) {
- if (children == null)
- children = new ArrayList();
- child.setParent(this);
- children.add(child);
- }
- public Candidate[] getChildren() {
- if (children == null)
- return new Candidate[0];
- return (Candidate[]) children.toArray(
- new Candidate[children.size()]);
- }
- void setParent(Candidate parent) {
- this.parent = parent;
- }
- public IFeatureReference getReference() {
- return ref;
- }
- void setReference(IFeatureReference ref) {
- this.ref = ref;
- }
- public VersionedIdentifier getVersionedIdentifier() {
- try {
- return ref.getVersionedIdentifier();
- } catch (CoreException e) {
- return new VersionedIdentifier("unknown", "0.0.0");
- }
- }
- public IFeature getFeature(IProgressMonitor monitor) {
- try {
- return ref.getFeature(monitor);
- } catch (CoreException e) {
- return null;
- }
- }
- public Candidate getParent() {
- return parent;
- }
- public Candidate getRoot() {
- Candidate root = this;
-
- while (root.getParent() != null) {
- root = root.getParent();
- }
- return root;
- }
- public IURLEntry getUpdateEntry() {
- int location = IUpdateConstants.SEARCH_ROOT;
-
- if (ref instanceof IIncludedFeatureReference)
- location =
- ((IIncludedFeatureReference) ref).getSearchLocation();
- if (parent == null || location == IUpdateConstants.SEARCH_SELF) {
- return getFeature(null).getUpdateSiteEntry();
- }
- return getRoot().getUpdateEntry();
- }
- public String toString() {
- return ref.toString();
- }
- public boolean equals(Object source) {
- if (source instanceof Candidate) {
- return this.ref.equals(((Candidate) source).getReference());
- }
- if (source instanceof IFeatureReference) {
- return this.ref.equals(source);
- }
- return false;
- }
- public void addToFlatList(ArrayList list, boolean updatableOnly) {
- // add itself
- if (!updatableOnly || isUpdatable())
- list.add(this);
- // add children
- if (children != null) {
- for (int i = 0; i < children.size(); i++) {
- Candidate child = (Candidate) children.get(i);
- child.addToFlatList(list, updatableOnly);
- }
- }
- }
- public boolean isUpdatable() {
- if (parent == null)
- return true;
- if (ref instanceof IIncludedFeatureReference) {
- return ((IIncludedFeatureReference) ref).getMatch()
- != IUpdateConstants.RULE_PERFECT;
- }
- return false;
- }
-
- public int getMatch() {
- if (ref instanceof IIncludedFeatureReference)
- return ((IIncludedFeatureReference) ref).getMatch();
- return IUpdateConstants.RULE_PERFECT;
- }
- }
-
- class FeatureContentProvider
- extends DefaultContentProvider
- implements IStructuredContentProvider {
- public Object[] getElements(Object parent) {
- if (candidates == null)
- return new Object[0];
- return getAllCandidates().toArray();
- }
- }
-
- class FeatureLabelProvider extends LabelProvider {
- public String getText(Object obj) {
- if (obj instanceof Candidate) {
- Candidate c = (Candidate) obj;
- try {
- return c.ref.getVersionedIdentifier().toString();
- } catch (CoreException e) {
- }
- }
- return obj.toString();
- }
- }
-
- class Hit {
- IFeature candidate;
- IFeatureReference ref;
- boolean patch;
- public Hit(IFeature candidate, IFeatureReference ref) {
- this.candidate = candidate;
- this.ref = ref;
- }
- public Hit(IFeature candidate, IFeatureReference ref, boolean patch) {
- this(candidate, ref);
- this.patch = patch;
- }
-
- public PendingChange getJob() {
- try {
- IFeature feature = ref.getFeature(null);
- return new PendingChange(patch ? null : candidate, feature);
- } catch (CoreException e) {
- return null;
- }
- }
-
- public boolean isPatch() {
- return patch;
- }
- }
-
- class SiteAdapter implements ISiteAdapter {
- IURLEntry entry;
- SiteAdapter(IURLEntry entry) {
- this.entry = entry;
- }
- public URL getURL() {
- return entry.getURL();
- }
- public String getLabel() {
- String label = entry.getAnnotation();
- if (label == null || label.length() == 0)
- label = getURL().toString();
- return label;
- }
- public ISite getSite(IProgressMonitor monitor) {
- try {
- return SiteManager.getSite(getURL(), monitor);
- } catch (CoreException e) {
- return null;
- }
- }
- }
-
- class HitSorter extends Sorter {
- public boolean compare(Object left, Object right) {
- Hit hit1 = (Hit) left;
- Hit hit2 = (Hit) right;
- try {
- VersionedIdentifier hv1 = hit1.ref.getVersionedIdentifier();
- VersionedIdentifier hv2 = hit2.ref.getVersionedIdentifier();
- return isNewerVersion(hv2, hv1);
- } catch (CoreException e) {
- return false;
- }
- }
- }
-
- class UpdateQuery implements ISearchQuery {
- IFeature candidate;
- ISiteAdapter adapter;
- int match = IImport.RULE_PERFECT;
-
- public UpdateQuery(
- IFeature candidate,
- int match,
- IURLEntry updateEntry) {
- this.candidate = candidate;
- this.match = match;
- if (updateEntry != null && updateEntry.getURL() != null)
- adapter = new SiteAdapter(updateEntry);
- }
-
- public ISiteAdapter getSearchSite() {
- return adapter;
- }
- private boolean isBroken() {
- try {
- IStatus status =
- SiteManager.getLocalSite().getFeatureStatus(candidate);
- return status.getSeverity() == IStatus.ERROR;
- } catch (CoreException e) {
- return false;
- }
- }
- private boolean isMissingOptionalChildren(IFeature feature) {
- try {
- IIncludedFeatureReference[] children =
- feature.getIncludedFeatureReferences();
- for (int i = 0; i < children.length; i++) {
- IIncludedFeatureReference ref = children[i];
- try {
- IFeature child = ref.getFeature(null);
- // If we are here, the child is not missing.
- // Check it's children recursively.
- if (isMissingOptionalChildren(child))
- return true;
- } catch (CoreException e) {
- // Missing child. Return true if optional,
- // otherwise it is a broken feature that we
- // do not care about.
- // Defect #38355: returning true causes
- // problems for optional features that
- // not installed. Should return true
- // only if missing AND has older
- // versions installed (for re-upgrading
- // native install after update).
- if (ref.isOptional()) {
- return FeatureHierarchyElement.hasOlderVersion(ref);
- }
- }
- }
- } catch (CoreException e) {
- }
- return false;
- }
- public IFeature[] getMatchingFeatures(
- ISite site,
- IProgressMonitor monitor) {
- ArrayList hits = new ArrayList();
- boolean broken = isBroken();
- boolean missingOptionalChildren = false;
-
- // Don't bother to compute missing optional children
- // if the feature is broken - all we want is to
- // see if we should allow same-version re-install.
- if (!broken)
- missingOptionalChildren = isMissingOptionalChildren(candidate);
- ISiteFeatureReference[] refs = site.getFeatureReferences();
- monitor.beginTask("", refs.length + 1);
- for (int i = 0; i < refs.length; i++) {
- ISiteFeatureReference ref = refs[i];
- try {
- if (isNewerVersion(candidate.getVersionedIdentifier(),
- ref.getVersionedIdentifier(),
- match)) {
- hits.add(new Hit(candidate, ref));
- } else {
- // accept the same feature if the installed
- // feature is broken
- if ((broken || missingOptionalChildren)
- && candidate.getVersionedIdentifier().equals(
- ref.getVersionedIdentifier()))
- hits.add(new Hit(candidate, ref));
- else {
- // check for patches
- if (isPatch(candidate, ref))
- hits.add(new Hit(candidate, ref, true));
- }
- }
- } catch (CoreException e) {
- }
- monitor.worked(1);
- if (monitor.isCanceled())
- return new IFeature[0];
- }
- IFeature[] result;
- if (hits.size() == 0)
- result = new IFeature[0];
- else {
- /*
- IFeature topHit = getFirstValid(hits);
- if (topHit == null)
- result = new IFeature[0];
- else
- result = new IFeature[] { topHit };
- */
- result = getValidHits(hits);
- }
- monitor.worked(1);
- monitor.done();
- return result;
- }
- }
-
- private ArrayList candidates;
-
- public UpdatesSearchCategory() {
- }
-
- private IFeature getFirstValid(ArrayList hits) {
- Object[] array = hits.toArray();
- HitSorter sorter = new HitSorter();
- sorter.sortInPlace(array);
- for (int i = 0; i < array.length; i++) {
- Hit hit = (Hit) array[i];
- PendingChange job = hit.getJob();
- if (job == null)
- continue;
- // do not accept updates without a license
- if (!UpdateModel.hasLicense(job))
- continue;
- IStatus status = ActivityConstraints.validatePendingChange(job);
- if (status == null)
- return job.getFeature();
- }
- // no valid hits
- return null;
- }
-
- private IFeature[] getValidHits(ArrayList hits) {
- Object[] array = hits.toArray();
- HitSorter sorter = new HitSorter();
- sorter.sortInPlace(array);
- IFeature topHit = null;
- ArrayList result = new ArrayList();
- for (int i = 0; i < array.length; i++) {
- Hit hit = (Hit) array[i];
- PendingChange job = hit.getJob();
- if (job == null)
- continue;
- // do not accept updates without a license
- if (!UpdateModel.hasLicense(job))
- continue;
- IStatus status = ActivityConstraints.validatePendingChange(job);
- if (status == null) {
- if (hit.isPatch()) {
- // Do not add the patch if already installed
- IFeature[] sameId =
- UpdateUI.getInstalledFeatures(job.getFeature(), false);
- if (sameId.length == 0)
- result.add(job.getFeature());
- } else if (topHit == null) {
- topHit = job.getFeature();
- result.add(topHit);
- }
- }
- }
- return (IFeature[]) result.toArray(new IFeature[result.size()]);
- }
-
- public void initialize() {
- candidates = new ArrayList();
- try {
- ILocalSite localSite = SiteManager.getLocalSite();
- IInstallConfiguration config = localSite.getCurrentConfiguration();
- IConfiguredSite[] isites = config.getConfiguredSites();
- for (int i = 0; i < isites.length; i++) {
- contributeCandidates(isites[i]);
- }
- } catch (CoreException e) {
- UpdateUI.logException(e, false);
- }
- }
-
- private void contributeCandidates(IConfiguredSite isite)
- throws CoreException {
- IFeatureReference[] refs = isite.getConfiguredFeatures();
- ArrayList candidatesPerSite = new ArrayList();
- for (int i = 0; i < refs.length; i++) {
- IFeatureReference ref = refs[i];
- // Don't waste time searching for updates to
- // patches.
- try {
- if (UpdateUI.isPatch(ref.getFeature(null)))
- continue;
- } catch (CoreException e) {
- continue;
- }
- Candidate c = new Candidate(ref);
- candidatesPerSite.add(c);
- }
- // Create a tree from a flat list
- buildHierarchy(candidatesPerSite);
- // Add the remaining root candidates to
- // the global list of candidates.
- candidates.addAll(candidatesPerSite);
- }
-
- private void buildHierarchy(ArrayList candidates) throws CoreException {
- Candidate[] array =
- (Candidate[]) candidates.toArray(new Candidate[candidates.size()]);
- // filter out included features so that only top-level features remain on the list
- for (int i = 0; i < array.length; i++) {
- Candidate parent = array[i];
- IFeature feature = parent.getFeature(null);
- IFeatureReference[] included =
- feature.getIncludedFeatureReferences();
- for (int j = 0; j < included.length; j++) {
- IFeatureReference fref = included[j];
- Candidate child = findCandidate(candidates, fref);
- if (child != null) {
- parent.add(child);
- child.setReference(fref);
- candidates.remove(child);
- }
- }
- }
- }
- private Candidate findCandidate(ArrayList list, IFeatureReference ref) {
- for (int i = 0; i < list.size(); i++) {
- Candidate c = (Candidate) list.get(i);
- if (c.ref.equals(ref))
- return c;
- }
- return null;
- }
-
- public ISearchQuery[] getQueries() {
- initialize();
- ArrayList selected = getSelectedCandidates();
- ISearchQuery[] queries = new ISearchQuery[selected.size()];
- for (int i = 0; i < selected.size(); i++) {
- Candidate candidate = (Candidate) selected.get(i);
- IFeature feature = candidate.getFeature(null);
- int match = candidate.getMatch();
- IURLEntry updateEntry = candidate.getUpdateEntry();
- if (feature == null) {
- queries[i] = null;
- } else {
- queries[i] = new UpdateQuery(feature, match, updateEntry);
- }
- }
- return queries;
- }
-
- public String getCurrentSearch() {
- return UpdateUI.getString(KEY_CURRENT_SEARCH);
- }
-
- private boolean isNewerVersion(
- VersionedIdentifier fvi,
- VersionedIdentifier cvi) {
- if (!fvi.getIdentifier().equals(cvi.getIdentifier()))
- return false;
- PluginVersionIdentifier fv = fvi.getVersion();
- PluginVersionIdentifier cv = cvi.getVersion();
- String mode = MainPreferencePage.getUpdateVersionsMode();
- boolean greater = cv.isGreaterThan(fv);
- if (!greater)
- return false;
- if (mode.equals(MainPreferencePage.EQUIVALENT_VALUE))
- return cv.isEquivalentTo(fv);
- else if (mode.equals(MainPreferencePage.COMPATIBLE_VALUE))
- return cv.isCompatibleWith(fv);
- else
- return false;
- }
-
- private boolean isNewerVersion(
- VersionedIdentifier fvi,
- VersionedIdentifier cvi,
- int match) {
- if (!fvi.getIdentifier().equals(cvi.getIdentifier()))
- return false;
- PluginVersionIdentifier fv = fvi.getVersion();
- PluginVersionIdentifier cv = cvi.getVersion();
- String mode = MainPreferencePage.getUpdateVersionsMode();
- boolean greater = cv.isGreaterThan(fv);
- if (!greater)
- return false;
- int userMatch = IImport.RULE_GREATER_OR_EQUAL;
- if (mode.equals(MainPreferencePage.EQUIVALENT_VALUE))
- userMatch = IImport.RULE_EQUIVALENT;
- else if (mode.equals(MainPreferencePage.COMPATIBLE_VALUE))
- userMatch = IImport.RULE_COMPATIBLE;
- // By default, use match rule defined in the preferences
- int resultingMatch = userMatch;
- //If match has been encoded in the feature reference,
- // pick the most conservative of the two values.
- if (match != IImport.RULE_PERFECT) {
- if (match == IImport.RULE_EQUIVALENT
- || userMatch == IImport.RULE_EQUIVALENT)
- resultingMatch = IImport.RULE_EQUIVALENT;
- else
- resultingMatch = IImport.RULE_COMPATIBLE;
- }
-
- if (resultingMatch == IImport.RULE_EQUIVALENT)
- return cv.isEquivalentTo(fv);
- else if (resultingMatch == IImport.RULE_COMPATIBLE)
- return cv.isCompatibleWith(fv);
- else
- return false;
- }
-
- private boolean isPatch(IFeature candidate, ISiteFeatureReference ref) {
- if (ref.isPatch() == false)
- return false;
- try {
- IFeature feature = ref.getFeature(null);
- return UpdateUI.isPatch(candidate, feature);
- } catch (CoreException e) {
- return false;
- }
- }
-
- public void createControl(Composite parent, FormWidgetFactory factory) {
- Composite container = factory.createComposite(parent);
- GridLayout layout = new GridLayout();
- //layout.numColumns = 2;
- layout.marginWidth = 2;
- layout.marginHeight = 2;
- container.setLayout(layout);
- tableViewer =
- CheckboxTableViewer.newCheckList(
- container,
- SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL);
- tableViewer.setContentProvider(new FeatureContentProvider());
- tableViewer.setLabelProvider(new FeatureLabelProvider());
- tableViewer.setInput(this);
- GridData gd = new GridData(GridData.FILL_BOTH);
- gd.heightHint = 100;
- tableViewer.getControl().setLayoutData(gd);
- factory.paintBordersFor(container);
- setControl(container);
- }
- public void load(Map map, boolean editable) {
- initialize();
- tableViewer.refresh();
- tableViewer.setAllChecked(true);
- String value = (String) map.get("unchecked");
- if (value == null)
- return;
- StringTokenizer stok = new StringTokenizer(value, ":");
- while (stok.hasMoreTokens()) {
- String token = stok.nextToken();
- int loc = token.lastIndexOf('_');
- String id;
- String version = null;
- if (loc != -1) {
- id = token.substring(0, loc);
- version = token.substring(loc + 1);
- } else {
- id = token;
- version = "0.0.0";
- }
- Candidate c = findCandidate(new VersionedIdentifier(id, version));
- if (c != null)
- tableViewer.setChecked(c, false);
- }
- }
-
- private Candidate findCandidate(VersionedIdentifier vid) {
- if (candidates == null)
- initialize();
- ArrayList list = getAllCandidates();
- for (int i = 0; i < list.size(); i++) {
- Candidate candidate = (Candidate) candidates.get(i);
- if (candidate.getVersionedIdentifier().equals(vid))
- return candidate;
- }
- return null;
- }
- public void store(Map map) {
- if (candidates == null)
- return;
- int counter = 0;
- StringBuffer buf = new StringBuffer();
- ArrayList list = getAllCandidates();
- for (int i = 0; i < list.size(); i++) {
- Candidate candidate = (Candidate) list.get(i);
- if (tableViewer.getChecked(candidate) == false) {
- if (counter > 0)
- buf.append(":");
- buf.append(candidate.getVersionedIdentifier().toString());
- }
- }
- map.put("unchecked", buf.toString());
- }
-
- private ArrayList getAllCandidates() {
- ArrayList selected = new ArrayList();
- for (int i = 0; i < candidates.size(); i++) {
- Candidate c = (Candidate) candidates.get(i);
- c.addToFlatList(selected, true);
- }
- return selected;
- }
- private ArrayList getSelectedCandidates() {
- if (tableViewer == null
- || tableViewer.getControl() == null
- || tableViewer.getControl().isDisposed()) {
- return getAllCandidates();
- } else {
- ArrayList selected = new ArrayList();
- Object[] sel = tableViewer.getCheckedElements();
- for (int i = 0; i < sel.length; i++)
- selected.add(sel[i]);
- return selected;
- }
- }
-}
\ No newline at end of file
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/security/BannerPage.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/security/BannerPage.java
deleted file mode 100644
index 13e4892..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/security/BannerPage.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.security;
-import java.net.URL;
-
-import org.eclipse.jface.dialogs.DialogPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-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.swt.widgets.Label;
-import org.eclipse.update.internal.ui.UpdateUIImages;
-
-public abstract class BannerPage extends DialogPage {
- private Image bannerImage;
- public BannerPage(String name) {
- super(name);
- }
- /**
- * @see DialogPage#createControl(Composite)
- */
- public void createControl(Composite parent) {
- Composite client = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- layout.horizontalSpacing = 10;
- client.setLayout(layout);
- Composite bannerParent = new Composite(client, SWT.BORDER);
- bannerParent.setLayoutData(new GridData(GridData.FILL_VERTICAL));
- layout = new GridLayout();
- layout.marginWidth = layout.marginHeight = 0;
- bannerParent.setLayout(layout);
-
- Label label = new Label(bannerParent, SWT.NULL);
- label.setLayoutData(new GridData(GridData.FILL_BOTH));
- label.setImage(getBannerImage());
-
- Control contents = createContents(client);
- contents.setLayoutData(new GridData(GridData.FILL_BOTH));
- setControl(client);
- }
-
- protected URL getBannerImageURL() {
- return null;
- }
- private Image getBannerImage() {
- URL imageURL = getBannerImageURL();
- Image image=null;
- if (imageURL==null) {
- // use default
- bannerImage = UpdateUIImages.DESC_INSTALL_BANNER.createImage();
- image = bannerImage;
- }
- return image;
- }
-
- public void dispose() {
- if (bannerImage!=null) {
- bannerImage.dispose();
- }
- super.dispose();
- }
-
- protected abstract Control createContents(Composite parent);
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/security/JarVerificationDialog.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/security/JarVerificationDialog.java
deleted file mode 100644
index 7e6e716..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/security/JarVerificationDialog.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.security;
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.update.core.IVerificationResult;
-import org.eclipse.update.internal.ui.UpdateUI;
-import org.eclipse.update.internal.ui.UpdateUIImages;
-
-/**
- *
- */
-public class JarVerificationDialog extends TitleAreaDialog {
-
- private IVerificationResult _VerificationResult = null;
- private IDialogPage _DialogPage;
- private Composite pageContainer;
- private Image defaultImage = null;
- private ImageDescriptor defaultImageDescriptor =
- UpdateUIImages.DESC_INSTALL_WIZ;
-
- /**
- * Constructor for JarVerificationDialog.
- * @param parentShell
- * @param newWizard
- */
- public JarVerificationDialog(Shell parentShell,IDialogPage dialogPage, IVerificationResult verificationResult) {
- super(parentShell);
- setShellStyle(SWT.TITLE | SWT.BORDER | SWT.APPLICATION_MODAL);
- _VerificationResult = verificationResult;
- _DialogPage = dialogPage;
- if (dialogPage instanceof JarVerificationPage){
- ((JarVerificationPage)_DialogPage).setTitleAreaDialog(this);
- }
- }
-
- /**
- * Add buttons to the dialog's button bar.
- */
- protected void createButtonsForButtonBar(Composite parent) {
- if (_VerificationResult.getVerificationCode()
- != IVerificationResult.TYPE_ENTRY_CORRUPTED) {
-
- if (_VerificationResult.isFeatureVerification()) {
- createButton(
- parent,
- IDialogConstants.OK_ID,
- UpdateUI.getString("JarVerificationDialog.Install"),
- false);
- //$NON-NLS-1$
- } else {
- createButton(
- parent,
- IDialogConstants.OK_ID,
- UpdateUI.getString("JarVerificationDialog.Continue"),
- false);
- //$NON-NLS-1$
- }
-
- // Radio button: Cancel installation
- //----------------------------------
- createButton(
- parent,
- IDialogConstants.CANCEL_ID,
- UpdateUI.getString("JarVerificationDialog.Cancel"),
- true);
- //$NON-NLS-1$
- } else {
- createButton(
- parent,
- IDialogConstants.CANCEL_ID,
- UpdateUI.getString("JarVerificationDialog.Cancel"),
- true);
- }
- getButton(IDialogConstants.CANCEL_ID).setFocus();
- }
-
- /* (non-Javadoc)
- * Method declared on Dialog.
- */
- protected Control createDialogArea(Composite parent) {
- Composite compositeParent = (Composite)super.createDialogArea(parent);
- setTitleImage(this.getImage());
- setTitle(UpdateUI.getString("JarVerificationDialog.Title"));
-
- _DialogPage.createControl(compositeParent);
- pageContainer=(Composite)_DialogPage.getControl();
- GridData gd = new GridData(GridData.FILL_BOTH);
- pageContainer.setLayoutData(gd);
- pageContainer.setFont(parent.getFont());
-
- // Build the separator line
- Label separator= new Label(compositeParent, SWT.HORIZONTAL | SWT.SEPARATOR);
- separator.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- return compositeParent;
- }
-
- /**
- * @see IDialogPage#getImage()
- */
- public Image getImage() {
- if (defaultImage == null)
- defaultImage = defaultImageDescriptor.createImage();
-
- return defaultImage;
- }
-
- public boolean close() {
- // dispose of image
- if (defaultImage != null) {
- defaultImage.dispose();
- defaultImage = null;
- }
- return super.close();
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/security/JarVerificationPage.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/security/JarVerificationPage.java
deleted file mode 100644
index 0da7710..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/security/JarVerificationPage.java
+++ /dev/null
@@ -1,392 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.security;
-import org.eclipse.jface.dialogs.TitleAreaDialog;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CLabel;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.update.core.IVerificationResult;
-import org.eclipse.update.internal.ui.UpdateUI;
-
-/**
- *
- */
-public class JarVerificationPage extends BannerPage {
-
- private IVerificationResult _VerificationResult = null;
- private String _fileName = null;
- private String _strFeatureName = null;
- private String _strId = null;
- private String _strProviderName = null;
- private TitleAreaDialog _Dialog;
- private boolean okToInstall = false;
- private String componentVerified;
-
- /*
- * Constructor for JarVerificationPage.
- */
- public JarVerificationPage(IVerificationResult verificationResult) {
- super(UpdateUI.getString("JarVerificationDialog.Verification"));
- _fileName = verificationResult.getContentReference().getIdentifier();
- _VerificationResult = verificationResult;
- _strId = verificationResult.getFeature().getVersionedIdentifier().toString();
- _strFeatureName = verificationResult.getFeature().getLabel();
- _strProviderName = verificationResult.getFeature().getProvider();
- componentVerified = (verificationResult.isFeatureVerification()) ? ".Feature" : ".File";
- okToInstall = false;
- }
-
- /* (non-Javadoc)
- * Method declared on Dialog.
- */
- protected Control createContents(Composite compositeParent) {
- WorkbenchHelp.setHelp(compositeParent, "org.eclipse.update.ui.JarVerificationPage");
- // Composite: Client
- //------------------
- Composite compositeClient = new Composite(compositeParent, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.marginHeight = layout.marginWidth = 0;
- compositeClient.setLayout(layout);
- compositeClient.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- // Text Information
- //------------------
- createTextArea(compositeClient);
-
- // Certificate Area
- //------------------
- createCertificateArea(compositeClient);
-
- // File and Feature Information
- //-----------------------------
- createInformationArea(compositeClient);
-
- // Choice Area
- //------------
- //createChoiceArea(compositeClient);
-
- return compositeClient;
-
- }
-
- /*
- * Continue install or cancel install
- */
- private void createChoiceArea(Composite compositeClient) {
- if (_VerificationResult.getVerificationCode()
- != IVerificationResult.TYPE_ENTRY_CORRUPTED) {
-
- // Label: Instruction
- //------------------
- Label labelInstruction = new Label(compositeClient, SWT.NULL);
- labelInstruction.setLayoutData(
- new GridData(
- GridData.VERTICAL_ALIGN_BEGINNING
- | GridData.GRAB_VERTICAL
- | GridData.FILL_HORIZONTAL));
- if (_VerificationResult.isFeatureVerification()) {
- labelInstruction.setText(
- UpdateUI.getString("JarVerificationDialog.MayChooseToInstall"));
- //$NON-NLS-1$
- } else {
- labelInstruction.setText(
- UpdateUI.getString("JarVerificationDialog.MayChooseToContinue"));
- //$NON-NLS-1$
- }
- //$NON-NLS-1$
- }
- }
-
- /*
- * Creates the Information text
- */
- private void createTextArea(Composite compositeClient) {
-
- // Label: Information
- //------------------
- Label labelInformation =
- new Label(compositeClient, SWT.WRAP);
- labelInformation.setLayoutData(
- new GridData(GridData.VERTICAL_ALIGN_BEGINNING | GridData.FILL_HORIZONTAL));
-
- StringBuffer strb = new StringBuffer();
- switch (_VerificationResult.getVerificationCode()) {
-
- case IVerificationResult.TYPE_ENTRY_NOT_SIGNED :
- String msg =
- UpdateUI.getString(
- "JarVerificationDialog.AboutToInstall"+
- componentVerified);
- setMessage(msg, WARNING);
- strb.append(
- UpdateUI.getString(
- "JarVerificationDialog.NotDigitallySigned"+
- componentVerified));
- //$NON-NLS-1$
- strb.append("\r\n"); //$NON-NLS-1$
- strb.append(
- UpdateUI.getString(
- "JarVerificationDialog.CannotVerifyProvider"+
- componentVerified));
- //$NON-NLS-1$
-/* strb.append("\r\n"); //$NON-NLS-1$
- if (_VerificationResult.isFeatureVerification()) {
- strb.append(
- UpdateUI.getResourceString("JarVerificationDialog.InstallMayCorrupt"));
- //$NON-NLS-1$
- } else {
- strb.append(
- UpdateUI.getResourceString("JarVerificationDialog.ContinueMayCorrupt"));
- //$NON-NLS-1$
- }
- */
- labelInformation.setText(strb.toString());
- break;
-
- case IVerificationResult.TYPE_ENTRY_CORRUPTED :
- msg =
- UpdateUI.getString(
- "JarVerificationDialog.CorruptedContent"+
- componentVerified);
- setMessage(msg, ERROR);
- //$NON-NLS-1$
- strb.append(
- UpdateUI.getString(
- "JarVerificationDialog.ComponentNotInstalled"));
- //$NON-NLS-1$
- labelInformation.setText(strb.toString());
- break;
-
- case IVerificationResult.TYPE_ENTRY_SIGNED_UNRECOGNIZED :
- msg =
- UpdateUI.getString(
- "JarVerificationDialog.SignedComponent"+
- componentVerified);
- //$NON-NLS-1$
- setMessage(msg, WARNING);
- strb.append(
- UpdateUI.getString(
- "JarVerificationDialog.UnknownCertificate"+
- componentVerified));
- //$NON-NLS-1$
- strb.append("\r\n"); //$NON-NLS-1$
- strb.append(
- UpdateUI.getString(
- "JarVerificationDialog.UnableToVerifyProvider"+
- componentVerified));
- //$NON-NLS-1$
-/* strb.append("\r\n"); //$NON-NLS-1$
- if (_VerificationResult.isFeatureVerification()) {
- strb.append(
- UpdateUI.getResourceString("JarVerificationDialog.InstallMayCorrupt"));
- //$NON-NLS-1$
- } else {
- strb.append(
- UpdateUI.getResourceString("JarVerificationDialog.ContinueMayCorrupt"));
- //$NON-NLS-1$
- }
- */
- labelInformation.setText(strb.toString());
- break;
-
- case IVerificationResult.TYPE_ENTRY_SIGNED_RECOGNIZED :
- msg =
- UpdateUI.getString(
- "JarVerificationDialog.SignedComponent"+
- componentVerified);
- //$NON-NLS-1$
- setMessage(msg, WARNING);
- strb.append(
- UpdateUI.getString(
- "JarVerificationDialog.KnownCertificate"+
- componentVerified));
- //$NON-NLS-1$
- strb.append("\r\n"); //$NON-NLS-1$
- strb.append(
- UpdateUI.getString(
- "JarVerificationDialog.ProviderKnown"+
- componentVerified));
- //$NON-NLS-1$
- strb.append("\r\n"); //$NON-NLS-1$
-
- labelInformation.setText(strb.toString());
-
-// createCautionArea(compositeClient);
- break;
- }
- }
-
- /*
- * Caution Label and text
- */
- private void createCautionArea(Composite compositeClient) {
- // Composite: Caution
- //------------------------------
- Composite compositeCaution = new Composite(compositeClient, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginWidth = layout.marginHeight = 0;
- compositeCaution.setLayout(layout);
- compositeCaution.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- // Icon
- //-----
- Label label = new Label(compositeCaution,SWT.LEFT);
- label.setImage(JFaceResources.getImage(TitleAreaDialog.DLG_IMG_MESSAGE_WARNING));
-
- // Text
- //-----
- Label labelInformationCaution =
- new Label(compositeCaution, SWT.WRAP);
- labelInformationCaution.setText(
- UpdateUI.getFormattedMessage(
- "JarVerificationDialog.Caution",
- _strProviderName));
- //$NON-NLS-1$
- }
-
- /*
- * Presents File & Feature information
- */
- private void createInformationArea(Composite compositeClient) {
-
- // Composite: Information labels
- //------------------------------
- Composite compositeInformation = new Composite(compositeClient, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginWidth = layout.marginHeight = 0;
- compositeInformation.setLayout(layout);
- compositeInformation.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- // Feature name
- //---------------
- Label keyLabel = null;
- CLabel valueLabel = null;
- if (_strFeatureName != null && _strFeatureName.length() > 0) {
- keyLabel = new Label(compositeInformation, SWT.NULL);
- keyLabel.setText(
- UpdateUI.getString("JarVerificationDialog.FeatureName"));
- //$NON-NLS-1$
- valueLabel = new CLabel(compositeInformation, SWT.NULL);
- valueLabel.setFont(JFaceResources.getBannerFont());
- valueLabel.setText(_strFeatureName);
- valueLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- }
- // Feature identifier
- //---------------------
- if (_strId != null && _strId.length() > 0) {
- keyLabel = new Label(compositeInformation, SWT.NULL);
- keyLabel.setText(
- UpdateUI.getString("JarVerificationDialog.FeatureIdentifier"));
- //$NON-NLS-1$
- valueLabel = new CLabel(compositeInformation, SWT.NULL);
- valueLabel.setFont(JFaceResources.getBannerFont());
- valueLabel.setText(_strId);
- valueLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- }
- // Provider name
- //--------------
- if (_strProviderName != null && _strProviderName.length() > 0) {
- keyLabel = new Label(compositeInformation, SWT.NULL);
- keyLabel.setText(
- UpdateUI.getString("JarVerificationDialog.Provider"));
- //$NON-NLS-1$
- valueLabel = new CLabel(compositeInformation, SWT.NULL);
- valueLabel.setFont(JFaceResources.getBannerFont());
- valueLabel.setText(_strProviderName);
- valueLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- }
- // Label: File name
- //-----------------
- keyLabel = new Label(compositeInformation, SWT.NULL);
- keyLabel.setText(
- UpdateUI.getString("JarVerificationDialog.FileName"));
- //$NON-NLS-1$
- valueLabel = new CLabel(compositeInformation, SWT.NULL);
- valueLabel.setFont(JFaceResources.getBannerFont());
- valueLabel.setText(_fileName);
- valueLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- }
-
- /*
- * Show certificate information
- */
- private void createCertificateArea(Composite compositeClient) {
-
- if (_VerificationResult.getVerificationCode()
- == IVerificationResult.TYPE_ENTRY_SIGNED_UNRECOGNIZED
- || _VerificationResult.getVerificationCode()
- == IVerificationResult.TYPE_ENTRY_SIGNED_RECOGNIZED) {
- // Group box
- //----------
- Group group = new Group(compositeClient, SWT.SHADOW_ETCHED_IN);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginWidth = layout.marginHeight = 0;
- group.setLayout(layout);
- group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- group.setText(UpdateUI.getString("JarVerificationDialog.CertificateInfo"));
-
- // Signer
- //-------------------
- Label keyLabel = null;
- Text valueText = null;
- //data = new GridData(GridData.FILL_HORIZONTAL);
- //data.horizontalIndent = 0;
- //textInformation.setLayoutData(data);
- if (_VerificationResult.getSignerInfo() != null) {
- keyLabel = new Label(group, SWT.NULL);
- keyLabel.setText(UpdateUI.getString("JarVerificationDialog.SubjectCA"));
- keyLabel.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING));
- //$NON-NLS-1$
- valueText = new Text(group, SWT.MULTI|SWT.BORDER|SWT.WRAP|SWT.V_SCROLL);
- valueText.setText(_VerificationResult.getSignerInfo());
- valueText.setEditable(false);
- valueText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- }
-
- // Authenticator
- //---------------------
- if (_VerificationResult.getVerifierInfo() != null) {
- keyLabel = new Label(group, SWT.NULL);
- keyLabel.setText(UpdateUI.getString("JarVerificationDialog.RootCA"));
- keyLabel.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING));
- //$NON-NLS-1$
- valueText = new Text(group, SWT.MULTI|SWT.BORDER|SWT.WRAP|SWT.V_SCROLL);
- valueText.setText(_VerificationResult.getVerifierInfo());
- valueText.setEditable(false);
- valueText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- }
- }
- }
-
- /*
- * Sets the Dialog
- */
- public void setTitleAreaDialog(TitleAreaDialog dialog) {
- _Dialog = dialog;
- };
-
- /*
- *
- */
- public void setMessage(String newMessage, int newType) {
- super.setMessage(newMessage, newType);
- if (_Dialog != null) {
- _Dialog.setMessage(newMessage, newType);
- }
- }
-
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/security/JarVerificationService.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/security/JarVerificationService.java
deleted file mode 100644
index 5d518cc..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/security/JarVerificationService.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.security;
-
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.update.core.*;
-import org.eclipse.update.internal.security.JarVerifier;
-import org.eclipse.update.internal.ui.UpdateUI;
-import org.eclipse.update.internal.ui.preferences.MainPreferencePage;
-/**
- *
- */
-public class JarVerificationService implements IVerificationListener {
-
- /*
- * The JarVerifier is a instance variable
- * bacause we want to reuse it upon multiple calls
- */
- private JarVerifier jarVerifier;
-
- /*
- * the Shell
- */
- private Shell shell;
-
- /*
- * If no shell, create a new shell
- */
- public JarVerificationService() {
- this(null);
- }
-
- /*
- *
- */
- public JarVerificationService(Shell aShell) {
- jarVerifier = new JarVerifier();
- shell = aShell;
-
- // find the default display and get the active shell
- if (shell == null) {
- final Display disp = Display.getDefault();
- if (disp == null) {
- shell = new Shell(new Display());
- } else {
- disp.syncExec(new Runnable() {
- public void run() {
- shell = disp.getActiveShell();
- }
- });
- }
- }
- }
-
- /*
- *
- */
- private int openWizard(IVerificationResult result) {
- int code;
- IDialogPage page = new JarVerificationPage(result);
- JarVerificationDialog dialog =
- new JarVerificationDialog(shell,page,result);
- dialog.create();
- dialog.getShell().setSize(600, 500);
- dialog.getShell().setText(UpdateUI.getString("JarVerificationDialog.wtitle"));
- dialog.open();
- if (dialog.getReturnCode() == JarVerificationDialog.OK)
- code = CHOICE_INSTALL_TRUST_ALWAYS;
- else
- code = CHOICE_ABORT;
-
- return code;
-
- }
-
- /*
- *
- */
- public int prompt(final IVerificationResult verificationResult){
- if (MainPreferencePage.getCheckDigitalSignature()==false)
- return CHOICE_INSTALL_TRUST_ALWAYS;
-
- if (verificationResult.alreadySeen()) return CHOICE_INSTALL_TRUST_ALWAYS;
-
- switch (verificationResult.getVerificationCode()) {
- case IVerificationResult.UNKNOWN_ERROR :
- return CHOICE_ERROR;
-
- case IVerificationResult.VERIFICATION_CANCELLED:
- return CHOICE_ABORT;
-
- // cannot verify it: do not prompt user.
- case IVerificationResult.TYPE_ENTRY_UNRECOGNIZED:
- return CHOICE_INSTALL_TRUST_ALWAYS;
-
- default :
- {
- final int[] wizardResult = new int[1];
- shell.getDisplay().syncExec(new Runnable() {
- public void run() {
- wizardResult[0] = openWizard(verificationResult);
- }
- });
- return wizardResult[0];
- }
- }
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/security/UpdateManagerAuthenticator.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/security/UpdateManagerAuthenticator.java
deleted file mode 100644
index 05f2f7d..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/security/UpdateManagerAuthenticator.java
+++ /dev/null
@@ -1,266 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.security;
-
-
-import java.net.*;
-import java.util.*;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.update.core.Utilities;
-import org.eclipse.update.internal.ui.UpdateUI;
-
-/**
- * A transient database that remembers information, such as usernames and
- * passwords. The information is stored in memory only and is discarted
- * when the Plaform shuts down.
- */
-public class UpdateManagerAuthenticator extends Authenticator {
-
- // fields needed for caching the password
- public static final String INFO_PASSWORD = "password"; //$NON-NLS-1$
- public static final String INFO_USERNAME = "username"; //$NON-NLS-1$
- public static final String AUTH_SCHEME = ""; //$NON-NLS-1$
-
- private InetAddress requestingSite;
- private int requestingPort;
- private String requestingProtocol;
- private String requestingPrompt;
- private String requestingScheme;
- private Map savedPasswordAuthentication;
-
- /**
- * The Map containing the userid and password
- * HashMap allows <code>null</code> as the value
- */
- private Map result = new HashMap();
-
- /**
- *
- */
- public void addAuthenticationInfo(URL serverUrl, String realm, String scheme, Map info) {
- try {
- Platform.addAuthorizationInfo(serverUrl, realm, scheme, info);
- } catch (CoreException e) {
- UpdateUI.logException(e);
- }
- }
-
- /**
- *
- */
- public Map getAuthenticationInfo(URL serverUrl, String realm, String scheme) {
- return Platform.getAuthorizationInfo(serverUrl, realm, scheme);
- }
-
- /**
- *
- */
- public Map requestAuthenticationInfo(URL resourceUrl, String realm, String scheme) {
- // already called by retrieve
- //if (!equalsPreviousRequest(resourceUrl, realm, scheme)) {
- // save state
- InetAddress ip = null;
- try {
- ip = InetAddress.getByName(resourceUrl.getHost());
- } catch (UnknownHostException e) {
- UpdateUI.logException(e, false);
- }
-
- this.requestingPort = resourceUrl.getPort();
- this.requestingPrompt = realm;
- this.requestingProtocol = resourceUrl.getProtocol();
- this.requestingScheme = scheme;
- this.requestingSite = ip;
-
- // try to get the password info from the in-memory database first
- Map map = Platform.getAuthorizationInfo(resourceUrl, requestingPrompt, requestingScheme);
- if (map == null) {
- map = retrievePasswordAuthentication(resourceUrl, requestingPrompt, requestingScheme);
- }
- savedPasswordAuthentication = map;
- //}
-
- // we must return a valid Map while we internally manage Cancel dialog (map==null -> dialog cancelled)
- return savedPasswordAuthentication;
- }
-
- /**
- * @see org.eclipse.update.internal.core.net.http.client.IAuthenticator#addProtectionSpace(URL, String)
- */
- public void addProtectionSpace(URL resourceUrl, String realm) {
- try {
- Platform.addProtectionSpace(resourceUrl, realm);
- } catch (CoreException e) {
- UpdateUI.logException(e, false);
- }
- }
-
- /**
- * @see org.eclipse.update.internal.core.net.http.client.IAuthenticator#getProtectionSpace(URL)
- */
- public String getProtectionSpace(URL resourceUrl) {
- return Platform.getProtectionSpace(resourceUrl);
- }
-
- /*
- * forces a refresh
- */
- public void reset() {
- requestingPort = 0;
- requestingPrompt = null;
- requestingProtocol = null;
- requestingScheme = null;
- requestingSite = null;
- }
-
- /*
- * returns a map that contains the userid and the password
- * or <code>null</code> if the dialog has been cancelled
- */
- private Map retrievePasswordAuthentication(final URL resourceUrl, final String realm, final String scheme) {
- result = new HashMap();
- if ("Basic".equalsIgnoreCase(scheme)) {
- Display disp = Display.getCurrent();
- if (disp != null) {
- result = promptForPassword(resourceUrl, realm);
- } else {
- Display.getDefault().syncExec(new Runnable() {
- public void run() {
- result = promptForPassword(resourceUrl, realm);
- }
- });
- };
- }
- return result;
- }
-
- /*
- * returns true if this request is the same as the saved one
- * used to prevent double dialog if user cancelled or entered wrong userid/password
- */
- private boolean equalsPreviousRequest(URL url, String realm, String scheme) {
-
- if (requestingPort != url.getPort())
- return false;
-
- if (requestingPrompt != null && !requestingPrompt.equals(realm))
- return false;
- if (requestingPrompt == null && realm != null)
- return false;
-
- if (requestingProtocol != null && !requestingProtocol.equals(url.getProtocol()))
- return false;
- if (requestingProtocol == null && url.getProtocol() != null)
- return false;
-
- if (requestingScheme != null && !requestingScheme.equals(scheme))
- return false;
- if (requestingScheme == null && scheme != null)
- return false;
-
- InetAddress ip = null;
- try {
- ip = InetAddress.getByName(url.getHost());
- } catch (UnknownHostException e) {
- UpdateUI.logException(e, false);
- }
-
- if (requestingSite != null && !requestingSite.equals(ip))
- return false;
- if (requestingSite == null && ip != null)
- return false;
-
- return true;
- }
-
- /*
- * returns a map that contains the userid and the password
- * or <code>null</code> if the dialog has been cancelled
- */
- private Map promptForPassword(URL resourceUrl, String realm) {
-
- Map result = null;
- Shell shell = new Shell();
- UserValidationDialog ui = new UserValidationDialog(shell, resourceUrl, realm, ""); //$NON-NLS-1$
- ui.setUsernameMutable(true);
- ui.setBlockOnOpen(true);
- ui.open();
-
- boolean isCancelled = ui.getReturnCode() == UserValidationDialog.CANCEL;
- if (!isCancelled) {
- result = new HashMap();
- result.put(INFO_USERNAME, ui.getUserid());
- result.put(INFO_PASSWORD, ui.getPassword());
- }
- shell.dispose();
-
- return result;
- }
-
- /*
- * @see Authenticator#getPasswordAuthentication()
- */
- protected PasswordAuthentication getPasswordAuthentication() {
-
- try {
- URL url = new URL(getRequestingProtocol(), getRequestingSite().getHostName(), getRequestingPort(), ""); //$NON-NLS-1$
- Map map = retrievePasswordAuthentication(url);
-
- String username = null;
- String password = null;
-
- if (map != null) {
- username = (String) map.get(INFO_USERNAME);
- password = (String) map.get(INFO_PASSWORD);
- }
-
- if (username != null && password != null) {
- return new PasswordAuthentication(username, password.toCharArray());
- } else {
- return null;
- }
-
- } catch (MalformedURLException e) {
- IStatus status = Utilities.newCoreException("", e).getStatus();
- UpdateUI.log(status, false);
- }
- return new PasswordAuthentication("", new char[] { ' ' }); //$NON-NLS-1$
- }
-
- /*
- *
- */
- private Map retrievePasswordAuthentication(URL url) {
-
- if (equalsPreviousRequest(url,getRequestingPrompt(),getRequestingScheme())) {
- // same request, the userid/password was wrong
- // or user cancelled. force a refresh
- if (savedPasswordAuthentication != null)
- // only prompt if the user didn't cancel
- savedPasswordAuthentication = requestAuthenticationInfo(url, requestingPrompt, requestingScheme);
- } else {
- // save state
- requestingPort = getRequestingPort();
- requestingPrompt = getRequestingPrompt();
- requestingProtocol = getRequestingProtocol();
- requestingScheme = getRequestingScheme();
- requestingSite = getRequestingSite();
- savedPasswordAuthentication = Platform.getAuthorizationInfo(url, requestingPrompt, requestingScheme);
- if (savedPasswordAuthentication == null) {
- savedPasswordAuthentication = requestAuthenticationInfo(url, requestingPrompt, requestingScheme);
- }
- }
- return savedPasswordAuthentication;
- }
-
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/security/UserValidationDialog.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/security/UserValidationDialog.java
deleted file mode 100644
index ac625bc..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/security/UserValidationDialog.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.security;
-
-import java.net.URL;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.update.internal.ui.UpdateUI;
-
-
-/**
- * User authentication dialog
- */
-public class UserValidationDialog extends Dialog {
- protected Text usernameField;
- protected Text passwordField;
-
- protected String domain;
- protected String realm;
- protected String defaultUsername;
- protected String password = null;
- protected String userid = null;
- protected boolean isUsernameMutable = true;
- /**
- * Creates a new UserValidationDialog.
- */
- public UserValidationDialog(Shell parentShell, URL location, String realm, String defaultName) {
- super(parentShell);
- this.defaultUsername = defaultName;
- this.domain = location.getHost();
- this.realm = realm;
- }
- /**
- */
- protected void configureShell(Shell newShell) {
- super.configureShell(newShell);
- newShell.setText(UpdateUI.getString("UserVerificationDialog.PasswordRequired")); //$NON-NLS-1$
- }
- /**
- */
- public void create() {
- super.create();
- //add some default values
- usernameField.setText(defaultUsername);
-
- if (isUsernameMutable) {
- //give focus to username field
- usernameField.selectAll();
- usernameField.setFocus();
- }
- else {
- usernameField.setEditable(false);
- passwordField.setFocus();
- }
- }
- /**
- */
- protected Control createDialogArea(Composite parent) {
- Composite main = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 3;
- main.setLayout(layout);
- main.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- Label label = new Label(main, SWT.WRAP);
- String text = UpdateUI.getString("UserVerificationDialog.EnterNameAndPassword")+ realm; //$NON-NLS-1$
- text += "\n" + UpdateUI.getString("UserVerificationDialog.Domain")+domain; //$NON-NLS-1$ //$NON-NLS-2$
- label.setText(text);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 3;
- label.setLayoutData(data);
-
- createUsernameFields(main);
- createPasswordFields(main);
- WorkbenchHelp.setHelp(main, "org.eclipse.update.ui.UserValidationDialog");
- return main;
- }
- /**
- * Creates the three widgets that represent the user name entry
- * area.
- */
- protected void createPasswordFields(Composite parent) {
- new Label(parent, SWT.NONE).setText(UpdateUI.getString("UserVerificationDialog.Password")); //$NON-NLS-1$
-
- passwordField = new Text(parent, SWT.BORDER);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.ENTRY_FIELD_WIDTH);
- passwordField.setLayoutData(data);
- passwordField.setEchoChar('*');
-
- new Label(parent, SWT.NONE); //spacer
- }
- /**
- * Creates the three widgets that represent the user name entry
- * area.
- */
- protected void createUsernameFields(Composite parent) {
- new Label(parent, SWT.NONE).setText(UpdateUI.getString("UserVerificationDialog.UserName")); //$NON-NLS-1$
-
- usernameField = new Text(parent, SWT.BORDER);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.ENTRY_FIELD_WIDTH);
- usernameField.setLayoutData(data);
-
- new Label(parent, SWT.NONE); //spacer
- }
- /**
- * Returns the password entered by the user, or null
- * if the user canceled.
- */
- public String getPassword() {
- return password;
- }
- /**
- * Returns the username entered by the user, or null
- * if the user canceled.
- */
- public String getUserid() {
- return userid;
- }
- /**
- * Notifies that the ok button of this dialog has been pressed.
- */
- protected void okPressed() {
- password = passwordField.getText();
- userid = usernameField.getText();
- super.okPressed();
- }
- /**
- * Sets whether or not the username field should be mutable.
- * This method must be called before create(), otherwise it
- * will be ignored.
- */
- public void setUsernameMutable(boolean value) {
- isUsernameMutable = value;
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/BaseTableView.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/BaseTableView.java
deleted file mode 100644
index 333c46f..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/BaseTableView.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.views;
-
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-
-/**
- *
- */
-
-public abstract class BaseTableView extends BaseView {
- private TableViewer viewer;
-
- /**
- * The constructor.
- */
- public BaseTableView() {
- }
-
- protected StructuredViewer createViewer(Composite parent, int style) {
- return viewer =
- new TableViewer(
- parent,
- SWT.MULTI
- | SWT.H_SCROLL
- | SWT.V_SCROLL
- | SWT.FULL_SELECTION
- | style);
- }
-
- public TableViewer getTableViewer() {
- return (TableViewer)getViewer();
- }
-}
\ No newline at end of file
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/BaseTreeView.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/BaseTreeView.java
deleted file mode 100644
index 1350733..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/BaseTreeView.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.views;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.part.DrillDownAdapter;
-import org.eclipse.update.internal.ui.UpdateUIImages;
-
-/**
- * Insert the type's description here.
- * @see ViewPart
- */
-public abstract class BaseTreeView extends BaseView {
- private DrillDownAdapter drillDownAdapter;
- protected Action collapseAllAction;
- /**
- * The constructor.
- */
- public BaseTreeView() {
- }
-
- protected StructuredViewer createViewer(Composite parent, int styles) {
- TreeViewer viewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | styles);
- return viewer;
- }
-
- protected void initDrillDown() {
- drillDownAdapter = new DrillDownAdapter(getTreeViewer());
- }
-
- protected void addDrillDownAdapter(IActionBars bars) {
- drillDownAdapter.addNavigationActions(bars.getToolBarManager());
- }
-
- protected void addDrillDownAdapter(IMenuManager menu) {
- drillDownAdapter.addNavigationActions(menu);
- }
-
- public TreeViewer getTreeViewer() {
- return (TreeViewer)getViewer();
- }
-
- protected void makeActions() {
- super.makeActions();
- collapseAllAction = new Action() {
- public void run() {
- TreeViewer treeViewer = getTreeViewer();
- treeViewer.getControl().setRedraw(false);
- treeViewer.collapseToLevel(treeViewer.getInput(), TreeViewer.ALL_LEVELS);
- treeViewer.getControl().setRedraw(true);
- }
- };
- collapseAllAction.setText("Collapse All");
- collapseAllAction.setToolTipText("Collapse All");
- collapseAllAction.setImageDescriptor(UpdateUIImages.DESC_COLLAPSE_ALL);
- }
-
- protected abstract Object getRootObject();
-
- void updateTitle(Object newInput) {
- IConfigurationElement config = getConfigurationElement();
- if (config == null)
- return;
- String viewName = config.getAttribute("name"); //$NON-NLS-1$
- if (newInput == null
- || newInput.equals(getRootObject())) {
- // restore old
- setTitle(viewName);
- setTitleToolTip(getTitle());
- } else {
- String name =
- ((LabelProvider) getViewer().getLabelProvider()).getText(
- newInput);
- setTitle(viewName + ": " + name); //$NON-NLS-1$
- setTitleToolTip(getTitle());
- }
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/BaseView.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/BaseView.java
deleted file mode 100644
index 90aac56..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/BaseView.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.views;
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.*;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.ui.part.ViewPart;
-import org.eclipse.update.internal.ui.*;
-
-/**
- * Insert the type's description here.
- * @see ViewPart
- */
-public abstract class BaseView extends ViewPart {
- private Action showDetailsAction;
- private StructuredViewer viewer;
-
- private static final String KEY_SHOW_DETAILS =
- "BaseView.Popup.ShowDetails";
-
- private static final String KEY_CONFIRM_DELETE = "ConfirmDelete.title";
-
- private static final String KEY_CONFIRM_DELETE_MULTIPLE =
- "ConfirmDelete.multiple";
-
- private static final String KEY_CONFIRM_DELETE_SINGLE =
- "ConfirmDelete.single";
- /**
- * The constructor.
- */
- public BaseView() {
- }
-
- public abstract void initProviders();
-
- protected abstract StructuredViewer createViewer(Composite parent, int styles);
-
- public StructuredViewer getViewer() {
- return viewer;
- }
-
- public Control getControl() {
- return viewer!=null?viewer.getControl():null;
- }
-
- public void createPartControl(Composite parent) {
- viewer = createViewer(parent, SWT.NULL);
- viewer.setUseHashlookup(true);
- initProviders();
- initDragAndDrop();
- //initRefreshKey();
- //initRenameKey();
- //updateTitle();
-
- MenuManager menuMgr = new MenuManager("#PopupMenu"); //$NON-NLS-1$
- menuMgr.setRemoveAllWhenShown(true);
- menuMgr.addMenuListener(new IMenuListener() {
- public void menuAboutToShow(IMenuManager manager) {
- manager.add(new GroupMarker("additions"));
- BaseView.this.fillContextMenu(manager);
- }
- });
- Menu menu = menuMgr.createContextMenu(viewer.getControl());
- viewer.getControl().setMenu(menu);
- getSite().registerContextMenu(menuMgr, viewer);
- makeActions();
-
- viewer.getControl().addKeyListener(new KeyAdapter() {
- public void keyPressed(KeyEvent event) {
- if (event.character == SWT.DEL && event.stateMask == 0) {
- deleteKeyPressed(event.widget);
- }
- }
- });
-
- viewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- handleSelectionChanged(event);
- }
- });
- viewer.addDoubleClickListener(new IDoubleClickListener() {
- public void doubleClick(DoubleClickEvent event) {
- handleDoubleClick(event);
- }
- });
- viewer.getControl().addKeyListener(new KeyAdapter() {
- public void keyPressed(KeyEvent e) {
- handleKeyPressed(e);
- }
- });
-
- fillActionBars(getViewSite().getActionBars());
-
- getSite().setSelectionProvider(viewer);
- partControlCreated();
- }
-
- protected void partControlCreated() {
- }
-
- public void setFocus() {
- viewer.getControl().setFocus();
- }
-
- protected void fillContextMenu(IMenuManager manager) {
- manager.add(showDetailsAction);
- }
-
- protected void makeActions() {
- showDetailsAction = new Action() {
- public void run() {
- IWorkbenchPage page = UpdateUI.getActivePage();
- try {
- IViewPart part =
- page.showView(UpdatePerspective.ID_DETAILS);
- ((DetailsView) part).selectionChanged(
- BaseView.this,
- viewer.getSelection());
- } catch (PartInitException e) {
- UpdateUI.logException(e);
- }
- }
- };
- WorkbenchHelp.setHelp(
- showDetailsAction,
- "org.eclipse.update.ui.BaseViewer_showDetailsAction");
- showDetailsAction.setText(
- UpdateUI.getString(KEY_SHOW_DETAILS));
- }
-
- protected void initDragAndDrop() {
- }
-
- protected void deleteKeyPressed(Widget widget) {
- }
-
- protected void handleSelectionChanged(SelectionChangedEvent e) {
- }
-
- protected void handleDoubleClick(DoubleClickEvent e) {
- showDetailsAction.run();
- }
-
- protected void handleKeyPressed(KeyEvent e) {
- }
-
- protected void fillActionBars(IActionBars bars) {
- }
-
- protected boolean confirmDeletion() {
- IStructuredSelection ssel =
- (IStructuredSelection) viewer.getSelection();
- String title = UpdateUI.getString(KEY_CONFIRM_DELETE);
- String message;
-
- if (ssel.size() > 1) {
- message =
- UpdateUI.getFormattedMessage(
- KEY_CONFIRM_DELETE_MULTIPLE,
- "" + ssel.size());
- } else {
- Object obj = ssel.getFirstElement().toString();
- message =
- UpdateUI.getFormattedMessage(
- KEY_CONFIRM_DELETE_SINGLE,
- obj.toString());
- }
- return MessageDialog.openConfirm(
- viewer.getControl().getShell(),
- title,
- message);
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/ConfigurationView.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/ConfigurationView.java
deleted file mode 100644
index 44b5f78..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/ConfigurationView.java
+++ /dev/null
@@ -1,1271 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.views;
-import java.lang.reflect.InvocationTargetException;
-import java.util.*;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.*;
-import org.eclipse.ui.dialogs.PropertyDialogAction;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.update.configuration.*;
-import org.eclipse.update.core.*;
-import org.eclipse.update.internal.ui.*;
-import org.eclipse.update.internal.ui.forms.RevertSection;
-import org.eclipse.update.internal.ui.model.*;
-import org.eclipse.update.internal.ui.parts.*;
-
-/**
- * Insert the type's description here.
- * @see ViewPart
- */
-public class ConfigurationView
- extends BaseTreeView
- implements
- IInstallConfigurationChangedListener,
- IConfiguredSiteChangedListener,
- ILocalSiteChangedListener {
- private static final String KEY_CURRENT = "ConfigurationView.current";
- private static final String KEY_SHOW_UNCONF_FEATURES =
- "ConfigurationView.showUnconfFeatures";
- private static final String KEY_SHOW_UNCONF_FEATURES_TOOLTIP =
- "ConfigurationView.showUnconfFeatures.tooltip";
- private static final String KEY_MISSING_OPTIONAL_STATUS =
- "ConfigurationView.missingOptionalStatus";
- private static final String KEY_MISSING_STATUS =
- "ConfigurationView.missingStatus";
- private static final String STATE_SHOW_UNCONF =
- "ConfigurationView.showUnconf";
- private Image eclipseImage;
- private boolean initialized;
- private SavedFolder savedFolder;
- private HistoryFolder historyFolder;
- private Action showUnconfFeaturesAction;
- private Action revertAction;
- private Action preserveAction;
- private Action unlinkAction;
- private Action removePreservedAction;
- private Action propertiesAction;
- private Action showStatusAction;
- private SiteStateAction siteStateAction;
- private IUpdateModelChangedListener modelListener;
- private boolean refreshLock=false;
- private static final String KEY_RESTORE = "ConfigurationView.Popup.restore";
- private static final String KEY_PRESERVE =
- "ConfigurationView.Popup.preserve";
- private static final String KEY_UNLINK = "ConfigurationView.Popup.unlink";
- private static final String KEY_REMOVE_PRESERVED =
- "ConfigurationView.Popup.removePreserved";
- private static final String KEY_SHOW_STATUS =
- "ConfigurationView.Popup.showStatus";
- private static final String KEY_HISTORY_FOLDER =
- "ConfigurationView.historyFolder";
- private static final String KEY_SAVED_FOLDER =
- "ConfigurationView.savedFolder";
- private static final String KEY_STATUS_TITLE =
- "ConfigurationView.statusTitle";
- private static final String KEY_STATUS_DEFAULT =
- "ConfigurationView.statusDefault";
- private static final String KEY_MISSING_FEATURE =
- "ConfigurationView.missingFeature";
- private static final String KEY_SAVING_ERRORS =
- "ConfigurationView.savingErrors";
-
- abstract class ViewFolder extends UIModelObject {
- private String label;
- private Image image;
-
- public ViewFolder(String label) {
- this.label = label;
- String imageKey = ISharedImages.IMG_OBJ_FOLDER;
- image =
- PlatformUI.getWorkbench().getSharedImages().getImage(imageKey);
- }
-
- public Object getAdapter(Class key) {
- return null;
- }
-
- public Image getImage() {
- return image;
- }
-
- public String toString() {
- return label;
- }
- public abstract Object[] getChildren();
- }
-
- class SavedFolder extends ViewFolder {
- public SavedFolder() {
- super(UpdateUI.getString(KEY_SAVED_FOLDER));
- }
- public Object[] getChildren() {
- try {
- ILocalSite localSite = SiteManager.getLocalSite();
- return invertArray(
- makeChildren(localSite.getPreservedConfigurations()));
- } catch (CoreException e) {
- return new Object[0];
- }
- }
-
- private Object[] makeChildren(IInstallConfiguration[] preserved) {
- Object[] children = new Object[preserved.length];
- for (int i = 0; i < preserved.length; i++) {
- children[i] = new PreservedConfiguration(preserved[i]);
- }
- return children;
- }
- }
-
- class HistoryFolder extends ViewFolder {
- public HistoryFolder() {
- super(UpdateUI.getString(KEY_HISTORY_FOLDER));
- }
- public Object[] getChildren() {
- try {
- ILocalSite localSite = SiteManager.getLocalSite();
- return invertArray(localSite.getConfigurationHistory());
- } catch (CoreException e) {
- return new Object[0];
- }
- }
- }
-
- class ConfigurationSorter extends ViewerSorter {
- public int category(Object obj) {
- // Top level
- if (obj instanceof ILocalSite)
- return 1;
- if (obj.equals(historyFolder))
- return 2;
- if (obj.equals(savedFolder))
- return 3;
-
- // sites
- if (obj instanceof IConfiguredSiteAdapter) {
- IConfiguredSiteAdapter adapter = (IConfiguredSiteAdapter)obj;
- IConfiguredSite csite = adapter.getConfiguredSite();
- if (csite.isProductSite()) return 1;
- if (csite.isExtensionSite()) return 2;
- return 3;
- }
-
- return super.category(obj);
- }
- public int compare(Viewer viewer, Object e1, Object e2) {
- if (e1 instanceof IInstallConfiguration
- && e2 instanceof IInstallConfiguration) {
- return 0;
- }
- return super.compare(viewer, e1, e2);
- }
- }
-
- class LocalSiteProvider
- extends DefaultContentProvider
- implements ITreeContentProvider {
- public void inputChanged(
- Viewer viewer,
- Object oldInput,
- Object newInput) {
- if (newInput == null)
- return;
- updateTitle(newInput);
- }
- /**
- * @see ITreeContentProvider#getChildren(Object)
- */
- public Object[] getChildren(Object parent) {
- if (parent instanceof UpdateModel) {
- ILocalSite localSite = getLocalSite();
- if (localSite != null)
- return new Object[] {
- localSite,
- historyFolder,
- savedFolder };
- else
- return new Object[0];
- }
- if (parent instanceof ILocalSite) {
- return openLocalSite();
- }
- if (parent instanceof ViewFolder) {
- return ((ViewFolder) parent).getChildren();
- }
- if (parent instanceof PreservedConfiguration) {
- // resolve the adapter
- parent = ((PreservedConfiguration) parent).getConfiguration();
- }
- if (parent instanceof IInstallConfiguration) {
- return getConfigurationSites((IInstallConfiguration) parent);
- }
- if (parent instanceof IConfiguredSiteAdapter) {
- IConfiguredSiteAdapter adapter =
- (IConfiguredSiteAdapter) parent;
- boolean showUnconf = showUnconfFeaturesAction.isChecked();
- return getFeatures(adapter, !showUnconf);
- }
- if (parent instanceof ConfiguredFeatureAdapter) {
- return ((ConfiguredFeatureAdapter) parent).getIncludedFeatures(
- null);
- }
- return new Object[0];
- }
-
- private Object[] getConfigurationSites(final IInstallConfiguration config) {
- final Object[][] bag = new Object[1][];
- BusyIndicator
- .showWhile(
- getViewer().getControl().getDisplay(),
- new Runnable() {
- public void run() {
- IConfiguredSite[] sites = config.getConfiguredSites();
- Object[] adapters = new Object[sites.length];
- for (int i = 0; i < sites.length; i++) {
- adapters[i] =
- new ConfiguredSiteAdapter(config, sites[i]);
- }
- bag[0] = adapters;
- }
- });
- return bag[0];
- }
-
- public Object getParent(Object child) {
- return null;
- }
- public boolean hasChildren(Object parent) {
- if (parent instanceof ConfiguredFeatureAdapter) {
- return ((ConfiguredFeatureAdapter) parent).hasIncludedFeatures(
- null);
- }
- if (parent instanceof ConfiguredSiteAdapter) {
- IConfiguredSite site =
- ((ConfiguredSiteAdapter) parent).getConfiguredSite();
- boolean showUnconf = showUnconfFeaturesAction.isChecked();
- if (!showUnconf && site.isEnabled() == false)
- return false;
- }
- return true;
- }
- public Object[] getElements(Object input) {
- return getChildren(input);
- }
- }
-
- class LocalSiteLabelProvider extends LabelProvider {
- public String getText(Object obj) {
- if (obj instanceof ILocalSite) {
- AboutInfo info = UpdateUI.getDefault().getAboutInfo();
- String productName = info.getProductName();
- if (productName != null)
- return productName;
- return UpdateUI.getString(KEY_CURRENT);
- }
- if (obj instanceof IInstallConfiguration) {
- IInstallConfiguration config = (IInstallConfiguration) obj;
- return config.getLabel();
- }
- if (obj instanceof IConfiguredSiteAdapter) {
- IConfiguredSite csite =
- ((IConfiguredSiteAdapter) obj).getConfiguredSite();
- ISite site = csite.getSite();
- return site.getURL().toString();
- }
- if (obj instanceof IFeatureAdapter) {
- try {
- IFeature feature = ((IFeatureAdapter) obj).getFeature(null);
- if (feature instanceof MissingFeature) {
- return UpdateUI.getFormattedMessage(
- KEY_MISSING_FEATURE,
- feature.getLabel());
- }
- String version =
- feature
- .getVersionedIdentifier()
- .getVersion()
- .toString();
- return feature.getLabel() + " " + version;
- } catch (CoreException e) {
- return "Error";
- }
- }
- return super.getText(obj);
- }
- public Image getImage(Object obj) {
- UpdateLabelProvider provider =
- UpdateUI.getDefault().getLabelProvider();
- if (obj instanceof ILocalSite)
- return eclipseImage;
- if (obj instanceof IFeatureAdapter) {
- return getFeatureImage(provider, (IFeatureAdapter) obj);
- }
- if (obj instanceof IConfiguredSiteAdapter) {
- IConfiguredSite csite =
- ((IConfiguredSiteAdapter) obj).getConfiguredSite();
- int flags =
- csite.isUpdatable() ? 0 : UpdateLabelProvider.F_LINKED;
- if (csite.isEnabled() == false)
- flags |= UpdateLabelProvider.F_UNCONFIGURED;
- ImageDescriptor desc = provider.getLocalSiteDescriptor(csite);
- return provider.get(desc, flags);
- }
- if (obj instanceof SavedFolder) {
- return provider.get(UpdateUIImages.DESC_SAVED_OBJ);
- }
- if (obj instanceof HistoryFolder) {
- return provider.get(UpdateUIImages.DESC_HISTORY_OBJ);
- }
- if (obj instanceof PreservedConfiguration) {
- obj = ((PreservedConfiguration) obj).getConfiguration();
- }
- if (obj instanceof IInstallConfiguration) {
- IInstallConfiguration config = (IInstallConfiguration) obj;
- int flags =
- config.isCurrent() ? SharedLabelProvider.F_CURRENT : 0;
-
- boolean currentTimeline = isCurrentTimeline(config);
- if (!currentTimeline)
- flags |= SharedLabelProvider.F_MOD;
- return provider.get(UpdateUIImages.DESC_CONFIG_OBJ, flags);
- }
- return null;
- }
-
- private boolean isCurrentTimeline(IInstallConfiguration config) {
- ILocalSite localSite = getLocalSite();
- if (localSite == null)
- return true;
- IInstallConfiguration cconfig = localSite.getCurrentConfiguration();
- return config.getTimeline() == cconfig.getTimeline();
- }
-
- private Image getFeatureImage(
- UpdateLabelProvider provider,
- IFeatureAdapter adapter) {
- boolean configured = true;
- boolean updated = false;
- boolean current = true;
- if (adapter instanceof IConfiguredFeatureAdapter) {
- IConfiguredFeatureAdapter cadapter =
- (IConfiguredFeatureAdapter) adapter;
- configured = cadapter.isConfigured();
- updated = cadapter.isUpdated();
- current = cadapter.getInstallConfiguration().isCurrent();
- }
- ILocalSite localSite = getLocalSite();
- try {
- IFeature feature = adapter.getFeature(null);
- if (feature instanceof MissingFeature) {
- MissingFeature mfeature = (MissingFeature) feature;
- if (mfeature.isOptional() == false)
- return provider.get(
- UpdateUIImages.DESC_FEATURE_OBJ,
- UpdateLabelProvider.F_ERROR);
- return provider.get(
- UpdateUIImages.DESC_NOTINST_FEATURE_OBJ);
- }
- int code = IFeature.STATUS_HAPPY;
- ImageDescriptor baseDesc;
- int flags = 0;
- if (current) {
- IStatus status = localSite.getFeatureStatus(feature);
- code = getStatusCode(feature, status);
- }
- boolean efix = feature.isPatch();
- baseDesc =
- efix
- ? UpdateUIImages.DESC_EFIX_OBJ
- : (configured
- ? UpdateUIImages.DESC_FEATURE_OBJ
- : UpdateUIImages.DESC_UNCONF_FEATURE_OBJ);
- if (efix && !configured)
- flags |= UpdateLabelProvider.F_UNCONFIGURED;
- switch (code) {
- case IFeature.STATUS_UNHAPPY :
- flags |= UpdateLabelProvider.F_ERROR;
- break;
- case IFeature.STATUS_AMBIGUOUS :
- flags |= UpdateLabelProvider.F_WARNING;
- break;
- default :
- if (configured && updated)
- flags |= UpdateLabelProvider.F_UPDATED;
- break;
- }
- return provider.get(baseDesc, flags);
- } catch (CoreException e) {
- return provider.get(
- UpdateUIImages.DESC_FEATURE_OBJ,
- UpdateLabelProvider.F_ERROR);
- }
- }
- }
-
- public ConfigurationView() {
- UpdateUI.getDefault().getLabelProvider().connect(this);
- initializeImages();
- savedFolder = new SavedFolder();
- historyFolder = new HistoryFolder();
- }
-
- private void initializeImages() {
- ImageDescriptor edesc = UpdateUIImages.DESC_APP_OBJ;
- AboutInfo info = UpdateUI.getDefault().getAboutInfo();
- if (info.getWindowImage() != null)
- edesc = info.getWindowImage();
- eclipseImage = UpdateUI.getDefault().getLabelProvider().get(edesc);
- }
-
- public void initProviders() {
- final TreeViewer treeViewer = getTreeViewer();
- treeViewer.setContentProvider(new LocalSiteProvider());
- treeViewer.setInput(UpdateUI.getDefault().getUpdateModel());
- treeViewer.setLabelProvider(new LocalSiteLabelProvider());
- treeViewer.setSorter(new ConfigurationSorter());
- treeViewer.addFilter(new ViewerFilter() {
- public boolean select(Viewer v, Object parent, Object element) {
- if (element instanceof IConfiguredFeatureAdapter) {
- IConfiguredFeatureAdapter adapter =
- (IConfiguredFeatureAdapter) element;
- if (adapter.isConfigured())
- return true;
- boolean showUnconf = showUnconfFeaturesAction.isChecked();
- return showUnconf;
- }
- return true;
- }
- });
- try {
- ILocalSite localSite = SiteManager.getLocalSite();
- localSite.addLocalSiteChangedListener(this);
- } catch (CoreException e) {
- UpdateUI.logException(e);
- }
- UpdateModel model = UpdateUI.getDefault().getUpdateModel();
- modelListener = new IUpdateModelChangedListener() {
- public void objectsAdded(Object parent, Object[] children) {
- }
- public void objectsRemoved(Object parent, Object[] children) {
- }
- public void objectChanged(final Object obj, String property) {
- if (refreshLock) return;
- getControl().getDisplay().asyncExec(new Runnable() {
- public void run() {
- treeViewer.refresh();
- }
- });
- }
- };
- model.addUpdateModelChangedListener(modelListener);
- WorkbenchHelp.setHelp(
- getControl(),
- "org.eclipse.update.ui.ConfigurationView");
- }
-
- private ILocalSite getLocalSite() {
- try {
- return SiteManager.getLocalSite();
- } catch (CoreException e) {
- UpdateUI.logException(e);
- return null;
- }
- }
-
- private Object[] openLocalSite() {
- final Object[][] bag = new Object[1][];
- BusyIndicator.showWhile(getControl().getDisplay(), new Runnable() {
- public void run() {
- try {
- ILocalSite localSite = SiteManager.getLocalSite();
- IInstallConfiguration config =
- localSite.getCurrentConfiguration();
- IConfiguredSite[] sites = config.getConfiguredSites();
- Object[] result = new Object[sites.length];
- for (int i = 0; i < sites.length; i++) {
- result[i] =
- new ConfiguredSiteAdapter(config, sites[i]);
- }
- if (!initialized) {
- config.addInstallConfigurationChangedListener(
- ConfigurationView.this);
- initialized = true;
- }
- bag[0] = result;
- } catch (CoreException e) {
- UpdateUI.logException(e);
- bag[0] = new Object[0];
- }
- }
- });
- return bag[0];
- }
-
- public void dispose() {
- UpdateUI.getDefault().getLabelProvider().disconnect(this);
- if (initialized) {
- try {
- ILocalSite localSite = SiteManager.getLocalSite();
- localSite.removeLocalSiteChangedListener(this);
- IInstallConfiguration config =
- localSite.getCurrentConfiguration();
- config.removeInstallConfigurationChangedListener(this);
- } catch (CoreException e) {
- UpdateUI.logException(e);
- }
- initialized = false;
- }
- UpdateModel model = UpdateUI.getDefault().getUpdateModel();
- model.removeUpdateModelChangedListener(modelListener);
- super.dispose();
- }
- private Object getSelectedObject() {
- ISelection selection = getTreeViewer().getSelection();
- if (selection instanceof IStructuredSelection
- && !selection.isEmpty()) {
- IStructuredSelection ssel = (IStructuredSelection) selection;
- if (ssel.size() == 1) {
- return ssel.getFirstElement();
- }
- }
- return null;
- }
-
- public void selectHistoryFolder() {
- getTreeViewer().setExpandedState(historyFolder, true);
- getTreeViewer().setSelection(
- new StructuredSelection(historyFolder),
- true);
- }
- public void selectCurrentConfiguration() {
- getTreeViewer().setSelection(
- new StructuredSelection(getLocalSite()),
- true);
- }
-
- public void expandPreservedConfigurations() {
- getTreeViewer().refresh(savedFolder);
- getTreeViewer().setExpandedState(savedFolder, true);
- }
-
- private boolean canPreserve() {
- ISelection selection = getTreeViewer().getSelection();
- if (selection instanceof IStructuredSelection) {
- IStructuredSelection ssel = (IStructuredSelection) selection;
- if (ssel.isEmpty())
- return false;
- for (Iterator iter = ssel.iterator(); iter.hasNext();) {
- Object obj = iter.next();
- if (!(obj instanceof IInstallConfiguration
- || obj instanceof ILocalSite))
- return false;
- }
- return true;
- }
- return false;
- }
-
- private void doPreserve() {
- ISelection selection = getTreeViewer().getSelection();
- ILocalSite localSite;
- ArrayList errors = new ArrayList();
- int nsaved = 0;
- try {
- localSite = SiteManager.getLocalSite();
- } catch (CoreException e) {
- UpdateUI.logException(e);
- return;
- }
- if (selection instanceof IStructuredSelection) {
- IStructuredSelection ssel = (IStructuredSelection) selection;
- if (ssel.isEmpty())
- return;
- for (Iterator iter = ssel.iterator(); iter.hasNext();) {
- Object obj = iter.next();
- IInstallConfiguration target =
- getSelectedConfiguration(obj, false);
- if (target == null)
- continue;
- try {
- localSite.addToPreservedConfigurations(target);
- nsaved++;
- } catch (CoreException e) {
- errors.add(
- new Status(
- IStatus.ERROR,
- UpdateUI.getPluginId(),
- IStatus.OK,
- null,
- e));
- }
- }
- }
- if (nsaved > 0) {
- try {
- localSite.save();
- } catch (CoreException e) {
- UpdateUI.logException(e);
- }
- getTreeViewer().refresh(savedFolder);
- getTreeViewer().expandToLevel(savedFolder, 1);
- }
- if (errors.size() > 0) {
- IStatus[] children =
- (IStatus[]) errors.toArray(new IStatus[errors.size()]);
- String message = UpdateUI.getString(KEY_SAVING_ERRORS);
- MultiStatus status =
- new MultiStatus(
- UpdateUI.getPluginId(),
- IStatus.OK,
- children,
- message,
- null);
- CoreException e = new CoreException(status);
- UpdateUI.logException(e);
- }
- }
-
- private boolean canDelete() {
- ISelection selection = getTreeViewer().getSelection();
- if (selection instanceof IStructuredSelection) {
- IStructuredSelection ssel = (IStructuredSelection) selection;
- if (ssel.isEmpty())
- return false;
- for (Iterator iter = ssel.iterator(); iter.hasNext();) {
- Object obj = iter.next();
- if (!(obj instanceof PreservedConfiguration))
- return false;
- }
- return true;
- }
- return false;
- }
-
- private void doDelete() {
- ISelection selection = getTreeViewer().getSelection();
- ILocalSite localSite;
-
- if (!confirmDeletion())
- return;
-
- int nremoved = 0;
- try {
- localSite = SiteManager.getLocalSite();
- } catch (CoreException e) {
- UpdateUI.logException(e);
- return;
- }
- if (selection instanceof IStructuredSelection) {
- IStructuredSelection ssel = (IStructuredSelection) selection;
- if (ssel.isEmpty())
- return;
- for (Iterator iter = ssel.iterator(); iter.hasNext();) {
- Object obj = iter.next();
- IInstallConfiguration target = null;
- if (obj instanceof PreservedConfiguration)
- target = ((PreservedConfiguration) obj).getConfiguration();
- if (target == null)
- continue;
- localSite.removeFromPreservedConfigurations(target);
- nremoved++;
- }
- }
- if (nremoved > 0) {
- try {
- localSite.save();
- } catch (CoreException e) {
- UpdateUI.logException(e);
- }
- getTreeViewer().refresh(savedFolder);
- }
- }
-
- private IInstallConfiguration getSelectedConfiguration(
- Object obj,
- boolean onlyPreserved) {
- if (!onlyPreserved) {
- if (obj instanceof IInstallConfiguration)
- return (IInstallConfiguration) obj;
- if (obj instanceof ILocalSite)
- return ((ILocalSite) obj).getCurrentConfiguration();
- }
- if (obj instanceof PreservedConfiguration)
- return ((PreservedConfiguration) obj).getConfiguration();
- return null;
- }
-
- private boolean isPreserved(IInstallConfiguration config) {
- try {
- ILocalSite localSite = SiteManager.getLocalSite();
- IInstallConfiguration[] preservedConfigs =
- localSite.getPreservedConfigurations();
- for (int i = 0; i < preservedConfigs.length; i++) {
- if (preservedConfigs[i].equals(config))
- return true;
- }
- return false;
- } catch (CoreException e) {
- return false;
- }
- }
-
- protected void makeActions() {
- super.makeActions();
- initDrillDown();
- final IDialogSettings settings =
- UpdateUI.getDefault().getDialogSettings();
- boolean showUnconfState = settings.getBoolean(STATE_SHOW_UNCONF);
- showUnconfFeaturesAction = new Action() {
- public void run() {
- getTreeViewer().refresh();
- //getTreeViewer().refresh();
- settings.put(
- STATE_SHOW_UNCONF,
- showUnconfFeaturesAction.isChecked());
- }
- };
- WorkbenchHelp.setHelp(
- showUnconfFeaturesAction,
- "org.eclipse.update.ui.CofigurationView_showUnconfFeaturesAction");
- showUnconfFeaturesAction.setText(
- UpdateUI.getString(KEY_SHOW_UNCONF_FEATURES));
- showUnconfFeaturesAction.setImageDescriptor(
- UpdateUIImages.DESC_UNCONF_FEATURE_OBJ);
- showUnconfFeaturesAction.setChecked(showUnconfState);
- showUnconfFeaturesAction.setToolTipText(
- UpdateUI.getString(KEY_SHOW_UNCONF_FEATURES_TOOLTIP));
- super.makeActions();
- initDrillDown();
- revertAction = new Action() {
- public void run() {
- Object obj = getSelectedObject();
- IInstallConfiguration target =
- getSelectedConfiguration(obj, false);
- if (target != null)
- RevertSection.performRevert(target);
- }
- };
- revertAction.setText(UpdateUI.getString(KEY_RESTORE));
- WorkbenchHelp.setHelp(
- revertAction,
- "org.eclipse.update.ui.CofigurationView_revertAction");
-
- showStatusAction = new Action() {
- public void run() {
- Object obj = getSelectedObject();
- try {
- if (obj instanceof IFeatureAdapter) {
- IFeature feature =
- ((IFeatureAdapter) obj).getFeature(null);
- showFeatureStatus(feature);
- }
- } catch (CoreException e) {
- UpdateUI.logException(e);
- }
- }
- };
- WorkbenchHelp.setHelp(
- showStatusAction,
- "org.eclipse.update.ui.CofigurationView_showStatusAction");
- showStatusAction.setText(UpdateUI.getString(KEY_SHOW_STATUS));
-
- preserveAction = new Action() {
- public void run() {
- doPreserve();
- }
- };
- WorkbenchHelp.setHelp(
- preserveAction,
- "org.eclipse.update.ui.CofigurationView_preserveAction");
- preserveAction.setText(UpdateUI.getString(KEY_PRESERVE));
- removePreservedAction = new Action() {
- public void run() {
- doDelete();
- }
- };
- WorkbenchHelp.setHelp(
- removePreservedAction,
- "org.eclipse.update.ui.CofigurationView_removePreservedAction");
- removePreservedAction.setText(UpdateUI.getString(KEY_REMOVE_PRESERVED));
-
- unlinkAction = new Action() {
- public void run() {
- performUnlink();
- }
- };
- WorkbenchHelp.setHelp(
- unlinkAction,
- "org.eclipse.update.ui.CofigurationView_unlinkAction");
- unlinkAction.setText(UpdateUI.getString(KEY_UNLINK));
-
- siteStateAction = new SiteStateAction();
-
- propertiesAction =
- new PropertyDialogAction(
- UpdateUI.getActiveWorkbenchShell(),
- getTreeViewer());
- WorkbenchHelp.setHelp(
- propertiesAction,
- "org.eclipse.update.ui.CofigurationView_propertiesAction");
- }
-
- private void showFeatureStatus(IFeature feature) throws CoreException {
- IStatus status;
- if (feature instanceof MissingFeature) {
- MissingFeature missingFeature = (MissingFeature) feature;
- String msg;
- int severity;
-
- if (missingFeature.isOptional()) {
- severity = IStatus.INFO;
- msg = UpdateUI.getString(KEY_MISSING_OPTIONAL_STATUS);
- } else {
- severity = IStatus.ERROR;
- msg = UpdateUI.getString(KEY_MISSING_STATUS);
- }
- status =
- new Status(severity, UpdateUI.PLUGIN_ID, IStatus.OK, msg, null);
- } else {
- status = getLocalSite().getFeatureStatus(feature);
- }
- String title = UpdateUI.getString(KEY_STATUS_TITLE);
- int severity = status.getSeverity();
- String message = status.getMessage();
-
- if (severity == IStatus.ERROR
- && status.getCode() == IFeature.STATUS_UNHAPPY) {
- //see if this is a false alarm
- int code = getStatusCode(feature, status);
- if (code == IFeature.STATUS_HAPPY) {
- // This was a patch referencing a
- // subsumed patch - change to happy.
- severity = IStatus.INFO;
- message = null;
- }
- }
-
- switch (severity) {
- case IStatus.ERROR :
- ErrorDialog.openError(
- getControl().getShell(),
- title,
- null,
- status);
- break;
- case IStatus.WARNING :
- MessageDialog.openWarning(
- getControl().getShell(),
- title,
- status.getMessage());
- break;
- case IStatus.INFO :
- default :
- if (message == null || message.length() == 0)
- message = UpdateUI.getString(KEY_STATUS_DEFAULT);
- MessageDialog.openInformation(
- getControl().getShell(),
- title,
- message);
- }
- }
-
- protected void fillActionBars(IActionBars bars) {
- IToolBarManager tbm = bars.getToolBarManager();
- tbm.add(showUnconfFeaturesAction);
- tbm.add(new Separator());
- addDrillDownAdapter(bars);
- tbm.add(new Separator());
- tbm.add(collapseAllAction);
- }
- protected void fillContextMenu(IMenuManager manager) {
- Object obj = getSelectedObject();
- IInstallConfiguration config = getSelectedConfiguration(obj, false);
- if (config != null && !config.isCurrent()) {
- manager.add(revertAction);
- manager.add(new Separator());
- }
- if (canPreserve())
- manager.add(preserveAction);
- if (canDelete())
- manager.add(removePreservedAction);
-
- IConfiguredSite site = getSelectedSite(obj);
- if (site != null) {
- IInstallConfiguration cfg = site.getInstallConfiguration();
- if (cfg != null && cfg.isCurrent()) {
- try {
- if (site.isExtensionSite() && !site.isNativelyLinked()) {
- manager.add(unlinkAction);
- }
- } catch (CoreException e) {
- UpdateUI.logException(e);
- }
- }
- siteStateAction.setSite(site);
- manager.add(siteStateAction);
- }
- manager.add(new Separator());
- addDrillDownAdapter(manager);
- manager.add(new Separator());
- if (obj instanceof IConfiguredFeatureAdapter) {
- IConfiguredFeatureAdapter adapter = (IConfiguredFeatureAdapter) obj;
- if (adapter.getInstallConfiguration().isCurrent())
- manager.add(showStatusAction);
- }
- super.fillContextMenu(manager);
- if (obj instanceof PreservedConfiguration
- || obj instanceof IInstallConfiguration)
- manager.add(propertiesAction);
-
- //defect 14684
- //super.fillContextMenu(manager);
- }
-
- private IConfiguredSite getSelectedSite(Object obj) {
- if (obj instanceof ConfiguredSiteAdapter) {
- return ((ConfiguredSiteAdapter) obj).getConfiguredSite();
- }
- return null;
- }
-
- private void performUnlink() {
- IConfiguredSite site = getSelectedSite(getSelectedObject());
- if (site == null)
- return;
- IInstallConfiguration config = site.getInstallConfiguration();
- config.removeConfiguredSite(site);
- try {
- getLocalSite().save();
- UpdateUI.informRestartNeeded();
- } catch (CoreException e) {
- UpdateUI.logException(e);
- }
- }
-
- private void registerListeners() {
- try {
- ILocalSite localSite = SiteManager.getLocalSite();
- IInstallConfiguration config = localSite.getCurrentConfiguration();
- config.addInstallConfigurationChangedListener(this);
- IConfiguredSite[] isites = config.getConfiguredSites();
- for (int i = 0; i < isites.length; i++) {
- isites[i].addConfiguredSiteChangedListener(this);
- }
- } catch (CoreException e) {
- UpdateUI.logException(e);
- }
- }
-
- private void unregisterListeners() {
- try {
- ILocalSite localSite = SiteManager.getLocalSite();
- IInstallConfiguration config = localSite.getCurrentConfiguration();
- config.removeInstallConfigurationChangedListener(this);
- IConfiguredSite[] isites = config.getConfiguredSites();
- for (int i = 0; i < isites.length; i++) {
- isites[i].removeConfiguredSiteChangedListener(this);
- }
- } catch (CoreException e) {
- UpdateUI.logException(e);
- }
- } /**
- * @see IInstallConfigurationChangedListener#installSiteAdded(ISite)
- */
- public void installSiteAdded(IConfiguredSite csite) {
- asyncRefresh();
- } /**
- * @see IInstallConfigurationChangedListener#installSiteRemoved(ISite)
- */
- public void installSiteRemoved(IConfiguredSite site) {
- asyncRefresh();
- } /**
- * @see IConfiguredSiteChangedListener#featureInstalled(IFeature)
- */
- public void featureInstalled(IFeature feature) {
- asyncRefresh();
- } /**
- * @see IConfiguredSiteChangedListener#featureUninstalled(IFeature)
- */
- public void featureRemoved(IFeature feature) {
- asyncRefresh();
- } /**
- * @see IConfiguredSiteChangedListener#featureUConfigured(IFeature)
- */
- public void featureConfigured(IFeature feature) {
- };
- /**
- * @see IConfiguredSiteChangedListener#featureUConfigured(IFeature)
- */
- public void featureUnconfigured(IFeature feature) {
- };
- public void currentInstallConfigurationChanged(IInstallConfiguration configuration) {
- asyncRefresh();
- }
-
- public void installConfigurationRemoved(IInstallConfiguration configuration) {
- asyncRefresh();
- }
-
- private void asyncRefresh() {
- Display display = SWTUtil.getStandardDisplay();
- if (display == null)
- return;
- if (getControl().isDisposed())
- return;
- display.asyncExec(new Runnable() {
- public void run() {
- if (!getControl().isDisposed())
- getTreeViewer().refresh();
- }
- });
- }
- private Object[] invertArray(Object[] array) {
- Object[] invertedArray = new Object[array.length];
- for (int i = 0; i < array.length; i++) {
- invertedArray[i] = array[array.length - 1 - i];
- }
- return invertedArray;
- }
- private int getStatusCode(IFeature feature, IStatus status) {
- int code = status.getCode();
- if (code == IFeature.STATUS_UNHAPPY) {
- if (status.isMultiStatus()) {
- IStatus[] children = status.getChildren();
- for (int i = 0; i < children.length; i++) {
- IStatus child = children[i];
- if (child.isMultiStatus())
- return code;
- if (child.getCode() != IFeature.STATUS_DISABLED)
- return code;
- }
- // If we are here, global status is unhappy
- // because one or more included features
- // is disabled.
- if (arePatchesObsolete(feature)) {
- // The disabled included features
- // are old patches that are now
- // subsumed by better versions of
- // the features they were designed to
- // patch.
- return IFeature.STATUS_HAPPY;
- }
- }
- }
- return code;
- }
- private boolean arePatchesObsolete(IFeature feature) {
- // Check all the included features that
- // are unconfigured, and see if their patch
- // references are better than the original.
- try {
- IFeatureReference[] irefs = feature.getIncludedFeatureReferences();
- for (int i = 0; i < irefs.length; i++) {
- IFeatureReference iref = irefs[i];
- IFeature ifeature = iref.getFeature(null);
- IConfiguredSite csite =
- ifeature.getSite().getCurrentConfiguredSite();
- if (!csite.isConfigured(ifeature)) {
- if (!isPatchHappy(ifeature))
- return false;
- }
- }
- } catch (CoreException e) {
- return false;
- }
- // All checks went well
- return true;
- }
- private boolean isPatchHappy(IFeature feature) throws CoreException {
- // If this is a patch and it includes
- // another patch and the included patch
- // is disabled but the feature it was declared
- // to patch is now newer (and is presumed to
- // contain the now disabled patch), and
- // the newer patched feature is enabled,
- // a 'leap of faith' assumption can be
- // made:
-
- // Although the included patch is disabled,
- // the feature it was designed to patch
- // is now newer and most likely contains
- // the equivalent fix and more. Consequently,
- // we can claim that the status and the error
- // icon overlay are misleading because
- // all the right plug-ins are configured.
- IImport[] imports = feature.getImports();
- IImport patchReference = null;
- for (int i = 0; i < imports.length; i++) {
- IImport iimport = imports[i];
- if (iimport.isPatch()) {
- patchReference = iimport;
- break;
- }
- }
- if (patchReference == null)
- return false;
- VersionedIdentifier refVid = patchReference.getVersionedIdentifier();
-
- // Find the patched feature and
- IConfiguredSite csite = feature.getSite().getCurrentConfiguredSite();
- if (csite == null)
- return false;
-
- IFeatureReference[] crefs = csite.getConfiguredFeatures();
- for (int i = 0; i < crefs.length; i++) {
- IFeatureReference cref = crefs[i];
- VersionedIdentifier cvid = cref.getVersionedIdentifier();
- if (cvid.getIdentifier().equals(refVid.getIdentifier())) {
- // This is the one.
- if (cvid.getVersion().isGreaterThan(refVid.getVersion())) {
- // Bingo: we found the referenced feature
- // and its version is greater -
- // we can assume that it contains better code
- // than the patch that referenced the
- // older version.
- return true;
- }
- }
- }
- return false;
- }
-
- private Object[] getFeatures(
- final IConfiguredSiteAdapter siteAdapter,
- final boolean configuredOnly) {
- final IConfiguredSite csite = siteAdapter.getConfiguredSite();
- final Object[][] bag = new Object[1][];
- refreshLock=true;
-
- IRunnableWithProgress op = new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) {
- ArrayList result = new ArrayList();
- IFeatureReference[] refs;
-
- if (configuredOnly)
- refs = csite.getConfiguredFeatures();
- else {
- ISite site = csite.getSite();
- refs = site.getFeatureReferences();
- }
- monitor.beginTask(
- UpdateUI.getString("ConfigurationView.loading"),
- refs.length);
-
- for (int i = 0; i < refs.length; i++) {
- IFeatureReference ref = refs[i];
- IFeature feature;
- try {
- monitor.subTask(ref.getURL().toString());
- feature = ref.getFeature(null);
- } catch (CoreException e) {
- feature =
- new MissingFeature(ref.getSite(), ref.getURL());
- }
- monitor.worked(1);
- result.add(
- new ConfiguredFeatureAdapter(
- siteAdapter,
- feature,
- csite.isConfigured(feature),
- false,
- false));
- }
- monitor.done();
- bag[0] = getRootFeatures(result);
- }
- };
- try {
- getViewSite().getWorkbenchWindow().run(true, false, op);
- } catch (InterruptedException e) {
- } catch (InvocationTargetException e) {
- }
- finally {
- refreshLock = false;
- }
- return bag[0];
- }
-
- private Object[] getRootFeatures(ArrayList list) {
- ArrayList children = new ArrayList();
- ArrayList result = new ArrayList();
- try {
- for (int i = 0; i < list.size(); i++) {
- ConfiguredFeatureAdapter cf =
- (ConfiguredFeatureAdapter) list.get(i);
- IFeature feature = cf.getFeature(null);
- if (feature != null)
- addChildFeatures(
- feature,
- cf.getConfiguredSite(),
- children,
- cf.isConfigured());
- }
- for (int i = 0; i < list.size(); i++) {
- ConfiguredFeatureAdapter cf =
- (ConfiguredFeatureAdapter) list.get(i);
- IFeature feature = cf.getFeature(null);
- if (feature != null
- && isChildFeature(feature, children) == false)
- result.add(cf);
- }
- } catch (CoreException e) {
- return list.toArray();
- }
- return result.toArray();
- }
-
- private void addChildFeatures(
- IFeature feature,
- IConfiguredSite csite,
- ArrayList children,
- boolean configured) {
- try {
- IIncludedFeatureReference[] included =
- feature.getIncludedFeatureReferences();
- for (int i = 0; i < included.length; i++) {
- IFeature childFeature;
- try {
- childFeature =
- included[i].getFeature(!configured, csite, null);
- } catch (CoreException e) {
- childFeature = new MissingFeature(included[i]);
- }
- children.add(childFeature);
- }
- } catch (CoreException e) {
- UpdateUI.logException(e);
- }
- }
-
- private boolean isChildFeature(IFeature feature, ArrayList children) {
- for (int i = 0; i < children.size(); i++) {
- IFeature child = (IFeature) children.get(i);
- if (feature
- .getVersionedIdentifier()
- .equals(child.getVersionedIdentifier()))
- return true;
- }
- return false;
- }
- protected Object getRootObject() {
- return UpdateUI.getDefault().getUpdateModel();
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/DetailsView.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/DetailsView.java
deleted file mode 100644
index 339d8fe..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/DetailsView.java
+++ /dev/null
@@ -1,437 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.views;
-import java.io.*;
-import java.util.Vector;
-
-import org.eclipse.help.browser.IBrowser;
-import org.eclipse.help.internal.browser.BrowserManager;
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.program.Program;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.*;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.ui.texteditor.IUpdate;
-import org.eclipse.update.configuration.*;
-import org.eclipse.update.core.IFeature;
-import org.eclipse.update.core.model.ModelObject;
-import org.eclipse.update.internal.ui.*;
-import org.eclipse.update.internal.ui.forms.*;
-import org.eclipse.update.internal.ui.model.*;
-import org.eclipse.update.internal.ui.pages.*;
-import org.eclipse.update.internal.ui.preferences.MainPreferencePage;
-import org.eclipse.update.internal.ui.search.*;
-import org.eclipse.update.ui.forms.internal.engine.FormEngine;
-
-/**
- * Insert the type's description here.
- * @see ViewPart
- */
-public class DetailsView extends MultiPageView {
-
- // NL keys
- private static final String KEY_HOME = "DetailsView.home.label";
- private static final String KEY_BACKWARD = "DetailsView.backward.label";
- private static final String KEY_FORWARD = "DetailsView.forward.label";
- private static final String KEY_T_HOME = "DetailsView.home.tooltip";
- private static final String KEY_T_BACKWARD = "DetailsView.backward.tooltip";
- private static final String KEY_T_FORWARD = "DetailsView.forward.tooltip";
-
- public static final String HOME_PAGE = "Home";
- public static final String SITE_PAGE = "Site";
- public static final String CATEGORY_PAGE = "Category";
- public static final String DETAILS_PAGE = "Details";
- public static final String BROWSER_PAGE = "Browser";
- public static final String CONFIG_PAGE = "Config";
- public static final String INSTALL_CONFIGURATION_PAGE =
- "InstallConfiguration";
- public static final String INSTALL_SITE_PAGE = "InstallSite";
- public static final String MY_COMPUTER_PAGE = "MyComputer";
- public static final String EXTENSION_ROOT_PAGE = "ExtensionRoot";
- public static final String SEARCH_PAGE = "Search";
- public static final String DISCOVERY_PAGE = "Discovery";
- public static final String UNKNOWN_PAGE = "Unknown";
- public static final String MULTIPLE_SELECTION_PAGE = "MultipleSelection";
-
- private Action homeAction;
- private UpdateAction backAction;
- private UpdateAction forwardAction;
- private DetailsHistory history = new DetailsHistory();
- private Vector tmpFiles;
-
- private boolean inHistory = false;
-
- abstract class UpdateAction extends Action implements IUpdate {
- }
-
- /**
- * The constructor.
- */
- public DetailsView() {
- history = new DetailsHistory();
- }
-
- public void createPages() {
- firstPageId = HOME_PAGE;
- formWorkbook.setFirstPageSelected(false);
- MainPage mainPage = new MainPage(this, "Update Home");
- addPage(HOME_PAGE, mainPage);
- DetailsPage detailsPage = new DetailsPage(this, "Details");
- addPage(DETAILS_PAGE, detailsPage);
- SitePage sitePage = new SitePage(this, "Site");
- addPage(SITE_PAGE, sitePage);
- addPage(CATEGORY_PAGE, new CategoryPage(this, "Category"));
- addPage(CONFIG_PAGE, new LocalSitePage(this, "Configuration"));
- addPage(
- INSTALL_CONFIGURATION_PAGE,
- new InstallConfigurationPage(this, "Snapshot"));
- addPage(
- INSTALL_SITE_PAGE,
- new InstallableSitePage(this, "Install Location"));
- addPage(MY_COMPUTER_PAGE, new MyComputerPage(this, "MyComputer"));
- addPage(
- EXTENSION_ROOT_PAGE,
- new ExtensionRootPage(this, "ExtensionRoot"));
- addPage(SEARCH_PAGE, new SearchPage(this, "Search"));
- addPage(
- DISCOVERY_PAGE,
- new DiscoveryFolderPage(this, "Discovery Sites"));
- addPage(MULTIPLE_SELECTION_PAGE, new MultipleSelectionPage(this, "Multiple Selection"));
- addPage(UNKNOWN_PAGE, new UnknownObjectPage(this, "Unknown Object"));
- }
-
- public static boolean showURL(String url) {
- return showURL(url, true);
- }
-
- public static boolean showURL(String url, boolean considerEmbedded) {
- boolean useEmbedded = false;
- boolean focusGrabbed = false;
- boolean win32 = SWT.getPlatform().equals("win32");
-
- url = WebInstallHandler.getEncodedURLName(url);
- if (win32 && considerEmbedded) {
- useEmbedded = MainPreferencePage.getUseEmbeddedBrowser();
- }
- if (useEmbedded) {
- IWorkbenchPage page = UpdateUI.getActivePage();
- try {
- //IViewPart part = page.findView(UpdatePerspective.ID_BROWSER);
- //if (part == null) {
- IViewPart part = page.showView(UpdatePerspective.ID_BROWSER);
- focusGrabbed = true;
- //} else
- //page.bringToTop(part);
- ((IEmbeddedWebBrowser) part).openTo(url);
- } catch (PartInitException e) {
- UpdateUI.logException(e);
- }
- } else {
- if (win32) {
- Program.launch(url);
- } else {
- // defect 11483
- IBrowser browser = BrowserManager.getInstance().createBrowser();
- try {
- browser.displayURL(url);
- }
- catch (Exception e) {
- UpdateUI.logException(e);
- }
- }
- }
- return focusGrabbed;
- }
-
- public void showText(String text) {
- try {
- File file = File.createTempFile("FeatureLicense", ".txt");
- OutputStream stream = new FileOutputStream(file);
- PrintWriter writer = new PrintWriter(stream);
- writer.println(text);
- writer.flush();
- stream.close();
- if (tmpFiles == null)
- tmpFiles = new Vector();
- tmpFiles.add(file.getAbsolutePath());
- showURL("file:///" + file.getAbsolutePath());
- } catch (IOException e) {
- UpdateUI.logException(e);
- }
- }
-
- public void dispose() {
- if (tmpFiles != null) {
- for (int i = 0; i < tmpFiles.size(); i++) {
- String fileName = tmpFiles.get(i).toString();
- File file = new File(fileName);
- file.delete();
- }
- tmpFiles = null;
- }
- super.dispose();
- }
-
- public void createPartControl(Composite parent) {
- super.createPartControl(parent);
- history.add(HOME_PAGE, null);
- makeActions();
- fillActionBars();
- WorkbenchHelp.setHelp(
- formWorkbook.getControl(),
- "org.eclipse.update.ui.DetailsView");
- }
-
- public void showPageWithInput(IWorkbenchPart part, String pageId, Object input) {
- if (pageId.equals(HOME_PAGE) == false) {
- if (input!=null && !(input instanceof UIModelObject
- || input instanceof ModelObject
- || input instanceof IStructuredSelection))
- return;
- }
- showPage(pageId, input);
- if (input != null)
- history.add(pageId, input);
- backAction.update();
- forwardAction.update();
- IWorkbenchPage page = UpdateUI.getActivePage();
- if (page == null)
- return;
- IPerspectiveDescriptor desc = page.getPerspective();
- if (desc == null)
- return;
- String pid = desc.getId();
- if (pid.equals("org.eclipse.update.ui.UpdatePerspective")) {
- IViewPart view = page.findView(UpdatePerspective.ID_DETAILS);
- if (view != null)
- page.bringToTop(view);
- else {
- try {
- page.showView(UpdatePerspective.ID_DETAILS);
- }
- catch (PartInitException e) {
- UpdateUI.logException(e);
- }
- // Restore focus to the selection provider
- if (part!=null) part.setFocus();
- }
- }
- }
-
- private void showWebBookmark(final IWorkbenchPart part, final SiteBookmark bookmark) {
- BusyIndicator
- .showWhile(formWorkbook.getControl().getDisplay(), new Runnable() {
- public void run() {
- boolean focusGrabbed = showURL(bookmark.getURL().toString());
- if (focusGrabbed)
- part.setFocus();
- }
- });
- }
-
- public void selectionChanged(IWorkbenchPart part, ISelection sel) {
- if (part == this)
- return;
- if (part.getSite().getId().equals(UpdatePerspective.ID_BROWSER))
- return;
- if (part instanceof SearchResultView) {
- SearchResultView searchResult = (SearchResultView)part;
- if (searchResult.isSelectionActive()==false)
- return;
- }
- Object el = null;
- if (sel instanceof IStructuredSelection) {
- IStructuredSelection ssel = (IStructuredSelection) sel;
- if (ssel.size() == 1) {
- el = ssel.getFirstElement();
- if (el instanceof IFeature || el instanceof IFeatureAdapter) {
- showPageWithInput(part, DETAILS_PAGE, el);
- return;
- }
- if (el instanceof SiteBookmark) {
- //SiteBookmark bookmark = (SiteBookmark) el;
- //if (!bookmark.isWebBookmark())
- showPageWithInput(part, SITE_PAGE, el);
- //else
- //showWebBookmark(part, bookmark);
- return;
- }
- if (el instanceof SiteCategory) {
- showPageWithInput(part, CATEGORY_PAGE, el);
- return;
- }
- if (el instanceof ILocalSite) {
- showPageWithInput(part, CONFIG_PAGE, el);
- return;
- }
- if (el instanceof IInstallConfiguration
- || el instanceof PreservedConfiguration) {
- showPageWithInput(part, INSTALL_CONFIGURATION_PAGE, el);
- return;
- }
- if (el instanceof IConfiguredSiteAdapter) {
- showPageWithInput(part, INSTALL_SITE_PAGE, el);
- return;
- }
- if (el instanceof MyComputer) {
- showPageWithInput(part, MY_COMPUTER_PAGE, el);
- return;
- }
- if (el instanceof ExtensionRoot) {
- showPageWithInput(part, EXTENSION_ROOT_PAGE, el);
- return;
- }
- if (el instanceof DiscoveryFolder) {
- showPageWithInput(part, DISCOVERY_PAGE, el);
- return;
- }
- if (el instanceof SearchObject) {
- showPageWithInput(part, SEARCH_PAGE, el);
- return;
- }
- if (el instanceof SearchResultSite) {
- showPageWithInput(part, SITE_PAGE, el);
- return;
- }
- //fallback - show empty page
- showPageWithInput(part, UNKNOWN_PAGE, el);
- } else if (ssel.size()>1) {
- showPageWithInput(part, MULTIPLE_SELECTION_PAGE, ssel);
- } else
- // defect 14692
- showPageWithInput(part,
- /*(homeAction != null) ? HOME_PAGE :*/ UNKNOWN_PAGE,
- null);
- }
- }
-
- private void makeActions() {
- homeAction = new Action() {
- public void run() {
- performHome();
- }
- };
- homeAction.setText(UpdateUI.getString(KEY_HOME));
- homeAction.setToolTipText(UpdateUI.getString(KEY_T_HOME));
- homeAction.setImageDescriptor(UpdateUIImages.DESC_HOME_NAV);
- homeAction.setHoverImageDescriptor(
- UpdateUIImages.DESC_HOME_NAV_H);
- homeAction.setDisabledImageDescriptor(
- UpdateUIImages.DESC_HOME_NAV_D);
- WorkbenchHelp.setHelp(
- homeAction,
- "org.eclipse.update.ui.DetailsView_homeAction");
-
- backAction = new UpdateAction() {
- public void run() {
- performBackward();
- }
- public void update() {
- setEnabled(canPerformBackward());
- }
- };
- backAction.setText(UpdateUI.getString(KEY_BACKWARD));
- backAction.setToolTipText(
- UpdateUI.getString(KEY_T_BACKWARD));
- backAction.setImageDescriptor(UpdateUIImages.DESC_BACKWARD_NAV);
- backAction.setHoverImageDescriptor(
- UpdateUIImages.DESC_BACKWARD_NAV_H);
- backAction.setDisabledImageDescriptor(
- UpdateUIImages.DESC_BACKWARD_NAV_D);
- backAction.setEnabled(false);
- WorkbenchHelp.setHelp(
- backAction,
- "org.eclipse.update.ui.DetailsView_backAction");
-
- forwardAction = new UpdateAction() {
- public void run() {
- performForward();
- }
- public void update() {
- setEnabled(canPerformForward());
- }
- };
- forwardAction.setText(UpdateUI.getString(KEY_FORWARD));
- forwardAction.setToolTipText(
- UpdateUI.getString(KEY_T_FORWARD));
- forwardAction.setImageDescriptor(UpdateUIImages.DESC_FORWARD_NAV);
- forwardAction.setHoverImageDescriptor(
- UpdateUIImages.DESC_FORWARD_NAV_H);
- forwardAction.setDisabledImageDescriptor(
- UpdateUIImages.DESC_FORWARD_NAV_D);
- forwardAction.setEnabled(false);
- WorkbenchHelp.setHelp(
- forwardAction,
- "org.eclipse.update.ui.DetailsView_forwardAction");
- }
-
- private void fillActionBars() {
- IActionBars bars = getViewSite().getActionBars();
- IToolBarManager mng = bars.getToolBarManager();
- mng.add(homeAction);
- mng.add(backAction);
- mng.add(forwardAction);
- }
-
- public void contextMenuAboutToShow(IMenuManager menu) {
- Control control =
- formWorkbook.getControl().getDisplay().getFocusControl();
- if (control instanceof FormEngine) {
- ((FormEngine) control).contextMenuAboutToShow(menu);
- }
-
- menu.add(backAction);
- menu.add(forwardAction);
- menu.add(homeAction);
- }
-
- private void performHome() {
- showPageWithInput(null, HOME_PAGE, null);
- }
-
- private boolean canPerformBackward() {
- return history.hasPrevious();
- }
-
- private void performBackward() {
- DetailsHistoryItem item = history.getPrevious();
- if (item != null) {
- inHistory = true;
- showPage(item.getPageId(), item.getInput());
- //inHistory = false;
- if (item.getPageId() != BROWSER_PAGE) {
- backAction.update();
- forwardAction.update();
- }
- }
- }
-
- private void performForward() {
- DetailsHistoryItem item = history.getNext();
- if (item != null) {
- inHistory = true;
- showPage(item.getPageId(), item.getInput());
- //inHistory = false;
- if (item.getPageId() != BROWSER_PAGE) {
- backAction.update();
- forwardAction.update();
- }
- }
- }
-
- private boolean canPerformForward() {
- return history.hasNext();
- }
-
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/FeatureSorter.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/FeatureSorter.java
deleted file mode 100644
index 23dcee3..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/FeatureSorter.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.views;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.PluginVersionIdentifier;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.update.core.IFeature;
-import org.eclipse.update.core.VersionedIdentifier;
-import org.eclipse.update.internal.ui.model.IFeatureAdapter;
-
-/**
- * @author dejan
- *
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates.
- * To enable and disable the creation of type comments go to
- * Window>Preferences>Java>Code Generation.
- */
-public class FeatureSorter extends ViewerSorter {
-
- public int compare(Viewer viewer, Object e1, Object e2) {
- int cat1 = category(e1);
- int cat2 = category(e2);
-
- if (cat1 != cat2)
- return cat1 - cat2;
-
- if (!(e1 instanceof IFeatureAdapter && e2 instanceof IFeatureAdapter))
- return super.compare(viewer, e1, e2);
-
- IFeatureAdapter a1 = (IFeatureAdapter) e1;
- IFeatureAdapter a2 = (IFeatureAdapter) e2;
-
- IFeature f1, f2;
-
- try {
- f1 = a1.getFeature(null);
- f2 = a2.getFeature(null);
- } catch (CoreException e) {
- return super.compare(viewer, e1, e2);
- }
-
- VersionedIdentifier vid1 = f1.getVersionedIdentifier();
- VersionedIdentifier vid2 = f2.getVersionedIdentifier();
-
- String name1;
- String name2;
-
- name1 = f1.getLabel();
- name2 = f2.getLabel();
-
- if (name1 == null)
- name1 = ""; //$NON-NLS-1$
- if (name2 == null)
- name2 = ""; //$NON-NLS-1$
- int result = collator.compare(name1, name2);
- if (result != 0)
- return result;
- // Compare versions
- PluginVersionIdentifier v1 = vid1.getVersion();
- PluginVersionIdentifier v2 = vid2.getVersion();
- if (v1.equals(v2))
- return 0;
- if (v2.isGreaterThan(v1))
- return -1;
- return 1;
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/IEmbeddedWebBrowser.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/IEmbeddedWebBrowser.java
deleted file mode 100644
index e663119..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/IEmbeddedWebBrowser.java
+++ /dev/null
@@ -1,15 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.views;
-
-public interface IEmbeddedWebBrowser {
- public void openTo(String url);
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/MultiPageView.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/MultiPageView.java
deleted file mode 100644
index 737bc7c..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/MultiPageView.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.views;
-
-import java.util.*;
-
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.*;
-import org.eclipse.ui.part.ViewPart;
-import org.eclipse.update.internal.ui.pages.IUpdateFormPage;
-import org.eclipse.update.ui.forms.internal.*;
-
-public abstract class MultiPageView extends ViewPart implements ISelectionListener {
- protected IFormWorkbook formWorkbook;
- private Vector pages;
- protected String firstPageId;
- private Hashtable table = new Hashtable();
- private Menu contextMenu;
-
- public MultiPageView () {
- formWorkbook = new NoTabsWorkbook();
- formWorkbook.setFirstPageSelected(false);
- pages = new Vector();
- createPages();
- }
-
- protected void addPage(String id, IUpdateFormPage page) {
- table.put(id, page);
- pages.addElement(page);
- }
-
- protected void removePage(IUpdateFormPage page) {
- table.remove(page);
- pages.removeElement(page);
- }
-
- public abstract void createPages();
-
- /**
- * @see WorkbenchPart#setFocus()
- */
- public void setFocus() {
- getCurrentPage().setFocus();
- }
-
- /**
- * @see WorkbenchPart#createPartControl(Composite)
- */
-public void createPartControl(Composite parent) {
- formWorkbook.createControl(parent);
- formWorkbook.addFormSelectionListener(new IFormSelectionListener() {
- public void formSelected(IFormPage page, boolean setFocus) {
- //updateSynchronizedViews((IPDEEditorPage) page);
- //getContributor().setActivePage((IPDEEditorPage) page);
- }
- });
- MenuManager manager = new MenuManager();
- IMenuListener listener = new IMenuListener() {
- public void menuAboutToShow(IMenuManager manager) {
- contextMenuAboutToShow(manager);
- }
- };
- manager.setRemoveAllWhenShown(true);
- manager.addMenuListener(listener);
- contextMenu = manager.createContextMenu(formWorkbook.getControl());
- formWorkbook.getControl().setMenu(contextMenu);
-
- for (Iterator iter = pages.iterator(); iter.hasNext();) {
- IFormPage page = (IFormPage) iter.next();
- formWorkbook.addPage(page);
- }
- if (firstPageId != null)
- showPage(firstPageId);
-}
-
-public void contextMenuAboutToShow(IMenuManager menu) {
-/*
- PDEEditorContributor contributor = getContributor();
- getCurrentPage().contextMenuAboutToShow(menu);
- if (contributor!=null) contributor.contextMenuAboutToShow(menu);
-*/
-}
-
-public IUpdateFormPage getPage(String pageId) {
- return (IUpdateFormPage)table.get(pageId);
-}
-
-public IUpdateFormPage getCurrentPage() {
- return (IUpdateFormPage)formWorkbook.getCurrentPage();
-}
-
-public Menu getContextMenu() {
- return contextMenu;
-}
-
-public IAction getAction(String id) {
- //return getContributor().getGlobalAction(id);
- return null;
-}
-
-public IFormPage showPage(String id) {
- return showPage(getPage(id));
-}
-
-public void showPage(String id, Object openToObject) {
- IUpdateFormPage page = showPage(getPage(id));
- if (page != null)
- page.openTo(openToObject);
-}
-
-public IUpdateFormPage showPage(final IUpdateFormPage page) {
- formWorkbook.selectPage(page, true);
- return page;
-}
-
-public void init(IViewSite site) throws PartInitException {
- setSite(site);
- site.getPage().addSelectionListener(this);
-}
-
-
-public void dispose() {
- // remove ourselves as a selection listener
- getSite().getPage().removeSelectionListener(this);
- for (int i = 0; i < pages.size(); i++) {
- IUpdateFormPage page = (IUpdateFormPage) pages.elementAt(i);
- page.dispose();
- }
- // run super.
- super.dispose();
-}
-
-public void selectionChanged(IWorkbenchPart part, ISelection sel) {
-}
-
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/RenameDialog.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/RenameDialog.java
deleted file mode 100644
index 686f810..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/RenameDialog.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.views;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CLabel;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.update.internal.ui.UpdateUI;
-import org.eclipse.update.internal.ui.model.NamedModelObject;
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.resource.JFaceColors;
-
-/**
- * @author dejan
- *
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates.
- * To enable and disable the creation of type comments go to
- * Window>Preferences>Java>Code Generation.
- */
-public class RenameDialog extends Dialog {
- private static final String KEY_LABEL = "RenameDialog.label";
- private static final String KEY_EXISTS = "RenameDialog.exists";
- private Text text;
- private CLabel status;
- private NamedModelObject object;
- private Object [] siblings;
- private Button okButton;
-
- /**
- * Constructor for RenameDialog.
- * @param parentShell
- */
- public RenameDialog(Shell parentShell, NamedModelObject object, Object [] siblings) {
- super(parentShell);
- //setShellStyle(getShellStyle()|SWT.RESIZE);
- this.object = object;
- this.siblings = siblings;
- }
-
- protected void createButtonsForButtonBar(Composite parent) {
- // create OK and Cancel buttons by default
- okButton =
- createButton(
- parent,
- IDialogConstants.OK_ID,
- IDialogConstants.OK_LABEL,
- true);
- createButton(
- parent,
- IDialogConstants.CANCEL_ID,
- IDialogConstants.CANCEL_LABEL,
- false);
- verifyName();
- }
-
- public Control createDialogArea(Composite parent) {
- Composite container = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.marginHeight = 10;
- layout.marginWidth = 10;
- container.setLayout(layout);
- container.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- Label label = new Label(container, SWT.NULL);
- label.setText(UpdateUI.getString(KEY_LABEL));
-
- text = new Text(container, SWT.SINGLE | SWT.BORDER);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- text.setLayoutData(gd);
-
- status = new CLabel(container, SWT.NULL);
- gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- status.setLayoutData(gd);
- status.setForeground(JFaceColors.getErrorText(status.getDisplay()));
- status.setBackground(JFaceColors.getErrorBackground(status.getDisplay()));
-
- text.setText(object.getName());
- text.selectAll();
- text.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- verifyName();
- }
- });
- WorkbenchHelp.setHelp(container, "org.eclipse.update.ui.RenameDialog");
- return container;
- }
-
- private void verifyName() {
- String name = text.getText().trim();
- boolean duplicate = false;
- for (int i = 0; i < siblings.length; i++) {
- if (((NamedModelObject)siblings[i]).getName().equals(name)) {
- duplicate = true;
- break;
- }
- }
- status.setText(
- duplicate
- ? UpdateUI.getFormattedMessage(KEY_EXISTS, name)
- : "");
- okButton.setEnabled(!duplicate);
- }
-
- public void buttonPressed(int id) {
- if (id == IDialogConstants.OK_ID) {
- object.setName(text.getText());
- }
- super.buttonPressed(id);
- }
-
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/SearchMonitorManager.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/SearchMonitorManager.java
deleted file mode 100644
index 2013f05..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/SearchMonitorManager.java
+++ /dev/null
@@ -1,198 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.views;
-
-import java.io.Serializable;
-import java.util.*;
-import java.util.Hashtable;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.update.internal.ui.*;
-import org.eclipse.update.internal.ui.UpdateUI;
-import org.eclipse.update.internal.ui.model.*;
-import org.eclipse.update.internal.ui.model.UpdateModel;
-import org.eclipse.update.internal.ui.search.*;
-import org.eclipse.update.internal.ui.search.SearchObject;
-
-/**
- * @author dejan
- *
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates.
- * To enable and disable the creation of type comments go to
- * Window>Preferences>Java>Code Generation.
- */
-public class SearchMonitorManager {
- Hashtable monitors;
-
- static class SearchMonitor implements IProgressMonitor, ISearchObjectAdapter, Serializable {
- transient private SearchObject sobj;
- private int totalWork;
- private double worked;
- private boolean active;
-
- public SearchMonitor(SearchObject sobj) {
- setSearchObject(sobj);
- if (sobj!=null) sobj.attachProgressMonitor(this);
- }
-
- public void setSearchObject(SearchObject sobj) {
- this.sobj = sobj;
- }
-
- public SearchObject getSearchObject() {
- return sobj;
- }
-
- public void dispose() {
- if (sobj!=null) sobj.detachProgressMonitor(this);
- sobj = null;
- }
- /**
- * @see org.eclipse.core.runtime.IProgressMonitor#beginTask(java.lang.String, int)
- */
- public void beginTask(String name, int totalWork) {
- this.totalWork = totalWork;
- worked = 0;
- active = true;
- update();
- }
-
- /**
- * @see org.eclipse.core.runtime.IProgressMonitor#done()
- */
- public void done() {
- active = false;
- update();
- }
-
- private void update() {
- IWorkbenchPage page = UpdateUI.getActivePage();
- UpdatesView updatesView = (UpdatesView)page.findView(UpdatePerspective.ID_UPDATES);
- if (updatesView!=null) {
- updatesView.objectChanged(sobj, NamedModelObject.P_NAME);
- }
- }
-
- public String getLabel() {
- if (active) {
- //int perc = (worked * 100) / totalWork;
- int perc = (int)(worked * 100)/totalWork;
- return sobj.getName() + " - " + perc + "%";
- } else {
- return sobj.getName();
- }
- }
-
- /**
- * @see org.eclipse.core.runtime.IProgressMonitor#internalWorked(double)
- */
- public void internalWorked(double work) {
- worked += work;
- update();
- }
-
- /**
- * @see org.eclipse.core.runtime.IProgressMonitor#isCanceled()
- */
- public boolean isCanceled() {
- return false;
- }
-
- /**
- * @see org.eclipse.core.runtime.IProgressMonitor#setCanceled(boolean)
- */
- public void setCanceled(boolean value) {
- }
-
- /**
- * @see org.eclipse.core.runtime.IProgressMonitor#setTaskName(java.lang.String)
- */
- public void setTaskName(String name) {
- }
-
- /**
- * @see org.eclipse.core.runtime.IProgressMonitor#subTask(java.lang.String)
- */
- public void subTask(String name) {
- }
-
- /**
- * @see org.eclipse.core.runtime.IProgressMonitor#worked(int)
- */
- public void worked(int work) {
- internalWorked(work);
- }
-
- }
- /**
- * Constructor for SearchMonitorManager.
- */
- public SearchMonitorManager() {
- monitors = new Hashtable();
- initialize();
- }
-
- public void shutdown() {
- for (Enumeration enum=monitors.elements(); enum.hasMoreElements();) {
- SearchMonitor monitor = (SearchMonitor)enum.nextElement();
- monitor.dispose();
- }
- monitors.clear();
- }
-
- private void initialize() {
- UpdateModel model = UpdateUI.getDefault().getUpdateModel();
- NamedModelObject [] bookmarks = model.getBookmarks();
- for (int i=0; i<bookmarks.length; i++) {
- processBookmark(bookmarks[i]);
- }
- }
-
- private void processFolder(BookmarkFolder folder) {
- Object [] children = folder.getChildren(null);
- for (int i=0; i<children.length; i++) {
- processBookmark((NamedModelObject)children[i]);
- }
- }
-
- private void processBookmark(NamedModelObject obj) {
- if (obj instanceof SearchObject) {
- register((SearchObject)obj);
- }
- else if (obj instanceof BookmarkFolder) {
- processFolder((BookmarkFolder)obj);
- }
- }
-
-
- public void register(SearchObject obj) {
- if (monitors.get(obj) == null)
- monitors.put(obj, new SearchMonitor(obj));
- }
-
- public void unregister(SearchObject obj) {
- SearchMonitor monitor = (SearchMonitor) monitors.get(obj);
- if (monitor != null) {
- monitor.dispose();
- monitors.remove(obj);
- }
- }
-
- public String getLabel(SearchObject obj) {
- SearchMonitor monitor = (SearchMonitor) monitors.get(obj);
- if (monitor == null)
- return obj.getName();
- else
- return monitor.getLabel();
- }
-}
\ No newline at end of file
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/SearchResultView.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/SearchResultView.java
deleted file mode 100644
index 69daeb0..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/SearchResultView.java
+++ /dev/null
@@ -1,319 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.views;
-
-import java.util.ArrayList;
-
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.*;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.update.core.*;
-import org.eclipse.update.internal.ui.*;
-import org.eclipse.update.internal.ui.model.*;
-import org.eclipse.update.internal.ui.search.*;
-
-/**
- *
- */
-
-public class SearchResultView
- extends BaseTableView
- implements ISelectionListener {
- private Action showSearchAction;
- private ModelListener modelListener;
- private SearchObject currentSearch;
- private boolean selectionActive=false;
- private static final String KEY_C_FEATURE =
- "SearchResultView.column.feature";
- private static final String KEY_C_PROVIDER =
- "SearchResultView.column.provider";
- private static final String KEY_C_SITE = "SearchResultView.column.site";
- private static final String KEY_C_VERSION =
- "SearchResultView.column.version";
- private static final String KEY_C_SIZE = "SearchResultView.column.size";
- private static final String KEY_UNKNOWN_SIZE =
- "SearchResultView.column.sizeUnknown";
- private static final String KEY_TITLE = "SearchResultView.title";
- private static final String KEY_SHOW_SEARCH_LABEL =
- "SearchResultView.showSearch.label";
- private static final String KEY_SHOW_SEARCH_TOOLTIP =
- "SearchResultView.showSearch.tooltip";
-
- /*
- * The content provider class is responsible for
- * providing objects to the view. It can wrap
- * existing objects in adapters or simply return
- * objects as-is. These objects may be sensitive
- * to the current input of the view, or ignore
- * it and always show the same content
- * (like Task List, for example).
- */
-
- class ViewContentProvider implements IStructuredContentProvider {
- public void inputChanged(Viewer v, Object oldInput, Object newInput) {
- }
- public void dispose() {
- }
- public Object[] getElements(Object parent) {
- if (currentSearch == null)
- return new Object[0];
- ArrayList result = new ArrayList();
- Object[] sites = currentSearch.getChildren(currentSearch);
- for (int i = 0; i < sites.length; i++) {
- SearchResultSite site = (SearchResultSite) sites[i];
- Object[] results = site.getChildren(site);
- for (int j = 0; j < results.length; j++) {
- result.add(results[j]);
- }
- }
- return result.toArray();
- }
- }
- class ViewLabelProvider
- extends LabelProvider
- implements ITableLabelProvider {
- public String getColumnText(Object obj, int col) {
- if (obj instanceof IFeatureAdapter) {
- IFeature feature;
- try {
- feature = ((IFeatureAdapter) obj).getFeature(null);
- } catch (CoreException e) {
- if (col == 0)
- return getText(obj);
- return "";
- }
- ISite site = ((IFeatureAdapter) obj).getSite();
- switch (col) {
- case 0 :
- return feature.getLabel();
- case 1 :
- return feature
- .getVersionedIdentifier()
- .getVersion()
- .toString();
- case 2 :
- return feature.getProvider();
- case 3 :
- return site.getURL().toString();
- case 4 :
- long size = feature.getDownloadSize();
- if (size == -1)
- return UpdateUI.getString(
- KEY_UNKNOWN_SIZE);
- else
- return feature.getDownloadSize() + "KB";
- }
- }
- return getText(obj);
- }
- public Image getColumnImage(Object obj, int index) {
- if (index == 0)
- return getImage(obj);
- return null;
- }
- public Image getImage(Object obj) {
- return UpdateUI.getDefault().getLabelProvider().get(
- UpdateUIImages.DESC_FEATURE_OBJ);
- }
- }
- class NameSorter extends ViewerSorter {
- }
-
- class ModelListener implements IUpdateModelChangedListener {
- public void objectsAdded(Object parent, Object[] children) {
- if (parent instanceof SearchResultSite) {
- getTableViewer().add(children);
- updateTitle();
- }
- }
- public void objectsRemoved(Object parent, Object[] children) {
- }
- public void objectChanged(Object object, String property) {
- if (object instanceof SearchObject) {
- if (SearchObject.P_REFRESH.equals(property)) {
- getViewer().refresh();
- updateTitle();
- }
- }
- }
- }
-
- /**
- * The constructor.
- */
- public SearchResultView() {
- UpdateUI.getDefault().getLabelProvider().connect(this);
- modelListener = new ModelListener();
- }
-
- /**
- * This is a callback that will allow us
- * to create the viewer and initialize it.
- */
- public void initProviders() {
- TableViewer viewer = getTableViewer();
- createColumns();
- viewer.setContentProvider(new ViewContentProvider());
- viewer.setLabelProvider(new ViewLabelProvider());
- viewer.setSorter(new NameSorter());
- viewer.setInput(ResourcesPlugin.getWorkspace());
- WorkbenchHelp.setHelp(
- getControl(),
- "org.eclipse.update.ui.SearchResultView");
- }
-
- protected void partControlCreated() {
- super.partControlCreated();
- UpdateModel model = UpdateUI.getDefault().getUpdateModel();
- model.addUpdateModelChangedListener(modelListener);
- hookSelectionListener(true);
- }
-
- private void hookSelectionListener(boolean add) {
- IWorkbenchPage page = UpdateUI.getActivePage();
- if (page != null) {
- if (add)
- page.addSelectionListener(this);
- else
- page.removeSelectionListener(this);
- }
- }
-
- private void createColumns() {
- Table table = getTableViewer().getTable();
- table.setHeaderVisible(true);
-
- TableColumn column = new TableColumn(table, SWT.NULL);
- column.setText(UpdateUI.getString(KEY_C_FEATURE));
-
- column = new TableColumn(table, SWT.NULL);
- column.setText(UpdateUI.getString(KEY_C_VERSION));
-
- column = new TableColumn(table, SWT.NULL);
- column.setText(UpdateUI.getString(KEY_C_PROVIDER));
-
- column = new TableColumn(table, SWT.NULL);
- column.setText(UpdateUI.getString(KEY_C_SITE));
-
- column = new TableColumn(table, SWT.NULL);
- column.setText(UpdateUI.getString(KEY_C_SIZE));
-
- TableLayout layout = new TableLayout();
- layout.addColumnData(new ColumnWeightData(100, 200, true));
- layout.addColumnData(new ColumnWeightData(100, 50, true));
- layout.addColumnData(new ColumnWeightData(100, 100, true));
- layout.addColumnData(new ColumnWeightData(100, 100, true));
- layout.addColumnData(new ColumnWeightData(50, true));
- table.setLayout(layout);
- }
-
- public void dispose() {
- UpdateUI.getDefault().getLabelProvider().disconnect(this);
- UpdateModel model = UpdateUI.getDefault().getUpdateModel();
- model.removeUpdateModelChangedListener(modelListener);
- hookSelectionListener(false);
- super.dispose();
- }
-
- protected void fillContextMenu(IMenuManager manager) {
- manager.add(showSearchAction);
- manager.add(new Separator("additions"));
- }
-
- protected void fillActionBars(IActionBars bars) {
- IToolBarManager manager = bars.getToolBarManager();
- manager.add(showSearchAction);
- }
-
- protected void makeActions() {
- showSearchAction = new Action() {
- public void run() {
- try {
- IWorkbenchPage page = UpdateUI.getActivePage();
- DetailsView dview =
- (DetailsView) page.showView(
- UpdatePerspective.ID_DETAILS);
- dview.showPage(DetailsView.SEARCH_PAGE, currentSearch);
- } catch (PartInitException e) {
- UpdateUI.logException(e);
- }
- }
- };
- showSearchAction.setText(
- UpdateUI.getString(KEY_SHOW_SEARCH_LABEL));
- showSearchAction.setToolTipText(
- UpdateUI.getString(KEY_SHOW_SEARCH_TOOLTIP));
- showSearchAction.setImageDescriptor(
- UpdateUIImages.DESC_SHOW_SEARCH);
- }
-
- public void setCurrentSearch(SearchObject currentSearch) {
- this.currentSearch = currentSearch;
- getViewer().setInput(currentSearch);
- updateTitle();
- }
-
- private void updateTitle() {
- if (currentSearch == null)
- setTitle(getSite().getRegisteredName());
- else {
- int count = getTableViewer().getTable().getItemCount();
- String title =
- UpdateUI.getFormattedMessage(
- KEY_TITLE,
- new String[] {
- getSite().getRegisteredName(),
- getSearchLabel(currentSearch),
- "" + count });
- setTitle(title);
- }
- }
-
- private String getSearchLabel(SearchObject searchObject) {
- SearchCategoryDescriptor sdesc =
- SearchCategoryRegistryReader.getDefault().getDescriptor(
- searchObject.getCategoryId());
- ISearchCategory category = sdesc.createCategory();
- if (category != null)
- return category.getCurrentSearch();
- else
- return searchObject.getName();
- }
-
- public void setSelectionActive(boolean active) {
- if (active)
- getSite().setSelectionProvider(getViewer());
- else
- getSite().setSelectionProvider(null);
- updateTitle();
- this.selectionActive = active;
- }
- public boolean isSelectionActive() {
- return selectionActive;
- }
-
- public void selectionChanged(IWorkbenchPart part, ISelection selection) {
- if (selection instanceof IStructuredSelection) {
- IStructuredSelection ssel = (IStructuredSelection) selection;
- if (ssel.size() == 1) {
- Object obj = ssel.getFirstElement();
- if (obj instanceof SearchObject)
- setCurrentSearch((SearchObject) obj);
- }
- }
- }
-}
\ No newline at end of file
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/SelectedUpdatesView.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/SelectedUpdatesView.java
deleted file mode 100644
index bad95e8..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/SelectedUpdatesView.java
+++ /dev/null
@@ -1,312 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.views;
-
-import java.util.*;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Widget;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.update.core.*;
-import org.eclipse.update.internal.ui.*;
-import org.eclipse.update.internal.ui.model.*;
-import org.eclipse.update.internal.ui.parts.SharedLabelProvider;
-import org.eclipse.update.internal.ui.wizards.*;
-
-/**
- *
- */
-public class SelectedUpdatesView extends BaseTableView {
- private UpdateModelChangedListener modelListener;
- private Action deleteAction;
- private Action processAction;
- private Action processAllAction;
-
- class ViewContentProvider implements IStructuredContentProvider {
- public void inputChanged(Viewer v, Object oldInput, Object newInput) {
- }
- public void dispose() {
- }
- public Object[] getElements(Object parent) {
- return UpdateUI
- .getDefault()
- .getUpdateModel()
- .getPendingChanges();
- }
- }
-
- class ViewLabelProvider
- extends LabelProvider
- implements ITableLabelProvider {
- public String getColumnText(Object obj, int col) {
- return getText(obj);
- }
- public String getText(Object obj) {
- if (obj instanceof IFeatureAdapter) {
- try {
- IFeature feature = ((IFeatureAdapter) obj).getFeature(null);
- VersionedIdentifier versionedIdentifier =
- (feature != null)
- ? feature.getVersionedIdentifier()
- : null;
- String version = "";
- if (versionedIdentifier != null)
- version = versionedIdentifier.getVersion().toString();
- String label = (feature != null) ? feature.getLabel() : "";
- return label + " " + version;
- } catch (CoreException e) {
- }
- }
- return super.getText(obj);
- }
- public Image getColumnImage(Object obj, int index) {
- PendingChange job = (PendingChange) obj;
- int flags = 0;
- switch (job.getJobType()) {
- case PendingChange.INSTALL :
- flags = SharedLabelProvider.F_ADD;
- break;
- case PendingChange.UNINSTALL :
- flags = SharedLabelProvider.F_DEL;
- break;
- case PendingChange.CONFIGURE :
- break;
- case PendingChange.UNCONFIGURE :
- flags = SharedLabelProvider.F_UNCONFIGURED;
- break;
- }
- boolean patch = job.getFeature().isPatch();
- ImageDescriptor desc = patch?UpdateUIImages.DESC_EFIX_OBJ:
- UpdateUIImages.DESC_FEATURE_OBJ;
- return UpdateUI.getDefault().getLabelProvider().get(
- desc,
- flags);
- }
- }
-
- class UpdateModelChangedListener implements IUpdateModelChangedListener {
- /**
- * @see org.eclipse.update.internal.ui.model.IUpdateModelChangedListener#objectChanged(java.lang.Object, java.lang.String)
- */
- public void objectChanged(final Object object, String property) {
- if (object instanceof PendingChange) {
- getTableViewer()
- .getControl()
- .getDisplay()
- .asyncExec(new Runnable() {
- public void run() {
- getTableViewer().update(object, null);
- updateTitle();
- }
- });
- }
- }
-
- /**
- * @see org.eclipse.update.internal.ui.model.IUpdateModelChangedListener#objectsAdded(java.lang.Object, java.lang.Object)
- */
- public void objectsAdded(Object parent, final Object[] children) {
- if (children[0] instanceof PendingChange) {
- getTableViewer()
- .getControl()
- .getDisplay()
- .asyncExec(new Runnable() {
- public void run() {
- getTableViewer().add(children);
- updateTitle();
- }
- });
- }
- }
-
- /**
- * @see org.eclipse.update.internal.ui.model.IUpdateModelChangedListener#objectsRemoved(java.lang.Object, java.lang.Object)
- */
- public void objectsRemoved(Object parent, final Object[] children) {
- if (children[0] instanceof PendingChange) {
- getTableViewer()
- .getControl()
- .getDisplay()
- .asyncExec(new Runnable() {
- public void run() {
- getTableViewer().remove(children);
- updateTitle();
- }
- });
- }
- }
- }
-
- public SelectedUpdatesView() {
- modelListener = new UpdateModelChangedListener();
- UpdateUI.getDefault().getLabelProvider().connect(this);
- }
-
- /**
- * @see org.eclipse.update.internal.ui.views.BaseView#initProviders()
- */
- public void initProviders() {
- TableViewer viewer = getTableViewer();
- viewer.setContentProvider(new ViewContentProvider());
- viewer.setLabelProvider(new ViewLabelProvider());
- viewer.setInput(UpdateUI.getDefault().getUpdateModel());
- WorkbenchHelp.setHelp(viewer.getControl(), "org.eclipse.update.ui.SelectedUpdatesView");
- }
-
- protected void fillContextMenu(IMenuManager manager) {
- processAction.setEnabled(canProcess());
- manager.add(processAction);
- manager.add(processAllAction);
- manager.add(new Separator());
- deleteAction.setEnabled(canDelete());
- manager.add(deleteAction);
- manager.add(new Separator());
- super.fillContextMenu(manager);
- }
-
- protected void makeActions() {
- deleteAction = new Action() {
- public void run() {
- doDelete();
- }
- };
- deleteAction.setText(
- UpdateUI.getString("ItemsView.popup.delete"));
-
- processAction = new Action() {
- public void run() {
- doProcess();
- }
- };
- processAction.setText(
- UpdateUI.getString("ItemsView.popup.process"));
-
- processAllAction = new Action() {
- public void run() {
- doProcessAll();
- }
- };
- processAllAction.setText(
- UpdateUI.getString("ItemsView.popup.processAll"));
-
- super.makeActions();
- }
-
- public void dispose() {
- hookListeners(false);
- UpdateUI.getDefault().getLabelProvider().disconnect(this);
- super.dispose();
- }
-
- protected void partControlCreated() {
- UpdateModel model = UpdateUI.getDefault().getUpdateModel();
- hookListeners(true);
- }
-
- protected void hookListeners(boolean add) {
- UpdateModel model = UpdateUI.getDefault().getUpdateModel();
- if (add)
- model.addUpdateModelChangedListener(modelListener);
- else
- model.removeUpdateModelChangedListener(modelListener);
- }
-
- protected void deleteKeyPressed(Widget widget) {
- if (canDelete())
- doDelete();
- }
-
- private boolean canProcess() {
- return canDelete();
- }
-
- private void doProcess() {
- IStructuredSelection ssel =
- (IStructuredSelection) getViewer().getSelection();
- ArrayList jobs = new ArrayList();
- for (Iterator iter = ssel.iterator(); iter.hasNext();) {
- PendingChange job = (PendingChange) iter.next();
- if (job.isProcessed() == false)
- jobs.add(job);
- }
- PendingChange[] result =
- (PendingChange[]) jobs.toArray(new PendingChange[jobs.size()]);
- doProcess(result);
- }
-
- private void doProcessAll() {
- UpdateModel model = UpdateUI.getDefault().getUpdateModel();
- PendingChange[] jobs = model.getPendingChanges();
- doProcess(jobs);
- }
-
- private void doProcess(final PendingChange[] jobs) {
- BusyIndicator.showWhile(getControl().getDisplay(), new Runnable() {
- public void run() {
- MultiInstallWizard wizard = new MultiInstallWizard(jobs);
- WizardDialog dialog =
- new InstallWizardDialog(
- getControl().getShell(),
- wizard);
- dialog.create();
- dialog.getShell().setSize(600, 500);
- dialog.open();
- if (wizard.isSuccessfulInstall())
- UpdateUI.informRestartNeeded();
- }
- });
- }
-
- private void doDelete() {
- if (!confirmDeletion())
- return;
- IStructuredSelection ssel =
- (IStructuredSelection) getViewer().getSelection();
- UpdateModel model = UpdateUI.getDefault().getUpdateModel();
-
- for (Iterator iter = ssel.iterator(); iter.hasNext();) {
- model.removePendingChange((PendingChange) iter.next());
- }
- }
-
- private boolean canDelete() {
- return getViewer().getSelection().isEmpty() == false;
- }
-
- private void updateTitle() {
- UpdateModel model = UpdateUI.getDefault().getUpdateModel();
- PendingChange[] changes = model.getPendingChanges();
-
- int total = changes.length;
- int completed = 0;
-
- for (int i = 0; i < changes.length; i++) {
- PendingChange job = changes[i];
- if (job.isProcessed())
- completed++;
- }
- String baseName = getSite().getRegisteredName();
- String title =
- UpdateUI.getFormattedMessage(
- "ItemsView.title",
- new String[] {
- getSite().getRegisteredName(),
- "" + total,
- "" + completed });
- setTitle(title);
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/SiteStateAction.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/SiteStateAction.java
deleted file mode 100644
index cfdac7a..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/SiteStateAction.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.views;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.update.configuration.IConfiguredSite;
-import org.eclipse.update.core.SiteManager;
-import org.eclipse.update.internal.ui.UpdateUI;
-import org.eclipse.update.internal.ui.forms.ActivityConstraints;
-
-/**
- * @author dejan
- *
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates.
- * To enable and disable the creation of type comments go to
- * Window>Preferences>Java>Code Generation.
- */
-
-public class SiteStateAction extends Action {
- private IConfiguredSite site;
-
- public SiteStateAction() {
- }
-
- public void setSite(IConfiguredSite site) {
- this.site = site;
- boolean state = site.isEnabled();
- setText(state ? UpdateUI.getString("SiteStateAction.disableLabel") : UpdateUI.getString("SiteStateAction.enableLabel")); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- public void run() {
- if (site == null)
- return;
- boolean oldValue = site.isEnabled();
- boolean newValue = !oldValue;
- if (!confirm(newValue))
- return;
- site.setEnabled(newValue);
- IStatus status = ActivityConstraints.validateCurrentState();
- if (status != null) {
- ErrorDialog.openError(
- UpdateUI.getActiveWorkbenchShell(),
- null,
- null,
- status);
- site.setEnabled(oldValue);
- return;
- } else {
- // do a restart
- try {
- SiteManager.getLocalSite().save();
- UpdateUI.informRestartNeeded();
- } catch (CoreException e) {
- site.setEnabled(oldValue);
- UpdateUI.logException(e);
- }
- }
- }
-
- private boolean confirm(boolean newState) {
- String name = site.getSite().getURL().toString();
- String enableMessage = UpdateUI.getFormattedMessage("SiteStateAction.enableMessage", name); //$NON-NLS-1$ //$NON-NLS-2$
- String disableMessage = UpdateUI.getFormattedMessage("SiteStateAction.disableMessage", name); //$NON-NLS-1$ //$NON-NLS-2$
-
- String message = newState ? enableMessage : disableMessage;
- return MessageDialog.openConfirm(UpdateUI.getActiveWorkbenchShell(), UpdateUI.getString("SiteStateAction.dialogTitle"), message); //$NON-NLS-1$
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/UpdateModelDataTransfer.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/UpdateModelDataTransfer.java
deleted file mode 100644
index 23b6345..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/UpdateModelDataTransfer.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.views;
-
-
-import java.io.*;
-
-import org.eclipse.swt.dnd.*;
-
-/**
- * @version 1.0
- * @author
- */
-public class UpdateModelDataTransfer extends ByteArrayTransfer {
- /**
- * Singleton instance.
- */
- private static final UpdateModelDataTransfer instance =
- new UpdateModelDataTransfer();
- // Create a unique ID to make sure that different Eclipse
- // applications use different "types" of <code>UpdateModelDataTransfer</code>
-
- public static final String TYPE_PREFIX = "update-model-transfer-format";
- private static final String TYPE_NAME =
- TYPE_PREFIX + ":"
- + System.currentTimeMillis()
- + ":"
- + instance.hashCode();
-
- private static final int TYPEID = registerType(TYPE_NAME);
-
- public static UpdateModelDataTransfer getInstance() {
- return instance;
- }
-
- /**
- * Constructor for ModelDataTransfer.
- */
- public UpdateModelDataTransfer() {
- super();
- }
-
- /* (non-Javadoc)
- * Method declared on Transfer.
- */
- protected int[] getTypeIds() {
- return new int[] { TYPEID };
- }
- /* (non-Javadoc)
- * Returns the type names.
- *
- * @return the list of type names
- */
- protected String[] getTypeNames() {
- return new String[] { TYPE_NAME };
- }
- /* (non-Javadoc)
- * Method declared on Transfer.
- */
- protected void javaToNative(Object data, TransferData transferData) {
- if (!(data instanceof Object[])) {
- return;
- }
- Object[] objects = (Object[]) data;
- int count = objects.length;
-
- try {
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- ObjectOutputStream objectOut = new ObjectOutputStream(out);
-
- //write the number of resources
- objectOut.writeInt(count);
-
- //write each object
- for (int i = 0; i < objects.length; i++) {
- objectOut.writeObject(objects[i]);
- }
-
- //cleanup
- objectOut.close();
- out.close();
- byte[] bytes = out.toByteArray();
- super.javaToNative(bytes, transferData);
- } catch (IOException e) {
- //it's best to send nothing if there were problems
- System.out.println(e);
- }
-
- }
- /* (non-Javadoc)
- * Method declared on Transfer.
- */
- protected Object nativeToJava(TransferData transferData) {
- byte[] bytes = (byte[]) super.nativeToJava(transferData);
- if (bytes == null)
- return null;
- try {
- ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(bytes));
-
- int count = in.readInt();
- Object[] objects = new Object[count];
- for (int i = 0; i < count; i++) {
- objects[i] = in.readObject();
- }
- in.close();
- return objects;
- } catch (ClassNotFoundException e) {
- System.out.println(e);
- return null;
- } catch (IOException e) {
- System.out.println(e);
- return null;
- }
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/UpdatesDragAdapter.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/UpdatesDragAdapter.java
deleted file mode 100644
index 0961e36..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/UpdatesDragAdapter.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.views;
-
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.dnd.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.update.internal.ui.UpdateUI;
-import org.eclipse.update.internal.ui.model.*;
-import org.eclipse.update.internal.ui.model.BookmarkFolder;
-import org.eclipse.update.internal.ui.model.NamedModelObject;
-import org.eclipse.update.internal.ui.model.UpdateModel;
-import org.eclipse.update.internal.ui.search.SearchObject;
-
-import java.util.*;
-
-public class UpdatesDragAdapter extends DragSourceAdapter {
- ISelectionProvider selectionProvider;
- Object dragData;
-
- /**
- * NavigatorDragAction constructor comment.
- */
- public UpdatesDragAdapter(ISelectionProvider provider) {
- selectionProvider = provider;
- }
-
- /**
- * Returns the data to be transferred in a drag and drop
- * operation.
- */
- public void dragSetData(DragSourceEvent event) {
- if (event.doit == false)
- return;
- if (UpdateModelDataTransfer
- .getInstance()
- .isSupportedType(event.dataType)) {
- event.data = getSelectedModelObjects();
- dragData = event.data;
- return;
- }
- if (TextTransfer.getInstance().isSupportedType(event.dataType)) {
- event.data = createTextualRepresentation((IStructuredSelection) selectionProvider.getSelection());
- dragData = null;
- return;
- }
- }
-
- static String createTextualRepresentation(IStructuredSelection sel) {
- StringBuffer buf = new StringBuffer();
- for (Iterator iter=sel.iterator(); iter.hasNext();) {
- String name = iter.next().toString();
- buf.append(name);
- buf.append(" ");
- }
- return buf.toString();
- }
- /**
- * All selection must be named model objects.
- */
- public void dragStart(DragSourceEvent event) {
-
- // Workaround for 1GEUS9V
- DragSource dragSource = (DragSource) event.widget;
- Control control = dragSource.getControl();
- if (control != control.getDisplay().getFocusControl()) {
- event.doit = false;
- return;
- }
-
- event.doit = canDrag();
- }
-
- public void dragFinished(DragSourceEvent event) {
- if (event.doit == false || dragData == null)
- return;
- if (event.detail == DND.DROP_MOVE) {
- NamedModelObject[] objects = (NamedModelObject[]) dragData;
- UpdateModel model = UpdateUI.getDefault().getUpdateModel();
- for (int i = 0; i < objects.length; i++) {
- NamedModelObject obj = objects[i];
- Object parent = obj.getParent(obj);
- if (parent instanceof DiscoveryFolder)
- continue;
- if (parent == null) {
- model.removeBookmark(obj);
- } else {
- ((BookmarkFolder) parent).removeChildren(
- new NamedModelObject[] { obj });
- }
- }
- }
- dragData = null;
- }
-
- private boolean canDrag() {
- return canCopy((IStructuredSelection)selectionProvider.getSelection());
- }
-
- static boolean canCopy(IStructuredSelection selection) {
- for (Iterator iter = selection.iterator(); iter.hasNext();) {
- Object obj = iter.next();
- if (!(obj instanceof NamedModelObject))
- return false;
- if (obj instanceof SearchObject) {
- SearchObject sobj = (SearchObject) obj;
- if (sobj.isCategoryFixed()
- || sobj.isPersistent() == false)
- return false;
- }
- if (obj instanceof DiscoveryFolder) return false;
- }
- return true;
- }
-
- private NamedModelObject[] getSelectedModelObjects() {
- return createObjectRepresentation((IStructuredSelection)selectionProvider.getSelection());
- }
-
- static NamedModelObject[] createObjectRepresentation(IStructuredSelection selection) {
- ArrayList objects = new ArrayList();
- for (Iterator iter = selection.iterator(); iter.hasNext();) {
- Object obj = iter.next();
- if (obj instanceof NamedModelObject)
- objects.add(obj);
- else
- return new NamedModelObject[0];
- }
- return (NamedModelObject[]) objects.toArray(
- new NamedModelObject[objects.size()]);
- }
-}
\ No newline at end of file
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/UpdatesDropAdapter.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/UpdatesDropAdapter.java
deleted file mode 100644
index 412a163..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/UpdatesDropAdapter.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.views;
-
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.dnd.TransferData;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.update.internal.ui.UpdateUI;
-import org.eclipse.update.internal.ui.model.*;
-import org.eclipse.update.internal.ui.search.SearchObject;
-
-/**
- * @author dejan
- *
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates.
- * To enable and disable the creation of type comments go to
- * Window>Preferences>Java>Code Generation.
- */
-public class UpdatesDropAdapter extends ViewerDropAdapter {
- private static final String KEY_CONFLICT =
- "UpdatesDropAdapter.nameConflict";
- private TransferData currentTransfer;
-
- public UpdatesDropAdapter(Viewer viewer) {
- super(viewer);
- }
-
- /**
- * @see org.eclipse.jface.viewers.ViewerDropAdapter#performDrop(java.lang.Object)
- */
- public boolean performDrop(Object data) {
- if (data instanceof Object[]) {
- Object[] objects = (Object[]) data;
- for (int i = 0; i < objects.length; i++) {
- Object obj = objects[i];
- if (!dropObject(obj))
- return false;
- }
- saveModel();
- return true;
- }
- return false;
- }
-
- private boolean dropObject(Object object) {
- if (object instanceof NamedModelObject)
- return dropNamedModelObject((NamedModelObject) object);
- return false;
- }
-
- private boolean dropNamedModelObject(NamedModelObject object) {
- return addToModel(object);
- }
-
- private void saveModel() {
- UpdateModel model = UpdateUI.getDefault().getUpdateModel();
- model.saveBookmarks();
- }
-
- private boolean addToModel(NamedModelObject object) {
- BookmarkFolder parentFolder =
- (BookmarkFolder) getRealTarget(getCurrentTarget());
- return addToModel(
- getViewer().getControl().getShell(),
- parentFolder,
- object);
- }
-
- static boolean addToModel(
- Shell shell,
- BookmarkFolder parentFolder,
- NamedModelObject object) {
- UpdateModel model = UpdateUI.getDefault().getUpdateModel();
-
- Object[] siblings =
- parentFolder != null
- ? parentFolder.getChildren(parentFolder)
- : model.getBookmarks();
-
- boolean mustRename = false;
-
- if (object instanceof SearchObject) {
- ((SearchObject)object).reconnect();
- }
-
- for (int i = 0; i < siblings.length; i++) {
- NamedModelObject sibling = (NamedModelObject) siblings[i];
- if (sibling.getName().equals(object.getName())) {
- mustRename = true;
- break;
- }
- }
- if (mustRename) {
- RenameDialog dialog = new RenameDialog(shell, object, siblings);
- dialog.create();
- dialog.getShell().setSize(400, 150);
- dialog.getShell().setText(
- UpdateUI.getString(KEY_CONFLICT));
- if (dialog.open() != RenameDialog.OK)
- return false;
- }
- if (parentFolder != null)
- parentFolder.addChild(object);
- else {
- model.addBookmark(object);
- }
- return true;
- }
-
- static Object getRealTarget(Object target) {
- if (target instanceof NamedModelObject
- && !(target instanceof BookmarkFolder)) {
- NamedModelObject sibling = (NamedModelObject) target;
- return sibling.getParent(sibling);
- }
- return target;
- }
-
- /**
- * @see org.eclipse.jface.viewers.ViewerDropAdapter#validateDrop(java.lang.Object, int, org.eclipse.swt.dnd.TransferData)
- */
- public boolean validateDrop(
- Object target,
- int operation,
- TransferData transferType) {
- currentTransfer = transferType;
- if (currentTransfer != null
- && UpdateModelDataTransfer.getInstance().isSupportedType(
- currentTransfer)) {
- return validateTarget();
- }
- return false;
- }
-
- private boolean validateTarget() {
- Object target = getCurrentTarget();
- if (target instanceof DiscoveryFolder) return false;
- if (target == null || target instanceof NamedModelObject)
- return true;
- else
- return false;
- }
-
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/UpdatesView.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/UpdatesView.java
deleted file mode 100644
index bc8434b..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/UpdatesView.java
+++ /dev/null
@@ -1,1241 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.views;
-import java.io.File;
-import java.lang.reflect.InvocationTargetException;
-import java.net.URL;
-import java.util.*;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.SWTError;
-import org.eclipse.swt.dnd.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.*;
-import org.eclipse.ui.dialogs.PropertyDialogAction;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.ui.texteditor.IUpdate;
-import org.eclipse.update.configuration.*;
-import org.eclipse.update.core.*;
-import org.eclipse.update.internal.core.UpdateManagerUtils;
-import org.eclipse.update.internal.ui.*;
-import org.eclipse.update.internal.ui.model.*;
-import org.eclipse.update.internal.ui.parts.*;
-import org.eclipse.update.internal.ui.search.*;
-import org.eclipse.update.internal.ui.security.UpdateManagerAuthenticator;
-import org.eclipse.update.internal.ui.wizards.*;
-
-/**
- * Insert the type's description here.
- * @see ViewPart
- */
-public class UpdatesView
- extends BaseTreeView
- implements IUpdateModelChangedListener {
- private static final String KEY_NEW = "UpdatesView.Popup.new";
- private static final String KEY_NEW_SITE = "UpdatesView.Popup.newSite";
- private static final String KEY_NEW_FOLDER = "UpdatesView.Popup.newFolder";
- private static final String KEY_NEW_SEARCH = "UpdatesView.Popup.newSearch";
- private static final String KEY_NEW_LOCAL_SITE =
- "UpdatesView.Popup.newLocalSite";
- private static final String KEY_SHOW_SEARCH_RESULT =
- "UpdatesView.Popup.showSearchResult";
- private static final String KEY_DELETE = "UpdatesView.Popup.delete";
- private static final String KEY_OPEN_WEB = "UpdatesView.Popup.openWeb";
- private static final String KEY_CUT = "UpdatesView.Popup.cut";
- private static final String KEY_COPY = "UpdatesView.Popup.copy";
- private static final String KEY_PASTE = "UpdatesView.Popup.paste";
- private static final String KEY_REFRESH = "UpdatesView.Popup.refresh";
- private static final String KEY_REFRESH_TOOLTIP =
- "UpdatesView.Popup.refresh.tooltip";
- private static final String KEY_LINK_EXTENSION =
- "UpdatesView.Popup.linkExtension";
- private static final String KEY_FILTER_FILES = "UpdatesView.menu.showFiles";
- private static final String KEY_FILTER_ENVIRONMENT =
- "UpdatesView.menu.filterEnvironment";
- private static final String KEY_SHOW_CATEGORIES =
- "UpdatesView.menu.showCategories";
- private static final String KEY_NEW_SEARCH_TITLE =
- "UpdatesView.newSearch.title";
- private static final String KEY_NEW_BOOKMARK_TITLE =
- "UpdatesView.newBookmark.title";
- private static final String KEY_NEW_FOLDER_TITLE =
- "UpdatesView.newFolder.title";
- private static final String KEY_RESTART_TITLE = "UpdatesView.restart.title";
- private static final String KEY_RESTART_MESSAGE =
- "UpdatesView.restart.message";
- private static final String P_FILTER = "UpdatesView.matchingFilter";
-
- private Action propertiesAction;
- private Action newAction;
- private Action newFolderAction;
- private Action newSearchAction;
- private Action newLocalAction;
- private Action openWebAction;
- private Action cutAction;
- private Action copyAction;
- private Action pasteAction;
- private DeleteAction deleteAction;
- private Action fileFilterAction;
- private Action filterEnvironmentAction;
- private Action showCategoriesAction;
- private Action linkExtensionAction;
- private VolumeLabelProvider volumeLabelProvider;
- private Action refreshAction;
- private Action showSearchResultAction;
- private SearchObject updateSearchObject;
- private SelectionChangedListener selectionListener;
- private Hashtable fileImages = new Hashtable();
- private FileFilter fileFilter = new FileFilter();
- private EnvironmentFilter environmentFilter = new EnvironmentFilter();
- private Cursor handCursor;
- private Clipboard clipboard;
- private SearchMonitorManager searchMonitorManager;
-
- class DeleteAction extends Action implements IUpdate {
- public DeleteAction() {
- super("delete");
- }
- public void run() {
- performDelete();
- }
- public void update() {
- boolean enabled = true;
- IStructuredSelection sel =
- (IStructuredSelection) UpdatesView
- .this
- .getViewer()
- .getSelection();
- for (Iterator iter = sel.iterator(); iter.hasNext();) {
- Object obj = iter.next();
- if (obj instanceof NamedModelObject) {
- if (!(obj instanceof DiscoveryFolder))
- continue;
- }
- enabled = false;
- break;
- }
- setEnabled(enabled);
- }
- }
-
- class FileFilter extends ViewerFilter {
- public boolean select(Viewer viewer, Object parent, Object child) {
- if (child instanceof MyComputerFile) {
- return false;
- }
- return true;
- }
- }
-
- class EnvironmentFilter extends ViewerFilter {
- public boolean select(Viewer viewer, Object parent, Object child) {
- if (child instanceof IFeatureAdapter) {
- child = getFeature((IFeatureAdapter) child);
- }
- if (child instanceof IPlatformEnvironment) {
- return UpdateManagerUtils.isValidEnvironment(
- (IPlatformEnvironment) child);
- }
- return true;
- }
- }
-
- class SelectionChangedListener implements ISelectionChangedListener {
- public void selectionChanged(SelectionChangedEvent event) {
- updateForSelection((IStructuredSelection) event.getSelection());
- }
- }
-
- class UpdatesViewSorter extends FeatureSorter {
- public int category(Object obj) {
- // Level 0
- if (obj instanceof DiscoveryFolder)
- return 1;
- if (obj.equals(updateSearchObject))
- return 2;
- if (obj instanceof MyComputer)
- return 3;
- if (obj instanceof SiteBookmark
- || obj instanceof BookmarkFolder
- || obj instanceof SearchObject)
- return 4;
- return super.category(obj);
- }
- }
-
- class SiteProvider
- extends DefaultContentProvider
- implements ITreeContentProvider {
- public void inputChanged(
- Viewer viewer,
- Object oldInput,
- Object newInput) {
- if (newInput == null)
- return;
- updateTitle(newInput);
- }
-
- public Object[] getChildren(Object parent) {
- if (parent instanceof UpdateModel) {
- return getRootElements((UpdateModel) parent);
- }
- if (parent instanceof BookmarkFolder) {
- return ((BookmarkFolder) parent).getChildren(parent);
- }
- if (parent instanceof SiteBookmark) {
- return getSiteCatalog((SiteBookmark) parent);
- }
- /*
- if (parent instanceof SearchObject) {
- return ((SearchObject) parent).getChildren(null);
- }
- */
- if (parent instanceof SearchResultSite) {
- return ((SearchResultSite) parent).getChildren(null);
- }
- if (parent instanceof MyComputer) {
- return ((MyComputer) parent).getChildren(parent);
- }
- if (parent instanceof MyComputerDirectory) {
- return ((MyComputerDirectory) parent).getChildren(parent);
- }
- if (parent instanceof SiteCategory) {
- final SiteCategory category = (SiteCategory) parent;
- category.touchFeatures(getViewSite().getWorkbenchWindow());
- return category.getChildren();
- }
- if (parent instanceof IFeatureAdapter) {
- return getIncludedFeatures((IFeatureAdapter) parent);
- }
- return new Object[0];
- }
-
- public Object getParent(Object child) {
- return null;
- }
-
- public boolean hasChildren(Object parent) {
- if (parent instanceof SiteBookmark) {
- SiteBookmark bookmark = (SiteBookmark) parent;
- return bookmark.isWebBookmark() == false;
- }
- if (parent instanceof MyComputer) {
- return true;
- }
- if (parent instanceof DiscoveryFolder) {
- return true;
- }
- if (parent instanceof BookmarkFolder) {
- return ((BookmarkFolder) parent).hasChildren();
- }
- /*
- if (parent instanceof SearchObject) {
- return ((SearchObject) parent).hasChildren();
- }
- */
- if (parent instanceof MyComputerDirectory) {
- return ((MyComputerDirectory) parent).hasChildren(parent);
- }
- if (parent instanceof SiteCategory) {
- return ((SiteCategory) parent).getChildCount() > 0;
- }
- if (parent instanceof SearchResultSite) {
- return ((SearchResultSite) parent).getChildCount() > 0;
- }
- if (parent instanceof IFeatureAdapter) {
- return ((IFeatureAdapter) parent).hasIncludedFeatures(null);
- }
- return false;
- }
-
- public Object[] getElements(Object obj) {
- return getChildren(obj);
- }
- }
-
- class SiteLabelProvider extends LabelProvider {
- public String getText(Object obj) {
- if (obj instanceof IFeature) {
- IFeature feature = (IFeature) obj;
- return feature.getLabel();
- }
- if (obj instanceof FeatureReferenceAdapter) {
- IFeatureReference feature =
- ((FeatureReferenceAdapter) obj).getFeatureReference();
- VersionedIdentifier versionedIdentifier = null;
- try {
- versionedIdentifier =
- (feature != null)
- ? feature.getVersionedIdentifier()
- : null;
- } catch (CoreException e) {
- }
- String version = "";
- if (versionedIdentifier != null)
- version = versionedIdentifier.getVersion().toString();
- String label = (feature != null) ? feature.getName() : "";
- return label + " " + version;
- }
- if (obj instanceof IFeatureAdapter) {
- IFeature feature = getFeature((IFeatureAdapter) obj);
- VersionedIdentifier versionedIdentifier = null;
- versionedIdentifier =
- (feature != null) ? feature.getVersionedIdentifier() : null;
- String version = "";
- if (versionedIdentifier != null)
- version = versionedIdentifier.getVersion().toString();
- String label = (feature != null) ? feature.getLabel() : "";
- return label + " " + version;
- }
- if (obj instanceof MyComputerDirectory) {
- MyComputerDirectory dir = (MyComputerDirectory) obj;
- IVolume volume = dir.getVolume();
- if (volume != null)
- return volumeLabelProvider.getText(volume);
- else
- return dir.getLabel(dir);
- }
- if (obj instanceof SearchObject) {
- return searchMonitorManager.getLabel((SearchObject) obj);
- }
- return super.getText(obj);
- }
- public Image getImage(Object obj) {
- UpdateLabelProvider provider =
- UpdateUI.getDefault().getLabelProvider();
- if (obj instanceof SiteBookmark) {
- SiteBookmark bookmark = (SiteBookmark) obj;
- return provider.get(
- bookmark.isWebBookmark()
- ? UpdateUIImages.DESC_WEB_SITE_OBJ
- : UpdateUIImages.DESC_SITE_OBJ);
- }
- if (obj instanceof MyComputer) {
- return provider.get(UpdateUIImages.DESC_COMPUTER_OBJ);
- }
- if (obj instanceof DiscoveryFolder) {
- return provider.get(UpdateUIImages.DESC_PLACES_OBJ);
- }
- if (obj instanceof MyComputerDirectory) {
- IVolume volume = ((MyComputerDirectory) obj).getVolume();
- if (volume != null) {
- Image image = volumeLabelProvider.getImage(volume);
- if (image != null)
- return image;
- }
- return ((MyComputerDirectory) obj).getImage(obj);
- }
- if (obj instanceof ExtensionRoot) {
- return provider.get(UpdateUIImages.DESC_ESITE_OBJ);
- }
- if (obj instanceof MyComputerFile) {
- ImageDescriptor desc =
- ((MyComputerFile) obj).getImageDescriptor(obj);
- return provider.get(desc);
- }
- if (obj instanceof SiteCategory) {
- return provider.get(UpdateUIImages.DESC_CATEGORY_OBJ);
- }
- if (obj instanceof BookmarkFolder) {
- return provider.get(UpdateUIImages.DESC_BFOLDER_OBJ);
- }
- if (obj instanceof SearchObject) {
- return getSearchObjectImage((SearchObject) obj);
- }
-
- if (obj instanceof IFeatureAdapter) {
- IFeatureAdapter adapter = (IFeatureAdapter) obj;
- obj = getFeature(adapter);
- }
- if (obj instanceof IFeature) {
- int flags = 0;
- if (obj instanceof MissingFeature)
- flags = UpdateLabelProvider.F_ERROR;
- boolean efix = false;
- if (flags == 0)
- efix = ((IFeature) obj).isPatch();
- return provider.get(
- efix
- ? UpdateUIImages.DESC_EFIX_OBJ
- : UpdateUIImages.DESC_FEATURE_OBJ,
- flags);
- }
- return super.getImage(obj);
- }
- private Image getSearchObjectImage(SearchObject obj) {
- String categoryId = obj.getCategoryId();
- SearchCategoryDescriptor desc =
- SearchCategoryRegistryReader.getDefault().getDescriptor(
- categoryId);
- if (desc != null) {
- int flags =
- obj.isSearchInProgress()
- ? UpdateLabelProvider.F_CURRENT
- : 0;
- return UpdateUI.getDefault().getLabelProvider().get(
- desc.getImageDescriptor(),
- flags);
- }
- return null;
- }
- }
-
- class UpdateTreeViewer extends TreeViewer {
- private Object lastElement;
- public UpdateTreeViewer(Composite parent, int styles) {
- super(parent, styles);
- /*
- getTree().addMouseMoveListener(new MouseMoveListener() {
- public void mouseMove(MouseEvent e) {
- processItem(getTree().getItem(new Point(e.x, e.y)));
- }
- });
- handCursor = new Cursor(getTree().getDisplay(), SWT.CURSOR_HAND);
- */
- }
- private void processItem(Item item) {
- Object element = item != null ? item.getData() : null;
- if (element == lastElement)
- return;
- Cursor cursor = null;
- String tooltip = null;
-
- if (element instanceof SiteBookmark) {
- SiteBookmark bookmark = (SiteBookmark) element;
- if (bookmark.isWebBookmark()) {
- cursor = handCursor;
- tooltip = bookmark.getURL().toString();
- }
- }
- lastElement = element;
- getTree().setCursor(cursor);
- getTree().setToolTipText(tooltip);
- }
- }
-
- /**
- * The constructor.
- */
- public UpdatesView() {
- UpdateModel model = UpdateUI.getDefault().getUpdateModel();
- model.addUpdateModelChangedListener(this);
- selectionListener = new SelectionChangedListener();
- updateSearchObject = new DefaultUpdatesSearchObject();
- UpdateUI.getDefault().getLabelProvider().connect(this);
- volumeLabelProvider = new VolumeLabelProvider();
- }
-
- public void dispose() {
- UpdateUI.getDefault().getLabelProvider().disconnect(this);
- volumeLabelProvider.dispose();
- UpdateModel model = UpdateUI.getDefault().getUpdateModel();
- model.removeUpdateModelChangedListener(this);
- if (handCursor != null)
- handCursor.dispose();
- if (clipboard != null) {
- clipboard.dispose();
- clipboard = null;
- }
- searchMonitorManager.shutdown();
- super.dispose();
- }
-
- public void initProviders() {
- searchMonitorManager = new SearchMonitorManager();
- searchMonitorManager.register(updateSearchObject);
- getTreeViewer().setContentProvider(new SiteProvider());
- getTreeViewer().setLabelProvider(new SiteLabelProvider());
- getTreeViewer().setInput(UpdateUI.getDefault().getUpdateModel());
- WorkbenchHelp.setHelp(
- getControl(),
- "org.eclipse.update.ui.UpdatesView");
- }
-
- protected void initDragAndDrop() {
- clipboard = new Clipboard(getControl().getDisplay());
- int ops = DND.DROP_COPY | DND.DROP_MOVE;
- Transfer[] transfers =
- new Transfer[] {
- UpdateModelDataTransfer.getInstance(),
- TextTransfer.getInstance()};
- getTreeViewer().addDragSupport(
- ops,
- transfers,
- new UpdatesDragAdapter((ISelectionProvider) getViewer()));
- getTreeViewer().addDropSupport(
- ops | DND.DROP_DEFAULT,
- transfers,
- new UpdatesDropAdapter(getTreeViewer()));
- }
-
- public void makeActions() {
- super.makeActions();
- initDrillDown();
- propertiesAction =
- new PropertyDialogAction(
- UpdateUI.getActiveWorkbenchShell(),
- getTreeViewer());
- newAction = new Action() {
- public void run() {
- performNewBookmark();
- }
- };
- WorkbenchHelp.setHelp(
- newAction,
- "org.eclipse.update.ui.UpdatesView_newAction");
- newAction.setText(UpdateUI.getString(KEY_NEW_SITE));
-
- newFolderAction = new Action("newFolder") {
- public void run() {
- performNewBookmarkFolder();
- }
- };
- WorkbenchHelp.setHelp(
- newFolderAction,
- "org.eclipse.update.ui.UpdatesView_newFolderAction");
- newFolderAction.setText(UpdateUI.getString(KEY_NEW_FOLDER));
-
- newSearchAction = new Action("newSearch") {
- public void run() {
- performNewSearch();
- }
- };
- WorkbenchHelp.setHelp(
- newSearchAction,
- "org.eclipse.update.ui.UpdatesView_newSearchAction");
- newSearchAction.setText(UpdateUI.getString(KEY_NEW_SEARCH));
-
- newLocalAction = new Action("newLocal") {
- public void run() {
- performNewLocal();
- }
- };
-
- WorkbenchHelp.setHelp(
- newLocalAction,
- "org.eclipse.update.ui.UpdatesView_newLocalAction");
- newLocalAction.setText(UpdateUI.getString(KEY_NEW_LOCAL_SITE));
-
- showSearchResultAction = new Action("showSearch") {
- public void run() {
- performShowSearchResult();
- }
- };
- WorkbenchHelp.setHelp(
- newLocalAction,
- "org.eclipse.update.ui.UpdatesView_showSearchResultAction");
- showSearchResultAction.setText(
- UpdateUI.getString(KEY_SHOW_SEARCH_RESULT));
-
- deleteAction = new DeleteAction();
- WorkbenchHelp.setHelp(
- deleteAction,
- "org.eclipse.update.ui.UpdatesView_deleteAction");
- deleteAction.setText(UpdateUI.getString(KEY_DELETE));
-
- openWebAction = new Action("openWeb") {
- public void run() {
- performOpenWeb();
- }
- };
- openWebAction.setText(UpdateUI.getString(KEY_OPEN_WEB));
-
- cutAction = new Action("cut") {
- public void run() {
- performCut();
- }
- };
- cutAction.setText(UpdateUI.getString(KEY_CUT));
-
- copyAction = new Action("copy") {
- public void run() {
- performCopy();
- }
- };
- copyAction.setText(UpdateUI.getString(KEY_COPY));
-
- pasteAction = new Action("paste") {
- public void run() {
- performPaste();
- }
- };
- pasteAction.setText(UpdateUI.getString(KEY_PASTE));
-
- refreshAction = new Action("refresh") {
- public void run() {
- performRefresh();
- }
- };
- WorkbenchHelp.setHelp(
- refreshAction,
- "org.eclipse.update.ui.UpdatesView_refreshAction");
- refreshAction.setText(UpdateUI.getString(KEY_REFRESH));
- refreshAction.setToolTipText(UpdateUI.getString(KEY_REFRESH_TOOLTIP));
- refreshAction.setImageDescriptor(UpdateUIImages.DESC_REFRESH_NAV);
- refreshAction.setDisabledImageDescriptor(
- UpdateUIImages.DESC_REFRESH_NAV_D);
- refreshAction.setHoverImageDescriptor(
- UpdateUIImages.DESC_REFRESH_NAV_H);
-
- fileFilterAction = new Action() {
- public void run() {
- if (fileFilterAction.isChecked()) {
- getTreeViewer().removeFilter(fileFilter);
- } else
- getTreeViewer().addFilter(fileFilter);
- }
- };
- WorkbenchHelp.setHelp(
- fileFilterAction,
- "org.eclipse.update.ui.UpdatesView_fileFilterAction");
- fileFilterAction.setText(UpdateUI.getString(KEY_FILTER_FILES));
- fileFilterAction.setChecked(false);
-
- getTreeViewer().addFilter(fileFilter);
-
- filterEnvironmentAction = new Action() {
- public void run() {
- boolean checked = filterEnvironmentAction.isChecked();
- if (checked) {
- getTreeViewer().addFilter(environmentFilter);
- } else
- getTreeViewer().removeFilter(environmentFilter);
- setStoredEnvironmentValue(checked);
- }
- };
- WorkbenchHelp.setHelp(
- filterEnvironmentAction,
- "org.eclipse.update.ui.UpdatesView_filterEnvironmentAction");
- filterEnvironmentAction.setText(
- UpdateUI.getString(KEY_FILTER_ENVIRONMENT));
- boolean envValue = getStoredEnvironmentValue();
- filterEnvironmentAction.setChecked(envValue);
-
- getTreeViewer().addFilter(environmentFilter);
- getTreeViewer().setSorter(new UpdatesViewSorter());
-
- showCategoriesAction = new Action() {
- public void run() {
- showCategories(!showCategoriesAction.isChecked());
- }
- };
- WorkbenchHelp.setHelp(
- showCategoriesAction,
- "org.eclipse.update.ui.UpdatesView_showCategoriesAction");
- showCategoriesAction.setText(UpdateUI.getString(KEY_SHOW_CATEGORIES));
- showCategoriesAction.setChecked(true);
-
- linkExtensionAction = new Action("link") {
- public void run() {
- linkProductExtension();
- }
- };
- WorkbenchHelp.setHelp(
- linkExtensionAction,
- "org.eclipse.update.ui.UpdatesView_linkExtensionAction");
- linkExtensionAction.setText(UpdateUI.getString(KEY_LINK_EXTENSION));
-
- getTreeViewer().addSelectionChangedListener(selectionListener);
- hookGlobalActions();
- }
-
- private void hookGlobalActions() {
- IViewSite site = getViewSite();
- IActionBars bars = site.getActionBars();
- bars.setGlobalActionHandler(IWorkbenchActionConstants.CUT, cutAction);
- bars.setGlobalActionHandler(IWorkbenchActionConstants.COPY, copyAction);
- bars.setGlobalActionHandler(
- IWorkbenchActionConstants.PASTE,
- pasteAction);
- }
-
- private boolean getStoredEnvironmentValue() {
- IDialogSettings settings = UpdateUI.getDefault().getDialogSettings();
- return !settings.getBoolean(P_FILTER);
- }
-
- private void setStoredEnvironmentValue(boolean value) {
- IDialogSettings settings = UpdateUI.getDefault().getDialogSettings();
- settings.put(P_FILTER, !value);
- }
-
- private void updateForSelection(IStructuredSelection selection) {
- refreshAction.setEnabled(selection.size() == 1);
- }
-
- public void fillActionBars(IActionBars bars) {
- IToolBarManager toolBarManager = bars.getToolBarManager();
- toolBarManager.add(refreshAction);
- toolBarManager.add(new Separator());
- addDrillDownAdapter(bars);
- toolBarManager.add(new Separator());
- toolBarManager.add(collapseAllAction);
- IMenuManager menuManager = bars.getMenuManager();
- menuManager.add(fileFilterAction);
- menuManager.add(new Separator());
- menuManager.add(showCategoriesAction);
- menuManager.add(filterEnvironmentAction);
- bars.setGlobalActionHandler(
- IWorkbenchActionConstants.DELETE,
- deleteAction);
- }
-
- public void fillContextMenu(IMenuManager manager) {
- Object obj = getSelectedObject();
- if (obj instanceof SiteBookmark) {
- SiteBookmark site = (SiteBookmark) obj;
- if (site.isWebBookmark())
- manager.add(openWebAction);
- }
- manager.add(refreshAction);
- manager.add(new Separator());
- MenuManager newMenu = new MenuManager(UpdateUI.getString(KEY_NEW));
- newMenu.add(newAction);
- newMenu.add(newFolderAction);
- newMenu.add(newSearchAction);
- manager.add(newMenu);
- if (obj instanceof SiteBookmark) {
- SiteBookmark site = (SiteBookmark) obj;
- if (site.getType() == SiteBookmark.LOCAL)
- manager.add(newLocalAction);
- }
- if (obj instanceof ExtensionRoot) {
- manager.add(linkExtensionAction);
- }
- manager.add(new Separator());
- cutAction.setEnabled(canCopy());
- copyAction.setEnabled(cutAction.isEnabled());
- pasteAction.setEnabled(canPaste());
- deleteAction.setEnabled(canDelete());
- manager.add(cutAction);
- manager.add(copyAction);
- manager.add(pasteAction);
- manager.add(deleteAction);
- manager.add(new Separator());
- if (obj instanceof SearchObject) {
- manager.add(showSearchResultAction);
- manager.add(new Separator());
- }
- addDrillDownAdapter(manager);
- manager.add(new Separator());
-
- super.fillContextMenu(manager);
- if (obj instanceof NamedModelObject)
- manager.add(propertiesAction);
- }
-
- private boolean canDelete() {
- IStructuredSelection sel =
- (IStructuredSelection) getTreeViewer().getSelection();
- if (sel.isEmpty())
- return false;
- for (Iterator iter = sel.iterator(); iter.hasNext();) {
- Object obj = iter.next();
- if (!canDelete(obj))
- return false;
- }
- return true;
- }
-
- private boolean canDelete(Object obj) {
- if (obj instanceof SiteBookmark) {
- SiteBookmark site = (SiteBookmark) obj;
- return (site.getType() != SiteBookmark.LOCAL);
- }
- if (obj instanceof BookmarkFolder
- && !(obj instanceof DiscoveryFolder)) {
- return true;
- }
- if (obj instanceof SearchObject
- && !(obj instanceof DefaultUpdatesSearchObject)) {
- return true;
- }
- return false;
- }
-
- private Object getSelectedObject() {
- IStructuredSelection sel =
- (IStructuredSelection) getViewer().getSelection();
- if (sel.isEmpty() || sel.size() > 1)
- return null;
- return sel.getFirstElement();
- }
-
- private void performNewBookmark() {
- //UpdateModel model = UpdateUI.getDefault().getUpdateModel();
- Shell shell = UpdateUI.getActiveWorkbenchShell();
- NewSiteBookmarkWizardPage page =
- new NewSiteBookmarkWizardPage(getSelectedFolder());
- NewWizard wizard =
- new NewWizard(page, UpdateUIImages.DESC_NEW_BOOKMARK);
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.create();
- dialog.getShell().setText(UpdateUI.getString(KEY_NEW_BOOKMARK_TITLE));
- //dialog.getShell().setSize(400, 400);
- dialog.open();
- }
-
- private BookmarkFolder getSelectedFolder() {
- Object sel = getSelectedObject();
- if (sel instanceof BookmarkFolder
- && !(sel instanceof DiscoveryFolder)) {
- BookmarkFolder folder = (BookmarkFolder) sel;
- return folder;
- }
- return null;
- }
-
- private void performNewBookmarkFolder() {
- //UpdateModel model = UpdateUI.getDefault().getUpdateModel();
- Shell shell = UpdateUI.getActiveWorkbenchShell();
- NewFolderWizardPage page = new NewFolderWizardPage(getSelectedFolder());
- NewWizard wizard = new NewWizard(page, UpdateUIImages.DESC_NEW_FOLDER);
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.create();
- dialog.getShell().setText(UpdateUI.getString(KEY_NEW_FOLDER_TITLE));
- //dialog.getShell().setSize(400, 350);
- dialog.open();
- }
-
- private void performNewSearch() {
- //UpdateModel model = UpdateUI.getDefault().getUpdateModel();
- Shell shell = UpdateUI.getActiveWorkbenchShell();
- NewSearchWizardPage page = new NewSearchWizardPage(getSelectedFolder());
- NewWizard wizard = new NewWizard(page, UpdateUIImages.DESC_NEW_SEARCH);
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.create();
- dialog.getShell().setText(UpdateUI.getString(KEY_NEW_SEARCH_TITLE));
- //dialog.getShell().setSize(400, 350);
- dialog.open();
- }
-
- private void performNewLocal() {
- ISelection selection = getViewer().getSelection();
- if (selection instanceof IStructuredSelection) {
- IStructuredSelection ssel = (IStructuredSelection) selection;
- Object obj = ssel.getFirstElement();
- if (obj instanceof SiteBookmark) {
- SiteBookmark bookmark = (SiteBookmark) obj;
- if (bookmark.getType() == SiteBookmark.LOCAL) {
- //UpdateModel model =
- // UpdateUI.getDefault().getUpdateModel();
- Shell shell = UpdateUI.getActiveWorkbenchShell();
- NewSiteBookmarkWizardPage page =
- new NewSiteBookmarkWizardPage(
- getSelectedFolder(),
- bookmark);
- NewWizard wizard =
- new NewWizard(page, UpdateUIImages.DESC_NEW_BOOKMARK);
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.create();
- dialog.getShell().setText(
- UpdateUI.getString(KEY_NEW_BOOKMARK_TITLE));
- dialog.open();
- }
- }
- }
- }
-
- private void performDelete() {
- ISelection selection = getViewer().getSelection();
- if (selection instanceof IStructuredSelection) {
- if (!confirmDeletion())
- return;
- doDelete((IStructuredSelection) selection);
- }
- }
-
- private void doDelete(IStructuredSelection selection) {
- UpdateModel model = UpdateUI.getDefault().getUpdateModel();
- for (Iterator iter = selection.iterator(); iter.hasNext();) {
- Object obj = iter.next();
- if (obj instanceof NamedModelObject) {
- NamedModelObject child = (NamedModelObject) obj;
- BookmarkFolder folder = (BookmarkFolder) child.getParent(child);
- if (folder != null)
- folder.removeChildren(new NamedModelObject[] { child });
- else
- model.removeBookmark(child);
- }
- }
- }
-
- private void performOpenWeb() {
- SiteBookmark bookmark = (SiteBookmark) getSelectedObject();
- URL url = bookmark.getURL();
- if (url != null) {
- DetailsView.showURL(url.toString());
- }
- }
-
- protected void handleDoubleClick(DoubleClickEvent e) {
- Object obj = getSelectedObject();
- if (obj != null && obj instanceof SiteBookmark) {
- SiteBookmark bookmark = (SiteBookmark) obj;
- if (bookmark.isWebBookmark()) {
- performOpenWeb();
- return;
- }
- }
- super.handleDoubleClick(e);
- }
-
- private void performCut() {
- if (!canDelete())
- return;
- if (!performCopy())
- return;
- doDelete((IStructuredSelection) getViewer().getSelection());
- }
-
- private boolean canCopy() {
- IStructuredSelection selection =
- (IStructuredSelection) getViewer().getSelection();
- return UpdatesDragAdapter.canCopy(selection);
- }
-
- private boolean performCopy() {
- IStructuredSelection selection =
- (IStructuredSelection) getViewer().getSelection();
- if (!UpdatesDragAdapter.canCopy(selection))
- return false;
- NamedModelObject[] objects =
- UpdatesDragAdapter.createObjectRepresentation(selection);
- String text = UpdatesDragAdapter.createTextualRepresentation(selection);
- return setClipboardContent(objects, text);
- }
-
- private boolean setClipboardContent(
- NamedModelObject[] objects,
- String names) {
- try {
- // set the clipboard contents
- clipboard.setContents(
- new Object[] { objects, names },
- new Transfer[] {
- UpdateModelDataTransfer.getInstance(),
- TextTransfer.getInstance()});
- return true;
- } catch (SWTError e) {
- UpdateUI.logException(e);
- return false;
- }
- }
-
- private boolean canPaste() {
- // try a data transfer
- UpdateModelDataTransfer dataTransfer =
- UpdateModelDataTransfer.getInstance();
- return clipboard.getContents(dataTransfer) != null;
- }
-
- private void performPaste() {
- // try a data transfer
- UpdateModelDataTransfer dataTransfer =
- UpdateModelDataTransfer.getInstance();
- Object[] objects = (Object[]) clipboard.getContents(dataTransfer);
-
- if (objects != null) {
- BookmarkFolder parentFolder =
- (BookmarkFolder) UpdatesDropAdapter.getRealTarget(
- getSelectedObject());
- for (int i = 0; i < objects.length; i++) {
- NamedModelObject object = (NamedModelObject) objects[i];
- if (!UpdatesDropAdapter
- .addToModel(getControl().getShell(), parentFolder, object))
- return;
- }
- return;
- }
- // try a text transfer
- }
-
- private void performShowSearchResult() {
- IWorkbenchPage page = UpdateUI.getActivePage();
- SearchResultView view =
- (SearchResultView) page.findView(
- UpdatePerspective.ID_SEARCH_RESULTS);
- if (view != null) {
- page.bringToTop(view);
- } else {
- try {
- view =
- (SearchResultView) page.showView(
- UpdatePerspective.ID_SEARCH_RESULTS);
- view.setSelectionActive(true);
- } catch (PartInitException e) {
- UpdateUI.logException(e);
- }
- }
- if (view != null)
- view.setCurrentSearch((SearchObject) getSelectedObject());
- }
-
- private void performRefresh() {
- IStructuredSelection sel =
- (IStructuredSelection) getViewer().getSelection();
- final Object obj = sel.getFirstElement();
-
- if (obj != null) {
- /*
- BusyIndicator.showWhile(getControl().getDisplay(), new Runnable() {
- public void run() {
- try {
- // reinitialize the authenticator
- UpdateManagerAuthenticator auth =
- UpdateUI.getDefault().getAuthenticator();
- if (auth != null)
- auth.reset();
- if (obj instanceof SiteBookmark)
- ((SiteBookmark) obj).connect(false, null);
- getViewer().refresh(obj);
- } catch (CoreException e) {
- UpdateUI.logException(e);
- }
- }
- });
- */
- IRunnableWithProgress op = new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor)
- throws InvocationTargetException {
- try {
- monitor.beginTask("", 3);
- // reinitialize the authenticator
- UpdateManagerAuthenticator auth =
- UpdateUI.getDefault().getAuthenticator();
- if (auth != null)
- auth.reset();
- monitor.worked(1);
- if (obj instanceof SiteBookmark) {
- SiteBookmark bookmark = (SiteBookmark) obj;
- if (bookmark.isWebBookmark())
- monitor.worked(1);
- else
- bookmark.connect(
- false,
- new SubProgressMonitor(monitor, 1));
- } else
- monitor.worked(1);
- monitor.setTaskName(
- UpdateUI.getString("UpdatesView.updating"));
- getControl().getDisplay().syncExec(new Runnable() {
- public void run() {
- getViewer().refresh(obj);
- }
- });
- monitor.worked(1);
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- }
- }
- };
- try {
- getViewSite().getWorkbenchWindow().run(true, true, op);
- } catch (InvocationTargetException e) {
- UpdateUI.logException(e);
- } catch (InterruptedException e) {
- }
- }
- }
-
- private void linkProductExtension() {
- Object obj = getSelectedObject();
- ExtensionRoot extension = (ExtensionRoot) obj;
- File dir = extension.getInstallableDirectory();
- try {
- IInstallConfiguration config =
- InstallWizard.createInstallConfiguration();
- if (TargetPage
- .addConfiguredSite(getControl().getShell(), config, dir, true)
- != null) {
- InstallWizard.makeConfigurationCurrent(config, null);
- InstallWizard.saveLocalSite();
- UpdateUI.informRestartNeeded();
- }
- } catch (CoreException e) {
- UpdateUI.logException(e);
- }
- }
-
- private Object[] getRootElements(UpdateModel model) {
- NamedModelObject[] bookmarks = model.getBookmarks();
- Object[] array = new Object[3 + bookmarks.length];
-
- array[0] = new DiscoveryFolder();
- array[1] = updateSearchObject;
- array[2] = new MyComputer();
- for (int i = 3; i < array.length; i++) {
- array[i] = bookmarks[i - 3];
- }
- return array;
- }
- public void selectUpdateObject() {
- getViewer().setSelection(
- new StructuredSelection(updateSearchObject),
- true);
- }
-
- class CatalogBag {
- Object[] catalog;
- }
-
- private Object[] getSiteCatalog(final SiteBookmark bookmark) {
- if (bookmark.isWebBookmark())
- return new Object[0];
- Object[] result =
- getSiteCatalogWithIndicator(bookmark, !bookmark.isSiteConnected());
- if (result != null)
- return result;
- else
- return new Object[0];
- }
-
- private Object[] getSiteCatalogWithIndicator(
- final SiteBookmark bookmark,
- final boolean connect) {
- final CatalogBag bag = new CatalogBag();
-
- IRunnableWithProgress op = new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor)
- throws InvocationTargetException {
- try {
- monitor.beginTask(
- UpdateUI.getString("UpdatesView.connecting"),
- 3);
- monitor.worked(1);
-
- if (connect)
- bookmark.connect(new SubProgressMonitor(monitor, 1));
- else
- monitor.worked(1);
- bag.catalog =
- bookmark.getCatalog(
- showCategoriesAction.isChecked(),
- new SubProgressMonitor(monitor, 1));
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- }
- }
- };
- try {
- getViewSite().getWorkbenchWindow().run(true, true, op);
- } catch (InvocationTargetException e) {
- UpdateUI.logException(e);
- } catch (InterruptedException e) {
- }
- return bag.catalog;
- }
-
- private void showCategories(boolean show) {
- Object[] expanded = getTreeViewer().getExpandedElements();
- for (int i = 0; i < expanded.length; i++) {
- if (expanded[i] instanceof SiteBookmark) {
- getViewer().refresh(expanded[i]);
- }
- }
- }
-
- protected void handleSelectionChanged(SelectionChangedEvent e) {
- deleteAction.update();
- }
-
- protected void deleteKeyPressed(Widget widget) {
- if (canDelete())
- deleteAction.run();
- }
-
- public void objectsAdded(Object parent, Object[] children) {
- Object child = children[0];
- if (child instanceof PendingChange)
- return;
- if (child instanceof NamedModelObject) {
- UpdateModel model = UpdateUI.getDefault().getUpdateModel();
- if (child instanceof SearchObject) {
- searchMonitorManager.register((SearchObject) child);
- }
- if (parent == null)
- parent = model;
- getTreeViewer().add(parent, children);
- if (parent != model)
- getTreeViewer().setExpandedState(parent, true);
- getViewer().setSelection(new StructuredSelection(children), true);
- }
- }
-
- public void objectsRemoved(Object parent, Object[] children) {
- if (children[0] instanceof PendingChange)
- return;
- if (children[0] instanceof NamedModelObject) {
- getTreeViewer().remove(children);
- getTreeViewer().setSelection(new StructuredSelection());
- for (int i = 0; i < children.length; i++) {
- if (children[i] instanceof SearchObject)
- searchMonitorManager.unregister((SearchObject) children[i]);
- }
- }
- }
-
- public void objectChanged(Object object, String property) {
- if (object instanceof NamedModelObject) {
- if (property.equals(NamedModelObject.P_NAME)) {
- getTreeViewer().update(object, null);
- }
- if (object instanceof SiteBookmark) {
- if (property.equals(SiteBookmark.P_URL) || property.equals(SiteBookmark.P_TYPE)) {
- getTreeViewer().refresh(object);
- }
- }
- //viewer.setSelection(viewer.getSelection());
- }
- }
-
- public void setSelection(IStructuredSelection selection) {
- getViewer().setSelection(selection, true);
- }
-
- private void disposeImages() {
- volumeLabelProvider.dispose();
- }
-
- private IFeature getFeature(final IFeatureAdapter adapter) {
- final IFeature[] result = new IFeature[1];
-
- try {
- result[0] = adapter.getFeature(null);
- } catch (CoreException e) {
- result[0] = new MissingFeature(adapter.getSite(), adapter.getURL());
- }
- return result[0];
- }
-
- private Object[] getIncludedFeatures(IFeatureAdapter adapter) {
- if (adapter instanceof FeatureReferenceAdapter) {
- ((FeatureReferenceAdapter) adapter).touchIncludedFeatures(
- getViewSite().getWorkbenchWindow());
- }
- return adapter.getIncludedFeatures(null);
- }
-
- protected Object getRootObject() {
- return UpdateUI.getDefault().getUpdateModel();
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/BannerPage.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/BannerPage.java
deleted file mode 100644
index dc50e4d..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/BannerPage.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.wizards;
-import java.net.URL;
-
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.update.internal.ui.UpdateUIImages;
-
-public abstract class BannerPage extends WizardPage {
- private Image bannerImage;
- private boolean bannerVisible = true;
- public BannerPage(String name) {
- super(name);
- }
- /**
- * @see DialogPage#createControl(Composite)
- */
- public void createControl(Composite parent) {
- Composite client = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- layout.horizontalSpacing = 10;
- client.setLayout(layout);
-
- if (bannerVisible) {
- Composite bannerParent =
- new Composite(client, SWT.NULL /*SWT.BORDER */
- );
- bannerParent.setLayoutData(new GridData(GridData.FILL_VERTICAL));
- layout = new GridLayout();
- layout.marginWidth = layout.marginHeight = 0;
- bannerParent.setLayout(layout);
-
- Label label = new Label(bannerParent, SWT.NULL);
- label.setLayoutData(new GridData(GridData.FILL_BOTH));
- label.setImage(getBannerImage());
- }
-
- Control contents = createContents(client);
- contents.setLayoutData(new GridData(GridData.FILL_BOTH));
- setControl(client);
- }
-
- public void setBannerVisible(boolean visible) {
- this.bannerVisible = visible;
- }
- public boolean isBannedVisible() {
- return bannerVisible;
- }
-
- protected URL getBannerImageURL() {
- return null;
- }
- private Image getBannerImage() {
- URL imageURL = getBannerImageURL();
- Image image = null;
- if (imageURL == null) {
- // use default
- bannerImage =
- UpdateUIImages.DESC_INSTALL_BANNER.createImage();
- image = bannerImage;
- }
- return image;
- }
-
- public void dispose() {
- if (bannerImage != null) {
- bannerImage.dispose();
- }
- super.dispose();
- }
-
- protected abstract Control createContents(Composite parent);
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/BaseNewWizardPage.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/BaseNewWizardPage.java
deleted file mode 100644
index d4d3911..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/BaseNewWizardPage.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.wizards;
-
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.update.internal.ui.*;
-import org.eclipse.update.internal.ui.model.*;
-import org.eclipse.update.internal.ui.parts.DefaultContentProvider;
-
-/**
- * @author dejan
- *
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates.
- */
-public abstract class BaseNewWizardPage extends WizardPage {
- private static final String KEY_NAME = "BaseNewWizardPage.name";
- private static final String KEY_CREATE_IN = "BaseNewWizardPage.createIn";
- private static final String KEY_EXISTING = "BaseNewWizardPage.existing";
- private static final String KEY_INVALID = "BaseNewWizardPage.invalid";
- private static final String KEY_MISSING_NAME = "BaseNewWizardPage.missingName";
- private BookmarkFolder folder;
- private String name;
- private TreeViewer tree;
- private Text nameText;
- private Text containerText;
- private boolean showError=false;
-
- class ContainerContentProvider
- extends DefaultContentProvider
- implements ITreeContentProvider {
-
- public Object[] getChildren(Object parent) {
- if (parent instanceof UpdateModel) {
- return ((UpdateModel) parent).getBookmarks();
- }
- if (parent instanceof BookmarkFolder) {
- return ((BookmarkFolder) parent).getChildren(parent);
- }
- return new Object[0];
- }
-
- public Object getParent(Object child) {
- if (child instanceof NamedModelObject)
- return ((NamedModelObject) child).getParent(null);
- return null;
- }
-
- public boolean hasChildren(Object parent) {
- if (parent instanceof BookmarkFolder) {
- return ((BookmarkFolder) parent).hasChildren();
- }
- return false;
- }
-
- public Object[] getElements(Object obj) {
- return getChildren(obj);
- }
- }
-
- class ContainerLabelProvider extends LabelProvider {
- public Image getImage(Object obj) {
- if (obj instanceof BookmarkFolder)
- return UpdateUI.getDefault().getLabelProvider().get(UpdateUIImages.DESC_BFOLDER_OBJ);
- return super.getImage(obj);
- }
- }
-
- public BaseNewWizardPage(BookmarkFolder folder) {
- super("");
- this.folder = folder;
- UpdateUI.getDefault().getLabelProvider().connect(this);
- }
-
- public void dispose() {
- UpdateUI.getDefault().getLabelProvider().disconnect(this);
- super.dispose();
- }
-
- /**
- * @see IDialogPage#createControl(Composite)
- */
- public void createControl(Composite parent) {
- Composite container = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- container.setLayout(layout);
- Label label = new Label(container, SWT.NULL);
- label.setText(UpdateUI.getString(KEY_NAME));
- nameText = new Text(container, SWT.SINGLE | SWT.BORDER);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- nameText.setLayoutData(gd);
- nameText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- validatePage();
- }
- });
- createClientControl(container, layout.numColumns);
- label = new Label(container, SWT.NULL);
- label.setText(UpdateUI.getString(KEY_CREATE_IN));
- containerText = new Text(container, SWT.SINGLE | SWT.BORDER);
- gd = new GridData(GridData.FILL_HORIZONTAL);
- containerText.setLayoutData(gd);
- if (folder != null)
- containerText.setText(folder.getPath().toString());
- containerText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- validatePage();
- }
- });
- label = new Label(container, SWT.NULL);
- label.setText(UpdateUI.getString(KEY_EXISTING));
- gd = new GridData();
- gd.horizontalSpan = 2;
- label.setLayoutData(gd);
- tree = new TreeViewer(container);
- gd = new GridData(GridData.FILL_VERTICAL | GridData.HORIZONTAL_ALIGN_FILL);
- gd.horizontalSpan = 2;
- gd.widthHint = 250;
- gd.heightHint = 200;
- tree.getControl().setLayoutData(gd);
- tree.setContentProvider(new ContainerContentProvider());
- tree.setLabelProvider(new ContainerLabelProvider());
- tree.addFilter(new ViewerFilter() {
- public boolean select(Viewer v, Object parent, Object child) {
- return (child instanceof BookmarkFolder);
- }
- });
- tree.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent e) {
- handleSelectionChanged((IStructuredSelection) e.getSelection());
- }
- });
- tree.setInput(UpdateUI.getDefault().getUpdateModel());
- if (folder != null)
- tree.setSelection(new StructuredSelection(folder), true);
- validatePage();
- setControl(container);
- }
-
- protected void setDelayedErrorMessage(String text) {
- if (showError)
- setErrorMessage(text);
- }
-
- public void setVisible(boolean visible) {
- super.setVisible(visible);
- if (visible) {
- nameText.setFocus();
- showError=true;
- }
- }
-
- protected abstract void createClientControl(Composite parent, int span);
-
- protected void validatePage() {
- String message = null;
- boolean complete = true;
- if (containerText.getText().length() > 0) {
- folder = getFolderFromPath(containerText.getText());
- if (folder == null) {
- message = UpdateUI.getString(KEY_INVALID);
- }
- } else
- folder = null;
- String name = nameText.getText().trim();
- if (name.length() == 0) {
- complete = false;
- message = UpdateUI.getString(KEY_MISSING_NAME);
- }
- setDelayedErrorMessage(message);
- setPageComplete(message == null && complete);
- }
- private BookmarkFolder getFolderFromPath(String path) {
- UpdateModel model = UpdateUI.getDefault().getUpdateModel();
- return model.getFolder(new Path(path));
- }
- private void handleSelectionChanged(IStructuredSelection selection) {
- folder = (BookmarkFolder) selection.getFirstElement();
- if (folder != null)
- containerText.setText(folder.getPath().toString());
- else
- containerText.setText("");
- }
- public BookmarkFolder getFolder() {
- return folder;
- }
- public String getName() {
- return nameText.getText().trim();
- }
- public abstract boolean finish();
-
- protected void addToModel(NamedModelObject object) {
- UpdateModel model = UpdateUI.getDefault().getUpdateModel();
- BookmarkFolder parentFolder = getFolder();
- if (parentFolder != null)
- parentFolder.addChild(object);
- else {
- model.addBookmark(object);
- }
- model.saveBookmarks();
- }
-}
\ No newline at end of file
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/DeltaAdapter.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/DeltaAdapter.java
deleted file mode 100644
index c3a6b91..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/DeltaAdapter.java
+++ /dev/null
@@ -1,196 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.wizards;
-
-import java.util.ArrayList;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.update.configuration.ISessionDelta;
-import org.eclipse.update.core.*;
-import org.eclipse.update.internal.ui.forms.ActivityConstraints;
-import org.eclipse.update.internal.ui.model.MissingFeature;
-
-/**
- *
- */
-public class DeltaAdapter {
- private ISessionDelta delta;
- private DeltaFeatureAdapter[] dfeatures;
- private boolean removed;
- private IStatus status;
- private boolean statusComputed;
- private String name;
- private boolean selectionBlocked;
-
- public DeltaAdapter(ISessionDelta delta) {
- this.delta = delta;
- name = Utilities.format(delta.getDate());
- }
-
- public ISessionDelta getDelta() {
- return delta;
- }
-
- public String toString() {
- return name;
- }
-
- public DeltaFeatureAdapter[] getFeatures() {
- if (dfeatures == null) {
- initializeFeatures();
- }
- return dfeatures;
- }
-
- public void addFeaturesTo(ArrayList list) {
- DeltaFeatureAdapter [] array = getFeatures();
- for (int i=0; i<array.length; i++) {
- list.add(array[i]);
- }
- }
-
- public void setSelected(boolean value) {
- DeltaFeatureAdapter[] adapters = getFeatures();
-
- boolean stateChange = false;
- selectionBlocked = true;
- for (int i = 0; i < adapters.length; i++) {
- DeltaFeatureAdapter adapter = adapters[i];
- if (adapter.isSelected() != value) {
- adapter.setSelected(value);
- stateChange = true;
- }
- }
- selectionBlocked = false;
- if (value && stateChange) {
- // selecting the delta, we caused the
- // list of features to change and that
- // may affect the status. Reset status.
- resetStatus();
- }
- }
-
- void featureSelected(boolean selected) {
- if (selectionBlocked)
- return;
- int count = getSelectionCount();
- selected = (count > 0);
- }
-
- public int getSelectionCount() {
- DeltaFeatureAdapter[] adapters = getFeatures();
- int count = 0;
- for (int i = 0; i < adapters.length; i++) {
- DeltaFeatureAdapter adapter = adapters[i];
- if (adapter.isSelected())
- count++;
- }
- return count;
- }
-
- public boolean isMixedSelection() {
- int count = getSelectionCount();
- return count > 0 && count < getFeatures().length;
- }
-
- public void setRemoved(boolean removed) {
- this.removed = removed;
- setSelected(false);
- }
-
- public boolean isSelected() {
- return getSelectionCount()>0;
- }
-
- public boolean isRemoved() {
- return removed;
- }
-
- public IStatus getStatus() {
- if (!statusComputed)
- computeStatus();
- return status;
- }
-
- public IFeatureReference[] getSelectedReferences() {
- ArrayList refs = new ArrayList();
- DeltaFeatureAdapter[] adapters = getFeatures();
- for (int i = 0; i < adapters.length; i++) {
- DeltaFeatureAdapter adapter = adapters[i];
- if (adapter.isSelected())
- refs.add(adapter.getFeatureReference());
- }
- return (IFeatureReference[]) refs.toArray(
- new IFeatureReference[refs.size()]);
- }
-
- public void resetStatus() {
- statusComputed = false;
- }
-
- private void computeStatus() {
- IFeatureReference[] refs = getSelectedReferences();
- status = ActivityConstraints.validateSessionDelta(delta, refs);
- statusComputed = true;
- }
-
- public boolean isValid() {
- return getStatus() == null;
- }
-
- private void initializeFeatures() {
- IFeatureReference[] references = delta.getFeatureReferences();
- dfeatures = new DeltaFeatureAdapter[references.length];
- selectionBlocked = true;
-
- for (int i = 0; i < references.length; i++) {
- IFeatureReference reference = references[i];
- DeltaFeatureAdapter dfeature = null;
- DeltaFeatureAdapter duplicate = findDuplicate(reference, dfeatures);
- try {
- IFeature feature = reference.getFeature(null);
- dfeature = new DeltaFeatureAdapter(this, reference, feature);
- dfeature.setSelected(true);
- } catch (CoreException e) {
- IFeature feature =
- new MissingFeature(reference.getSite(), reference.getURL());
- dfeature = new DeltaFeatureAdapter(this, reference, feature);
- }
- if (duplicate != null) {
- dfeature.setDuplicate(true);
- duplicate.setDuplicate(true);
- }
- dfeatures[i] = dfeature;
- }
- selectionBlocked = false;
- }
-
- private DeltaFeatureAdapter findDuplicate(
- IFeatureReference reference,
- DeltaFeatureAdapter[] dfeatures) {
- for (int i = 0; i < dfeatures.length; i++) {
- DeltaFeatureAdapter prev = dfeatures[i];
- if (prev == null)
- return null;
- try {
- if (reference
- .getVersionedIdentifier()
- .equals(
- prev.getFeatureReference().getVersionedIdentifier())) {
- return prev;
- }
- } catch (CoreException e) {
- return null;
- }
- }
- return null;
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/DeltaFeatureAdapter.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/DeltaFeatureAdapter.java
deleted file mode 100644
index f926100..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/DeltaFeatureAdapter.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.wizards;
-
-import org.eclipse.update.configuration.ISessionDelta;
-import org.eclipse.update.core.*;
-import org.eclipse.update.internal.ui.UpdateUI;
-
-/**
- *
- */
-public class DeltaFeatureAdapter {
- private IFeatureReference ref;
- private IFeature feature;
- private DeltaAdapter deltaAdapter;
- private boolean selected;
- private boolean duplicate;
-
- public DeltaFeatureAdapter(DeltaAdapter deltaAdapter, IFeatureReference ref, IFeature feature) {
- this.ref = ref;
- this.feature = feature;
- this.deltaAdapter = deltaAdapter;
- }
-
- public DeltaAdapter getDeltaAdapter() {
- return deltaAdapter;
- }
-
- public ISessionDelta getDelta() {
- return deltaAdapter.getDelta();
- }
-
- public IFeatureReference getFeatureReference() {
- return ref;
- }
-
- public IFeature getFeature() {
- return feature;
- }
-
- public void setSelected(boolean selected) {
- this.selected = selected;
- deltaAdapter.featureSelected(selected);
- }
-
- public boolean isSelected() {
- return selected;
- }
-
- public void setDuplicate(boolean duplicate) {
- this.duplicate = duplicate;
- }
-
- public boolean isDuplicate() {
- return duplicate;
- }
-
- public String toString() {
- if (duplicate) {
- return UpdateUI.getFormattedMessage("DeltaFeatureAdapter.longName",
- new String [] { feature.getLabel(),
- feature.getVersionedIdentifier().getVersion().toString(),
- feature.getSite().getURL().toString()});
- }
- else {
- return UpdateUI.getFormattedMessage("DeltaFeatureAdapter.shortName",
- new String [] { feature.getLabel(),
- feature.getVersionedIdentifier().getVersion().toString() });
- }
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/DuplicateConflictsDialog.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/DuplicateConflictsDialog.java
deleted file mode 100644
index 1ecf1de..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/DuplicateConflictsDialog.java
+++ /dev/null
@@ -1,352 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.wizards;
-
-import java.util.*;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.update.configuration.*;
-import org.eclipse.update.core.*;
-import org.eclipse.update.internal.ui.*;
-import org.eclipse.update.internal.ui.model.PendingChange;
-import org.eclipse.update.internal.ui.parts.DefaultContentProvider;
-
-
-/**
- *
- */
-public class DuplicateConflictsDialog extends MessageDialog {
- private static final String KEY_TITLE = "DuplicateConflictsDialog.title";
- private static final String KEY_MESSAGE =
- "DuplicateConflictsDialog.message";
- private static final String KEY_TREE_LABEL =
- "DuplicateConflictsDialog.treeLabel";
- private static final String KEY_CONFLICT =
- "DuplicateConflictsDialog.conflict";
-
- private TreeViewer treeViewer;
- private ArrayList conflicts;
-
- static class IdEntry {
- IConfiguredSite csite;
- IFeature feature;
-
- public IdEntry(IFeature feature, IConfiguredSite csite) {
- this.feature = feature;
- this.csite = csite;
- if (csite == null) {
- System.out.println("csite null");
- }
- }
- public boolean isInstallCandidate() {
- return csite != null;
- }
- public IFeature getFeature() {
- return feature;
- }
-
- public String getIdentifier() {
- return feature.getVersionedIdentifier().getIdentifier();
- }
- public IConfiguredSite getConfiguredSite() {
- if (csite != null)
- return csite;
- return feature.getSite().getCurrentConfiguredSite();
- }
- public boolean sameLevel(IdEntry entry) {
- VersionedIdentifier vid = feature.getVersionedIdentifier();
- VersionedIdentifier evid =
- entry.getFeature().getVersionedIdentifier();
- return vid.equals(evid);
- }
- public String toString() {
- IConfiguredSite configSite = getConfiguredSite();
- String version =
- feature.getVersionedIdentifier().getVersion().toString();
- String location = configSite.getSite().getURL().getFile();
- return UpdateUI.getFormattedMessage(
- KEY_CONFLICT,
- new String[] { version, location });
- }
- }
-
- class ConflictContentProvider
- extends DefaultContentProvider
- implements ITreeContentProvider, IStructuredContentProvider {
- public Object[] getElements(Object input) {
- return getChildren(input);
- }
- public Object getParent(Object child) {
- return null;
- }
- public boolean hasChildren(Object parent) {
- if (parent instanceof ArrayList)
- return true;
- return false;
- }
- public Object[] getChildren(Object parent) {
- if (parent instanceof ArrayList)
- return ((ArrayList) parent).toArray();
- return new Object[0];
- }
- }
-
- class ConflictLabelProvider extends LabelProvider {
- public String getText(Object obj) {
- if (obj instanceof ArrayList) {
- ArrayList list = (ArrayList) obj;
- for (int i = 0; i < list.size(); i++) {
- IdEntry entry = (IdEntry) (list).get(i);
- if (entry.isInstallCandidate())
- return entry.getFeature().getLabel();
- }
- }
- return super.getText(obj);
- }
- public Image getImage(Object obj) {
- int flags = 0;
- if (obj instanceof ArrayList)
- flags = UpdateLabelProvider.F_WARNING;
- if (obj instanceof IdEntry || obj instanceof ArrayList)
- return UpdateUI.getDefault().getLabelProvider().get(
- UpdateUIImages.DESC_FEATURE_OBJ,
- flags);
- return null;
- }
- }
-
- public DuplicateConflictsDialog(Shell shell, ArrayList conflicts) {
- super(
- shell,
- UpdateUI.getString(KEY_TITLE),
- null,
- UpdateUI.getString(KEY_MESSAGE),
- WARNING,
- new String[] {
- IDialogConstants.YES_LABEL,
- IDialogConstants.NO_LABEL },
- 0);
- this.conflicts = conflicts;
- UpdateUI.getDefault().getLabelProvider().connect(this);
- }
-
- public boolean close() {
- UpdateUI.getDefault().getLabelProvider().disconnect(this);
- return super.close();
- }
-
- protected Control createCustomArea(Composite parent) {
- Composite client = new Composite(parent, SWT.NULL);
- client.setLayoutData(new GridData(GridData.FILL_BOTH));
- GridLayout layout = new GridLayout();
- client.setLayout(layout);
-
- Label label = new Label(client, SWT.NULL);
- label.setText(UpdateUI.getString(KEY_TREE_LABEL));
-
- treeViewer = new TreeViewer(client, SWT.SINGLE | SWT.BORDER);
- GridData gd = new GridData(GridData.FILL_BOTH);
- gd.heightHint = 200;
- gd.widthHint = 300;
- treeViewer.getTree().setLayoutData(gd);
- treeViewer.setContentProvider(new ConflictContentProvider());
- treeViewer.setLabelProvider(new ConflictLabelProvider());
- treeViewer.setAutoExpandLevel(10);
- treeViewer.setSorter(new ViewerSorter() {
- });
- treeViewer.setInput(conflicts);
- return client;
- }
-
- static ArrayList computeDuplicateConflicts(
- PendingChange job,
- IInstallConfiguration config,
- IConfiguredSite targetSite,
- IFeatureReference[] optionalFeatures) {
- Hashtable featureTable = new Hashtable();
- try {
- computePresentState(featureTable, config);
- computeNewFeature(
- job.getFeature(),
- targetSite,
- featureTable,
- optionalFeatures);
- return computeConflicts(featureTable);
- } catch (CoreException e) {
- return null;
- }
- }
-
- static ArrayList computeDuplicateConflicts(
- PendingChange[] jobs,
- IInstallConfiguration config) {
- Hashtable featureTable = new Hashtable();
- computePresentState(featureTable, config);
- computeNewFeatures(jobs, config, featureTable);
- return computeConflicts(featureTable);
- }
-
- static ArrayList computeDuplicateConflicts(
- MultiTargetPage.JobTargetSite[] jobSites,
- IInstallConfiguration config) {
- Hashtable featureTable = new Hashtable();
- computePresentState(featureTable, config);
- computeNewFeatures(jobSites, config, featureTable);
- return computeConflicts(featureTable);
- }
-
- private static ArrayList computeConflicts(Hashtable featureTable) {
- ArrayList result = null;
- for (Enumeration enum = featureTable.elements();
- enum.hasMoreElements();
- ) {
- ArrayList candidate = (ArrayList) enum.nextElement();
- if (candidate.size() == 1)
- continue;
- ArrayList conflict = checkForConflict(candidate);
- if (conflict != null) {
- if (result == null)
- result = new ArrayList();
- result.add(conflict);
- }
- }
- return result;
- }
-
- private static ArrayList checkForConflict(ArrayList candidate) {
- IdEntry firstEntry = null;
- for (int i = 0; i < candidate.size(); i++) {
- IdEntry entry = (IdEntry) candidate.get(i);
- if (firstEntry == null)
- firstEntry = entry;
- else if (!entry.sameLevel(firstEntry))
- return candidate;
- }
- return null;
- }
-
- private static void computePresentState(
- Hashtable table,
- IInstallConfiguration config) {
- IConfiguredSite[] csites = config.getConfiguredSites();
- for (int i = 0; i < csites.length; i++) {
- IConfiguredSite csite = csites[i];
- IFeatureReference[] refs = csite.getConfiguredFeatures();
- for (int j = 0; j < refs.length; j++) {
- try {
- addEntry(refs[j].getFeature(null), csite, table);
- } catch (CoreException e) {
- // don't let one bad feature stop the loop
- }
- }
- }
- }
-
- private static void computeNewFeatures(
- PendingChange[] jobs,
- IInstallConfiguration config,
- Hashtable featureTable) {
- for (int i = 0; i < jobs.length; i++) {
- PendingChange job = jobs[i];
- IConfiguredSite targetSite =
- TargetPage.getDefaultTargetSite(config, job);
- IFeature newFeature = job.getFeature();
- try {
- computeNewFeature(newFeature, targetSite, featureTable, null);
- } catch (CoreException e) {
- }
- }
- }
-
- private static void computeNewFeatures(
- MultiTargetPage.JobTargetSite[] jobSites,
- IInstallConfiguration config,
- Hashtable featureTable) {
- for (int i = 0; i < jobSites.length; i++) {
- MultiTargetPage.JobTargetSite jobSite = jobSites[i];
- PendingChange job = jobSite.job;
- IConfiguredSite targetSite = jobSite.targetSite;
- IFeature newFeature = job.getFeature();
- try {
- computeNewFeature(newFeature, targetSite, featureTable, null);
- } catch (CoreException e) {
- }
- }
- }
-
- private static void computeNewFeature(
- IFeature feature,
- IConfiguredSite csite,
- Hashtable table,
- IFeatureReference[] optionalFeatures)
- throws CoreException {
- addEntry(feature, csite, table);
- IIncludedFeatureReference[] irefs =
- feature.getIncludedFeatureReferences();
- for (int i = 0; i < irefs.length; i++) {
- IIncludedFeatureReference iref = irefs[i];
- boolean add = true;
-
- if (iref.isOptional() && optionalFeatures != null) {
- boolean found = false;
- for (int j = 0; j < optionalFeatures.length; j++) {
- IFeatureReference checked = optionalFeatures[j];
- if (checked.equals(iref)) {
- found = true;
- break;
- }
- }
- add = found;
- }
- if (add)
- computeNewFeature(
- iref.getFeature(null),
- csite,
- table,
- optionalFeatures);
- }
- }
-
- private static void addEntry(
- IFeature feature,
- IConfiguredSite csite,
- Hashtable featureTable) {
- String id = feature.getVersionedIdentifier().getIdentifier();
- ArrayList entries = (ArrayList) featureTable.get(id);
- if (entries == null) {
- entries = new ArrayList();
- featureTable.put(id, entries);
- }
- IdEntry entry = new IdEntry(feature, csite);
- boolean replaced = false;
- for (int i = 0; i < entries.size(); i++) {
- IdEntry existingEntry = (IdEntry) entries.get(i);
- IConfiguredSite existingSite = existingEntry.getConfiguredSite();
- if (existingSite.equals(entry.getConfiguredSite())) {
- // same site - replace it if not new
- if (entry.isInstallCandidate()) {
- entries.set(i, entry);
- entries.remove(existingEntry);
- }
- replaced = true;
- break;
- }
- }
- if (!replaced)
- entries.add(entry);
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/FeatureHierarchyElement.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/FeatureHierarchyElement.java
deleted file mode 100644
index 8aadba7..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/FeatureHierarchyElement.java
+++ /dev/null
@@ -1,416 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.wizards;
-
-import java.util.*;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.update.configuration.*;
-import org.eclipse.update.core.*;
-import org.eclipse.update.internal.ui.UpdateUI;
-import org.eclipse.update.internal.ui.preferences.MainPreferencePage;
-
-/**
- * This class is used to construct a joint feature hiearchy.
- * Old feature reference represents feature that is
- * found on in the current configuration. New feature
- * reference is found in the feature that is an install/update
- * candidate. The element is used to join nodes of the
- * hiearchy formed by including features so that
- * each node in the hiearchy contains references to the
- * old and the new feature. Old and new features have
- * the same IDs but different versions, except in
- * the case of optional features, where the tree may
- * be constructed to bring in an optional feature
- * that was not installed initially. In that case,
- * some nodes may have old an new references with the
- * same ID and version.
- * <p>
- * Old feature reference may be null. That means
- * that the older feature with the same ID but lower
- * version was not found in the current configuration.
- */
-public class FeatureHierarchyElement {
- private Object root;
- private ArrayList children;
- private IFeatureReference oldFeatureRef;
- private IFeatureReference newFeatureRef;
- private boolean checked;
- private boolean optionalChildren;
- private boolean nativeUpgrade = false;
-
- public FeatureHierarchyElement(
- IFeatureReference oldRef,
- IFeatureReference newRef) {
- oldFeatureRef = oldRef;
- newFeatureRef = newRef;
- }
-
- void setRoot(Object root) {
- this.root = root;
- }
-
- public Object getRoot() {
- return root;
- }
-
- /*
- * Return true if element can be checked, false otherwise.
- */
- public boolean isEditable() {
- // cannot uncheck non-optional features
- if (isOptional() == false)
- return false;
- // cannot uncheck optional feature that
- // has already been installed
- if (oldFeatureRef != null)
- return false;
- return true;
- }
-
- /**
- * A hirearchy node represents a 'false update' if
- * both old and new references exist and both
- * point to the feature with the same ID and version.
- * These nodes will not any bytes to be downloaded -
- * they simply exist to allow the hirarchy to
- * reach the optional children that are missing
- * and will be installed.
- */
-
- public boolean isFalseUpdate() {
- if (oldFeatureRef != null && newFeatureRef != null) {
- try {
- return oldFeatureRef.getVersionedIdentifier().equals(
- newFeatureRef.getVersionedIdentifier());
- } catch (CoreException e) {
- }
- }
- return false;
- }
- /**
- * Returns true if feature is included as optional.
- */
- public boolean isOptional() {
- return newFeatureRef instanceof IIncludedFeatureReference
- && ((IIncludedFeatureReference) newFeatureRef).isOptional();
- }
- /**
- * Returns true if this optional feature is selected
- * for installation. Non-optional features or non-editable
- * features are always checked.
- */
- public boolean isChecked() {
- return checked;
- }
-
- void setNativeUpgrade(boolean nativeUpgrade) {
- this.nativeUpgrade = nativeUpgrade;
- }
-
- /**
- * Returns true if this optional feature should
- * be enabled when installed. By default, all
- * features in the hiearchy should be enabled.
- * The exception is for optional features that
- * are updated to a new version in case where
- * the older version of the optional feature
- * is disabled in the given configuration.
- * In this case, the feature is
- * updated and disabled in order to maintain
- * its state.
- */
- public boolean isEnabled(IInstallConfiguration config) {
- if (nativeUpgrade)
- return true;
- if (isOptional() && oldFeatureRef != null) {
- try {
- IFeature oldFeature = oldFeatureRef.getFeature(null);
- IConfiguredSite csite =
- InstallWizard.findConfigSite(oldFeature, config);
- return csite.isConfigured(oldFeature);
- } catch (CoreException e) {
- }
- }
- return true;
- }
-
- public IFeature getFeature() {
- try {
- IFeature feature = newFeatureRef.getFeature(null);
- return feature;
- } catch (CoreException e) {
- return null;
- }
- }
-
- /**
- * Selects an editable feature for installation.
- */
- public void setChecked(boolean checked) {
- this.checked = checked;
- }
- /**
- * Returns label for UI presentation.
- */
- public String getLabel() {
- try {
- return getFeatureLabel(newFeatureRef);
- } catch (CoreException e) {
- if (newFeatureRef instanceof IIncludedFeatureReference) {
- String iname =
- ((IIncludedFeatureReference) newFeatureRef).getName();
- if (iname != null)
- return iname;
- }
- try {
- VersionedIdentifier vid =
- newFeatureRef.getVersionedIdentifier();
- return vid.toString();
- } catch (CoreException e2) {
- }
- }
- return null;
- }
- /**
- * Computes label from the feature.
- */
- private String getFeatureLabel(IFeatureReference featureRef)
- throws CoreException {
- IFeature feature = featureRef.getFeature(null);
- return feature.getLabel()
- + " "
- + feature.getVersionedIdentifier().getVersion().toString();
- }
- /**
- * Computes children by linking matching features from the
- * old feature's and new feature's hierarchy.
- */
- public Object[] getChildren(boolean update, boolean patch, IInstallConfiguration config) {
- computeChildren(update, patch, config);
- return children.toArray();
- }
-
- public Object [] getChildren() {
- if (children!=null) return children.toArray();
- return new Object[0];
- }
- /**
- * Computes children of this node.
- * @return true if some of the children are optional, false otherwise.
- */
- public void computeChildren(boolean update, boolean patch, IInstallConfiguration config) {
- if (children == null) {
- children = new ArrayList();
- try {
- IFeature oldFeature = null;
- IFeature newFeature = null;
- newFeature = newFeatureRef.getFeature(null);
- if (oldFeatureRef != null)
- oldFeature = oldFeatureRef.getFeature(null);
- optionalChildren =
- computeElements(oldFeature, newFeature, update, patch, config, children);
- for (int i = 0; i < children.size(); i++) {
- FeatureHierarchyElement element =
- (FeatureHierarchyElement) children.get(i);
- element.setRoot(getRoot());
- }
- } catch (CoreException e) {
- }
- }
- }
- /**
- *
- */
- public boolean hasOptionalChildren() {
- return optionalChildren;
- }
- /**
- * Adds checked optional features to the provided set.
- */
- public void addCheckedOptionalFeatures(boolean update, boolean patch, IInstallConfiguration config, Set set) {
- if (isOptional() && isChecked()) {
- // Do not add checked optional features
- // if this is an update case but
- // the node is not a 'true' update
- // (old and new feature are the equal)
- if (!update || !isFalseUpdate())
- set.add(newFeatureRef);
- }
- Object[] list = getChildren(update, patch, config);
- for (int i = 0; i < list.length; i++) {
- FeatureHierarchyElement element = (FeatureHierarchyElement) list[i];
- element.addCheckedOptionalFeatures(update, patch, config, set);
- }
- }
-
- /**
- * Computes first-level children of the linked hierarchy
- * for the provided old and new features (same ID, different version
- * where new version is greater or equal the old version).
- * Old feature may be null.
- */
- public static boolean computeElements(
- IFeature oldFeature,
- IFeature newFeature,
- boolean update,
- boolean patch,
- IInstallConfiguration config,
- ArrayList list) {
- Object[] oldChildren = null;
- Object[] newChildren = getIncludedFeatures(newFeature);
- boolean optionalChildren = false;
-
- try {
- if (oldFeature != null) {
- oldChildren = getIncludedFeatures(oldFeature);
- }
- for (int i = 0; i < newChildren.length; i++) {
- IFeatureReference oldRef = null;
- IFeatureReference newRef = (IFeatureReference) newChildren[i];
- if (oldChildren != null) {
- String newId =
- newRef.getVersionedIdentifier().getIdentifier();
-
- for (int j = 0; j < oldChildren.length; j++) {
- IFeatureReference cref =
- (IFeatureReference) oldChildren[j];
- try {
- if (cref
- .getVersionedIdentifier()
- .getIdentifier()
- .equals(newId)) {
- oldRef = cref;
- break;
- }
- } catch (CoreException ex) {
- }
- }
- } else if (patch) {
- // 30849 - find the old reference in the
- // configuration.
- if (!UpdateUI.isPatch(newFeature)) {
- oldRef = findPatchedReference(newRef, config);
- }
- }
- // test if the old optional feature exists
- if (oldRef != null
- && ((oldRef instanceof IIncludedFeatureReference
- && ((IIncludedFeatureReference) oldRef).isOptional())
- || patch)) {
- try {
- IFeature f = oldRef.getFeature(null);
- if (f==null) oldRef = null;
- } catch (CoreException e) {
- // missing
- oldRef = null;
- }
- }
- FeatureHierarchyElement element =
- new FeatureHierarchyElement(oldRef, newRef);
- // If this is an update (old feature exists),
- // only check the new optional feature if the old exists.
- // Otherwise, always check.
- if (element.isOptional() && (update || patch)) {
- element.setChecked(oldRef != null);
- if (oldRef == null) {
- // Does not have an old reference,
- // but it may contain an older
- // feature that may still qualify
- // for update. For example,
- // an older version may have been
- // installed natively from the CD-ROM.
- if (hasOlderVersion(newRef)) {
- element.setNativeUpgrade(true);
- element.setChecked(true);
- }
- }
- } else
- element.setChecked(true);
- list.add(element);
- element.computeChildren(update, patch, config);
- if (element.isOptional() || element.hasOptionalChildren())
- optionalChildren = true;
- }
- } catch (CoreException e) {
- }
- return optionalChildren;
- }
- public static boolean hasOlderVersion(IFeatureReference newRef) {
- try {
- VersionedIdentifier vid = newRef.getVersionedIdentifier();
- PluginVersionIdentifier version = vid.getVersion();
- String mode = MainPreferencePage.getUpdateVersionsMode();
-
- IFeature[] allInstalled =
- UpdateUI.getInstalledFeatures(vid, false);
- for (int i = 0; i < allInstalled.length; i++) {
- IFeature candidate = allInstalled[i];
- PluginVersionIdentifier cversion =
- candidate.getVersionedIdentifier().getVersion();
- // Verify that the difference qualifies as
- // an update.
- if (mode.equals(MainPreferencePage.EQUIVALENT_VALUE)) {
- if (version.isEquivalentTo(cversion))
- return true;
- } else if (mode.equals(MainPreferencePage.COMPATIBLE_VALUE)) {
- if (version.isCompatibleWith(cversion))
- return true;
- }
- }
- } catch (CoreException e) {
- }
- return false;
- }
-
- private static IFeatureReference findPatchedReference(
- IFeatureReference newRef,
- IInstallConfiguration config)
- throws CoreException {
- VersionedIdentifier vid = newRef.getVersionedIdentifier();
- IConfiguredSite[] csites = config.getConfiguredSites();
- for (int i = 0; i < csites.length; i++) {
- IConfiguredSite csite = csites[i];
- IFeatureReference[] refs = csite.getConfiguredFeatures();
- for (int j = 0; j < refs.length; j++) {
- IFeatureReference ref = refs[j];
- VersionedIdentifier refVid = ref.getVersionedIdentifier();
- if (vid.getIdentifier().equals(refVid.getIdentifier()))
- return ref;
- }
- }
- return null;
- }
-
- /**
- * Returns included feature references for the given reference.
- */
- public static Object[] getIncludedFeatures(IFeatureReference ref) {
- try {
- IFeature feature = ref.getFeature(null);
- return getIncludedFeatures(feature);
- } catch (CoreException e) {
- }
- return new Object[0];
- }
-
- /**
- * Returns included feature references for the given feature.
- */
-
- public static Object[] getIncludedFeatures(IFeature feature) {
- try {
- return feature.getIncludedFeatureReferences();
- } catch (CoreException e) {
- }
- return new Object[0];
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/IDynamicPage.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/IDynamicPage.java
deleted file mode 100644
index d4274ed..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/IDynamicPage.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.wizards;
-
-import org.eclipse.update.internal.ui.model.PendingChange;
-
-/**
- * @author dejan
- *
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates.
- * To enable and disable the creation of type comments go to
- * Window>Preferences>Java>Code Generation.
- */
-public interface IDynamicPage {
- public void setJobs(PendingChange [] jobs);
-
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/InstallDeltaWizard.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/InstallDeltaWizard.java
deleted file mode 100644
index cbf7f50..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/InstallDeltaWizard.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.wizards;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.wizard.*;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.update.configuration.*;
-import org.eclipse.update.core.IFeatureReference;
-import org.eclipse.update.internal.ui.*;
-import org.eclipse.update.internal.ui.parts.SWTUtil;
-
-public class InstallDeltaWizard
- extends Wizard
- implements IInstallDeltaHandler {
- private static final String KEY_WTITLE = "InstallDeltaWizard.wtitle";
- private static final String KEY_PROCESSING =
- "InstallDeltaWizard.processing";
- private static final String KEY_RESTART_MESSAGE =
- "InstallDeltaWizard.restart.message";
- private ISessionDelta[] deltas;
- private InstallDeltaWizardPage page;
- private int processed = 0;
-
- /**
- * Constructor for InstallDeltaWizard.
- */
- public InstallDeltaWizard() {
- setNeedsProgressMonitor(true);
- setWindowTitle(UpdateUI.getString(KEY_WTITLE));
- setDefaultPageImageDescriptor(UpdateUIImages.DESC_UPDATE_WIZ);
- }
-
- public void addPages() {
- page = new InstallDeltaWizardPage(deltas);
- addPage(page);
- }
-
- /**
- * @see IWizard#performFinish()
- */
- public boolean performFinish() {
- final DeltaAdapter[] adapters = page.getDeltaAdapters();
-
- IRunnableWithProgress op = new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor)
- throws InvocationTargetException {
- try {
- doFinish(adapters, monitor);
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- }
- }
- };
- try {
- getContainer().run(true, true, op);
- } catch (InvocationTargetException e) {
- UpdateUI.logException(e);
- return false;
- } catch (InterruptedException e) {
- return false;
- }
- return true;
- }
-
- private void analyzeAdapters(DeltaAdapter[] adapters, ArrayList selected, ArrayList removed) {
- for (int i=0; i<adapters.length; i++) {
- DeltaAdapter adapter = adapters[i];
- if (adapter.isRemoved())
- removed.add(adapter);
- else if (adapter.isSelected())
- selected.add(adapter);
- }
- }
-
- private void doFinish(
- DeltaAdapter [] adapters,
- IProgressMonitor monitor)
- throws CoreException {
-
- ArrayList selectedDeltas = new ArrayList();
- ArrayList removedDeltas = new ArrayList();
- analyzeAdapters(adapters, selectedDeltas, removedDeltas);
-
- monitor.beginTask(
- UpdateUI.getString(KEY_PROCESSING),
- selectedDeltas.size() + removedDeltas.size());
- processed = 0;
- for (int i = 0; i < removedDeltas.size(); i++) {
- DeltaAdapter adapter = (DeltaAdapter)removedDeltas.get(i);
- ISessionDelta delta = adapter.getDelta();
- delta.delete();
- monitor.worked(1);
- if (monitor.isCanceled())
- return;
- }
- for (int i = 0; i < selectedDeltas.size(); i++) {
- DeltaAdapter adapter = (DeltaAdapter)selectedDeltas.get(i);
- ISessionDelta delta = adapter.getDelta();
- IFeatureReference [] refs = delta.getFeatureReferences();
- delta.process(refs, monitor);
- monitor.worked(1);
- processed++;
- if (monitor.isCanceled())
- return;
- }
- }
-
- /**
- * @see IInstallDeltaHandler#init(ISessionDelta[])
- */
- public void init(ISessionDelta[] deltas) {
- this.deltas = deltas;
- }
-
- /**
- * @see IInstallDeltaHandler#open()
- */
- public void open() {
- BusyIndicator.showWhile(SWTUtil.getStandardDisplay(), new Runnable() {
- public void run() {
- WizardDialog dialog =
- new WizardDialog(
- UpdateUI.getActiveWorkbenchShell(),
- InstallDeltaWizard.this);
- dialog.create();
- dialog.getShell().setSize(500, 500);
- dialog.open();
- if (processed > 0)
- UpdateUI.informRestartNeeded();
- }
- });
- }
-}
\ No newline at end of file
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/InstallDeltaWizardPage.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/InstallDeltaWizardPage.java
deleted file mode 100644
index 6027044..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/InstallDeltaWizardPage.java
+++ /dev/null
@@ -1,313 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.wizards;
-
-import java.util.*;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.update.configuration.ISessionDelta;
-import org.eclipse.update.internal.ui.*;
-import org.eclipse.update.internal.ui.parts.*;
-
-/**
- *
- */
-public class InstallDeltaWizardPage extends WizardPage {
- private ISessionDelta[] deltas;
- private static final String KEY_TITLE = "InstallDeltaWizard.title";
- private static final String KEY_DESC = "InstallDeltaWizard.desc";
- private static final String KEY_LABEL = "InstallDeltaWizard.label";
- private static final String KEY_DELETE = "InstallDeltaWizard.delete";
- private static final String KEY_ERRORS = "InstallDeltaWizard.errors";
- private static final String KEY_MESSAGE = "InstallDeltaWizard.message";
- private CheckboxTreeViewer deltaViewer;
- private Button deleteButton;
- private Button errorsButton;
- private ArrayList features = new ArrayList();
-
- class DeltaContentProvider
- extends DefaultContentProvider
- implements ITreeContentProvider {
- public boolean hasChildren(Object parent) {
- if (parent instanceof DeltaAdapter)
- return true;
- return false;
- }
- public Object[] getChildren(Object parent) {
- if (parent instanceof DeltaAdapter) {
- return ((DeltaAdapter) parent).getFeatures();
- }
- return new Object[0];
- }
- public Object getParent(Object child) {
- if (child instanceof DeltaFeatureAdapter) {
- return ((DeltaFeatureAdapter) child).getDeltaAdapter();
- }
- return null;
- }
- public Object[] getElements(Object input) {
- return features.toArray();
- }
- }
-
- class DeltaLabelProvider extends LabelProvider {
- public Image getImage(Object obj) {
- if (obj instanceof DeltaAdapter) {
- int flags = 0;
- DeltaAdapter adapter = (DeltaAdapter) obj;
- if (adapter.getStatus() != null)
- flags = UpdateLabelProvider.F_ERROR;
- return UpdateUI.getDefault().getLabelProvider().get(
- UpdateUIImages.DESC_UPDATES_OBJ,
- flags);
- }
- if (obj instanceof DeltaFeatureAdapter) {
- return UpdateUI.getDefault().getLabelProvider().get(
- UpdateUIImages.DESC_FEATURE_OBJ);
- }
- return super.getImage(obj);
- }
- }
-
- /**
- * Constructor for InstallDeltaWizardPage.
- * @param pageName
- */
- public InstallDeltaWizardPage(ISessionDelta[] deltas) {
- super("installDeltaPage");
- this.deltas = deltas;
- setTitle(UpdateUI.getString(KEY_TITLE));
- setDescription(UpdateUI.getString(KEY_DESC));
- UpdateUI.getDefault().getLabelProvider().connect(this);
- }
-
- public void dispose() {
- UpdateUI.getDefault().getLabelProvider().disconnect(this);
- super.dispose();
- }
-
- private Object [] initializeFeatures() {
- ArrayList selection = new ArrayList();
- features = new ArrayList();
- for (int i = 0; i < deltas.length; i++) {
- ISessionDelta delta = deltas[i];
- DeltaAdapter adapter = new DeltaAdapter(delta);
- features.add(adapter);
- selection.add(adapter);
- adapter.addFeaturesTo(selection);
- }
- return selection.toArray();
- }
-
- /**
- * @see IDialogPage#createControl(Composite)
- */
- public void createControl(Composite parent) {
- Composite container = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- container.setLayout(layout);
- Label label = new Label(container, SWT.NULL);
- label.setText(UpdateUI.getString(KEY_LABEL));
- GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- gd.horizontalSpan = 2;
- label.setLayoutData(gd);
- deltaViewer = new CheckboxTreeViewer(container, SWT.BORDER);
- deltaViewer.setContentProvider(new DeltaContentProvider());
- deltaViewer.setLabelProvider(new DeltaLabelProvider());
- deltaViewer.addCheckStateListener(new ICheckStateListener() {
- public void checkStateChanged(CheckStateChangedEvent event) {
- handleCheckStateChanged(event.getElement(), event.getChecked());
- }
- });
- deltaViewer
- .addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent e) {
- updateButtons((IStructuredSelection) e.getSelection());
- }
- });
- deltaViewer.addFilter(new ViewerFilter() {
- public boolean select(Viewer viewer, Object parent, Object child) {
- if (child instanceof DeltaAdapter) {
- return !((DeltaAdapter) child).isRemoved();
- }
- return true;
- }
- });
- gd = new GridData(GridData.FILL_BOTH);
- deltaViewer.getControl().setLayoutData(gd);
-
- Composite buttonContainer = new Composite(container, SWT.NULL);
- layout = new GridLayout();
- layout.marginWidth = layout.marginHeight = 0;
- gd = new GridData(GridData.FILL_VERTICAL);
- buttonContainer.setLayoutData(gd);
- buttonContainer.setLayout(layout);
-
- deleteButton = new Button(buttonContainer, SWT.PUSH);
- deleteButton.setEnabled(false);
- deleteButton.setText(UpdateUI.getString(KEY_DELETE));
- gd =
- new GridData(
- GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_BEGINNING);
- deleteButton.setLayoutData(gd);
- deleteButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- handleDelete();
- }
- });
- SWTUtil.setButtonDimensionHint(deleteButton);
-
- errorsButton = new Button(buttonContainer, SWT.PUSH);
- errorsButton.setEnabled(false);
- errorsButton.setText(UpdateUI.getString(KEY_ERRORS));
- gd =
- new GridData(
- GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_BEGINNING);
- errorsButton.setLayoutData(gd);
- errorsButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- handleShowErrors();
- }
- });
- SWTUtil.setButtonDimensionHint(errorsButton);
-
- Object[] checked = initializeFeatures();
- deltaViewer.setInput(this);
- deltaViewer.setCheckedElements(checked);
-
- dialogChanged();
- WorkbenchHelp.setHelp(
- container,
- "org.eclipse.update.ui.InstallDeltaWizardPage");
- setControl(container);
- }
-
- private void updateButtons(IStructuredSelection selection) {
- boolean enableShowErrors = false;
- boolean enableDelete = selection.size() > 0;
-
- if (selection.size() == 1) {
- Object obj = selection.getFirstElement();
- if (obj instanceof DeltaAdapter) {
- enableShowErrors = !((DeltaAdapter) obj).isValid();
- }
- }
- if (enableDelete) {
- for (Iterator iter = selection.iterator(); iter.hasNext();) {
- Object obj = iter.next();
- if (!(obj instanceof DeltaAdapter)) {
- enableDelete = false;
- break;
- }
- }
- }
- deleteButton.setEnabled(enableDelete);
- errorsButton.setEnabled(enableShowErrors);
- }
-
- private void handleDelete() {
- IStructuredSelection selection =
- (IStructuredSelection) deltaViewer.getSelection();
- for (Iterator iter = selection.iterator(); iter.hasNext();) {
- Object obj = iter.next();
- if (obj instanceof DeltaAdapter) {
- ((DeltaAdapter) obj).setRemoved(true);
- }
- }
- deltaViewer.refresh();
- dialogChanged();
- }
-
- private void handleShowErrors() {
- IStructuredSelection sel =
- (IStructuredSelection) deltaViewer.getSelection();
- DeltaAdapter adapter = (DeltaAdapter) sel.getFirstElement();
- IStatus status = adapter.getStatus();
-
- if (status != null) {
- ErrorDialog.openError(getShell(), null, null, status);
- return;
- }
- }
-
- private void handleCheckStateChanged(Object obj, boolean checked) {
- if (obj instanceof DeltaFeatureAdapter) {
- DeltaFeatureAdapter dfeature = (DeltaFeatureAdapter) obj;
- dfeature.setSelected(checked);
- DeltaAdapter adapter = dfeature.getDeltaAdapter();
- deltaViewer.setGrayed(adapter, adapter.isMixedSelection());
- deltaViewer.setChecked(adapter, adapter.isSelected());
- adapter.resetStatus();
- deltaViewer.update(adapter, null);
- } else if (obj instanceof DeltaAdapter) {
- DeltaAdapter adapter = (DeltaAdapter) obj;
- adapter.setSelected(checked);
- deltaViewer.setGrayed(adapter, false);
- computeCheckedElements();
- }
- dialogChanged();
- }
-
- private void computeCheckedElements() {
- ArrayList checked = new ArrayList();
- for (int i = 0; i < features.size(); i++) {
- DeltaAdapter adapter = (DeltaAdapter) features.get(i);
- if (adapter.isRemoved())
- continue;
- if (adapter.isSelected()) {
- checked.add(adapter);
- DeltaFeatureAdapter df[] = adapter.getFeatures();
- for (int j = 0; j < df.length; j++) {
- if (df[j].isSelected())
- checked.add(df[j]);
- }
- }
- }
- deltaViewer.setCheckedElements(checked.toArray());
- }
-
- private void dialogChanged() {
- int nremoved = 0;
- int nselected = 0;
- int errors = 0;
-
- for (int i = 0; i < features.size(); i++) {
- DeltaAdapter adapter = (DeltaAdapter) features.get(i);
- if (adapter.isRemoved())
- nremoved++;
- else if (adapter.isSelected()) {
- nselected++;
- if (adapter.getStatus() != null)
- errors++;
- }
- }
- setPageComplete(errors == 0 && (nremoved > 0 || nselected > 0));
- String message = null;
- if (errors > 0)
- message = UpdateUI.getString(KEY_MESSAGE);
- setErrorMessage(message);
- }
-
- public DeltaAdapter[] getDeltaAdapters() {
- return (DeltaAdapter[]) features.toArray(
- new DeltaAdapter[features.size()]);
- }
-}
\ No newline at end of file
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/InstallWizard.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/InstallWizard.java
deleted file mode 100644
index b85b233..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/InstallWizard.java
+++ /dev/null
@@ -1,465 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.wizards;
-import java.lang.reflect.InvocationTargetException;
-import java.net.URL;
-import java.util.ArrayList;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.wizard.*;
-import org.eclipse.update.configuration.*;
-import org.eclipse.update.core.*;
-import org.eclipse.update.core.model.InstallAbortedException;
-import org.eclipse.update.internal.ui.*;
-import org.eclipse.update.internal.ui.model.*;
-import org.eclipse.update.internal.ui.security.JarVerificationService;
-
-public class InstallWizard extends Wizard {
- private static final String KEY_UNABLE = "InstallWizard.error.unable";
- private static final String KEY_OLD = "InstallWizard.error.old";
- private static final String KEY_SAVED_CONFIG = "InstallWizard.savedConfig";
- private ReviewPage reviewPage;
- private OptionalFeaturesPage optionalFeaturesPage;
- private TargetPage targetPage;
- private PendingChange job;
- private boolean successfulInstall = false;
- private IInstallConfiguration config;
- private boolean needLicensePage;
- private boolean patch;
-
- public InstallWizard(PendingChange job) {
- this(job, true);
- }
-
- public InstallWizard(PendingChange job, boolean needLicensePage) {
- setDialogSettings(UpdateUI.getDefault().getDialogSettings());
- setDefaultPageImageDescriptor(UpdateUIImages.DESC_INSTALL_WIZ);
- setForcePreviousAndNextButtons(true);
- setNeedsProgressMonitor(true);
- setWindowTitle(UpdateUI.getString("InstallWizard.wtitle"));
- this.job = job;
- this.needLicensePage = needLicensePage;
- IFeature feature = job.getFeature();
- patch = UpdateUI.isPatch(feature);
- }
-
- public boolean isSuccessfulInstall() {
- return successfulInstall;
- }
-
- /**
- * @see Wizard#performFinish()
- */
- public boolean performFinish() {
- final IConfiguredSite targetSite =
- (targetPage == null) ? null : targetPage.getTargetSite();
- final IFeatureReference[] optionalFeatures =
- (optionalFeaturesPage == null)
- ? null
- : optionalFeaturesPage.getCheckedOptionalFeatures();
- final Object[] optionalElements =
- (optionalFeaturesPage == null)
- ? null
- : optionalFeaturesPage.getOptionalElements();
- if (job.getJobType() == PendingChange.INSTALL) {
- ArrayList conflicts =
- DuplicateConflictsDialog.computeDuplicateConflicts(
- job,
- config,
- targetSite,
- optionalFeatures);
- if (conflicts != null) {
- DuplicateConflictsDialog dialog =
- new DuplicateConflictsDialog(getShell(), conflicts);
- if (dialog.open() != 0)
- return false;
- }
- }
- IRunnableWithProgress operation = new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor)
- throws InvocationTargetException {
- try {
- successfulInstall = false;
- makeConfigurationCurrent(config, job);
- execute(
- targetSite,
- optionalElements,
- optionalFeatures,
- monitor);
- saveLocalSite();
- successfulInstall = true;
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- }
- }
- };
- try {
- getContainer().run(true, true, operation);
- } catch (InvocationTargetException e) {
- Throwable target = e.getTargetException();
- if (target instanceof InstallAbortedException) {
- // should we revert to the previous configuration?
- } else {
- UpdateUI.logException(e);
- }
- return false;
- } catch (InterruptedException e) {
- return false;
- }
- return true;
- }
-
- public void addPages() {
- reviewPage = new ReviewPage(job);
- addPage(reviewPage);
-
- config = createInstallConfiguration();
-
- if (job.getJobType() == PendingChange.INSTALL) {
- if (needLicensePage && UpdateModel.hasLicense(job)) {
- addPage(new LicensePage(job));
- }
- if (UpdateModel.hasOptionalFeatures(job.getFeature())) {
- optionalFeaturesPage = new OptionalFeaturesPage(job, config);
- addPage(optionalFeaturesPage);
- }
- targetPage = new TargetPage(job, config);
- addPage(targetPage);
- }
- }
-
- public static IInstallConfiguration createInstallConfiguration() {
- try {
- ILocalSite localSite = SiteManager.getLocalSite();
- IInstallConfiguration config =
- localSite.cloneCurrentConfiguration();
- config.setLabel(Utilities.format(config.getCreationDate()));
- return config;
- } catch (CoreException e) {
- UpdateUI.logException(e);
- return null;
- }
- }
-
- public static void makeConfigurationCurrent(IInstallConfiguration config, PendingChange job)
- throws CoreException {
- ILocalSite localSite = SiteManager.getLocalSite();
- if (job!=null && job.getJobType()==PendingChange.INSTALL) {
- if (job.getFeature().isPatch()) {
- // Installing a patch - preserve the current configuration
- IInstallConfiguration cconfig = localSite.getCurrentConfiguration();
- IInstallConfiguration savedConfig = localSite.addToPreservedConfigurations(cconfig);
- VersionedIdentifier vid = job.getFeature().getVersionedIdentifier();
- String key = "@"+vid.getIdentifier()+"_"+vid.getVersion();
- String newLabel = UpdateUI.getFormattedMessage(KEY_SAVED_CONFIG, key);
- savedConfig.setLabel(newLabel);
- UpdateModel model = UpdateUI.getDefault().getUpdateModel();
- model.fireObjectChanged(savedConfig, null);
- }
- }
- localSite.addConfiguration(config);
- }
-
- public static void saveLocalSite() throws CoreException {
- ILocalSite localSite = SiteManager.getLocalSite();
- localSite.save();
- }
-
- public boolean canFinish() {
- IWizardPage page = getContainer().getCurrentPage();
- return page.getNextPage() == null && super.canFinish();
- }
-
- public IWizardPage getPreviousPage(IWizardPage page) {
- return super.getPreviousPage(page);
- }
- public IWizardPage getNextPage(IWizardPage page) {
- return super.getNextPage(page);
- }
- /*
- * When we are uninstalling, there is no targetSite
- */
- private void execute(
- IConfiguredSite targetSite,
- Object[] optionalElements,
- IFeatureReference[] optionalFeatures,
- IProgressMonitor monitor)
- throws CoreException {
- IFeature feature = job.getFeature();
- if (job.getJobType() == PendingChange.UNINSTALL) {
- //find the config site of this feature
- IConfiguredSite site = findConfigSite(feature, config);
- if (site != null) {
- site.remove(feature, monitor);
- } else {
- // we should do something here
- throwError(UpdateUI.getString(KEY_UNABLE));
- }
- } else if (job.getJobType() == PendingChange.INSTALL) {
- if (optionalFeatures == null)
- targetSite.install(feature, getVerificationListener(), monitor);
- else
- targetSite.install(
- feature,
- optionalFeatures,
- getVerificationListener(),
- monitor);
- IFeature oldFeature = job.getOldFeature();
- if (oldFeature != null && !job.isOptionalDelta()) {
- if (optionalElements != null)
- preserveOptionalState(config, targetSite, patch, optionalElements);
- boolean oldSuccess = unconfigure(config, oldFeature);
- if (!oldSuccess) {
- if (!isNestedChild(oldFeature))
- // "eat" the error if nested child
- throwError(UpdateUI.getString(KEY_OLD));
- }
- }
- if (oldFeature == null) {
- ensureUnique(config, feature, targetSite);
- if (optionalFeatures != null) {
- preserveOriginatingURLs(feature, optionalFeatures);
- }
- }
- } else if (job.getJobType() == PendingChange.CONFIGURE) {
- configure(feature);
- ensureUnique(config, feature, targetSite);
- } else if (job.getJobType() == PendingChange.UNCONFIGURE) {
- unconfigure(config, job.getFeature());
- } else {
- // should not be here
- return;
- }
- UpdateModel model = UpdateUI.getDefault().getUpdateModel();
- model.addPendingChange(job);
- }
-
- static void ensureUnique(
- IInstallConfiguration config,
- IFeature feature,
- IConfiguredSite targetSite)
- throws CoreException {
- boolean patch = false;
- if (targetSite==null)
- targetSite = feature.getSite().getCurrentConfiguredSite();
- IImport[] imports = feature.getImports();
- for (int i = 0; i < imports.length; i++) {
- IImport iimport = imports[i];
- if (iimport.isPatch()) {
- patch = true;
- break;
- }
- }
- // Only need to check features that patch other features.
- if (!patch)
- return;
- IFeature localFeature = findLocalFeature(targetSite, feature);
- ArrayList oldFeatures = new ArrayList();
- // First collect all older active features that
- // have the same ID as new features marked as 'unique'.
- collectOldFeatures(localFeature, targetSite, oldFeatures);
- // Now unconfigure old features to enforce uniqueness
- for (int i = 0; i < oldFeatures.size(); i++) {
- IFeature oldFeature = (IFeature) oldFeatures.get(i);
- unconfigure(config, oldFeature);
- }
- }
-
- private void throwError(String message) throws CoreException {
- IStatus status =
- new Status(
- IStatus.ERROR,
- UpdateUI.getPluginId(),
- IStatus.OK,
- message,
- null);
- throw new CoreException(status);
- }
-
- static IConfiguredSite findConfigSite(
- IFeature feature,
- IInstallConfiguration config)
- throws CoreException {
- IConfiguredSite[] configSites = config.getConfiguredSites();
- for (int i = 0; i < configSites.length; i++) {
- IConfiguredSite site = configSites[i];
- if (site.getSite().equals(feature.getSite())) {
- return site;
- }
- }
- return null;
- }
-
- private static boolean unconfigure(
- IInstallConfiguration config,
- IFeature feature)
- throws CoreException {
- IConfiguredSite site = findConfigSite(feature, config);
- if (site != null) {
- PatchCleaner cleaner = new PatchCleaner(site, feature);
- boolean result = site.unconfigure(feature);
- cleaner.dispose();
- return result;
- }
- return false;
- }
-
- private void configure(IFeature feature) throws CoreException {
- IConfiguredSite site = findConfigSite(feature, config);
- if (site != null) {
- site.configure(feature);
- }
- }
-
- private IVerificationListener getVerificationListener() {
- return new JarVerificationService(this.getShell());
- }
-
- private boolean isNestedChild(IFeature feature) {
- IConfiguredSite[] csites = config.getConfiguredSites();
- try {
- for (int i = 0; csites != null && i < csites.length; i++) {
- IFeatureReference[] refs = csites[i].getConfiguredFeatures();
- for (int j = 0; refs != null && j < refs.length; j++) {
- IFeature parent = refs[j].getFeature(null);
- IFeatureReference[] children =
- parent.getIncludedFeatureReferences();
- for (int k = 0;
- children != null && k < children.length;
- k++) {
- IFeature child = children[k].getFeature(null);
- if (feature.equals(child))
- return true;
- }
- }
- }
- } catch (CoreException e) {
- // will return false
- }
- return false;
- }
-
- static void preserveOptionalState(
- IInstallConfiguration config,
- IConfiguredSite targetSite,
- boolean patch,
- Object[] optionalElements) {
- for (int i = 0; i < optionalElements.length; i++) {
- FeatureHierarchyElement fe =
- (FeatureHierarchyElement) optionalElements[i];
- Object[] children = fe.getChildren(true, patch, config);
- preserveOptionalState(config, targetSite, patch, children);
- if (!fe.isEnabled(config)) {
- IFeature newFeature = fe.getFeature();
- try {
- IFeature localFeature =
- findLocalFeature(targetSite, newFeature);
- if (localFeature != null)
- targetSite.unconfigure(localFeature);
- } catch (CoreException e) {
- // Eat this - we will leave with it
- }
- }
- }
- }
-
- static void collectOldFeatures(
- IFeature feature,
- IConfiguredSite targetSite,
- ArrayList result)
- throws CoreException {
- IIncludedFeatureReference[] included = feature.getIncludedFeatureReferences();
- for (int i = 0; i < included.length; i++) {
- IIncludedFeatureReference iref = included[i];
-
- IFeature ifeature;
-
- try {
- ifeature = iref.getFeature(null);
- }
- catch (CoreException e) {
- if (iref.isOptional()) continue;
- throw e;
- }
- // find other features and unconfigure
- String id = iref.getVersionedIdentifier().getIdentifier();
- IFeature[] sameIds =
- UpdateUI.searchSite(id, targetSite, true);
- for (int j = 0; j < sameIds.length; j++) {
- IFeature sameId = sameIds[j];
- // Ignore self.
- if (sameId.equals(ifeature))
- continue;
- result.add(sameId);
- }
- collectOldFeatures(ifeature, targetSite, result);
- }
- }
-
- private static IFeature findLocalFeature(
- IConfiguredSite csite,
- IFeature feature)
- throws CoreException {
- IFeatureReference[] refs = csite.getConfiguredFeatures();
- for (int i = 0; i < refs.length; i++) {
- IFeatureReference ref = refs[i];
- VersionedIdentifier refVid = ref.getVersionedIdentifier();
- if (feature.getVersionedIdentifier().equals(refVid))
- return ref.getFeature(null);
- }
- return null;
- }
-
- private void preserveOriginatingURLs(
- IFeature feature,
- IFeatureReference[] optionalFeatures) {
- // walk the hieararchy and preserve the originating URL
- // for all the optional features that are not chosen to
- // be installed.
- URL url = feature.getSite().getURL();
- try {
- IIncludedFeatureReference[] irefs = feature.getIncludedFeatureReferences();
- for (int i = 0; i < irefs.length; i++) {
- IIncludedFeatureReference iref = irefs[i];
- boolean preserve = false;
- if (iref.isOptional()) {
- boolean onTheList = false;
- for (int j = 0; j < optionalFeatures.length; j++) {
- if (optionalFeatures[j].equals(iref)) {
- //was on the list
- onTheList = true;
- break;
- }
- }
- if (!onTheList)
- preserve = true;
- }
- if (preserve) {
- String id =
- iref.getVersionedIdentifier().getIdentifier();
- UpdateUI.setOriginatingURL(id, url);
- } else {
- try {
- IFeature ifeature = iref.getFeature(null);
- preserveOriginatingURLs(ifeature, optionalFeatures);
- } catch (CoreException e) {
- // Silently ignore
- }
- }
- }
- } catch (CoreException e) {
- // Silently ignore
- }
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/InstallWizardDialog.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/InstallWizardDialog.java
deleted file mode 100644
index 94fac68..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/InstallWizardDialog.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.wizards;
-
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.jface.wizard.*;
-
-public class InstallWizardDialog extends WizardDialog {
-
- public InstallWizardDialog(Shell shell, IWizard wizard) {
- super(shell, wizard);
- }
-
- public void cancel() {
- cancelPressed();
- }
-}
-
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/LicensePage.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/LicensePage.java
deleted file mode 100644
index 84dff1a..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/LicensePage.java
+++ /dev/null
@@ -1,198 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.wizards;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.update.core.IFeature;
-import org.eclipse.update.internal.ui.*;
-import org.eclipse.update.internal.ui.model.PendingChange;
-
-public class LicensePage extends WizardPage implements IDynamicPage {
- private static final String KEY_TITLE = "InstallWizard.LicensePage.title"; //$NON-NLS-1$
- private static final String KEY_DESC = "InstallWizard.LicensePage.desc"; //$NON-NLS-1$
- private static final String KEY_DESC2 = "InstallWizard.LicensePage.desc2"; //$NON-NLS-1$
- private static final String KEY_HEADER = "InstallWizard.LicensePage.header"; //$NON-NLS-1$
- private static final String KEY_ACCEPT = "InstallWizard.LicensePage.accept"; //$NON-NLS-1$
- private static final String KEY_DECLINE = "InstallWizard.LicensePage.decline"; //$NON-NLS-1$
- private static final String KEY_ACCEPT2 = "InstallWizard.LicensePage.accept2"; //$NON-NLS-1$
- private static final String KEY_DECLINE2 = "InstallWizard.LicensePage.decline2"; //$NON-NLS-1$
- private boolean multiLicenseMode = false;
- private PendingChange[] jobs;
- private Text text;
- private Table table;
-
- /**
- * Constructor for LicensePage
- */
- public LicensePage(boolean multiLicenseMode) {
- super("License"); //$NON-NLS-1$
- setTitle(UpdateUI.getString(KEY_TITLE));
- setPageComplete(false);
- this.multiLicenseMode = multiLicenseMode;
- UpdateUI.getDefault().getLabelProvider().connect(this);
- setDescription(
- UpdateUI.getString(
- multiLicenseMode ? KEY_DESC2 : KEY_DESC));
- }
- public void dispose() {
- UpdateUI.getDefault().getLabelProvider().disconnect(this);
- super.dispose();
- }
-
- public LicensePage(PendingChange job) {
- this(false);
- setJobs(new PendingChange[] { job });
- }
-
- public void setJobs(PendingChange[] jobs) {
- this.jobs = jobs;
- }
-
- /**
- * @see DialogPage#createControl(Composite)
- */
- public void createControl(Composite parent) {
- Composite client = new Composite(parent, SWT.NULL);
- client.setLayoutData(new GridData(GridData.FILL_BOTH));
- GridLayout layout = new GridLayout();
- client.setLayout(layout);
-
- WorkbenchHelp.setHelp(client, "org.eclipse.update.ui.LicensePage");
-
- if (multiLicenseMode) {
- layout.numColumns = 3;
- layout.makeColumnsEqualWidth = true;
-
- table = new Table(client, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
-
- table.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- if (e.item != null) {
- Object data = e.item.getData();
- if (data == null) {
- text.setText("");
- } else {
- text.setText((String) data);
- }
- }
- }
- });
- GridData td = new GridData(GridData.FILL_BOTH);
- table.setLayoutData(td);
- }
- text =
- new Text(
- client,
- SWT.MULTI
- | SWT.BORDER
- | SWT.V_SCROLL
- | SWT.H_SCROLL
- | SWT.READ_ONLY);
-
- GridData gd = new GridData(GridData.FILL_BOTH);
- if (multiLicenseMode)
- gd.horizontalSpan = 2;
- text.setLayoutData(gd);
- text.setBackground(
- text.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
-
- Composite buttonContainer = new Composite(client, SWT.NULL);
- GridLayout buttonLayout = new GridLayout();
- gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- if (multiLicenseMode)
- gd.horizontalSpan = 3;
- buttonContainer.setLayout(buttonLayout);
- buttonContainer.setLayoutData(gd);
-
- final Button acceptButton = new Button(buttonContainer, SWT.RADIO);
- acceptButton.setText(
- UpdateUI.getString(
- multiLicenseMode ? KEY_ACCEPT2 : KEY_ACCEPT));
- acceptButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- setPageComplete(acceptButton.getSelection());
- }
- });
- Button declineButton = new Button(buttonContainer, SWT.RADIO);
- declineButton.setText(
- UpdateUI.getString(
- multiLicenseMode ? KEY_DECLINE2 : KEY_DECLINE));
- declineButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- setPageComplete(acceptButton.getSelection());
- }
- });
- setControl(client);
- }
-
- public void setVisible(boolean visible) { // TO DO: Optimize out the case where a feature does not have a license?
- if (visible) {
- if (multiLicenseMode) {
- TableItem item;
- for (int i = 0; i < jobs.length; i++) {
- IFeature feature = jobs[i].getFeature();
- item = new TableItem(table, SWT.NONE);
- String label =
- feature.getLabel()
- + " "
- + feature
- .getVersionedIdentifier()
- .getVersion()
- .toString();
- item.setText(label);
- boolean efix = feature.isPatch();
- item.setImage(
- UpdateUI.getDefault().getLabelProvider().get(
- efix
- ? UpdateUIImages.DESC_EFIX_OBJ
- : UpdateUIImages.DESC_FEATURE_OBJ));
- String license = feature.getLicense().getAnnotation();
- // Question: Can this ever be null? What is the runtime cost?
- item.setData(license);
- }
-
- table.setSelection(0);
- }
- showLicenseText();
- } else {
- if (multiLicenseMode) {
- TableItem items[] = table.getItems();
- for (int i = items.length - 1; i >= 0; i--) {
- table.getItem(i).dispose();
- }
- }
- }
- super.setVisible(visible);
- }
-
- private void showLicenseText() {
- if (!multiLicenseMode) {
- String license = jobs[0].getFeature().getLicense().getAnnotation();
- text.setText(license);
- return;
- }
- TableItem[] selectedItems = table.getSelection();
- if (selectedItems.length == 0) {
- text.setText("");
- } else {
- Object data = selectedItems[0].getData();
- if (data == null) {
- text.setText("");
- } else {
- text.setText((String) data);
- }
- }
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/MultiInstallWizard.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/MultiInstallWizard.java
deleted file mode 100644
index d64cd6e..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/MultiInstallWizard.java
+++ /dev/null
@@ -1,587 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.wizards;
-import java.lang.reflect.InvocationTargetException;
-import java.net.URL;
-import java.util.ArrayList;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.wizard.*;
-import org.eclipse.update.configuration.*;
-import org.eclipse.update.core.*;
-import org.eclipse.update.core.model.InstallAbortedException;
-import org.eclipse.update.internal.ui.*;
-import org.eclipse.update.internal.ui.model.*;
-import org.eclipse.update.internal.ui.security.JarVerificationService;
-
-public class MultiInstallWizard extends Wizard {
- private static final String KEY_UNABLE = "MultiInstallWizard.error.unable";
- private static final String KEY_OLD = "MultiInstallWizard.error.old";
- private static final String KEY_SAVED_CONFIG =
- "MultiInstallWizard.savedConfig";
- private static final String KEY_INSTALLING =
- "MultiInstallWizard.installing";
- private MultiReviewPage reviewPage;
- private LicensePage licensePage;
- private MultiOptionalFeaturesPage optionalFeaturesPage;
- private MultiTargetPage targetPage;
- private PendingChange[] jobs;
- private IInstallConfiguration config;
- private boolean needLicensePage;
- private int installCount = 0;
-
- public MultiInstallWizard(PendingChange[] jobs) {
- this(jobs, true);
- }
-
- public MultiInstallWizard(PendingChange[] jobs, boolean needLicensePage) {
- setDialogSettings(UpdateUI.getDefault().getDialogSettings());
- setDefaultPageImageDescriptor(UpdateUIImages.DESC_INSTALL_WIZ);
- setForcePreviousAndNextButtons(true);
- setNeedsProgressMonitor(true);
- setWindowTitle(
- UpdateUI.getString("MultiInstallWizard.wtitle"));
- this.jobs = jobs;
- this.needLicensePage = needLicensePage;
- }
-
- public boolean isSuccessfulInstall() {
- return installCount > 0;
- }
-
- /**
- * @see Wizard#performFinish()
- */
- public boolean performFinish() {
- final PendingChange[] selectedJobs = reviewPage.getSelectedJobs();
- installCount = 0;
-
- if (targetPage != null) {
- // Check for duplication conflicts
- ArrayList conflicts =
- DuplicateConflictsDialog.computeDuplicateConflicts(
- targetPage.getTargetSites(),
- config);
- if (conflicts != null) {
- DuplicateConflictsDialog dialog =
- new DuplicateConflictsDialog(getShell(), conflicts);
- if (dialog.open() != 0)
- return false;
- }
- }
-
- // ok to continue
- IRunnableWithProgress operation = new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor)
- throws InvocationTargetException {
- try {
- MultiInstallWizard.makeConfigurationCurrent(config, null);
- execute(selectedJobs, monitor);
- } catch (InstallAbortedException e) {
- throw new InvocationTargetException(e);
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- }
- }
- };
- try {
- getContainer().run(true, true, operation);
- } catch (InvocationTargetException e) {
- Throwable targetException = e.getTargetException();
- if (targetException instanceof InstallAbortedException) {
- return true;
- } else {
- UpdateUI.logException(e);
- }
- return false;
- } catch (InterruptedException e) {
- return false;
- }
- return true;
- }
-
- /*
- * When we are uninstalling, there is not targetSite
- */
- private void execute(
- PendingChange[] selectedJobs,
- IProgressMonitor monitor)
- throws InstallAbortedException, CoreException {
- monitor.beginTask(
- UpdateUI.getString(KEY_INSTALLING),
- jobs.length);
- for (int i = 0; i < selectedJobs.length; i++) {
- PendingChange job = selectedJobs[i];
- SubProgressMonitor subMonitor =
- new SubProgressMonitor(
- monitor,
- 1,
- SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK);
- executeOneJob(job, subMonitor);
- //monitor.worked(1);
- InstallWizard.saveLocalSite();
- installCount++;
- }
- }
-
- public void addPages() {
- reviewPage = new MultiReviewPage(jobs);
- addPage(reviewPage);
-
- config = createInstallConfiguration();
- boolean addLicensePage = false;
- boolean addOptionalFeaturesPage = false;
- boolean addTargetPage = false;
-
- for (int i = 0; i < jobs.length; i++) {
- PendingChange job = jobs[i];
-
- if (job.getJobType() == PendingChange.INSTALL) {
- if (needLicensePage && UpdateModel.hasLicense(job)) {
- addLicensePage = true;
- }
- if (UpdateModel.hasOptionalFeatures(job.getFeature())) {
- addOptionalFeaturesPage = true;
- }
- addTargetPage = true;
- }
- }
- if (addLicensePage) {
- licensePage = new LicensePage(true);
- addPage(licensePage);
- }
- if (addOptionalFeaturesPage) {
- optionalFeaturesPage = new MultiOptionalFeaturesPage(config);
- addPage(optionalFeaturesPage);
- }
- if (addTargetPage) {
- targetPage = new MultiTargetPage(config);
- addPage(targetPage);
- }
- }
-
- private boolean isPageRequired(IWizardPage page) {
- if (page.equals(licensePage)) {
- return reviewPage.hasSelectedJobsWithLicenses();
- }
- if (page.equals(optionalFeaturesPage)) {
- return reviewPage.hasSelectedJobsWithOptionalFeatures();
- }
- if (page.equals(targetPage)) {
- return reviewPage.hasSelectedInstallJobs();
- }
- return true;
- }
-
- public IWizardPage getNextPage(IWizardPage page) {
- IWizardPage[] pages = getPages();
- boolean start = false;
- IWizardPage nextPage = null;
-
- if (page.equals(reviewPage)) {
- updateDynamicPages();
- }
-
- for (int i = 0; i < pages.length; i++) {
- if (pages[i].equals(page)) {
- start = true;
- } else if (start) {
- if (isPageRequired(pages[i])) {
- nextPage = pages[i];
- break;
- }
- }
- }
- return nextPage;
- }
-
- private void updateDynamicPages() {
- if (licensePage != null) {
- PendingChange[] licenseJobs =
- reviewPage.getSelectedJobsWithLicenses();
- licensePage.setJobs(licenseJobs);
- }
- if (optionalFeaturesPage != null) {
- PendingChange[] optionalJobs =
- reviewPage.getSelectedJobsWithOptionalFeatures();
- optionalFeaturesPage.setJobs(optionalJobs);
- }
- if (targetPage != null) {
- PendingChange[] installJobs = reviewPage.getSelectedInstallJobs();
- targetPage.setJobs(installJobs);
- }
- }
-
- public static IInstallConfiguration createInstallConfiguration() {
- try {
- ILocalSite localSite = SiteManager.getLocalSite();
- IInstallConfiguration config =
- localSite.cloneCurrentConfiguration();
- config.setLabel(Utilities.format(config.getCreationDate()));
- return config;
- } catch (CoreException e) {
- UpdateUI.logException(e);
- return null;
- }
- }
-
- public static void makeConfigurationCurrent(
- IInstallConfiguration config,
- PendingChange job)
- throws CoreException {
- ILocalSite localSite = SiteManager.getLocalSite();
- if (job != null && job.getJobType() == PendingChange.INSTALL) {
- if (job.getFeature().isPatch()) {
- // Installing a patch - preserve the current configuration
- IInstallConfiguration cconfig =
- localSite.getCurrentConfiguration();
- IInstallConfiguration savedConfig =
- localSite.addToPreservedConfigurations(cconfig);
- VersionedIdentifier vid =
- job.getFeature().getVersionedIdentifier();
- String key = "@" + vid.getIdentifier() + "_" + vid.getVersion();
- String newLabel =
- UpdateUI.getFormattedMessage(KEY_SAVED_CONFIG, key);
- savedConfig.setLabel(newLabel);
- UpdateModel model =
- UpdateUI.getDefault().getUpdateModel();
- model.fireObjectChanged(savedConfig, null);
- }
- }
- localSite.addConfiguration(config);
- }
-
- public static void saveLocalSite() throws CoreException {
- ILocalSite localSite = SiteManager.getLocalSite();
- localSite.save();
- }
-
- public boolean canFinish() {
- IWizardPage page = getContainer().getCurrentPage();
- return page.getNextPage() == null && super.canFinish();
- }
-
- private void executeOneJob(PendingChange job, IProgressMonitor monitor)
- throws CoreException {
- IConfiguredSite targetSite = null;
- Object[] optionalElements = null;
- IFeatureReference[] optionalFeatures = null;
- if (job.getJobType() == PendingChange.INSTALL) {
- if (optionalFeaturesPage != null) {
- optionalElements =
- optionalFeaturesPage.getOptionalElements(job);
- optionalFeatures =
- optionalFeaturesPage.getCheckedOptionalFeatures(job);
- }
- if (targetPage != null) {
- targetSite = targetPage.getTargetSite(job);
- }
- }
- executeOneJob(
- job,
- targetSite,
- optionalElements,
- optionalFeatures,
- monitor);
- }
-
- private void executeOneJob(
- PendingChange job,
- IConfiguredSite targetSite,
- Object[] optionalElements,
- IFeatureReference[] optionalFeatures,
- IProgressMonitor monitor)
- throws CoreException {
-
- IFeature feature = job.getFeature();
- if (job.getJobType() == PendingChange.UNINSTALL) {
- //find the config site of this feature
- IConfiguredSite site = findConfigSite(feature, config);
- if (site != null) {
- site.remove(feature, monitor);
- } else {
- // we should do something here
- throwError(
- UpdateUI.getFormattedMessage(
- KEY_UNABLE,
- feature.getLabel()));
- }
- } else if (job.getJobType() == PendingChange.INSTALL) {
- if (optionalFeatures == null)
- targetSite.install(feature, getVerificationListener(), monitor);
- else
- targetSite.install(
- feature,
- optionalFeatures,
- getVerificationListener(),
- monitor);
- IFeature oldFeature = job.getOldFeature();
- if (oldFeature != null && !job.isOptionalDelta()) {
- if (optionalElements != null) {
- boolean patch = UpdateUI.isPatch(feature);
- preserveOptionalState(config, targetSite, patch, optionalElements);
- }
- boolean oldSuccess = unconfigure(config, oldFeature);
- if (!oldSuccess) {
- if (!isNestedChild(oldFeature))
- // "eat" the error if nested child
- throwError(
- UpdateUI.getFormattedMessage(
- KEY_OLD,
- oldFeature.getLabel()));
- }
- }
- if (oldFeature == null) {
- ensureUnique(config, feature, targetSite);
- if (optionalFeatures != null) {
- preserveOriginatingURLs(feature, optionalFeatures);
- }
- }
- } else if (job.getJobType() == PendingChange.CONFIGURE) {
- configure(feature);
- ensureUnique(config, feature, targetSite);
- } else if (job.getJobType() == PendingChange.UNCONFIGURE) {
- unconfigure(config, job.getFeature());
- } else {
- // should not be here
- return;
- }
- UpdateModel model = UpdateUI.getDefault().getUpdateModel();
- job.markProcessed();
- model.fireObjectChanged(job, null);
- }
-
- static void ensureUnique(
- IInstallConfiguration config,
- IFeature feature,
- IConfiguredSite targetSite)
- throws CoreException {
- boolean patch = false;
- if (targetSite == null)
- targetSite = feature.getSite().getCurrentConfiguredSite();
- IImport[] imports = feature.getImports();
- for (int i = 0; i < imports.length; i++) {
- IImport iimport = imports[i];
- if (iimport.isPatch()) {
- patch = true;
- break;
- }
- }
- // Only need to check features that patch other features.
- if (!patch)
- return;
- IFeature localFeature = findLocalFeature(targetSite, feature);
- ArrayList oldFeatures = new ArrayList();
- // First collect all older active features that
- // have the same ID as new features marked as 'unique'.
- collectOldFeatures(localFeature, targetSite, oldFeatures);
- // Now unconfigure old features to enforce uniqueness
- for (int i = 0; i < oldFeatures.size(); i++) {
- IFeature oldFeature = (IFeature) oldFeatures.get(i);
- unconfigure(config, oldFeature);
- }
- }
-
- private void throwError(String message) throws CoreException {
- IStatus status =
- new Status(
- IStatus.ERROR,
- UpdateUI.getPluginId(),
- IStatus.OK,
- message,
- null);
- throw new CoreException(status);
- }
-
- static IConfiguredSite findConfigSite(
- IFeature feature,
- IInstallConfiguration config)
- throws CoreException {
- IConfiguredSite[] configSites = config.getConfiguredSites();
- for (int i = 0; i < configSites.length; i++) {
- IConfiguredSite site = configSites[i];
- if (site.getSite().equals(feature.getSite())) {
- return site;
- }
- }
- return null;
- }
-
- private static boolean unconfigure(
- IInstallConfiguration config,
- IFeature feature)
- throws CoreException {
- IConfiguredSite site = findConfigSite(feature, config);
- if (site != null) {
- PatchCleaner cleaner = new PatchCleaner(site, feature);
- boolean result = site.unconfigure(feature);
- cleaner.dispose();
- return result;
- }
- return false;
- }
-
- private void configure(IFeature feature) throws CoreException {
- IConfiguredSite site = findConfigSite(feature, config);
- if (site != null) {
- site.configure(feature);
- }
- }
-
- private IVerificationListener getVerificationListener() {
- return new JarVerificationService(this.getShell());
- }
-
- private boolean isNestedChild(IFeature feature) {
- IConfiguredSite[] csites = config.getConfiguredSites();
- try {
- for (int i = 0; csites != null && i < csites.length; i++) {
- IFeatureReference[] refs = csites[i].getConfiguredFeatures();
- for (int j = 0; refs != null && j < refs.length; j++) {
- IFeature parent = refs[j].getFeature(null);
- IFeatureReference[] children =
- parent.getIncludedFeatureReferences();
- for (int k = 0;
- children != null && k < children.length;
- k++) {
- IFeature child = children[k].getFeature(null);
- if (feature.equals(child))
- return true;
- }
- }
- }
- } catch (CoreException e) {
- // will return false
- }
- return false;
- }
-
- static void preserveOptionalState(
- IInstallConfiguration config,
- IConfiguredSite targetSite,
- boolean patch,
- Object[] optionalElements) {
- for (int i = 0; i < optionalElements.length; i++) {
- FeatureHierarchyElement fe =
- (FeatureHierarchyElement) optionalElements[i];
- Object[] children = fe.getChildren(true, patch, config);
- preserveOptionalState(config, targetSite, patch, children);
- if (!fe.isEnabled(config)) {
- IFeature newFeature = fe.getFeature();
- try {
- IFeature localFeature =
- findLocalFeature(targetSite, newFeature);
- if (localFeature != null)
- targetSite.unconfigure(localFeature);
- } catch (CoreException e) {
- // Eat this - we will leave with it
- }
- }
- }
- }
-
- static void collectOldFeatures(
- IFeature feature,
- IConfiguredSite targetSite,
- ArrayList result)
- throws CoreException {
- IIncludedFeatureReference[] included = feature.getIncludedFeatureReferences();
- for (int i = 0; i < included.length; i++) {
- IIncludedFeatureReference iref = included[i];
-
- IFeature ifeature;
-
- try {
- ifeature = iref.getFeature(null);
- }
- catch (CoreException e) {
- if (iref.isOptional()) continue;
- throw e;
- }
- // find other features and unconfigure
- String id = iref.getVersionedIdentifier().getIdentifier();
- IFeature[] sameIds =
- UpdateUI.searchSite(id, targetSite, true);
- for (int j = 0; j < sameIds.length; j++) {
- IFeature sameId = sameIds[j];
- // Ignore self.
- if (sameId.equals(ifeature))
- continue;
- result.add(sameId);
- }
- collectOldFeatures(ifeature, targetSite, result);
- }
- }
-
- private static IFeature findLocalFeature(
- IConfiguredSite csite,
- IFeature feature)
- throws CoreException {
- IFeatureReference[] refs = csite.getConfiguredFeatures();
- for (int i = 0; i < refs.length; i++) {
- IFeatureReference ref = refs[i];
- VersionedIdentifier refVid = ref.getVersionedIdentifier();
- if (feature.getVersionedIdentifier().equals(refVid))
- return ref.getFeature(null);
- }
- return null;
- }
-
- private void preserveOriginatingURLs(
- IFeature feature,
- IFeatureReference[] optionalFeatures) {
- // walk the hieararchy and preserve the originating URL
- // for all the optional features that are not chosen to
- // be installed.
- URL url = feature.getSite().getURL();
- try {
- IIncludedFeatureReference[] irefs =
- feature.getIncludedFeatureReferences();
- for (int i = 0; i < irefs.length; i++) {
- IIncludedFeatureReference iref = irefs[i];
- boolean preserve = false;
- if (iref.isOptional()) {
- boolean onTheList = false;
- for (int j = 0; j < optionalFeatures.length; j++) {
- if (optionalFeatures[j].equals(iref)) {
- //was on the list
- onTheList = true;
- break;
- }
- }
- if (!onTheList)
- preserve = true;
- }
- if (preserve) {
- try {
- String id =
- iref.getVersionedIdentifier().getIdentifier();
- UpdateUI.setOriginatingURL(id, url);
- } catch (CoreException e) {
- // Silently ignore
- }
- } else {
- try {
- IFeature ifeature = iref.getFeature(null);
- preserveOriginatingURLs(ifeature, optionalFeatures);
- } catch (CoreException e) {
- // Silently ignore
- }
- }
- }
- } catch (CoreException e) {
- // Silently ignore
- }
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/MultiOptionalFeaturesPage.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/MultiOptionalFeaturesPage.java
deleted file mode 100644
index 065a7b4..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/MultiOptionalFeaturesPage.java
+++ /dev/null
@@ -1,377 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.wizards;
-import java.util.*;
-
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.update.configuration.IInstallConfiguration;
-import org.eclipse.update.core.*;
-import org.eclipse.update.internal.ui.*;
-import org.eclipse.update.internal.ui.model.PendingChange;
-import org.eclipse.update.internal.ui.parts.*;
-
-public class MultiOptionalFeaturesPage extends BannerPage implements IDynamicPage {
- // NL keys
- private static final String KEY_TITLE =
- "InstallWizard.OptionalFeaturesPage.title";
- private static final String KEY_DESC =
- "InstallWizard.OptionalFeaturesPage.desc";
- private static final String KEY_TREE_LABEL =
- "InstallWizard.OptionalFeaturesPage.treeLabel";
- private static final String KEY_SELECT_ALL =
- "InstallWizard.OptionalFeaturesPage.selectAll";
- private static final String KEY_DESELECT_ALL =
- "InstallWizard.OptionalFeaturesPage.deselectAll";
- private CheckboxTreeViewer treeViewer;
- private IInstallConfiguration config;
- private JobRoot[] jobRoots;
- private Hashtable elementTable;
-
- class JobRoot {
- private PendingChange job;
- private Object[] elements;
- public JobRoot(PendingChange job) {
- this.job = job;
- }
-
- public PendingChange getJob() {
- return job;
- }
-
- public Object[] getElements() {
- if (elements == null)
- computeElements();
- return elements;
- }
-
- private void computeElements() {
- IFeature oldFeature = job.getOldFeature();
- IFeature newFeature = job.getFeature();
- ArrayList list = new ArrayList();
- boolean patch = UpdateUI.isPatch(newFeature);
- FeatureHierarchyElement.computeElements(
- oldFeature,
- newFeature,
- oldFeature != null,
- patch,
- config,
- list);
- elements = list.toArray();
- for (int i = 0; i < elements.length; i++) {
- FeatureHierarchyElement element =
- (FeatureHierarchyElement) elements[i];
- element.setRoot(this);
- }
- }
- }
-
- class TreeContentProvider
- extends DefaultContentProvider
- implements ITreeContentProvider {
-
- public Object[] getChildren(Object parent) {
- if (parent instanceof JobRoot) {
- return ((JobRoot) parent).getElements();
- }
- if (parent instanceof FeatureHierarchyElement) {
- FeatureHierarchyElement fe = (FeatureHierarchyElement) parent;
- Object root = fe.getRoot();
- boolean oldFeature = false;
- if (root instanceof JobRoot) {
- PendingChange job = ((JobRoot)root).getJob();
- boolean patch = UpdateUI.isPatch(job.getFeature());
- oldFeature = job.getOldFeature() != null;
- return fe.getChildren(oldFeature, patch, config);
- }
- }
- return new Object[0];
- }
-
- public Object getParent(Object child) {
- return null;
- }
-
- public boolean hasChildren(Object parent) {
- return getChildren(parent).length > 0;
- }
-
- public Object[] getElements(Object input) {
- if (jobRoots == null)
- return new Object[0];
- return jobRoots;
- }
- }
-
- class TreeLabelProvider extends LabelProvider {
- public String getText(Object obj) {
- if (obj instanceof JobRoot) {
- IFeature feature = ((JobRoot) obj).getJob().getFeature();
- return feature.getLabel()
- + " "
- + feature.getVersionedIdentifier().getVersion().toString();
- }
- if (obj instanceof FeatureHierarchyElement) {
- FeatureHierarchyElement fe = (FeatureHierarchyElement) obj;
- String name = fe.getLabel();
- if (name != null)
- return name;
- }
-
- return super.getText(obj);
- }
- public Image getImage(Object obj) {
- return UpdateUI.getDefault().getLabelProvider().get(
- UpdateUIImages.DESC_FEATURE_OBJ);
- }
- }
-
- /**
- * Constructor for ReviewPage
- */
- public MultiOptionalFeaturesPage(IInstallConfiguration config) {
- super("OptionalFeatures");
- setTitle(UpdateUI.getString(KEY_TITLE));
- setDescription(UpdateUI.getString(KEY_DESC));
- this.config = config;
- UpdateUI.getDefault().getLabelProvider().connect(this);
- }
-
- public void setJobs(PendingChange[] jobs) {
- jobRoots = new JobRoot[jobs.length];
- for (int i = 0; i < jobs.length; i++) {
- jobRoots[i] = new JobRoot(jobs[i]);
- }
- }
-
- public void dispose() {
- UpdateUI.getDefault().getLabelProvider().disconnect(this);
- super.dispose();
- }
-
- /**
- * @see DialogPage#createControl(Composite)
- */
- public Control createContents(Composite parent) {
- Composite client = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginWidth = layout.marginHeight = 0;
- client.setLayout(layout);
- createCheckboxTreeViewer(client);
- Button selectAllButton = new Button(client, SWT.PUSH);
- selectAllButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- selectAll(true);
- }
- });
- selectAllButton.setText(
- UpdateUI.getString(KEY_SELECT_ALL));
- GridData gd =
- new GridData(
- GridData.HORIZONTAL_ALIGN_FILL
- | GridData.VERTICAL_ALIGN_BEGINNING);
- selectAllButton.setLayoutData(gd);
- SWTUtil.setButtonDimensionHint(selectAllButton);
-
- Button deselectAllButton = new Button(client, SWT.PUSH);
- deselectAllButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- selectAll(false);
- }
- });
- deselectAllButton.setText(
- UpdateUI.getString(KEY_DESELECT_ALL));
- gd =
- new GridData(
- GridData.HORIZONTAL_ALIGN_FILL
- | GridData.VERTICAL_ALIGN_BEGINNING);
- deselectAllButton.setLayoutData(gd);
- SWTUtil.setButtonDimensionHint(deselectAllButton);
- WorkbenchHelp.setHelp(client, "org.eclipse.update.ui.MultiOptionalFeaturesPage");
- return client;
- }
-
- private void createCheckboxTreeViewer(Composite parent) {
- Label label = new Label(parent, SWT.NULL);
- label.setText(UpdateUI.getString(KEY_TREE_LABEL));
- GridData gd = new GridData();
- gd.horizontalSpan = 2;
- label.setLayoutData(gd);
- treeViewer =
- new CheckboxTreeViewer(
- parent,
- SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
- gd = new GridData(GridData.FILL_BOTH);
- gd.verticalSpan = 2;
- Tree tree = treeViewer.getTree();
- tree.setLayoutData(gd);
- treeViewer.setContentProvider(new TreeContentProvider());
- treeViewer.setLabelProvider(new TreeLabelProvider());
- treeViewer.addCheckStateListener(new ICheckStateListener() {
- public void checkStateChanged(CheckStateChangedEvent e) {
- handleChecked(e.getElement(), e.getChecked());
- }
- });
- treeViewer.setAutoExpandLevel(AbstractTreeViewer.ALL_LEVELS);
- treeViewer.setInput(this);
- }
-
- public void setVisible(boolean visible) {
- if (visible) {
- treeViewer.setInput(jobRoots);
- initializeStates();
- }
- super.setVisible(visible);
- if (visible) {
- treeViewer.getTree().setFocus();
- }
- }
-
- private void initializeStates() {
- ArrayList checked = new ArrayList();
- ArrayList grayed = new ArrayList();
-
- for (int i = 0; i < jobRoots.length; i++) {
- JobRoot jobRoot = jobRoots[i];
- PendingChange job = jobRoot.getJob();
- checked.add(jobRoot);
- grayed.add(jobRoot);
- boolean update = job.getOldFeature() != null;
- initializeStates(update, jobRoot.getElements(), checked, grayed);
- }
- treeViewer.setCheckedElements(checked.toArray());
- treeViewer.setGrayedElements(grayed.toArray());
- }
-
- private void initializeStates(
- boolean update,
- Object[] elements,
- ArrayList checked,
- ArrayList grayed) {
-
- for (int i = 0; i < elements.length; i++) {
- FeatureHierarchyElement element =
- (FeatureHierarchyElement) elements[i];
- if (element.isChecked())
- checked.add(element);
- if (!element.isEditable())
- grayed.add(element);
- Object[] children = element.getChildren();
- initializeStates(update, children, checked, grayed);
- }
- }
-
- private void selectAll(boolean value) {
- ArrayList selected = new ArrayList();
-
- for (int i = 0; i < jobRoots.length; i++) {
- JobRoot jobRoot = jobRoots[i];
- PendingChange job = jobRoot.getJob();
- selected.add(job);
- Object[] elements = jobRoot.getElements();
- for (int j = 0; j < elements.length; j++) {
- FeatureHierarchyElement element =
- (FeatureHierarchyElement) elements[j];
- selectAll(
- job.getOldFeature() != null,
- element,
- selected,
- value);
- }
- }
- treeViewer.setCheckedElements(selected.toArray());
- }
-
- private void selectAll(
- boolean update,
- FeatureHierarchyElement ref,
- ArrayList selected,
- boolean value) {
-
- if (ref.isOptional() == false)
- selected.add(ref);
- else {
- if (ref.isEditable()) {
- ref.setChecked(value);
- if (value)
- selected.add(ref);
- } else {
- if (ref.isChecked())
- selected.add(ref);
- }
- }
- Object[] included = ref.getChildren();
- for (int i = 0; i < included.length; i++) {
- FeatureHierarchyElement fe = (FeatureHierarchyElement) included[i];
- selectAll(update, fe, selected, value);
- }
- }
-
- private void handleChecked(Object element, boolean checked) {
- if (element instanceof JobRoot) {
- treeViewer.setChecked(element, !checked);
- return;
- }
- FeatureHierarchyElement fe = (FeatureHierarchyElement) element;
-
- if (!fe.isEditable())
- treeViewer.setChecked(element, !checked);
- else {
- // update the result
- fe.setChecked(checked);
- }
- }
-
- public Object [] getOptionalElements(PendingChange job) {
- for (int i = 0; i < jobRoots.length; i++) {
- JobRoot root = jobRoots[i];
- PendingChange curr = root.getJob();
- if (job.equals(curr)) {
- return root.getElements();
- }
- }
- return null;
- }
-
- public IFeatureReference[] getCheckedOptionalFeatures(PendingChange currentJob) {
- HashSet set = new HashSet();
- JobRoot jobRoot = null;
-
- for (int i = 0; i < jobRoots.length; i++) {
- JobRoot root = jobRoots[i];
- PendingChange job = root.getJob();
- if (currentJob.equals(job)) {
- jobRoot = root;
- break;
- }
- }
- if (jobRoot == null)
- return new IFeatureReference[0];
-
- PendingChange job = jobRoot.getJob();
- boolean update = job.getOldFeature() != null;
- boolean patch = UpdateUI.isPatch(job.getFeature());
- Object[] elements = jobRoot.getElements();
- for (int i = 0; i < elements.length; i++) {
- FeatureHierarchyElement element =
- (FeatureHierarchyElement) elements[i];
- element.addCheckedOptionalFeatures(update, patch, config, set);
- }
- return (IFeatureReference[]) set.toArray(
- new IFeatureReference[set.size()]);
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/MultiReviewPage.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/MultiReviewPage.java
deleted file mode 100644
index 18b7810..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/MultiReviewPage.java
+++ /dev/null
@@ -1,471 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.wizards;
-import java.util.ArrayList;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.update.core.*;
-import org.eclipse.update.internal.ui.*;
-import org.eclipse.update.internal.ui.forms.ActivityConstraints;
-import org.eclipse.update.internal.ui.model.*;
-import org.eclipse.update.internal.ui.parts.*;
-
-public class MultiReviewPage extends BannerPage {
- // NL keys
- private static final String KEY_TITLE =
- "MultiInstallWizard.MultiReviewPage.title";
- private static final String KEY_DESC =
- "MultiInstallWizard.MultiReviewPage.desc";
- private static final String KEY_C_TASK =
- "MultiInstallWizard.MultiReviewPage.c.task";
- private static final String KEY_C_FEATURE =
- "MultiInstallWizard.MultiReviewPage.c.feature";
- private static final String KEY_C_VERSION =
- "MultiInstallWizard.MultiReviewPage.c.version";
- private static final String KEY_C_PROVIDER =
- "MultiInstallWizard.MultiReviewPage.c.provider";
- private static final String KEY_COUNTER =
- "MultiInstallWizard.MultiReviewPage.counter";
- private static final String KEY_FILTER_CHECK =
- "MultiInstallWizard.MultiReviewPage.filterCheck";
-
- private PendingChange[] jobs;
- private Label counterLabel;
- private CheckboxTableViewer tableViewer;
- private IStatus validationStatus;
- private Button statusButton;
- private Button filterCheck;
- private ContainmentFilter filter = new ContainmentFilter();
-
- class JobsContentProvider
- extends DefaultContentProvider
- implements IStructuredContentProvider {
-
- public Object[] getElements(Object inputElement) {
- return jobs;
- }
- }
-
- class JobsLabelProvider
- extends LabelProvider
- implements ITableLabelProvider {
- public String getColumnText(Object obj, int column) {
- PendingChange job = (PendingChange) obj;
- IFeature feature = job.getFeature();
-
- switch (column) {
- case 1 :
- return feature.getLabel();
- case 2 :
- return feature
- .getVersionedIdentifier()
- .getVersion()
- .toString();
- case 3 :
- return feature.getProvider();
- case 0 :
- return getJobName(job);
- }
- return "";
- }
- public Image getColumnImage(Object obj, int column) {
- if (column == 1) {
- PendingChange job = (PendingChange) obj;
- IFeature feature = job.getFeature();
- boolean patch = feature.isPatch();
- UpdateLabelProvider provider =
- UpdateUI.getDefault().getLabelProvider();
- if (patch)
- return provider.get(UpdateUIImages.DESC_EFIX_OBJ);
- else
- return provider.get(UpdateUIImages.DESC_FEATURE_OBJ);
- }
- return null;
- }
- }
-
- class ContainmentFilter extends ViewerFilter {
- public boolean select(Viewer v, Object parent, Object child) {
- return !isContained((PendingChange) child);
- }
- private boolean isContained(PendingChange job) {
- if (job.getJobType() != PendingChange.INSTALL)
- return false;
- VersionedIdentifier vid = job.getFeature().getVersionedIdentifier();
- Object[] selected = tableViewer.getCheckedElements();
- for (int i = 0; i < selected.length; i++) {
- PendingChange candidate = (PendingChange) selected[i];
- if (candidate.equals(job))
- continue;
- IFeature feature = candidate.getFeature();
- if (includes(feature, vid))
- return true;
- }
- return false;
- }
- private boolean includes(IFeature feature, VersionedIdentifier vid) {
- try {
- IFeatureReference[] irefs =
- feature.getIncludedFeatureReferences();
- for (int i = 0; i < irefs.length; i++) {
- IFeatureReference iref = irefs[i];
- IFeature ifeature = iref.getFeature(null);
- VersionedIdentifier ivid =
- ifeature.getVersionedIdentifier();
- if (ivid.equals(vid))
- return true;
- if (includes(ifeature, vid))
- return true;
- }
- } catch (CoreException e) {
- }
- return false;
- }
- }
-
- /**
- * Constructor for ReviewPage
- */
- public MultiReviewPage(PendingChange[] jobs) {
- super("MultiReview");
- setTitle(UpdateUI.getString(KEY_TITLE));
- setDescription(UpdateUI.getString(KEY_DESC));
- this.jobs = orderJobs(jobs);
- UpdateUI.getDefault().getLabelProvider().connect(this);
- }
-
- public void dispose() {
- UpdateUI.getDefault().getLabelProvider().disconnect(this);
- super.dispose();
- }
-
- /**
- * @see DialogPage#createControl(Composite)
- */
- public Control createContents(Composite parent) {
- Composite client = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginWidth = layout.marginHeight = 0;
- client.setLayout(layout);
- Label label = new Label(client, SWT.NULL);
- label.setText("&You are about to execute the following tasks:");
- GridData gd = new GridData();
- gd.horizontalSpan = 2;
- label.setLayoutData(gd);
-
- Control table = createTable(client);
- gd = new GridData(GridData.FILL_BOTH);
- table.setLayoutData(gd);
-
- Composite buttonContainer = new Composite(client, SWT.NULL);
- gd = new GridData(GridData.FILL_VERTICAL);
- buttonContainer.setLayoutData(gd);
- layout = new GridLayout();
- layout.marginWidth = 0;
- layout.marginHeight = 0;
- buttonContainer.setLayout(layout);
-
- Button button = new Button(buttonContainer, SWT.PUSH);
- button.setText("&Select All");
- gd =
- new GridData(
- GridData.HORIZONTAL_ALIGN_FILL
- | GridData.VERTICAL_ALIGN_BEGINNING);
- button.setLayoutData(gd);
- SWTUtil.setButtonDimensionHint(button);
- button.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- handleSelectAll(true);
- }
- });
-
- button = new Button(buttonContainer, SWT.PUSH);
- button.setText("&Deselect All");
- gd =
- new GridData(
- GridData.HORIZONTAL_ALIGN_FILL
- | GridData.VERTICAL_ALIGN_BEGINNING);
- button.setLayoutData(gd);
- SWTUtil.setButtonDimensionHint(button);
- button.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- handleSelectAll(false);
- }
- });
-
- statusButton = new Button(buttonContainer, SWT.PUSH);
- statusButton.setText("&Show Status...");
- gd =
- new GridData(
- GridData.HORIZONTAL_ALIGN_FILL
- | GridData.VERTICAL_ALIGN_BEGINNING);
- statusButton.setLayoutData(gd);
- SWTUtil.setButtonDimensionHint(statusButton);
- statusButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- showStatus();
- }
- });
-
- counterLabel = new Label(client, SWT.NULL);
- gd = new GridData();
- gd.horizontalSpan = 2;
- counterLabel.setLayoutData(gd);
-
- filterCheck = new Button(client, SWT.CHECK);
- filterCheck.setText(UpdateUI.getString(KEY_FILTER_CHECK));
- filterCheck.setSelection(true);
- tableViewer.addFilter(filter);
- filterCheck.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- if (filterCheck.getSelection())
- tableViewer.addFilter(filter);
- else
- tableViewer.removeFilter(filter);
- pageChanged();
- }
- });
- gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- gd.horizontalSpan = 2;
- filterCheck.setLayoutData(gd);
- pageChanged();
-
- WorkbenchHelp.setHelp(client, "org.eclipse.update.ui.MultiReviewPage");
- return client;
- }
-
- private Control createTable(Composite parent) {
- tableViewer =
- CheckboxTableViewer.newCheckList(
- parent,
- SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
- Table table = tableViewer.getTable();
- table.setHeaderVisible(true);
-
- TableColumn column = new TableColumn(table, SWT.NULL);
- column.setText(UpdateUI.getString(KEY_C_TASK));
-
- column = new TableColumn(table, SWT.NULL);
- column.setText(UpdateUI.getString(KEY_C_FEATURE));
-
- column = new TableColumn(table, SWT.NULL);
- column.setText(UpdateUI.getString(KEY_C_VERSION));
-
- column = new TableColumn(table, SWT.NULL);
- column.setText(UpdateUI.getString(KEY_C_PROVIDER));
-
- TableLayout layout = new TableLayout();
- layout.addColumnData(new ColumnWeightData(30));
- layout.addColumnData(new ColumnWeightData(80, true));
- layout.addColumnData(new ColumnWeightData(30));
- layout.addColumnData(new ColumnWeightData(100, true));
-
- table.setLayout(layout);
-
- tableViewer.setContentProvider(new JobsContentProvider());
- tableViewer.setLabelProvider(new JobsLabelProvider());
- tableViewer.addCheckStateListener(new ICheckStateListener() {
- public void checkStateChanged(CheckStateChangedEvent event) {
- pageChanged();
- }
- });
- tableViewer.setInput(UpdateUI.getDefault().getUpdateModel());
- tableViewer.setAllChecked(true);
- return table;
- }
-
- private String getJobName(PendingChange job) {
- switch (job.getJobType()) {
- case PendingChange.INSTALL :
- return "Install";
- case PendingChange.CONFIGURE :
- return "Enable";
- case PendingChange.UNCONFIGURE :
- return "Disable";
- case PendingChange.UNINSTALL :
- return "Uninstall";
- }
- return "?";
- }
-
- private void pageChanged() {
- Object[] checked = tableViewer.getCheckedElements();
- int totalCount = tableViewer.getTable().getItemCount();
- String total = "" + totalCount;
- String selected = "" + checked.length;
- counterLabel.setText(
- UpdateUI.getFormattedMessage(
- KEY_COUNTER,
- new String[] { selected, total }));
- if (checked.length > 0) {
- validateSelection();
- } else {
- setErrorMessage(null);
- setPageComplete(false);
- validationStatus = null;
- }
- statusButton.setEnabled(validationStatus != null);
- }
-
- private void handleSelectAll(boolean select) {
- tableViewer.setAllChecked(select);
- pageChanged();
- }
-
- PendingChange [] orderJobs(PendingChange [] jobs) {
- ArrayList result = new ArrayList();
- PendingChange [] input = new PendingChange [jobs.length];
- System.arraycopy(jobs, 0, input, 0, jobs.length);
- //Add jobs to unconfigure.
- addJobs(input, result, PendingChange.UNCONFIGURE, false);
- //Add jobs to configure.
- addJobs(input, result, PendingChange.CONFIGURE, false);
- //Add regular feature installs
- addJobs(input, result, PendingChange.INSTALL, false);
- //Add patch installs
- addJobs(input, result, PendingChange.INSTALL, true);
- //Add the remainder (only uninstalls)
- addJobs(input, result, -1, false);
- return (PendingChange[])result.toArray(new PendingChange[result.size()]);
- }
-
- private void addJobs(PendingChange [] input, ArrayList result, int type, boolean patch) {
- for (int i=0; i<input.length; i++) {
- PendingChange job = input[i];
- if (job==null) continue;
- boolean match=false;
- if (type == -1) match = true;
- else {
- if (type==job.getJobType()) {
- if (type==PendingChange.INSTALL) {
- if (job.getFeature().isPatch()==patch)
- match=true;
- }
- else match=true;
- }
- }
- if (match) {
- result.add(job);
- input[i] = null;
- }
- }
- }
-
- public PendingChange[] getSelectedJobs() {
- Object[] selected = tableViewer.getCheckedElements();
- PendingChange[] jobs = new PendingChange[selected.length];
- System.arraycopy(selected, 0, jobs, 0, selected.length);
- return jobs;
- }
-
- public void validateSelection() {
- PendingChange[] jobs = getSelectedJobs();
- validationStatus = ActivityConstraints.validatePendingChanges(jobs);
- setPageComplete(validationStatus == null);
- String errorMessage = null;
-
- if (validationStatus != null) {
- errorMessage =
- "Invalid combination - select \"Show Status...\" for details.";
- }
- setErrorMessage(errorMessage);
- }
-
- private void showStatus() {
- if (validationStatus != null) {
- ErrorDialog.openError(
- UpdateUI.getActiveWorkbenchShell(),
- null,
- null,
- validationStatus);
- }
- }
-
- public boolean hasSelectedJobsWithLicenses() {
- Object[] selected = tableViewer.getCheckedElements();
- for (int i = 0; i < selected.length; i++) {
- PendingChange job = (PendingChange) selected[i];
- if (job.getJobType() != PendingChange.INSTALL)
- continue;
- if (UpdateModel.hasLicense(job))
- return true;
- }
- return false;
- }
-
- public boolean hasSelectedJobsWithOptionalFeatures() {
- Object[] selected = tableViewer.getCheckedElements();
- for (int i = 0; i < selected.length; i++) {
- PendingChange job = (PendingChange) selected[i];
- if (job.getJobType() != PendingChange.INSTALL)
- continue;
- if (UpdateModel.hasOptionalFeatures(job.getFeature()))
- return true;
- }
- return false;
- }
-
- public boolean hasSelectedInstallJobs() {
- Object[] selected = tableViewer.getCheckedElements();
- for (int i = 0; i < selected.length; i++) {
- PendingChange job = (PendingChange) selected[i];
- if (job.getJobType() == PendingChange.INSTALL)
- return true;
- }
- return false;
- }
-
- public PendingChange[] getSelectedJobsWithLicenses() {
- Object[] selected = tableViewer.getCheckedElements();
- ArrayList list = new ArrayList();
- for (int i = 0; i < selected.length; i++) {
- PendingChange job = (PendingChange) selected[i];
- if (job.getJobType() != PendingChange.INSTALL)
- continue;
- if (UpdateModel.hasLicense(job))
- list.add(job);
- }
- return (PendingChange[]) list.toArray(new PendingChange[list.size()]);
- }
-
- public PendingChange[] getSelectedJobsWithOptionalFeatures() {
- Object[] selected = tableViewer.getCheckedElements();
- ArrayList list = new ArrayList();
- for (int i = 0; i < selected.length; i++) {
- PendingChange job = (PendingChange) selected[i];
- if (job.getJobType() != PendingChange.INSTALL)
- continue;
- if (UpdateModel.hasOptionalFeatures(job.getFeature()))
- list.add(job);
- }
- return (PendingChange[]) list.toArray(new PendingChange[list.size()]);
- }
-
- public PendingChange[] getSelectedInstallJobs() {
- Object[] selected = tableViewer.getCheckedElements();
- ArrayList list = new ArrayList();
- for (int i = 0; i < selected.length; i++) {
- PendingChange job = (PendingChange) selected[i];
- if (job.getJobType() == PendingChange.INSTALL)
- list.add(job);
- }
- return (PendingChange[]) list.toArray(new PendingChange[list.size()]);
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/MultiTargetPage.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/MultiTargetPage.java
deleted file mode 100644
index 650d5db..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/MultiTargetPage.java
+++ /dev/null
@@ -1,728 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.wizards;
-import java.io.File;
-import java.net.*;
-import java.net.URL;
-import java.util.*;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.update.configuration.*;
-import org.eclipse.update.core.*;
-import org.eclipse.update.internal.core.UpdateManagerUtils;
-import org.eclipse.update.internal.ui.*;
-import org.eclipse.update.internal.ui.model.PendingChange;
-import org.eclipse.update.internal.ui.parts.*;
-
-public class MultiTargetPage extends BannerPage implements IDynamicPage {
- // NL keys
- private static final String KEY_TITLE =
- "MultiInstallWizard.TargetPage.title";
- private static final String KEY_DESC = "MultiInstallWizard.TargetPage.desc";
- private static final String KEY_JOBS_LABEL =
- "MultiInstallWizard.TargetPage.jobsLabel";
- private static final String KEY_SITE_LABEL =
- "MultiInstallWizard.TargetPage.siteLabel";
- private static final String KEY_NEW = "MultiInstallWizard.TargetPage.new";
- private static final String KEY_DELETE = "MultiInstallWizard.TargetPage.delete";
- private static final String KEY_REQUIRED_FREE_SPACE =
- "MultiInstallWizard.TargetPage.requiredSpace";
- private static final String KEY_AVAILABLE_FREE_SPACE =
- "MultiInstallWizard.TargetPage.availableSpace";
- private static final String KEY_LOCATION =
- "MultiInstallWizard.TargetPage.location";
- private static final String KEY_LOCATION_MESSAGE =
- "MultiInstallWizard.TargetPage.location.message";
- private static final String KEY_LOCATION_EMPTY =
- "MultiInstallWizard.TargetPage.location.empty";
- private static final String KEY_LOCATION_EXISTS =
- "MultiInstallWizard.TargetPage.location.exists";
- private static final String KEY_LOCATION_ERROR_TITLE =
- "MultiInstallWizard.TargetPage.location.error.title";
- private static final String KEY_LOCATION_ERROR_MESSAGE =
- "MultiInstallWizard.TargetPage.location.error.message";
- private static final String KEY_ERROR_REASON =
- "MultiInstallWizard.TargetPage.location.error.reason";
- private static final String KEY_SIZE = "MultiInstallWizard.TargetPage.size";
- private static final String KEY_SIZE_UNKNOWN =
- "MultiInstallWizard.TargetPage.unknownSize";
- private TableViewer jobViewer;
- private TableViewer siteViewer;
- private IInstallConfiguration config;
- private ConfigListener configListener;
- private Label requiredSpaceLabel;
- private Label availableSpaceLabel;
- private PendingChange[] jobs;
- private Hashtable targetSites;
- private Button addButton;
- private Button deleteButton;
- private HashSet added;
-
- static class JobTargetSite {
- PendingChange job;
- IConfiguredSite affinitySite;
- IConfiguredSite defaultSite;
- IConfiguredSite targetSite;
- }
-
- class JobsContentProvider
- extends DefaultContentProvider
- implements IStructuredContentProvider {
- public Object[] getElements(Object parent) {
- return jobs;
- }
- }
-
- class TableContentProvider
- extends DefaultContentProvider
- implements IStructuredContentProvider {
-
- /**
- * @see IStructuredContentProvider#getElements(Object)
- */
- public Object[] getElements(Object parent) {
- return config.getConfiguredSites();
- }
- }
-
- class TableLabelProvider
- extends LabelProvider
- implements ITableLabelProvider {
- /**
- * @see ITableLabelProvider#getColumnImage(Object, int)
- */
- public Image getColumnImage(Object obj, int col) {
- UpdateLabelProvider provider =
- UpdateUI.getDefault().getLabelProvider();
- if (obj instanceof IConfiguredSite)
- return provider.getLocalSiteImage((IConfiguredSite) obj);
- if (obj instanceof PendingChange) {
- PendingChange job = (PendingChange) obj;
- boolean patch = job.getFeature().isPatch();
- ImageDescriptor base =
- patch
- ? UpdateUIImages.DESC_EFIX_OBJ
- : UpdateUIImages.DESC_FEATURE_OBJ;
- int flags = 0;
- JobTargetSite jobSite = (JobTargetSite) targetSites.get(job);
- if (jobSite == null || jobSite.targetSite == null)
- flags = UpdateLabelProvider.F_ERROR;
- return provider.get(base, flags);
- }
- return null;
- }
-
- /**
- * @see ITableLabelProvider#getColumnText(Object, int)
- */
- public String getColumnText(Object obj, int col) {
- if (obj instanceof PendingChange && col == 0) {
- PendingChange job = (PendingChange) obj;
- IFeature feature = job.getFeature();
- return feature.getLabel()
- + " "
- + feature.getVersionedIdentifier().getVersion().toString();
- }
- if (obj instanceof IConfiguredSite && col == 0) {
- IConfiguredSite csite = (IConfiguredSite) obj;
- ISite site = csite.getSite();
- URL url = site.getURL();
- return url.getFile();
-
- }
- return null;
- }
- }
-
- class ConfigListener implements IInstallConfigurationChangedListener {
- public void installSiteAdded(IConfiguredSite csite) {
- siteViewer.add(csite);
- if (added==null) added = new HashSet();
- added.add(csite);
- siteViewer.setSelection(new StructuredSelection(csite));
- siteViewer.getControl().setFocus();
- }
-
- public void installSiteRemoved(IConfiguredSite csite) {
- siteViewer.remove(csite);
- if (added!=null) added.remove(csite);
- PendingChange job = (PendingChange)siteViewer.getInput();
- if (job!=null) {
- JobTargetSite jobSite = (JobTargetSite) targetSites.get(job);
- IConfiguredSite defaultSite = computeTargetSite(jobSite);
- if (defaultSite!=null)
- siteViewer.setSelection(new StructuredSelection(defaultSite));
- }
- siteViewer.getControl().setFocus();
- }
- }
-
- /**
- * Constructor for ReviewPage
- */
- public MultiTargetPage(IInstallConfiguration config) {
- super("MultiTarget");
- setTitle(UpdateUI.getString(KEY_TITLE));
- setDescription(UpdateUI.getString(KEY_DESC));
- this.config = config;
- UpdateUI.getDefault().getLabelProvider().connect(this);
- configListener = new ConfigListener();
- targetSites = new Hashtable();
- }
-
- public void setJobs(PendingChange[] jobs) {
- this.jobs = jobs;
- }
-
- public static IConfiguredSite getDefaultTargetSite(
- IInstallConfiguration config,
- PendingChange pendingChange) {
- return getDefaultTargetSite(config, pendingChange, true);
- }
-
- private static IConfiguredSite getDefaultTargetSite(
- IInstallConfiguration config,
- PendingChange pendingChange,
- boolean checkAffinityFeature) {
- IFeature oldFeature = pendingChange.getOldFeature();
- IFeature newFeature = pendingChange.getFeature();
- if (oldFeature != null) {
- // We should install into the same site as
- // the old feature
- try {
- return InstallWizard.findConfigSite(oldFeature, config);
- } catch (CoreException e) {
- UpdateUI.logException(e, false);
- return null;
- }
- }
-
- // This is a new install. Check if there is
- // a disabled feature with the same ID
- String newFeatureID =
- newFeature.getVersionedIdentifier().getIdentifier();
- IConfiguredSite sameSite = findSameIdFeatureSite(config, newFeatureID);
- if (sameSite != null) {
- return sameSite;
- }
-
- if (checkAffinityFeature) {
- return getAffinitySite(config, newFeature);
- }
- return null;
- }
-
- private static IConfiguredSite getAffinitySite(
- IInstallConfiguration config,
- IFeature newFeature) {
- // check if the affinity feature is installed
- String affinityID = newFeature.getAffinityFeature();
- if (affinityID != null) {
- IConfiguredSite affinitySite =
- findSameIdFeatureSite(config, affinityID);
- if (affinitySite != null)
- return affinitySite;
- }
- return null;
- }
-
- private static IConfiguredSite findSameIdFeatureSite(
- IInstallConfiguration config,
- String featureID) {
- if (featureID == null)
- return null;
- IConfiguredSite[] sites = config.getConfiguredSites();
- for (int i = 0; i < sites.length; i++) {
- IConfiguredSite site = sites[i];
- IFeatureReference[] refs = site.getFeatureReferences();
- for (int j = 0; j < refs.length; j++) {
- IFeatureReference ref = refs[j];
- try {
- IFeature feature = ref.getFeature(null);
- if (featureID
- .equals(
- feature
- .getVersionedIdentifier()
- .getIdentifier())) {
- // found it
- return site;
- }
- } catch (CoreException e) {
- UpdateUI.logException(e, false);
- }
- }
- }
- return null;
- }
-
- public void dispose() {
- UpdateUI.getDefault().getLabelProvider().disconnect(this);
- config.removeInstallConfigurationChangedListener(configListener);
- super.dispose();
- }
-
- /**
- * @see DialogPage#createControl(Composite)
- */
- public Control createContents(Composite parent) {
- Composite client = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginWidth = layout.marginHeight = 0;
- client.setLayout(layout);
-
- Label label = new Label(client, SWT.NULL);
- label.setText(UpdateUI.getString(KEY_JOBS_LABEL));
- GridData gd = new GridData();
- gd.horizontalSpan = 2;
- label.setLayoutData(gd);
-
- createJobViewer(client);
-
- new Label(client, SWT.NULL);
-
- label = new Label(client, SWT.NULL);
- label.setText(UpdateUI.getString(KEY_SITE_LABEL));
- gd = new GridData();
- gd.horizontalSpan = 2;
- label.setLayoutData(gd);
-
- createSiteViewer(client);
-
- Composite buttonContainer = new Composite(client, SWT.NULL);
- GridLayout blayout = new GridLayout();
- blayout.marginWidth = blayout.marginHeight = 0;
- buttonContainer.setLayout(blayout);
- gd = new GridData(GridData.FILL_VERTICAL);
- buttonContainer.setLayoutData(gd);
- addButton = new Button(buttonContainer, SWT.PUSH);
- addButton.setText(UpdateUI.getString(KEY_NEW));
- addButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- addTargetLocation();
- }
- });
- addButton.setEnabled(false);
- gd = new GridData(GridData.HORIZONTAL_ALIGN_CENTER);
- addButton.setLayoutData(gd);
- SWTUtil.setButtonDimensionHint(addButton);
-
- deleteButton = new Button(buttonContainer, SWT.PUSH);
- deleteButton.setText(UpdateUI.getString(KEY_DELETE));
- deleteButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- try {
- removeSelection();
- }
- catch (CoreException ex) {
- UpdateUI.logException(ex);
- }
- }
- });
- deleteButton.setEnabled(false);
- gd = new GridData(GridData.HORIZONTAL_ALIGN_CENTER);
- deleteButton.setLayoutData(gd);
- SWTUtil.setButtonDimensionHint(deleteButton);
-
-
-
- Composite status = new Composite(client, SWT.NULL);
- gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- gd.horizontalSpan = 3;
- status.setLayoutData(gd);
- layout = new GridLayout();
- layout.numColumns = 2;
- status.setLayout(layout);
- label = new Label(status, SWT.NULL);
- label.setText(UpdateUI.getString(KEY_REQUIRED_FREE_SPACE));
- requiredSpaceLabel = new Label(status, SWT.NULL);
- requiredSpaceLabel.setLayoutData(
- new GridData(GridData.FILL_HORIZONTAL));
- label = new Label(status, SWT.NULL);
- label.setText(UpdateUI.getString(KEY_AVAILABLE_FREE_SPACE));
- availableSpaceLabel = new Label(status, SWT.NULL);
- availableSpaceLabel.setLayoutData(
- new GridData(GridData.FILL_HORIZONTAL));
-
- WorkbenchHelp.setHelp(client, "org.eclipse.update.ui.MultiTargetPage");
- return client;
- }
-
- private void createJobViewer(Composite parent) {
- jobViewer =
- new TableViewer(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
- GridData gd = new GridData(GridData.FILL_BOTH);
- Table table = jobViewer.getTable();
- table.setLayoutData(gd);
- jobViewer.setContentProvider(new JobsContentProvider());
- jobViewer.setLabelProvider(new TableLabelProvider());
-
- jobViewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- handleJobsSelected((IStructuredSelection) event.getSelection());
- }
- });
- }
-
- private void handleJobsSelected(IStructuredSelection selection) {
- PendingChange job = (PendingChange) selection.getFirstElement();
- siteViewer.setInput(job);
- JobTargetSite jobSite = (JobTargetSite) targetSites.get(job);
- addButton.setEnabled(jobSite.affinitySite == null);
- if (jobSite.targetSite != null) {
- siteViewer.setSelection(
- new StructuredSelection(jobSite.targetSite));
- }
- }
-
- private void computeDefaultTargetSites() {
- targetSites.clear();
- for (int i = 0; i < jobs.length; i++) {
- PendingChange job = jobs[i];
- JobTargetSite jobSite = new JobTargetSite();
- jobSite.job = job;
- jobSite.defaultSite = getDefaultTargetSite(config, job, false);
- jobSite.affinitySite = getAffinitySite(config, job.getFeature());
- if (jobSite.affinitySite == null)
- jobSite.affinitySite = job.getDefaultTargetSite();
- jobSite.targetSite = computeTargetSite(jobSite);
- targetSites.put(job, jobSite);
- }
- }
-
- IConfiguredSite computeTargetSite(JobTargetSite jobSite) {
- IConfiguredSite csite = jobSite.affinitySite != null
- ? jobSite.affinitySite
- : jobSite.defaultSite;
- if (csite == null)
- csite = getFirstTarget(jobSite);
- return csite;
- }
-
- private void createSiteViewer(Composite parent) {
- siteViewer =
- new TableViewer(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
- GridData gd = new GridData(GridData.FILL_BOTH);
- Table table = siteViewer.getTable();
- table.setLayoutData(gd);
- siteViewer.setContentProvider(new TableContentProvider());
- siteViewer.setLabelProvider(new TableLabelProvider());
- siteViewer.addFilter(new ViewerFilter() {
- public boolean select(Viewer v, Object parent, Object obj) {
- IConfiguredSite site = (IConfiguredSite) obj;
- PendingChange job = (PendingChange) siteViewer.getInput();
- JobTargetSite jobSite = (JobTargetSite) targetSites.get(job);
- return getSiteVisibility(site, jobSite);
- }
- });
- siteViewer
- .addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- ISelection selection = event.getSelection();
- selectTargetSite((IStructuredSelection) selection);
- updateDeleteButton((IStructuredSelection) selection);
- }
- });
-
- if (config != null)
- config.addInstallConfigurationChangedListener(configListener);
- }
-
- private void updateDeleteButton(IStructuredSelection selection) {
- boolean hasUserSites = added!=null && !added.isEmpty();
- boolean enable = !selection.isEmpty() && hasUserSites;
-
- if (hasUserSites) {
- for (Iterator iter = selection.iterator(); iter.hasNext();) {
- Object obj = iter.next();
- if (added.contains(obj) == false) {
- enable = false;
- break;
- }
- }
- }
- deleteButton.setEnabled(enable);
- }
-
- public void setVisible(boolean visible) {
- if (visible) {
- computeDefaultTargetSites();
- jobViewer.setInput(jobs);
- }
- super.setVisible(visible);
- if (visible) {
- jobViewer.getTable().setFocus();
- if (jobs.length>0)
- jobViewer.setSelection(new StructuredSelection(jobs[0]));
- }
- }
-
- private boolean getSiteVisibility(
- IConfiguredSite site,
- JobTargetSite jobSite) {
- // If affinity site is known, only it should be shown
- if (jobSite.affinitySite != null) {
- // Must compare referenced sites because
- // configured sites themselves may come from
- // different configurations
- return site.getSite().equals(jobSite.affinitySite.getSite());
- }
-
- // If this is the default target site, let it show
- if (site.equals(jobSite.defaultSite))
- return true;
- // Not the default. If update, show only private sites.
- // If install, allow product site + private sites.
- if (site.isPrivateSite() && site.isUpdatable())
- return true;
- if (jobSite.job.getOldFeature() == null && site.isProductSite())
- return true;
- return false;
- }
-
- private void verifyNotEmpty(boolean empty) {
- String errorMessage = null;
- if (empty)
- errorMessage = UpdateUI.getString(KEY_LOCATION_EMPTY);
- setErrorMessage(errorMessage);
- setPageComplete(!empty);
- }
-
- private IConfiguredSite getFirstTarget(JobTargetSite jobSite) {
- IConfiguredSite firstSite = jobSite.targetSite;
- if (firstSite == null) {
- IConfiguredSite[] sites = config.getConfiguredSites();
- for (int i = 0; i < sites.length; i++) {
- IConfiguredSite csite = sites[i];
- if (getSiteVisibility(csite, jobSite)) {
- firstSite = csite;
- break;
- }
- }
- }
- return firstSite;
- }
-
- private void selectTargetSite(IStructuredSelection selection) {
- IConfiguredSite site = (IConfiguredSite) selection.getFirstElement();
- PendingChange job = (PendingChange) siteViewer.getInput();
- if (job != null) {
- JobTargetSite jobSite = (JobTargetSite) targetSites.get(job);
- jobSite.targetSite = site;
- pageChanged();
- }
- updateStatus(site);
- }
-
- private void addTargetLocation() {
- DirectoryDialog dd = new DirectoryDialog(getContainer().getShell());
- dd.setMessage(UpdateUI.getString(KEY_LOCATION_MESSAGE));
- String path = dd.open();
- if (path != null) {
- File file = new File(path);
- addConfiguredSite(getContainer().getShell(), config, file, false);
- }
- }
-
- private void removeSelection() throws CoreException {
- IStructuredSelection selection =
- (IStructuredSelection) siteViewer.getSelection();
- for (Iterator iter = selection.iterator(); iter.hasNext();) {
- Object obj = iter.next();
- IConfiguredSite csite = (IConfiguredSite)obj;
- config.removeConfiguredSite(csite);
- }
- }
-
- public static IConfiguredSite addConfiguredSite(
- Shell shell,
- IInstallConfiguration config,
- File file,
- boolean linked) {
- try {
- IConfiguredSite csite = null;
- if (linked) {
- csite = config.createLinkedConfiguredSite(file);
- config.addConfiguredSite(csite);
- } else {
- if (!ensureUnique(file, config)) {
- String title = UpdateUI.getString(KEY_LOCATION_ERROR_TITLE);
- String message = UpdateUI.getFormattedMessage(
- KEY_LOCATION_EXISTS,
- file.getPath());
- MessageDialog.openError(shell, title, message);
- return null;
- }
- csite = config.createConfiguredSite(file);
- IStatus status = csite.verifyUpdatableStatus();
- if (status.isOK())
- config.addConfiguredSite(csite);
- else {
- String title =
- UpdateUI.getString(KEY_LOCATION_ERROR_TITLE);
- String message =
- UpdateUI.getFormattedMessage(
- KEY_LOCATION_ERROR_MESSAGE,
- file.getPath());
- String message2 =
- UpdateUI.getFormattedMessage(
- KEY_ERROR_REASON,
- status.getMessage());
- message = message + "\r\n" + message2;
- ErrorDialog.openError(shell, title, message, status);
- return null;
- }
- }
- return csite;
- } catch (CoreException e) {
- UpdateUI.logException(e);
- return null;
- }
- }
-
- private void updateStatus(Object element) {
- if (element == null) {
- requiredSpaceLabel.setText("");
- availableSpaceLabel.setText("");
- return;
- }
- IConfiguredSite site = (IConfiguredSite) element;
- URL url = site.getSite().getURL();
- String fileName = url.getFile();
- File file = new File(fileName);
- long available = LocalSystemInfo.getFreeSpace(file);
- long required = computeRequiredSizeFor(site);
- if (required == -1)
- requiredSpaceLabel.setText(
- UpdateUI.getString(KEY_SIZE_UNKNOWN));
- else
- requiredSpaceLabel.setText(
- UpdateUI.getFormattedMessage(KEY_SIZE, "" + required));
-
- if (available == LocalSystemInfo.SIZE_UNKNOWN)
- availableSpaceLabel.setText(
- UpdateUI.getString(KEY_SIZE_UNKNOWN));
- else
- availableSpaceLabel.setText(
- UpdateUI.getFormattedMessage(KEY_SIZE, "" + available));
- }
-
- private long computeRequiredSizeFor(IConfiguredSite site) {
- long totalSize = 0;
- for (int i = 0; i < jobs.length; i++) {
- PendingChange job = jobs[i];
- JobTargetSite jobSite = (JobTargetSite) targetSites.get(job);
- if (site.equals(jobSite.targetSite)) {
- long jobSize =
- site.getSite().getInstallSizeFor(job.getFeature());
- if (jobSize == -1)
- return -1;
- totalSize += jobSize;
- }
- }
- return totalSize;
- }
-
- private void pageChanged() {
- boolean empty = false;
- for (Enumeration enum = targetSites.elements();
- enum.hasMoreElements();
- ) {
- JobTargetSite jobSite = (JobTargetSite) enum.nextElement();
- if (jobSite.targetSite == null) {
- empty = true;
- break;
- }
- IFeature feature = jobSite.job.getFeature();
- if (feature.isPatch()) {
- // Patches must go together with the features
- // they are patching.
- JobTargetSite patchedSite = findPatchedFeature(feature);
- if (patchedSite != null
- && jobSite.targetSite != null
- && patchedSite.targetSite != null
- && jobSite.targetSite.equals(patchedSite.targetSite)
- == false) {
- setErrorMessage(
- "Patch '"
- + feature.getLabel()
- + "' must be installed in the same site as '"
- + patchedSite.job.getFeature().getLabel()
- + "'");
- setPageComplete(false);
- return;
- }
- }
- }
- verifyNotEmpty(empty);
- }
-
- private JobTargetSite findPatchedFeature(IFeature patch) {
-
- for (Enumeration enum = targetSites.elements();
- enum.hasMoreElements();
- ) {
- JobTargetSite jobSite = (JobTargetSite) enum.nextElement();
- IFeature target = jobSite.job.getFeature();
- if (target.equals(patch))
- continue;
- if (UpdateUI.isPatch(target, patch))
- return jobSite;
-
- }
- return null;
- }
-
- public JobTargetSite[] getTargetSites() {
- JobTargetSite[] sites = new JobTargetSite[jobs.length];
- for (int i = 0; i < jobs.length; i++) {
- PendingChange job = jobs[i];
- JobTargetSite jobSite = (JobTargetSite) targetSites.get(job);
- sites[i] = jobSite;
- }
- return sites;
- }
-
- public IConfiguredSite getTargetSite(PendingChange job) {
- JobTargetSite jobSite = (JobTargetSite) targetSites.get(job);
- if (jobSite != null)
- return jobSite.targetSite;
- return null;
- }
-
- private static boolean ensureUnique(File file, IInstallConfiguration config) {
- IConfiguredSite [] sites = config.getConfiguredSites();
- URL fileURL;
- try {
- fileURL = new URL("file:"+file.getPath());
- }
- catch (MalformedURLException e) {
- return true;
- }
- for (int i=0; i<sites.length; i++) {
- IConfiguredSite csite = sites[i];
- URL url = csite.getSite().getURL();
- if (UpdateManagerUtils.sameURL(fileURL, url))
- return false;
- }
- return true;
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/NewFolderWizardPage.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/NewFolderWizardPage.java
deleted file mode 100644
index c238538..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/NewFolderWizardPage.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.wizards;
-
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.update.internal.ui.UpdateUI;
-import org.eclipse.update.internal.ui.model.*;
-
-/**
- * @author dejan
- *
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates.
- */
-public class NewFolderWizardPage extends BaseNewWizardPage {
- private static final String KEY_TITLE = "NewFolderWizardPage.title";
- private static final String KEY_DESC = "NewFolderWizardPage.desc";
-
- /**
- * Constructor for NewFolderWizardPage.
- * @param folder
- */
- public NewFolderWizardPage(BookmarkFolder folder) {
- super(folder);
- setTitle(UpdateUI.getString(KEY_TITLE));
- setDescription(UpdateUI.getString(KEY_DESC));
- }
-
- /**
- * @see BaseNewWizardPage#createClientControl(Composite, int)
- */
- protected void createClientControl(Composite parent, int span) {
- WorkbenchHelp.setHelp(parent, "org.eclipse.update.ui.NewFolderWizardPage");
- }
-
- public boolean finish() {
- BookmarkFolder newFolder = new BookmarkFolder(getName());
- addToModel(newFolder);
- return true;
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/NewSearchWizardPage.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/NewSearchWizardPage.java
deleted file mode 100644
index aba16a9..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/NewSearchWizardPage.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.wizards;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.update.internal.ui.UpdateUI;
-import org.eclipse.update.internal.ui.model.*;
-import org.eclipse.update.internal.ui.search.*;
-
-/**
- * @author dejan
- *
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates.
- */
-public class NewSearchWizardPage extends BaseNewWizardPage {
- private static final String KEY_TITLE = "NewSearchWizardPage.title";
- private static final String KEY_DESC = "NewSearchWizardPage.desc";
- private static final String KEY_CATEGORY = "NewSearchWizardPage.category";
- private Combo categoryCombo;
- private SearchCategoryDescriptor[] descriptors;
- private SearchCategoryDescriptor descriptor;
- /**
- * Constructor for NewFolderWizardPage.
- * @param folder
- */
- public NewSearchWizardPage(BookmarkFolder folder) {
- super(folder);
- setTitle(UpdateUI.getString(KEY_TITLE));
- setDescription(UpdateUI.getString(KEY_DESC));
- }
-
- /**
- * @see BaseNewWizardPage#createClientControl(Composite, int)
- */
- protected void createClientControl(Composite parent, int span) {
- Label label = new Label(parent, SWT.NULL);
- label.setText(UpdateUI.getString(KEY_CATEGORY));
- categoryCombo = new Combo(parent, SWT.READ_ONLY);
- descriptors =
- SearchCategoryRegistryReader.getDefault().getCategoryDescriptors();
- for (int i = 0; i < descriptors.length; i++) {
- categoryCombo.add(descriptors[i].getName());
- }
- categoryCombo.select(0);
- descriptor = descriptors[0];
- categoryCombo.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- descriptor = descriptors[categoryCombo.getSelectionIndex()];
- validatePage();
- }
- });
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- categoryCombo.setLayoutData(gd);
- WorkbenchHelp.setHelp(parent, "org.eclipse.update.ui.NewSearchWizardPage");
- }
-
- protected void validatePage() {
- super.validatePage();
- if (isPageComplete())
- setPageComplete(descriptor != null);
- }
-
- public boolean finish() {
- //UpdateModel model = UpdateUI.getDefault().getUpdateModel();
- SearchObject search = new SearchObject(getName(), descriptor);
- addToModel(search);
- return true;
- }
-}
\ No newline at end of file
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/NewSiteBookmarkWizardPage.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/NewSiteBookmarkWizardPage.java
deleted file mode 100644
index 829763d..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/NewSiteBookmarkWizardPage.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.wizards;
-
-import java.net.*;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.update.internal.ui.UpdateUI;
-import org.eclipse.update.internal.ui.model.*;
-
-/**
- * @author dejan
- *
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates.
- */
-public class NewSiteBookmarkWizardPage extends BaseNewWizardPage {
- private static final String KEY_TITLE = "NewSiteBookmarkWizardPage.title";
- private static final String KEY_DESC = "NewSiteBookmarkWizardPage.desc";
- private static final String KEY_URL = "NewSiteBookmarkWizardPage.url";
- private static final String KEY_HTTP = "NewSiteBookmarkWizardPage.http";
- private static final String KEY_INVALID =
- "NewSiteBookmarkWizardPage.invalid";
- private static final String KEY_TYPE = "NewSiteBookmarkWizardPage.type";
- private static final String KEY_UPDATE_TYPE =
- "NewSiteBookmarkWizardPage.updateType";
- private static final String KEY_WEB_TYPE =
- "NewSiteBookmarkWizardPage.webType";
- private Text urlText;
- private URL url;
- private SiteBookmark localBookmark;
- private Button updateButton;
- private Button webButton;
-
- /**
- * Constructor for NewFolderWizardPage.
- * @param folder
- */
- public NewSiteBookmarkWizardPage(BookmarkFolder folder) {
- super(folder);
- setTitle(UpdateUI.getString(KEY_TITLE));
- setDescription(UpdateUI.getString(KEY_DESC));
- }
-
- public NewSiteBookmarkWizardPage(
- BookmarkFolder folder,
- SiteBookmark localBookmark) {
- this(folder);
- this.localBookmark = localBookmark;
- }
-
- /**
- * @see BaseNewWizardPage#createClientControl(Composite, int)
- */
- protected void createClientControl(Composite parent, int span) {
- Label label = new Label(parent, SWT.NULL);
- label.setText(UpdateUI.getString(KEY_URL));
- urlText = new Text(parent, SWT.SINGLE | SWT.BORDER);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- urlText.setLayoutData(gd);
- if (localBookmark != null) {
- url = localBookmark.getURL();
- urlText.setText(url.toString());
- urlText.setEnabled(false);
- } else
- urlText.setText(UpdateUI.getString(KEY_HTTP));
- urlText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- validatePage();
- }
- });
- if (localBookmark == null) {
- label = new Label(parent, SWT.NULL);
- label.setText(UpdateUI.getString(KEY_TYPE));
- gd = new GridData();
- gd.horizontalSpan = span;
- label.setLayoutData(gd);
- updateButton = new Button(parent, SWT.RADIO);
- updateButton.setText(
- UpdateUI.getString(KEY_UPDATE_TYPE));
- gd = new GridData();
- gd.horizontalSpan = span;
- gd.horizontalIndent = 10;
- updateButton.setLayoutData(gd);
- updateButton.setSelection(true);
-
- webButton = new Button(parent, SWT.RADIO);
- webButton.setText(UpdateUI.getString(KEY_WEB_TYPE));
- gd = new GridData();
- gd.horizontalSpan = span;
- gd.horizontalIndent = 10;
- webButton.setLayoutData(gd);
- }
-
- WorkbenchHelp.setHelp(
- parent,
- "org.eclipse.update.ui.NewSiteBookmarkWizardPage");
- }
-
- protected void validatePage() {
- super.validatePage();
- if (isPageComplete() && localBookmark == null) {
- try {
- String decodedText = URLDecoder.decode(urlText.getText().trim());
- url = new URL(decodedText);
- super.validatePage();
- } catch (MalformedURLException e) {
- handleInvalidURL();
- } catch (ArrayIndexOutOfBoundsException e) {
- //33159
- handleInvalidURL();
- } catch (IllegalArgumentException e) {
- // 33159
- handleInvalidURL();
- }
- }
- }
- private void handleInvalidURL() {
- setDelayedErrorMessage(UpdateUI.getString(KEY_INVALID));
- setPageComplete(false);
- }
-
- public boolean finish() {
- //UpdateModel model = UpdateUI.getDefault().getUpdateModel();
- //BookmarkFolder parentFolder = getFolder();
- boolean webBookmark = false;
- if (localBookmark == null)
- webBookmark = webButton.getSelection();
- SiteBookmark newBookmark =
- new SiteBookmark(getName(), url, webBookmark);
- addToModel(newBookmark);
- return true;
- }
-}
\ No newline at end of file
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/NewUpdatesWizard.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/NewUpdatesWizard.java
deleted file mode 100644
index 684e1d6..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/NewUpdatesWizard.java
+++ /dev/null
@@ -1,308 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.wizards;
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.HashSet;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.update.configuration.IConfiguredSite;
-import org.eclipse.update.configuration.IInstallConfiguration;
-import org.eclipse.update.core.*;
-import org.eclipse.update.core.model.InstallAbortedException;
-import org.eclipse.update.internal.ui.*;
-import org.eclipse.update.internal.ui.UpdateUI;
-import org.eclipse.update.internal.ui.UpdateUIImages;
-import org.eclipse.update.internal.ui.forms.ActivityConstraints;
-import org.eclipse.update.internal.ui.model.*;
-import org.eclipse.update.internal.ui.search.SearchObject;
-import org.eclipse.update.internal.ui.search.SearchResultSite;
-import org.eclipse.update.internal.ui.security.JarVerificationService;
-
-public class NewUpdatesWizard extends Wizard {
- private static final String KEY_INSTALLING = "NewUpdatesWizard.installing";
- private IInstallConfiguration config;
- private NewUpdatesWizardPage mainPage;
- private LicensePage licensePage;
- private PendingChange[] jobs;
- private int installCount = 0;
-
- public NewUpdatesWizard(SearchObject searchObject) {
- setDialogSettings(UpdateUI.getDefault().getDialogSettings());
- setDefaultPageImageDescriptor(UpdateUIImages.DESC_UPDATE_WIZ);
- setForcePreviousAndNextButtons(true);
- setNeedsProgressMonitor(true);
- createPendingChanges(searchObject);
- }
-
- public boolean isSuccessfulInstall() {
- return installCount > 0;
- }
-
- private void createPendingChanges(SearchObject searchObject) {
- ArrayList result = new ArrayList();
- Object[] sites = searchObject.getChildren(null);
- for (int i = 0; i < sites.length; i++) {
- SearchResultSite site = (SearchResultSite) sites[i];
- createPendingChanges(site, result);
- }
- jobs =
- (PendingChange[]) result.toArray(new PendingChange[result.size()]);
- }
-
- private void createPendingChanges(
- SearchResultSite site,
- ArrayList result) {
- Object[] candidates = site.getChildren(null);
- for (int i = 0; i < candidates.length; i++) {
- SimpleFeatureAdapter adapter = (SimpleFeatureAdapter) candidates[i];
- try {
- IFeature feature = adapter.getFeature(null);
- IFeature[] installed =
- UpdateUI.getInstalledFeatures(feature);
- PendingChange change = new PendingChange(installed.length>0?installed[0]:null, feature);
- result.add(change);
- } catch (CoreException e) {
- UpdateUI.logException(e);
- }
- }
- }
-
- private IFeature[] getFeaturesWithLicenses() {
- ArrayList result = new ArrayList();
- for (int i = 0; i < jobs.length; i++) {
- PendingChange job = jobs[i];
- IFeature feature = job.getFeature();
- IURLEntry info = feature.getLicense();
- if (info == null)
- continue;
- if (info.getAnnotation() != null
- && info.getAnnotation().length() > 0)
- result.add(feature);
- }
- return (IFeature[]) result.toArray(new IFeature[result.size()]);
- }
-
- /**
- * @see Wizard#performFinish()
- */
- public boolean performFinish() {
- final PendingChange[] selectedJobs = mainPage.getSelectedJobs();
-
- // make sure we can actually apply the entire batch of updates
- IStatus status = ActivityConstraints.validatePendingOneClickUpdate(selectedJobs);
- if (status != null) {
- ErrorDialog.openError(
- UpdateUI.getActiveWorkbenchShell(),
- null,
- null,
- status);
- return false;
- }
-
- // Check for duplication conflicts
- ArrayList conflicts = DuplicateConflictsDialog.computeDuplicateConflicts(selectedJobs, config);
- if (conflicts!=null) {
- DuplicateConflictsDialog dialog = new DuplicateConflictsDialog(getShell(), conflicts);
- if (dialog.open()!=0) return false;
- }
-
- // ok to continue
- IRunnableWithProgress operation = new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor)
- throws InvocationTargetException {
- try {
- installCount = 0;
- InstallWizard.makeConfigurationCurrent(config, null);
- execute(selectedJobs, monitor);
- } catch (InstallAbortedException e) {
- throw new InvocationTargetException(e);
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- }
- }
- };
- try {
- getContainer().run(true, true, operation);
- } catch (InvocationTargetException e) {
- Throwable targetException = e.getTargetException();
- if (targetException instanceof InstallAbortedException) {
- return true;
- } else {
- UpdateUI.logException(e);
- }
- return false;
- } catch (InterruptedException e) {
- return false;
- }
- return true;
- }
-
- public void addPages() {
- config = InstallWizard.createInstallConfiguration();
- if (config != null) {
- mainPage = new NewUpdatesWizardPage(jobs, config);
- addPage(mainPage);
- licensePage = new LicensePage(true);
- addPage(licensePage);
- }
- }
-
- public IWizardPage getNextPage(IWizardPage page) {
- if (page instanceof LicensePage)
- return null;
- PendingChange[] licenseJobs = mainPage.getSelectedJobsWithLicenses();
- if (licenseJobs.length == 0)
- return null;
- licensePage.setJobs(licenseJobs);
- return licensePage;
- }
- public IWizardPage getPreviousPage(IWizardPage page) {
- if (page instanceof LicensePage)
- return mainPage;
- return null;
- }
-
- public boolean canFinish() {
- IWizardPage page = getContainer().getCurrentPage();
- return page.getNextPage() == null && super.canFinish();
- }
-
- /*
- * When we are uninstalling, there is not targetSite
- */
- private void execute(
- PendingChange[] selectedJobs,
- IProgressMonitor monitor)
- throws InstallAbortedException, CoreException {
- monitor.beginTask(
- UpdateUI.getString(KEY_INSTALLING),
- jobs.length);
- for (int i = 0; i < selectedJobs.length; i++) {
- PendingChange job = selectedJobs[i];
- SubProgressMonitor subMonitor =
- new SubProgressMonitor(
- monitor,
- 1,
- SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK);
- executeOneJob(job, subMonitor);
- monitor.worked(1);
- InstallWizard.saveLocalSite();
- installCount++;
- }
- }
-
- private void executeOneJob(PendingChange job, SubProgressMonitor monitor)
- throws InstallAbortedException, CoreException {
- IFeature feature = job.getFeature();
- IFeature oldFeature = job.getOldFeature();
- boolean reinstall=false;
- IFeatureReference [] optionalFeatures=null;
- if (oldFeature!=null && feature.getVersionedIdentifier().equals(oldFeature.getVersionedIdentifier())) {
- reinstall=true;
- }
- ArrayList optionalElements = new ArrayList();
- boolean patch = UpdateUI.isPatch(feature);
- boolean hasOptionalFeatures = FeatureHierarchyElement.computeElements(
- oldFeature,
- feature,
- oldFeature != null,
- patch,
- config,
- optionalElements);
- if (hasOptionalFeatures)
- optionalFeatures = computeOptionalFeatures(optionalElements, oldFeature!=null);
- IConfiguredSite targetSite =
- TargetPage.getDefaultTargetSite(config, job);
- if (optionalFeatures!=null)
- targetSite.install(feature, optionalFeatures, getVerificationListener(), monitor);
- else
- targetSite.install(feature, getVerificationListener(), monitor);
- if (!reinstall) {
- if (optionalFeatures!=null) {
- InstallWizard.preserveOptionalState(config, targetSite, false, optionalElements.toArray());
- }
- if (oldFeature!=null) unconfigure(oldFeature);
- else {
- MultiInstallWizard.ensureUnique(config, feature, targetSite);
- }
- }
- UpdateModel model = UpdateUI.getDefault().getUpdateModel();
- model.addPendingChange(job);
- }
-
- private IFeatureReference[] computeOptionalFeatures(ArrayList elements, boolean update) {
- HashSet set = new HashSet();
- for (int i = 0; i < elements.size(); i++) {
- FeatureHierarchyElement element =
- (FeatureHierarchyElement) elements.get(i);
- element.addCheckedOptionalFeatures(
- update,
- false,
- config,
- set);
- }
- return (IFeatureReference[]) set.toArray(
- new IFeatureReference[set.size()]);
- }
-
- private void throwError(String message) throws CoreException {
- IStatus status =
- new Status(
- IStatus.ERROR,
- UpdateUI.getPluginId(),
- IStatus.OK,
- message,
- null);
- throw new CoreException(status);
- }
-
- static IConfiguredSite findConfigSite(
- IFeature feature,
- IInstallConfiguration config)
- throws CoreException {
- IConfiguredSite[] configSites = config.getConfiguredSites();
- for (int i = 0; i < configSites.length; i++) {
- IConfiguredSite site = configSites[i];
- if (site.getSite().equals(feature.getSite())) {
- return site;
- }
- }
- return null;
- }
-
- private boolean unconfigure(IFeature feature) throws CoreException {
- IConfiguredSite site = findConfigSite(feature, config);
- if (site != null) {
- PatchCleaner cleaner = new PatchCleaner(site, feature);
- boolean result = site.unconfigure(feature);
- cleaner.dispose();
- return result;
- }
- return false;
- }
- private void configure(IFeature feature) throws CoreException {
- IConfiguredSite site = findConfigSite(feature, config);
- if (site != null) {
- site.configure(feature);
- }
- }
-
- private IVerificationListener getVerificationListener() {
- return new JarVerificationService(this.getShell());
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/NewUpdatesWizardPage.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/NewUpdatesWizardPage.java
deleted file mode 100644
index 423a52a..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/NewUpdatesWizardPage.java
+++ /dev/null
@@ -1,449 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.wizards;
-import java.net.URL;
-import java.util.ArrayList;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.update.configuration.IInstallConfiguration;
-import org.eclipse.update.core.*;
-import org.eclipse.update.internal.ui.*;
-import org.eclipse.update.internal.ui.model.*;
-import org.eclipse.update.internal.ui.parts.*;
-import org.eclipse.update.internal.ui.views.DetailsView;
-import org.eclipse.update.internal.ui.views.FeatureSorter;
-
-public class NewUpdatesWizardPage extends BannerPage {
- // NL keys
- private static final String KEY_TITLE = "NewUpdatesWizard.MainPage.title";
- private static final String KEY_DESC = "NewUpdatesWizard.MainPage.desc";
- private static final String KEY_TABLE_LABEL =
- "NewUpdatesWizard.MainPage.tableLabel";
- private static final String KEY_SELECT_ALL =
- "NewUpdatesWizard.MainPage.selectAll";
- private static final String KEY_DESELECT_ALL =
- "NewUpdatesWizard.MainPage.deselectAll";
- private static final String KEY_MORE_INFO =
- "NewUpdatesWizard.MainPage.moreInfo";
- private static final String KEY_FEATURE_DESC =
- "NewUpdatesWizard.MainPage.featureDesc";
- private static final String KEY_COUNTER =
- "NewUpdatesWizard.MainPage.counter";
- private static final String KEY_C_FEATURE =
- "NewUpdatesWizard.MainPage.column.feature";
- private static final String KEY_C_PROVIDER =
- "NewUpdatesWizard.MainPage.column.provider";
- private static final String KEY_C_VERSION =
- "NewUpdatesWizard.MainPage.column.version";
- private static final String KEY_C_SIZE =
- "NewUpdatesWizard.MainPage.column.size";
- private static final String KEY_UNKNOWN_SIZE =
- "NewUpdatesWizard.MainPage.column.sizeUnknown";
- private static final String KEY_FILTER_CHECK =
- "NewUpdatesWizard.MainPage.filterCheck";
- private static final String KEY_DUPLICATE_WARNING =
- "NewUpdatesWizard.MainPage.duplicateWarning";
- private CheckboxTableViewer tableViewer;
- private IInstallConfiguration config;
- private PendingChange[] pendingChanges;
- private Label counterLabel;
- private Button filterCheck;
- private Button moreInfoButton;
- private Text descriptionArea;
- private ContainmentFilter filter = new ContainmentFilter();
-
- class TableContentProvider
- extends DefaultContentProvider
- implements IStructuredContentProvider {
-
- /**
- * @see IStructuredContentProvider#getElements(Object)
- */
- public Object[] getElements(Object parent) {
- return pendingChanges;
- }
- }
-
- class TableLabelProvider
- extends LabelProvider
- implements ITableLabelProvider {
- /**
- * @see ITableLabelProvider#getColumnImage(Object, int)
- */
- public Image getColumnImage(Object obj, int col) {
- if (col == 0) {
- try {
- IFeature feature = ((IFeatureAdapter) obj).getFeature(null);
- boolean patch = feature.isPatch();
- return UpdateUI.getDefault().getLabelProvider().get(
- patch
- ? UpdateUIImages.DESC_EFIX_OBJ
- : UpdateUIImages.DESC_FEATURE_OBJ);
- } catch (CoreException e) {
- return UpdateUI.getDefault().getLabelProvider().get(
- UpdateUIImages.DESC_FEATURE_OBJ,
- UpdateLabelProvider.F_ERROR);
- }
- } else
- return null;
- }
-
- /**
- * @see ITableLabelProvider#getColumnText(Object, int)
- */
- public String getColumnText(Object obj, int col) {
- if (obj instanceof IFeatureAdapter) {
-
- try {
- IFeature feature = ((IFeatureAdapter) obj).getFeature(null);
-
- switch (col) {
- case 0 :
- return feature.getLabel();
- case 1 :
- return feature
- .getVersionedIdentifier()
- .getVersion()
- .toString();
- case 2 :
- return feature.getProvider();
- case 3 :
- long size = feature.getDownloadSize();
- if (size == -1)
- return UpdateUI.getString(KEY_UNKNOWN_SIZE);
- else
- return feature.getDownloadSize() + "KB";
- }
- } catch (CoreException e) {
- UpdateUI.logException(e);
- return "??";
- }
- }
- return "";
- }
- }
-
- class ContainmentFilter extends ViewerFilter {
- public boolean select(Viewer v, Object parent, Object child) {
- return !isContained((PendingChange) child);
- }
- private boolean isContained(PendingChange job) {
- VersionedIdentifier vid = job.getFeature().getVersionedIdentifier();
- //Object[] selected = tableViewer.getCheckedElements();
- Object [] selected = pendingChanges;
- for (int i = 0; i < selected.length; i++) {
- PendingChange candidate = (PendingChange) selected[i];
- if (candidate.equals(job))
- continue;
- IFeature feature = candidate.getFeature();
- if (includes(feature, vid))
- return true;
- }
- return false;
- }
- private boolean includes(IFeature feature, VersionedIdentifier vid) {
- try {
- IFeatureReference[] irefs =
- feature.getIncludedFeatureReferences();
- for (int i = 0; i < irefs.length; i++) {
- IFeatureReference iref = irefs[i];
- IFeature ifeature = iref.getFeature(null);
- VersionedIdentifier ivid =
- ifeature.getVersionedIdentifier();
- if (ivid.equals(vid))
- return true;
- if (includes(ifeature, vid))
- return true;
- }
- } catch (CoreException e) {
- }
- return false;
- }
- }
-
- /**
- * Constructor for ReviewPage
- */
- public NewUpdatesWizardPage(
- PendingChange[] changes,
- IInstallConfiguration config) {
- super("Target");
- setTitle(UpdateUI.getString(KEY_TITLE));
- setDescription(UpdateUI.getString(KEY_DESC));
- this.config = config;
- this.pendingChanges = changes;
- UpdateUI.getDefault().getLabelProvider().connect(this);
- setBannerVisible(false);
- }
-
- public void dispose() {
- UpdateUI.getDefault().getLabelProvider().disconnect(this);
- super.dispose();
- }
-
- /**
- * @see DialogPage#createControl(Composite)
- */
- public Control createContents(Composite parent) {
- Composite client = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginWidth = layout.marginHeight = 0;
- client.setLayout(layout);
- createTableViewer(client);
- Composite buttonContainer = new Composite(client, SWT.NULL);
- GridLayout blayout = new GridLayout();
- blayout.marginWidth = blayout.marginHeight = 0;
- buttonContainer.setLayout(blayout);
- GridData gd = new GridData(GridData.FILL_VERTICAL);
- buttonContainer.setLayoutData(gd);
-
- Button button = new Button(buttonContainer, SWT.PUSH);
- button.setText(UpdateUI.getString(KEY_SELECT_ALL));
- button.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- selectAll(true);
- }
- });
- gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- button.setLayoutData(gd);
- SWTUtil.setButtonDimensionHint(button);
-
- button = new Button(buttonContainer, SWT.PUSH);
- button.setText(UpdateUI.getString(KEY_DESELECT_ALL));
- button.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- selectAll(false);
- }
- });
- gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- button.setLayoutData(gd);
- SWTUtil.setButtonDimensionHint(button);
-
- moreInfoButton = new Button(buttonContainer, SWT.PUSH);
- moreInfoButton.setText(UpdateUI.getString(KEY_MORE_INFO));
- moreInfoButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- doMoreInfo();
- }
- });
- gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- moreInfoButton.setLayoutData(gd);
- SWTUtil.setButtonDimensionHint(moreInfoButton);
-
- tableViewer.setInput(UpdateUI.getDefault().getUpdateModel());
- //tableViewer.setCheckedElements(pendingChanges);
- selectTrueUpdates();
-
- Label label = new Label(client, SWT.NULL);
- label.setText(UpdateUI.getString(KEY_FEATURE_DESC));
- gd = new GridData();
- gd.horizontalSpan = 2;
- label.setLayoutData(gd);
-
- descriptionArea =
- new Text(client, SWT.V_SCROLL | SWT.BORDER | SWT.MULTI | SWT.WRAP | SWT.READ_ONLY);
- gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- gd.heightHint = 64;
- descriptionArea.setLayoutData(gd);
-
- new Label(client, SWT.NULL);
-
- counterLabel = new Label(client, SWT.NULL);
- gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- gd.horizontalSpan = 2;
- counterLabel.setLayoutData(gd);
- filterCheck = new Button(client, SWT.CHECK);
- filterCheck.setText(UpdateUI.getString(KEY_FILTER_CHECK));
- filterCheck.setSelection(true);
- tableViewer.addFilter(filter);
- filterCheck.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- if (filterCheck.getSelection())
- tableViewer.addFilter(filter);
- else
- tableViewer.removeFilter(filter);
- pageChanged();
- }
- });
- gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- gd.horizontalSpan = 2;
- filterCheck.setLayoutData(gd);
-
- pageChanged();
- WorkbenchHelp.setHelp(
- client,
- "org.eclipse.update.ui.NewUpdatesWizardPage");
- return client;
- }
-
- private void selectTrueUpdates() {
- ArrayList trueUpdates = new ArrayList();
- for (int i=0; i<pendingChanges.length; i++) {
- PendingChange job = pendingChanges[i];
- if (!UpdateUI.isPatch(job.getFeature()))
- trueUpdates.add(job);
- }
- tableViewer.setCheckedElements(trueUpdates.toArray());
- }
-
- private void selectAll(boolean state) {
- tableViewer.setAllChecked(state);
- pageChanged();
- }
-
- private void pageChanged() {
- Object[] checked = tableViewer.getCheckedElements();
- int totalCount = tableViewer.getTable().getItemCount();
- setPageComplete(checked.length > 0);
- String total = "" + totalCount;
- String selected = "" + checked.length;
- counterLabel.setText(
- UpdateUI.getFormattedMessage(
- KEY_COUNTER,
- new String[] { selected, total }));
- boolean duplicates = false;
- for (int i = 0; i < checked.length; i++) {
- PendingChange job = (PendingChange) checked[i];
- if (filter.isContained(job)) {
- duplicates = true;
- break;
- }
- }
- if (!duplicates)
- setMessage(null);
- else
- setMessage(UpdateUI.getString(KEY_DUPLICATE_WARNING), WARNING);
- }
-
- private void createTableViewer(Composite parent) {
- Label label = new Label(parent, SWT.NULL);
- label.setText(UpdateUI.getString(KEY_TABLE_LABEL));
- GridData gd = new GridData();
- gd.horizontalSpan = 2;
- label.setLayoutData(gd);
-
- tableViewer =
- CheckboxTableViewer.newCheckList(
- parent,
- SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER | SWT.FULL_SELECTION);
- gd = new GridData(GridData.FILL_BOTH);
- Table table = tableViewer.getTable();
- table.setHeaderVisible(true);
-
- TableColumn column = new TableColumn(table, SWT.NULL);
- column.setText(UpdateUI.getString(KEY_C_FEATURE));
-
- column = new TableColumn(table, SWT.NULL);
- column.setText(UpdateUI.getString(KEY_C_VERSION));
-
- column = new TableColumn(table, SWT.NULL);
- column.setText(UpdateUI.getString(KEY_C_PROVIDER));
-
- column = new TableColumn(table, SWT.NULL);
- column.setText(UpdateUI.getString(KEY_C_SIZE));
-
- TableLayout layout = new TableLayout();
- layout.addColumnData(new ColumnWeightData(100, 200, true));
- layout.addColumnData(new ColumnWeightData(100, 50, true));
- layout.addColumnData(new ColumnWeightData(100, 100, true));
- layout.addColumnData(new ColumnWeightData(100, true));
- table.setLayout(layout);
-
- table.setLayoutData(gd);
- tableViewer.setContentProvider(new TableContentProvider());
- tableViewer.setLabelProvider(new TableLabelProvider());
- tableViewer.addCheckStateListener(new ICheckStateListener() {
- public void checkStateChanged(CheckStateChangedEvent event) {
- pageChanged();
- }
- });
- tableViewer
- .addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent e) {
- tableSelectionChanged((IStructuredSelection) e.getSelection());
- }
- });
- tableViewer.setSorter(new FeatureSorter() {
- public int category(Object obj) {
- PendingChange job = (PendingChange)obj;
- if (UpdateUI.isPatch(job.getFeature()))
- return 1;
- return 0;
- }
- });
- }
-
- private void tableSelectionChanged(IStructuredSelection selection) {
- PendingChange selectedJob = (PendingChange) selection.getFirstElement();
- IFeature feature =
- selectedJob != null ? selectedJob.getFeature() : null;
- IURLEntry descEntry = null;
-
- if (feature != null)
- descEntry = feature.getDescription();
-
- moreInfoButton.setEnabled(
- descEntry != null && descEntry.getURL() != null);
- String text = descEntry != null ? descEntry.getAnnotation() : null;
- descriptionArea.setText(text != null ? text : "");
- }
-
- private void doMoreInfo() {
- IStructuredSelection selection =
- (IStructuredSelection) tableViewer.getSelection();
- PendingChange selectedJob = (PendingChange) selection.getFirstElement();
- IFeature feature =
- selectedJob != null ? selectedJob.getFeature() : null;
- URL url = null;
-
- if (feature != null) {
- IURLEntry descEntry = feature.getDescription();
- if (descEntry != null)
- url = descEntry.getURL();
- }
- if (url != null)
- DetailsView.showURL(url.toString(), false);
- }
-
- public void setVisible(boolean visible) {
- super.setVisible(visible);
- if (visible) {
- tableViewer.getTable().setFocus();
- }
- }
-
- public PendingChange[] getSelectedJobs() {
- Object[] selected = tableViewer.getCheckedElements();
- PendingChange[] jobs = new PendingChange[selected.length];
- System.arraycopy(selected, 0, jobs, 0, selected.length);
- return jobs;
- }
-
- public PendingChange[] getSelectedJobsWithLicenses() {
- Object[] selected = tableViewer.getCheckedElements();
- ArrayList list = new ArrayList();
- for (int i = 0; i < selected.length; i++) {
- PendingChange job = (PendingChange) selected[i];
- if (UpdateModel.hasLicense(job))
- list.add(job);
- }
- return (PendingChange[]) list.toArray(new PendingChange[list.size()]);
- }
-
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/NewWizard.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/NewWizard.java
deleted file mode 100644
index c557d74..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/NewWizard.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.wizards;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.wizard.Wizard;
-
-public class NewWizard extends Wizard {
- protected BaseNewWizardPage page;
-
- public NewWizard(BaseNewWizardPage page, ImageDescriptor descriptor) {
- this.page = page;
- setDefaultPageImageDescriptor(descriptor);
- }
-
- public void addPages() {
- addPage(page);
- }
-
- public boolean performFinish() {
- return page.finish();
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/OptionalFeaturesPage.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/OptionalFeaturesPage.java
deleted file mode 100644
index bf19126..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/OptionalFeaturesPage.java
+++ /dev/null
@@ -1,299 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.wizards;
-import java.util.*;
-
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.update.configuration.IInstallConfiguration;
-import org.eclipse.update.core.*;
-import org.eclipse.update.internal.ui.*;
-import org.eclipse.update.internal.ui.model.PendingChange;
-import org.eclipse.update.internal.ui.parts.*;
-
-public class OptionalFeaturesPage extends BannerPage {
- // NL keys
- private static final String KEY_TITLE =
- "InstallWizard.OptionalFeaturesPage.title";
- private static final String KEY_DESC =
- "InstallWizard.OptionalFeaturesPage.desc";
- private static final String KEY_TREE_LABEL =
- "InstallWizard.OptionalFeaturesPage.treeLabel";
- private static final String KEY_SELECT_ALL =
- "InstallWizard.OptionalFeaturesPage.selectAll";
- private static final String KEY_DESELECT_ALL =
- "InstallWizard.OptionalFeaturesPage.deselectAll";
- private CheckboxTreeViewer treeViewer;
- private IInstallConfiguration config;
- private PendingChange pendingChange;
- private Object[] elements;
- private boolean patch;
-
- class TreeContentProvider
- extends DefaultContentProvider
- implements ITreeContentProvider {
-
- public Object[] getChildren(Object parent) {
- if (parent instanceof FeatureHierarchyElement) {
- FeatureHierarchyElement fe = (FeatureHierarchyElement) parent;
- return fe.getChildren(pendingChange.getOldFeature() != null, patch, config);
- }
- return new Object[0];
- }
-
- public Object getParent(Object child) {
- return null;
- }
-
- public boolean hasChildren(Object parent) {
- return getChildren(parent).length > 0;
- }
-
- public Object[] getElements(Object input) {
- if (elements == null)
- computeElements();
- return elements;
- }
- }
-
- class TreeLabelProvider extends LabelProvider {
- public String getText(Object obj) {
- if (obj instanceof FeatureHierarchyElement) {
- FeatureHierarchyElement fe = (FeatureHierarchyElement) obj;
- String name = fe.getLabel();
- if (name != null)
- return name;
- }
- return super.getText(obj);
- }
- public Image getImage(Object obj) {
- return UpdateUI.getDefault().getLabelProvider().get(
- UpdateUIImages.DESC_FEATURE_OBJ);
- }
- }
-
- /**
- * Constructor for ReviewPage
- */
- public OptionalFeaturesPage(
- PendingChange pendingChange,
- IInstallConfiguration config) {
- super("OptionalFeatures");
- setTitle(UpdateUI.getString(KEY_TITLE));
- setDescription(UpdateUI.getString(KEY_DESC));
- this.config = config;
- this.pendingChange = pendingChange;
- UpdateUI.getDefault().getLabelProvider().connect(this);
- patch = UpdateUI.isPatch(pendingChange.getFeature());
- }
-
- public void dispose() {
- UpdateUI.getDefault().getLabelProvider().disconnect(this);
- super.dispose();
- }
-
- /**
- * @see DialogPage#createControl(Composite)
- */
- public Control createContents(Composite parent) {
- Composite client = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginWidth = layout.marginHeight = 0;
- client.setLayout(layout);
- createCheckboxTreeViewer(client);
- Button selectAllButton = new Button(client, SWT.PUSH);
- selectAllButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- selectAll(true);
- }
- });
- selectAllButton.setText(
- UpdateUI.getString(KEY_SELECT_ALL));
- GridData gd =
- new GridData(
- GridData.HORIZONTAL_ALIGN_FILL
- | GridData.VERTICAL_ALIGN_BEGINNING);
- selectAllButton.setLayoutData(gd);
- SWTUtil.setButtonDimensionHint(selectAllButton);
-
- Button deselectAllButton = new Button(client, SWT.PUSH);
- deselectAllButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- selectAll(false);
- }
- });
- deselectAllButton.setText(
- UpdateUI.getString(KEY_DESELECT_ALL));
- gd =
- new GridData(
- GridData.HORIZONTAL_ALIGN_FILL
- | GridData.VERTICAL_ALIGN_BEGINNING);
- deselectAllButton.setLayoutData(gd);
- SWTUtil.setButtonDimensionHint(deselectAllButton);
- WorkbenchHelp.setHelp(client, "org.eclipse.update.ui.OptionalFeaturesPage");
- return client;
- }
-
- private void createCheckboxTreeViewer(Composite parent) {
- Label label = new Label(parent, SWT.NULL);
- label.setText(UpdateUI.getString(KEY_TREE_LABEL));
- GridData gd = new GridData();
- gd.horizontalSpan = 2;
- label.setLayoutData(gd);
- treeViewer =
- new CheckboxTreeViewer(
- parent,
- SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
- gd = new GridData(GridData.FILL_BOTH);
- gd.verticalSpan = 2;
- Tree tree = treeViewer.getTree();
- tree.setLayoutData(gd);
- treeViewer.setContentProvider(new TreeContentProvider());
- treeViewer.setLabelProvider(new TreeLabelProvider());
- treeViewer.addCheckStateListener(new ICheckStateListener() {
- public void checkStateChanged(CheckStateChangedEvent e) {
- handleChecked(e.getElement(), e.getChecked());
- }
- });
- treeViewer.setAutoExpandLevel(AbstractTreeViewer.ALL_LEVELS);
- /*
- treeViewer.addFilter(new ViewerFilter() {
- public boolean select(Viewer v, Object parent, Object element) {
- IFeatureReference reference = (IFeatureReference)element;
- if (reference.isOptional()) return true;
- return InstallWizard.hasOptionalFeatures(reference);
- }
- });
- */
- treeViewer.setInput(pendingChange);
- initializeStates();
- }
-
- public void setVisible(boolean visible) {
- super.setVisible(visible);
- if (visible) {
- treeViewer.getTree().setFocus();
- }
- }
-
- private void computeElements() {
- IFeature oldFeature = pendingChange.getOldFeature();
- IFeature newFeature = pendingChange.getFeature();
- ArrayList list = new ArrayList();
- FeatureHierarchyElement.computeElements(
- oldFeature,
- newFeature,
- oldFeature != null,
- patch,
- config,
- list);
- elements = list.toArray();
- }
-
- private void initializeStates() {
- if (elements == null)
- computeElements();
- ArrayList checked = new ArrayList();
- ArrayList grayed = new ArrayList();
- initializeStates(elements, checked, grayed);
- treeViewer.setCheckedElements(checked.toArray());
- treeViewer.setGrayedElements(grayed.toArray());
- }
-
- private void initializeStates(
- Object[] elements,
- ArrayList checked,
- ArrayList grayed) {
- for (int i = 0; i < elements.length; i++) {
- FeatureHierarchyElement element =
- (FeatureHierarchyElement) elements[i];
- if (element.isChecked())
- checked.add(element);
- if (!element.isEditable())
- grayed.add(element);
- Object[] children =
- element.getChildren(pendingChange.getOldFeature() != null, patch, config);
- initializeStates(children, checked, grayed);
- }
- }
-
- private void selectAll(boolean value) {
- ArrayList selected = new ArrayList();
-
- for (int i = 0; i < elements.length; i++) {
- FeatureHierarchyElement element =
- (FeatureHierarchyElement) elements[i];
- selectAll(element, selected, value);
- }
- treeViewer.setCheckedElements(selected.toArray());
- }
-
- private void selectAll(
- FeatureHierarchyElement ref,
- ArrayList selected,
- boolean value) {
-
- if (ref.isOptional() == false)
- selected.add(ref);
- else {
- if (ref.isEditable()) {
- ref.setChecked(value);
- if (value)
- selected.add(ref);
- } else {
- if (ref.isChecked())
- selected.add(ref);
- }
- }
- Object[] included =
- ref.getChildren(pendingChange.getOldFeature() != null, patch, config);
- for (int i = 0; i < included.length; i++) {
- FeatureHierarchyElement fe = (FeatureHierarchyElement) included[i];
- selectAll(fe, selected, value);
- }
- }
-
- private void handleChecked(Object element, boolean checked) {
- FeatureHierarchyElement fe = (FeatureHierarchyElement) element;
-
- if (!fe.isEditable())
- treeViewer.setChecked(element, !checked);
- else {
- // update the result
- fe.setChecked(checked);
- }
- }
-
- public Object[] getOptionalElements() {
- return elements;
- }
-
- public IFeatureReference[] getCheckedOptionalFeatures() {
- HashSet set = new HashSet();
- for (int i = 0; i < elements.length; i++) {
- FeatureHierarchyElement element =
- (FeatureHierarchyElement) elements[i];
- element.addCheckedOptionalFeatures(
- pendingChange.getOldFeature() != null,
- patch,
- config,
- set);
- }
- return (IFeatureReference[]) set.toArray(
- new IFeatureReference[set.size()]);
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/ResizableWizardDialog.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/ResizableWizardDialog.java
deleted file mode 100644
index 31b241d..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/ResizableWizardDialog.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.wizards;
-
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Shell;
-
-public class ResizableWizardDialog extends WizardDialog {
- /**
- * Creates a new resizable wizard dialog.
- */
- public ResizableWizardDialog(Shell parent, IWizard wizard) {
- super(parent, wizard);
- setShellStyle(getShellStyle() | SWT.RESIZE);
- }
-}
\ No newline at end of file
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/ReviewPage.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/ReviewPage.java
deleted file mode 100644
index 4adef69..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/ReviewPage.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.wizards;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.update.internal.ui.UpdateUI;
-import org.eclipse.update.internal.ui.model.PendingChange;
-
-public class ReviewPage extends BannerPage {
-// NL keys
-private static final String KEY_TITLE = "InstallWizard.ReviewPage.title";
-private static final String KEY_DESC = "InstallWizard.ReviewPage.desc";
-private static final String KEY_ABOUT_INSTALL = "InstallWizard.ReviewPage.about.install";
-private static final String KEY_ABOUT_UNINSTALL = "InstallWizard.ReviewPage.about.uninstall";
-private static final String KEY_ABOUT_UNCONFIGURE = "InstallWizard.ReviewPage.about.unconfigure";
-private static final String KEY_ABOUT_CONFIGURE = "InstallWizard.ReviewPage.about.configure";
-private static final String KEY_NAME = "InstallWizard.ReviewPage.name";
-private static final String KEY_PROVIDER = "InstallWizard.ReviewPage.provider";
-private static final String KEY_VERSION = "InstallWizard.ReviewPage.version";
-private static final String KEY_CORRECT_INSTALL = "InstallWizard.ReviewPage.correct.install";
-private static final String KEY_CORRECT_UNINSTALL = "InstallWizard.ReviewPage.correct.uninstall";
-
- private PendingChange job;
- /**
- * Constructor for ReviewPage
- */
- public ReviewPage(PendingChange job) {
- super("Review");
- setTitle(UpdateUI.getString(KEY_TITLE));
- setDescription(UpdateUI.getString(KEY_DESC));
- this.job = job;
- }
-
-
-
- /**
- * @see DialogPage#createControl(Composite)
- */
- public Control createContents(Composite parent) {
- Composite client = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginWidth = layout.marginHeight = 0;
- client.setLayout(layout);
- Label label = new Label(client, SWT.NULL);
- switch (job.getJobType()) {
- case PendingChange.UNINSTALL :
- label.setText(UpdateUI.getString(KEY_ABOUT_UNINSTALL));
- break;
- case PendingChange.INSTALL :
- label.setText(UpdateUI.getString(KEY_ABOUT_INSTALL));
- break;
- case PendingChange.UNCONFIGURE:
- label.setText(UpdateUI.getString(KEY_ABOUT_UNCONFIGURE));
- break;
- case PendingChange.CONFIGURE:
- label.setText(UpdateUI.getString(KEY_ABOUT_CONFIGURE));
- break;
- }
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 2;
- label.setLayoutData(gd);
-
- label = new Label(client, SWT.NULL);
- gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 2;
- label.setLayoutData(gd);
-
- label = new Label(client, SWT.NULL);
- label.setText(UpdateUI.getString(KEY_NAME));
-
- label = new Label(client, SWT.NULL);
- label.setFont(JFaceResources.getBannerFont());
- label.setText(job.getFeature().getLabel());
- gd = new GridData(GridData.FILL_HORIZONTAL);
- label.setLayoutData(gd);
- label = new Label(client, SWT.NULL);
- label.setText(UpdateUI.getString(KEY_PROVIDER));
- label = new Label(client, SWT.NULL);
- label.setFont(JFaceResources.getBannerFont());
- label.setText(job.getFeature().getProvider());
- gd = new GridData(GridData.FILL_HORIZONTAL);
- label.setLayoutData(gd);
- label = new Label(client, SWT.NULL);
- label.setText(UpdateUI.getString(KEY_VERSION));
- label = new Label(client, SWT.NULL);
- label.setFont(JFaceResources.getBannerFont());
- label.setText(job.getFeature().getVersionedIdentifier().getVersion().toString());
- gd = new GridData(GridData.FILL_HORIZONTAL);
- label.setLayoutData(gd);
-
- label = new Label(client, SWT.NULL);
- if (job.getJobType()==PendingChange.INSTALL)
- label.setText(UpdateUI.getString(KEY_CORRECT_INSTALL));
- else
- label.setText(UpdateUI.getString(KEY_CORRECT_UNINSTALL));
- gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 2;
- label.setLayoutData(gd);
- WorkbenchHelp.setHelp(client, "org.eclipse.update.ui.ReviewPage");
- return client;
- }
-}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/TargetPage.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/TargetPage.java
deleted file mode 100644
index d7d3320..0000000
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/TargetPage.java
+++ /dev/null
@@ -1,522 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.wizards;
-import java.io.File;
-import java.net.*;
-import java.net.URL;
-import java.util.*;
-import java.util.HashSet;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.update.configuration.*;
-import org.eclipse.update.core.*;
-import org.eclipse.update.internal.core.UpdateManagerUtils;
-import org.eclipse.update.internal.ui.*;
-import org.eclipse.update.internal.ui.model.PendingChange;
-import org.eclipse.update.internal.ui.parts.*;
-
-public class TargetPage extends BannerPage {
- // NL keys
- private static final String KEY_TITLE = "InstallWizard.TargetPage.title";
- private static final String KEY_DESC = "InstallWizard.TargetPage.desc";
- private static final String KEY_NEW = "InstallWizard.TargetPage.new";
- private static final String KEY_DELETE = "InstallWizard.TargetPage.delete";
- private static final String KEY_REQUIRED_FREE_SPACE =
- "InstallWizard.TargetPage.requiredSpace";
- private static final String KEY_AVAILABLE_FREE_SPACE =
- "InstallWizard.TargetPage.availableSpace";
- private static final String KEY_LOCATION =
- "InstallWizard.TargetPage.location";
- private static final String KEY_LOCATION_MESSAGE =
- "InstallWizard.TargetPage.location.message";
- private static final String KEY_LOCATION_EMPTY =
- "InstallWizard.TargetPage.location.empty";
- private static final String KEY_LOCATION_EXISTS =
- "InstallWizard.TargetPage.location.exists";
- private static final String KEY_LOCATION_ERROR_TITLE =
- "InstallWizard.TargetPage.location.error.title";
- private static final String KEY_LOCATION_ERROR_MESSAGE =
- "InstallWizard.TargetPage.location.error.message";
- private static final String KEY_ERROR_REASON =
- "InstallWizard.TargetPage.location.error.reason";
- private static final String KEY_SIZE = "InstallWizard.TargetPage.size";
- private static final String KEY_SIZE_UNKNOWN =
- "InstallWizard.TargetPage.unknownSize";
- private TableViewer tableViewer;
- private IInstallConfiguration config;
- private ConfigListener configListener;
- private Label requiredSpaceLabel;
- private Label availableSpaceLabel;
- private PendingChange pendingChange;
- private IConfiguredSite defaultTargetSite;
- private IConfiguredSite affinitySite;
- private Button deleteButton;
- private HashSet added;
-
- class TableContentProvider
- extends DefaultContentProvider
- implements IStructuredContentProvider {
-
- /**
- * @see IStructuredContentProvider#getElements(Object)
- */
- public Object[] getElements(Object parent) {
- return config.getConfiguredSites();
- }
- }
-
- class TableLabelProvider
- extends LabelProvider
- implements ITableLabelProvider {
- /**
- * @see ITableLabelProvider#getColumnImage(Object, int)
- */
- public Image getColumnImage(Object obj, int col) {
- if (obj instanceof IConfiguredSite)
- return UpdateUI
- .getDefault()
- .getLabelProvider()
- .getLocalSiteImage(
- (IConfiguredSite) obj);
- return null;
- }
-
- /**
- * @see ITableLabelProvider#getColumnText(Object, int)
- */
- public String getColumnText(Object obj, int col) {
- if (obj instanceof IConfiguredSite && col == 0) {
- IConfiguredSite csite = (IConfiguredSite) obj;
- ISite site = csite.getSite();
- URL url = site.getURL();
- return url.getFile();
- }
- return null;
- }
-
- }
-
- class ConfigListener implements IInstallConfigurationChangedListener {
- public void installSiteAdded(IConfiguredSite csite) {
- tableViewer.add(csite);
- if (added==null) added = new HashSet();
- added.add(csite);
- tableViewer.setSelection(new StructuredSelection(csite));
- tableViewer.getControl().setFocus();
- }
-
- public void installSiteRemoved(IConfiguredSite csite) {
- tableViewer.remove(csite);
- if (added!=null) added.remove(csite);
- selectFirstTarget();
- tableViewer.getControl().setFocus();
- }
- }
-
- /**
- * Constructor for ReviewPage
- */
- public TargetPage(
- PendingChange pendingChange,
- IInstallConfiguration config) {
- super("Target");
- setTitle(UpdateUI.getString(KEY_TITLE));
- setDescription(UpdateUI.getString(KEY_DESC));
- this.config = config;
- this.pendingChange = pendingChange;
- UpdateUI.getDefault().getLabelProvider().connect(this);
- configListener = new ConfigListener();
- defaultTargetSite = getDefaultTargetSite(config, pendingChange, false);
- affinitySite = getAffinitySite(config, pendingChange.getFeature());
- if (affinitySite == null)
- affinitySite = pendingChange.getDefaultTargetSite();
- }
-
- public static IConfiguredSite getDefaultTargetSite(
- IInstallConfiguration config,
- PendingChange pendingChange) {
- return getDefaultTargetSite(config, pendingChange, true);
- }
-
- private static IConfiguredSite getDefaultTargetSite(
- IInstallConfiguration config,
- PendingChange pendingChange,
- boolean checkAffinityFeature) {
- IFeature oldFeature = pendingChange.getOldFeature();
- IFeature newFeature = pendingChange.getFeature();
- if (oldFeature != null) {
- // We should install into the same site as
- // the old feature
- try {
- return InstallWizard.findConfigSite(oldFeature, config);
- } catch (CoreException e) {
- UpdateUI.logException(e, false);
- return null;
- }
- }
-
- // This is a new install. Check if there is
- // a disabled feature with the same ID
- String newFeatureID =
- newFeature.getVersionedIdentifier().getIdentifier();
- IConfiguredSite sameSite = findSameIdFeatureSite(config, newFeatureID);
- if (sameSite != null) {
- return sameSite;
- }
-
- if (checkAffinityFeature) {
- return getAffinitySite(config, newFeature);
- }
- return null;
- }
-
- private static IConfiguredSite getAffinitySite(
- IInstallConfiguration config,
- IFeature newFeature) {
- // check if the affinity feature is installed
- String affinityID = newFeature.getAffinityFeature();
- if (affinityID != null) {
- IConfiguredSite affinitySite =
- findSameIdFeatureSite(config, affinityID);
- if (affinitySite != null)
- return affinitySite;
- }
- return null;
- }
-
- private static IConfiguredSite findSameIdFeatureSite(
- IInstallConfiguration config,
- String featureID) {
- if (featureID == null)
- return null;
- IConfiguredSite[] sites = config.getConfiguredSites();
- for (int i = 0; i < sites.length; i++) {
- IConfiguredSite site = sites[i];
- IFeatureReference[] refs = site.getFeatureReferences();
- for (int j = 0; j < refs.length; j++) {
- IFeatureReference ref = refs[j];
- try {
- IFeature feature = ref.getFeature(null);
- if (featureID
- .equals(
- feature
- .getVersionedIdentifier()
- .getIdentifier())) {
- // found it
- return site;
- }
- } catch (CoreException e) {
- UpdateUI.logException(e, false);
- }
- }
- }
- return null;
- }
-
- public void dispose() {
- UpdateUI.getDefault().getLabelProvider().disconnect(this);
- config.removeInstallConfigurationChangedListener(configListener);
- super.dispose();
- }
-
- /**
- * @see DialogPage#createControl(Composite)
- */
- public Control createContents(Composite parent) {
- Composite client = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginWidth = layout.marginHeight = 0;
- client.setLayout(layout);
- createTableViewer(client);
- Composite buttonContainer = new Composite(client, SWT.NULL);
- GridLayout blayout = new GridLayout();
- blayout.marginWidth = blayout.marginHeight = 0;
- buttonContainer.setLayout(blayout);
- GridData gd = new GridData(GridData.FILL_VERTICAL);
- buttonContainer.setLayoutData(gd);
- Button button = new Button(buttonContainer, SWT.PUSH);
- button.setText(UpdateUI.getString(KEY_NEW));
- button.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- addTargetLocation();
- }
- });
- button.setEnabled(affinitySite == null);
- gd = new GridData(GridData.HORIZONTAL_ALIGN_CENTER);
- button.setLayoutData(gd);
- SWTUtil.setButtonDimensionHint(button);
-
- deleteButton = new Button(buttonContainer, SWT.PUSH);
- deleteButton.setText(UpdateUI.getString(KEY_DELETE));
- deleteButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- try {
- removeSelection();
- }
- catch (CoreException ex) {
- UpdateUI.logException(ex);
- }
- }
- });
- deleteButton.setEnabled(false);
- gd = new GridData(GridData.HORIZONTAL_ALIGN_CENTER);
- deleteButton.setLayoutData(gd);
- SWTUtil.setButtonDimensionHint(deleteButton);
-
- Composite status = new Composite(client, SWT.NULL);
- gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- gd.horizontalSpan = 2;
- status.setLayoutData(gd);
- layout = new GridLayout();
- layout.numColumns = 2;
- status.setLayout(layout);
- Label label = new Label(status, SWT.NULL);
- label.setText(UpdateUI.getString(KEY_REQUIRED_FREE_SPACE));
- requiredSpaceLabel = new Label(status, SWT.NULL);
- requiredSpaceLabel.setLayoutData(
- new GridData(GridData.FILL_HORIZONTAL));
- label = new Label(status, SWT.NULL);
- label.setText(UpdateUI.getString(KEY_AVAILABLE_FREE_SPACE));
- availableSpaceLabel = new Label(status, SWT.NULL);
- availableSpaceLabel.setLayoutData(
- new GridData(GridData.FILL_HORIZONTAL));
-
- tableViewer.setInput(UpdateUI.getDefault().getUpdateModel());
- selectFirstTarget();
- WorkbenchHelp.setHelp(client, "org.eclipse.update.ui.TargetPage");
- return client;
- }
- private void createTableViewer(Composite parent) {
- tableViewer =
- new TableViewer(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
- GridData gd = new GridData(GridData.FILL_BOTH);
- Table table = tableViewer.getTable();
- table.setLayoutData(gd);
- tableViewer.setContentProvider(new TableContentProvider());
- tableViewer.setLabelProvider(new TableLabelProvider());
- tableViewer.addFilter(new ViewerFilter() {
- public boolean select(Viewer v, Object parent, Object obj) {
- IConfiguredSite site = (IConfiguredSite) obj;
- return getSiteVisibility(site);
- }
- });
- tableViewer
- .addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- ISelection selection = event.getSelection();
- updateDeleteButton((IStructuredSelection) selection);
- boolean empty = selection.isEmpty();
- verifyNotEmpty(empty);
- updateStatus(
- ((IStructuredSelection) selection).getFirstElement());
- }
- });
-
- if (config != null)
- config.addInstallConfigurationChangedListener(configListener);
- }
-
- public void setVisible(boolean visible) {
- super.setVisible(visible);
- if (visible) {
- tableViewer.getTable().setFocus();
- }
- }
-
- private void updateDeleteButton(IStructuredSelection selection) {
- boolean hasUserSites = added!=null && !added.isEmpty();
- boolean enable = !selection.isEmpty() && hasUserSites;
-
- if (hasUserSites) {
- for (Iterator iter = selection.iterator(); iter.hasNext();) {
- Object obj = iter.next();
- if (added.contains(obj) == false) {
- enable = false;
- break;
- }
- }
- }
- deleteButton.setEnabled(enable);
- }
-
- private boolean getSiteVisibility(IConfiguredSite site) {
- // If affinity site is known, only it should be shown
- if (affinitySite != null) {
- // Must compare referenced sites because
- // configured sites themselves may come from
- // different configurations
- return site.getSite().equals(affinitySite.getSite());
- }
-
- // If this is the default target site, let it show
- if (site.equals(defaultTargetSite))
- return true;
- // Not the default. If update, show only private sites.
- // If install, allow product site + private sites.
- if (site.isPrivateSite() && site.isUpdatable())
- return true;
- if (pendingChange.getOldFeature() == null && site.isProductSite())
- return true;
- return false;
- }
-
- private void verifyNotEmpty(boolean empty) {
- String errorMessage = null;
- if (empty)
- errorMessage = UpdateUI.getString(KEY_LOCATION_EMPTY);
- setErrorMessage(errorMessage);
- setPageComplete(!empty);
- }
-
- private void selectFirstTarget() {
- IConfiguredSite firstSite = defaultTargetSite;
- if (firstSite == null) {
- IConfiguredSite[] sites = config.getConfiguredSites();
- for (int i = 0; i < sites.length; i++) {
- IConfiguredSite csite = sites[i];
- if (getSiteVisibility(csite)) {
- firstSite = csite;
- break;
- }
- }
- }
- if (firstSite != null) {
- tableViewer.setSelection(new StructuredSelection(firstSite));
- }
- }
-
- private void addTargetLocation() {
- DirectoryDialog dd = new DirectoryDialog(getContainer().getShell());
- dd.setMessage(UpdateUI.getString(KEY_LOCATION_MESSAGE));
- String path = dd.open();
- if (path != null) {
- File file = new File(path);
- addConfiguredSite(getContainer().getShell(), config, file, false);
- }
- }
-
- private void removeSelection() throws CoreException {
- IStructuredSelection selection =
- (IStructuredSelection) tableViewer.getSelection();
- for (Iterator iter = selection.iterator(); iter.hasNext();) {
- Object obj = iter.next();
- IConfiguredSite csite = (IConfiguredSite)obj;
- config.removeConfiguredSite(csite);
- }
- }
-
- public static IConfiguredSite addConfiguredSite(
- Shell shell,
- IInstallConfiguration config,
- File file,
- boolean linked) {
- try {
- IConfiguredSite csite = null;
- if (linked) {
- csite = config.createLinkedConfiguredSite(file);
- config.addConfiguredSite(csite);
- } else {
- if (!ensureUnique(file, config)) {
- String title = UpdateUI.getString(KEY_LOCATION_ERROR_TITLE);
- String message = UpdateUI.getFormattedMessage(
- KEY_LOCATION_EXISTS,
- file.getPath());
- MessageDialog.openError(shell, title, message);
- return null;
- }
- csite = config.createConfiguredSite(file);
- IStatus status = csite.verifyUpdatableStatus();
- if (status.isOK())
- config.addConfiguredSite(csite);
- else {
- String title = UpdateUI.getString(KEY_LOCATION_ERROR_TITLE);
- String message =
- UpdateUI.getFormattedMessage(
- KEY_LOCATION_ERROR_MESSAGE,
- file.getPath());
- String message2 =
- UpdateUI.getFormattedMessage(
- KEY_ERROR_REASON,
- status.getMessage());
- message = message + "\r\n" + message2;
- ErrorDialog.openError(shell, title, message, status);
- return null;
- }
- }
- return csite;
- } catch (CoreException e) {
- UpdateUI.logException(e);
- return null;
- }
- }
-
- private static boolean ensureUnique(File file, IInstallConfiguration config) {
- IConfiguredSite [] sites = config.getConfiguredSites();
- URL fileURL;
- try {
- fileURL = new URL("file:"+file.getPath());
- }
- catch (MalformedURLException e) {
- return true;
- }
- for (int i=0; i<sites.length; i++) {
- IConfiguredSite csite = sites[i];
- URL url = csite.getSite().getURL();
- if (UpdateManagerUtils.sameURL(fileURL, url))
- return false;
- }
- return true;
- }
-
- private void updateStatus(Object element) {
- if (element == null) {
- requiredSpaceLabel.setText("");
- availableSpaceLabel.setText("");
- return;
- }
- IConfiguredSite site = (IConfiguredSite) element;
- URL url = site.getSite().getURL();
- String fileName = url.getFile();
- File file = new File(fileName);
- long available = LocalSystemInfo.getFreeSpace(file);
- long required =
- site.getSite().getInstallSizeFor(pendingChange.getFeature());
- if (required == -1)
- requiredSpaceLabel.setText(UpdateUI.getString(KEY_SIZE_UNKNOWN));
- else
- requiredSpaceLabel.setText(
- UpdateUI.getFormattedMessage(KEY_SIZE, "" + required));
-
- if (available == LocalSystemInfo.SIZE_UNKNOWN)
- availableSpaceLabel.setText(UpdateUI.getString(KEY_SIZE_UNKNOWN));
- else
- availableSpaceLabel.setText(
- UpdateUI.getFormattedMessage(KEY_SIZE, "" + available));
- }
-
- public IConfiguredSite getTargetSite() {
- IStructuredSelection sel =
- (IStructuredSelection) tableViewer.getSelection();
- if (sel.isEmpty())
- return null;
- return (IConfiguredSite) sel.getFirstElement();
- }
-}
diff --git a/update/org.eclipse.update.ui/src_webapp/org/eclipse/update/internal/ui/servlets/InstallServlet.java b/update/org.eclipse.update.ui/src_webapp/org/eclipse/update/internal/ui/servlets/InstallServlet.java
deleted file mode 100644
index 88ebc3a..0000000
--- a/update/org.eclipse.update.ui/src_webapp/org/eclipse/update/internal/ui/servlets/InstallServlet.java
+++ /dev/null
@@ -1,232 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.servlets;
-
-import java.io.*;
-import java.net.*;
-import java.util.ArrayList;
-
-import javax.servlet.*;
-import javax.servlet.http.*;
-
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.update.core.*;
-import org.eclipse.update.internal.ui.UpdateUI;
-import org.eclipse.update.internal.ui.forms.DetailsForm;
-import org.eclipse.update.internal.ui.model.PendingChange;
-import org.eclipse.update.internal.ui.parts.SWTUtil;
-
-/**
- * @author dejan
- *
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates.
- * To enable and disable the creation of type comments go to
- * Window>Preferences>Java>Code Generation.
- */
-public class InstallServlet extends HttpServlet {
- private ServletConfig servletConfig;
- public static final String SERVLET_NAME = "/InstallServlet"; //$NON-NLS-1$
-
- public void init(ServletConfig config) throws ServletException {
- this.servletConfig = config;
- }
-
- public void destroy() {
- }
-
- public ServletConfig getServletConfig() {
- return servletConfig;
- }
-
- public String getServletInfo() {
- return "Eclipse Install servlet"; //$NON-NLS-1$
- }
-
- public void service(
- HttpServletRequest servletRequest,
- HttpServletResponse servletResponse)
- throws ServletException, IOException {
- PrintWriter writer =
- ServletsUtil.createResponsePrologue(servletResponse);
- execute(writer, servletRequest);
- ServletsUtil.createResponseEpilogue(
- servletRequest,
- servletResponse,
- writer);
- }
-
- /**
- * Method execute.
- * @param servletRequest
- */
- private void execute(
- PrintWriter writer,
- HttpServletRequest servletRequest) {
- String serverURL = servletRequest.getParameter("server"); //$NON-NLS-1$
- String license = servletRequest.getParameter("license"); //$NON-NLS-1$
- boolean needLicensePage = true;
- if (license != null && license.equalsIgnoreCase("false")) //$NON-NLS-1$
- needLicensePage = false;
-
- String[] versionedIds = servletRequest.getParameterValues("feature"); //$NON-NLS-1$
-
- if (serverURL == null) {
- createPageError(writer, UpdateUI.getString("InstallServlet.unknownServerURL")); //$NON-NLS-1$
- return;
- }
- if (versionedIds == null) {
- createPageError(writer, UpdateUI.getString("InstallServlet.noFeatures")); //$NON-NLS-1$
- return;
- }
- if (DetailsForm.isInProgress()) {
- ServletsUtil.createError(writer, UpdateUI.getString("InstallServlet.inProgress"), null);
- return;
- }
- try {
- URL url = new URL(serverURL);
- VersionedIdentifier[] vids =
- computeVersionedIdentifiers(versionedIds);
- boolean success =
- executeInstall(writer, url, vids, needLicensePage);
- if (success)
- ServletsUtil.createInfo(writer);
- } catch (MalformedURLException e) {
- createPageError(writer, UpdateUI.getFormattedMessage("InstallServlet.incorrectURLFormat", //$NON-NLS-1$
- serverURL.toString()));
- }
- }
-
- private void createPageError(PrintWriter writer, String problem) {
- ServletsUtil.createError(writer, problem, UpdateUI.getString("InstallServlet.contactWebmaster")); //$NON-NLS-1$
- }
-
- private VersionedIdentifier[] computeVersionedIdentifiers(String[] array) {
- ArrayList result = new ArrayList();
- for (int i = 0; i < array.length; i++) {
- String id_version = array[i];
- int sep = id_version.lastIndexOf('_');
- if (sep == -1)
- continue;
- String id = id_version.substring(0, sep);
- String version = id_version.substring(sep + 1);
- VersionedIdentifier vid = new VersionedIdentifier(id, version);
- result.add(vid);
- }
- return (VersionedIdentifier[]) result.toArray(
- new VersionedIdentifier[result.size()]);
- }
-
- private boolean executeInstall(
- PrintWriter writer,
- URL siteURL,
- VersionedIdentifier[] vids,
- boolean needLicensePage) {
- if (vids.length == 1) {
- return executeInstall(writer, siteURL, vids[0], needLicensePage);
- } else {
- ServletsUtil.createError(writer, UpdateUI.getString("InstallServlet.multipleInstall"), null); //$NON-NLS-1$
- return false;
- }
- }
-
- private boolean executeInstall(
- final PrintWriter writer,
- final URL siteURL,
- final VersionedIdentifier vid,
- final boolean needLicensePage) {
- Display display = SWTUtil.getStandardDisplay();
- final boolean[] result = new boolean[] { false };
-
- display.syncExec(new Runnable() {
- public void run() {
- final Shell shell = UpdateUI.getActiveWorkbenchShell();
- BusyIndicator.showWhile(shell.getDisplay(), new Runnable() {
- public void run() {
- result[0] =
- doExecuteInstall(
- writer,
- shell,
- siteURL,
- vid,
- needLicensePage);
- }
- });
- }
- });
- return result[0];
- }
-
- private boolean doExecuteInstall(
- PrintWriter writer,
- final Shell shell,
- URL siteURL,
- VersionedIdentifier vid,
- final boolean needLicensePage) {
- shell.forceActive();
- IFeature feature =
- DetailsForm.fetchFeatureFromServer(shell, siteURL, vid);
- if (feature == null)
- return false;
- IFeature latestOldFeature = findLatestOldFeature(feature);
-
- if (latestOldFeature != null) {
- if (latestOldFeature
- .getVersionedIdentifier()
- .equals(feature.getVersionedIdentifier())) {
- // Already installed.
- ServletsUtil.createError(writer, UpdateUI.getString("InstallServlet.alreadyInstalled"), //$NON-NLS-1$
- UpdateUI.getString("InstallServlet.alreadyHaveIt")); //$NON-NLS-1$
- return false;
- }
- if (latestOldFeature
- .getVersionedIdentifier()
- .getVersion()
- .isGreaterThan(feature.getVersionedIdentifier().getVersion())) {
- ServletsUtil.createError(writer, UpdateUI.getString("InstallServlet.olderFeature"), //$NON-NLS-1$
- UpdateUI.getString("InstallServlet.nothing2")); //$NON-NLS-1$
- return false;
- }
- }
- final PendingChange job;
-
-
- if (latestOldFeature != null)
- job = new PendingChange(latestOldFeature, feature);
- else
- job = new PendingChange(feature, PendingChange.INSTALL);
-
- shell.getDisplay().asyncExec(new Runnable() {
- public void run() {
- DetailsForm.executeJob(shell, job, needLicensePage);
- }
- });
- return true;
- }
-
- private IFeature findLatestOldFeature(IFeature feature) {
- IFeature[] oldFeatures = UpdateUI.getInstalledFeatures(feature);
- if (oldFeatures.length == 0)
- return null;
-
- IFeature latest = null;
- for (int i = 0; i < oldFeatures.length; i++) {
- IFeature curr = oldFeatures[i];
- if (latest == null
- || curr.getVersionedIdentifier().getVersion().isGreaterThan(
- latest.getVersionedIdentifier().getVersion())) {
- latest = curr;
- }
- }
- return latest;
- }
-}
diff --git a/update/org.eclipse.update.ui/src_webapp/org/eclipse/update/internal/ui/servlets/ServletsUtil.java b/update/org.eclipse.update.ui/src_webapp/org/eclipse/update/internal/ui/servlets/ServletsUtil.java
deleted file mode 100644
index 720f5c9..0000000
--- a/update/org.eclipse.update.ui/src_webapp/org/eclipse/update/internal/ui/servlets/ServletsUtil.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.update.internal.ui.servlets;
-
-import java.io.*;
-import java.util.Enumeration;
-
-import javax.servlet.http.*;
-
-import org.eclipse.core.boot.BootLoader;
-import org.eclipse.update.internal.ui.UpdateUI;
-
-/**
- * @author dejan
- *
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates.
- * To enable and disable the creation of type comments go to
- * Window>Preferences>Java>Code Generation.
- */
-public class ServletsUtil {
-
- public static String getServerInfo(HttpServletRequest servletRequest) {
- String host = servletRequest.getServerName();
- int port = servletRequest.getServerPort();
- String context = servletRequest.getContextPath();
-
- Enumeration atts = servletRequest.getParameterNames();
- StringBuffer buff = new StringBuffer();
- for (; atts.hasMoreElements();) {
- String attName = (String) atts.nextElement();
- Object attValue = servletRequest.getParameter(attName);
- buff.append(attName + "=" + "\"" + attValue + "\"+"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- return host + ":" + port + context + "?" + buff.toString(); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- public static PrintWriter createResponsePrologue(HttpServletResponse response)
- throws IOException {
- response.setContentType("text/html"); //$NON-NLS-1$
- PrintWriter writer = response.getWriter();
- String title = UpdateUI.getString("ServletsUtil.responseTitle"); //$NON-NLS-1$
- writer.println(
- "" //$NON-NLS-1$
- + "<!DOCTYPE HTML PUBLIC \" -//W3C//DTD HTML 4.0 Transitional//EN\">" //$NON-NLS-1$
- + "\n <HTML> \n <HEAD> \n" //$NON-NLS-1$
- + "<TITLE>"+title+"</TITLE>\n" //$NON-NLS-1$ //$NON-NLS-2$
- + "<META http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n" //$NON-NLS-1$
- + "</HEAD>"); //$NON-NLS-1$
- writer.println(" <BODY topmargin=\"0\" leftmargin=\"0\">"); //$NON-NLS-1$
- return writer;
- }
-
- public static void createError(
- PrintWriter writer,
- String problem,
- String resolution) {
- createHeading(writer, UpdateUI.getString("ServletsUtil.updateFailed")); //$NON-NLS-1$
- startTextArea(writer);
- createParagraph(writer, UpdateUI.getString("ServletsUtil.problem"), problem); //$NON-NLS-1$
- if (resolution != null) {
- writer.println("<p>"); //$NON-NLS-1$
- createParagraph(writer, UpdateUI.getString("ServletsUtil.whatToDo"), resolution); //$NON-NLS-1$
- }
- endTextArea(writer);
- }
-
- public static void createParagraph(
- PrintWriter writer,
- String heading,
- String text) {
- writer.print("<b><font color=\"#5B78AC\">"); //$NON-NLS-1$
- writer.print(heading);
- writer.println("</b></font><br>"); //$NON-NLS-1$
- writer.println(text);
- }
-
- public static void createInfo(PrintWriter writer) {
- createHeading(writer, UpdateUI.getString("ServletsUtil.updateInProgress")); //$NON-NLS-1$
- startTextArea(writer);
- writer.println(
- UpdateUI.getString("ServletsUtil.updateInitiated")); //$NON-NLS-1$
- endTextArea(writer);
- }
-
- private static boolean isWin32() {
- return BootLoader.getWS().equals("win32"); //$NON-NLS-1$
- }
-
- private static void startTextArea(PrintWriter writer) {
- writer.println(
- "<table border=\"0\" width=\"100%\" cellspacing=\"5\" cellpadding=\"5\">"); //$NON-NLS-1$
- writer.println("<tr>"); //$NON-NLS-1$
- writer.print("<td width=\"100%\">"); //$NON-NLS-1$
- if (isWin32())
- writer.println("<font face=\"MS Sans Serif\" size=\"1\">"); //$NON-NLS-1$
- else
- writer.println(""); //$NON-NLS-1$
- }
- private static void endTextArea(PrintWriter writer) {
- if (isWin32())
- writer.println("</font>"); //$NON-NLS-1$
- writer.println("</td>"); //$NON-NLS-1$
- writer.println("</tr>"); //$NON-NLS-1$
- writer.println("</table>"); //$NON-NLS-1$
- }
-
- public static void createHeading(PrintWriter writer, String title) {
- writer.println(
- "<table cols=1 width=\"588\" cellspacing=\"0\" cellpadding=\"0\">"); //$NON-NLS-1$
- writer.println("<tr>"); //$NON-NLS-1$
- writer.println(
- "<td background=\"images/form_banner.jpg\" width=\"580\" height=\"30\">"); //$NON-NLS-1$
- writer.print("<p><b><font size=\"3\" face=\"Tahoma\"> "); //$NON-NLS-1$
- writer.print(title);
- writer.println("</font></b></p>"); //$NON-NLS-1$
- writer.println("</td>"); //$NON-NLS-1$
- writer.println("</tr>"); //$NON-NLS-1$
-
- writer.println("<tr>"); //$NON-NLS-1$
- writer.println(
- "<td width=\"580\"><img border=\"0\" src=\"images/form_underline.jpg\" width=\"600\" height=\"15\"></td>"); //$NON-NLS-1$
- writer.println("</td>"); //$NON-NLS-1$
- writer.println("</tr>"); //$NON-NLS-1$
- writer.println("</table>"); //$NON-NLS-1$
- }
-
- public static void createResponseEpilogue(
- HttpServletRequest request,
- HttpServletResponse response,
- PrintWriter writer) {
-
- String backURL = getOriginatingURL(request);
- if (backURL != null) {
- startTextArea(writer);
- String backText = UpdateUI.getString("ServletsUtil.back"); //$NON-NLS-1$
- writer.print("<img border=\"0\" src=\"images/backward_nav.gif\"/><a href=\""); //$NON-NLS-1$
- writer.print(getOriginatingURL(request));
- writer.print("\">"+backText+"</a>"); //$NON-NLS-1$ //$NON-NLS-2$
- endTextArea(writer);
- }
- writer.println(" </BODY> "); //$NON-NLS-1$
- writer.println("</HTML>"); //$NON-NLS-1$
- writer.close();
- }
- private static String getOriginatingURL(HttpServletRequest request) {
- return request.getParameter("backURL"); //$NON-NLS-1$
- }
-}
\ No newline at end of file
diff --git a/update/org.eclipse.update.ui/webapp/WEB-INF/.cvsignore b/update/org.eclipse.update.ui/webapp/WEB-INF/.cvsignore
deleted file mode 100644
index 90b07e9..0000000
--- a/update/org.eclipse.update.ui/webapp/WEB-INF/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-classes
diff --git a/update/org.eclipse.update.ui/webapp/WEB-INF/lib/.cvsignore b/update/org.eclipse.update.ui/webapp/WEB-INF/lib/.cvsignore
deleted file mode 100644
index 64292a3..0000000
--- a/update/org.eclipse.update.ui/webapp/WEB-INF/lib/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-update-servlets.jar
diff --git a/update/org.eclipse.update.ui/webapp/WEB-INF/web.xml b/update/org.eclipse.update.ui/webapp/WEB-INF/web.xml
deleted file mode 100644
index ff84774..0000000
--- a/update/org.eclipse.update.ui/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-
-
-<!DOCTYPE web-app
- PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
- "http://java.sun.com/j2ee/dtds/web-app_2.2.dtd">
-
-<web-app>
-
- <servlet>
- <servlet-name>install</servlet-name>
- <servlet-class>org.eclipse.update.internal.ui.servlets.InstallServlet</servlet-class>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>install</servlet-name>
- <url-pattern>/install</url-pattern>
- </servlet-mapping>
-
-</web-app>
\ No newline at end of file
diff --git a/update/org.eclipse.update.ui/webapp/images/backward_nav.gif b/update/org.eclipse.update.ui/webapp/images/backward_nav.gif
deleted file mode 100644
index 85188b7..0000000
--- a/update/org.eclipse.update.ui/webapp/images/backward_nav.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/webapp/images/form_banner.jpg b/update/org.eclipse.update.ui/webapp/images/form_banner.jpg
deleted file mode 100644
index 253e2d2..0000000
--- a/update/org.eclipse.update.ui/webapp/images/form_banner.jpg
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui/webapp/images/form_underline.jpg b/update/org.eclipse.update.ui/webapp/images/form_underline.jpg
deleted file mode 100644
index 0ff3d0b..0000000
--- a/update/org.eclipse.update.ui/webapp/images/form_underline.jpg
+++ /dev/null
Binary files differ