org.eclipse.xtext.ui.editor.hover.IEObjectHoverProvider.IInformationControlCreatorProvider Java Examples
The following examples show how to use
org.eclipse.xtext.ui.editor.hover.IEObjectHoverProvider.IInformationControlCreatorProvider.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: XtextInformationProvider.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
@Override public IInformationControlCreator getInformationPresenterControlCreator() { if(contextObject != null && textViewer != null && contextRegion != null){ IEObjectHoverProvider hoverProvider = serviceProvider.findService(contextObject , IEObjectHoverProvider.class); if (hoverProvider!=null){ IInformationControlCreatorProvider hoverInfo = hoverProvider.getHoverInfo(contextObject, textViewer, contextRegion); if(hoverInfo instanceof IInformationControlCreatorProvider2){ return ((IInformationControlCreatorProvider2)hoverInfo).getInformationPresenterControlCreator(); } } } return null; }
Example #2
Source File: DispatchingEObjectTextHover.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
@Override public Object getHoverInfo(EObject first, ITextViewer textViewer, IRegion hoverRegion) { IEObjectHoverProvider hoverProvider = serviceProvider.findService(first, IEObjectHoverProvider.class); if (hoverProvider==null) return null; IInformationControlCreatorProvider creatorProvider = hoverProvider.getHoverInfo(first, textViewer, hoverRegion); if (creatorProvider==null) return null; this.lastCreatorProvider = creatorProvider; return lastCreatorProvider.getInfo(); }
Example #3
Source File: XbaseDispatchingEObjectTextHover.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
@Override public Object getHoverInfo2(ITextViewer textViewer, IRegion hoverRegion) { IInformationControlCreatorProvider creatorProvider = javaDebugHoverProvider .getInformationControlCreatorProvider(textViewer, hoverRegion); if (creatorProvider != null) { lastCreatorProvider = creatorProvider; return creatorProvider.getInfo(); } return super.getHoverInfo2(textViewer, hoverRegion); }
Example #4
Source File: JavaDebugHoverProvider.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
public IInformationControlCreatorProvider getInformationControlCreatorProvider(ITextViewer textViewer, IRegion hoverRegion) { if (!IS_JAVA_DEBUG_HOVER_AVAILABLE) return null; final JavaDebugHover javaDebugHover = injector.getInstance(JavaDebugHover.class); final Object hoverInfo = javaDebugHover.getHoverInfo2(textViewer, hoverRegion); if (hoverInfo == null) return null; return new IEObjectHoverProvider.IInformationControlCreatorProvider2() { @Override public IInformationControlCreator getHoverControlCreator() { return javaDebugHover.getHoverControlCreator(); } @Override public Object getInfo() { return hoverInfo; } @Override public IInformationControlCreator getInformationPresenterControlCreator() { return javaDebugHover.getInformationPresenterControlCreator(); } }; }
Example #5
Source File: DotHtmlLabelSubgrammarEObjectHover.java From gef with Eclipse Public License 2.0 | 5 votes |
@Override public Object getHoverInfo(EObject first, ITextViewer textViewer, IRegion hoverRegion) { if (hoverProvider == null) return null; IInformationControlCreatorProvider creatorProvider = hoverProvider .getHoverInfo(first, textViewer, hoverRegion); if (creatorProvider == null) return null; this.lastCreatorProvider = creatorProvider; return lastCreatorProvider.getInfo(); }
Example #6
Source File: CrossRefObjectTextHover.java From statecharts with Eclipse Public License 1.0 | 5 votes |
@Override public Object getHoverInfo(EObject first, ITextViewer textViewer, IRegion hoverRegion) { IInformationControlCreatorProvider creatorProvider = hoverProvider .getHoverInfo(first, textViewer, hoverRegion); if (creatorProvider == null) return null; this.lastCreatorProvider = creatorProvider; return lastCreatorProvider.getInfo(); }
Example #7
Source File: DotHtmlLabelSubgrammarEObjectHover.java From gef with Eclipse Public License 2.0 | 4 votes |
public IInformationControlCreatorProvider getLastCreatorProvider() { return lastCreatorProvider; }