Search in sources :

Example 1 with MavenDomPluginModel

use of org.jetbrains.idea.maven.dom.plugin.MavenDomPluginModel in project intellij-community by JetBrains.

the class MavenPluginConfigurationDomExtender method registerExtensions.

@Override
public void registerExtensions(@NotNull MavenDomConfiguration config, @NotNull DomExtensionsRegistrar r) {
    MavenDomPluginModel pluginModel = MavenPluginDomUtil.getMavenPluginModel(config);
    if (pluginModel == null) {
        r.registerCustomChildrenExtension(MavenDomConfigurationParameter.class);
        return;
    }
    boolean isInPluginManagement = isInPluginManagement(config);
    for (ParameterData each : collectParameters(pluginModel, config)) {
        registerPluginParameter(isInPluginManagement, r, each);
    }
}
Also used : MavenDomPluginModel(org.jetbrains.idea.maven.dom.plugin.MavenDomPluginModel)

Example 2 with MavenDomPluginModel

use of org.jetbrains.idea.maven.dom.plugin.MavenDomPluginModel in project intellij-community by JetBrains.

the class MavenPluginGoalConverter method getVariants.

@NotNull
public Collection<String> getVariants(ConvertContext context) {
    MavenDomPluginModel model = MavenPluginDomUtil.getMavenPluginModel(context.getInvocationElement());
    if (model == null)
        return Collections.emptyList();
    List<String> result = new ArrayList<>();
    for (MavenDomMojo each : model.getMojos().getMojos()) {
        String goal = each.getGoal().getStringValue();
        if (goal != null)
            result.add(goal);
    }
    return result;
}
Also used : MavenDomPluginModel(org.jetbrains.idea.maven.dom.plugin.MavenDomPluginModel) MavenDomMojo(org.jetbrains.idea.maven.dom.plugin.MavenDomMojo) ArrayList(java.util.ArrayList) NotNull(org.jetbrains.annotations.NotNull)

Aggregations

MavenDomPluginModel (org.jetbrains.idea.maven.dom.plugin.MavenDomPluginModel)2 ArrayList (java.util.ArrayList)1 NotNull (org.jetbrains.annotations.NotNull)1 MavenDomMojo (org.jetbrains.idea.maven.dom.plugin.MavenDomMojo)1