2 * Copyright 2000-2009 JetBrains s.r.o.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package org
.jetbrains
.plugins
.groovy
.config
;
18 import com
.intellij
.ide
.util
.frameworkSupport
.FrameworkSupportConfigurable
;
19 import com
.intellij
.ide
.util
.frameworkSupport
.FrameworkSupportModel
;
20 import com
.intellij
.ide
.util
.frameworkSupport
.FrameworkSupportProvider
;
21 import com
.intellij
.ide
.util
.projectWizard
.ModuleBuilder
;
22 import com
.intellij
.openapi
.module
.JavaModuleType
;
23 import com
.intellij
.openapi
.module
.ModuleType
;
24 import org
.jetbrains
.annotations
.NotNull
;
25 import org
.jetbrains
.plugins
.groovy
.GroovyIcons
;
26 import org
.jetbrains
.plugins
.groovy
.config
.ui
.GroovyFacetEditor
;
33 public class GroovyFacetSupportProvider
extends FrameworkSupportProvider
{
34 protected GroovyFacetSupportProvider() {
35 super("Groovy", "Groovy");
39 public Icon
getIcon() {
40 return GroovyIcons
.GROOVY_ICON_16x16
;
44 public boolean isEnabledForModuleBuilder(@NotNull ModuleBuilder builder
) {
45 return super.isEnabledForModuleBuilder(builder
) && !(builder
instanceof GroovyAwareModuleBuilder
);
49 public FrameworkSupportConfigurable
createConfigurable(final @NotNull FrameworkSupportModel model
) {
50 return new GroovySupportConfigurable(new GroovyFacetEditor(model
.getProject()));
53 public boolean isEnabledForModuleType(@NotNull ModuleType moduleType
) {
54 return moduleType
instanceof JavaModuleType
;