[maven] IDEA-324213 remove context menu item: Create 'profiles.xml'

GitOrigin-RevId: 908f085da9aeffb83812a17229a489cc5f6403b5
This commit is contained in:
Dmitry Kichinsky
2023-08-30 12:30:16 +02:00
committed by intellij-monorepo-bot
parent 150ebb366c
commit 54968e7312
6 changed files with 0 additions and 74 deletions

View File

@@ -1,42 +0,0 @@
/*
* Copyright 2000-2010 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.idea.maven.project.actions;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.util.containers.ContainerUtil;
import org.jetbrains.idea.maven.project.MavenProject;
import org.jetbrains.idea.maven.utils.MavenFileTemplateGroupFactory;
import org.jetbrains.idea.maven.utils.actions.MavenActionUtil;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
public class OpenOrCreateProfilesXmlAction extends MavenOpenOrCreateFilesAction {
@Override
protected List<File> getFiles(AnActionEvent e) {
List<File> result = new ArrayList<>();
for (MavenProject each : MavenActionUtil.getMavenProjects(e.getDataContext())) {
ContainerUtil.addIfNotNull(result, each.getProfilesXmlIoFile());
}
return result;
}
@Override
protected String getFileTemplate() {
return MavenFileTemplateGroupFactory.MAVEN_PROFILES_XML_TEMPLATE;
}
}

View File

@@ -9,7 +9,6 @@ import static icons.OpenapiIcons.RepositoryLibraryLogo;
public class MavenFileTemplateGroupFactory implements FileTemplateGroupDescriptorFactory {
public static final String MAVEN_PROJECT_XML_TEMPLATE = "Maven Project.xml";
public static final String MAVEN_PROFILES_XML_TEMPLATE = "Maven Profiles.xml";
public static final String MAVEN_SETTINGS_XML_TEMPLATE = "Maven Settings.xml";
@Override
@@ -17,7 +16,6 @@ public class MavenFileTemplateGroupFactory implements FileTemplateGroupDescripto
FileTemplateGroupDescriptor group = new FileTemplateGroupDescriptor("Maven", RepositoryLibraryLogo); //NON-NLS
group.addTemplate(new FileTemplateDescriptor(MAVEN_PROJECT_XML_TEMPLATE, RepositoryLibraryLogo));
group.addTemplate(new FileTemplateDescriptor(MAVEN_PROFILES_XML_TEMPLATE, RepositoryLibraryLogo));
group.addTemplate(new FileTemplateDescriptor(MAVEN_SETTINGS_XML_TEMPLATE, RepositoryLibraryLogo));
return group;

View File

@@ -641,9 +641,6 @@
<action id="Maven.OpenSettingsXml"
class="org.jetbrains.idea.maven.project.actions.OpenOrCreateSettingsXmlAction"/>
<action id="Maven.OpenProfilesXml"
class="org.jetbrains.idea.maven.project.actions.OpenOrCreateProfilesXmlAction"/>
<action id="Maven.IgnoreProjects"
class="org.jetbrains.idea.maven.project.actions.ToggleIgnoredProjectsAction">
</action>
@@ -787,7 +784,6 @@
<reference id="Maven.RemoveManagedFiles"/>
<separator/>
<reference id="Maven.OpenSettingsXml"/>
<reference id="Maven.OpenProfilesXml"/>
<separator/>
<reference id="Maven.DownloadAllGroup"/>
<separator/>

View File

@@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<profilesXml xmlns="http://maven.apache.org/PROFILES/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/PROFILES/1.0.0 http://maven.apache.org/xsd/profiles-1.0.0.xsd">
<profiles>
<profile>
<id>${PROFILE_ID}</id>
${END}
</profile>
</profiles>
</profilesXml>

View File

@@ -1,13 +0,0 @@
<html>
<body>
<table width="100%" border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111">
<tr>
<td colspan="3">
<font face="verdana" size="-1">
This is a built-in template used each time you create a new Maven <code>profiles.xml</code> file
</font>
</td>
</tr>
</table>
</body>
</html>

View File

@@ -116,8 +116,6 @@ action.Maven.RemoveManagedFiles.text=Unlink Maven Projects
action.Maven.RemoveManagedFiles.description=Unlink selected Maven projects and their subprojects from the project tree
action.Maven.OpenSettingsXml.text=Open settings.xml
action.Maven.OpenSettingsXml.description=Open Maven settings.xml
action.Maven.OpenProfilesXml.text=Open profiles.xml
action.Maven.OpenProfilesXml.description=Open profiles.xml for selected projects
action.Maven.IgnoreProjects.text=_Ignore Projects
action.Maven.IgnoreProjects.description=Exclude/Include selected Maven projects from being imported
action.Maven.ToggleProfile.text=Toggle Profile