org.eclipse.wst.web.ui_1.1.500.v201111030500

16:49:30.930 INFO  jd.cli.Main - Decompiling org.eclipse.wst.web.ui_1.1.500.v201111030500.jar
package org.eclipse.wst.web.ui.internal;

import org.eclipse.core.runtime.ILog;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
import org.osgi.framework.Bundle;

public class Logger
{
  private static final String PLUGIN_ID = "org.eclipse.wst.web.ui";
  public static final boolean DEBUG = (Platform.inDebugMode()) && ("true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.wst.web.ui/debug")));
  public static final int OK = 0;
  public static final int INFO = 1;
  public static final int WARNING = 2;
  public static final int ERROR = 4;
  
  private static void _log(int level, String message, Throwable exception)
  {
    Status statusObj = new Status(level, "org.eclipse.wst.web.ui", level, message, exception);
    Bundle bundle = Platform.getBundle("org.eclipse.wst.web.ui");
    if (bundle != null) {
      Platform.getLog(bundle).log(statusObj);
    }
  }
  
  public static void log(int level, String message)
  {
    _log(level, message, null);
  }
  
  public static void log(int level, String message, Throwable exception)
  {
    _log(level, message, exception);
  }
  
  public static void logException(String message, Throwable exception)
  {
    _log(4, message, exception);
  }
  
  public static void logException(Throwable exception)
  {
    _log(4, exception.getMessage(), exception);
  }
}

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

import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.views.markers.WorkbenchMarkerResolution;
import org.eclipse.wst.common.componentcore.internal.ModuleMigratorManager;

class ModuleCoreValidatorMarkerResolutions$ModuleCoreMigrationResolution
  extends WorkbenchMarkerResolution
{
  private final IMarker theMarker;
  private final String MARKERTYPE = "org.eclipse.wst.common.modulecore.ModuleCoreValidatorMarker";
  
  public ModuleCoreValidatorMarkerResolutions$ModuleCoreMigrationResolution(ModuleCoreValidatorMarkerResolutions paramModuleCoreValidatorMarkerResolutions, IMarker marker)
  {
    theMarker = marker;
  }
  
  public String getLabel()
  {
    return ModuleCoreValidatorMarkerResolutions.Resources.migrateMetaData;
  }
  
  public void run(IMarker marker)
  {
    IProject proj = marker.getResource().getProject();
    try
    {
      ModuleMigratorManager manager = ModuleMigratorManager.getManager(proj);
      if ((!manager.isMigrating()) && (!ResourcesPlugin.getWorkspace().isTreeLocked())) {
        manager.migrateOldMetaData(proj, true);
      }
    }
    catch (Exception e)
    {
      WSTWebUIPlugin.logError(e);
    }
  }
  
  public String getDescription()
  {
    return ModuleCoreValidatorMarkerResolutions.Resources.migrateMetaData;
  }
  
  public Image getImage()
  {
    return null;
  }
  
  public IMarker[] findOtherMarkers(IMarker[] markers)
  {
    List marks = new ArrayList();
    for (int i = 0; i < markers.length; i++)
    {
      IMarker marker = markers[i];
      try
      {
        if ((marker.getType().equals("org.eclipse.wst.common.modulecore.ModuleCoreValidatorMarker")) && (!marker.equals(theMarker))) {
          marks.add(marker);
        }
      }
      catch (CoreException e)
      {
        WSTWebUIPlugin.logError(e);
      }
    }
    return (IMarker[])marks.toArray(new IMarker[marks.size()]);
  }
}

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

import org.eclipse.osgi.util.NLS;

final class ModuleCoreValidatorMarkerResolutions$Resources
  extends NLS
{
  public static String migrateMetaData;
  
  static
  {
    initializeMessages(ModuleCoreValidatorMarkerResolutions.class.getName(), 
      Resources.class);
  }
}

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

import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.IMarkerResolution;
import org.eclipse.ui.IMarkerResolutionGenerator;
import org.eclipse.ui.views.markers.WorkbenchMarkerResolution;
import org.eclipse.wst.common.componentcore.internal.ModuleMigratorManager;

/**
 * @deprecated
 */
