@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); } }
@SuppressWarnings("javadoc") public IssuesProvider(IResourceValidator resourceValidator, Resource res, OperationCanceledManager operationCanceledManager, CancelIndicator ci) { this.rv = resourceValidator; this.r = res; this.operationCanceledManager = operationCanceledManager; this.ci = ci; }
/** * 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); }
@Inject private ManifestAwareResourceValidator(IN4JSEclipseCore eclipseCore, OperationCanceledManager operationCanceledManager) { this.eclipseCore = eclipseCore; this.operationCanceledManager = operationCanceledManager; }
public OperationCanceledManager getOperationCanceledManager() { return operationCanceledManager; }
/** * @since 2.9 */ protected OperationCanceledManager getOperationCanceledManager() { return operationCanceledManager; }
public TestedResource() { operationCanceledManager = new OperationCanceledManager(); }