org.eclipse.wst.web_1.1.501.v201201190400

16:49:31.819 INFO  jd.cli.Main - Decompiling org.eclipse.wst.web_1.1.501.v201201190400.jar
package org.eclipse.wst.project.facet;

public abstract interface IProductConstants
{
  public static final String APPLICATION_CONTENT_FOLDER = "earContent";
  public static final String WEB_CONTENT_FOLDER = "webContent";
  public static final String EJB_CONTENT_FOLDER = "ejbContent";
  public static final String APP_CLIENT_CONTENT_FOLDER = "appClientContent";
  public static final String JCA_CONTENT_FOLDER = "jcaContent";
  public static final String DEFAULT_SOURCE_FOLDER = "defaultSource";
  public static final String ADD_TO_EAR_BY_DEFAULT = "addToEarByDefault";
  public static final String OUTPUT_FOLDER = "outputFolder";
  public static final String USE_SINGLE_ROOT_STRUCTURE = "useSingleRootStructure";
  public static final String ID_PERSPECTIVE_HIERARCHY_VIEW = "idPerspectiveHierarchyView";
  public static final String SHOW_JAVA_EE_MODULE_DEPENDENCY_PAGE = "showJavaEEModuleDependencyPage";
  public static final String DYNAMIC_WEB_GENERATE_DD = "dynamic_web_generate_dd";
  public static final String EE6_CONNECTOR_GENERATE_DD = "ee6_connector_generate_dd";
  public static final String EJB_BUSINESS_INTERFACE_ANNOTATION_IN_BEAN = "ejb_business_interaface_annotation_in_bean";
  public static final String EJB_BUSINESS_INTERFACE_ANNOTATION_IN_INTERFACE = "ejb_business_interaface_annotation_in_interface";
  public static final String EJB_INTERFACE_PACKAGE_SUFFIX = "ejb_interface_package_suffix";
  /**
   * @deprecated
   */
  public static final String ALLOW_CLASSPATH_DEP = "allowClasspathDep";
  public static final String VALIDATE_DUPLICATE_CLASSPATH_COMPONENT_URI = "validateDupClasspathCompURI";
  public static final String DYN_WEB_OUTPUT_FOLDER = "dynWebOutput";
  public static final String EJB_OUTPUT_FOLDER = "ejbOutput";
  public static final String APP_CLIENT_OUTPUT_FOLDER = "appClientOutput";
  public static final String JCA_OUTPUT_FOLDER = "jcaOutput";
  public static final String UTILITY_OUTPUT_FOLDER = "utilOutput";
  public static final String FINAL_PERSPECTIVE_WEB = "finalPerspectiveWeb";
  public static final String FINAL_PERSPECTIVE_EJB = "finalPerspectiveEjb";
  public static final String FINAL_PERSPECTIVE_EAR = "finalPerspectiveEar";
  public static final String FINAL_PERSPECTIVE_APPCLIENT = "finalPerspectiveAppClient";
  public static final String FINAL_PERSPECTIVE_JCA = "finalPerspectiveJca";
  public static final String FINAL_PERSPECTIVE_UTILITY = "finalPerspectiveUtility";
  public static final String FINAL_PERSPECTIVE_STATICWEB = "finalPerspectiveStaticWeb";
  public static final String FINAL_PERSPECTIVE_WEBFRAGMENT = "finalPerspectiveWebFragment";
  public static final String DEFAULT_RUNTIME_1 = "defaultRuntime1";
  public static final String DEFAULT_RUNTIME_2 = "defaultRuntime2";
  public static final String DEFAULT_RUNTIME_3 = "defaultRuntime3";
  public static final String DEFAULT_RUNTIME_4 = "defaultRuntime4";
  public static final String VIEWER_SYNC_FOR_WEBSERVICES = "viewerSyncForWebservices";
}

