public void linkModel(EObject model, IDiagnosticConsumer diagnosticsConsumer) { StoppedTask task = Stopwatches.forTask("installing proxies (AbstractCleaningLinker.linkModel)"); task.start(); boolean debug = log.isDebugEnabled(); long time = System.currentTimeMillis(); beforeModelLinked(model, diagnosticsConsumer); if (debug) { long now = System.currentTimeMillis(); log.debug("beforeModelLinked took: " + (now - time) + "ms"); time = now; } doLinkModel(model, diagnosticsConsumer); if (debug) { long now = System.currentTimeMillis(); log.debug("doLinkModel took: " + (now - time) + "ms"); time = now; } afterModelLinked(model, diagnosticsConsumer); if (debug) { long now = System.currentTimeMillis(); log.debug("afterModelLinked took: " + (now - time) + "ms"); time = now; } task.stop(); }
public List<Issue> validate(Resource resource, final CheckMode mode, CancelIndicator mon) { StoppedTask task = Stopwatches.forTask("ResourceValidatorImpl.validation"); try { task.start(); final CancelIndicator monitor = mon == null ? CancelIndicator.NullImpl : mon; resolveProxies(resource, monitor);
@Override public IResolvedTypes reentrantResolve(CancelIndicator monitor) { if (resolving) { throw new UnsupportedOperationException("TODO: import a functional handle on the type resolution that delegates to the best available (current, but evolving) result"); } StoppedTask task = Stopwatches.forTask("DefaultReentrantTypeResolver.resolve"); try { task.start(); resolving = true; return resolve(monitor); } catch(Throwable e) { clear(); if (operationCanceledManager.isOperationCanceledException(e)) { operationCanceledManager.propagateAsErrorIfCancelException(e); } Throwables.throwIfUnchecked(e); throw new RuntimeException(e); } finally { resolving = false; task.stop(); } }
public ActiveAnnotationContexts computeContext(final XtendFile file) { final Stopwatches.StoppedTask task = Stopwatches.forTask("[macros] findActiveAnnotations (ActiveAnnotationContextProvider.computeContext)"); task.start(); try { final ActiveAnnotationContexts result = ActiveAnnotationContexts.installNew(file.eResource());
task.start(); JvmDeclaredTypeAcceptor acceptor = new JvmDeclaredTypeAcceptor(resource); try {
task.start(); Object _xtrycatchfinallyexpression = null; try {
task.start(); Object _xtrycatchfinallyexpression = null; try {
task.start(); Object _xtrycatchfinallyexpression = null; try {
public JvmDeclaredType createType(final Class<?> clazz) { try { createTypeTask.start(); if (clazz.isAnonymousClass() || clazz.isSynthetic()) throw new IllegalStateException("Cannot create type for anonymous or synthetic classes");
createTypeTask.start(); if (clazz.isAnonymousClass() || clazz.isSynthetic()) throw new IllegalStateException("Cannot create type for anonymous or synthetic classes");
StoppedTask task = Stopwatches.forTask("DebugSourceInstallingCompilationParticipant.install"); try { task.start(); super.buildFinished(project); if (files == null)
StoppedTask task = Stopwatches.forTask(String.format("XtextBuilder.build[%s]", getKindAsString(kind))); try { task.start(); if (monitor != null) { final String taskName = Messages.XtextBuilder_Building + getProject().getName() + ": "; //$NON-NLS-1$
/** * Creates a new {@link JvmDeclaredType type} from the given binary class.. * * @noreference This method is not intended to be referenced by clients. */ @Override public JvmDeclaredType createType(BinaryClass binaryClass) { if (useASM) { try { createTypeTask.start(); return doCreateType(binaryClass); } catch (Exception e) { throw new RuntimeException(e); } finally { createTypeTask.stop(); } } else { try { ReflectURIHelper uriHelper = new ReflectURIHelper(); ReflectionTypeFactory reflectionBased = new ReflectionTypeFactory(uriHelper); Class<?> clazz = Class.forName(binaryClass.getName(), false, classLoader); return reflectionBased.createType(clazz); } catch (ClassNotFoundException e) { throw new RuntimeException(e); } } }
public final IParseResult parse(Reader reader) { StoppedTask task = Stopwatches.forTask("AbstractParser.parse"); try { task.start(); return doParse(reader); } finally { task.stop(); } }