org.eclipse.xtext.ui.editor.hover.html.DefaultEObjectHoverProvider Java Examples
The following examples show how to use
org.eclipse.xtext.ui.editor.hover.html.DefaultEObjectHoverProvider.
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: DefaultEObjectHoverProviderTest.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
@Test public void testElementHasNoDocumentation () throws Exception { with(getTestLanguageSetup(new IEObjectDocumentationProvider() { @Override public String getDocumentation(EObject o) { return null; } })); File f = (File) getModel ("stuff test"); DefaultEObjectHoverProvider cut = get(DefaultEObjectHoverProvider.class); assertTrue(getHtml(f.getStuff().get(0), cut).contains("Stuff <b>test</b>")); }
Example #2
Source File: DefaultEObjectHoverProviderTest.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
@Test public void testElementHasDocumentation () throws Exception { with(getTestLanguageSetup(new IEObjectDocumentationProvider() { @Override public String getDocumentation(EObject o) { return "Test"; } })); File f = (File) getModel ("stuff test"); DefaultEObjectHoverProvider cut = get(DefaultEObjectHoverProvider.class); assertTrue(getHtml(f.getStuff().get(0), cut).contains("Stuff <b>test</b><p>Test</p>")); }
Example #3
Source File: DefaultEObjectHoverProviderTest.java From xtext-eclipse with Eclipse Public License 2.0 | 4 votes |
protected String getHtml(EObject obj, DefaultEObjectHoverProvider cut) { return ((BrowserInformationControlInput)cut.getHoverInfo(obj,null,null).getInfo()).getHtml(); }