org.eclipse.xtext.ui.editor.outline.IOutlineTreeProvider Java Examples
The following examples show how to use
org.eclipse.xtext.ui.editor.outline.IOutlineTreeProvider.
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: OutlinePage.java From xtext-eclipse with Eclipse Public License 2.0 | 6 votes |
protected void configureTree() { TreeViewer treeViewer = getTreeViewer(); contentProvider.setFilterAndSorter(filterAndSorter); treeViewer.setUseHashlookup(true); // access EMF's image registry now, since it needs a UI-thread. ExtendedImageRegistry.getInstance(); if (treeProvider instanceof IOutlineTreeProvider.Background) { showBusyStatus(); new Job("Initializing Outline") { @Override protected IStatus run(IProgressMonitor monitor) { try { initializeTreeContent(); return Status.OK_STATUS; } catch (Throwable e) { LOG.error("Error initializing outline", e); return Status.OK_STATUS; } } }.schedule(); } else { initializeTreeContent(); } }
Example #2
Source File: OpenEditorTest.java From xtext-xtend with Eclipse Public License 2.0 | 6 votes |
@Test public void testOpenFromOutline() throws Exception { XtextEditor bazXtendEditor = workbenchTestHelper.openEditor("outlinetest/Baz.xtend", "package outlinetest class Baz extends Foo { int baz }"); IOutlineTreeProvider.ModeAware tp = (IOutlineTreeProvider.ModeAware) treeProvider; tp.setCurrentMode(tp.getOutlineModes().get(1)); IOutlineNode outlineRoot = treeProvider.createRoot(bazXtendEditor.getDocument()); IOutlineNode bazNode = outlineRoot.getChildren().get(1); assertEquals("Baz - outlinetest", bazNode.getText().toString()); assertTrue(bazNode.getChildren().size() > 2); IOutlineNode baz = bazNode.getChildren().get(0); assertEquals("baz : int - Baz", baz.getText().toString()); outlineNodeElementOpener.open(baz, bazXtendEditor.getInternalSourceViewer()); assertActiveEditor("org.eclipse.xtend.core.Xtend", "Baz.xtend", "baz"); IOutlineNode foo = bazNode.getChildren().get(1); assertEquals("foo : int - Foo", foo.getText().toString()); outlineNodeElementOpener.open(foo, bazXtendEditor.getInternalSourceViewer()); assertActiveEditor("org.eclipse.xtend.core.Xtend", "Foo.xtend", "foo"); IOutlineNode bar = bazNode.getChildren().get(2); assertEquals("bar : int - Bar", bar.getText().toString()); outlineNodeElementOpener.open(bar, bazXtendEditor.getInternalSourceViewer()); assertActiveEditor(JavaUI.ID_CU_EDITOR, "Bar.java", "bar"); }
Example #3
Source File: QuickOutlinePopup.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
/** * @since 2.2 */ protected void setInfoText() { if (treeProvider instanceof IOutlineTreeProvider.ModeAware) { setInfoText("Press '" + invokingKeystrokeFormatted + "' to " + ((IOutlineTreeProvider.ModeAware) treeProvider).getNextMode().getDescription()); } else { setInfoText(Messages.QuickOutlinePopup_pressESC); } }
Example #4
Source File: AbstractOutlineTest.java From dsl-devkit with Eclipse Public License 1.0 | 5 votes |
/** * Set up the test by reading the input file and generating the outline tree. */ @Override protected final void beforeAllTests() { super.beforeAllTests(); IOutlineTreeProvider provider = getXtextTestUtil().get(IOutlineTreeProvider.class); getTestInformation().putTestObject(IOutlineNode.class, new HashMap<Object, ArrayList<IOutlineNode>>()); buildOutlineMap(provider.createRoot(getDocument())); }
Example #5
Source File: QuickOutlinePopup.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
/** * @since 2.2 */ protected void changeOutlineMode() { if (treeProvider instanceof IOutlineTreeProvider.ModeAware) { IOutlineTreeProvider.ModeAware modeTreeProvider = (IOutlineTreeProvider.ModeAware) treeProvider; OutlineMode nextMode = modeTreeProvider.getNextMode(); modeTreeProvider.setCurrentMode(nextMode); setInfoText(); setInput(document); } }
Example #6
Source File: OutlineRefreshJob.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
protected IOutlineNode refreshOutlineModel(final IProgressMonitor monitor, final OutlineTreeState formerState, final OutlineTreeState newState) { final IOutlineTreeProvider treeProvider = outlinePage.getTreeProvider(); if (treeProvider instanceof IOutlineTreeProvider.Background) { return internalRefreshOutlineModel(formerState, newState, treeProvider); } else { return new DisplayRunnableWithResult<IOutlineNode>() { @Override protected IOutlineNode run() throws Exception { return internalRefreshOutlineModel(formerState, newState, treeProvider); } }.syncExec(); } }
Example #7
Source File: AbstractPureXbaseUiModule.java From xtext-eclipse with Eclipse Public License 2.0 | 4 votes |
public Class<? extends IOutlineTreeProvider> bindIOutlineTreeProvider() { return PureXbaseOutlineTreeProvider.class; }
Example #8
Source File: AbstractArithmeticsUiModule.java From xtext-eclipse with Eclipse Public License 2.0 | 4 votes |
public Class<? extends IOutlineTreeProvider> bindIOutlineTreeProvider() { return ArithmeticsOutlineTreeProvider.class; }
Example #9
Source File: OutlinePage.java From xtext-eclipse with Eclipse Public License 2.0 | 4 votes |
public IOutlineTreeProvider getTreeProvider() { return treeProvider; }
Example #10
Source File: AbstractXbaseUiModule.java From xtext-eclipse with Eclipse Public License 2.0 | 4 votes |
public Class<? extends IOutlineTreeProvider> bindIOutlineTreeProvider() { return XbaseOutlineTreeProvider.class; }
Example #11
Source File: AbstractXbaseWithAnnotationsUiModule.java From xtext-eclipse with Eclipse Public License 2.0 | 4 votes |
public Class<? extends IOutlineTreeProvider> bindIOutlineTreeProvider() { return XbaseWithAnnotationsOutlineTreeProvider.class; }
Example #12
Source File: AbstractRuleEngineUiModule.java From xtext-eclipse with Eclipse Public License 2.0 | 4 votes |
public Class<? extends IOutlineTreeProvider> bindIOutlineTreeProvider() { return RuleEngineOutlineTreeProvider.class; }
Example #13
Source File: AbstractXtendUiModule.java From xtext-xtend with Eclipse Public License 2.0 | 4 votes |
public Class<? extends IOutlineTreeProvider> bindIOutlineTreeProvider() { return XtendOutlineTreeProvider.class; }
Example #14
Source File: AbstractMultiModeOutlineTreeProvider.java From xtext-xtend with Eclipse Public License 2.0 | 4 votes |
public void setModeAware(IOutlineTreeProvider.ModeAware modeAware) { this.modeAware = modeAware; }
Example #15
Source File: XtendUiModule.java From xtext-xtend with Eclipse Public License 2.0 | 4 votes |
public Class<? extends IOutlineTreeProvider.ModeAware> bindIOutlineTreeProvider_ModeAware() { return XtendOutlineModes.class; }
Example #16
Source File: AbstractHelloWorldUiModule.java From dsl-devkit with Eclipse Public License 1.0 | 4 votes |
public Class<? extends IOutlineTreeProvider> bindIOutlineTreeProvider() { return HelloWorldOutlineTreeProvider.class; }
Example #17
Source File: AbstractGamlUiModule.java From gama with GNU General Public License v3.0 | 4 votes |
public Class<? extends IOutlineTreeProvider> bindIOutlineTreeProvider() { return GamlOutlineTreeProvider.class; }
Example #18
Source File: AbstractSARLUiModule.java From sarl with Apache License 2.0 | 4 votes |
public Class<? extends IOutlineTreeProvider> bindIOutlineTreeProvider() { return SARLOutlineTreeProvider.class; }
Example #19
Source File: AbstractSimpleBeeLangTestLanguageUiModule.java From xtext-eclipse with Eclipse Public License 2.0 | 4 votes |
public Class<? extends IOutlineTreeProvider> bindIOutlineTreeProvider() { return SimpleBeeLangTestLanguageOutlineTreeProvider.class; }
Example #20
Source File: N4JSUiModule.java From n4js with Eclipse Public License 1.0 | 4 votes |
/** Outline modes for showing inherited members or not */ public Class<? extends IOutlineTreeProvider.ModeAware> bindIOutlineTreeProvider_ModeAware() { return N4JSOutlineModes.class; }
Example #21
Source File: AbstractRegularExpressionUiModule.java From n4js with Eclipse Public License 1.0 | 4 votes |
public Class<? extends IOutlineTreeProvider> bindIOutlineTreeProvider() { return RegularExpressionOutlineTreeProvider.class; }
Example #22
Source File: AbstractJSONUiModule.java From n4js with Eclipse Public License 1.0 | 4 votes |
public Class<? extends IOutlineTreeProvider> bindIOutlineTreeProvider() { return JSONOutlineTreeProvider.class; }
Example #23
Source File: AbstractTypesUiModule.java From n4js with Eclipse Public License 1.0 | 4 votes |
public Class<? extends IOutlineTreeProvider> bindIOutlineTreeProvider() { return TypesOutlineTreeProvider.class; }
Example #24
Source File: AbstractBromiumUiModule.java From bromium with MIT License | 4 votes |
public Class<? extends IOutlineTreeProvider> bindIOutlineTreeProvider() { return BromiumOutlineTreeProvider.class; }
Example #25
Source File: AbstractMyDslUiModule.java From M2Doc with Eclipse Public License 1.0 | 4 votes |
public Class<? extends IOutlineTreeProvider> bindIOutlineTreeProvider() { return MyDslOutlineTreeProvider.class; }
Example #26
Source File: AbstractFileAwareTestLanguageUiModule.java From xtext-eclipse with Eclipse Public License 2.0 | 4 votes |
public Class<? extends IOutlineTreeProvider> bindIOutlineTreeProvider() { return FileAwareTestLanguageOutlineTreeProvider.class; }
Example #27
Source File: AbstractExBeeLangTestLanguageUiModule.java From xtext-eclipse with Eclipse Public License 2.0 | 4 votes |
public Class<? extends IOutlineTreeProvider> bindIOutlineTreeProvider() { return ExBeeLangTestLanguageOutlineTreeProvider.class; }
Example #28
Source File: AbstractN4JSUiModule.java From n4js with Eclipse Public License 1.0 | 4 votes |
public Class<? extends IOutlineTreeProvider> bindIOutlineTreeProvider() { return N4JSOutlineTreeProvider.class; }
Example #29
Source File: AbstractBeeLangTestLanguageUiModule.java From xtext-eclipse with Eclipse Public License 2.0 | 4 votes |
public Class<? extends IOutlineTreeProvider> bindIOutlineTreeProvider() { return BeeLangTestLanguageOutlineTreeProvider.class; }
Example #30
Source File: AbstractNoJdtTestLanguageUiModule.java From xtext-eclipse with Eclipse Public License 2.0 | 4 votes |
public Class<? extends IOutlineTreeProvider> bindIOutlineTreeProvider() { return NoJdtTestLanguageOutlineTreeProvider.class; }