[jbosstools-commits] JBoss Tools SVN: r30932 - in trunk/cdi: tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/search and 1 other directory.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Thu Apr 28 15:25:56 EDT 2011


Author: dazarov
Date: 2011-04-28 15:25:56 -0400 (Thu, 28 Apr 2011)
New Revision: 30932

Modified:
   trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/search/CDIBeanQueryParticipant.java
   trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/search/CDISearchParticipantTest.java
Log:
JBIDE-8799, JBIDE-8705

Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/search/CDIBeanQueryParticipant.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/search/CDIBeanQueryParticipant.java	2011-04-28 19:15:54 UTC (rev 30931)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/search/CDIBeanQueryParticipant.java	2011-04-28 19:25:56 UTC (rev 30932)
@@ -31,7 +31,6 @@
 import org.eclipse.search.ui.text.Match;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.editors.text.TextFileDocumentProvider;
 import org.jboss.tools.cdi.core.CDICoreNature;
 import org.jboss.tools.cdi.core.CDICorePlugin;
 import org.jboss.tools.cdi.core.IBean;
@@ -81,7 +80,11 @@
 				monitor.beginTask(CDIUIMessages.CDI_BEAN_QUERY_PARTICIPANT_TASK, beans.length);
 				
 				for(IBean bean : beans){
+					if(monitor.isCanceled())
+						break;
+					
 					monitor.worked(1);
+					
 					Set<IInjectionPoint> injectionPoints = bean.getInjectionPoints();
 					
 					for(IInjectionPoint injectionPoint : injectionPoints){
@@ -95,6 +98,7 @@
 						}
 					}
 				}
+				monitor.done();
 			}
 		}
 	}
@@ -115,19 +119,9 @@
 
 	@Override
 	public IMatchPresentation getUIParticipant() {
-		//return null;
 		return new CDIBeanMatchPresentation();
 	}
 	
-	TextFileDocumentProvider provider=null;
-	
-	private TextFileDocumentProvider getDocumentProvider(){
-		if(provider == null){
-			provider = new TextFileDocumentProvider();
-		}
-		return provider;
-	}
-	
 	class CDIBeanMatchPresentation implements IMatchPresentation{
 
 		@Override

Modified: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/search/CDISearchParticipantTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/search/CDISearchParticipantTest.java	2011-04-28 19:15:54 UTC (rev 30931)
+++ trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/search/CDISearchParticipantTest.java	2011-04-28 19:25:56 UTC (rev 30932)
@@ -19,7 +19,6 @@
 import org.eclipse.jdt.ui.search.ISearchRequestor;
 import org.eclipse.jdt.ui.search.QuerySpecification;
 import org.eclipse.search.ui.text.Match;
-import org.eclipse.ui.IMarkerResolution;
 import org.jboss.tools.cdi.core.ICDIElement;
 import org.jboss.tools.cdi.core.test.tck.TCKTest;
 import org.jboss.tools.cdi.internal.core.impl.ClassBean;
@@ -92,12 +91,12 @@
 		for(Match match : matchesForCheck){
 			assertTrue("Match must be CDIMatch", match instanceof CDIMatch);
 			MatchStructure ms = findMatch(matchList, (CDIMatch)match);
-			assertNotNull("Unexpected mutch found (class - "+((CDIMatch)match).getCDIElement().getClass()+" label - "+((CDIMatch)match).getLabel()+")", ms);
+			assertNotNull("Unexpected mutch found (class - "+((CDIMatch)match).getCDIElement().getClass()+" name - "+((CDIMatch)match).getLabel()+")", ms);
 			ms.checked = true;
 		}
 		
 		for(MatchStructure ms : matchList){
-			assertTrue("Match not found (class - "+ms.type+" label - "+ms.name, ms.checked);
+			assertTrue("Match not found (class - "+ms.type+" name - "+ms.name, ms.checked);
 		}
 	}
 	



More information about the jbosstools-commits mailing list