Author: dazarov
Date: 2011-11-18 12:38:06 -0500 (Fri, 18 Nov 2011)
New Revision: 36451
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/refactoring/CDIRefactoringProcessor.java
Log:
Quickfix and Wizard for fixing ambigious injection warning is confusing
https://issues.jboss.org/browse/JBIDE-9940
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/refactoring/CDIRefactoringProcessor.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/refactoring/CDIRefactoringProcessor.java 2011-11-18
17:19:53 UTC (rev 36450)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/refactoring/CDIRefactoringProcessor.java 2011-11-18
17:38:06 UTC (rev 36451)
@@ -185,24 +185,25 @@
super.releaseDocument(document, pm);
final IEditorPart editor = getEditor(getFile());
-
- IRunnableContext context = new ProgressMonitorDialog(editor.getSite().getShell());
-
- IRunnableWithProgress resolutionsRunnable = new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) {
- IEditorPart editor = getEditor(getFile());
- if(editor != null){
- editor.doSave(new NullProgressMonitor());
+ if(editor != null){
+ IRunnableContext context = new ProgressMonitorDialog(editor.getSite().getShell());
+
+ IRunnableWithProgress resolutionsRunnable = new IRunnableWithProgress() {
+ public void run(IProgressMonitor monitor) {
+ IEditorPart editor = getEditor(getFile());
+ if(editor != null){
+ editor.doSave(new NullProgressMonitor());
+ }
}
+ };
+ try {
+ PlatformUI.getWorkbench().getProgressService().runInUI(context,
+ resolutionsRunnable, null);
+ } catch (InvocationTargetException e) {
+ CDIUIPlugin.getDefault().logError(e);
+ } catch (InterruptedException e) {
+ CDIUIPlugin.getDefault().logError(e);
}
- };
- try {
- PlatformUI.getWorkbench().getProgressService().runInUI(context,
- resolutionsRunnable, null);
- } catch (InvocationTargetException e) {
- CDIUIPlugin.getDefault().logError(e);
- } catch (InterruptedException e) {
- CDIUIPlugin.getDefault().logError(e);
}
}