Java Code Examples for org.eclipse.jface.text.reconciler.IReconcilingStrategy#setDocument()

The following examples show how to use org.eclipse.jface.text.reconciler.IReconcilingStrategy#setDocument() . 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: XtextDocumentReconcileStrategy.java    From xtext-eclipse with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public void setDocument(IDocument document) {
	if (!(document instanceof XtextDocument)) {
		throw new IllegalArgumentException("Document must be an " + XtextDocument.class + " but was " + document.getClass().getName());
	}
	for (IReconcilingStrategy strategy: strategies) {
		strategy.setDocument(document);
	}
}
 
Example 2
Source File: CompositeReconcilingStrategy.java    From xds-ide with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
public void setDocument(IDocument document) {
    if (strategies == null)
        return;

    for (IReconcilingStrategy strategy : strategies) {
        strategy.setDocument(document);
    }
}
 
Example 3
Source File: CompositeReconcilingStrategy.java    From APICloud-Studio with GNU General Public License v3.0 5 votes vote down vote up
public void setDocument(IDocument document)
{
	for (IReconcilingStrategy strategy : fStrategies)
	{
		strategy.setDocument(document);
	}
}