package com.intellij.openapi.module;

import com.intellij.ide.util.projectWizard.ModuleBuilder;
import com.intellij.openapi.application.ApplicationInfo;
import com.intellij.openapi.application.ex.ApplicationInfoEx;
import com.intellij.openapi.module.ModuleType;
import com.intellij.openapi.project.ProjectBundle;
import com.intellij.openapi.util.IconLoader;
import org.jetbrains.annotations.NonNls;

import javax.swing.*;

/**
 * @author yole
 */
public abstract class WebModuleTypeBase<T extends ModuleBuilder> extends ModuleType<T> {
  @NonNls public static final String WEB_MODULE = "WEB_MODULE";

  public WebModuleTypeBase() {
    super(WEB_MODULE);
  }

  public String getName() {
    return ProjectBundle.message("module.web.title");
  }

  public String getDescription() {
    return ProjectBundle.message("module.web.description");
  }

  public Icon getBigIcon() {
    return IconLoader.getIcon(((ApplicationInfoEx)ApplicationInfo.getInstance()).getSmallIconUrl());
  }

  public Icon getNodeIcon(boolean isOpened) {
    return getBigIcon();
  }
}

@@ -1,264 +1,699 @@
-package com.intellij.openapi.module;%0A%0Aimport com.intellij.ide.util.projectWizard.ModuleBuilder;%0Aimport com.intellij.openapi.application.ApplicationInfo;%0Aimport com.intellij.openapi.application.ex.ApplicationInfoEx;%0Aimport com.intellij.openapi.module.ModuleType
+/*%0A * Copyright 2000-2011 JetBrains s.r.o.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A * http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage com.intellij.openapi.module;%0A%0Aimport com.intellij.ide.util.projectWizard.ModuleBuilder
 ;%0Aim
@@ -1029,16 +1029,111 @@
 DULE%22;%0A%0A
+  private static final Icon WEB_MODULE_ICON = IconLoader.getIcon(%22/javaee/webModuleBig.png%22);%0A%0A
   public
@@ -1414,96 +1414,23 @@
 urn 
-IconLoader.getIcon(((ApplicationInfoEx)ApplicationInfo.getInstance()).getSmallIconUrl())
+WEB_MODULE_ICON
 ;%0A  

Correct icon for web module