org.tizen.web.editor.html_2.0.0.201311011708

16:50:39.973 INFO  jd.cli.Main - Decompiling org.tizen.web.editor.html_2.0.0.201311011708.jar
package org.tizen.web.editor.html;

import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jst.pagedesigner.PDPlugin;
import org.eclipse.jst.pagedesigner.ui.preferences.PDPreferences;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;

public class Activator
  extends AbstractUIPlugin
{
  public static final String PLUGIN_ID = "org.tizen.web.editor.html";
  private static Activator plugin;
  private final int EDITOR_MODE = 3;
  
  public void start(BundleContext context)
    throws Exception
  {
    super.start(context);
    plugin = this;
    
    setInitialPreferences();
  }
  
  public void stop(BundleContext context)
    throws Exception
  {
    plugin = null;
    super.stop(context);
  }
  
  public static Activator getDefault()
  {
    return plugin;
  }
  
  private void setInitialPreferences()
  {
    IPreferenceStore pdStore = PDPlugin.getDefault().getPreferenceStore();
    pdStore.setValue("DesignerPaletteRootFactory.Size", 125);
    
    pdStore.setValue("DesignerPaletteRootFactory.State", 4);
    pdStore.setValue(PDPreferences.SASH_EDITOR_MODE_PREF, 3);
  }
  
  public static ImageDescriptor getImageDescriptor(String path)
  {
    return imageDescriptorFromPlugin("org.tizen.web.editor.html", path);
  }
}

