Java 类org.eclipse.xtext.service.OperationCanceledManager 实例源码

项目:xtext-extras    文件:TypeResource.java   
@Override
protected void doLoad(InputStream inputStream, Map<?, ?> options) throws IOException {
    try {
        if (getURI() != null && mirror != null) {
            if (mirror instanceof IMirrorOptionsAware) {
                ((IMirrorOptionsAware)mirror).initialize(this, options);
            } else {
                mirror.initialize(this);
            }
        }
    } catch(Exception e) {
        if (typeResourceServices != null) {
            OperationCanceledManager operationCanceledManager = typeResourceServices.getOperationCanceledManager();
            if (operationCanceledManager.isOperationCanceledException(e)) {
                unload();
            }
            operationCanceledManager.propagateAsErrorIfCancelException(e);
        }   
        throw new CannotLoadTypeResourceException(e);
    }
}
项目:n4js    文件:IssuesProvider.java   
@SuppressWarnings("javadoc")
public IssuesProvider(IResourceValidator resourceValidator, Resource res,
        OperationCanceledManager operationCanceledManager, CancelIndicator ci) {
    this.rv = resourceValidator;
    this.r = res;
    this.operationCanceledManager = operationCanceledManager;
    this.ci = ci;
}
项目:n4js    文件:InferenceContext.java   
/**
 * Creates a new, empty inference context for the given inference variables. The cancellation manager and indicator
 * may be <code>null</code>.
 *
 * @param G
 *            a rule environment used for subtype checking, etc. during constraint resolution. This rule environment
 *            will not be changed by the inference context AND it is expected to <b>not</b> be changed by anyone
 *            else during the life-time of the inference context.
 * @param inferenceVariables
 *            the meta variables to be inferred.
 */
public InferenceContext(N4JSTypeSystem ts, TypeSystemHelper tsh, OperationCanceledManager operationCanceledManager,
        CancelIndicator cancelIndicator, RuleEnvironment G, InferenceVariable... inferenceVariables) {
    Objects.requireNonNull(ts);
    Objects.requireNonNull(tsh);
    Objects.requireNonNull(G);
    this.ts = ts;
    this.tsh = tsh;
    this.operationCanceledManager = operationCanceledManager;
    this.cancelIndicator = cancelIndicator;
    this.G = G;
    addInferenceVariables(false, inferenceVariables);
    this.reducer = new Reducer(this, G, ts, tsh);
    this.currentBounds = new BoundSet(this, G, ts);
}
项目:n4js    文件:ManifestAwareResourceValidator.java   
@Inject
private ManifestAwareResourceValidator(IN4JSEclipseCore eclipseCore,
        OperationCanceledManager operationCanceledManager) {
    this.eclipseCore = eclipseCore;
    this.operationCanceledManager = operationCanceledManager;
}
项目:xtext-extras    文件:DefaultReentrantTypeResolver.java   
public OperationCanceledManager getOperationCanceledManager() {
    return operationCanceledManager;
}
项目:xtext-extras    文件:TypeResourceServices.java   
public OperationCanceledManager getOperationCanceledManager() {
    return operationCanceledManager;
}
项目:xtext-core    文件:ResourceValidatorImpl.java   
/**
 * @since 2.9
 */
protected OperationCanceledManager getOperationCanceledManager() {
    return operationCanceledManager;
}
项目:xtext-core    文件:DerivedStateAwareResourceTest.java   
public TestedResource() {
    operationCanceledManager = new OperationCanceledManager();
}