org.eclipse.jface.text.source.ISourceViewerExtension5 Java Examples

The following examples show how to use org.eclipse.jface.text.source.ISourceViewerExtension5. 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: AbstractDebugVariableCodeMiningProvider.java    From jdt-codemining with Eclipse Public License 1.0 5 votes vote down vote up
private synchronized void addSynchronizedDebugListener(ITextViewer viewer) {
	if (fContextListener != null) {
		return;
	}
	// When debug context changed, debug variable minings of the current stack frame
	// must be updated.
	fContextListener = event -> {
		if ((event.getFlags() & DebugContextEvent.ACTIVATED) > 0 && viewer != null) {
			((ISourceViewerExtension5) viewer).updateCodeMinings();
		}
	};
	DebugUITools.addPartDebugContextListener(getSite(), fContextListener);
}
 
Example #2
Source File: JUnitCodeMiningProvider.java    From jdt-codemining with Eclipse Public License 1.0 5 votes vote down vote up
@Override
public void sessionFinished(ITestRunSession session) {
	super.sessionFinished(session);
	if (viewer != null) {
		((ISourceViewerExtension5) viewer).updateCodeMinings();
	}
}
 
Example #3
Source File: XtextCodeMiningReconcileStrategy.java    From xtext-eclipse with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public IReconcilingStrategy create(ISourceViewer viewer) {
	if (viewer instanceof ISourceViewerExtension5) {
		return new XtextCodeMiningReconcileStrategy((ISourceViewerExtension5) viewer);
	}
	return null;
}
 
Example #4
Source File: SARLStandardEditor.java    From sarl with Apache License 2.0 5 votes vote down vote up
@Override
protected void handlePreferenceStoreChanged(PropertyChangeEvent event) {
	if (SARLCodeminingPreferenceAccess.CODEMINING_PROPERTY.equals(event.getProperty())) {
		final ISourceViewer viewer = getSourceViewer();
		if (viewer instanceof ISourceViewerExtension5) {
			((ISourceViewerExtension5) viewer).updateCodeMinings();
		}
	}
	super.handlePreferenceStoreChanged(event);
}
 
Example #5
Source File: XtextCodeMiningReconcileStrategy.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public XtextCodeMiningReconcileStrategy(ISourceViewerExtension5 sourceViewer) {
	this.sourceViewer = sourceViewer;
}