org.eclipse.xtext.util.internal.Stopwatches Java Examples

The following examples show how to use org.eclipse.xtext.util.internal.Stopwatches. 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: StopwatchRule.java    From xtext-extras with Eclipse Public License 2.0 6 votes vote down vote up
@Override
public Statement apply(final Statement base, final Description description) {
	if (!watchAll && description.getAnnotation(Timed.class) == null)
		return base;
	return new Statement() {
		@Override
		public void evaluate() throws Throwable {
			long timeSpend = -1;
			try {
				Stopwatches.setEnabled(true);
				Stopwatches.resetAll();
				long before = System.currentTimeMillis();
				base.evaluate();
				timeSpend = System.currentTimeMillis()-before;
			} finally {
				printStopwatchData(description, Stopwatches.allNumbers(), timeSpend);
				Stopwatches.resetAll();
				Stopwatches.setEnabled(false);
			}
		}
	};
}
 
Example #2
Source File: StopwatchRule.java    From xtext-extras with Eclipse Public License 2.0 6 votes vote down vote up
@Override
public Statement apply(final Statement base, final Description description) {
	if (!watchAll && description.getAnnotation(Timed.class) == null)
		return base;
	return new Statement() {
		@Override
		public void evaluate() throws Throwable {
			long timeSpend = -1;
			try {
				Stopwatches.setEnabled(true);
				Stopwatches.resetAll();
				long before = System.currentTimeMillis();
				base.evaluate();
				timeSpend = System.currentTimeMillis()-before;
			} finally {
				printStopwatchData(description, Stopwatches.allNumbers(), timeSpend);
				Stopwatches.resetAll();
				Stopwatches.setEnabled(false);
			}
		}
	};
}
 
Example #3
Source File: DefaultReentrantTypeResolver.java    From xtext-extras with Eclipse Public License 2.0 6 votes vote down vote up
@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();
	}
}
 
Example #4
Source File: StopwatchRule.java    From xtext-eclipse with Eclipse Public License 2.0 6 votes vote down vote up
@Override
public Statement apply(final Statement base, final Description description) {
	if (!watchAll && description.getAnnotation(Timed.class) == null)
		return base;
	return new Statement() {
		@Override
		public void evaluate() throws Throwable {
			long timeSpend = -1;
			try {
				Stopwatches.setEnabled(true);
				Stopwatches.resetAll();
				long before = System.currentTimeMillis();
				base.evaluate();
				timeSpend = System.currentTimeMillis()-before;
			} finally {
				printStopwatchData(description, Stopwatches.allNumbers(), timeSpend);
				Stopwatches.resetAll();
				Stopwatches.setEnabled(false);
			}
		}
	};
}
 
Example #5
Source File: StopwatchRule.java    From xtext-xtend with Eclipse Public License 2.0 6 votes vote down vote up
@Override
public Statement apply(final Statement base, final Description description) {
	if (!watchAll && description.getAnnotation(Timed.class) == null)
		return base;
	return new Statement() {
		@Override
		public void evaluate() throws Throwable {
			long timeSpend = -1;
			try {
				Stopwatches.setEnabled(true);
				Stopwatches.resetAll();
				long before = System.currentTimeMillis();
				base.evaluate();
				timeSpend = System.currentTimeMillis()-before;
			} finally {
				printStopwatchData(description, Stopwatches.allNumbers(), timeSpend);
				Stopwatches.resetAll();
				Stopwatches.setEnabled(false);
			}
		}
	};
}
 
Example #6
Source File: StorageAwareResource.java    From xtext-core with Eclipse Public License 2.0 5 votes vote down vote up
public void loadFromStorage(ResourceStorageLoadable storageInputStream) throws IOException {
	// check the argument for null before the internal state is modified
	Preconditions.checkNotNull(storageInputStream, "storageInputStream");
	Stopwatches.StoppedTask task = Stopwatches.forTask("Loading from storage");
	task.start();
	isLoading = true;
	isLoadedFromStorage = true;
	try {
		storageInputStream.loadIntoResource(this);
		isLoaded = true;
	} finally {
		isLoading = false;
		task.stop();
	}
}
 
