org.eclipse.ui.editors.text.TextSourceViewerConfiguration Java Examples

The following examples show how to use org.eclipse.ui.editors.text.TextSourceViewerConfiguration. 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: XtextSourceViewerEx.java    From statecharts with Eclipse Public License 1.0 5 votes vote down vote up
@Override
public void configure(SourceViewerConfiguration configuration) {
	// We have to set the preference store via reflection here because Xtext
	// uses package visibility for the setter
	Field declaredField;
	try {
		declaredField = TextSourceViewerConfiguration.class
				.getDeclaredField("fPreferenceStore");
		declaredField.setAccessible(true);
		declaredField.set(configuration, this.preferenceStore);
	} catch (Exception e) {
		e.printStackTrace();
	}
	super.configure(configuration);
}