org.eclipse.jst.pagedesigner_1.3.104.v201201181342_patch

16:46:01.246 INFO  jd.cli.Main - Decompiling org.eclipse.jst.pagedesigner_1.3.104.v201201181342_patch.jar
package org.eclipse.jst.pagedesigner;

import org.eclipse.jst.jsf.common.dom.TagIdentifier;
import org.eclipse.jst.jsf.core.internal.tld.TagIdentifierFactory;

public class IHTMLConstants
{
  public static final String TAG_A = "a";
  public static final String TAG_ABBR = "abbr";
  public static final String TAG_ACRONYM = "acronym";
  public static final String TAG_ADDRESS = "address";
  public static final String TAG_APPLET = "applet";
  public static final String TAG_AREA = "area";
  public static final String TAG_B = "b";
  public static final String TAG_BASE = "base";
  public static final String TAG_BASEFONT = "basefont";
  public static final String TAG_BDO = "bdo";
  public static final String TAG_BIG = "big";
  public static final String TAG_BLOCKQUOTE = "blockquote";
  public static final String TAG_BODY = "body";
  public static final String TAG_BR = "br";
  public static final String TAG_BUTTON = "button";
  public static final String TAG_CAPTION = "caption";
  public static final String TAG_CENTER = "center";
  public static final String TAG_CITE = "cite";
  public static final String TAG_CODE = "code";
  public static final String TAG_COL = "col";
  public static final String TAG_COLGROUP = "colgroup";
  public static final String TAG_DD = "dd";
  public static final String TAG_DEL = "del";
  public static final String TAG_DFN = "dfn";
  public static final String TAG_DIR = "dir";
  public static final String TAG_DIV = "div";
  public static final String TAG_DL = "dl";
  public static final String TAG_DT = "dt";
  public static final String TAG_EM = "em";
  public static final String TAG_FIELDSET = "fieldset";
  public static final String TAG_FONT = "font";
  public static final String TAG_FORM = "form";
  public static final String TAG_FRAME = "frame";
  public static final String TAG_FRAMESET = "frameset";
  public static final String TAG_H1 = "h1";
  public static final String TAG_H2 = "h2";
  public static final String TAG_H3 = "h3";
  public static final String TAG_H4 = "h4";
  public static final String TAG_H5 = "h5";
  public static final String TAG_H6 = "h6";
  public static final String TAG_HEAD = "head";
  public static final String TAG_HR = "hr";
  public static final String TAG_HTML = "html";
  public static final String TAG_I = "i";
  public static final String TAG_IFRAME = "iframe";
  public static final String TAG_IMG = "img";
  public static final String TAG_INPUT = "input";
  public static final String TAG_INS = "ins";
  public static final String TAG_ISINDEX = "isindex";
  public static final String TAG_KBD = "kbd";
  public static final String TAG_LABEL = "label";
  public static final String TAG_LEGEND = "legend";
  public static final String TAG_LI = "li";
  public static final String TAG_LINK = "link";
  public static final String TAG_MAP = "map";
  public static final String TAG_MENU = "menu";
  public static final String TAG_META = "meta";
  public static final String TAG_NOEMBED = "noembed";
  public static final String TAG_NOFRAMES = "noframes";
  public static final String TAG_NOSCRIPT = "noscript";
  public static final String TAG_OBJECT = "object";
  public static final String TAG_OL = "ol";
  public static final String TAG_OPTGROUP = "optgroup";
  public static final String TAG_OPTION = "option";
  public static final String TAG_P = "p";
  public static final String TAG_PARAM = "param";
  public static final String TAG_PRE = "pre";
  public static final String TAG_Q = "q";
  public static final String TAG_S = "s";
  public static final String TAG_SAMP = "samp";
  public static final String TAG_SCRIPT = "script";
  public static final String TAG_SELECT = "select";
  public static final String TAG_SMALL = "small";
  public static final String TAG_SPAN = "span";
  public static final String TAG_STRIKE = "strike";
  public static final String TAG_STRONG = "strong";
  public static final String TAG_STYLE = "style";
  public static final String TAG_SUB = "sub";
  public static final String TAG_SUP = "sup";
  public static final String TAG_TABLE = "table";
  public static final String TAG_TBODY = "tbody";
  public static final String TAG_TD = "td";
  public static final String TAG_TEXTAREA = "textarea";
  public static final String TAG_TFOOT = "tfoot";
  public static final String TAG_TH = "th";
  public static final String TAG_THEAD = "thead";
  public static final String TAG_TITLE = "title";
  public static final String TAG_TR = "tr";
  public static final String TAG_TT = "tt";
  public static final String TAG_U = "u";
  public static final String TAG_UL = "ul";
  public static final String TAG_VAR = "var";
  public static final TagIdentifier TAG_IDENTIFIER_HTML_FORM = TagIdentifierFactory.createJSPTagWrapper("HTML", "form");
  public static final String ATTR_ABBR = "abbr";
  public static final String ATTR_ACCEPTCHARSET = "accept-charset";
  public static final String ATTR_ACCEPT = "accept";
  public static final String ATTR_ACCESSKEY = "accesskey";
  public static final String ATTR_ACTION = "action";
  public static final String ATTR_ALIGN = "align";
  public static final String ATTR_ALINK = "alink";
  public static final String ATTR_ALT = "alt";
  public static final String ATTR_ARCHIVE = "archive";
  public static final String ATTR_AXIS = "axis";
  public static final String ATTR_BACKGROUND = "background";
  public static final String ATTR_BGCOLOR = "bgcolor";
  public static final String ATTR_BORDER = "border";
  public static final String ATTR_CELLPADDING = "cellpadding";
  public static final String ATTR_CELLSPACING = "cellspacing";
  public static final String ATTR_CHAR = "char";
  public static final String ATTR_CHAROFF = "charoff";
  public static final String ATTR_CHARSET = "charset";
  public static final String ATTR_CHECKED = "checked";
  public static final String ATTR_CITE = "cite";
  public static final String ATTR_CLASS = "class";
  public static final String ATTR_CLASSID = "classid";
  public static final String ATTR_CLEAR = "clear";
  public static final String ATTR_CODE = "code";
  public static final String ATTR_CODEBASE = "codebase";
  public static final String ATTR_CODETYPE = "codetype";
  public static final String ATTR_COLOR = "color";
  public static final String ATTR_COLS = "cols";
  public static final String ATTR_COLSPAN = "colspan";
  public static final String ATTR_COMPACT = "compact";
  public static final String ATTR_CONTENT = "content";
  public static final String ATTR_COORDS = "coords";
  public static final String ATTR_DATA = "data";
  public static final String ATTR_DATETIME = "datetime";
  public static final String ATTR_DECLARE = "declare";
  public static final String ATTR_DEFER = "defer";
  public static final String ATTR_DIR = "dir";
  public static final String ATTR_DISABLED = "disabled";
  public static final String ATTR_ENCTYPE = "enctype";
  public static final String ATTR_FACE = "face";
  public static final String ATTR_FOR = "for";
  public static final String ATTR_FRAME = "frame";
  public static final String ATTR_FRAMEBORDER = "frameborder";
  public static final String ATTR_HEADERS = "headers";
  public static final String ATTR_HEIGHT = "height";
  public static final String ATTR_HREF = "href";
  public static final String ATTR_HREFLANG = "hreflang";
  public static final String ATTR_HSPACE = "hspace";
  public static final String ATTR_HTTPEQUIV = "http-equiv";
  public static final String ATTR_ID = "id";
  public static final String ATTR_ISMAP = "ismap";
  public static final String ATTR_LABEL = "label";
  public static final String ATTR_LANG = "lang";
  public static final String ATTR_LANGUAGE = "language";
  public static final String ATTR_LINK = "link";
  public static final String ATTR_LONGDESC = "longdesc";
  public static final String ATTR_MARGINHEIGHT = "marginheight";
  public static final String ATTR_MARGINWIDTH = "marginwidth";
  public static final String ATTR_MAXLENGTH = "maxlength";
  public static final String ATTR_MEDIA = "media";
  public static final String ATTR_METHOD = "method";
  public static final String ATTR_MULTIPLE = "multiple";
  public static final String ATTR_NAME = "name";
  public static final String ATTR_NOHREF = "nohref";
  public static final String ATTR_NORESIZE = "noresize";
  public static final String ATTR_NOSHADE = "noshade";
  public static final String ATTR_NOWRAP = "nowrap";
  public static final String ATTR_OBJECT = "object";
  public static final String ATTR_ONBLUR = "onblur";
  public static final String ATTR_ONCHANGE = "onchange";
  public static final String ATTR_ONCLICK = "onclick";
  public static final String ATTR_ONDBLCLICK = "ondblclick";
  public static final String ATTR_ONFOCUS = "onfocus";
  public static final String ATTR_ONKEYDOWN = "onkeydown";
  public static final String ATTR_ONKEYPRESS = "onkeypress";
  public static final String ATTR_ONKEYUP = "onkeyup";
  public static final String ATTR_ONLOAD = "onload";
  public static final String ATTR_ONMOUSEDOWN = "onmousedown";
  public static final String ATTR_ONMOUSEMOVE = "onmousemove";
  public static final String ATTR_ONMOUSEOUT = "onmouseout";
  public static final String ATTR_ONMOUSEOVER = "onmouseover";
  public static final String ATTR_ONMOUSEUP = "onmouseup";
  public static final String ATTR_ONRESET = "onreset";
  public static final String ATTR_ONSELECT = "onselect";
  public static final String ATTR_ONSUBMIT = "onsubmit";
  public static final String ATTR_ONUNLOAD = "onunload";
  public static final String ATTR_PROFILE = "profile";
  public static final String ATTR_PROMPT = "prompt";
  public static final String ATTR_READONLY = "readonly";
  public static final String ATTR_REL = "rel";
  public static final String ATTR_REV = "rev";
  public static final String ATTR_ROWS = "rows";
  public static final String ATTR_ROWSPAN = "rowspan";
  public static final String ATTR_RULES = "rules";
  public static final String ATTR_SCHEME = "scheme";
  public static final String ATTR_SCOPE = "scope";
  public static final String ATTR_SCROLLING = "scrolling";
  public static final String ATTR_SELECTED = "selected";
  public static final String ATTR_SHAPE = "shape";
  public static final String ATTR_SIZE = "size";
  public static final String ATTR_SPAN = "span";
  public static final String ATTR_SRC = "src";
  public static final String ATTR_STANDBY = "standby";
  public static final String ATTR_START = "start";
  public static final String ATTR_STYLE = "style";
  public static final String ATTR_SUMMARY = "summary";
  public static final String ATTR_TABINDEX = "tabindex";
  public static final String ATTR_TARGET = "target";
  public static final String ATTR_TEXT = "text";
  public static final String ATTR_TITLE = "title";
  public static final String ATTR_TYPE = "type";
  public static final String ATTR_USEMAP = "usemap";
  public static final String ATTR_VALIGN = "valign";
  public static final String ATTR_VALUE = "value";
  public static final String ATTR_VALUETYPE = "valuetype";
  public static final String ATTR_VERSION = "version";
  public static final String ATTR_VLINK = "vlink";
  public static final String ATTR_VSPACE = "vspace";
  public static final String ATTR_WIDTH = "width";
  public static final String TYPE_SUBMIT = "submit";
  public static final String TYPE_CHECKBOX = "checkbox";
  public static final String TYPE_RADIO = "radio";
  public static final String TYPE_IMAGE = "image";
  public static final String TYPE_PASSWORD = "password";
  public static final String TYPE_TEXT = "text";
  public static final String TYPE_HIDDEN = "hidden";
  public static final String SUBMIT_LABEL = "Submit Query";
  public static final String RESET_LABEL = "Reset";
}

