public BestMatchHover() { installTextHovers(); }
public JavaInformationProvider(IEditorPart editor) { if (editor != null) { fImplementation= new BestMatchHover(); fImplementation.setEditor(editor); } }
@Override public Object getInformation2(ITextViewer textViewer, IRegion subject) { if (fImplementation == null) return null; return fImplementation.getHoverInfo2(textViewer, subject, true); }
checkTextHovers(); fBestHover= null; if (info != null && !(forInformationProvider && getInformationPresenterControlCreator(hover) == null)) { fBestHover= hover; return info;
private void checkTextHovers() { if (fTextHoverSpecifications.size() == 0) return; for (Iterator iterator= new ArrayList(fTextHoverSpecifications).iterator(); iterator.hasNext(); ) { JavaEditorTextHoverDescriptor spec= (JavaEditorTextHoverDescriptor) iterator.next(); IJavaEditorTextHover hover= spec.createTextHover(); if (hover != null) { hover.setEditor(getEditor()); addTextHover(hover); fTextHoverSpecifications.remove(spec); } } }
public BestMatchHover(IEditorPart editor) { this(); setEditor(editor); }
public String getHoverInfo(ITextViewer textViewer, IRegion hoverRegion) { checkTextHovers(); fBestHover= null; if (fInstantiatedTextHovers == null) return null; for (Iterator iterator= fInstantiatedTextHovers.iterator(); iterator.hasNext(); ) { ITextHover hover= (ITextHover)iterator.next(); String s= hover.getHoverInfo(textViewer, hoverRegion); if (s != null && s.trim().length() > 0) { fBestHover= hover; return s; } } return null; }
private void checkTextHovers() { if (fTextHoverSpecifications == null) return; boolean done= true; int i= -1; for (Iterator<JavaEditorTextHoverDescriptor> iterator= fTextHoverSpecifications.iterator(); iterator.hasNext();) { i++; JavaEditorTextHoverDescriptor spec= iterator.next(); if (spec == null) continue; done= false; IJavaEditorTextHover hover= spec.createTextHover(); if (hover != null) { hover.setEditor(getEditor()); fTextHoverSpecifications.set(i, null); } if (i == fInstantiatedTextHovers.size()) fInstantiatedTextHovers.add(i, hover); else fInstantiatedTextHovers.set(i, hover); } if (done) fTextHoverSpecifications= null; }
@Override public IInformationControlCreator getInformationPresenterControlCreator() { if (fImplementation == null) return null; return fImplementation.getInformationPresenterControlCreator(); } }
/** * @see IInformationProvider#getInformation(ITextViewer, IRegion) * @deprecated */ @Deprecated @Override public String getInformation(ITextViewer textViewer, IRegion subject) { if (fImplementation != null) { String s= fImplementation.getHoverInfo(textViewer, subject); if (s != null && s.trim().length() > 0) { return s; } } return null; }
checkTextHovers(); fBestHover= null; if (info != null && !(forInformationProvider && getInformationPresenterControlCreator(hover) == null)) { fBestHover= hover; return info;
public BestMatchHover(IEditorPart editor) { this(); setEditor(editor); }
@Override public String getHoverInfo(ITextViewer textViewer, IRegion hoverRegion) { checkTextHovers(); fBestHover= null; if (fInstantiatedTextHovers == null) return null; for (Iterator<IJavaEditorTextHover> iterator= fInstantiatedTextHovers.iterator(); iterator.hasNext(); ) { ITextHover hover= iterator.next(); if (hover == null) continue; String s= hover.getHoverInfo(textViewer, hoverRegion); if (s != null && s.trim().length() > 0) { fBestHover= hover; return s; } } return null; }
private void checkTextHovers() { if (fTextHoverSpecifications == null) return; boolean done= true; int i= -1; for (Iterator<JavaEditorTextHoverDescriptor> iterator= fTextHoverSpecifications.iterator(); iterator.hasNext();) { i++; JavaEditorTextHoverDescriptor spec= iterator.next(); if (spec == null) continue; done= false; IJavaEditorTextHover hover= spec.createTextHover(); if (hover != null) { hover.setEditor(getEditor()); fTextHoverSpecifications.set(i, null); } if (i == fInstantiatedTextHovers.size()) fInstantiatedTextHovers.add(i, hover); else fInstantiatedTextHovers.set(i, hover); } if (done) fTextHoverSpecifications= null; }
@Override public IInformationControlCreator getInformationPresenterControlCreator() { if (fImplementation == null) return null; return fImplementation.getInformationPresenterControlCreator(); } }
/** * @see IInformationProvider#getInformation(ITextViewer, IRegion) * @deprecated */ @Deprecated @Override public String getInformation(ITextViewer textViewer, IRegion subject) { if (fImplementation != null) { String s= fImplementation.getHoverInfo(textViewer, subject); if (s != null && s.trim().length() > 0) { return s; } } return null; }
public JavaInformationProvider(IEditorPart editor) { if (editor != null) { fImplementation= new BestMatchHover(); fImplementation.setEditor(editor); } }
public BestMatchHover(IEditorPart editor) { this(); setEditor(editor); }
public BestMatchHover() { installTextHovers(); }
@Override public String getHoverInfo(ITextViewer textViewer, IRegion hoverRegion) { checkTextHovers(); fBestHover= null; if (fInstantiatedTextHovers == null) return null; for (Iterator<IJavaEditorTextHover> iterator= fInstantiatedTextHovers.iterator(); iterator.hasNext(); ) { ITextHover hover= iterator.next(); if (hover == null) continue; String s= hover.getHoverInfo(textViewer, hoverRegion); if (s != null && s.trim().length() > 0) { fBestHover= hover; return s; } } return null; }