Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 177679 Details for
Bug 310972
[target] Allow to garbage collect bundle pool via the target editor
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch which adds a GC button to the preference page
310972_pool_garbage_collect.patch (text/plain), 10.64 KB, created by
Gunnar Wagenknecht
on 2010-08-29 04:52:04 EDT
(
hide
)
Description:
Patch which adds a GC button to the preference page
Filename:
MIME Type:
Creator:
Gunnar Wagenknecht
Created:
2010-08-29 04:52:04 EDT
Size:
10.64 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.pde.ui >Index: src/org/eclipse/pde/internal/ui/PDEUIMessages.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/PDEUIMessages.java,v >retrieving revision 1.483 >diff -u -r1.483 PDEUIMessages.java >--- src/org/eclipse/pde/internal/ui/PDEUIMessages.java 19 May 2010 13:23:55 -0000 1.483 >+++ src/org/eclipse/pde/internal/ui/PDEUIMessages.java 29 Aug 2010 08:50:32 -0000 >@@ -2722,6 +2722,8 @@ > > public static String TargetPlatformPreferencePage2_9; > >+ public static String TargetPlatformPreferencePage2_29; >+ > public static String ManifestEditorContributor_externStringsActionName; > > public static String MultiFixResolution_JavaFixAll; >Index: src/org/eclipse/pde/internal/ui/pderesources.properties >=================================================================== >RCS file: /cvsroot/eclipse/pde/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/pderesources.properties,v >retrieving revision 1.1145 >diff -u -r1.1145 pderesources.properties >--- src/org/eclipse/pde/internal/ui/pderesources.properties 19 May 2010 16:17:51 -0000 1.1145 >+++ src/org/eclipse/pde/internal/ui/pderesources.properties 29 Aug 2010 08:50:35 -0000 >@@ -644,7 +644,7 @@ > ExternalizeStringsWizardPage_subKey=Substitution Key > ExternalizeStringsResolution_label=Open Externalize Strings Wizard... > ExternalizeStringsWizardPage_keyDuplicateError=New key may not be a duplicate of another key >-ExternalizeStringsWizardPage_keySuggested=\n\tsuggested key value: >+ExternalizeStringsWizardPage_keySuggested=\n\tsuggested key value: > > Preferences_TargetEnvironmentPage_os = &Operating System: > Preferences_TargetEnvironmentPage_ws = &Windowing System: >@@ -990,7 +990,7 @@ > > NewSchemaFileMainPage_missingPluginID = Specify a valid plug-in ID. No Plug-in ID specified. > NewSchemaFileMainPage_nonExistingPluginID = Specify a valid plug-in ID. Specified plug-in ID does not exist. >-NewSchemaFileMainPage_externalPluginID = Specify a valid plug-in ID. Specified plug-in ID is external to the workspace. >+NewSchemaFileMainPage_externalPluginID = Specify a valid plug-in ID. Specified plug-in ID is external to the workspace. > NewSchemaFileMainPage_missingContainer = Specify a valid container. No container specified. > NewSchemaFileMainPage_invalidContainer = Specify a valid container. Specified container is not a valid project or folder. > NewSchemaFileMainPage_nonExistingContainer = Specify a valid container. Specified container does not exist. >@@ -1214,7 +1214,7 @@ > EditorUtilities_noImageData=The specified file contains no image data > EditorPreferencePage_tag=Tags > EditorPreferencePage_xml=&XML Highlighting >-EditorUtilities_icoError=The specified ICO file is missing images: >+EditorUtilities_icoError=The specified ICO file is missing images: > EditorPreferencePage_comment=Comments > EditorPreferencePage_manifest=&Manifest Highlighting > EditorUtilities_incorrectSize=The specified image is not the correct size: {0}. >@@ -1459,7 +1459,7 @@ > compilers_p_not_externalized_att = Usage of non-externali&zed strings: > compilers_p_deprecated = Usage of deprecated attributes and &elements: > compilers_p_internal = Usage o&f internal extension points: >-compilers_p_exported_pkgs = Missing exported pac&kages: >+compilers_p_exported_pkgs = Missing exported pac&kages: > compilers_p_missing_exp_pkg = Missing versions on exported packages: > compilers_p_missing_imp_pkg = Missing versions on imported packages: > compilers_p_missing_require_bundle = Missing versions on required bundles: >@@ -1571,7 +1571,7 @@ > ExportTargetExportPlugins = Exporting plugins... > ExportActiveTargetDefinition = Export Active Target Definition > ExportActiveTargetDefinition_message = Please choose a destination directory to export all target content >-ExportTargetCurrentTarget = Active &Target: >+ExportTargetCurrentTarget = Active &Target: > ExportTargetChooseFolder = &Destination: > ExportTargetBrowse = &Browse... > ExportTargetSelectDestination = Select Destination >@@ -1813,6 +1813,7 @@ > TargetPlatformPreferencePage2_7=&Remove > TargetPlatformPreferencePage2_8=Error > TargetPlatformPreferencePage2_9=Unable to set workspace target platform >+TargetPlatformPreferencePage2_29=&Pool Clean Up > EnvironmentBlock_jreTitle=Java Runtime Environment > EnvironmentSection_locale=Locale: > EnvironmentPage_title=Environment >@@ -2040,7 +2041,7 @@ > InternationalizeWizard_LocalePage_availableList = Available locales: > InternationalizeWizard_LocalePage_filter = Filter available locales: > InternationalizeWizard_LocalePage_selectionError=At least one locale must be selected. >-InternationalizeWizard_NLSFragmentGenerator_overwriteTitle = Confirm Overwrite >+InternationalizeWizard_NLSFragmentGenerator_overwriteTitle = Confirm Overwrite > InternationalizeWizard_NLSFragmentGenerator_overwriteMessage = A fragment project with the name "{0}" already exists. Overwrite? > InternationalizeWizard_NLSFragmentGenerator_errorMessage = An error occured while generating an NL Fragment. > >@@ -2103,7 +2104,7 @@ > OrganizeManifestsWizardPage_errorMsg=This function works only on plug-ins containing a MANIFEST.MF > OrganizeManifestsWizardPage_prefixNL=&Prefix icon paths in plug-in extensions with an $nl$ segment > OrganizeManifestsOperation_nlIconPath=checking icon paths for missing $nl$ segments... {0} >-OrganizeManifestsOperation_unusedKeys=checking for unused keys... {0} >+OrganizeManifestsOperation_unusedKeys=checking for unused keys... {0} > OrganizeManifestsWizardPage_addMissing=&Ensure that all packages appear in the MANIFEST.MF > OrganizeManifestsProcessor_rootMessage=Organize Manifest for {0} > OrganizeManifestsWizardPage_lazyStart=Remove unnecessary lazy activation headers >@@ -2284,7 +2285,7 @@ > RemoveSplashHandlerBindingAction_msgProgressRemoveProductBindings=Removing product bindings from extension ''{0}'' ... > StateViewPage_requiredBundles=Required Plug-ins > StateViewPage_importedPackages=Imported Packages >-StateViewPage_suppliedBy=\ - supplied by: >+StateViewPage_suppliedBy=\ - supplied by: > StateViewPage_suppliedByJRE=\ - supplied by the JRE > StateViewPage_showLeaves=Show leaf plug-ins > StateViewPage_openItem=Open >Index: src/org/eclipse/pde/internal/ui/preferences/TargetPlatformPreferencePage.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/preferences/TargetPlatformPreferencePage.java,v >retrieving revision 1.101 >diff -u -r1.101 TargetPlatformPreferencePage.java >--- src/org/eclipse/pde/internal/ui/preferences/TargetPlatformPreferencePage.java 23 Apr 2010 21:00:27 -0000 1.101 >+++ src/org/eclipse/pde/internal/ui/preferences/TargetPlatformPreferencePage.java 29 Aug 2010 08:50:35 -0000 >@@ -41,6 +41,7 @@ > import org.eclipse.swt.layout.GridData; > import org.eclipse.swt.widgets.*; > import org.eclipse.ui.*; >+import org.eclipse.ui.progress.IProgressService; > import org.osgi.framework.Version; > > /** >@@ -172,6 +173,7 @@ > //private Button fDuplicateButton; > private Button fRemoveButton; > private Button fMoveButton; >+ private Button fGarbeCollectButton; > > // Text displaying additional information > private TableViewer fDetails; >@@ -182,7 +184,7 @@ > private List fTargets = new ArrayList(); > > /** >- * Removed definitions (to be removed on apply) >+ * Removed definitions (to be removed on apply) > */ > private List fRemoved = new ArrayList(); > >@@ -211,6 +213,8 @@ > */ > private Composite fWarningComp; > >+ private IProgressService progressService; >+ > /* (non-Javadoc) > * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite) > */ >@@ -335,6 +339,13 @@ > } > }); > >+ fGarbeCollectButton = SWTFactory.createPushButton(buttonComposite, PDEUIMessages.TargetPlatformPreferencePage2_29, null); >+ fGarbeCollectButton.addSelectionListener(new SelectionAdapter() { >+ public void widgetSelected(SelectionEvent e) { >+ handleGarbageCollect(); >+ } >+ }); >+ > updateButtons(); > > Composite detailsComposite = SWTFactory.createComposite(comp, 1, 1, GridData.FILL_HORIZONTAL, 0, 0); >@@ -573,6 +584,18 @@ > } > > /** >+ * Garbage collect bundle pool. >+ */ >+ private void handleGarbageCollect() { >+ ITargetPlatformService service = getTargetService(); >+ if (null != service && null != progressService) { >+ Job garbageCollectJob = createGarbageCollectJob(service); >+ progressService.showInDialog(getShell(), garbageCollectJob); >+ garbageCollectJob.schedule(); >+ } >+ } >+ >+ /** > * Update enabled state of buttons > */ > protected void updateButtons() { >@@ -588,10 +611,11 @@ > fMoveButton.setEnabled(false); > fReloadButton.setEnabled(false); > } >+ fGarbeCollectButton.setEnabled(size >= 0); > } > > /** >- * Updates the details text box with information about the currently selected target >+ * Updates the details text box with information about the currently selected target > */ > protected void updateDetails() { > IStructuredSelection selection = (IStructuredSelection) fTableViewer.getSelection(); >@@ -605,7 +629,7 @@ > /** > * Returns the target platform service or <code>null</code> if the service could > * not be acquired. >- * >+ * > * @return target platform service or <code>null</code> > */ > private ITargetPlatformService getTargetService() { >@@ -621,6 +645,7 @@ > if (!manager.isInitialized()) { > manager.getExternalModelManager(); > } >+ progressService = (IProgressService) workbench.getService(IProgressService.class); > } > > /* (non-Javadoc) >@@ -820,17 +845,20 @@ > updateButtons(); > // start job to do GC > if (gc) { >- final TargetPlatformService finalService = (TargetPlatformService) service; >- Job job = new Job(PDEUIMessages.TargetPlatformPreferencePage2_26) { >- protected IStatus run(IProgressMonitor monitor) { >- monitor.beginTask(PDEUIMessages.TargetPlatformPreferencePage2_27, IProgressMonitor.UNKNOWN); >- finalService.garbageCollect(); >- monitor.done(); >- return Status.OK_STATUS; >- } >- }; >- job.schedule(); >+ createGarbageCollectJob(service).schedule(); > } > return super.performOk(); > } >+ >+ private Job createGarbageCollectJob(ITargetPlatformService service) { >+ final TargetPlatformService finalService = (TargetPlatformService) service; >+ return new Job(PDEUIMessages.TargetPlatformPreferencePage2_26) { >+ protected IStatus run(IProgressMonitor monitor) { >+ monitor.beginTask(PDEUIMessages.TargetPlatformPreferencePage2_27, IProgressMonitor.UNKNOWN); >+ finalService.garbageCollect(); >+ monitor.done(); >+ return Status.OK_STATUS; >+ } >+ }; >+ } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 310972
:
166477
| 177679