public final class ModuleCoreValidatorMarkerResolutions
  implements IMarkerResolutionGenerator
{
  public IMarkerResolution[] getResolutions(IMarker marker)
  {
    return 
      new IMarkerResolution[] {
      new ModuleCoreMigrationResolution(marker) };
  }
  
  private class ModuleCoreMigrationResolution
    extends WorkbenchMarkerResolution
  {
    private final IMarker theMarker;
    private final String MARKERTYPE = "org.eclipse.wst.common.modulecore.ModuleCoreValidatorMarker";
    
    public ModuleCoreMigrationResolution(IMarker marker)
    {
      theMarker = marker;
    }
    
    public String getLabel()
    {
      return ModuleCoreValidatorMarkerResolutions.Resources.migrateMetaData;
    }
    
    public void run(IMarker marker)
    {
      IProject proj = marker.getResource().getProject();
      try
      {
        ModuleMigratorManager manager = ModuleMigratorManager.getManager(proj);
        if ((!manager.isMigrating()) && (!ResourcesPlugin.getWorkspace().isTreeLocked())) {
          manager.migrateOldMetaData(proj, true);
        }
      }
      catch (Exception e)
      {
        WSTWebUIPlugin.logError(e);
      }
    }
    
    public String getDescription()
    {
      return ModuleCoreValidatorMarkerResolutions.Resources.migrateMetaData;
    }
    
    public Image getImage()
    {
      return null;
    }
    
    public IMarker[] findOtherMarkers(IMarker[] markers)
    {
      List marks = new ArrayList();
      for (int i = 0; i < markers.length; i++)
      {
        IMarker marker = markers[i];
        try
        {
          if ((marker.getType().equals("org.eclipse.wst.common.modulecore.ModuleCoreValidatorMarker")) && (!marker.equals(theMarker))) {
            marks.add(marker);
          }
        }
        catch (CoreException e)
        {
          WSTWebUIPlugin.logError(e);
        }
      }
      return (IMarker[])marks.toArray(new IMarker[marks.size()]);
    }
  }
  
  private static final class Resources
    extends NLS
  {
    public static String migrateMetaData;
    
    static
    {
      initializeMessages(ModuleCoreValidatorMarkerResolutions.class.getName(), 
        Resources.class);
    }
  }
}

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

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