/* Location:
 * Qualified Name:     org.tizen.web.editor.html.Activator
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.web.editor.html.contentassist;

import org.eclipse.wst.xml.core.internal.contentmodel.CMNamespace;

class CMNamespaceImpl
  extends CMNodeImpl
  implements CMNamespace
{
  private String prefix = null;
  
  public CMNamespaceImpl(String uri, String pfx)
  {
    super(uri);
    prefix = pfx;
  }
  
  public int getNodeType()
  {
    return 8;
  }
  
  public String getPrefix()
  {
    return prefix;
  }
  
  public String getURI()
  {
    return getNodeName();
  }
}

/* Location:
 * Qualified Name:     org.tizen.web.editor.html.contentassist.CMNamespaceImpl
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.web.editor.html.contentassist;

import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;

abstract class CMNodeImpl
  implements CMNode
{
  private String name = null;
  
  public CMNodeImpl(String nm)
  {
    name = nm;
  }
  
  public String getNodeName()
  {
    return name;
  }
  
  public Object getProperty(String propertyName)
  {
    if (propertyName.equals("isXHTML")) {
      return new Boolean(false);
    }
    return null;
  }
  
  public boolean supports(String propertyName)
  {
    if (propertyName.equals("isXHTML")) {
      return true;
    }
    return false;
  }
}

/* Location:
 * Qualified Name:     org.tizen.web.editor.html.contentassist.CMNodeImpl
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.web.editor.html.contentassist;

import java.util.Iterator;

class DeclCollection$DeclIterator
  implements Iterator<Object>
{
  public DeclCollection$DeclIterator(DeclCollection paramDeclCollection)
  {
    maxid = (fDecls.length - 1);
  }
  
  public boolean hasNext()
  {
    return id < maxid;
  }
  
  public Object next()
  {
    if (!hasNext()) {
      return null;
    }
    return this$0.item(++id);
  }
  
  private int id = -1;
  private int maxid = -1;
  
  public void remove() {}
}

/* Location:
 * Qualified Name:     org.tizen.web.editor.html.contentassist.DeclCollection.DeclIterator
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.web.editor.html.contentassist;

import java.util.HashMap;

public class DeclCollection$DualMap
{
  public DeclCollection$DualMap(DeclCollection paramDeclCollection) {}
  
  public DeclCollection$DualMap(DeclCollection paramDeclCollection, Object[] objects)
  {
    initialize(objects);
  }
  
  public int size()
  {
    return table.length;
  }
  
  public Object getValue(int key)
  {
    if (!isValidIndex(key)) {
      return null;
    }
    return table[key];
  }
  
  public int getKey(Object value)
  {
    Integer keyObj = (Integer)map.get(value);
    if (keyObj == null) {
      return -1;
    }
    return keyObj.intValue();
  }
  
  protected void initialize(Object[] objects)
  {
    if (objects == null) {
      return;
    }
    table = objects;
    map = new HashMap();
    for (int key = 0; key < objects.length; key++)
    {
      Object value = table[key];
      map.put(value, new Integer(key));
    }
  }
  
  private Object[] table = null;
  private HashMap<Object, Integer> map = null;
  
  private boolean isValidIndex(int index)
  {
    return (index >= 0) && (index < table.length);
  }
}

/* Location:
 * Qualified Name:     org.tizen.web.editor.html.contentassist.DeclCollection.DualMap
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.web.editor.html.contentassist;

import java.util.HashMap;
import java.util.Iterator;
import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;

abstract class DeclCollection
  implements CMNamedNodeMap
{
  protected class DualMap
  {
    public DualMap() {}
    
    public DualMap(Object[] objects)
    {
      initialize(objects);
    }
    
    public int size()
    {
      return table.length;
    }
    
    public Object getValue(int key)
    {
      if (!isValidIndex(key)) {
        return null;
      }
      return table[key];
    }
    
    public int getKey(Object value)
    {
      Integer keyObj = (Integer)map.get(value);
      if (keyObj == null) {
        return -1;
      }
      return keyObj.intValue();
    }
    
    protected void initialize(Object[] objects)
    {
      if (objects == null) {
        return;
      }
      table = objects;
      map = new HashMap();
      for (int key = 0; key < objects.length; key++)
      {
        Object value = table[key];
        map.put(value, new Integer(key));
      }
    }
    
    private Object[] table = null;
    private HashMap<Object, Integer> map = null;
    
    private boolean isValidIndex(int index)
    {
      return (index >= 0) && (index < table.length);
    }
  }
  
  private class DeclIterator
    implements Iterator<Object>
  {
    public DeclIterator()
    {
      maxid = (fDecls.length - 1);
    }
    
    public boolean hasNext()
    {
      return id < maxid;
    }
    
    public Object next()
    {
      if (!hasNext()) {
        return null;
      }
      return item(++id);
    }
    
    private int id = -1;
    private int maxid = -1;
    
    public void remove() {}
  }
  
  CMNode[] fDecls = null;
  protected static final boolean STRICT_CASE = false;
  protected static final boolean TOLERANT_CASE = true;
  protected static final int ID_UNKNOWN = -1;
  private DualMap fMap = null;
  
  public DeclCollection(String[] names, boolean tolerant)
  {
    fDecls = new CMNode[names.length];
    fMap = new DualMap(names);
  }
  
  protected abstract CMNode create(String paramString);
  
  protected int getID(String name)
  {
    return fMap.getKey(name);
  }
  
  public int getLength()
  {
    return fDecls.length;
  }
  
  protected String getName(int id)
  {
    return (String)fMap.getValue(id);
  }
  
  public CMNode getNamedItem(String name)
  {
    int id = getID(name);
    if (!isValidID(id)) {
      return null;
    }
    return item(id);
  }
  
  private boolean isValidID(int id)
  {
    return (id >= 0) && (id < fDecls.length);
  }
  
  public CMNode item(int index)
  {
    if (!isValidID(index)) {
      return null;
    }
    CMNode decl = fDecls[index];
    if (decl != null) {
      return decl;
    }
    decl = create(getName(index));
    fDecls[index] = decl;
    return decl;
  }
  
  public Iterator<Object> iterator()
  {
    return new DeclIterator();
  }
}

/* Location:
 * Qualified Name:     org.tizen.web.editor.html.contentassist.DeclCollection
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.web.editor.html.contentassist;

import java.util.Arrays;
import java.util.Enumeration;
import java.util.Vector;
import org.eclipse.wst.html.core.internal.contentmodel.HTMLAttributeDeclaration;
import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;

class HTMLAttrDeclImpl
  extends CMNodeImpl
  implements HTMLAttributeDeclaration
{
  private HTMLCMDataTypeImpl type = null;
  private int usage = 0;
  private boolean is_obsolete = false;
  
  public HTMLAttrDeclImpl(String attrName, HTMLCMDataTypeImpl valueType, int valueUsage)
  {
    super(attrName);
    type = valueType;
    switch (valueUsage)
    {
    case 1: 
    case 2: 
    case 3: 
    case 4: 
      usage = valueUsage;
      break;
    default: 
      usage = 1;
    }
  }
  
  public String getAttrName()
  {
    return getNodeName();
  }
  
  public CMDataType getAttrType()
  {
    return type;
  }
  
  /**
   * @deprecated
   */
  public String getDefaultValue()
  {
    if (type.getImpliedValueKind() != 3) {
      return null;
    }
    return type.getImpliedValue();
  }
  
  /**
   * @deprecated
   */
  public Enumeration getEnumAttr()
  {
    Vector v = new Vector(Arrays.asList(type.getEnumeratedValues()));
    return v.elements();
  }
  
  public int getNodeType()
  {
    return 2;
  }
  
  public int getUsage()
  {
    return usage;
  }
  
  public boolean supports(String propertyName)
  {
    if (propertyName.equals("shouldIgnoreCase")) {
      return true;
    }
    if (propertyName.equals("isScriptable")) {
      return true;
    }
    if (propertyName.equals("isObsolete")) {
      return is_obsolete;
    }
    return super.supports(propertyName);
  }
  
  public Object getProperty(String propertyName)
  {
    if (propertyName.equals("shouldIgnoreCase")) {
      return new Boolean(true);
    }
    if (propertyName.equals("isScriptable")) {
      return getAttrType().getDataTypeName() == "EVENT" ? new Boolean(true) : new Boolean(false);
    }
    if (propertyName.equals("isObsolete")) {
      return new Boolean(is_obsolete);
    }
    return super.getProperty(propertyName);
  }
  
  public void obsolete(boolean is_obsolete)
  {
    this.is_obsolete = is_obsolete;
  }
}

