From 549e20fa6380d2dabd716a2c4e6f451e653763e4 Mon Sep 17 00:00:00 2001 From: "Maxim.Mossienko" Date: Tue, 15 Nov 2011 19:26:15 +0400 Subject: [PATCH] IDEA-76769 Empty module configuration page in Web module --- .../WebModuleConfigurationEditorProvider.java | 30 +++++++++++++++++++ resources/src/META-INF/IdeaPlugin.xml | 1 + 2 files changed, 31 insertions(+) create mode 100644 platform/lang-impl/src/com/intellij/openapi/module/WebModuleConfigurationEditorProvider.java diff --git a/platform/lang-impl/src/com/intellij/openapi/module/WebModuleConfigurationEditorProvider.java b/platform/lang-impl/src/com/intellij/openapi/module/WebModuleConfigurationEditorProvider.java new file mode 100644 index 000000000000..9f5ebabc6f8f --- /dev/null +++ b/platform/lang-impl/src/com/intellij/openapi/module/WebModuleConfigurationEditorProvider.java @@ -0,0 +1,30 @@ +/* + * Copyright 2000-2011 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 com.intellij.openapi.module; + +import com.intellij.openapi.roots.ui.configuration.CommonContentEntriesEditor; +import com.intellij.openapi.roots.ui.configuration.ModuleConfigurationEditorProvider; +import com.intellij.openapi.roots.ui.configuration.ModuleConfigurationState; + +public class WebModuleConfigurationEditorProvider implements ModuleConfigurationEditorProvider { + public ModuleConfigurationEditor[] createEditors(final ModuleConfigurationState state) { + Module module = state.getRootModel().getModule(); + if (ModuleType.get(module) != WebModuleType.getInstance()) { + return ModuleConfigurationEditor.EMPTY; + } + return new ModuleConfigurationEditor[]{new CommonContentEntriesEditor(module.getName(), state, false, false)}; + } +} diff --git a/resources/src/META-INF/IdeaPlugin.xml b/resources/src/META-INF/IdeaPlugin.xml index 0bcbe446be23..95a937488856 100644 --- a/resources/src/META-INF/IdeaPlugin.xml +++ b/resources/src/META-INF/IdeaPlugin.xml @@ -360,6 +360,7 @@ +