/* Location:
 * Qualified Name:     org.eclipse.wst.project.facet.IProductConstants
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.project.facet;

import org.eclipse.wst.common.frameworks.datamodel.IDataModelProperties;

public abstract interface ISimpleWebFacetInstallDataModelProperties
  extends IDataModelProperties
{
  public static final Class _provider_class = SimpleWebFacetProjectCreationDataModelProvider.class;
  public static final String CONTENT_DIR = "IStaticWebFacetInstallDataModelProperties.CONTENT_DIR";
  public static final String CONTEXT_ROOT = "IStaticWebFacetInstallDataModelProperties.CONTEXT_ROOT";
}

/* Location:
 * Qualified Name:     org.eclipse.wst.project.facet.ISimpleWebFacetInstallDataModelProperties
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.project.facet;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import org.eclipse.core.runtime.IProduct;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.preferences.IPreferencesService;
import org.eclipse.wst.common.project.facet.core.runtime.IRuntime;
import org.eclipse.wst.common.project.facet.core.runtime.IRuntimeComponent;
import org.eclipse.wst.common.project.facet.core.runtime.IRuntimeComponentType;
import org.eclipse.wst.common.project.facet.core.runtime.IRuntimeComponentVersion;
import org.eclipse.wst.common.project.facet.core.runtime.RuntimeManager;
import org.eclipse.wst.web.internal.WSTWebPlugin;

public class ProductManager
{
  private static final String APPLICATION_CONTENT_FOLDER = "EarContent";
  private static final String WEB_CONTENT_FOLDER = "WebContent";
  private static final String EJB_CONTENT_FOLDER = "ejbModule";
  private static final String APP_CLIENT_CONTENT_FOLDER = "appClientModule";
  private static final String JCA_CONTENT_FOLDER = "connectorModule";
  private static final String DEFAULT_SOURCE_FOLDER = "src";
  private static final String ADD_TO_EAR_BY_DEFAULT = "false";
  private static final String OUTPUT_FOLDER = "build/classes";
  private static final String USE_SINGLE_ROOT_STRUCTURE = "false";
  private static final String VIEWER_SYNC_FOR_WEBSERVICES = "true";
  private static final String ID_PERSPECTIVE_HIERARCHY_VIEW = "org.eclipse.ui.navigator.ProjectExplorer";
  private static final String SHOW_JAVA_EE_MODULE_DEPENDENCY_PAGE = "true";
  private static final String FINAL_PERSPECTIVE = "org.eclipse.jst.j2ee.J2EEPerspective";
  private static final String FINAL_WEB_PERSPECTIVE = "org.eclipse.wst.web.ui.webDevPerspective";
  private static final String DYNAMIC_WEB_GENERATE_DD = "true";
  private static final char RUNTIME_SEPARATOR = ':';
  private static final String[] DEFAULT_RUNTIME_KEYS = { "defaultRuntime1", 
    "defaultRuntime2", 
    "defaultRuntime3", 
    "defaultRuntime4" };
  
  public static String getProperty(String key)
  {
    if (key == null) {
      return null;
    }
    String value = null;
    if (Platform.getProduct() != null) {
      value = Platform.getProduct().getProperty(key);
    }
    if (value == null) {
      value = Platform.getPreferencesService().getString("org.eclipse.wst.web", key, null, null);
    }
    if (value == null)
    {
      if (key.equals("earContent")) {
        return "EarContent";
      }
      if (key.equals("webContent")) {
        return "WebContent";
      }
      if (key.equals("ejbContent")) {
        return "ejbModule";
      }
      if (key.equals("appClientContent")) {
        return "appClientModule";
      }
      if (key.equals("jcaContent")) {
        return "connectorModule";
      }
      if (key.equals("defaultSource")) {
        return "src";
      }
      if (key.equals("addToEarByDefault")) {
        return "false";
      }
      if (key.equals("useSingleRootStructure")) {
        return "false";
      }
      if (key.equals("viewerSyncForWebservices")) {
        return "true";
      }
      if (key.equals("outputFolder")) {
        return "build/classes";
      }
      if (key.equals("idPerspectiveHierarchyView")) {
        return "org.eclipse.ui.navigator.ProjectExplorer";
      }
      if (key.equals("finalPerspectiveAppClient")) {
        return "org.eclipse.jst.j2ee.J2EEPerspective";
      }
      if (key.equals("finalPerspectiveEar")) {
        return "org.eclipse.jst.j2ee.J2EEPerspective";
      }
      if (key.equals("finalPerspectiveEjb")) {
        return "org.eclipse.jst.j2ee.J2EEPerspective";
      }
      if (key.equals("finalPerspectiveJca")) {
        return "org.eclipse.jst.j2ee.J2EEPerspective";
      }
      if (key.equals("finalPerspectiveStaticWeb")) {
        return "org.eclipse.wst.web.ui.webDevPerspective";
      }
      if (key.equals("finalPerspectiveUtility")) {
        return "org.eclipse.jst.j2ee.J2EEPerspective";
      }
      if (key.equals("finalPerspectiveWeb")) {
        return "org.eclipse.jst.j2ee.J2EEPerspective";
      }
      if (key.equals("showJavaEEModuleDependencyPage")) {
        return "true";
      }
      if (key.equals("dynamic_web_generate_dd")) {
        return "true";
      }
      if (key.equals("ejb_interface_package_suffix")) {
        return "";
      }
    }
    return value;
  }
  
  public static boolean shouldAddToEARByDefault()
  {
    String value = getProperty("addToEarByDefault");
    return Boolean.valueOf(value).booleanValue();
  }
  
  public static boolean shouldUseSingleRootStructure()
  {
    String value = getProperty("useSingleRootStructure");
    return Boolean.valueOf(value).booleanValue();
  }
  
  public static boolean shouldUseViewerSyncForWebservices()
  {
    String value = getProperty("viewerSyncForWebservices");
    return Boolean.valueOf(value).booleanValue();
  }
  
  public static List getDefaultRuntimes()
  {
    List theRuntimes = null;
    Set runtimes = RuntimeManager.getRuntimes();
    if (!runtimes.isEmpty())
    {
      IRuntime defaultRuntime = null;
      for (int i = 0; i < DEFAULT_RUNTIME_KEYS.length; i++)
      {
        defaultRuntime = getMatchingRuntime(DEFAULT_RUNTIME_KEYS[i], runtimes);
        if (defaultRuntime != null)
        {
          if (theRuntimes == null) {
            theRuntimes = new ArrayList(DEFAULT_RUNTIME_KEYS.length);
          }
          theRuntimes.add(defaultRuntime);
        }
      }
    }
    if (theRuntimes == null) {
      theRuntimes = Collections.EMPTY_LIST;
    }
    return theRuntimes;
  }
  
  private static IRuntime getMatchingRuntime(String defaultProductRuntimeProperty, Set runtimes)
  {
    String defaultProductRuntimeKey = getProperty(defaultProductRuntimeProperty);
    if ((defaultProductRuntimeKey == null) || (defaultProductRuntimeKey.length() == 0)) {
      return null;
    }
    int seperatorIndex = defaultProductRuntimeKey.indexOf(':');
    if ((seperatorIndex < 0) && (seperatorIndex < defaultProductRuntimeKey.length()))
    {
      WSTWebPlugin.logError("Invalid default product runtime id.  It should follow the format <facet runtime id>:<facet version>.  Id processed: " + defaultProductRuntimeKey);
      return null;
    }
    String defaultRuntimeID = defaultProductRuntimeKey.substring(0, seperatorIndex);
    String defaultFacetVersion = defaultProductRuntimeKey.substring(seperatorIndex + 1);
    for (Iterator runtimeIt = runtimes.iterator(); runtimeIt.hasNext();)
    {
      IRuntime runtime = (IRuntime)runtimeIt.next();
      List runtimeComps = runtime.getRuntimeComponents();
      if (!runtimeComps.isEmpty()) {
        for (Iterator compsIter = runtimeComps.iterator(); compsIter.hasNext();)
        {
          IRuntimeComponent runtimeComp = (IRuntimeComponent)compsIter.next();
          if ((defaultRuntimeID.equals(runtimeComp.getRuntimeComponentType().getId())) && 
            (defaultFacetVersion.equals(runtimeComp.getRuntimeComponentVersion().getVersionString()))) {
            return runtime;
          }
        }
      }
    }
    return null;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.wst.project.facet.ProductManager
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.project.facet;

import com.ibm.icu.text.UTF16;
import com.ibm.icu.util.StringTokenizer;
import java.util.Set;
import org.eclipse.core.internal.resources.ResourceStatus;
import org.eclipse.core.internal.utils.Messages;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
import org.eclipse.osgi.util.NLS;
import org.eclipse.wst.common.componentcore.datamodel.FacetInstallDataModelProvider;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.common.frameworks.internal.plugin.WTPCommonPlugin;
import org.eclipse.wst.web.internal.ResourceHandler;

public class SimpleWebFacetInstallDataModelProvider
  extends FacetInstallDataModelProvider
  implements ISimpleWebFacetInstallDataModelProperties
{
  public Set getPropertyNames()
  {
    Set names = super.getPropertyNames();
    names.add("IStaticWebFacetInstallDataModelProperties.CONTENT_DIR");
    names.add("IStaticWebFacetInstallDataModelProperties.CONTEXT_ROOT");
    return names;
  }
  
  public Object getDefaultProperty(String propertyName)
  {
    if (propertyName.equals("IStaticWebFacetInstallDataModelProperties.CONTENT_DIR")) {
      return "WebContent";
    }
    if (propertyName.equals("IStaticWebFacetInstallDataModelProperties.CONTEXT_ROOT")) {
      return getStringProperty("IFacetDataModelProperties.FACET_PROJECT_NAME").replace(' ', '_');
    }
    if (propertyName.equals("IFacetDataModelProperties.FACET_ID")) {
      return "wst.web";
    }
    return super.getDefaultProperty(propertyName);
  }
  
  public boolean propertySet(String propertyName, Object propertyValue)
  {
    if ("IFacetDataModelProperties.FACET_PROJECT_NAME".equals(propertyName)) {
      model.notifyPropertyChange("IStaticWebFacetInstallDataModelProperties.CONTEXT_ROOT", 4);
    }
    return super.propertySet(propertyName, propertyValue);
  }
  
  public IStatus validate(String name)
  {
    if (name.equals("IStaticWebFacetInstallDataModelProperties.CONTEXT_ROOT")) {
      return validateContextRoot(getStringProperty("IStaticWebFacetInstallDataModelProperties.CONTEXT_ROOT"));
    }
    if (name.equals("IStaticWebFacetInstallDataModelProperties.CONTENT_DIR"))
    {
      String folderName = model.getStringProperty("IStaticWebFacetInstallDataModelProperties.CONTENT_DIR");
      if ((folderName == null) || (folderName.length() == 0) || (folderName.equals("/")) || (folderName.equals("\\")))
      {
        String errorMessage = WTPCommonPlugin.getResourceString("40");
        return WTPCommonPlugin.createErrorStatus(errorMessage);
      }
      IStatus status = validateFolderName(folderName);
      if (status.isOK()) {
        if (folderName.indexOf('#') != -1)
        {
          String message = NLS.bind(Messages.resources_invalidCharInName, "#", folderName);
          status = new ResourceStatus(77, null, message);
        }
      }
      return status;
    }
    return super.validate(name);
  }
  
  protected IStatus validateContextRoot(String contextRoot)
  {
    if ((contextRoot == null) || (contextRoot.length() == 0)) {
      return new ResourceStatus(77, null, ResourceHandler.Context_Root_cannot_be_empty_2);
    }
    if (contextRoot.trim().equals(contextRoot))
    {
      StringTokenizer stok = new StringTokenizer(contextRoot, ".");
      String token;
      int i;
      for (; stok.hasMoreTokens(); i < token.length())
      {
        token = stok.nextToken();
        
        i = 0; continue;
        int cp = UTF16.charAt(token, i);
        if (token.charAt(i) == ' ') {
          return new ResourceStatus(77, null, ResourceHandler.Names_cannot_contain_whitespace);
        }
        if ((token.charAt(i) != '_') && (token.charAt(i) != '-') && (token.charAt(i) != '/') && (!Character.isLetterOrDigit(token.charAt(i))))
        {
          String invalidCharString = null;
          if (UTF16.getCharCount(cp) > 1) {
            invalidCharString = UTF16.valueOf(cp);
          } else {
            invalidCharString = new Character(token.charAt(i)).toString();
          }
          Object[] invalidChar = { invalidCharString };
          String errorStatus = ResourceHandler.getString(ResourceHandler.The_character_is_invalid_in_a_context_root, invalidChar);
          return new ResourceStatus(77, null, errorStatus);
        }
        i += UTF16.getCharCount(cp);
      }
    }
    else
    {
      return new ResourceStatus(77, null, ResourceHandler.Names_cannot_contain_whitespace);
    }
    return OK_STATUS;
  }
  
  protected IStatus validateFolderName(String folderName)
  {
    if ((folderName == null) || (folderName.length() == 0)) {
      return OK_STATUS;
    }
    IWorkspace workspace = ResourcesPlugin.getWorkspace();
    IPath path = new Path(folderName);
    int i = 0;
    for (int max = path.segmentCount(); i < max; i++)
    {
      IStatus status = workspace.validateName(path.segment(i), 2);
      if (!status.isOK()) {
        return status;
      }
    }
    return OK_STATUS;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.wst.project.facet.SimpleWebFacetInstallDataModelProvider
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.project.facet;

import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IProjectDescription;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.wst.common.componentcore.ComponentCore;
import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
import org.eclipse.wst.common.componentcore.resources.IVirtualFolder;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.common.project.facet.core.IDelegate;

public class SimpleWebFacetInstallDelegate
  implements IDelegate
{
  /* Error */
  public void execute(IProject project, org.eclipse.wst.common.project.facet.core.IProjectFacetVersion fv, Object config, org.eclipse.core.runtime.IProgressMonitor monitor)
    throws CoreException
  {
    // Byte code:
    //   0: aload 4
    //   2: ifnull +13 -> 15
    //   5: aload 4
    //   7: ldc 1
    //   9: iconst_1
    //   10: invokeinterface 224 3 0
    //   15: aload_3
    //   16: checkcast 108	org/eclipse/wst/common/frameworks/datamodel/IDataModel
    //   19: astore 5
    //   21: aload_0
    //   22: aload_1
    //   23: invokespecial 206	org/eclipse/wst/project/facet/SimpleWebFacetInstallDelegate:addNatures	(Lorg/eclipse/core/resources/IProject;)V
    //   26: aload_1
    //   27: iconst_0
    //   28: invokestatic 203	org/eclipse/wst/common/componentcore/ComponentCore:createComponent	(Lorg/eclipse/core/resources/IProject;Z)Lorg/eclipse/wst/common/componentcore/resources/IVirtualComponent;
    //   31: astore 6
    //   33: aload 6
    //   35: iconst_0
    //   36: aconst_null
    //   37: invokeinterface 226 3 0
    //   42: invokestatic 200	org/eclipse/core/resources/ResourcesPlugin:getWorkspace	()Lorg/eclipse/core/resources/IWorkspace;
    //   45: astore 7
    //   47: aload_1
    //   48: invokeinterface 213 1 0
    //   53: astore 8
    //   55: aload_0
    //   56: aload 5
    //   58: aload 8
    //   60: aload_1
    //   61: invokespecial 207	org/eclipse/wst/project/facet/SimpleWebFacetInstallDelegate:setContentPropertyIfNeeded	(Lorg/eclipse/wst/common/frameworks/datamodel/IDataModel;Lorg/eclipse/core/runtime/IPath;Lorg/eclipse/core/resources/IProject;)Lorg/eclipse/core/runtime/IPath;
    //   64: astore 9
    //   66: aload 7
    //   68: invokeinterface 218 1 0
    //   73: aload 9
    //   75: invokeinterface 219 2 0
    //   80: invokestatic 205	org/eclipse/wst/project/facet/SimpleWebFacetInstallDelegate:mkdirs	(Lorg/eclipse/core/resources/IFolder;)V
    //   83: aload 6
    //   85: invokeinterface 227 1 0
    //   90: astore 10
    //   92: aload 10
    //   94: invokeinterface 229 1 0
    //   99: new 103	org/eclipse/core/runtime/Path
    //   102: dup
    //   103: ldc 2
    //   105: invokespecial 201	org/eclipse/core/runtime/Path:<init>	(Ljava/lang/String;)V
    //   108: invokeinterface 221 2 0
    //   113: ifeq +43 -> 156
    //   116: aload 10
    //   118: new 103	org/eclipse/core/runtime/Path
    //   121: dup
    //   122: new 90	java/lang/StringBuilder
    //   125: dup
    //   126: ldc 2
    //   128: invokespecial 197	java/lang/StringBuilder:<init>	(Ljava/lang/String;)V
    //   131: aload 5
    //   133: ldc 4
    //   135: invokeinterface 232 2 0
    //   140: invokevirtual 198	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   143: invokevirtual 196	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   146: invokespecial 201	org/eclipse/core/runtime/Path:<init>	(Ljava/lang/String;)V
    //   149: iconst_0
    //   150: aconst_null
    //   151: invokeinterface 230 4 0
    //   156: aload_1
    //   157: aload 5
    //   159: ldc 5
    //   161: invokeinterface 232 2 0
    //   166: invokestatic 204	org/eclipse/wst/common/componentcore/internal/util/ComponentUtilities:setServerContextRoot	(Lorg/eclipse/core/resources/IProject;Ljava/lang/String;)V
    //   169: aload 5
    //   171: ldc 3
    //   173: invokeinterface 231 2 0
    //   178: checkcast 109	org/eclipse/wst/common/frameworks/datamodel/IDataModelOperation
    //   181: aload 4
    //   183: aconst_null
    //   184: invokeinterface 233 3 0
    //   189: pop
    //   190: goto +30 -> 220
    //   193: astore 11
    //   195: aload 11
    //   197: invokestatic 208	org/eclipse/wst/web/internal/WSTWebPlugin:logError	(Ljava/lang/Throwable;)V
    //   200: goto +20 -> 220
    //   203: astore 12
    //   205: aload 4
    //   207: ifnull +10 -> 217
    //   210: aload 4
    //   212: invokeinterface 223 1 0
    //   217: aload 12
    //   219: athrow
    //   220: aload 4
    //   222: ifnull +10 -> 232
    //   225: aload 4
    //   227: invokeinterface 223 1 0
    //   232: return
    // Line number table:
    //   Java source line #38	-> byte code offset #0
    //   Java source line #39	-> byte code offset #5
    //   Java source line #41	-> byte code offset #15
    //   Java source line #42	-> byte code offset #21
    //   Java source line #43	-> byte code offset #26
    //   Java source line #44	-> byte code offset #33
    //   Java source line #46	-> byte code offset #42
    //   Java source line #47	-> byte code offset #47
    //   Java source line #48	-> byte code offset #55
    //   Java source line #49	-> byte code offset #66
    //   Java source line #51	-> byte code offset #83
    //   Java source line #52	-> byte code offset #92
    //   Java source line #53	-> byte code offset #116
    //   Java source line #56	-> byte code offset #156
    //   Java source line #59	-> byte code offset #169
    //   Java source line #60	-> byte code offset #193
    //   Java source line #61	-> byte code offset #195
    //   Java source line #63	-> byte code offset #203
    //   Java source line #64	-> byte code offset #205
    //   Java source line #65	-> byte code offset #210
    //   Java source line #66	-> byte code offset #217
    //   Java source line #64	-> byte code offset #220
    //   Java source line #65	-> byte code offset #225
    //   Java source line #67	-> byte code offset #232
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	233	0	this	SimpleWebFacetInstallDelegate
    //   0	233	1	project	IProject
    //   0	233	2	fv	org.eclipse.wst.common.project.facet.core.IProjectFacetVersion
    //   0	233	3	config	Object
    //   0	233	4	monitor	org.eclipse.core.runtime.IProgressMonitor
    //   19	151	5	model	IDataModel
    //   31	53	6	c	IVirtualComponent
    //   45	22	7	ws	org.eclipse.core.resources.IWorkspace
    //   53	6	8	pjpath	IPath
    //   64	10	9	contentdir	IPath
    //   90	27	10	webroot	IVirtualFolder
    //   193	3	11	e	org.eclipse.core.commands.ExecutionException
    //   203	15	12	localObject	Object
    // Exception table:
    //   from	to	target	type
    //   169	190	193	org/eclipse/core/commands/ExecutionException
    //   15	203	203	finally
  }
  
  private IPath setContentPropertyIfNeeded(IDataModel model, IPath pjpath, IProject project)
  {
    IVirtualComponent c = ComponentCore.createComponent(project);
    if ((c.exists()) && 
      (!c.getRootFolder().getProjectRelativePath().isRoot())) {
      return c.getRootFolder().getUnderlyingResource().getFullPath();
    }
    return pjpath.append(model.getStringProperty("IStaticWebFacetInstallDataModelProperties.CONTENT_DIR"));
  }
  
  private void addNatures(IProject project)
    throws CoreException
  {
    IProjectDescription desc = project.getDescription();
    String[] current = desc.getNatureIds();
    String[] replacement = new String[current.length + 1];
    System.arraycopy(current, 0, replacement, 0, current.length);
    replacement[current.length] = "org.eclipse.wst.common.modulecore.ModuleCoreNature";
    desc.setNatureIds(replacement);
    project.setDescription(desc, null);
  }
  
  private static void mkdirs(IFolder folder)
    throws CoreException
  {
    if (!folder.exists())
    {
      if ((folder.getParent() instanceof IFolder)) {
        mkdirs((IFolder)folder.getParent());
      }
      folder.create(true, true, null);
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.wst.project.facet.SimpleWebFacetInstallDelegate
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.project.facet;

import java.util.ArrayList;
import java.util.Collection;
import org.eclipse.wst.common.componentcore.datamodel.FacetProjectCreationDataModelProvider;
import org.eclipse.wst.common.project.facet.core.IProjectFacet;
import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;

public class SimpleWebFacetProjectCreationDataModelProvider
  extends FacetProjectCreationDataModelProvider
{
  public void init()
  {
    super.init();
    
    Collection<IProjectFacet> requiredFacets = new ArrayList();
    requiredFacets.add(ProjectFacetsManager.getProjectFacet("wst.web"));
    setProperty("FacetProjectCreationDataModelProvider.REQUIRED_FACETS_COLLECTION", requiredFacets);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.wst.project.facet.SimpleWebFacetProjectCreationDataModelProvider
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.project.facet;

import org.eclipse.wst.common.project.facet.core.IDelegate;

public class SimpleWebFacetUninstallDelegate
  implements IDelegate
{
  /* Error */
  public void execute(org.eclipse.core.resources.IProject project, org.eclipse.wst.common.project.facet.core.IProjectFacetVersion fv, Object config, org.eclipse.core.runtime.IProgressMonitor monitor)
    throws org.eclipse.core.runtime.CoreException
  {
    // Byte code:
    //   0: aload 4
    //   2: ifnull +13 -> 15
    //   5: aload 4
    //   7: ldc 1
    //   9: iconst_1
    //   10: invokeinterface 63 3 0
    //   15: aload_1
    //   16: getstatic 57	org/eclipse/wst/common/componentcore/internal/StructureEdit:MODULE_META_FILE_NAME	Ljava/lang/String;
    //   19: invokeinterface 61 2 0
    //   24: astore 5
    //   26: aload 5
    //   28: iconst_1
    //   29: aload 4
    //   31: invokeinterface 60 3 0
    //   36: aload_1
    //   37: ldc 2
    //   39: invokestatic 59	org/eclipse/jem/util/emf/workbench/ProjectUtilities:removeNatureFromProject	(Lorg/eclipse/core/resources/IProject;Ljava/lang/String;)V
    //   42: goto +20 -> 62
    //   45: astore 6
    //   47: aload 4
    //   49: ifnull +10 -> 59
    //   52: aload 4
    //   54: invokeinterface 62 1 0
    //   59: aload 6
    //   61: athrow
    //   62: aload 4
    //   64: ifnull +10 -> 74
    //   67: aload 4
    //   69: invokeinterface 62 1 0
    //   74: return
    // Line number table:
    //   Java source line #30	-> byte code offset #0
    //   Java source line #31	-> byte code offset #5
    //   Java source line #34	-> byte code offset #15
    //   Java source line #35	-> byte code offset #26
    //   Java source line #38	-> byte code offset #36
    //   Java source line #39	-> byte code offset #45
    //   Java source line #40	-> byte code offset #47
    //   Java source line #41	-> byte code offset #52
    //   Java source line #42	-> byte code offset #59
    //   Java source line #40	-> byte code offset #62
    //   Java source line #41	-> byte code offset #67
    //   Java source line #43	-> byte code offset #74
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	75	0	this	SimpleWebFacetUninstallDelegate
    //   0	75	1	project	org.eclipse.core.resources.IProject
    //   0	75	2	fv	org.eclipse.wst.common.project.facet.core.IProjectFacetVersion
    //   0	75	3	config	Object
    //   0	75	4	monitor	org.eclipse.core.runtime.IProgressMonitor
    //   24	3	5	file	org.eclipse.core.resources.IFile
    //   45	15	6	localObject	Object
    // Exception table:
    //   from	to	target	type
    //   15	45	45	finally
  }
}

/* Location:
 * Qualified Name:     org.eclipse.wst.project.facet.SimpleWebFacetUninstallDelegate
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.web.internal;

import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IContributor;
import org.eclipse.core.runtime.IExtension;
import org.eclipse.core.runtime.InvalidRegistryObjectException;

public class DelegateConfigurationElement
  implements IConfigurationElement
{
  private final IConfigurationElement delegateElement;
  private static final String DELEGATE_NAME = "delegateConfigurationElement";
  private static final String DELEGATE_NAMESPACE = "delegateConfigurationElementNamespace";
  private static final String DELEGATE_NULL_STRING = "delegateConfigurationElement: NULL";
  
  public DelegateConfigurationElement(IConfigurationElement aDelegate)
  {
    delegateElement = aDelegate;
  }
  
  public Object createExecutableExtension(String propertyName)
    throws CoreException
  {
    if (delegateElement == null) {
      return null;
    }
    return delegateElement.createExecutableExtension(propertyName);
  }
  
  public boolean equals(Object obj)
  {
    if (delegateElement == null) {
      return false;
    }
    return delegateElement.equals(obj);
  }
  
  public String getAttribute(String name)
    throws InvalidRegistryObjectException
  {
    if (delegateElement == null) {
      return null;
    }
    return delegateElement.getAttribute(name);
  }
  
  public String getAttributeAsIs(String name)
    throws InvalidRegistryObjectException
  {
    if (delegateElement == null) {
      return null;
    }
    return delegateElement.getAttributeAsIs(name);
  }
  
  public String[] getAttributeNames()
    throws InvalidRegistryObjectException
  {
    if (delegateElement == null) {
      return new String[0];
    }
    return delegateElement.getAttributeNames();
  }
  
  public IConfigurationElement[] getChildren()
    throws InvalidRegistryObjectException
  {
    if (delegateElement == null) {
      return new IConfigurationElement[0];
    }
    return delegateElement.getChildren();
  }
  
  public IConfigurationElement[] getChildren(String name)
    throws InvalidRegistryObjectException
  {
    if (delegateElement == null) {
      return new IConfigurationElement[0];
    }
    return delegateElement.getChildren(name);
  }
  
  public IExtension getDeclaringExtension()
    throws InvalidRegistryObjectException
  {
    if (delegateElement == null) {
      throw new InvalidRegistryObjectException();
    }
    return delegateElement.getDeclaringExtension();
  }
  
  public String getName()
    throws InvalidRegistryObjectException
  {
    if (delegateElement == null) {
      return "delegateConfigurationElement";
    }
    return delegateElement.getName();
  }
  
  public String getNamespace()
    throws InvalidRegistryObjectException
  {
    if (delegateElement == null) {
      return "delegateConfigurationElementNamespace";
    }
    return delegateElement.getNamespace();
  }
  
  public Object getParent()
    throws InvalidRegistryObjectException
  {
    if (delegateElement == null) {
      return null;
    }
    return delegateElement.getParent();
  }
  
  public String getValue()
    throws InvalidRegistryObjectException
  {
    if (delegateElement == null) {
      return null;
    }
    return delegateElement.getValue();
  }
  
  public String getValueAsIs()
    throws InvalidRegistryObjectException
  {
    if (delegateElement == null) {
      return null;
    }
    return delegateElement.getValueAsIs();
  }
  
  public int hashCode()
  {
    if (delegateElement == null) {
      return -1;
    }
    return delegateElement.hashCode();
  }
  
  public boolean isValid()
  {
    if (delegateElement == null) {
      return false;
    }
    return delegateElement.isValid();
  }
  
  public String toString()
  {
    if (delegateElement == null) {
      return "delegateConfigurationElement: NULL";
    }
    return delegateElement.toString();
  }
  
  public IConfigurationElement toEquinox()
  {
    return null;
  }
  
  public IContributor getContributor()
    throws InvalidRegistryObjectException
  {
    if (delegateElement == null) {
      throw new InvalidRegistryObjectException();
    }
    return delegateElement.getContributor();
  }
  
  public String getNamespaceIdentifier()
    throws InvalidRegistryObjectException
  {
    if (delegateElement == null) {
      return "delegateConfigurationElementNamespace";
    }
    return delegateElement.getNamespaceIdentifier();
  }
  
  public String getAttribute(String attrName, String locale)
    throws InvalidRegistryObjectException
  {
    if (delegateElement == null) {
      return null;
    }
    return delegateElement.getAttribute(attrName, locale);
  }
  
  public String getValue(String locale)
    throws InvalidRegistryObjectException
  {
    if (delegateElement == null) {
      return null;
    }
    return delegateElement.getValue(locale);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.wst.web.internal.DelegateConfigurationElement
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.web.internal;

public abstract interface ISimpleWebModuleConstants
{
  public static final String PLUG_IN_ID = "org.eclipse.wst.web";
  public static final String STATIC_PROJECT_TYPE = "STATIC";
  public static final String CSS_DIRECTORY = "theme";
  public static final String INFO_DIRECTORY = "WEB-INF";
  public static final String LIBRARY_DIRECTORY = "lib";
  public static final String CLASSES_DIRECTORY = "classes";
}

/* Location:
 * Qualified Name:     org.eclipse.wst.web.internal.ISimpleWebModuleConstants
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.web.internal;

public abstract interface IWSTWebPreferences
{
  public static final String PREF_STATICWEBCONTENT = "org.eclipse.jst.j2ee.preference.staticWebContentName";
}

/* Location:
 * Qualified Name:     org.eclipse.wst.web.internal.IWSTWebPreferences
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.web.internal;

import org.eclipse.osgi.util.NLS;

public final class ResourceHandler
  extends NLS
{
  private static final String BUNDLE_NAME = "staticwebproject";
  public static String StaticWebProjectCreationWizard_Wizard_Title;
  public static String StaticWebProjectWizardBasePage_Page_Description;
  public static String StaticWebSettingsPropertiesPage_Web_Content_Label;
  public static String StaticContextRootComposite_Context_Root_Label;
  public static String StaticWebProjectWizardBasePage_Page_Title;
  public static String StaticWebSettingsPropertiesPage_Not_available_for_closed_projects;
  public static String TargetRuntime;
  public static String NewDotDotDot;
  public static String InvalidServerTarget;
  public static String ConfigureSettings;
  public static String Context_Root_cannot_be_empty_2;
  public static String Names_cannot_contain_whitespace;
  public static String The_character_is_invalid_in_a_context_root;
  
  static
  {
    NLS.initializeMessages("staticwebproject", ResourceHandler.class);
  }
  
  public static String getString(String key, Object[] args)
  {
    return NLS.bind(key, args);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.wst.web.internal.ResourceHandler
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.web.internal;

import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.ILog;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.MultiStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Plugin;
import org.eclipse.core.runtime.Status;

public class WSTWebPlugin
  extends Plugin
{
  private static WSTWebPlugin plugin;
  private WSTWebPreferences preferences;
  public static final String VALIDATION_BUILDER_ID = "org.eclipse.wst.validation.validationbuilder";
  public static final String[] ICON_DIRS = { "icons/full/obj16", 
    "icons/full/ctool16", 
    "icons/full/wizban", 
    "icons", 
    "" };
  public static final String PLUGIN_ID = "org.eclipse.wst.web";
  
  public WSTWebPlugin()
  {
    plugin = this;
  }
  
  public static WSTWebPlugin getDefault()
  {
    return plugin;
  }
  
  public static IWorkspace getWorkspace()
  {
    return ResourcesPlugin.getWorkspace();
  }
  
  protected void initializeDefaultPluginPreferences()
  {
    getWSTWebPreferences().initializeDefaultPreferences();
  }
  
  public WSTWebPreferences getWSTWebPreferences()
  {
    if (preferences == null) {
      preferences = new WSTWebPreferences(this);
    }
    return preferences;
  }
  
  public static IStatus createStatus(int severity, String message, Throwable exception)
  {
    return new Status(severity, "org.eclipse.wst.web", message, exception);
  }
  
  public static IStatus createStatus(int severity, String message)
  {
    return createStatus(severity, message, null);
  }
  
  public static void logError(String message)
  {
    Platform.getLog(Platform.getBundle("org.eclipse.wst.web")).log(createStatus(4, message));
  }
  
  public static void logError(String message, Throwable exception)
  {
    Platform.getLog(Platform.getBundle("org.eclipse.wst.web")).log(createStatus(4, message, exception));
  }
  
  public static void logError(String message, CoreException exception)
  {
    MultiStatus status = new MultiStatus("org.eclipse.wst.web", 4, new IStatus[] { exception.getStatus() }, message, exception);
    Platform.getLog(Platform.getBundle("org.eclipse.wst.web")).log(status);
  }
  
  public static void logError(Throwable exception)
  {
    Platform.getLog(Platform.getBundle("org.eclipse.wst.web")).log(createStatus(4, exception.getMessage(), exception));
  }
  
  public static void logError(CoreException exception)
  {
    Platform.getLog(Platform.getBundle("org.eclipse.wst.web")).log(exception.getStatus());
  }
}

/* Location:
 * Qualified Name:     org.eclipse.wst.web.internal.WSTWebPlugin
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.web.internal;

public abstract interface WSTWebPreferences$Defaults
{
  public static final String STATIC_WEB_CONTENT = "WebContent";
}

/* Location:
 * Qualified Name:     org.eclipse.wst.web.internal.WSTWebPreferences.Defaults
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.web.internal;

public abstract interface WSTWebPreferences$Keys
{
  public static final String STATIC_WEB_CONTENT = "org.eclipse.jst.j2ee.preference.staticWebContentName";
}

/* Location:
 * Qualified Name:     org.eclipse.wst.web.internal.WSTWebPreferences.Keys
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.web.internal;

public abstract interface WSTWebPreferences$Values
{
  public static final String STATIC_WEB_CONTENT = "WebContent";
}

/* Location:
 * Qualified Name:     org.eclipse.wst.web.internal.WSTWebPreferences.Values
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.web.internal;

import org.eclipse.core.runtime.Plugin;
import org.eclipse.core.runtime.Preferences;

public class WSTWebPreferences
{
  private Plugin owner = null;
  private Preferences preferences = null;
  private boolean persistOnChange = false;
  
  public WSTWebPreferences(Plugin owner)
  {
    this.owner 
1 2 3

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2017. Infinite Loop Ltd