Search in sources :

Example 1 with MavenDomBuild

use of org.jetbrains.idea.maven.dom.model.MavenDomBuild in project intellij-community by JetBrains.

the class MavenSourceDirectoryConverter method isSoft.

@Override
public boolean isSoft(@NotNull DomElement element) {
    DomElement buildElement = element.getParent();
    if (!(buildElement instanceof MavenDomBuild)) {
        return false;
    }
    DomElement mavenProject = buildElement.getParent();
    if (!(mavenProject instanceof MavenDomProjectModel)) {
        return false;
    }
    return "pom".equals(((MavenDomProjectModel) mavenProject).getPackaging().getStringValue());
}
Also used : MavenDomProjectModel(org.jetbrains.idea.maven.dom.model.MavenDomProjectModel) DomElement(com.intellij.util.xml.DomElement) MavenDomBuild(org.jetbrains.idea.maven.dom.model.MavenDomBuild)

Aggregations

DomElement (com.intellij.util.xml.DomElement)1 MavenDomBuild (org.jetbrains.idea.maven.dom.model.MavenDomBuild)1 MavenDomProjectModel (org.jetbrains.idea.maven.dom.model.MavenDomProjectModel)1