Example #7
Source File: AbstractParser.java    From xtext-core with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public final IParseResult parse(Reader reader) {
	StoppedTask task = Stopwatches.forTask("AbstractParser.parse");
	try {
		task.start();
		return doParse(reader);
	} finally {
		task.stop();
	}
}
 
Example #8
Source File: ResourceValidatorImpl.java    From xtext-core with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public List<Issue> validate(Resource resource, final CheckMode mode, CancelIndicator mon) throws OperationCanceledError {
	StoppedTask task = Stopwatches.forTask("ResourceValidatorImpl.validation");
	try {
		task.start();
		final CancelIndicator monitor = mon == null ? CancelIndicator.NullImpl : mon;
		resolveProxies(resource, monitor);
		operationCanceledManager.checkCanceled(monitor);

		final List<Issue> result = Lists.newArrayListWithExpectedSize(resource.getErrors().size()
				+ resource.getWarnings().size());
		try {
			IAcceptor<Issue> acceptor = createAcceptor(result);

			if (mode.shouldCheck(CheckType.FAST)) {
				collectResourceDiagnostics(resource, monitor, acceptor);
			}

			operationCanceledManager.checkCanceled(monitor);
			boolean syntaxDiagFail = !result.isEmpty();
			logCheckStatus(resource, syntaxDiagFail, "Syntax");

			validate(resource, mode, monitor, acceptor);
			operationCanceledManager.checkCanceled(monitor);
		} catch (RuntimeException e) {
			operationCanceledManager.propagateAsErrorIfCancelException(e);
			log.error(e.getMessage(), e);
		}
		return result;
	} finally {
		task.stop();
	}
}
 
Example #9
Source File: PerformanceTest.java    From xtext-xtend with Eclipse Public License 2.0 5 votes vote down vote up
@Test
public void testCleanFullBuild() throws Exception {
  final IProject project = PerformanceTestProjectSetup.testProject.getProject();
  project.build(IncrementalProjectBuilder.CLEAN_BUILD, null);
  project.build(IncrementalProjectBuilder.FULL_BUILD, null);
  project.build(IncrementalProjectBuilder.CLEAN_BUILD, null);
  project.build(IncrementalProjectBuilder.FULL_BUILD, null);
  Stopwatches.resetAll();
  project.build(IncrementalProjectBuilder.CLEAN_BUILD, null);
  project.build(IncrementalProjectBuilder.FULL_BUILD, null);
}
 
Example #10
Source File: PerformanceTest.java    From xtext-xtend with Eclipse Public License 2.0 5 votes vote down vote up
@Test
public void testFullBuild() throws Exception {
  final IProject project = PerformanceTestProjectSetup.testProject.getProject();
  project.build(IncrementalProjectBuilder.FULL_BUILD, null);
  project.build(IncrementalProjectBuilder.FULL_BUILD, null);
  Stopwatches.resetAll();
  project.build(IncrementalProjectBuilder.FULL_BUILD, null);
}
 
Example #11
Source File: PerformanceTest.java    From xtext-xtend with Eclipse Public License 2.0 5 votes vote down vote up
@Test
public void testIncrementalBuild() throws Exception {
  this.internalTestIncrementalBuild();
  this.internalTestIncrementalBuild();
  Stopwatches.resetAll();
  this.internalTestIncrementalBuild();
}
 
Example #12
Source File: PerformanceTest.java    From xtext-xtend with Eclipse Public License 2.0 5 votes vote down vote up
@Test
public void testCleanBuild() throws Exception {
  final IProject project = PerformanceTestProjectSetup.testProject.getProject();
  project.build(IncrementalProjectBuilder.CLEAN_BUILD, null);
  project.build(IncrementalProjectBuilder.CLEAN_BUILD, null);
  Stopwatches.resetAll();
  project.build(IncrementalProjectBuilder.CLEAN_BUILD, null);
}
 
