[jbosstools-commits] JBoss Tools SVN: r22985 - in trunk/cdi/plugins: org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink and 1 other directory.
jbosstools-commits at lists.jboss.org
jbosstools-commits at lists.jboss.org
Thu Jun 24 07:40:34 EDT 2010
Author: dazarov
Date: 2010-06-24 07:40:34 -0400 (Thu, 24 Jun 2010)
New Revision: 22985
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIUtil.java
trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/InjectedPointHyperlinkDetector.java
trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/ProducerDisposerHyperlinkDetector.java
Log:
https://jira.jboss.org/browse/JBIDE-6445
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIUtil.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIUtil.java 2010-06-24 10:12:38 UTC (rev 22984)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIUtil.java 2010-06-24 11:40:34 UTC (rev 22985)
@@ -726,20 +726,24 @@
public static CDICoreNature getCDINatureWithProgress(final IProject project){
cdiNature = null;
- try{
- 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);
- cdiNature = CDICorePlugin.getCDI(project, true);
- }
-
- });
- }catch(InterruptedException ie){
- CDICorePlugin.getDefault().logError(ie);
- }catch(InvocationTargetException ite){
- CDICorePlugin.getDefault().logError(ite);
+ cdiNature = CDICorePlugin.getCDI(project, false);
+ if(cdiNature != null && !cdiNature.isStorageResolved()){
+ try{
+ 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);
+ cdiNature.resolve();
+ monitor.worked(7);
+ }
+
+ });
+ }catch(InterruptedException ie){
+ CDICorePlugin.getDefault().logError(ie);
+ }catch(InvocationTargetException ite){
+ CDICorePlugin.getDefault().logError(ite);
+ }
}
return cdiNature;
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/InjectedPointHyperlinkDetector.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/InjectedPointHyperlinkDetector.java 2010-06-24 10:12:38 UTC (rev 22984)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/InjectedPointHyperlinkDetector.java 2010-06-24 11:40:34 UTC (rev 22985)
@@ -74,8 +74,7 @@
if(file == null)
return null;
- //CDICoreNature cdiNature = CDIUtil.getCDINatureWithProgress(file.getProject());
- CDICoreNature cdiNature = CDICorePlugin.getCDI(file.getProject(), true);
+ CDICoreNature cdiNature = CDIUtil.getCDINatureWithProgress(file.getProject());
if(cdiNature == null)
return null;
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/ProducerDisposerHyperlinkDetector.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/ProducerDisposerHyperlinkDetector.java 2010-06-24 10:12:38 UTC (rev 22984)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/ProducerDisposerHyperlinkDetector.java 2010-06-24 11:40:34 UTC (rev 22985)
@@ -135,8 +135,7 @@
}
private Set<IBean> getBeans(IFile file){
- //CDICoreNature cdiNature = CDIUtil.getCDINatureWithProgress(file.getProject());
- CDICoreNature cdiNature = CDICorePlugin.getCDI(file.getProject(), true);
+ CDICoreNature cdiNature = CDIUtil.getCDINatureWithProgress(file.getProject());
if(cdiNature == null)
return null;
More information about the jbosstools-commits
mailing list