org.eclipse.jst.jsp.core_1.2.402.v201112071853

16:45:57.792 INFO  jd.cli.Main - Decompiling org.eclipse.jst.jsp.core_1.2.402.v201112071853.jar
package org.eclipse.jst.jsp.core.internal;

class Assert$AssertionFailedException
  extends RuntimeException
{
  private static final long serialVersionUID = 1L;
  final Assert this$0;
  
  public Assert$AssertionFailedException(Assert paramAssert)
  {
    this$0 = paramAssert;
  }
  
  public Assert$AssertionFailedException(Assert paramAssert, String detail)
  {
    super(detail);
    this$0 = paramAssert;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsp.core.internal.Assert.AssertionFailedException
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsp.core.internal;

public final class Assert
{
  class AssertionFailedException
    extends RuntimeException
  {
    private static final long serialVersionUID = 1L;
    
    public AssertionFailedException() {}
    
    public AssertionFailedException(String detail)
    {
      super();
    }
  }
  
  public static boolean isLegal(boolean expression, String message)
  {
    if (!expression) {
      throw new IllegalArgumentException(message);
    }
    return expression;
  }
  
  public static void isNotNull(Object object, String message)
  {
    if (object == null)
    {
      void tmp15_12 = new Assert();tmp15_12.getClass();throw new AssertionFailedException(tmp15_12, message);
    }
  }
  
  public static boolean isTrue(boolean expression, String message)
  {
    if (!expression)
    {
      void tmp15_12 = new Assert();tmp15_12.getClass();throw new AssertionFailedException(tmp15_12, message);
    }
    return expression;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsp.core.internal.Assert
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsp.core.internal;

import org.eclipse.osgi.util.NLS;

public class JSPCoreMessages
  extends NLS
{
  private static final String BUNDLE_NAME = "org.eclipse.jst.jsp.core.internal.JSPCorePluginResources";
  public static String JSPDirectiveValidator_0;
  public static String JSPDirectiveValidator_1;
  public static String JSPDirectiveValidator_2;
  public static String JSPDirectiveValidator_3;
  public static String JSPDirectiveValidator_4;
  public static String JSPDirectiveValidator_5;
  public static String JSPDirectiveValidator_6;
  public static String JSPDirectiveValidator_7;
  public static String JSPDirectiveValidator_8;
  public static String JSPDirectiveValidator_9;
  public static String JSPDirectiveValidator_10;
  public static String JSPDirectiveValidator_11;
  public static String JSPActionValidator_0;
  public static String JSPActionValidator_1;
  public static String JSPIndexManager_0;
  public static String JSPIndexManager_2;
  public static String JSP_Search;
  public static String JSPEL_Syntax;
  public static String JSPEL_Token;
  public static String JSPDocumentLoader_1;
  public static String JSPFContentPropertiesManager_Updating;
  public static String JSPFContentPropertiesManager_Problems_Updating;
  public static String JSPBatchValidator_0;
  public static String TaglibHelper_0;
  public static String TaglibHelper_1;
  public static String TaglibHelper_2;
  public static String TaglibHelper_3;
  public static String JSPTranslator_0;
  public static String JSPTranslator_1;
  public static String JSPTranslator_2;
  public static String JSPTranslator_3;
  public static String JSPTranslator_4;
  public static String JSPTranslator_5;
  public static String JSPELTranslator_0;
  public static String TLDValidator_MissingValidator;
  public static String TLDValidator_MissingVariable;
  public static String TLDValidator_MissingListener;
  public static String Initializing;
  public static String Persisting_JSP_Translations;
  public static String JSPCorePlugin_Initializing_JSP_Tools;
  public static String JSPIndexManager;
  /**
   * @deprecated
   */
  public static String MESSAGE_JSP_VALIDATING_MESSAGE_UI_;
  
  static
  {
    NLS.initializeMessages("org.eclipse.jst.jsp.core.internal.JSPCorePluginResources", JSPCoreMessages.class);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsp.core.internal.JSPCoreMessages
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsp.core.internal;

import org.eclipse.core.resources.ISavedState;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.IWorkspaceRunnable;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jst.jsp.core.internal.java.search.JSPIndexManager;
import org.osgi.framework.Bundle;

class JSPCorePlugin$1
  implements IWorkspaceRunnable
{
  final JSPCorePlugin.PluginInitializerJob this$1;
  
  JSPCorePlugin$1(JSPCorePlugin.PluginInitializerJob paramPluginInitializerJob)
  {
    this$1 = paramPluginInitializerJob;
  }
  
  public void run(IProgressMonitor worspaceMonitor)
    throws CoreException
  {
    ISavedState savedState = null;
    try
    {
      savedState = ResourcesPlugin.getWorkspace().addSaveParticipant(
        JSPCorePlugin.access$0().getBundle().getSymbolicName(), new JSPCorePlugin.SaveParticipant());
    }
    catch (CoreException e)
    {
      Logger.logException("JSP Core Plugin failed at loading previously saved state. All componenets dependent on this state will start as if first workspace load.", 
        e);
    }
    if (savedState != null) {
      try
      {
        Thread.currentThread().setPriority(1);
      }
      finally
      {
        savedState.processResourceChangeEvents(new JSPCorePlugin.2(this, worspaceMonitor));
      }
    } else {
      JSPIndexManager.getDefault().start(null, worspaceMonitor);
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsp.core.internal.JSPCorePlugin.1
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsp.core.internal;

import org.eclipse.core.resources.IResourceChangeEvent;
import org.eclipse.core.resources.IResourceChangeListener;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jst.jsp.core.internal.java.search.JSPIndexManager;

class JSPCorePlugin$2
  implements IResourceChangeListener
{
  final JSPCorePlugin.1 this$2;
  private final IProgressMonitor val$worspaceMonitor;
  
  JSPCorePlugin$2(JSPCorePlugin.1 param1, IProgressMonitor paramIProgressMonitor)
  {
    this$2 = param1;val$worspaceMonitor = paramIProgressMonitor;
  }
  
  public void resourceChanged(IResourceChangeEvent event)
  {
    JSPIndexManager.getDefault().start(event.getDelta(), val$worspaceMonitor);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsp.core.internal.JSPCorePlugin.2
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsp.core.internal;

import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;

class JSPCorePlugin$PluginInitializerJob
  extends Job
{
  protected JSPCorePlugin$PluginInitializerJob()
  {
    super(JSPCoreMessages.JSPCorePlugin_Initializing_JSP_Tools);
    
    setUser(false);
    setSystem(true);
    setPriority(30);
  }
  
  protected IStatus run(IProgressMonitor monitor)
  {
    IStatus status = Status.OK_STATUS;
    IWorkspace workspace = ResourcesPlugin.getWorkspace();
    try
    {
      workspace.run(new JSPCorePlugin.1(this), 
      
        monitor);
    }
    catch (CoreException e)
    {
      status = e.getStatus();
    }
    return status;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsp.core.internal.JSPCorePlugin.PluginInitializerJob
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsp.core.internal;

import org.eclipse.core.resources.ISaveContext;
import org.eclipse.core.resources.ISaveParticipant;
import org.eclipse.core.runtime.CoreException;

class JSPCorePlugin$SaveParticipant
  implements ISaveParticipant
{
  public void doneSaving(ISaveContext context) {}
  
  public void prepareToSave(ISaveContext context)
    throws CoreException
  {}
  
  public void rollback(ISaveContext context) {}
  
  public void saving(ISaveContext context)
    throws CoreException
  {
    context.needDelta();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsp.core.internal.JSPCorePlugin.SaveParticipant
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsp.core.internal;

import org.eclipse.core.resources.ISaveContext;
import org.eclipse.core.resources.ISaveParticipant;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Plugin;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jst.jsp.core.internal.contentmodel.TaglibController;
import org.eclipse.jst.jsp.core.internal.contentproperties.JSPFContentPropertiesManager;
import org.eclipse.jst.jsp.core.internal.contenttype.DeploymentDescriptorPropertyCache;
import org.eclipse.jst.jsp.core.internal.java.search.JSPIndexManager;
import org.eclipse.jst.jsp.core.internal.taglib.TaglibHelperManager;
import org.eclipse.jst.jsp.core.taglib.TaglibIndex;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;

public class JSPCorePlugin
  extends Plugin
{
  private static JSPCorePlugin plugin;
  private Job fPluginInitializerJob;
  
  public JSPCorePlugin()
  {
    plugin = this;
    fPluginInitializerJob = new PluginInitializerJob();
  }
  
  public static JSPCorePlugin getDefault()
  {
    return plugin;
  }
  
  public void start(BundleContext context)
    throws Exception
  {
    super.start(context);
    
    TaglibIndex.startup();
    TaglibController.startup();
    
    JavaCore.addElementChangedListener(TaglibHelperManager.getInstance());
    
    fPluginInitializerJob.schedule(2000L);
    
    JSPFContentPropertiesManager.startup();
    
    DeploymentDescriptorPropertyCache.start();
  }
  
  public void stop(BundleContext context)
    throws Exception
  {
    DeploymentDescriptorPropertyCache.stop();
    
    JSPFContentPropertiesManager.shutdown();
    
    ResourcesPlugin.getWorkspace().removeSaveParticipant(plugin.getBundle().getSymbolicName());
    
    JSPIndexManager.getDefault().stop();
    
    JavaCore.removeElementChangedListener(TaglibHelperManager.getInstance());
    
    TaglibController.shutdown();
    TaglibIndex.shutdown();
    
    super.stop(context);
  }
  
  private static class PluginInitializerJob
    extends Job
  {
    protected PluginInitializerJob()
    {
      super();
      
      setUser(false);
      setSystem(true);
      setPriority(30);
    }
    
    protected IStatus run(IProgressMonitor monitor)
    {
      IStatus status = Status.OK_STATUS;
      IWorkspace workspace = ResourcesPlugin.getWorkspace();
      try
      {
        workspace.run(new JSPCorePlugin.1(this), 
        
          monitor);
      }
      catch (CoreException e)
      {
        status = e.getStatus();
      }
      return status;
    }
  }
  
  private static class SaveParticipant
    implements ISaveParticipant
  {
    public void doneSaving(ISaveContext context) {}
    
    public void prepareToSave(ISaveContext context)
      throws CoreException
    {}
    
    public void rollback(ISaveContext context) {}
    
    public void saving(ISaveContext context)
      throws CoreException
    {
      context.needDelta();
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsp.core.internal.JSPCorePlugin
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsp.core.internal;

import com.ibm.icu.util.StringTokenizer;
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.jst.jsp.core";
  private static final String TRACEFILTER_LOCATION = "/debug/tracefilter";
  public static final int OK = 0;
  public static final int INFO = 1;
  public static final int WARNING = 2;
  public static final int ERROR = 4;
  public static final int OK_DEBUG = 200;
  public static final int INFO_DEBUG = 201;
  public static final int WARNING_DEBUG = 202;
  public static final int ERROR_DEBUG = 204;
  
  protected static void _log(int level, String message, Throwable exception)
  {
    if (((level == 200) || (level == 201) || (level == 202) || (level == 204)) && 
      (!isDebugging())) {
      return;
    }
    int severity = 0;
    switch (level)
    {
    case 1: 
    case 201: 
      severity = 1;
      break;
    case 2: 
    case 202: 
      severity = 2;
      break;
    case 4: 
    case 204: 
      severity = 4;
    }
    message = message != null ? message : "null";
    Status statusObj = new Status(severity, "org.eclipse.jst.jsp.core", severity, message, exception);
    Bundle bundle = Platform.getBundle("org.eclipse.jst.jsp.core");
    if (bundle != null) {
      Platform.getLog(bundle).log(statusObj);
    }
  }
  
  protected static void _trace(String category, String message, Throwable exception)
  {
    if (isTracing(category))
    {
      message = message != null ? message : "null";
      Status statusObj = new Status(0, "org.eclipse.jst.jsp.core", 0, message, exception);
      Bundle bundle = Platform.getBundle("org.eclipse.jst.jsp.core");
      if (bundle != null) {
        Platform.getLog(bundle).log(statusObj);
      }
    }
  }
  
  public static boolean isDebugging()
  {
    return Platform.inDebugMode();
  }
  
  public static boolean isTracing(String category)
  {
    if (!isDebugging()) {
      return false;
    }
    String traceFilter = Platform.getDebugOption("org.eclipse.jst.jsp.core/debug/tracefilter");
    if (traceFilter != null)
    {
      StringTokenizer tokenizer = new StringTokenizer(traceFilter, ",");
      while (tokenizer.hasMoreTokens())
      {
        String cat = tokenizer.nextToken().trim();
        if (category.equals(cat)) {
          return true;
        }
      }
    }
    return false;
  }
  
  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);
  }
  
  public static void traceException(String category, String message, Throwable exception)
  {
    _trace(category, message, exception);
  }
  
  public static void traceException(String category, Throwable exception)
  {
    _trace(category, exception.getMessage(), exception);
  }
  
  public static void trace(String category, String message)
  {
    _trace(category, message, null);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsp.core.internal.Logger
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsp.core.internal.contentmodel;

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

public class CMContentWrapperImpl
  extends CMNodeWrapperImpl
  implements CMContent
{
  private CMContent fCMContent = null;
  
  public CMContentWrapperImpl(String prefix, CMContent node)
  {
    super(prefix, node);
    fCMContent = node;
  }
  
  public int getMaxOccur()
  {
    return fCMContent.getMaxOccur();
  }
  
  public int getMinOccur()
  {
    return fCMContent.getMinOccur();
  }
  
  public CMNode getOriginNode()
  {
    return fCMContent;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsp.core.internal.contentmodel.CMContentWrapperImpl
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsp.core.internal.contentmodel;

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

class CMDocumentWrapperImpl$CMNamedNodeMapImpl
  implements CMNamedNodeMap
{
  protected Hashtable table;
  final CMDocumentWrapperImpl this$0;
  
  public CMDocumentWrapperImpl$CMNamedNodeMapImpl(CMDocumentWrapperImpl paramCMDocumentWrapperImpl)
  {
    this$0 = paramCMDocumentWrapperImpl;table = new Hashtable();
  }
  
  Hashtable getHashtable()
  {
    return table;
  }
  
  public int getLength()
  {
    return table.size();
  }
  
  public CMNode getNamedItem(String name)
  {
    return (CMNode)table.get(name);
  }
  
  public CMNode item(int index)
  {
    Object result = null;
    int size = table.size();
    if (index < size)
    {
      Iterator values = iterator();
      for (int i = 0; i <= index; i++) {
        result = values.next();
      }
    }
    return (CMNode)result;
  }
  
  public Iterator iterator()
  {
    return table.values().iterator();
  }
  
  public void setNamedItem(String name, CMNode aNode)
  {
    if ((name != null) && (aNode != null)) {
      table.put(name, aNode);
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsp.core.internal.contentmodel.CMDocumentWrapperImpl.CMNamedNodeMapImpl
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsp.core.internal.contentmodel;

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

public class CMDocumentWrapperImpl$CMNamespaceImpl
  implements CMNamespace
{
  final CMDocumentWrapperImpl this$0;
  
  public CMDocumentWrapperImpl$CMNamespaceImpl(CMDocumentWrapperImpl paramCMDocumentWrapperImpl)
  {
    this$0 = paramCMDocumentWrapperImpl;
  }
  
  public String getNodeName()
  {
    return this$0.getURI();
  }
  
  public int getNodeType()
  {
    return 8;
  }
  
  public String getPrefix()
  {
    return this$0.getPrefix();
  }
  
  public Object getProperty(String property)
  {
    return null;
  }
  
  public String getURI()
  {
    return this$0.getURI();
  }
  
  public boolean supports(String feature)
  {
    return false;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsp.core.internal.contentmodel.CMDocumentWrapperImpl.CMNamespaceImpl
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsp.core.internal.contentmodel;

import java.util.Collection;
import java.util.Hashtable;
import java.util.Iterator;
import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
import org.eclipse.wst.xml.core.internal.contentmodel.CMNamespace;
import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
import org.eclipse.wst.xml.core.internal.provisional.contentmodel.CMNodeWrapper;

public class CMDocumentWrapperImpl
  implements CMDocument, CMNodeWrapper
{
  private CMDocument fDocument;
  
  class CMNamedNodeMapImpl
    implements CMNamedNodeMap
  {
    protected Hashtable table = new Hashtable();
    
    public CMNamedNodeMapImpl() {}
    
    Hashtable getHashtable()
    {
      return table;
    }
    
    public int getLength()
    {
      return table.size();
    }
    
    public CMNode getNamedItem(String name)
    {
      return (CMNode)table.get(name);
    }
    
    public CMNode item(int index)
    {
      Object result = null;
      int size = table.size();
      if (index < size)
      {
        Iterator values = iterator();
        for (int i = 0; i <= index; i++) {
          result = values.next();
        }
      }
      return (CMNode)result;
    }
    
    public Iterator iterator()
    {
      return table.values().iterator();
    }
    
    public void setNamedItem(String name, CMNode aNode)
    {
      if ((name != null) && (aNode != null)) {
        table.put(name, aNode);
      }
    }
  }
  
  public class CMNamespaceImpl
    implements CMNamespace
  {
    public CMNamespaceImpl() {}
    
    public String getNodeName()
    {
      return CMDocumentWrapperImpl.this.getURI();
    }
    
    public int getNodeType()
    {
      return 8;
    }
    
    public String getPrefix()
    {
      return CMDocumentWrapperImpl.this.getPrefix();
    }
    
    public Object getProperty(String property)
    {
      return null;
    }
    
    public String getURI()
    {
      return CMDocumentWrapperImpl.this.getURI();
    }
    
    public boolean supports(String feature)
    {
      return false;
    }
  }
  
  private CMNamedNodeMap fElements = null;
  private CMNamedNodeMap fEntities = null;
  private CMNamespace fNamespace = new CMNamespaceImpl();
  private String fPrefix;
  private String fURI;
  
  public CMDocumentWrapperImpl(String newURI, String newPrefix, CMDocument tld)
  {
    fURI = newURI;
    fPrefix = newPrefix;
    fDocument = tld;
  }
  
  public CMDocument getDocument()
  {
    return fDocument;
  }
  
  public CMNamedNodeMap getElements()
  {
    if (fElements == null)
    {
      int length = getDocument().getElements().getLength();
      CMNamedNodeMapImpl elements = new CMNamedNodeMapImpl();
      for (int i = 0; i < length; i++)
      {
        CMElementDeclaration ed = new CMElementDeclarationWrapperImpl(fPrefix, (CMElementDeclaration)getDocument().getElements().item(i));
        elements.setNamedItem(ed.getNodeName(), ed);
      }
      fElements = elements;
    }
    return fElements;
  }
  
  public CMNamedNodeMap getEntities()
  {
    if (fEntities == null) {
      fEntities = getDocument().getEntities();
    }
    return fEntities;
  }
  
  public CMNamespace getNamespace()
  {
    return fNamespace;
  }
  
  public String getNodeName()
  {
    return getDocument().getNodeName();
  }
  
  public int getNodeType()
  {
    return getDocument().getNodeType();
  }
  
  public CMNode getOriginNode()
  {
    return fDocument;
  }
  
  public String getPrefix()
  {
    return fPrefix;
  }
  
  public Object getProperty(String propertyName)
  {
    return getDocument().getProperty(propertyName);
  }
  
  public String getURI()
  {
    return fURI;
  }
  
  public boolean supports(String propertyName)
  {
    return getDocument().supports(propertyName);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsp.core.internal.contentmodel.CMDocumentWrapperImpl
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsp.core.internal.contentmodel;

import org.eclipse.wst.xml.core.internal.contentmodel.CMContent;
import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
import org.eclipse.wst.xml.core.internal.contentmodel.CMGroup;
import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;

public class CMElementDeclarationWrapperImpl
  extends CMNodeWrapperImpl
  implements CMElementDeclaration
{
  private CMContent fCMContent = null;
  protected CMElementDeclaration fElementDecl = null;
  
  public CMElementDeclarationWrapperImpl(String prefix, CMElementDeclaration node)
  {
    super(prefix, node);
    fElementDecl = node;
  }
  
  public CMNamedNodeMap getAttributes()
  {
    return fElementDecl.getAttributes();
  }
  
  public CMContent getContent()
  {
    if (fCMContent == null)
    {
      CMContent content = fElementDecl.getContent();
      if (content == null) {
        return null;
      }
      if ((content instanceof CMGroup)) {
        fCMContent = new CMGroupWrapperImpl(fPrefix, (CMGroup)content);
      } else {
        fCMContent = new CMContentWrapperImpl(fPrefix, content);
      }
    }
    return fCMContent;
  }
  
  public int getContentType()
  {
    return fElementDecl.getContentType();
  }
  
  public CMDataType getDataType()
  {
    return fElementDecl.getDataType();
  }
  
  public String getElementName()
  {
    return getNodeName();
  }
  
  public CMNamedNodeMap getLocalElements()
  {
    return fElementDecl.getLocalElements();
  }
  
  public int getMaxOccur()
  {
    return fElementDecl.getMaxOccur();
  }
  
  public int getMinOccur()
  {
    return fElementDecl.getMinOccur();
  }
  
  public CMNode getOriginNode()
  {
    return fElementDecl;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsp.core.internal.contentmodel.CMElementDeclarationWrapperImpl
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsp.core.internal.contentmodel;

import java.util.ArrayList;
import java.util.List;
import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
import org.eclipse.wst.xml.core.internal.contentmodel.CMNodeList;

class CMGroupWrapperImpl$CMNodeListImpl
  implements CMNodeList
{
  private List nodes;
  final CMGroupWrapperImpl this$0;
  
  public CMGroupWrapperImpl$CMNodeListImpl(CMGroupWrapperImpl paramCMGroupWrapperImpl)
  {
    this$0 = paramCMGroupWrapperImpl;nodes = null;
    nodes = new ArrayList();
  }
  
  public void appendItem(CMNode node)
  {
    nodes.add(node);
  }
  
  public int getLength()
  {
    return nodes.size();
  }
  
  public CMNode item(int index)
  {
    if ((index < 0) || (index >= nodes.size())) {
      return null;
    }
    return (CMNode)nodes.get(index);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsp.core.internal.contentmodel.CMGroupWrapperImpl.CMNodeListImpl
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsp.core.internal.contentmodel;

import java.util.ArrayList;
import java.util.List;
import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
import org.eclipse.wst.xml.core.internal.contentmodel.CMGroup;
import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
import org.eclipse.wst.xml.core.internal.contentmodel.CMNodeList;

public class CMGroupWrapperImpl
  extends CMContentWrapperImpl
  implements CMGroup
{
  class CMNodeListImpl
    implements CMNodeList
  {
    private List nodes = null;
    
    public CMNodeListImpl()
    {
      nodes = new ArrayList();
    }
    
    public void appendItem(CMNode node)
    {
      nodes.add(node);
    }
    
    public int getLength()
    {
      return nodes.size();
    }
    
    public CMNode item(int index)
    {
      if ((index < 0) || (index >= nodes.size())) {
        return null;
      }
      return (CMNode)nodes.get(index);
    }
  }
  
  private CMNodeList fChildNodes = null;
  private CMGroup fGroup = null;
  
  public CMGroupWrapperImpl(String prefix, CMGroup node)
  {
    super(prefix, node);
  }
  
  public CMNodeList getChildNodes()
  {
    if (fChildNodes == null)
    {
      CMNodeListImpl childNodes = new CMNodeListImpl();
      CMNodeList children = fGroup.getChildNodes();
      for (int i = 0; i < children.getLength(); i++)
      {
        CMNode child = children.item(i);
        if ((child instanceof CMGroup)) {
          childNodes.appendItem(new CMGroupWrapperImpl(fPrefix, (CMGroup)child));
        } else if ((child instanceof CMElementDeclaration)) {
          childNodes.appendItem(new CMElementDeclarationWrapperImpl(fPrefix, (CMElementDeclaration)child));
        } else {
          childNodes.appendItem(new CMNodeWrapperImpl(fPrefix, child));
        }
      }
      fChildNodes = childNodes;
    }
    return fChildNodes;
  }
  
  public int getOperator()
  {
    return fGroup.getOperator();
  }
  
  public CMNode getOriginNode()
  {
    return fGroup;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsp.core.internal.contentmodel.CMGroupWrapperImpl
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsp.core.internal.contentmodel;

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

public class CMNodeWrapperImpl
  implements CMNode, CMNodeWrapper
{
  private CMNode fNode = null;
  private String fNodeName = null;
  protected String fPrefix = null;
  
  public CMNodeWrapperImpl(String prefix, CMNode node)
  {
    fPrefix = prefix;
    fNode = node;
    
    fNodeName = (fPrefix + ":" + fNode.getNodeName());
  }
  
  public String getNodeName()
  {
    return fNodeName;
  }
  
  public int getNodeType()
  {
    return fNode.getNodeType();
  }
  
  public CMNode getOriginNode()
  {
    return fNode;
  }
  
  public Object getProperty(String propertyName)
  {
    return fNode.getProperty(propertyName);
  }
  
  public boolean supports(String propertyName)
  {
    return fNode.supports(propertyName);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsp.core.internal.contentmodel.CMNodeWrapperImpl
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsp.core.internal.contentmodel;

import org.eclipse.wst.html.core.internal.contentmodel.HTMLCMDocumentFactory;
import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;

public final class JSPCMDocumentFactory
{
  public static CMDocument getCMDocument()
  {
    return getCMDocument("JSP21");
  }
  
  public static CMDocument getCMDocument(String cmtype)
  {
    if (cmtype == null) {
      return getCMDocument();
    }
    return HTMLCMDocumentFactory.getCMDocument(cmtype);
  }
  
  public static CMDocument getCMDocument(float jspVersion)
  {
    if (jspVersion >= 2.1F) {
      return getCMDocument("JSP21");
    }
    if (jspVersion >= 2.0F) {
      return getCMDocument("JSP20");
    }
    if (jspVersion >= 1.2F) {
      return getCMDocument("JSP12");
    }
    if (jspVersion >= 1.0F) {
      return getCMDocument("JSP11");
    }
    return getCMDocument();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsp.core.internal.contentmodel.JSPCMDocumentFactory
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsp.core.internal.contentmodel;

import org.eclipse.wst.html.core.internal.contentmodel.HTMLCMDocumentFactory;
import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;

public final class TAGCMDocumentFactory
{
  public static CMDocument getCMDocument()
  {
    return getCMDocument("JSP21.TAG");
  }
  
  public static CMDocument getCMDocument(String cmtype)
  {
    if (cmtype == null) {
      return getCMDocument();
    }
    return HTMLCMDocumentFactory.getCMDocument(cmtype);
  }
  
  public static CMDocument getCMDocument(float jspVersion)
  {
    if (jspVersion >= 2.1F) {
      return getCMDocument("JSP21.TAG");
    }
    return getCMDocument("JSP20.TAG");
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsp.core.internal.contentmodel.TAGCMDocumentFactory
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsp.core.internal.contentmodel;

import java.io.PrintStream;
import java.util.Hashtable;
import org.eclipse.core.filebuffers.ITextFileBuffer;
import org.eclipse.core.filebuffers.LocationKind;
import org.eclipse.core.runtime.IPath;
import org.eclipse.jst.jsp.core.internal.contentmodel.tld.TLDCMDocumentManager;
import org.eclipse.jst.jsp.core.taglib.ITaglibIndexDelta;
import org.eclipse.jst.jsp.core.taglib.ITaglibIndexListener;
import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
import org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument;
import org.eclipse.wst.xml.core.internal.parser.XMLSourceParser;

class TaglibController$DocumentInfo
  implements ITaglibIndexListener
{
  IStructuredDocument document;
  ITextFileBuffer textFileBuffer;
  IPath location;
  LocationKind locationKind;
  TLDCMDocumentManager tldDocumentManager;
  final TaglibController this$0;
  
  TaglibController$DocumentInfo(TaglibController paramTaglibController)
  {
    this$0 = paramTaglibController;
  }
  
  public void indexChanged(ITaglibIndexDelta delta)
  {
    int type = delta.getKind();
    if ((type == 4) || (type == 2))
    {
      ITaglibIndexDelta[] deltas = delta.getAffectedChildren();
      boolean affected = false;
      for (int i = 0; i < deltas.length; i++)
      {
        Object key = TLDCMDocumentManager.getUniqueIdentifier(deltas[i].getTaglibRecord());
        if (tldDocumentManager.getDocuments().containsKey(key)) {
          affected = true;
        }
      }
      if (affected)
      {
        if (TaglibController._debugCache) {
          System.out.println("TLDCMDocumentManager cleared its private CMDocument cache");
        }
        tldDocumentManager.getDocuments().clear();
        tldDocumentManager.getSourceParser().resetHandlers();
        if ((document instanceof BasicStructuredDocument)) {
          ((BasicStructuredDocument)document).reparse(this);
        }
      }
    }
    tldDocumentManager.indexChanged(delta);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsp.core.internal.contentmodel.TaglibController.DocumentInfo
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsp.core.internal.contentmodel;

import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.eclipse.core.filebuffers.IFileBuffer;
import org.eclipse.core.filebuffers.IFileBufferListener;
import org.eclipse.core.filebuffers.ITextFileBuffer;
import org.eclipse.core.filebuffers.LocationKind;
import org.eclipse.core.runtime.IPath;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jst.jsp.core.internal.contentmodel.tld.TLDCMDocumentManager;
import org.eclipse.jst.jsp.core.taglib.TaglibIndex;
import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
import org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument;
import org.eclipse.wst.sse.core.internal.util.Assert;
import org.eclipse.wst.xml.core.internal.parser.XMLSourceParser;

class TaglibController$FileBufferListener
  implements IFileBufferListener
{
  final TaglibController this$0;
  
  TaglibController$FileBufferListener(TaglibController paramTaglibController)
  {
    this$0 = paramTaglibController;
  }
  
  public void bufferContentAboutToBeReplaced(IFileBuffer buffer) {}
  
  public void bufferContentReplaced(IFileBuffer buffer) {}
  
  public void bufferCreated(IFileBuffer buffer)
  {
    if ((buffer instanceof ITextFileBuffer))
    {
      IDocument document = ((ITextFileBuffer)buffer).getDocument();
      synchronized (_instancefJSPdocuments)
      {
        if (!_instancefJSPdocuments.contains(document)) {
          return;
        }
      }
      Assert.isTrue(document instanceof IStructuredDocument, getClass().getName() + " SetupParticipant was called for non-IStructuredDocument");
      
      TaglibController.DocumentInfo info = null;
      synchronized (_instancefDocumentMap)
      {
        info = (TaglibController.DocumentInfo)_instancefDocumentMap.get(document);
      }
      if (info != null)
      {
        textFileBuffer = ((ITextFileBuffer)buffer);
      }
      else
      {
        info = new TaglibController.DocumentInfo(this$0);
        document = ((IStructuredDocument)document);
        textFileBuffer = ((ITextFileBuffer)buffer);
        location = buffer.getLocation();
        locationKind = LocationKind.NORMALIZE;
        tldDocumentManager = new TLDCMDocumentManager();
        tldDocumentManager.setSourceParser((XMLSourceParser)document.getParser());
        synchronized (_instancefDocumentMap)
        {
          _instancefDocumentMap.put(document, info);
        }
        if (((document instanceof BasicStructuredDocument)) && (document.getLength() > 0)) {
          ((BasicStructuredDocument)document).reparse(this);
        }
        TaglibIndex.addTaglibIndexListener(info);
      }
    }
  }
  
  public void bufferDisposed(IFileBuffer buffer)
  {
    if ((buffer instanceof ITextFileBuffer))
    {
      IDocument document = ((ITextFileBuffer)buffer).getDocument();
      synchronized (_instancefJSPdocuments)
      {
        if (!_instancefJSPdocuments.remove(document)) {
          return;
        }
      }
    }
    TaglibController.DocumentInfo info = null;
    synchronized (this$0.fDocumentMap)
    {
      Map.Entry[] entries = (Map.Entry[])this$0.fDocumentMap.entrySet().toArray(new Map.Entry[this$0.fDocumentMap.size()]);
      for (int i = 0; i < entries.length; i++)
      {
        info = (TaglibController.DocumentInfo)entries[i].getValue();
        if ((info != null) && (textFileBuffer != null) && (textFileBuffer.equals(buffer)))
        {
          this$0.fDocumentMap.remove(entries[i].getKey());
          break;
        }
      }
    }
    if (info != null)
    {
      tldDocumentManager.clearCache();
      TaglibIndex.removeTaglibIndexListener(info);
    }
  }
  
  public void dirtyStateChanged(IFileBuffer buffer, boolean isDirty) {}
  
  public void stateChangeFailed(IFileBuffer buffer) {}
  
  public void stateChanging(IFileBuffer buffer) {}
  
  public void stateValidationChanged(IFileBuffer buffer, boolean isStateValidated) {}
  
  public void underlyingFileDeleted(IFileBuffer buffer) {}
  
  public void underlyingFileMoved(IFileBuffer buffer, IPath path) {}
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsp.core.internal.contentmodel.TaglibController.FileBufferListener
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsp.core.internal.contentmodel;

import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.eclipse.core.filebuffers.FileBuffers;
import org.eclipse.core.filebuffers.IDocumentSetupParticipant;
import org.eclipse.core.filebuffers.IDocumentSetupParticipantExtension;
import org.eclipse.core.filebuffers.IFileBuffer;
import org.eclipse.core.filebuffers.IFileBufferListener;
import org.eclipse.core.filebuffers.ITextFileBuffer;
import org.eclipse.core.filebuffers.ITextFileBufferManager;
import org.eclipse.core.filebuffers.LocationKind;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Platform;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jst.jsp.core.internal.contentmodel.tld.TLDCMDocumentManager;
import org.eclipse.jst.jsp.core.taglib.ITaglibIndexDelta;
import org.eclipse.jst.jsp.core.taglib.ITaglibIndexListener;
import org.eclipse.jst.jsp.core.taglib.TaglibIndex;
import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
import org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument;
import org.eclipse.wst.sse.core.internal.util.Assert;
import org.eclipse.wst.xml.core.internal.parser.XMLSourceParser;

public class TaglibController
  implements IDocumentSetupParticipant, IDocumentSetupParticipantExtension
{
  class DocumentInfo
    implements ITaglibIndexListener
  {
    IStructuredDocument document;
    ITextFileBuffer textFileBuffer;
    IPath location;
    LocationKind locationKind;
    TLDCMDocumentManager tldDocumentManager;
    
    DocumentInfo() {}
    
    public void indexChanged(ITaglibIndexDelta delta)
    {
      int type = delta.getKind();
      if ((type == 4) || (type == 2))
      {
        ITaglibIndexDelta[] deltas = delta.getAffectedChildren();
        boolean affected = false;
        for (int i = 0; i < deltas.length; i++)
        {
          Object key = TLDCMDocumentManager.getUniqueIdentifier(deltas[i].getTaglibRecord());
        
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

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