/* Location:
 * Qualified Name:     org.eclipse.jst.pagedesigner.IHTMLConstants
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.pagedesigner;

public abstract interface IJMTConstants
{
  public static final String PAGEDESIGNER_RESOURCE_BUNDLE_FILE = "org.eclipse.jst.pagedesigner.editors.pagedesigner.JSPEditorMessages";
  public static final String ROOT_RESOURCEBUNDLE = "org.eclipse.jst.pagedesigner.JMTResources";
  public static final String DEFAULT_PROPERTIES = "default.properties";
  public static final String USERAGENT = "html4.css";
  public static final String EDITORID_HTML = "org.eclipse.jst.pagedesigner.PageDesignerEditor";
  public static final String PREF_PALETTE_SHOW_ALL = "pref.palette.showall";
  public static final String EXTENSION_POINT_PAGEDESIGNER = "pageDesignerExtension";
  public static final String EXTENSION_POINT_CMREGISTRY = "cmRegistry";
  public static final String DT_RESOURCE_PROVIDER = "dtResourceProvider";
  public static final String LOCAL_DROP_HANDLER = "localDropHandler";
  public static final String TAG_CONVERTER_FACTORY = "tagConverterFactory";
  /**
   * @deprecated
   */
  public static final String ATTRIBUTE_CELLEDITOR_FACTORY = "attributeCellEditorFactory";
  public static final String TAG_ATTRIBUTE_CELLEDITOR_FACTORY = "tagAttributeCellEditorFactory";
  public static final String TAG_TRANSFORM_OPERATION = "tagTransformOperation";
  public static final String ELEMENT_EDIT_FACTORY = "elementEditFactory";
  public static final String LINK_CREATOR = "linkCreator";
  public static final String PROPERTY_PAGE_FACTORY = "propertyPageFactory";
  public static final String PALETTE_FACTORY = "paletteFactory";
}

