Example usage for org.eclipse.jdt.internal.core.search.indexing IndexManager indexAll

List of usage examples for org.eclipse.jdt.internal.core.search.indexing IndexManager indexAll

Introduction

In this page you can find the example usage for org.eclipse.jdt.internal.core.search.indexing IndexManager indexAll.

Prototype

public void indexAll(IProject project) 

Source Link

Document

Trigger addition of the entire content of a project Note: the actual operation is performed in background

Usage

From source file:org.eclipse.ajdt.ui.tests.hierarchy.ITDAwareHierarchyTests.java

License:Open Source License

protected void setUp() throws Exception {
    super.setUp();
    primaryOwner = DefaultWorkingCopyOwner.PRIMARY.primaryBufferProvider;
    DefaultWorkingCopyOwner.PRIMARY.primaryBufferProvider = null;

    IProject proj = createPredefinedProject("ITDAwareHierarchy");
    IFile shipFile = proj.getFile("src/ships/Ship.aj");
    ship = (AJCompilationUnit) AspectJCore.create(shipFile);
    ship.becomeWorkingCopy(null);/*  w w  w. ja  va 2  s .com*/
    IFile yachtFile = proj.getFile("src/ships/Yacht.aj");
    yacht = (ICompilationUnit) AspectJCore.create(yachtFile);
    yacht.becomeWorkingCopy(null);
    shipProj = JavaCore.create(proj);

    // ensure the project is indexed so that hierarchy building can occur
    IndexManager manager = JavaModelManager.getIndexManager();
    manager.indexAll(proj);
}

From source file:org.eclipse.ajdt.ui.tests.hierarchy.ITDAwareHierarchyTests2.java

License:Open Source License

protected void setUp() throws Exception {
    super.setUp();
    primaryOwner = DefaultWorkingCopyOwner.PRIMARY.primaryBufferProvider;
    DefaultWorkingCopyOwner.PRIMARY.primaryBufferProvider = null;

    proj = JavaCore.create(createPredefinedProject("DefaultEmptyProject"));

    // ensure the project is indexed so that hierarchy building can occur
    IndexManager manager = JavaModelManager.getIndexManager();
    manager.indexAll(proj.getProject());
}

From source file:org.eclipse.contribution.weaving.jdt.tests.sourceprovider.SourceTransformerTests.java

License:Open Source License

public void testSourceIndexerRequestor() throws Exception {
    IProject proj = createPredefinedProject("MockCUProject");
    proj.build(IncrementalProjectBuilder.FULL_BUILD, new NullProgressMonitor());
    MockSourceTransformer.ensureSourceIndexerRequestorCreated = 0;

    IndexManager manager = JavaModelManager.getIndexManager();
    manager.indexAll(proj);
    waitForJobsToComplete();/* w ww  .  ja va2s  .  c o  m*/
    assertEquals("Should have created one custom indexer.", 1,
            MockSourceTransformer.ensureSourceIndexerRequestorCreated);
}