[jbosstools-commits] JBoss Tools SVN: r43077 - trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Thu Aug 16 14:52:09 EDT 2012


Author: scabanovich
Date: 2012-08-16 14:52:09 -0400 (Thu, 16 Aug 2012)
New Revision: 43077

Modified:
   trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProjectAsYouType.java
Log:
JBIDE-12433
https://issues.jboss.org/browse/JBIDE-12433
As-you-type project implementation currently will be based on the project of the modified file rather than on the root project.

Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProjectAsYouType.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProjectAsYouType.java	2012-08-16 15:00:33 UTC (rev 43076)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProjectAsYouType.java	2012-08-16 18:52:09 UTC (rev 43077)
@@ -83,6 +83,16 @@
 	IInterceptorBinding interceptorBinding;
 
 	public CDIProjectAsYouType(ICDIProject project, IFile file) {
+		if(file.getProject() != project.getNature().getProject()) {
+			/**
+			 * Validation is done in context of the root project, 
+			 * however, at present as-you-type project based on the root project
+			 * appears to be too complicated to implement, so that currently
+			 * it will be based on the project of the file itself.
+			 */
+			ICDIProject p = CDICorePlugin.getCDIProject(file.getProject(), true);
+			if(p != null) project = p;
+		}
 		this.project = project;
 		this.file = file;
 		try {



More information about the jbosstools-commits mailing list