Example #13
Source File: PerformanceTest.java    From xtext-xtend with Eclipse Public License 2.0 4 votes vote down vote up
@Test
public void testBuildOfDownstreamProject() throws Exception {
  final IJavaProject project = PerformanceTestProjectSetup.testProject;
  final IJavaProject downStreamProject = PerformanceTestProjectSetup.createJavaProject("performance.test.project.downstream", 
    new String[] { JavaCore.NATURE_ID, "org.eclipse.pde.PluginNature" });
  JavaProjectSetupUtil.addProjectReference(downStreamProject, project);
  new ToggleXtextNatureCommand().toggleNature(downStreamProject.getProject());
  final IFolder sourceFolder = JavaProjectSetupUtil.addSourceFolder(downStreamProject, "src");
  JavaProjectSetupUtil.addSourceFolder(downStreamProject, "xtend-gen");
  sourceFolder.getFolder("foo").create(true, true, null);
  final IFile sourceFile = sourceFolder.getFile("foo/MyFile.xtend");
  StringConcatenation _builder = new StringConcatenation();
  _builder.append("package foo");
  _builder.newLine();
  _builder.newLine();
  _builder.append("import org.eclipse.xtext.xbase.formatting.BasicFormatterPreferenceKeys");
  _builder.newLine();
  _builder.append("import org.eclipse.xtext.xbase.formatting.FormattableDocument");
  _builder.newLine();
  _builder.append("import org.eclipse.xtext.xbase.formatting.HiddenLeafAccess");
  _builder.newLine();
  _builder.append("import org.eclipse.xtext.xbase.formatting.NodeModelAccess");
  _builder.newLine();
  _builder.append("import org.eclipse.xtext.xbase.formatting.XbaseFormatter2");
  _builder.newLine();
  _builder.newLine();
  _builder.append("class MyFile extends XbaseFormatter2 {");
  _builder.newLine();
  _builder.append("\t");
  _builder.newLine();
  _builder.append("\t");
  _builder.append("def a(BasicFormatterPreferenceKeys keys) {");
  _builder.newLine();
  _builder.append("\t\t");
  _builder.append("BasicFormatterPreferenceKeys::indentation");
  _builder.newLine();
  _builder.append("\t");
  _builder.append("}");
  _builder.newLine();
  _builder.append("\t");
  _builder.newLine();
  _builder.append("\t");
  _builder.append("def b(FormattableDocument doc) {");
  _builder.newLine();
  _builder.append("\t\t");
  _builder.append("doc.cfg.get(BasicFormatterPreferenceKeys::indentation)");
  _builder.newLine();
  _builder.append("\t");
  _builder.append("}");
  _builder.newLine();
  _builder.append("\t");
  _builder.newLine();
  _builder.append("\t");
  _builder.append("def c(HiddenLeafAccess x) {");
  _builder.newLine();
  _builder.append("\t\t");
  _builder.append("x.getHiddenLeafsAfter(null).newLines");
  _builder.newLine();
  _builder.append("\t");
  _builder.append("}");
  _builder.newLine();
  _builder.append("\t");
  _builder.newLine();
  _builder.append("\t");
  _builder.append("def d(NodeModelAccess x) {");
  _builder.newLine();
  _builder.append("\t\t");
  _builder.append("x.nodeForEObject(null).asTreeIterable");
  _builder.newLine();
  _builder.append("\t");
  _builder.append("}");
  _builder.newLine();
  _builder.append("}");
  _builder.newLine();
  StringInputStream _stringInputStream = new StringInputStream(_builder.toString());
  sourceFile.create(_stringInputStream, true, null);
  final IProject p = downStreamProject.getProject();
  p.build(IncrementalProjectBuilder.FULL_BUILD, null);
  p.build(IncrementalProjectBuilder.FULL_BUILD, null);
  Stopwatches.resetAll();
  p.build(IncrementalProjectBuilder.FULL_BUILD, null);
}
 
