Java Code Examples for org.eclipse.xtext.ui.editor.outline.IOutlineNode#getText()

The following examples show how to use org.eclipse.xtext.ui.editor.outline.IOutlineNode#getText() . 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: AbstractOutlineTests.java    From xtext-xtend with Eclipse Public License 2.0 5 votes vote down vote up
AssertBuilder(IOutlineNode node, StyledString styledText) {
	this(node);
	Object text = node.getText();
	assertTrue("Node text is not a StyledString: " + node, text instanceof StyledString);
	StyledString styledString = (StyledString) text;
	assertEquals("StyledString-text doesn't match", styledText.getString(), styledString.getString());
	assertArrayEquals("StyledString-StyleRanges don't match", styledText.getStyleRanges(),
			styledString.getStyleRanges());
}
 
Example 2
Source File: AbstractSARLOutlineTreeProviderTest.java    From sarl with Apache License 2.0 5 votes vote down vote up
/**
 * @param node
 * @param styledText
 */
public OutlineAsserts(IOutlineNode node, StyledString styledText) {
	this(node);
	Object text = node.getText();
	assertTrue("Node text is not a StyledString: " //$NON-NLS-1$
			+ node, text instanceof StyledString);
	StyledString styledString = (StyledString) text;
	assertEquals("StyledString-text doesn't match", //$NON-NLS-1$
			styledText.getString(), styledString.getString());
	assertArrayEquals("StyledString-StyleRanges don't match", //$NON-NLS-1$
			styledText.getStyleRanges(),
			styledString.getStyleRanges());
}