/* Location:
 * Qualified Name:     org.eclipse.jst.pagedesigner.IJMTConstants
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.pagedesigner;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.MissingResourceException;
import java.util.Properties;
import java.util.ResourceBundle;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.ILog;
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.preference.IPreferenceStore;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.jst.jsf.common.ui.internal.guiutils.Alerts;
import org.eclipse.jst.jsf.common.ui.internal.logging.Logger;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.Bundle;

public class PDPlugin
  extends AbstractUIPlugin
{
  private static final String ICONS_LIB_PATH = "icons";
  private static PDPlugin _plugin;
  private static Logger _log;
  private static Alerts _alerts;
  private ResourceBundle _resourceBundle;
  private Properties _properties;
  private URL _pluginBase;
  
  public PDPlugin()
  {
    _plugin = this;
  }
  
  /* Error */
  public void start(org.osgi.framework.BundleContext context)
    throws Exception
  {
    // Byte code:
    //   0: aload_0
    //   1: aload_1
    //   2: invokespecial 37	org/eclipse/ui/plugin/AbstractUIPlugin:start	(Lorg/osgi/framework/BundleContext;)V
    //   5: aload_0
    //   6: ldc 39
    //   8: invokestatic 41	java/util/ResourceBundle:getBundle	(Ljava/lang/String;)Ljava/util/ResourceBundle;
    //   11: putfield 47	org/eclipse/jst/pagedesigner/PDPlugin:_resourceBundle	Ljava/util/ResourceBundle;
    //   14: new 49	org/eclipse/jst/jsf/common/ui/internal/guiutils/Alerts
    //   17: dup
    //   18: aload_0
    //   19: aload_0
    //   20: getfield 47	org/eclipse/jst/pagedesigner/PDPlugin:_resourceBundle	Ljava/util/ResourceBundle;
    //   23: invokespecial 51	org/eclipse/jst/jsf/common/ui/internal/guiutils/Alerts:<init>	(Lorg/eclipse/ui/plugin/AbstractUIPlugin;Ljava/util/ResourceBundle;)V
    //   26: putstatic 54	org/eclipse/jst/pagedesigner/PDPlugin:_alerts	Lorg/eclipse/jst/jsf/common/ui/internal/guiutils/Alerts;
    //   29: aload_0
    //   30: new 56	java/util/Properties
    //   33: dup
    //   34: invokespecial 58	java/util/Properties:<init>	()V
    //   37: putfield 59	org/eclipse/jst/pagedesigner/PDPlugin:_properties	Ljava/util/Properties;
    //   40: aconst_null
    //   41: astore_2
    //   42: aload_0
    //   43: aload_0
    //   44: invokevirtual 61	org/eclipse/jst/pagedesigner/PDPlugin:getBundle	()Lorg/osgi/framework/Bundle;
    //   47: ldc 64
    //   49: invokeinterface 66 2 0
    //   54: putfield 72	org/eclipse/jst/pagedesigner/PDPlugin:_pluginBase	Ljava/net/URL;
    //   57: new 74	java/net/URL
    //   60: dup
    //   61: aload_0
    //   62: getfield 72	org/eclipse/jst/pagedesigner/PDPlugin:_pluginBase	Ljava/net/URL;
    //   65: ldc 76
    //   67: invokespecial 78	java/net/URL:<init>	(Ljava/net/URL;Ljava/lang/String;)V
    //   70: invokevirtual 81	java/net/URL:openStream	()Ljava/io/InputStream;
    //   73: astore_2
    //   74: aload_0
    //   75: getfield 59	org/eclipse/jst/pagedesigner/PDPlugin:_properties	Ljava/util/Properties;
    //   78: aload_2
    //   79: invokevirtual 85	java/util/Properties:load	(Ljava/io/InputStream;)V
    //   82: goto +14 -> 96
    //   85: astore_3
    //   86: aload_2
    //   87: invokevirtual 89	java/io/InputStream:close	()V
    //   90: goto +4 -> 94
    //   93: pop
    //   94: aload_3
    //   95: athrow
    //   96: aload_2
    //   97: invokevirtual 89	java/io/InputStream:close	()V
    //   100: goto +4 -> 104
    //   103: pop
    //   104: new 94	org/eclipse/jst/jsf/common/ui/internal/logging/Logger
    //   107: dup
    //   108: aload_0
    //   109: invokevirtual 61	org/eclipse/jst/pagedesigner/PDPlugin:getBundle	()Lorg/osgi/framework/Bundle;
    //   112: aload_0
    //   113: getfield 47	org/eclipse/jst/pagedesigner/PDPlugin:_resourceBundle	Ljava/util/ResourceBundle;
    //   116: invokespecial 96	org/eclipse/jst/jsf/common/ui/internal/logging/Logger:<init>	(Lorg/osgi/framework/Bundle;Ljava/util/ResourceBundle;)V
    //   119: putstatic 99	org/eclipse/jst/pagedesigner/PDPlugin:_log	Lorg/eclipse/jst/jsf/common/ui/internal/logging/Logger;
    //   122: goto +50 -> 172
    //   125: astore_2
    //   126: getstatic 99	org/eclipse/jst/pagedesigner/PDPlugin:_log	Lorg/eclipse/jst/jsf/common/ui/internal/logging/Logger;
    //   129: ifnull +14 -> 143
    //   132: getstatic 99	org/eclipse/jst/pagedesigner/PDPlugin:_log	Lorg/eclipse/jst/jsf/common/ui/internal/logging/Logger;
    //   135: ldc 101
    //   137: ldc 103
    //   139: aload_2
    //   140: invokevirtual 105	org/eclipse/jst/jsf/common/ui/internal/logging/Logger:error	(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V
    //   143: new 109	org/eclipse/core/runtime/CoreException
    //   146: dup
    //   147: new 111	org/eclipse/core/runtime/Status
    //   150: dup
    //   151: iconst_4
    //   152: aload_0
    //   153: invokevirtual 61	org/eclipse/jst/pagedesigner/PDPlugin:getBundle	()Lorg/osgi/framework/Bundle;
    //   156: invokeinterface 113 1 0
    //   161: iconst_0
    //   162: ldc 117
    //   164: aload_2
    //   165: invokespecial 119	org/eclipse/core/runtime/Status:<init>	(ILjava/lang/String;ILjava/lang/String;Ljava/lang/Throwable;)V
    //   168: invokespecial 122	org/eclipse/core/runtime/CoreException:<init>	(Lorg/eclipse/core/runtime/IStatus;)V
    //   171: athrow
    //   172: return
    // Line number table:
    //   Java source line #83	-> byte code offset #0
    //   Java source line #87	-> byte code offset #5
    //   Java source line #88	-> byte code offset #6
    //   Java source line #87	-> byte code offset #11
    //   Java source line #89	-> byte code offset #14
    //   Java source line #92	-> byte code offset #29
    //   Java source line #93	-> byte code offset #40
    //   Java source line #94	-> byte code offset #42
    //   Java source line #96	-> byte code offset #57
    //   Java source line #97	-> byte code offset #70
    //   Java source line #96	-> byte code offset #73
    //   Java source line #98	-> byte code offset #74
    //   Java source line #99	-> byte code offset #85
    //   Java source line #101	-> byte code offset #86
    //   Java source line #102	-> byte code offset #93
    //   Java source line #106	-> byte code offset #94
    //   Java source line #101	-> byte code offset #96
    //   Java source line #102	-> byte code offset #103
    //   Java source line #109	-> byte code offset #104
    //   Java source line #118	-> byte code offset #125
    //   Java source line #120	-> byte code offset #126
    //   Java source line #121	-> byte code offset #132
    //   Java source line #123	-> byte code offset #135
    //   Java source line #124	-> byte code offset #137
    //   Java source line #125	-> byte code offset #139
    //   Java source line #122	-> byte code offset #140
    //   Java source line #128	-> byte code offset #143
    //   Java source line #129	-> byte code offset #147
    //   Java source line #130	-> byte code offset #151
    //   Java source line #131	-> byte code offset #152
    //   Java source line #132	-> byte code offset #161
    //   Java source line #133	-> byte code offset #162
    //   Java source line #134	-> byte code offset #164
    //   Java source line #129	-> byte code offset #165
    //   Java source line #128	-> byte code offset #168
    //   Java source line #136	-> byte code offset #172
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	173	0	this	PDPlugin
    //   0	173	1	context	org.osgi.framework.BundleContext
    //   41	56	2	input	InputStream
    //   125	40	2	ee	Exception
    //   85	10	3	localObject	Object
    //   93	1	5	localIOException1	IOException
    //   103	1	6	localIOException2	IOException
    // Exception table:
    //   from	to	target	type
    //   57	85	85	finally
    //   86	90	93	java/io/IOException
    //   96	100	103	java/io/IOException
    //   5	122	125	java/lang/Exception
  }
  
  public static PDPlugin getDefault()
  {
    return _plugin;
  }
  
  public static Alerts getAlerts()
  {
    return _alerts;
  }
  
  public static Logger getLogger(Class theClass)
  {
    if ((getDefault() != null) && (getDefault().getRootLogger() != null)) {
      return getDefault().getRootLogger();
    }
    return null;
  }
  
  public Logger getRootLogger()
  {
    return _log;
  }
  
  public static String getPluginId()
  {
    return getDefault().getBundle().getSymbolicName();
  }
  
  public ResourceBundle getResourceBundle()
  {
    return _resourceBundle;
  }
  
  public static String getResourceString(String key)
  {
    ResourceBundle bundle = getDefault().getResourceBundle();
    try
    {
      return bundle != null ? bundle.getString(key) : key;
    }
    catch (MissingResourceException localMissingResourceException) {}
    return '!' + key + '!';
  }
  
  public ResourceBundle getPluginDecriptorBundle()
  {
    return Platform.getResourceBundle(getDefault().getBundle());
  }
  
  public Properties getProperties()
  {
    return _properties;
  }
  
  public static Display getStandardDisplay()
  {
    Display display = Display.getCurrent();
    if (display == null) {
      display = Display.getDefault();
    }
    return display;
  }
  
  public static IWorkspace getWorkspace()
  {
    return ResourcesPlugin.getWorkspace();
  }
  
  public Image getImage(String name)
  {
    if (name == null) {
      return null;
    }
    ImageRegistry images = getImageRegistry();
    Image image = images.get(name);
    if (image == null)
    {
      getImageDescriptor(name);
      image = images.get(name);
    }
    return image;
  }
  
  public ImageDescriptor getImageDescriptor(String name)
  {
    if (name == null) {
      return null;
    }
    ImageRegistry images = getImageRegistry();
    ImageDescriptor id = images.getDescriptor(name);
    if (id == null)
    {
      InputStream stream = null;
      try
      {
        URL url = new URL(_pluginBase, 
          "icons/" + name);
        
        stream = url.openStream();
        stream.close();
        
        id = ImageDescriptor.createFromURL(url);
        images.put(name, id);
      }
      catch (IOException e1)
      {
        _log.info("Unable to create ImageDescriptor for: " + name, e1);
        return null;
      }
    }
    return id;
  }
  
  public InputStream readFile(String file)
    throws MalformedURLException, IOException
  {
    return new URL(_pluginBase, file).openStream();
  }
  
  public File getFile(String file)
    throws MalformedURLException, IOException
  {
    return new File(new URL(_pluginBase, file).getPath());
  }
  
  public static Path getInstallLocation()
  {
    try
    {
      URL url = getDefault().getBundle().getEntry("/");
      String s1 = FileLocator.resolve(url).getFile();
      if (s1.startsWith("/")) {
        s1 = s1.substring(1);
      }
      s1 = new Path(s1).toOSString();
      String s;
      String s;
      if (s1.endsWith(File.separator)) {
        s = s1;
      } else {
        s = s1 + File.separator;
      }
      return new Path(s);
    }
    catch (Exception exception)
    {
      _log.error("Error.PDPlugin.Installation.15", exception);
    }
    return null;
  }
  
  public static IWorkbenchWindow getActiveWorkbenchWindow()
  {
    if (getDefault().getWorkbench() == null) {
      return null;
    }
    return getDefault().getWorkbench().getActiveWorkbenchWindow();
  }
  
  public static IWorkbenchPage getActivePage()
  {
    IWorkbenchWindow window = getActiveWorkbenchWindow();
    if (window == null) {
      return null;
    }
    return window.getActivePage();
  }
  
  protected void initializeDefaultPreferences(IPreferenceStore store) {}
  
  public static Shell getActiveWorkbenchShell()
  {
    IWorkbenchWindow window = getActiveWorkbenchWindow();
    if (window != null) {
      return window.getShell();
    }
    IWorkbenchWindow[] windows = getDefault().getWorkbench()
      .getWorkbenchWindows();
    if (windows.length > 0) {
      return windows[0].getShell();
    }
    return null;
  }
  
  public static Display getDisplay()
  {
    Shell shell = getActiveWorkbenchShell();
    if (shell != null) {
      return shell.getDisplay();
    }
    return Display.getDefault();
  }
  
  public static IProject getCurrentProject()
  {
    IProject curProject = null;
    IEditorPart editor = getDefault().getWorkbench()
      .getActiveWorkbenchWindow().getActivePage().getActiveEditor();
    IEditorInput input = editor.getEditorInput();
    IFile inputFile = null;
    if ((input instanceof IFileEditorInput))
    {
      inputFile = ((IFileEditorInput)input).getFile();
      curProject = inputFile.getProject();
    }
    return curProject;
  }
  
  public static void log(IStatus status)
  {
    ILog log = getDefault().getLog();
    log.log(status);
  }
  
  public static void log(String message, Throwable excp)
  {
    Status status = new Status(4, getPluginId(), message, excp);
    log(status);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.pagedesigner.PDPlugin
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.pagedesigner;

import java.io.PrintStream;
import org.eclipse.osgi.framework.debug.FrameworkDebugOptions;
import org.eclipse.osgi.service.debug.DebugOptions;

public final class PageDesignerTraceOptions
{
  public static final boolean ENABLED;
  public static final boolean TRACE_CONVERTERLOAD;
  public static final boolean TRACE_CONVERTERSELECT;
  public static final boolean TRACE_ELEMENTEDITLOAD;
  public static final boolean TRACE_ELEMENTEDITSELECTION;
  private static final String KEY_DEBUG_ENABLED = "/debug";
  private static final String KEY_CONVERTER = "/debug/converter";
  private static final String KEY_CONVERTER_LOAD = "/debug/converter/load";
  private static final String KEY_CONVERTER_SELECTION = "/debug/converter/selection";
  private static final String KEY_ELEMENTEDIT = "/debug/elementedit";
  private static final String KEY_ELEMENTEDIT_LOAD = "/debug/elementedit/load";
  private static final String KEY_ELEMENTEDIT_SELECTION = "/debug/elementedit/selection";
  
  static
  {
    DebugOptions debugOptions = FrameworkDebugOptions.getDefault();
    String pluginId = PDPlugin.getPluginId();
    ENABLED = (debugOptions != null) && 
      (debugOptions.getBooleanOption(pluginId + 
      "/debug", false));
    if (ENABLED)
    {
      TRACE_CONVERTERLOAD = debugOptions.getBooleanOption(
        pluginId + "/debug/converter/load", false);
      TRACE_CONVERTERSELECT = debugOptions.getBooleanOption(
        pluginId + "/debug/converter/selection", false);
      TRACE_ELEMENTEDITLOAD = debugOptions.getBooleanOption(
        pluginId + "/debug/elementedit/load", false);
      TRACE_ELEMENTEDITSELECTION = debugOptions.getBooleanOption(
        pluginId + "/debug/elementedit/selection", false);
    }
    else
    {
      TRACE_CONVERTERLOAD = false;
      TRACE_CONVERTERSELECT = false;
      TRACE_ELEMENTEDITLOAD = false;
      TRACE_ELEMENTEDITSELECTION = false;
    }
  }
  
  public static void log(String message)
  {
    System.out.println(message);
  }
  
  public static void log(String msg, Throwable t)
  {
    System.out.printf("%s: Exception Trace:\n\n", new Object[] { msg });
    t.printStackTrace(System.out);
    System.out.print("\n\n\n");
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.pagedesigner.PageDesignerTraceOptions
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.pagedesigner.actions.container;

import org.eclipse.gef.EditPart;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jst.pagedesigner.elementedit.IElementEdit;
import org.eclipse.jst.pagedesigner.parts.ElementEditPart;
import org.eclipse.jst.pagedesigner.parts.NodeEditPart;
import org.eclipse.jst.pagedesigner.range.RangeUtil;
import org.eclipse.jst.pagedesigner.viewer.DesignPosition;
import org.eclipse.jst.pagedesigner.viewer.DesignRange;
import org.eclipse.ui.actions.ActionContext;
import org.eclipse.ui.actions.ActionGroup;
import org.w3c.dom.Text;

public class ContainerActionGroup
  extends ActionGroup
{
  public void fillContextMenu(IMenuManager menu)
  {
    ISelection selection = getContext().getSelection();
    
    EditPart part = findCommonAncesterPart(selection);
    if (!(part instanceof NodeEditPart)) {
      return;
    }
    NodeEditPart original = (NodeEditPart)part;
    while ((part.getParent() instanceof ElementEditPart))
    {
      ElementEditPart elementEditPart = (ElementEditPart)part
        .getParent();
      
      IElementEdit elementEdit = elementEditPart.getElementEdit();
      if (elementEdit != null)
      {
        boolean filled = elementEdit.fillContainerContextMenu(menu, 
          elementEditPart, original, selection);
        if (filled) {
          break;
        }
      }
      part = part.getParent();
    }
  }
  
  private EditPart findCommonAncesterPart(ISelection selection)
  {
    if ((selection instanceof IStructuredSelection))
    {
      IStructuredSelection structsel = (IStructuredSelection)selection;
      if (structsel.size() != 1) {
        return null;
      }
      if ((structsel.getFirstElement() instanceof EditPart)) {
        return (EditPart)structsel.getFirstElement();
      }
      return null;
    }
    if ((selection instanceof DesignRange))
    {
      DesignRange range = (DesignRange)selection;
      if (!range.isValid()) {
        return null;
      }
      if (range.isEmpty())
      {
        DesignPosition position = range.getStartPosition();
        if ((position.getOffset() == 0) || 
          ((position.getContainerNode() instanceof Text))) {
          return position.getContainerPart();
        }
        return position.getSiblingEditPart(false);
      }
      return RangeUtil.findCommonAncestor(range);
    }
    return null;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.pagedesigner.actions.container.ContainerActionGroup
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.pagedesigner.actions.link;

import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExecutableExtension;
import org.eclipse.jst.pagedesigner.viewer.DesignRange;

public abstract class AbstractLinkCreator
  implements ILinkCreator, IExecutableExtension
{
  private String _identifier;
  private static final String LINK_IDENTIFIER = "linkIdentifier";
  
  public boolean canExecute(DesignRange range)
  {
    return true;
  }
  
  public String getLinkIdentifier()
  {
    return _identifier;
  }
  
  public void setInitializationData(IConfigurationElement config, String propertyName, Object data)
    throws CoreException
  {
    _identifier = config.getAttribute("linkIdentifier");
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.pagedesigner.actions.link.AbstractLinkCreator
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.pagedesigner.actions.link;

import java.util.Map;
import org.eclipse.gef.EditPart;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.jst.pagedesigner.PDPlugin;
import org.eclipse.jst.pagedesigner.viewer.DesignRange;

public class CreateLinkWizard
  extends Wizard
{
  private static final String WIZARD_TITLE = PDPlugin.getResourceString("CreateLinkWizard.Title");
  private static final String INTIAL_DEFAULT_PAGE_IMAGE = "newsuade_wiz.gif";
  private static final String PAGE_NAME = "first";
  private String _pageTitle;
  private EditPart _part;
  private DesignRange _range;
  private Map<String, ILinkCreator> _linkMap;
  private String _linkType;
  
  public CreateLinkWizard(EditPart part, DesignRange range, Map<String, ILinkCreator> linkMap)
  {
    _part = part;
    _range = range;
    _linkMap = linkMap;
  }
  
  public void addPages()
  {
    addPage(new LinkWizardPage("first", _pageTitle, _part, 
      _range, _linkMap));
  }
  
  public boolean canFinish()
  {
    return super.canFinish();
  }
  
  public boolean performFinish()
  {
    LinkWizardPage page = (LinkWizardPage)getPage("first");
    _linkType = page.getChosenLinkType();
    return true;
  }
  
  public void setPageTitle(String pageTitle)
  {
    _pageTitle = pageTitle;
    initializeDefaultPageImageDescriptor();
  }
  
  protected void initializeDefaultPageImageDescriptor()
  {
    ImageDescriptor desc = PDPlugin.getDefault().getImageDescriptor(
      "newsuade_wiz.gif");
    setDefaultPageImageDescriptor(desc);
    setWindowTitle(WIZARD_TITLE);
  }
  
  public String getChosenLinkType()
  {
    return _linkType;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.pagedesigner.actions.link.CreateLinkWizard
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.pagedesigner.actions.link;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtension;
import org.eclipse.core.runtime.IExtensionPoint;
import org.eclipse.core.runtime.IExtensionRegistry;
import org.eclipse.core.runtime.Platform;
import org.eclipse.jst.jsf.common.ui.internal.logging.Logger;
import org.eclipse.jst.pagedesigner.PDPlugin;

public class ExtensionReader
{
  private static Logger _log = PDPlugin.getLogger(ExtensionReader.class);
  private static List<ILinkCreator> _handlers = null;
  private static final String ATTR_CLASS = "class";
  
  public static synchronized List<ILinkCreator> getAllLinkHandlers()
  {
    if (_handlers == null) {
      _handlers = readAllLinkHandlers();
    }
    return Collections.unmodifiableList(_handlers);
  }
  
  private static List<ILinkCreator> readAllLinkHandlers()
  {
    List<ILinkCreator> result = new ArrayList();
    IExtensionPoint extensionPoint = Platform.getExtensionRegistry()
      .getExtensionPoint(PDPlugin.getPluginId(), 
      "pageDesignerExtension");
    IExtension[] extensions = extensionPoint.getExtensions();
    for (int i = 0; i < extensions.length; i++)
    {
      IExtension ext = extensions[i];
      IConfigurationElement[] linkHandlers = ext
        .getConfigurationElements();
      for (int j = 0; j < linkHandlers.length; j++) {
        if (linkHandlers[j].getName().equals("linkCreator"))
        {
          linkHandlers[j].getAttribute("class");
          try
          {
            Object obj = linkHandlers[j]
              .createExecutableExtension("class");
            if ((obj instanceof ILinkCreator)) {
              result.add((ILinkCreator)obj);
            }
          }
          catch (CoreException localCoreException)
          {
            _log.error("Log.Error.ExtensionReader.ReadLinkExtension");
          }
        }
      }
    }
    return result;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.pagedesigner.actions.link.ExtensionReader
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.pagedesigner.actions.link;

import org.eclipse.gef.EditPart;
import org.eclipse.jst.pagedesigner.parts.TextEditPart;
import org.eclipse.jst.pagedesigner.viewer.DesignRange;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.Text;

public class HtmlLinkCreator
  extends AbstractLinkCreator
{
  public Element makeLinkElement(EditPart part, DesignRange range)
  {
    if ((part instanceof TextEditPart))
    {
      Text middleNode = LinkUtil.splitDomText(part, range);
      EditPart parent = part.getParent();
      Node parentNode = (Node)parent.getModel();
      Document doc = (parentNode instanceof Document) ? (Document)parentNode : 
        parentNode.getOwnerDocument();
      
      Element htmlLink = doc.createElement("a");
      htmlLink.setAttribute("href", "");
      Text text = doc.createTextNode(middleNode.getNodeValue());
      htmlLink.appendChild(text);
      parentNode.replaceChild(htmlLink, middleNode);
      return htmlLink;
    }
    return null;
  }
  
  public String getSourcePreview(EditPart part, DesignRange range)
  {
    if ((part instanceof TextEditPart))
    {
      TextEditPart textPart = (TextEditPart)part;
      int[] offsets = textPart.getSelectedRange();
      String displayData = textPart.getTextData();
      
      String linkExp = displayData.substring(offsets[0], offsets[1]);
      StringBuffer sb = new StringBuffer();
      sb.append("<a href=\"\">");
      sb.append(linkExp);
      sb.append("</a>");
      return sb.toString();
    }
    return null;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.pagedesigner.actions.link.HtmlLinkCreator
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.pagedesigner.actions.link;

import org.eclipse.gef.EditPart;
import org.eclipse.jst.pagedesigner.viewer.DesignRange;
import org.w3c.dom.Element;

public abstract interface ILinkCreator
{
  public abstract Element makeLinkElement(EditPart paramEditPart, DesignRange paramDesignRange);
  
  public abstract String getLinkIdentifier();
  
  public abstract boolean canExecute(DesignRange paramDesignRange);
  
  public abstract String getSourcePreview(EditPart paramEditPart, DesignRange paramDesignRange);
}

/* Location:
 * Qualified Name:     org.eclipse.jst.pagedesigner.actions.link.I
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66

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