Example #14
Source File: BuilderParticipant.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
@Override
public void build(final IBuildContext context, IProgressMonitor monitor) throws CoreException {
	if (!isEnabled(context)) {
		return;
	}

	final List<IResourceDescription.Delta> deltas = getRelevantDeltas(context);
	if (deltas.isEmpty()) {
		return;
	}
	
	StoppedTask task = Stopwatches.forTask("org.eclipse.xtext.builder.BuilderParticipant.build(IBuildContext, IProgressMonitor)");
	try {
		task.start();
		
		// monitor handling
		if (monitor.isCanceled())
			throw new OperationCanceledException();
		SubMonitor subMonitor = SubMonitor.convert(monitor, context.getBuildType() == BuildType.RECOVERY ? 5 : 3);

		EclipseResourceFileSystemAccess2 access = fileSystemAccessProvider.get();
		IProject builtProject = context.getBuiltProject();
		access.setProject(builtProject);
		Map<String, OutputConfiguration> outputConfigurations = getOutputConfigurations(context);
		refreshOutputFolders(context, outputConfigurations, subMonitor.split(1));
		if (subMonitor.isCanceled()) {
			throw new OperationCanceledException();
		}
		access.setOutputConfigurations(outputConfigurations);
		if (context.getBuildType() == BuildType.CLEAN || context.getBuildType() == BuildType.RECOVERY) {
			SubMonitor cleanMonitor = SubMonitor.convert(subMonitor.newChild(2), outputConfigurations.size());
			for (OutputConfiguration config : outputConfigurations.values()) {
				cleanOutput(context, config, access, cleanMonitor.newChild(1));
			}
			if (context.getBuildType() == BuildType.CLEAN)
				return;
		}
		Map<OutputConfiguration, Iterable<IMarker>> generatorMarkers = getGeneratorMarkers(builtProject, outputConfigurations.values());
		if (subMonitor.isCanceled()) {
			throw new OperationCanceledException();
		}
		doBuild(deltas, outputConfigurations, generatorMarkers, context, access, subMonitor.newChild(2));

	} finally {
		outputConfigurationCache.clear();
		task.stop();
	}
}
 
Example #15
Source File: DebugSourceInstallingCompilationParticipant.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
@Override
public void buildFinished(IJavaProject project) {
	StoppedTask task = Stopwatches.forTask("DebugSourceInstallingCompilationParticipant.install");
	try {
		task.start();
		super.buildFinished(project);
		if (files == null)
			return;
		for (BuildContext ctx : files) {
			try {
				IFile generatedJavaFile = ctx.getFile();

				// This may fail if there is no trace file.
				IEclipseTrace traceToSource = traceInformation.getTraceToSource(generatedJavaFile);
				if (traceToSource == null) {
					continue;
				}
				AbstractTraceRegion rootTraceRegion = findRootTraceRegion(traceToSource);
				if (rootTraceRegion == null)
					continue;

				SourceRelativeURI dslSourceFile = rootTraceRegion.getAssociatedSrcRelativePath();

				// OutputConfigurations are only available for folders targeted by Xtext's code generation.
				OutputConfiguration outputConfiguration = findOutputConfiguration(dslSourceFile, generatedJavaFile);
				if (outputConfiguration == null)
					continue;

				IJavaElement element = JavaCore.create(generatedJavaFile);
				if (element == null)
					continue;

				deleteTaskMarkers(generatedJavaFile);
				markerReflector.reflectErrorMarkerInSource(generatedJavaFile, traceToSource);

				ITraceToBytecodeInstaller installer = getInstaller(outputConfiguration);
				installer.setTrace(generatedJavaFile.getName(), rootTraceRegion);
				for (IFile javaClassFile : findGeneratedJavaClassFiles(element)) {
					InputStream contents = javaClassFile.getContents();
					try {
						byte[] byteCode = installer.installTrace(ByteStreams.toByteArray(contents));
						if (byteCode != null) {
							javaClassFile.setContents(new ByteArrayInputStream(byteCode), 0, null);
						} else {
							// we need to touch the class file to do a respin of the build
							// otherwise a needsRebuild request is ignored since no IResourceDelta is available
							javaClassFile.touch(null);
						}
					} finally {
						contents.close();
					}
				}
			} catch (Exception e) {
				String msg = "Could not process %s to install source information: %s";
				log.error(String.format(msg, ctx.getFile().getFullPath().toString(), e.getMessage()), e);
			}
		}
	} finally {
		files = null;
		task.stop();
	}
}
 
