Example usage for org.aspectj.ajde.core IOutputLocationManager getSourceFolderForFile

List of usage examples for org.aspectj.ajde.core IOutputLocationManager getSourceFolderForFile

Introduction

In this page you can find the example usage for org.aspectj.ajde.core IOutputLocationManager getSourceFolderForFile.

Prototype

String getSourceFolderForFile(File sourceFile);

Source Link

Document

For environments where multiple source folders are supported, they need to be included in the model.

Usage

From source file:org.eclipse.ajdt.core.tests.builder.LinkedFoldersTestBug270202.java

License:Open Source License

public void testGetSourceFolderForLinkedFile() throws Exception {
    assertEquals("Linked source folder not set up properly",
            project.getFolder("src").getLocation().toOSString(),
            project.getFolder("raw_location").getLocation().toOSString());
    IOutputLocationManager locationManager = AspectJPlugin.getDefault().getCompilerFactory()
            .getCompilerForProject(project).getCompilerConfiguration().getOutputLocationManager();
    String sourceFolderStr = locationManager
            .getSourceFolderForFile(new File(linkedFile.getLocation().toOSString()));
    assertEquals("Source folder 'src' not found", "src", sourceFolderStr);
}

From source file:org.eclipse.ajdt.core.tests.builder.LinkedFoldersTestBug270202.java

License:Open Source License

public void testGetSourceFolderForNonLinkedFile1() throws Exception {
    IOutputLocationManager locationManager = AspectJPlugin.getDefault().getCompilerFactory()
            .getCompilerForProject(project).getCompilerConfiguration().getOutputLocationManager();
    String sourceFolderStr = locationManager
            .getSourceFolderForFile(new File(nonLinkedFile1.getLocation().toOSString()));
    assertEquals("Source folder 'src1' not found", "src1", sourceFolderStr);
}

From source file:org.eclipse.ajdt.core.tests.builder.LinkedFoldersTestBug270202.java

License:Open Source License

public void testGetSourceFolderForNonLinkedFile2() throws Exception {
    IOutputLocationManager locationManager = AspectJPlugin.getDefault().getCompilerFactory()
            .getCompilerForProject(project).getCompilerConfiguration().getOutputLocationManager();
    String sourceFolderStr = locationManager
            .getSourceFolderForFile(new File(nonLinkedFile2.getLocation().toOSString()));
    assertEquals("Source folder 'src2' not found", "src2", sourceFolderStr);
}