diff --git a/platform/platform-impl/src/com/intellij/platform/HideableProjectGenerator.java b/platform/platform-impl/src/com/intellij/platform/HideableProjectGenerator.java new file mode 100644 index 000000000000..79ee56808839 --- /dev/null +++ b/platform/platform-impl/src/com/intellij/platform/HideableProjectGenerator.java @@ -0,0 +1,23 @@ +/* + * Copyright 2000-2012 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.platform; + +/** + * @author Dennis.Ushakov + */ +public interface HideableProjectGenerator { + boolean isHidden(); +} diff --git a/platform/platform-impl/src/com/intellij/platform/NewDirectoryProjectDialog.java b/platform/platform-impl/src/com/intellij/platform/NewDirectoryProjectDialog.java index ed63d326c25b..c5ff7cf862c7 100644 --- a/platform/platform-impl/src/com/intellij/platform/NewDirectoryProjectDialog.java +++ b/platform/platform-impl/src/com/intellij/platform/NewDirectoryProjectDialog.java @@ -79,6 +79,11 @@ public class NewDirectoryProjectDialog extends DialogWrapper { List primaryGenerators = ContainerUtil.newArrayList(); List otherGenerators = ContainerUtil.newArrayList(); for (DirectoryProjectGenerator generator : generators) { + if (generator instanceof HideableProjectGenerator) { + if (((HideableProjectGenerator)generator).isHidden()) { + continue; + } + } boolean primary = true; if (generator instanceof WebProjectGenerator) { primary = ((WebProjectGenerator) generator).isPrimaryGenerator();