Author: dazarov
Date: 2010-01-27 08:40:22 -0500 (Wed, 27 Jan 2010)
New Revision: 19957
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/InjectedPointHyperlinkDetector.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3125
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-01-27
11:06:03 UTC (rev 19956)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/InjectedPointHyperlinkDetector.java 2010-01-27
13:40:22 UTC (rev 19957)
@@ -40,6 +40,7 @@
import org.jboss.tools.cdi.core.IInjectionPoint;
public class InjectedPointHyperlinkDetector extends AbstractHyperlinkDetector{
+ private final static String INJECT_ANNOTATION_NAME = "Inject"; //$NON-NLS-1$
public IHyperlink[] detectHyperlinks(ITextViewer textViewer,
IRegion region, boolean canShowMultipleHyperlinks) {
@@ -97,7 +98,7 @@
for (IJavaElement element : elements) {
if(element instanceof IType){
- if("Inject".equals(element.getElementName())){ //$NON-NLS-1$
+ if(INJECT_ANNOTATION_NAME.equals(element.getElementName())){
ICompilationUnit cUnit = (ICompilationUnit)input;
element = cUnit.getElementAt(wordRegion.getOffset());
if(element == null)
@@ -108,7 +109,7 @@
if (element instanceof IAnnotatable) {
IAnnotatable annotatable = (IAnnotatable)element;
- IAnnotation annotation = annotatable.getAnnotation("Injected");
//$NON-NLS-1$
+ IAnnotation annotation = annotatable.getAnnotation(INJECT_ANNOTATION_NAME);
if (annotation == null)
continue;
IInjectionPoint injectionPoint = CDIUtil.findInjectionPoint(beans, element);