Search in sources :

Example 1 with JpsGlobal

use of org.jetbrains.jps.model.JpsGlobal in project intellij-community by JetBrains.

the class JpsLibraryOrderEntry method getLibraryLevel.

@Override
public String getLibraryLevel() {
    final JpsElementReference<? extends JpsCompositeElement> reference = myDependencyElement.getLibraryReference().getParentReference();
    final JpsCompositeElement parent = reference.resolve();
    if (parent instanceof JpsGlobal)
        return LibraryTablesRegistrar.APPLICATION_LEVEL;
    if (parent instanceof JpsProject)
        return LibraryTablesRegistrar.PROJECT_LEVEL;
    if (parent instanceof JpsModule)
        return LibraryTableImplUtil.MODULE_LEVEL;
    return LibraryTablesRegistrar.PROJECT_LEVEL;
}
Also used : JpsModule(org.jetbrains.jps.model.module.JpsModule) JpsGlobal(org.jetbrains.jps.model.JpsGlobal) JpsProject(org.jetbrains.jps.model.JpsProject) JpsCompositeElement(org.jetbrains.jps.model.JpsCompositeElement)

Aggregations

JpsCompositeElement (org.jetbrains.jps.model.JpsCompositeElement)1 JpsGlobal (org.jetbrains.jps.model.JpsGlobal)1 JpsProject (org.jetbrains.jps.model.JpsProject)1 JpsModule (org.jetbrains.jps.model.module.JpsModule)1