Community
Participate
Working Groups
M7 The WizardNewFileCreationPage creates a WorkspaceModifyOperation when it creates the file. There should be two changes 1) The file creation code should be moved to a job with locks for just the parent 2) It should be refactored into a protected method for subclassing by other applications. Here is the offending code: WorkspaceModifyOperation op = new WorkspaceModifyOperation() { protected void execute(IProgressMonitor monitor) throws CoreException, InterruptedException { try { monitor.beginTask (IDEWorkbenchMessages.getString("WizardNewFileCreationPage.progress"), 2000); //$NON-NLS-1$ ContainerGenerator generator = new ContainerGenerator(containerPath); generator.generateContainer(new SubProgressMonitor(monitor, 1000)); createFile(newFileHandle,initialContents, new SubProgressMonitor(monitor, 1000)); } finally { monitor.done(); } } }; Issues: 1) Need to create a lock 2) Need to run the progress in the progress part until the job is done. This is a good test case for our general wizards strategy.
Created attachment 7895 [details] Patch with initial refactoring
This should be just a matter for passing an appropriate scheduling rule to the WorkspaceModifyOperation constructor. Use IResourceRuleFactory.createRule(resource) to obtain an appropriate scheduling rule.
Not on the 3.0 plan
Reopening now that 3.0 has shipped
The current code uses an appropriate scheduling rule. This code was all rewritten by Susan when adding support for resource undo in 3.3, and it uses appropriate scheduling rules.