Community
Participate
Working Groups
I have created a RAP application that implements a standard eclipse SAVE action and an EditorPart. Inside the doSave() method if i use an IRunnableWithProgress for a long operation, the menu items (eg File) correctly disable but then fail to re-enable after the progress dialog dissapears. I have tested this in normal RCP and it works correctly. I have also checked an EMF editor that i was working on it and it uses very similar code. Am i doing something wrong? It looks as if the dialog is blocking the menu enablement. This has been tested with 1.1 M2 @Override public void doSave(IProgressMonitor progressMonitor) { // Do the work within an operation because this is a long running activity that modifies the workbench. // IRunnableWithProgress operation = new IRunnableWithProgress() { // This is the method that gets invoked when the operation runs. // public void run(IProgressMonitor monitor) { // Do long operation // for( int i = 0; i < 1000000; i++ ) { System.out.println("Print this"); } } }; try { // // This runs the options, and shows progress. // new ProgressMonitorDialog(getSite().getShell()).run(true, false, operation); PlatformUI.getWorkbench().getProgressService().busyCursorWhile( operation ); ((BasicCommandStack)editingDomain.getCommandStack()).saveIsDone(); firePropertyChange(IEditorPart.PROP_DIRTY); } catch(Exception e) { e.printStackTrace(); } }
Matt, in 1.2M7 we fixed a bug 245100. Can you check if the issue persist with the latest milestone build or CVS HEAD?
Matt, I cannot reproduce this issue with your snippet. Marking this as WORKSFORME. If you still encounter problems, please reopen with a snippet.