/* Location:
 * Qualified Name:     org.eclipse.wst.web.ui.internal.WSTWebPreferences.Defaults
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.web.ui.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.ui.internal.WSTWebPreferences.Keys
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.web.ui.internal;

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

/* Location:
 * Qualified Name:     org.eclipse.wst.web.ui.internal.WSTWebPreferences.Values
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.web.ui.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 = owner;
  }
  
  protected void initializeDefaultPreferences()
  {
    getPreferences().setDefault("org.eclipse.jst.j2ee.preference.staticWebContentName", "WebContent");
  }
  
  public String getStaticWebContentFolderName()
  {
    return getPreferences().getString("org.eclipse.jst.j2ee.preference.staticWebContentName");
  }
  
  public void setStaticWebContentFolderName(String value)
  {
    getPreferences().setValue("org.eclipse.jst.j2ee.preference.staticWebContentName", value);
    firePreferenceChanged();
  }
  
  public void firePreferenceChanged()
  {
    if (isPersistOnChange()) {
      persist();
    }
  }
  
  public void persist()
  {
    getOwner().savePluginPreferences();
  }
  
  public boolean isPersistOnChange()
  {
    return persistOnChange;
  }
  
  public void setPersistOnChange(boolean persistOnChange)
  {
    this.persistOnChange = persistOnChange;
  }
  
  private Preferences getPreferences()
  {
    if (preferences == null) {
      preferences = getOwner().getPluginPreferences();
    }
    return preferences;
  }
  
  private Plugin getOwner()
  {
    return owner;
  }
  
  public static abstract interface Defaults
  {
    public static final String STATIC_WEB_CONTENT = "WebContent";
  }
  
  public static abstract interface Keys
  {
    public static final String STATIC_WEB_CONTENT = "org.eclipse.jst.j2ee.preference.staticWebContentName";
  }
  
  public static abstract interface Values
  {
    public static final String STATIC_WEB_CONTENT = "WebContent";
  }
}

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

import java.net.MalformedURLException;
import java.net.URL;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.ILog;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;

public class WSTWebUIPlugin
  extends AbstractUIPlugin
{
  public static final String PLUGIN_ID = "org.eclipse.wst.web.ui";
  private static WSTWebUIPlugin plugin;
  public static final String[] ICON_DIRS = { "icons/full/obj16", 
    "icons/full/ctool16", 
    "icons/full/wizban", 
    "icons", 
    "" };
  
  public WSTWebUIPlugin()
  {
    plugin = this;
  }
  
  public void start(BundleContext context)
    throws Exception
  {
    super.start(context);
  }
  
  public void stop(BundleContext context)
    throws Exception
  {
    super.stop(context);
    plugin = null;
  }
  
  public ImageDescriptor getImageDescriptor(String key)
  {
    ImageDescriptor imageDescriptor = null;
    URL imageURL = getImageURL(key, getBundle());
    if (imageURL == null) {
      imageURL = getPNGImageURL(key, getBundle());
    }
    if (imageURL != null) {
      imageDescriptor = ImageDescriptor.createFromURL(imageURL);
    }
    return imageDescriptor;
  }
  
  public static URL getImageURL(String key, Bundle bundle)
  {
    String gif = "/" + key + ".gif";
    IPath path = null;
    for (int i = 0; i < ICON_DIRS.length; i++)
    {
      path = new Path(ICON_DIRS[i]).append(gif);
      if (bundle.getEntry(path.toString()) != null) {
        try
        {
          return new URL(bundle.getEntry("/"), path.toString());
        }
        catch (MalformedURLException exception)
        {
          Logger.log(2, "Load_Image_Error_", exception);
        }
      }
    }
    return null;
  }
  
  public static URL getPNGImageURL(String key, Bundle bundle)
  {
    String gif = "/" + key + ".png";
    IPath path = null;
    for (int i = 0; i < ICON_DIRS.length; i++)
    {
      path = new Path(ICON_DIRS[i]).append(gif);
      if (bundle.getEntry(path.toString()) != null) {
        try
        {
          return new URL(bundle.getEntry("/"), path.toString());
        }
        catch (MalformedURLException exception)
        {
          Logger.log(2, "Load_Image_Error_", exception);
        }
      }
    }
    return null;
  }
  
  public static WSTWebUIPlugin getDefault()
  {
    return plugin;
  }
  
  public static IStatus createStatus(int severity, String message, Throwable exception)
  {
    return new Status(severity, "org.eclipse.wst.web.ui", message, exception);
  }
  
  public static IStatus createStatus(int severity, String message)
  {
    return createStatus(severity, message, null);
  }
  
  public static void logError(Throwable exception)
  {
    Platform.getLog(Platform.getBundle("org.eclipse.wst.web.ui")).log(createStatus(4, exception.getMessage(), exception));
  }
  
  public static void logError(CoreException exception)
  {
    Platform.getLog(Platform.getBundle("org.eclipse.wst.web.ui")).log(exception.getStatus());
  }
}

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

import org.eclipse.ui.IFolderLayout;
import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.views.IViewRegistry;
import org.eclipse.wst.project.facet.ProductManager;

public class WebDevelopmentPerspective
  implements IPerspectiveFactory
{
  public static final String ID = "org.eclipse.wst.web.ui.webDevPerspective";
  protected static final String TOP_LEFT_LOCATION = "topLeft";
  protected static final String BOTTOM_LEFT_LOCATION = "bottomLeft";
  protected static final String BOTTOM_RIGHT_LOCATION = "bottomRight";
  protected static final String TOP_RIGHT_LOCATION = "topRight";
  protected static final String BOTTOM_LOCATION = "bottom";
  protected static String ID_PROJECT_EXPLORER = "org.eclipse.ui.navigator.ProjectExplorer";
  protected static final String ID_SERVER = "org.eclipse.wst.server.ui.ServersView";
  protected static String ID_WST_SNIPPETS_VIEW = "org.eclipse.wst.common.snippets.internal.ui.SnippetsView";
  
  public WebDevelopmentPerspective()
  {
    String viewerID = ProductManager.getProperty("idPerspectiveHierarchyView");
    if (viewerID != null) {
      if (PlatformUI.getWorkbench().getViewRegistry().find(viewerID) != null) {
        ID_PROJECT_EXPLORER = viewerID;
      }
    }
  }
  
  public void createInitialLayout(IPageLayout layout)
  {
    String editorArea = layout.getEditorArea();
    
    IFolderLayout topLeft = layout.createFolder("topLeft", 
      1, 0.25F, editorArea);
    topLeft.addView(ID_PROJECT_EXPLORER);
    topLeft.addPlaceholder("org.eclipse.ui.views.ResourceNavigator");
    
    IFolderLayout topRight = layout.createFolder("topRight", 
      2, 0.8F, editorArea);
    topRight.addView("org.eclipse.ui.views.ContentOutline");
    topRight.addView(ID_WST_SNIPPETS_VIEW);
    
    IFolderLayout bottom = layout.createFolder("bottom", 
      4, 0.7F, editorArea);
    bottom.addView("org.eclipse.ui.views.ProblemView");
    bottom.addView("org.eclipse.wst.server.ui.ServersView");
    bottom.addView("org.eclipse.ui.views.PropertySheet");
    bottom.addPlaceholder("org.eclipse.search.ui.views.SearchView");
    bottom.addPlaceholder("org.eclipse.ui.console.ConsoleView");
    bottom.addPlaceholder("org.eclipse.ui.views.BookmarkView");
    bottom.addPlaceholder("org.eclipse.ui.views.ProgressView");
    bottom.addPlaceholder("org.eclipse.ui.views.TaskList");
  }
}

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

import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.ISelectionService;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.IWorkbenchWindowActionDelegate;
import org.eclipse.ui.IWorkbenchWizard;

public abstract class AbstractOpenWizardAction
  implements IWorkbenchWindowActionDelegate
{
  private IWorkbenchWindow window;
  
  public void dispose() {}
  
  public void init(IWorkbenchWindow window)
  {
    this.window = window;
  }
  
  public abstract void run(IAction paramIAction);
  
  public void selectionChanged(IAction action, ISelection selection) {}
  
  protected void openWizardDialog(IWorkbenchWizard wizard)
  {
    ISelection selection = window.getSelectionService().getSelection();
    if ((selection instanceof IStructuredSelection)) {
      wizard.init(window.getWorkbench(), (IStructuredSelection)selection);
    } else {
      wizard.init(window.getWorkbench(), StructuredSelection.EMPTY);
    }
    Shell parent = window.getShell();
    WizardDialog dialog = new WizardDialog(parent, wizard);
    
    dialog.create();
    dialog.open();
  }
}

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

import org.eclipse.jface.action.IAction;
import org.eclipse.wst.css.ui.internal.wizard.NewCSSWizard;

public class OpenCSSWizardAction
  extends AbstractOpenWizardAction
{
  public void run(IAction action)
  {
    openWizardDialog(new NewCSSWizard());
  }
}

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

import org.eclipse.jface.action.IAction;
import org.eclipse.wst.html.ui.internal.wizard.NewHTMLWizard;

public class OpenHTMLWizardAction
  extends AbstractOpenWizardAction
{
  public void run(IAction action)
  {
    openWizardDialog(new NewHTMLWizard());
  }
}

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

import org.eclipse.jface.action.IAction;
import org.eclipse.wst.jsdt.internal.ui.wizards.NewJSWizard;

public class OpenJSWizardAction
  extends AbstractOpenWizardAction
{
  public void run(IAction action)
  {
    openWizardDialog(new NewJSWizard());
  }
}

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

import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;

class DataModelFacetCreationWizardPage$1
  extends SelectionAdapter
{
  DataModelFacetCreationWizardPage$1(DataModelFacetCreationWizardPage paramDataModelFacetCreationWizardPage) {}
  
  public void widgetSelected(SelectionEvent e)
  {
    this$0.handlePrimaryFacetVersionSelectedEvent();
  }
}

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

import org.eclipse.swt.widgets.Combo;
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;

class DataModelFacetCreationWizardPage$2$1
  implements Runnable
{
  DataModelFacetCreationWizardPage$2$1(DataModelFacetCreationWizardPage.2 param2, IProjectFacetVersion paramIProjectFacetVersion) {}
  
  public void run()
  {
    String selectedText = access$0this$1).primaryVersionCombo.getItem(access$0this$1).primaryVersionCombo.getSelectionIndex());
    if (!selectedText.equals(val$selectedVersion.getVersionString()))
    {
      String[] items = access$0this$1).primaryVersionCombo.getItems();
      int selectedVersionIndex = -1;
      for (int i = 0; (i < items.length) && (selectedVersionIndex == -1); i++) {
        if (items[i].equals(val$selectedVersion.getVersionString()))
        {
          selectedVersionIndex = i;
          access$0this$1).primaryVersionCombo.select(selectedVersionIndex);
        }
      }
    }
  }
}

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

class DataModelFacetCreationWizardPage$2$2
  implements Runnable
{
  DataModelFacetCreationWizardPage$2$2(DataModelFacetCreationWizardPage.2 param2) {}
  
  public void run()
  {
    DataModelFacetCreationWizardPage.2.access$0(this$1).updatePrimaryVersions();
  }
}

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

import java.util.Iterator;
import java.util.Set;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Display;
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
import org.eclipse.wst.common.project.facet.core.events.IFacetedProjectEvent;
import org.eclipse.wst.common.project.facet.core.events.IFacetedProjectEvent.Type;
import org.eclipse.wst.common.project.facet.core.events.IFacetedProjectListener;
import org.eclipse.wst.common.project.facet.core.events.IProjectFacetsChangedEvent;

class DataModelFacetCreationWizardPage$2
  implements IFacetedProjectListener
{
  DataModelFacetCreationWizardPage$2(DataModelFacetCreationWizardPage paramDataModelFacetCreationWizardPage) {}
  
  public void handleEvent(IFacetedProjectEvent event)
  {
    if (event.getType() == IFacetedProjectEvent.Type.PROJECT_FACETS_CHANGED)
    {
      IProjectFacetsChangedEvent actionEvent = (IProjectFacetsChangedEvent)event;
      Set<IProjectFacetVersion> changedVersions = actionEvent.getFacetsWithChangedVersions();
      
      boolean foundComboVersion = false;
      Iterator<IProjectFacetVersion> iterator = changedVersions.iterator();
      do
      {
        IProjectFacetVersion next = (IProjectFacetVersion)iterator.next();
        if (next.getProjectFacet().equals(this$0.primaryProjectFacet))
        {
          foundComboVersion = true;
          final IProjectFacetVersion selectedVersion = next;
          Display.getDefault().asyncExec(new Runnable()
          {
            public void run()
            {
              String selectedText = this$0.primaryVersionCombo.getItem(this$0.primaryVersionCombo.getSelectionIndex());
              if (!selectedText.equals(selectedVersion.getVersionString()))
              {
                String[] items = this$0.primaryVersionCombo.getItems();
                int selectedVersionIndex = -1;
                for (int i = 0; (i < items.length) && (selectedVersionIndex == -1); i++) {
                  if (items[i].equals(selectedVersion.getVersionString()))
                  {
                    selectedVersionIndex = i;
                    this$0.primaryVersionCombo.select(selectedVersionIndex);
                  }
                }
              }
            }
          });
        }
        if (!iterator.hasNext()) {
          break;
        }
      } while (!foundComboVersion);
    }
    else if (event.getType() == IFacetedProjectEvent.Type.PRIMARY_RUNTIME_CHANGED)
    {
      Display.getDefault().asyncExec(new Runnable()
      {
        public void run()
        {
          this$0.updatePrimaryVersions();
        }
      });
    }
  }
}

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

import org.eclipse.wst.common.project.facet.core.events.IFacetedProjectEvent;
import org.eclipse.wst.common.project.facet.core.events.IFacetedProjectListener;
import org.eclipse.wst.common.project.facet.core.events.IProjectFacetsChangedEvent;

class DataModelFacetCreationWizardPage$3$1
  implements IFacetedProjectListener
{
  DataModelFacetCreationWizardPage$3$1(DataModelFacetCreationWizardPage.3 param3) {}
  
  public void handleEvent(IFacetedProjectEvent event)
  {
    DataModelFacetCreationWizardPage.3.access$1(this$1, (IProjectFacetsChangedEvent)event);
  }
}

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

import java.util.List;
import java.util.Set;
import org.eclipse.wst.common.project.facet.core.IFacetedProjectWorkingCopy;
import org.eclipse.wst.common.project.facet.core.IPreset;
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
import org.eclipse.wst.common.project.facet.core.events.IFacetedProjectEvent;
import org.eclipse.wst.common.project.facet.core.events.IFacetedProjectEvent.Type;
import org.eclipse.wst.common.project.facet.core.events.IFacetedProjectListener;
import org.eclipse.wst.common.project.facet.core.events.IProjectFacetsChangedEvent;
import org.eclipse.wst.common.project.facet.core.util.AbstractFilter;
import org.eclipse.wst.common.project.facet.core.util.FilterEvent;
import org.eclipse.wst.common.project.facet.core.util.IFilter.IFilterEvent;
import org.eclipse.wst.common.project.facet.core.util.IFilter.IFilterEvent.Type;

class DataModelFacetCreationWizardPage$3
  extends AbstractFilter<IPreset>
{
  DataModelFacetCreationWizardPage$3(DataModelFacetCreationWizardPage paramDataModelFacetCreationWizardPage, IFacetedProjectWorkingCopy paramIFacetedProjectWorkingCopy)
  {
    IFacetedProjectListener fpjwcListenerForPreset = new IFacetedProjectListener()
    {
      public void handleEvent(IFacetedProjectEvent event)
      {
        DataModelFacetCreationWizardPage.3.this.handleProjectFacetsChangedEvent((IProjectFacetsChangedEvent)event);
      }
    };
    DataModelFacetCreationWizardPage.access$0(paramDataModelFacetCreationWizardPage).add(fpjwcListenerForPreset);
    paramIFacetedProjectWorkingCopy.addListener(fpjwcListenerForPreset, new IFacetedProjectEvent.Type[] { IFacetedProjectEvent.Type.PROJECT_FACETS_CHANGED });
  }
  
  public boolean check(IPreset preset)
  {
    IProjectFacetVersion primaryFacetVersion = this$0.getPrimaryFacetVersion();
    return preset.getProjectFacets().contains(primaryFacetVersion);
  }
  
  private void handleProjectFacetsChangedEvent(IProjectFacetsChangedEvent event)
  {
    for (IProjectFacetVersion fv : event.getFacetsWithChangedVersions()) {
      if (fv.getProjectFacet() == this$0.getPrimaryFacet())
      {
        IFilter.IFilterEvent<IPreset> filterEvent = 
          new FilterEvent(this, IFilter.IFilterEvent.Type.FILTER_CHANGED);
        
        notifyListeners(filterEvent);
      }
    }
  }
}

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

import org.eclipse.wst.common.frameworks.datamodel.DataModelEvent;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.common.frameworks.datamodel.IDataModelListener;

class DataModelFacetCreationWizardPage$4
  implements IDataModelListener
{
  DataModelFacetCreationWizardPage$4(boolean[] paramArrayOfBoolean, IDataModel paramIDataModel) {}
  
  public void propertyChanged(DataModelEvent event)
  {
    if ((event.getPropertyName().equals("IFacetProjectCreationDataModelProperties.FACET_RUNTIME")) && 
      (event.getFlag() == 4))
    {
      synchronized (val$keepWaiting)
      {
        val$keepWaiting[0] = false;
        val$keepWaiting.notify();
      }
      val$model.removeListener(this);
    }
  }
}

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

import org.eclipse.wst.common.frameworks.datamodel.DataModelPropertyDescriptor;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.common.project.facet.core.runtime.RuntimeManager;

class DataModelFacetCreationWizardPage$5
  extends Thread
{
  DataModelFacetCreationWizardPage$5(boolean[] paramArrayOfBoolean, IDataModel paramIDataModel, DataModelPropertyDescriptor[] paramArrayOfDataModelPropertyDescriptor) {}
  
  public void run()
  {
    RuntimeManager.getRuntimes();
    synchronized (val$keepWaiting)
    {
      while (val$keepWaiting[0] != 0) {
        try
        {
          val$keepWaiting.wait();
        }
        catch (InterruptedException localInterruptedException) {}
      }
    }
    DataModelPropertyDescriptor[] postAdditionDescriptors = val$model.getValidPropertyDescriptors("IFacetProjectCreationDataModelProperties.FACET_RUNTIME");
    Object[] preAddition = new Object[val$preAdditionDescriptors.length];
    for (int i = 0; i < preAddition.length; i++) {
      preAddition[i] = val$preAdditionDescriptors[i].getPropertyValue();
    }
    Object[] postAddition = new Object[postAdditionDescriptors.length];
    for (int i = 0; i < postAddition.length; i++) {
      postAddition[i] = postAdditionDescriptors[i].getPropertyValue();
    }
    Object newAddition = DataModelFacetCreationWizardPage.access$1(preAddition, postAddition);
    if (newAddition != null) {
      val$model.setProperty("IFacetProjectCreationDataModelProperties.FACET_RUNTIME", newAddition);
    }
  }
}

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

class DataModelFacetCreationWizardPage$6$1
  implements Runnable
{
  DataModelFacetCreationWizardPage$6$1(DataModelFacetCreationWizardPage.6 param6) {}
  
  public void run()
  {
    DataModelFacetCreationWizardPage.access$2(DataModelFacetCreationWizardPage.6.access$0(this$1));
  }
}

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

import org.eclipse.jface.wizard.IWizardContainer;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.wst.common.project.facet.core.events.IFacetedProjectEvent;
import org.eclipse.wst.common.project.facet.core.events.IFacetedProjectListener;

class DataModelFacetCreationWizardPage$6
  implements IFacetedProjectListener
{
  DataModelFacetCreationWizardPage$6(DataModelFacetCreationWizardPage paramDataModelFacetCreationWizardPage) {}
  
  public void handleEvent(IFacetedProjectEvent event)
  {
    Runnable runnable = new Runnable()
    {
      public void run()
      {
        DataModelFacetCreationWizardPage.access$2(this$0);
      }
    };
    DataModelFacetCreationWizardPage.access$3(this$0).getShell().getDisplay().asyncExec(runnable);
  }
}

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

import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;

class DataModelFacetCreationWizardPage$7
  extends SelectionAdapter
{
  DataModelFacetCreationWizardPage$7(DataModelFacetCreationWizardPage paramDataModelFacetCreationWizardPage) {}
  
  public void widgetSelected(SelectionEvent e)
  {
    this$0.internalLaunchNewRuntimeWizard(this$0.getShell(), DataModelFacetCreationWizardPage.access$4(this$0));
  }
}

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

import org.eclipse.osgi.util.NLS;

public class DataModelFacetCreationWizardPage$Messages
  extends NLS
{
  private static final String BUNDLE_NAME = "org.eclipse.wst.web.ui.internal.wizards.facetcreationpagemessages";
  public static String FACET_VERSION;
  
  static
  {
    NLS.initializeMessages("org.eclipse.wst.web.ui.internal.wizards.facetcreationpagemessages", Messages.class);
  }
}

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

import org.eclipse.osgi.util.NLS;

final class DataModelFacetCreationWizardPage$Resources
  extends NLS
{
  public static String newRuntimeButton;
  
  static
  {
    initializeMessages(DataModelFacetCreationWizardPage.class.getName(), Resources.class);
  }
}

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

import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import java.util.SortedSet;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.IWizardContainer;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.ISelectionService;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.IWorkingSet;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.dialogs.WorkingSetGroup;
import org.eclipse.ui.help.IWorkbenchHelpSystem;
import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetProjectCreationDataModelProperties;
import org.eclipse.wst.common.frameworks.datamodel.DataModelEvent;
import org.eclipse.wst.common.frameworks.datamodel.DataModelPropertyDescriptor;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.common.frameworks.datamodel.IDataModelListener;
import org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelSynchHelper;
import org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelWizardPage;
import org.eclipse.wst.common.frameworks.internal.ui.NewProjectGroup;
import org.eclipse.wst.common.project.facet.core.IFacetedProjectWorkingCopy;
import org.eclipse.wst.common.project.facet.core.IPreset;
import org.eclipse.wst.common.project.facet.core.IProjectFacet;
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
import org.eclipse.wst.common.project.facet.core.events.IFacetedProjectEvent;
import org.eclipse.wst.common.project.facet.core.events.IFacetedProjectEvent.Type;
import org.eclipse.wst.common.project.facet.core.events.IFacetedProjectListener;
import org.eclipse.wst.common.project.facet.core.events.IProjectFacetsChangedEvent;
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.common.project.facet.core.util.AbstractFilter;
import org.eclipse.wst.common.project.facet.core.util.FilterEvent;
import org.eclipse.wst.common.project.facet.core.util.IFilter;
import org.eclipse.wst.common.project.facet.core.util.IFilter.IFilterEvent;
import org.eclipse.wst.common.project.facet.core.util.IFilter.IFilterEvent.Type;
import org.eclipse.wst.common.project.facet.ui.ModifyFacetedProjectWizard;
import org.eclipse.wst.common.project.facet.ui.PresetSelectionPanel;
import org.eclipse.wst.project.facet.ProductManager;
import org.eclipse.wst.server.ui.ServerUIUtil;
import org.eclipse.wst.web.internal.ResourceHandler;
import org.eclipse.wst.web.internal.facet.RuntimePresetMappingRegistry;

public class DataModelFacetCreationWizardPage
  extends DataModelWizardPage
  implements IFacetProjectCreationDataModelProperties
{
  private static final String NULL_RUNTIME = "NULL_RUNTIME";
  private static final String MRU_RUNTIME_STORE = "MRU_RUNTIME_STORE";
  protected static final String RESOURCE_WORKING_SET = "org.eclipse.ui.resourceWorkingSetPage";
  protected static final String JAVA_WORKING_SET = "org.eclipse.jdt.ui.JavaWorkingSetPage";
  protected IProjectFacet primaryProjectFacet = null;
  protected Combo primaryVersionCombo = null;
  protected WorkingSetGroup workingSetGroup;
  private List<IFacetedProjectListener> facetedProjectListeners = new ArrayList();
  
  protected Set<IProjectFacetVersion> getFacetConfiguration(IProjectFacetVersion primaryFacetVersion)
  {
    Set<IProjectFacetVersion> config = new HashSet();
    for (IProjectFacet fixedFacet : fpjwc.getFixedProjectFacets()) {
      if (fixedFacet == primaryFacetVersion.getProjectFacet()) {
        config.add(primaryFacetVersion);
      } else {
        config.add(fpjwc.getHighestAvailableVersion(fixedFacet));
      }
    }
    return config;
  }
  
  private static final String[] VALIDATION_PROPERTIES = {
    "IProjectCreationPropertiesNew.PROJECT_NAME", 
    "IProjectCreationPropertiesNew.PROJECT_LOCATION", 
    "IFacetProjectCreationDataModelProperties.FACET_RUNTIME", 
    "IFacetProjectCreationDataModelProperties.FACETED_PROJECT_WORKING_COPY" };
  protected Combo serverTargetCombo;
  protected NewProjectGroup projectNameGroup;
  private final IFacetedProjectWorkingCopy fpjwc;
  private final IFacetedProjectListener fpjwcListener;
  
  protected static GridData gdhfill()
  {
    return new GridData(768);
  }
  
  protected static GridData hspan(GridData gd, int span)
  {
    horizontalSpan = span;
    return gd;
  }
  
  protected Composite createTopLevelComposite(Composite parent)
  {
    Composite top = new Composite(parent, 0);
    PlatformUI.getWorkbench().getHelpSystem().setHelp(top, getInfopopID());
    top.setLayout(new GridLayout());
    top.setLayoutData(new GridData(1808));
    createProj
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