Bug 63607 - Modal progress improvements round two
Summary: Modal progress improvements round two
Status: RESOLVED INVALID
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: PDE-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: polish
Depends on: 63854
Blocks:
  Show dependency tree
 
Reported: 2004-05-23 16:48 EDT by Erich Gamma CLA
Modified: 2011-06-07 16:02 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Erich Gamma CLA 2004-05-23 16:48:11 EDT
see bug# 63604 

The following fork=false cases should be converted. Notice, that 
IProgressService.runInUI will make this straightforward, i.e., no need to 
change existing logic.
* BaseBuildAction
* EditorBuildFeatureAction
* IncludeFeaturesWizardPage
* ReferenceWizardPage
* RequiredFeatuesWizardPage
* SynchronizeVersionsAction
* SynchronizeVersionsWizardPage
* JavaAttributeWizard
* PluginExportAction
* RequiresSection
* BuildFeaturesWizardPage
* PluginsView
* NewExtensionsPointMainPage
* NewExtensionTemplateWizard
* NewSchemaFileMainPage
* NewFeaturePatchWizard
* NewFeatureProjectWizard
* NewFragmentProjectWizard
* NewPluginProjectWizard
* NewSiteProjectWizard
Comment 1 Erich Gamma CLA 2004-05-25 06:57:47 EDT
runInUI has issues when used from a WizardPage or a modal dialog in general. 
This needs further investigation, therefore don't change anything yet.
Comment 2 Erich Gamma CLA 2004-05-26 13:51:02 EDT
The issue with runInUI is about to be resolved (bug# 63854).
Once this fix is released you can go ahead with the conversion.

Here is the snippet for converting "false, false" when called from a wizard,  
where you cannot give a more specific scheduling rule: 
PlatformUI.getWorkbench().getProgressService().runInUI(getContainer(),    
     runnable, ResourcesPlugin.getWorkspace().getRoot());

However, even more important, here is how you can test whether the conversion 
has worked.
1) checkout org.eclipse.ui.examples.jobs.ProgressExamplesPlugin from
the dev.eclipse.org repository
2) open the Progress examples>job factory view
3) increase the duration to 1 minute
4) check lock the workspace
5) create the job
6) run your operation
->the operation will be blocked by the job you have created above and you 
should get a Blocked Jobs Dialog.
Comment 3 Dejan Glozic CLA 2004-05-26 15:41:19 EDT
The code above only makes sense inside a wizard. Remember, in phase one we 
converted the code that had ProgressMonitorDialog. We lost the dialog so that 
my code in one example looks like this:

	try {
		PlatformUI.getWorkbench().getProgressService().run(false, 
false, op);			
	} catch (InterruptedException e) {
	} catch (InvocationTargetException e) {
		PDEPlugin.logException(e);
	}

No container. Where do I find runnable context in this case?
Comment 4 Erich Gamma CLA 2004-05-26 15:57:56 EDT
You have two options:
1) the IProgressService is itself a runnable context:
PlatformUI.getWorkbench().getProgressService()
2) use the active workbench window 
...getWorkbench().getActiveWorkbenchWindow()

Option 1) will always show a progress dialog (no delay before show). This 
means you can get progress flicker if the operation is short running.
The progress monitor in the ApplicationWindow shows up after a delay and in 
JDT we therefore prefer option 2)
Comment 5 Chris Aniszczyk CLA 2007-01-02 16:07:16 EST
went through some areas, areas left are:

* PluginsView
* NewExtensionsPointMainPage
* NewExtensionTemplateWizard
* NewSchemaFileMainPage
* NewFeaturePatchWizard
* NewFeatureProjectWizard
* NewFragmentProjectWizard
* NewPluginProjectWizard
* NewSiteProjectWizard
Comment 6 Curtis Windatt CLA 2011-06-07 16:02:03 EDT
This bug is too out of date and will not be fixed.  Closing as INVALID.