org.eclipse.xtext.resource.IBatchLinkableResource Java Examples

The following examples show how to use org.eclipse.xtext.resource.IBatchLinkableResource. 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: HighlightingReconciler.java    From xtext-eclipse with Eclipse Public License 2.0 5 votes vote down vote up
/**
 * @since 2.8
 */
protected void beforeRefresh(XtextResource resource, CancelIndicator cancelIndicator) {
	if (resource instanceof DerivedStateAwareResource)
		resource.getContents(); // trigger derived state computation
	if (resource instanceof IBatchLinkableResource)
		((IBatchLinkableResource) resource).linkBatched(cancelIndicator);
}
 
Example #2
Source File: FixedHighlightingReconciler.java    From dsl-devkit with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * @since 2.8
 */
@Override
protected void beforeRefresh(final XtextResource resource, final CancelIndicator cancelIndicator) {
  if (resource instanceof DerivedStateAwareResource) {
    resource.getContents(); // trigger derived state computation
  }
  if (resource instanceof IBatchLinkableResource) {
    ((IBatchLinkableResource) resource).linkBatched(cancelIndicator);
  }
}
 
Example #3
Source File: DirtyStateResourceDescription.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
protected IResourceDescription createResourceDescription(Resource resource) {
	if(resource instanceof IBatchLinkableResource)
		return new DirtyStateResourceDescription(resource, computeTypes(resource));
	else 
		return delegate.getResourceDescription(resource);
}