Author: dazarov
Date: 2011-11-03 12:57:25 -0400 (Thu, 03 Nov 2011)
New Revision: 36161
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/xpl/AddQualifiersToBeanComposite.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/wizard/xpl/AddQualifiersToBeanComposite.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/xpl/AddQualifiersToBeanComposite.java 2011-11-03
12:52:28 UTC (rev 36160)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/xpl/AddQualifiersToBeanComposite.java 2011-11-03
16:57:25 UTC (rev 36161)
@@ -18,6 +18,7 @@
import java.util.HashSet;
import java.util.Iterator;
+import org.eclipse.core.internal.resources.Workspace;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.jobs.IJobChangeEvent;
@@ -448,16 +449,14 @@
PlatformUI.getWorkbench().getProgressService().busyCursorWhile(new
IRunnableWithProgress(){
public void run(IProgressMonitor monitor)
throws InvocationTargetException, InterruptedException {
- monitor.beginTask(CDICoreMessages.CDI_UTIL_BUILD_CDI_MODEL, 10);
- monitor.worked(3);
-
- try {
+ Job autoBuildJob = null;
+ Job[] jobs = Job.getJobManager().find(ResourcesPlugin.FAMILY_AUTO_BUILD);
+ for(Job j : jobs){
+ autoBuildJob = j;
+ }
+ if(autoBuildJob != null && autoBuildJob.getState() == Job.RUNNING){
Job.getJobManager().join(ResourcesPlugin.FAMILY_AUTO_BUILD, null);
- } catch (InterruptedException e) {
- // do nothing
}
-
- monitor.worked(7);
}
});
}catch(InterruptedException ie){