@Override protected void addHyperlinks(List<IHyperlink> hyperlinksCollector, IRegion wordRegion, SelectionDispatchAction openAction, IJavaElement element, boolean qualify, JavaEditor editor) { try { if (element.getElementType() == IJavaElement.FIELD || element.getElementType() == IJavaElement.LOCAL_VARIABLE) { String typeSignature= getTypeSignature(element); if (!JavaModelUtil.isPrimitive(typeSignature) && SelectionConverter.canOperateOn(editor)) { if (Signature.getTypeSignatureKind(typeSignature) == Signature.INTERSECTION_TYPE_SIGNATURE) { String[] bounds= Signature.getIntersectionTypeBounds(typeSignature); qualify|= bounds.length >= 2; for (int i= 0; i < bounds.length; i++) { hyperlinksCollector.add(new JavaElementDeclaredTypeHyperlink(wordRegion, openAction, element, bounds[i], qualify)); } } else { hyperlinksCollector.add(new JavaElementDeclaredTypeHyperlink(wordRegion, openAction, element, qualify)); } } } } catch (JavaModelException e) { JavaPlugin.log(e); } }
@Override protected void addHyperlinks(List<IHyperlink> hyperlinksCollector, IRegion wordRegion, SelectionDispatchAction openAction, IJavaElement element, boolean qualify, JavaEditor editor) { try { if (element.getElementType() == IJavaElement.FIELD || element.getElementType() == IJavaElement.LOCAL_VARIABLE) { String typeSignature= getTypeSignature(element); if (!JavaModelUtil.isPrimitive(typeSignature) && SelectionConverter.canOperateOn(editor)) { if (Signature.getTypeSignatureKind(typeSignature) == Signature.INTERSECTION_TYPE_SIGNATURE) { String[] bounds= Signature.getIntersectionTypeBounds(typeSignature); qualify|= bounds.length >= 2; for (int i= 0; i < bounds.length; i++) { hyperlinksCollector.add(new JavaElementDeclaredTypeHyperlink(wordRegion, openAction, element, bounds[i], qualify)); } } else { hyperlinksCollector.add(new JavaElementDeclaredTypeHyperlink(wordRegion, openAction, element, qualify)); } } } } catch (JavaModelException e) { JavaPlugin.log(e); } }
if (typeSignature == null) { try { typeSignature= JavaElementHyperlinkDeclaredTypeDetector.getTypeSignature(fElement); } catch (JavaModelException e) { JavaPlugin.log(e);
if (typeSignature == null) { try { typeSignature= JavaElementHyperlinkDeclaredTypeDetector.getTypeSignature(fElement); } catch (JavaModelException e) { JavaPlugin.log(e);