Example #16
Source File: AnnotationProcessor.java    From xtext-xtend with Eclipse Public License 2.0 4 votes vote down vote up
/**
 * gets called from Xtend compiler, during "model inference", i.e. translation of Xtend AST to Java AST
 */
public Object indexingPhase(final ActiveAnnotationContext ctx, final IJvmDeclaredTypeAcceptor acceptor, final CancelIndicator monitor) {
  Object _xblockexpression = null;
  {
    final Stopwatches.StoppedTask task = Stopwatches.forTask("[macros] indexingPhase (AnnotationProcessor.indexingPhase)");
    task.start();
    Object _xtrycatchfinallyexpression = null;
    try {
      Object _switchResult = null;
      Object _processorInstance = ctx.getProcessorInstance();
      final Object processor = _processorInstance;
      boolean _matched = false;
      if (processor instanceof RegisterGlobalsParticipant) {
        _matched=true;
        Object _xblockexpression_1 = null;
        {
          final RegisterGlobalsContextImpl registerGlobalsCtx = this.registerGlobalsContextProvider.get();
          registerGlobalsCtx.setAcceptor(acceptor);
          registerGlobalsCtx.setCompilationUnit(ctx.getCompilationUnit());
          final Runnable _function = () -> {
            final Function1<XtendAnnotationTarget, Declaration> _function_1 = (XtendAnnotationTarget it) -> {
              Declaration _switchResult_1 = null;
              boolean _matched_1 = false;
              if (it instanceof XtendMember) {
                _matched_1=true;
                _switchResult_1 = ctx.getCompilationUnit().toXtendMemberDeclaration(((XtendMember)it));
              }
              if (!_matched_1) {
                if (it instanceof XtendParameter) {
                  _matched_1=true;
                  _switchResult_1 = ctx.getCompilationUnit().toXtendParameterDeclaration(((XtendParameter)it));
                }
              }
              final Declaration xtendMember = _switchResult_1;
              return xtendMember;
            };
            ((RegisterGlobalsParticipant<NamedElement>)processor).doRegisterGlobals(
              ListExtensions.<XtendAnnotationTarget, Declaration>map(ctx.getAnnotatedSourceElements(), _function_1), registerGlobalsCtx);
          };
          _xblockexpression_1 = this.runWithCancelIndiciator(ctx, monitor, _function);
        }
        _switchResult = _xblockexpression_1;
      }
      _xtrycatchfinallyexpression = _switchResult;
    } finally {
      task.stop();
    }
    _xblockexpression = _xtrycatchfinallyexpression;
  }
  return _xblockexpression;
}
 
Example #17
Source File: AnnotationProcessor.java    From xtext-xtend with Eclipse Public License 2.0 4 votes vote down vote up
public Object inferencePhase(final ActiveAnnotationContext ctx, final CancelIndicator monitor) {
  Object _xblockexpression = null;
  {
    final Stopwatches.StoppedTask task = Stopwatches.forTask("[macros] inferencePhase (AnnotationProcessor.inferencePhase)");
    task.start();
    Object _xtrycatchfinallyexpression = null;
    try {
      Object _switchResult = null;
      Object _processorInstance = ctx.getProcessorInstance();
      final Object processor = _processorInstance;
      boolean _matched = false;
      if (processor instanceof TransformationParticipant) {
        _matched=true;
        Object _xblockexpression_1 = null;
        {
          final TransformationContextImpl modifyCtx = this.modifyContextProvider.get();
          modifyCtx.setUnit(ctx.getCompilationUnit());
          final Runnable _function = () -> {
            final Function1<XtendAnnotationTarget, MutableNamedElement> _function_1 = (XtendAnnotationTarget it) -> {
              Declaration _switchResult_1 = null;
              boolean _matched_1 = false;
              if (it instanceof XtendMember) {
                _matched_1=true;
                _switchResult_1 = ctx.getCompilationUnit().toXtendMemberDeclaration(((XtendMember)it));
              }
              if (!_matched_1) {
                if (it instanceof XtendParameter) {
                  _matched_1=true;
                  _switchResult_1 = ctx.getCompilationUnit().toXtendParameterDeclaration(((XtendParameter)it));
                }
              }
              final Declaration xtendMember = _switchResult_1;
              Element _primaryGeneratedJavaElement = modifyCtx.getPrimaryGeneratedJavaElement(xtendMember);
              return ((MutableNamedElement) _primaryGeneratedJavaElement);
            };
            final List<MutableNamedElement> map = ListExtensions.<XtendAnnotationTarget, MutableNamedElement>map(ctx.getAnnotatedSourceElements(), _function_1);
            ((TransformationParticipant<MutableNamedElement>)processor).doTransform(map, modifyCtx);
          };
          _xblockexpression_1 = this.runWithCancelIndiciator(ctx, monitor, _function);
        }
        _switchResult = _xblockexpression_1;
      }
      _xtrycatchfinallyexpression = _switchResult;
    } finally {
      task.stop();
    }
    _xblockexpression = _xtrycatchfinallyexpression;
  }
  return _xblockexpression;
}
 