/* Location:
 * Qualified Name:     org.tizen.web.editor.html.contentassist.HTMLAttrDeclImpl
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.web.editor.html.contentassist;

import org.eclipse.wst.html.core.internal.contentmodel.HTMLCMDataType;

class HTMLCMDataTypeImpl
  extends CMNodeImpl
  implements HTMLCMDataType
{
  private int impliedValueKind = 1;
  private String impliedValue = null;
  private static final String[] emptyArray = new String[0];
  private String[] enumValues = emptyArray;
  private String instanceValue = null;
  
  public HTMLCMDataTypeImpl(String typeName)
  {
    super(typeName);
  }
  
  public HTMLCMDataTypeImpl(String typeName, String instanceValue)
  {
    super(typeName);
    this.instanceValue = instanceValue;
  }
  
  public String generateInstanceValue()
  {
    return instanceValue;
  }
  
  public String getDataTypeName()
  {
    return getNodeName();
  }
  
  public String[] getEnumeratedValues()
  {
    return enumValues;
  }
  
  public String getImpliedValue()
  {
    return impliedValue;
  }
  
  public int getImpliedValueKind()
  {
    return impliedValueKind;
  }
  
  public int getNodeType()
  {
    return 3;
  }
  
  void setEnumValues(String[] values)
  {
    enumValues = new String[values.length];
    for (int i = 0; i < values.length; i++) {
      enumValues[i] = values[i];
    }
  }
  
  void setImpliedValue(int kind, String value)
  {
    switch (kind)
    {
    case 2: 
    case 3: 
      impliedValueKind = kind;
      impliedValue = value;
      break;
    case 1: 
    default: 
      impliedValueKind = 1;
      impliedValue = null;
    }
  }
}

/* Location:
 * Qualified Name:     org.tizen.web.editor.html.contentassist.HTMLCMDataTypeImpl
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.web.editor.html.contentassist;

import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import org.apache.xmlbeans.XmlException;
import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.tizen.web.DictionaryDocument;
import org.tizen.web.DictionaryDocument.Factory;
import org.tizen.web.DictionaryType;
import org.tizen.web.EntryType;
import org.tizen.web.MarkupType;

class JQueryMobileAttributeCollection
  extends DeclCollection
{
  protected static final Logger logger = LoggerFactory.getLogger(JQueryMobileAttributeCollection.class);
  private static String[] fNames = null;
  static Map<String, CMNode> map = new HashMap();
  
  JQueryMobileAttributeCollection()
  {
    super(getNames(), false);
  }
  
  private static void loadAttributes()
  {
    try
    {
      DictionaryDocument dictionary = DictionaryDocument.Factory.parse(JQueryMobileAttributeCollection.class.getClassLoader().getResourceAsStream("metadata/jquerymobile.xml"));
      EntryType[] entries = dictionary.getDictionary().getMarkup().getEntryArray();
      EntryType[] arrayOfEntryType1;
      int j = (arrayOfEntryType1 = entries).length;
      for (int i = 0; i < j; i++)
      {
        EntryType entry = arrayOfEntryType1[i];
        HTMLCMDataTypeImpl atype = new HTMLCMDataTypeImpl(entry.getType());
        if ("ENUM".equals(entry.getType())) {
          atype.setEnumValues(entry.getValueArray());
        }
        if (entry.getDefault() != null) {
          atype.setImpliedValue(3, entry.getDefault());
        }
        map.put(entry.getName(), new HTMLAttrDeclImpl(entry.getName(), atype, 1));
      }
    }
    catch (XmlException e)
    {
      logger.error("Error occured", e);
    }
    catch (IOException e)
    {
      logger.error("Error occured", e);
    }
  }
  
  private static String[] getNames()
  {
    if (fNames == null)
    {
      loadAttributes();
      
      fNames = (String[])map.keySet().toArray(new String[0]);
    }
    return fNames;
  }
  
  protected CMNode create(String elementName)
  {
    CMNode edec = null;
    edec = (CMNode)map.get(elementName);
    return edec;
  }
}

/* Location:
 * Qualified Name:     org.tizen.web.editor.html.contentassist.JQueryMobileAttributeCollection
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.web.editor.html.contentassist;

import org.eclipse.wst.html.core.internal.contentmodel.HTMLCMDocument;
import org.eclipse.wst.html.core.internal.contentmodel.HTMLElementDeclaration;
import org.eclipse.wst.html.core.internal.contentmodel.HTMLEntityDeclaration;
import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
import org.eclipse.wst.xml.core.internal.contentmodel.CMNamespace;

public class JQueryMobileH5CMDocImpl
  extends CMNodeImpl
  implements HTMLCMDocument
{
  private CMNamespaceImpl namespace = null;
  private JQueryMobileAttributeCollection elements = null;
  
  public JQueryMobileH5CMDocImpl(String docTypeName, CMNamespaceImpl targetNamespace)
  {
    super(docTypeName);
    namespace = targetNamespace;
    
    elements = new JQueryMobileAttributeCollection();
  }
  
  public HTMLElementDeclaration getElementDeclaration(String elementName)
  {
    if (elements == null) {
      return null;
    }
    return (HTMLElementDeclaration)elements.getNamedItem(elementName);
  }
  
  public CMNamedNodeMap getElements()
  {
    return elements;
  }
  
  public CMNamedNodeMap getEntities()
  {
    return null;
  }
  
  public HTMLEntityDeclaration getEntityDeclaration(String entityName)
  {
    return null;
  }
  
  public CMNamespace getNamespace()
  {
    return namespace;
  }
  
  public int getNodeType()
  {
    return 4;
  }
}

/* Location:
 * Qualified Name:     org.tizen.web.editor.html.contentassist.JQueryMobileH5CMDocImpl
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.web.editor.html.contentassist;

import java.util.ArrayList;
import java.util.List;
import org.eclipse.wst.html.core.internal.contentmodel.HTMLAttributeDeclaration;
import org.eclipse.wst.html.core.internal.contentmodel.HTMLCMDocument;
import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.extension.ModelQueryExtension;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
import org.eclipse.wst.xml.core.internal.ssemodelquery.ModelQueryAdapter;
import org.w3c.dom.Element;

public class JQueryMobileModelQueryExtension
  extends ModelQueryExtension
{
  public String[] getAttributeValues(Element e, String namespace, String name)
  {
    return new String[0];
  }
  
  private CMDocument getJQMDocument(IDOMNode node)
  {
    CMNamespaceImpl h50ns = new CMNamespaceImpl("http://www.w3.org/TR/html50/", "");
    CMDocument doc = new JQueryMobileH5CMDocImpl("HTML5", h50ns);
    
    return doc;
  }
  
  public CMNode[] getAvailableElementContent(Element parentElement, String namespace, int includeOptions)
  {
    CMNode[] nodes = EMPTY_CMNODE_ARRAY;
    ArrayList nodeList = new ArrayList();
    if (((includeOptions & 0x1) != 0) && ((parentElement instanceof IDOMNode)))
    {
      IDOMNode node = (IDOMNode)parentElement;
      
      ModelQueryAdapter mqAdapter = null;
      if (node.getNodeType() == 9) {
        mqAdapter = (ModelQueryAdapter)node.getAdapterFor(ModelQueryAdapter.class);
      } else {
        mqAdapter = (ModelQueryAdapter)((IDOMNode)node.getOwnerDocument()).getAdapterFor(ModelQueryAdapter.class);
      }
      if (mqAdapter != null)
      {
        CMDocument doc = getJQMDocument(node);
        if (doc != null)
        {
          CMNamedNodeMap elements = doc.getElements();
          if ((elements != null) && (((doc instanceof HTMLCMDocument)) || (node.getNodeType() == 9)))
          {
            List rejectElements = new ArrayList();
            for (int j = 0; j < elements.getLength(); j++)
            {
              HTMLAttributeDeclaration ad = (HTMLAttributeDeclaration)elements.item(j);
              if (!rejectElements.contains(ad.getNodeName())) {
                nodeList.add(ad);
              }
            }
          }
        }
      }
      nodes = (CMNode[])nodeList.toArray(new CMNode[0]);
    }
    return nodes;
  }
}

/* Location:
 * Qualified Name:     org.tizen.web.editor.html.contentassist.JQueryMobileModelQueryExtension
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.web.editor.html.pagedesigner;

public class HTML5Constants
{
  public static final String TAG_ARTICLE = "article";
  public static final String TAG_ASIDE = "aside";
  public static final String TAG_AUDIO = "audio";
  public static final String TAG_CANVAS = "canvas";
  public static final String TAG_COMMAND = "command";
  public static final String TAG_DATALIST = "datalist";
  public static final String TAG_DETAILS = "details";
  public static final String TAG_FIGURE = "figure";
  public static final String TAG_FIGCAPTION = "figcaption";
  public static final String TAG_FOOTER = "footer";
  public static final String TAG_HEADER = "header";
  public static final String TAG_HGROUP = "hgroup";
  public static final String TAG_KEYGEN = "keygen";
  public static final String TAG_MARK = "mark";
  public static final String TAG_MATH = "math";
  public static final String TAG_METER = "meter";
  public static final String TAG_NAV = "nav";
  public static final String TAG_OUTPUT = "output";
  public static final String TAG_PROGRESS = "progress";
  public static final String TAG_RP = "rp";
  public static final String TAG_RT = "rt";
  public static final String TAG_RUBY = "ruby";
  public static final String TAG_SECTION = "section";
  public static final String TAG_SOURCE = "source";
  public static final String TAG_SUMMARY = "summary";
  public static final String TAG_SVG = "svg";
  public static final String TAG_TIME = "time";
  public static final String TAG_VIDEO = "video";
}

/* Location:
 * Qualified Name:     org.tizen.web.editor.html.pagedesigner.HTML5Constants
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.web.editor.html.pagedesigner;

import org.eclipse.jst.jsf.common.metadata.internal.IMetaDataSourceModelProvider;
import org.eclipse.jst.jsf.core.metadata.internal.HTMLContentModelMetaDataTranslator;
import org.eclipse.wst.html.core.internal.contentmodel.HTMLCMDocument;

public class HTML5ContentModelMetaDataTranslator
  extends HTMLContentModelMetaDataTranslator
{
  public boolean canTranslate(IMetaDataSourceModelProvider modelProvider)
  {
    if ((modelProvider != null) && ((modelProvider.getSourceModel() instanceof HTMLCMDocument)))
    {
      HTMLCMDocument doc = (HTMLCMDocument)modelProvider.getSourceModel();
      if ("HTML5".equals(doc.getNodeName())) {
        return true;
      }
    }
    return false;
  }
  
  protected String getURIDescription()
  {
    return "HTML5 Tags";
  }
  
  protected String getURIDisplayLabel()
  {
    return "HTML 5";
  }
}

/* Location:
 * Qualified Name:     org.tizen.web.editor.html.pagedesigner.HTML5ContentModelMetaDataTranslator
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.web.editor.html.pagedesigner;

import java.util.Arrays;
import java.util.List;

public class HTML5Util
{
  static final String[][] Tags = {
    new String[0], 
    
    {
    "article", 
    "aside", 
    "audio", 
    "canvas", 
    "command", 
    "datalist", 
    "details", 
    "figure", 
    "figcaption", 
    "footer", 
    "header", 
    "hgroup", 
    "keygen", 
    "mark", 
    "math", 
    "meter", 
    "nav", 
    "output", 
    "progress", 
    "rp", 
    "rt", 
    "ruby", 
    "section", 
    "source", 
    "summary", 
    "svg", 
    "time", 
    "video" } };
  
  public static boolean isVisualHtmlElement(String tag)
  {
    return Arrays.asList(Tags[1]).contains(tag.toLowerCase());
  }
  
  public static boolean isHtmlElement(String tag)
  {
    boolean b = false;
    String[][] arrayOfString;
    int j = (arrayOfString = Tags).length;
    for (int i = 0; i < j; i++)
    {
      String[] tags = arrayOfString[i];
      b = Arrays.asList(tags).contains(tag.toLowerCase());
      if (b) {
        break;
      }
    }
    return b;
  }
}

/* Location:
 * Qualified Name:     org.tizen.web.editor.html.pagedesigner.HTML5Util
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.web.editor.html.pagedesigner;

public class PaletteConstants
{
  public static final String HTML5 = "HTML5";
  public static final String Web = "Web";
  public static final String URI_HTML = "html";
}

/* Location:
 * Qualified Name:     org.tizen.web.editor.html.pagedesigner.PaletteConstants
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.web.editor.html.pagedesigner;

import java.util.Map;
import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.ITagAttribute;
import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.ITagElement;
import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;

class TagElement
  implements ITagElement
{
  CMNode namedItem;
  String name;
  
  public TagElement(CMNode namedItem)
  {
    this.namedItem = namedItem;
    name = namedItem.getNodeName();
  }
  
  public TagElement(String name)
  {
    this.name = name;
  }
  
  public String getUri()
  {
    return null;
  }
  
  public String getTagHandlerClassName()
  {
    return null;
  }
  
  public String getName()
  {
    return name;
  }
  
  public Map<String, ? extends ITagAttribute> getAttributes()
  {
    return null;
  }
  
  public Map getAttributeHandlers()
  {
    return null;
  }
}

/* Location:
 * Qualified Name:     org.tizen.web.editor.html.pagedesigner.TagElement
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.web.editor.html.pagedesigner;

import java.lang.annotation.Annotation;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Retention(RetentionPolicy.RUNTIME)
@Target({java.lang.annotation.ElementType.TYPE})
public @interface WebNamespace {}

/* Location:
 * Qualified Name:     org.tizen.web.editor.html.pagedesigner.WebNamespace
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.web.editor.html.pagedesigner;

import org.eclipse.jst.pagedesigner.converter.HiddenTagConverter2;
import org.eclipse.swt.graphics.Image;
import org.w3c.dom.Element;

class WebTagConverterFactory$1
  extends HiddenTagConverter2
{
  WebTagConverterFactory$1(WebTagConverterFactory paramWebTagConverterFactory, Element $anonymous0, Image $anonymous1)
  {
    super($anonymous0, $anonymous1);
  }
  
  public boolean isVisualByHTML()
  {
    return true;
  }
}

/* Location:
 * Qualified Name:     org.tizen.web.editor.html.pagedesigner.WebTagConverterFactory.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.web.editor.html.pagedesigner;

import org.eclipse.jst.pagedesigner.converter.ConverterUtil;
import org.eclipse.jst.pagedesigner.converter.DumTagConverter;
import org.w3c.dom.Element;

class WebTagConverterFactory$2
  extends DumTagConverter
{
  WebTagConverterFactory$2(WebTagConverterFactory paramWebTagConverterFactory, Element $anonymous0, boolean $anonymous1)
  {
    super($anonymous0, $anonymous1);
  }
  
  protected Element doConvertRefresh()
  {
    Element result = createElement(getHostElement().getTagName());
    ConverterUtil.copyAllAttributes(getHostElement(), result, null);
    copyChildren(getHostElement(), result);
    setMinWidth(20);
    return result;
  }
}

/* Location:
 * Qualified Name:     org.tizen.web.editor.html.pagedesigner.WebTagConverterFactory.2
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.web.editor.html.pagedesigner;

import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jst.pagedesigner.converter.ConverterUtil;
import org.eclipse.jst.pagedesigner.converter.DumTagConverter;
import org.eclipse.jst.pagedesigner.converter.HiddenTagConverter2;
import org.eclipse.jst.pagedesigner.converter.ITagConverter;
import org.eclipse.jst.pagedesigner.converter.html.HTMLConverterFactory;
import org.eclipse.swt.graphics.Image;
import org.tizen.web.editor.html.Activator;
import org.w3c.dom.Element;

public class WebTagConverterFactory
  extends HTMLConverterFactory
{
  static final Image DEFAULT_PALETTE_TAG_IMG = Activator.getImageDescriptor("icons/PD_Palette_Default.gif").createImage();
  
  public ITagConverter createConverter(Element element, int mode)
  {
    String tagName = element.getLocalName();
    if (HTML5Util.isHtmlElement(tagName))
    {
      if (!HTML5Util.isVisualHtmlElement(tagName)) {
        new HiddenTagConverter2(element, getUnknownImage())
        {
          public boolean isVisualByHTML()
          {
            return true;
          }
        };
      }
      new DumTagConverter(element, true)
      {
        protected Element doConvertRefresh()
        {
          Element result = createElement(getHostElement().getTagName());
          ConverterUtil.copyAllAttributes(getHostElement(), result, null);
          copyChildren(getHostElement(), result);
          setMinWidth(20);
          return result;
        }
      };
    }
    return super.createConverter(element, mode);
  }
  
  private static Image getUnknownImage()
  {
    return DEFAULT_PALETTE_TAG_IMG;
  }
}

/* Location:
 * Qualified Name:     org.tizen.web.editor.html.pagedesigner.WebTagConverterFactory
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.web.editor.html.pagedesigner;

import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.ITagElement;
import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.Namespace;

abstract class WebTagRegistry$AbstractNamespace
  extends Namespace
{
  private static final long serialVersionUID = 8044789494659267618L;
  private final Map<String, ITagElement> _tags;
  
  public WebTagRegistry$AbstractNamespace(WebTagRegistry paramWebTagRegistry)
  {
    _tags = new HashMap();
  }
  
  public String getDisplayName()
  {
    return getClass().getName();
  }
  
  public abstract String getNSUri();
  
  public abstract ITagElement createTagElement(String paramString);
  
  public ITagElement getViewElement(String name)
  {
    ITagElement tagElement = (ITagElement)_tags.get(name);
    if (tagElement == null)
    {
      tagElement = createTagElement(name);
      _tags.put(name, tagElement);
    }
    return tagElement;
  }
  
  public Collection<? extends ITagElement> getViewElements()
  {
    return _tags.values();
  }
  
  public boolean hasViewElements()
  {
    return _tags.size() > 0;
  }
  
  public boolean isInitialized()
  {
    return true;
  }
}

/* Location:
 * Qualified Name:     org.tizen.web.editor.html.pagedesigner.WebTagRegistry.AbstractNamespace
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.web.editor.html.pagedesigner;

import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.ITagElement;
import org.eclipse.wst.html.core.internal.contentmodel.HTMLCMDocumentFactory;
import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;

@WebNamespace
class WebTagRegistry$HTML5Namespace
  extends WebTagRegistry.AbstractNamespace
{
  private static final long serialVersionUID = -859873205602024799L;
  CMDocument doc;
  
  public WebTagRegistry$HTML5Namespace(WebTagRegistry paramWebTagRegistry)
  {
    super(paramWebTagRegistry);
    doc = HTMLCMDocumentFactory.getCMDocument("HTML5");
  }
  
  public String getNSUri()
  {
    return "HTML5";
  }
  
  public ITagElement createTagElement(String name)
  {
    CMNode namedItem = doc.getElements().getNamedItem(name);
    if (namedItem != null) {
      return new TagElement(namedItem);
    }
    return null;
  }
}

/* Location:
 * Qualified Name:     org.tizen.web.editor.html.pagedesigner.WebTagRegistry.HTML5Namespace
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.web.editor.html.pagedesigner;

import java.lang.annotation.Annotation;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jst.jsf.common.internal.managedobject.IManagedObject;
import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.ITagElement;
import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.Namespace;
import org.eclipse.jst.jsf.designtime.internal.view.model.AbstractTagRegistry;
import org.eclipse.wst.html.core.internal.contentmodel.HTMLCMDocumentFactory;
import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class WebTagRegistry
  extends AbstractTagRegistry
  implements IManagedObject
{
  protected final Logger logger = LoggerFactory.getLogger(getClass());
  private final Map<String, Namespace> _nsResolved;
  
  public WebTagRegistry(IProject project)
  {
    _nsResolved = new HashMap();
    
    Class[] classes = WebTagRegistry.class.getDeclaredClasses();
    Class[] arrayOfClass1;
    int j = (arrayOfClass1 = classes).length;
    for (int i = 0; i < j; i++)
    {
      Class<?> clazz = arrayOfClass1[i];
      Annotation annotation = clazz.getAnnotation(WebNamespace.class);
      if (annotation != null) {
        try
        {
          Constructor<?> ct = clazz.getConstructor(new Class[] { WebTagRegistry.class });
          Namespace ns = (Namespace)ct.newInstance(new Object[] { this });
          _nsResolved.put(ns.getNSUri(), ns);
        }
        catch (SecurityException e)
        {
          logger.error("Error occured", e);
        }
        catch (NoSuchMethodException e)
        {
          logger.error("Error occured", e);
        }
        catch (IllegalArgumentException e)
        {
          logger.error("Error occured", e);
        }
        catch (InstantiationException e)
        {
          logger.error("Error occured", e);
        }
        catch (IllegalAccessException e)
        {
          logger.error("Error occured", e);
        }
        catch (InvocationTargetException e)
        {
          logger.error("Error occured", e);
        }
      }
    }
  }
  
  public Collection<? extends Namespace> getAllTagLibraries()
  {
    Set<Namespace> allTagLibraries = new HashSet();
    allTagLibraries.addAll(_nsResolved.values());
    return allTagLibraries;
  }
  
  public Namespace getTagLibrary(String uri)
  {
    getAllTagLibraries();
    return (Namespace)_nsResolved.get(uri);
  }
  
  protected void cleanupPersistentState() {}
  
  protected void doDispose()
  {
    _nsResolved.clear();
  }
  
  protected Job getRefreshJob(boolean flushCaches)
  {
    return null;
  }
  
  public void checkpoint() {}
  
  @WebNamespace
  class HTML5Namespace
    extends WebTagRegistry.AbstractNamespace
  {
    private static final long serialVersionUID = -859873205602024799L;
    CMDocument doc;
    
    public HTML5Namespace()
    {
      super();
      doc = HTMLCMDocumentFactory.getCMDocument("HTML5");
    }
    
    public String getNSUri()
    {
      return "HTML5";
    }
    
    public ITagElement createTagElement(String name)
    {
      CMNode namedItem = doc.getElements().getNamedItem(name);
      if (namedItem != null) {
        return new TagElement(namedItem);
      }
      return null;
    }
  }
  
  abstract class AbstractNamespace
    extends Namespace
  {
    private static final long serialVersionUID = 8044789494659267618L;
    private final Map<String, ITagElement> _tags;
    
    public AbstractNamespace()
    {
      _tags = new HashMap();
    }
    
    public String getDisplayName()
    {
      return getClass().getName();
    }
    
    public abstract String getNSUri();
    
    public abstract ITagElement createTagElement(String paramString);
    
    public ITagElement getViewElement(String name)
    {
      ITagElement tagElement = (ITagElement)_tags.get(name);
      if (tagElement == null)
      {
        tagElement = createTagElement(name);
        _tags.put(name, tagElement);
      }
      return tagElement;
    }
    
    public Collection<? extends ITagElement> getViewElements()
    {
      return _tags.values();
    }
    
    public boolean hasViewElements()
    {
      return _tags.size() > 0;
    }
    
    public boolean isInitialized()
    {
      return true;
    }
  }
}

/* Location:
 * Qualified Name:     org.tizen.web.editor.html.pagedesigner.WebTagRegistry
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.web.editor.html.pagedesigner;

import org.eclipse.core.resources.IProject;
import org.eclipse.jst.jsf.common.internal.managedobject.ObjectManager.ManagedObjectException;
import org.eclipse.jst.jsf.designtime.internal.view.model.ITagRegistry;
import org.eclipse.jst.jsf.designtime.internal.view.model.TagRegistryFactory;
import org.eclipse.jst.jsf.designtime.internal.view.model.TagRegistryFactory.TagRegistryFactoryException;

public class WebTagRegistryManager$WebTagRegistryFactory
  extends TagRegistryFactory
{
  public ITagRegistry createTagRegistry(IProject project)
    throws TagRegistryFactory.TagRegistryFactoryException
  {
    try
    {
      return (ITagRegistry)WebTagRegistryManager.access$1(project.getWorkspace()).getInstance(project);
    }
    catch (ObjectManager.ManagedObjectException e)
    {
      throw new TagRegistryFactory.TagRegistryFactoryException(e);
    }
  }
  
  public boolean isInstance(IProject project)
  {
    return WebTagRegistryManager.access$1(project.getWorkspace()).isInstance(project);
  }
  
  public String getDisplayName()
  {
    return WebTagRegistryFactory.class.getName();
  }
  
  public boolean projectIsValid(IProject project)
  {
    return project != null;
  }
}

/* Location:
 * Qualified Name:     org.tizen.web.editor.html.pagedesigner.WebTagRegistryManager.WebTagRegistryFactory
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.web.editor.html.pagedesigner;

import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.jst.jsf.common.internal.managedobject.ObjectManager.ManagedObjectException;
import org.eclipse.jst.jsf.common.internal.resource.ResourceSingletonObjectManager;
import org.eclipse.jst.jsf.designtime.internal.view.model.ITagRegistry;
import org.eclipse.jst.jsf.designtime.internal.view.model.TagRegistryFactory;
import org.eclipse.jst.jsf.designtime.internal.view.model.TagRegistryFactory.TagRegistryFactoryException;

public final class WebTagRegistryManager
  extends ResourceSingletonObjectManager<WebTagRegistry, IProject>
{
  private static WebTagRegistryManager _instance;
  
  private static WebTagRegistryManager getGlobalManager(IWorkspace workspace)
  {
    synchronized (WebTagRegistryManager.class)
    {
      if (_instance == null) {
        _instance = new WebTagRegistryManager(workspace);
      }
      return _instance;
    }
  }
  
  private WebTagRegistryManager(IWorkspace workspace)
  {
    super(workspace);
  }
  
  protected WebTagRegistry createNewInstance(IProject project)
  {
    return new WebTagRegistry(project);
  }
  
  public static class WebTagRegistryFactory
    extends TagRegistryFactory
  {
    public ITagRegistry createTagRegistry(IProject project)
      throws TagRegistryFactory.TagRegistryFactoryException
    {
      try
      {
        return (ITagRegistry)WebTagRegistryManager.getGlobalManager(project.getWorkspace()).getInstance(project);
      }
      catch (ObjectManager.ManagedObjectException e)
      {
        throw new TagRegistryFactory.TagRegistryFactoryException(e);
      }
    }
    
    public boolean isInstance(IProject project)
    {
      return WebTagRegistryManager.getGlobalManager(project.getWorkspace()).isInstance(project);
    }
    
    public String getDisplayName()
    {
      return WebTagRegistryFactory.class.getName();
    }
    
    public boolean projectIsValid(IProject project)
    {
      return project != null;
    }
  }
}

/* Location:
 * Qualified Name:     org.tizen.web.editor.html.pagedesigner.WebTagRegistryManager
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.web.editor.html.pagedesigner;

import org.eclipse.jst.jsf.common.metadata.internal.IMetaDataLocator;
import org.eclipse.jst.jsf.common.metadata.internal.IMetaDataSourceModelProvider;
import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;

class WebTaglibMetaDataLocator$MyTaglibMetaDataSource
  implements IMetaDataSourceModelProvider
{
  private CMDocument doc;
  private IMetaDataLocator locator;
  
  WebTaglibMetaDataLocator$MyTaglibMetaDataSource(WebTaglibMetaDataLocator paramWebTaglibMetaDataLocator, CMDocument doc)
  {
    this.doc = doc;
  }
  
  public Object getSourceModel()
  {
    return doc;
  }
  
  public IMetaDataLocator getLocator()
  {
    return locator;
  }
  
  public void setLocator(IMetaDataLocator locator)
  {
    this.locator = locat
1 2

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