Example usage for org.eclipse.jdt.core.tests.compiler.regression InMemoryNameEnvironment InMemoryNameEnvironment

List of usage examples for org.eclipse.jdt.core.tests.compiler.regression InMemoryNameEnvironment InMemoryNameEnvironment

Introduction

In this page you can find the example usage for org.eclipse.jdt.core.tests.compiler.regression InMemoryNameEnvironment InMemoryNameEnvironment.

Prototype

public InMemoryNameEnvironment(String[] compilationUnits, INameEnvironment[] classLibs) 

Source Link

Usage

From source file:org.eclipse.objectteams.otdt.tests.compiler.smap.AbstractSourceMapGeneratorTest.java

License:Open Source License

protected INameEnvironment getNameEnvironment(final String[] testFiles, String[] classPaths)
        throws IOException {
    this.classpaths = classPaths == null ? getDefaultClassPaths() : classPaths;
    return new InMemoryNameEnvironment(testFiles, getClassLibs());
}

From source file:org.eclipse.objectteams.otdt.tests.otjld.AbstractOTJLDNullAnnotationTest.java

License:Open Source License

protected INameEnvironment getNameEnvironment(final String[] testFiles, String[] classPaths) {
    this.classpaths = classPaths == null ? getDefaultClassPaths() : classPaths;
    // make cleanup weaker:
    return new InMemoryNameEnvironment(testFiles, getClassLibs(false)) {
        @Override//from www .  j  a v a  2  s.c o m
        public void cleanup() {
            for (int i = 0, max = this.classLibs.length; i < max; i++)
                if (this.classLibs[i] instanceof FileSystem)
                    ((FileSystem) this.classLibs[i]).softReset();
        }
    };
}