Example #18
Source File: AnnotationProcessor.java    From xtext-xtend with Eclipse Public License 2.0 4 votes vote down vote up
public Object validationPhase(final ActiveAnnotationContext ctx, final CancelIndicator monitor) {
  Object _xblockexpression = null;
  {
    final Stopwatches.StoppedTask task = Stopwatches.forTask("[macros] validationPhase (AnnotationProcessor.validationPhase)");
    task.start();
    Object _xtrycatchfinallyexpression = null;
    try {
      Object _switchResult = null;
      Object _processorInstance = ctx.getProcessorInstance();
      final Object processor = _processorInstance;
      boolean _matched = false;
      if (processor instanceof ValidationParticipant) {
        _matched=true;
        Object _xblockexpression_1 = null;
        {
          final ValidationContextImpl validationContext = this.validationContextProvider.get();
          validationContext.setUnit(ctx.getCompilationUnit());
          final Runnable _function = () -> {
            final Function1<XtendAnnotationTarget, NamedElement> _function_1 = (XtendAnnotationTarget it) -> {
              Declaration _switchResult_1 = null;
              boolean _matched_1 = false;
              if (it instanceof XtendMember) {
                _matched_1=true;
                _switchResult_1 = ctx.getCompilationUnit().toXtendMemberDeclaration(((XtendMember)it));
              }
              if (!_matched_1) {
                if (it instanceof XtendParameter) {
                  _matched_1=true;
                  _switchResult_1 = ctx.getCompilationUnit().toXtendParameterDeclaration(((XtendParameter)it));
                }
              }
              final Declaration xtendMember = _switchResult_1;
              Element _primaryGeneratedJavaElement = validationContext.getPrimaryGeneratedJavaElement(xtendMember);
              return ((NamedElement) _primaryGeneratedJavaElement);
            };
            final List<NamedElement> map = ListExtensions.<XtendAnnotationTarget, NamedElement>map(ctx.getAnnotatedSourceElements(), _function_1);
            ((ValidationParticipant<NamedElement>)processor).doValidate(map, validationContext);
          };
          _xblockexpression_1 = this.runWithCancelIndiciator(ctx, monitor, _function);
        }
        _switchResult = _xblockexpression_1;
      }
      _xtrycatchfinallyexpression = _switchResult;
    } finally {
      task.stop();
    }
    _xblockexpression = _xtrycatchfinallyexpression;
  }
  return _xblockexpression;
}
 
Example #19
Source File: BuilderPerformanceTest.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
private void printAndClearStopwatchData() {
	if (doPrint) {
		System.out.println(Stopwatches.getPrintableStopwatchData());
	}
	Stopwatches.resetAll();
}
 
Example #20
Source File: BuilderPerformanceTest.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
@After
public void disableStopwatches() throws Exception {
	printAndClearStopwatchData();
	Stopwatches.setEnabled(false);
}
 
Example #21
Source File: BuilderPerformanceTest.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
@Before
public void enableStopwatches() throws Exception {
	Stopwatches.setEnabled(true);
}