org.eclipse.jst.jsp.ui_1.1.602.v201112071516

16:45:58.853 INFO  jd.cli.Main - Decompiling org.eclipse.jst.jsp.ui_1.1.602.v201112071516.jar
package org.eclipse.jst.jsp.css.ui.internal.properties;

import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jst.jsp.ui.internal.JSPUIMessages;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
import org.eclipse.wst.css.ui.internal.properties.CSSPropertySource;

public class JSPedCSSPropertySource
  extends CSSPropertySource
{
  public JSPedCSSPropertySource(ICSSNode target)
  {
    super(target);
  }
  
  public void setPropertyValue(Object name, Object value)
  {
    String v = value.toString();
    if ((v.indexOf("${") != -1) || (v.indexOf("<%=") != -1))
    {
      IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
      String title = JSPUIMessages.Title_InvalidValue;
      String message = JSPUIMessages.Message_InvalidValue;
      MessageDialog.openWarning(window.getShell(), title, message);
      return;
    }
    super.setPropertyValue(name, value);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsp.css.ui.internal.properties.JSPedCSSPropertySource
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsp.css.ui.internal.registry;

import org.eclipse.jst.jsp.css.core.internal.modelhandler.ModelHandlerForJSPedCSS;
import org.eclipse.wst.css.ui.internal.registry.AdapterFactoryProviderCSS;
import org.eclipse.wst.sse.core.internal.ltk.modelhandler.IDocumentTypeHandler;

public class AdapterFactoryProviderJSPedCSS
  extends AdapterFactoryProviderCSS
{
  public boolean isFor(IDocumentTypeHandler contentTypeDescription)
  {
    return contentTypeDescription instanceof ModelHandlerForJSPedCSS;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsp.css.ui.internal.registry.AdapterFactoryProviderJSPedCSS
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsp.css.ui.internal.views.properties;

import org.eclipse.wst.sse.core.internal.provisional.INodeAdapter;
import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;

class JSPedCSSPropertySheetConfiguration$CSSPropertySheetRefreshAdapter
  implements INodeAdapter
{
  final JSPedCSSPropertySheetConfiguration this$0;
  
  private JSPedCSSPropertySheetConfiguration$CSSPropertySheetRefreshAdapter(JSPedCSSPropertySheetConfiguration paramJSPedCSSPropertySheetConfiguration)
  {
    this$0 = paramJSPedCSSPropertySheetConfiguration;
  }
  
  JSPedCSSPropertySheetConfiguration$CSSPropertySheetRefreshAdapter(JSPedCSSPropertySheetConfiguration paramJSPedCSSPropertySheetConfiguration, CSSPropertySheetRefreshAdapter paramCSSPropertySheetRefreshAdapter)
  {
    this(paramJSPedCSSPropertySheetConfiguration);
  }
  
  public boolean isAdapterForType(Object type)
  {
    return false;
  }
  
  public void notifyChanged(INodeNotifier notifier, int eventType, Object changedFeature, Object oldValue, Object newValue, int pos)
  {
    if (this$0.fPropertySheetPage != null) {
      this$0.getPropertiesRefreshJob().addPropertySheetPage(this$0.fPropertySheetPage);
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsp.css.ui.internal.views.properties.JSPedCSSPropertySheetConfiguration.CSSPropertySheetRefreshAdapter
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsp.css.ui.internal.views.properties;

import org.eclipse.jst.jsp.css.ui.internal.properties.JSPedCSSPropertySource;
import org.eclipse.ui.views.properties.IPropertySource;
import org.eclipse.ui.views.properties.IPropertySourceProvider;
import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;

class JSPedCSSPropertySheetConfiguration$CSSPropertySourceProvider
  implements IPropertySourceProvider
{
  private IPropertySource fPropertySource;
  private ICSSNode fSource;
  final JSPedCSSPropertySheetConfiguration this$0;
  
  JSPedCSSPropertySheetConfiguration$CSSPropertySourceProvider(JSPedCSSPropertySheetConfiguration paramJSPedCSSPropertySheetConfiguration, CSSPropertySourceProvider paramCSSPropertySourceProvider)
  {
    this(paramJSPedCSSPropertySheetConfiguration);
  }
  
  private JSPedCSSPropertySheetConfiguration$CSSPropertySourceProvider(JSPedCSSPropertySheetConfiguration paramJSPedCSSPropertySheetConfiguration)
  {
    this$0 = paramJSPedCSSPropertySheetConfiguration;
    fPropertySource = null;
    fSource = null;
  }
  
  public IPropertySource getPropertySource(Object object)
  {
    if ((fSource != null) && (object.equals(fSource))) {
      return fPropertySource;
    }
    if ((object instanceof ICSSNode))
    {
      fSource = ((ICSSNode)object);
      fPropertySource = new JSPedCSSPropertySource(fSource);
    }
    else
    {
      fSource = null;
      fPropertySource = null;
    }
    return fPropertySource;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsp.css.ui.internal.views.properties.JSPedCSSPropertySheetConfiguration.CSSPropertySourceProvider
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsp.css.ui.internal.views.properties;

import java.util.HashSet;
import java.util.Set;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.swt.widgets.Control;
import org.eclipse.ui.progress.UIJob;
import org.eclipse.ui.views.properties.IPropertySheetPage;
import org.eclipse.ui.views.properties.PropertySheetPage;
import org.eclipse.wst.xml.ui.internal.XMLUIMessages;

class JSPedCSSPropertySheetConfiguration$PropertiesRefreshJob
  extends UIJob
{
  public static final int UPDATE_DELAY = 200;
  private Set propertySheetPages;
  final JSPedCSSPropertySheetConfiguration this$0;
  
  public JSPedCSSPropertySheetConfiguration$PropertiesRefreshJob(JSPedCSSPropertySheetConfiguration paramJSPedCSSPropertySheetConfiguration)
  {
    super(XMLUIMessages.JFaceNodeAdapter_1);this$0 = paramJSPedCSSPropertySheetConfiguration;propertySheetPages = null;
    setSystem(true);
    setPriority(20);
    propertySheetPages = new HashSet(1);
  }
  
  void addPropertySheetPage(IPropertySheetPage page)
  {
    propertySheetPages.add(page);
    schedule(200L);
  }
  
  public IStatus runInUIThread(IProgressMonitor monitor)
  {
    Object[] pages = propertySheetPages.toArray();
    propertySheetPages.clear();
    for (int i = 0; i < pages.length; i++)
    {
      PropertySheetPage page = (PropertySheetPage)pages[i];
      if ((page.getControl() != null) && (!page.getControl().isDisposed())) {
        page.refresh();
      }
    }
    return Status.OK_STATUS;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsp.css.ui.internal.views.properties.JSPedCSSPropertySheetConfiguration.PropertiesRefreshJob
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsp.css.ui.internal.views.properties;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jst.jsp.css.ui.internal.properties.JSPedCSSPropertySource;
import org.eclipse.swt.widgets.Control;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.progress.UIJob;
import org.eclipse.ui.views.properties.IPropertySheetPage;
import org.eclipse.ui.views.properties.IPropertySource;
import org.eclipse.ui.views.properties.IPropertySourceProvider;
import org.eclipse.ui.views.properties.PropertySheetPage;
import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
import org.eclipse.wst.sse.core.internal.provisional.INodeAdapter;
import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
import org.eclipse.wst.sse.ui.views.properties.PropertySheetConfiguration;
import org.eclipse.wst.xml.ui.internal.XMLUIMessages;

public class JSPedCSSPropertySheetConfiguration
  extends PropertySheetConfiguration
{
  private class CSSPropertySheetRefreshAdapter
    implements INodeAdapter
  {
    CSSPropertySheetRefreshAdapter(CSSPropertySheetRefreshAdapter paramCSSPropertySheetRefreshAdapter)
    {
      this();
    }
    
    public boolean isAdapterForType(Object type)
    {
      return false;
    }
    
    public void notifyChanged(INodeNotifier notifier, int eventType, Object changedFeature, Object oldValue, Object newValue, int pos)
    {
      if (fPropertySheetPage != null) {
        getPropertiesRefreshJob().addPropertySheetPage(fPropertySheetPage);
      }
    }
    
    private CSSPropertySheetRefreshAdapter() {}
  }
  
  private class CSSPropertySourceProvider
    implements IPropertySourceProvider
  {
    CSSPropertySourceProvider(CSSPropertySourceProvider paramCSSPropertySourceProvider)
    {
      this();
    }
    
    private IPropertySource fPropertySource = null;
    private ICSSNode fSource = null;
    
    public IPropertySource getPropertySource(Object object)
    {
      if ((fSource != null) && (object.equals(fSource))) {
        return fPropertySource;
      }
      if ((object instanceof ICSSNode))
      {
        fSource = ((ICSSNode)object);
        fPropertySource = new JSPedCSSPropertySource(fSource);
      }
      else
      {
        fSource = null;
        fPropertySource = null;
      }
      return fPropertySource;
    }
    
    private CSSPropertySourceProvider() {}
  }
  
  private class PropertiesRefreshJob
    extends UIJob
  {
    public static final int UPDATE_DELAY = 200;
    private Set propertySheetPages = null;
    
    public PropertiesRefreshJob()
    {
      super();
      setSystem(true);
      setPriority(20);
      propertySheetPages = new HashSet(1);
    }
    
    void addPropertySheetPage(IPropertySheetPage page)
    {
      propertySheetPages.add(page);
      schedule(200L);
    }
    
    public IStatus runInUIThread(IProgressMonitor monitor)
    {
      Object[] pages = propertySheetPages.toArray();
      propertySheetPages.clear();
      for (int i = 0; i < pages.length; i++)
      {
        PropertySheetPage page = (PropertySheetPage)pages[i];
        if ((page.getControl() != null) && (!page.getControl().isDisposed())) {
          page.refresh();
        }
      }
      return Status.OK_STATUS;
    }
  }
  
  private PropertiesRefreshJob fPropertiesRefreshJob = null;
  IPropertySheetPage fPropertySheetPage;
  private IPropertySourceProvider fPropertySourceProvider = null;
  private INodeAdapter fRefreshAdapter = new CSSPropertySheetRefreshAdapter(null);
  private INodeNotifier[] fSelectedNotifiers;
  
  public ISelection getInputSelection(IWorkbenchPart selectingPart, ISelection selection)
  {
    if (fSelectedNotifiers != null)
    {
      for (int i = 0; i < fSelectedNotifiers.length; i++) {
        fSelectedNotifiers[i].removeAdapter(fRefreshAdapter);
      }
      fSelectedNotifiers = null;
    }
    ISelection preferredSelection = super.getInputSelection(selectingPart, selection);
    if ((preferredSelection instanceof IStructuredSelection))
    {
      Object[] selectedObjects = new Object[((IStructuredSelection)selection).size()];
      System.arraycopy(((IStructuredSelection)selection).toArray(), 0, selectedObjects, 0, selectedObjects.length);
      for (int i = 0; i < selectedObjects.length; i++) {
        if ((selectedObjects[i] instanceof ICSSNode))
        {
          ICSSNode node = (ICSSNode)selectedObjects[i];
          while ((node.getNodeType() == 11) || (node.getNodeType() == 9))
          {
            node = node.getParentNode();
            selectedObjects[i] = node;
          }
        }
      }
      if (selectedObjects.length > 0)
      {
        List selectedNotifiers = new ArrayList(1);
        for (int i = 0; i < selectedObjects.length; i++) {
          if ((selectedObjects[i] instanceof INodeNotifier))
          {
            selectedNotifiers.add(selectedObjects[i]);
            ((INodeNotifier)selectedObjects[i]).addAdapter(fRefreshAdapter);
          }
        }
        fSelectedNotifiers = ((INodeNotifier[])selectedNotifiers.toArray(new INodeNotifier[selectedNotifiers.size()]));
      }
      preferredSelection = new StructuredSelection(selectedObjects);
    }
    return preferredSelection;
  }
  
  PropertiesRefreshJob getPropertiesRefreshJob()
  {
    if (fPropertiesRefreshJob == null) {
      fPropertiesRefreshJob = new PropertiesRefreshJob();
    }
    return fPropertiesRefreshJob;
  }
  
  public IPropertySourceProvider getPropertySourceProvider(IPropertySheetPage page)
  {
    if (fPropertySourceProvider == null)
    {
      fPropertySourceProvider = new CSSPropertySourceProvider(null);
      fPropertySheetPage = page;
    }
    return fPropertySourceProvider;
  }
  
  public void unconfigure()
  {
    super.unconfigure();
    if (fSelectedNotifiers != null)
    {
      for (int i = 0; i < fSelectedNotifiers.length; i++) {
        fSelectedNotifiers[i].removeAdapter(fRefreshAdapter);
      }
      fSelectedNotifiers = null;
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsp.css.ui.internal.views.properties.JSPedCSSPropertySheetConfiguration
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsp.ui;

import org.eclipse.wst.xml.ui.internal.contentoutline.JFaceNodeLabelProvider;
import org.w3c.dom.Attr;
import org.w3c.dom.Node;

class StructuredTextViewerConfigurationJSP$1
  extends JFaceNodeLabelProvider
{
  final StructuredTextViewerConfigurationJSP this$0;
  
  StructuredTextViewerConfigurationJSP$1(StructuredTextViewerConfigurationJSP paramStructuredTextViewerConfigurationJSP)
  {
    this$0 = paramStructuredTextViewerConfigurationJSP;
  }
  
  public String getText(Object element)
  {
    if (element == null) {
      return null;
    }
    StringBuffer s = new StringBuffer();
    Node node = (Node)element;
    while (node != null)
    {
      if (node.getNodeType() != 9) {
        s.insert(0, super.getText(node));
      }
      if (node.getNodeType() == 2) {
        node = ((Attr)node).getOwnerElement();
      } else {
        node = node.getParentNode();
      }
      if ((node != null) && (node.getNodeType() != 9)) {
        s.insert(0, '/');
      }
    }
    return s.toString();
  }
}

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

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import org.eclipse.jdt.ui.JavaUI;
import org.eclipse.jdt.ui.PreferenceConstants;
import org.eclipse.jdt.ui.text.JavaSourceViewerConfiguration;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.text.IAutoEditStrategy;
import org.eclipse.jface.text.ITextDoubleClickStrategy;
import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
import org.eclipse.jface.text.formatter.IContentFormatter;
import org.eclipse.jface.text.formatter.MultiPassContentFormatter;
import org.eclipse.jface.text.source.ISourceViewer;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jst.jsp.core.internal.provisional.contenttype.ContentTypeIdForJSP;
import org.eclipse.jst.jsp.core.internal.text.StructuredTextPartitionerForJSP;
import org.eclipse.jst.jsp.ui.internal.autoedit.AutoEditStrategyForTabs;
import org.eclipse.jst.jsp.ui.internal.autoedit.StructuredAutoEditStrategyJSP;
import org.eclipse.jst.jsp.ui.internal.autoedit.StructuredAutoEditStrategyJSPJava;
import org.eclipse.jst.jsp.ui.internal.contentassist.JSPStructuredContentAssistProcessor;
import org.eclipse.jst.jsp.ui.internal.format.FormattingStrategyJSPJava;
import org.eclipse.jst.jsp.ui.internal.style.LineStyleProviderForJSP;
import org.eclipse.jst.jsp.ui.internal.style.java.LineStyleProviderForJava;
import org.eclipse.jst.jsp.ui.internal.style.jspel.LineStyleProviderForJSPEL;
import org.eclipse.wst.html.core.internal.format.HTMLFormatProcessorImpl;
import org.eclipse.wst.html.core.internal.provisional.contenttype.ContentTypeIdForHTML;
import org.eclipse.wst.html.ui.StructuredTextViewerConfigurationHTML;
import org.eclipse.wst.sse.ui.StructuredTextViewerConfiguration;
import org.eclipse.wst.sse.ui.internal.format.StructuredFormattingStrategy;
import org.eclipse.wst.sse.ui.internal.provisional.style.LineStyleProvider;
import org.eclipse.wst.xml.core.internal.provisional.contenttype.ContentTypeIdForXML;
import org.eclipse.wst.xml.ui.StructuredTextViewerConfigurationXML;
import org.eclipse.wst.xml.ui.internal.contentoutline.JFaceNodeLabelProvider;
import org.w3c.dom.Attr;
import org.w3c.dom.Node;

public class StructuredTextViewerConfigurationJSP
  extends StructuredTextViewerConfiguration
{
  private String[] fConfiguredContentTypes;
  private LineStyleProvider fLineStyleProviderForJava;
  private LineStyleProvider fLineStyleProviderForJSP;
  private LineStyleProvider fLineStyleProviderForJSPEL;
  private StructuredTextViewerConfiguration fHTMLSourceViewerConfiguration;
  private JavaSourceViewerConfiguration fJavaSourceViewerConfiguration;
  private StructuredTextViewerConfiguration fXMLSourceViewerConfiguration;
  private ILabelProvider fStatusLineLabelProvider;
  
  public IAutoEditStrategy[] getAutoEditStrategies(ISourceViewer sourceViewer, String contentType)
  {
    IAutoEditStrategy[] strategies = (IAutoEditStrategy[])null;
    if (contentType == "org.eclipse.wst.xml.XML_DEFAULT")
    {
      strategies = getXMLSourceViewerConfiguration().getAutoEditStrategies(sourceViewer, contentType);
    }
    else if (contentType == "org.eclipse.jst.jsp.SCRIPT.JAVA")
    {
      List allStrategies = new ArrayList(0);
      
      allStrategies.add(new StructuredAutoEditStrategyJSPJava());
      
      IAutoEditStrategy[] javaStrategies = getJavaSourceViewerConfiguration().getAutoEditStrategies(sourceViewer, "___java_partitioning");
      for (int i = 0; i < javaStrategies.length; i++) {
        allStrategies.add(javaStrategies[i]);
      }
      allStrategies.add(new AutoEditStrategyForTabs());
      
      strategies = (IAutoEditStrategy[])allStrategies.toArray(new IAutoEditStrategy[allStrategies.size()]);
    }
    else if ((contentType == "org.eclipse.wst.html.HTML_DEFAULT") || (contentType == "org.eclipse.wst.html.HTML_DECLARATION") || (contentType == "org.eclipse.jst.jsp.JSP_DIRECTIVE"))
    {
      List allStrategies = new ArrayList(0);
      
      allStrategies.add(new StructuredAutoEditStrategyJSP());
      
      IAutoEditStrategy[] htmlStrategies = getHTMLSourceViewerConfiguration().getAutoEditStrategies(sourceViewer, contentType);
      for (int i = 0; i < htmlStrategies.length; i++) {
        allStrategies.add(htmlStrategies[i]);
      }
      strategies = (IAutoEditStrategy[])allStrategies.toArray(new IAutoEditStrategy[allStrategies.size()]);
    }
    else
    {
      List allStrategies = new ArrayList(0);
      
      IAutoEditStrategy[] superStrategies = super.getAutoEditStrategies(sourceViewer, contentType);
      for (int i = 0; i < superStrategies.length; i++) {
        allStrategies.add(superStrategies[i]);
      }
      allStrategies.add(new AutoEditStrategyForTabs());
      
      strategies = (IAutoEditStrategy[])allStrategies.toArray(new IAutoEditStrategy[allStrategies.size()]);
    }
    return strategies;
  }
  
  public String[] getConfiguredContentTypes(ISourceViewer sourceViewer)
  {
    if (fConfiguredContentTypes == null)
    {
      String[] htmlTypes = getHTMLSourceViewerConfiguration().getConfiguredContentTypes(sourceViewer);
      String[] jspTypes = StructuredTextPartitionerForJSP.getConfiguredContentTypes();
      fConfiguredContentTypes = new String[htmlTypes.length + jspTypes.length];
      
      int index = 0;
      System.arraycopy(htmlTypes, 0, fConfiguredContentTypes, index, htmlTypes.length);
      System.arraycopy(jspTypes, 0, fConfiguredContentTypes, index += htmlTypes.length, jspTypes.length);
    }
    return fConfiguredContentTypes;
  }
  
  protected IContentAssistProcessor[] getContentAssistProcessors(ISourceViewer sourceViewer, String partitionType)
  {
    IContentAssistProcessor processor = new JSPStructuredContentAssistProcessor(
      getContentAssistant(), partitionType, sourceViewer);
    return new IContentAssistProcessor[] { processor };
  }
  
  public IContentFormatter getContentFormatter(ISourceViewer sourceViewer)
  {
    IContentFormatter formatter = super.getContentFormatter(sourceViewer);
    if (!(formatter instanceof MultiPassContentFormatter)) {
      formatter = new MultiPassContentFormatter(getConfiguredDocumentPartitioning(sourceViewer), "org.eclipse.wst.xml.XML_DEFAULT");
    }
    MultiPassContentFormatter multiFormatter = (MultiPassContentFormatter)formatter;
    multiFormatter.setMasterStrategy(new StructuredFormattingStrategy(new HTMLFormatProcessorImpl()));
    multiFormatter.setSlaveStrategy(new FormattingStrategyJSPJava(), "org.eclipse.jst.jsp.SCRIPT.JAVA");
    
    return formatter;
  }
  
  public ITextDoubleClickStrategy getDoubleClickStrategy(ISourceViewer sourceViewer, String contentType)
  {
    ITextDoubleClickStrategy strategy = null;
    if ((contentType == "org.eclipse.wst.html.HTML_DEFAULT") || (contentType == "org.eclipse.wst.html.SCRIPT")) {
      strategy = getHTMLSourceViewerConfiguration().getDoubleClickStrategy(sourceViewer, contentType);
    } else if ((contentType == "org.eclipse.jst.jsp.SCRIPT.JAVA") || (contentType == "org.eclipse.jst.jsp.SCRIPT.JAVASCRIPT")) {
      strategy = getJavaSourceViewerConfiguration().getDoubleClickStrategy(sourceViewer, contentType);
    } else if (contentType == "org.eclipse.jst.jsp.DEFAULT_JSP") {
      strategy = getHTMLSourceViewerConfiguration().getDoubleClickStrategy(sourceViewer, "org.eclipse.wst.html.HTML_DEFAULT");
    } else {
      strategy = super.getDoubleClickStrategy(sourceViewer, contentType);
    }
    return strategy;
  }
  
  private StructuredTextViewerConfiguration getHTMLSourceViewerConfiguration()
  {
    if (fHTMLSourceViewerConfiguration == null) {
      fHTMLSourceViewerConfiguration = new StructuredTextViewerConfigurationHTML();
    }
    return fHTMLSourceViewerConfiguration;
  }
  
  public String[] getIndentPrefixes(ISourceViewer sourceViewer, String contentType)
  {
    String[] indentations = (String[])null;
    if (contentType == "org.eclipse.wst.xml.XML_DEFAULT") {
      indentations = getXMLSourceViewerConfiguration().getIndentPrefixes(sourceViewer, contentType);
    } else {
      indentations = getHTMLSourceViewerConfiguration().getIndentPrefixes(sourceViewer, contentType);
    }
    return indentations;
  }
  
  private JavaSourceViewerConfiguration getJavaSourceViewerConfiguration()
  {
    if (fJavaSourceViewerConfiguration == null)
    {
      IPreferenceStore store = PreferenceConstants.getPreferenceStore();
      
      fJavaSourceViewerConfiguration = new JavaSourceViewerConfiguration(JavaUI.getColorManager(), store, null, "___java_partitioning");
    }
    return fJavaSourceViewerConfiguration;
  }
  
  public LineStyleProvider[] getLineStyleProviders(ISourceViewer sourceViewer, String partitionType)
  {
    LineStyleProvider[] providers = (LineStyleProvider[])null;
    if ((partitionType == "org.eclipse.wst.html.HTML_DEFAULT") || (partitionType == "org.eclipse.wst.html.HTML_COMMENT") || (partitionType == "org.eclipse.wst.html.HTML_DECLARATION")) {
      providers = getHTMLSourceViewerConfiguration().getLineStyleProviders(sourceViewer, "org.eclipse.wst.html.HTML_DEFAULT");
    } else if ((partitionType == "org.eclipse.wst.html.SCRIPT") || (partitionType == "org.eclipse.jst.jsp.SCRIPT.JAVASCRIPT")) {
      providers = getHTMLSourceViewerConfiguration().getLineStyleProviders(sourceViewer, "org.eclipse.wst.html.SCRIPT");
    } else if ((partitionType == "org.eclipse.wst.css.STYLE") || (partitionType == "org.eclipse.wst.css.COMMENT")) {
      providers = getHTMLSourceViewerConfiguration().getLineStyleProviders(sourceViewer, "org.eclipse.wst.css.STYLE");
    } else if ((partitionType == "org.eclipse.wst.xml.XML_DEFAULT") || (partitionType == "org.eclipse.wst.xml.XML_CDATA") || (partitionType == "org.eclipse.wst.xml.XML_COMMENT") || (partitionType == "org.eclipse.wst.xml.XML_DECL") || (partitionType == "org.eclipse.wst.xml.XML_PI")) {
      providers = getXMLSourceViewerConfiguration().getLineStyleProviders(sourceViewer, "org.eclipse.wst.xml.XML_DEFAULT");
    } else if (partitionType == "org.eclipse.jst.jsp.SCRIPT.JAVA") {
      providers = new LineStyleProvider[] { getLineStyleProviderForJava() };
    } else if (partitionType == "org.eclipse.jst.jsp.SCRIPT.JSP_EL") {
      providers = new LineStyleProvider[] { getLineStyleProviderForJSPEL() };
    } else if ((partitionType == "org.eclipse.jst.jsp.JSP_COMMENT") || (partitionType == "org.eclipse.jst.jsp.SCRIPT.DELIMITER") || (partitionType == "org.eclipse.jst.jsp.DEFAULT_JSP") || (partitionType == "org.eclipse.jst.jsp.JSP_DIRECTIVE")) {
      providers = new LineStyleProvider[] { getLineStyleProviderForJSP() };
    }
    return providers;
  }
  
  private LineStyleProvider getLineStyleProviderForJava()
  {
    if (fLineStyleProviderForJava == null) {
      fLineStyleProviderForJava = new LineStyleProviderForJava();
    }
    return fLineStyleProviderForJava;
  }
  
  private LineStyleProvider getLineStyleProviderForJSP()
  {
    if (fLineStyleProviderForJSP == null) {
      fLineStyleProviderForJSP = new LineStyleProviderForJSP();
    }
    return fLineStyleProviderForJSP;
  }
  
  private LineStyleProvider getLineStyleProviderForJSPEL()
  {
    if (fLineStyleProviderForJSPEL == null) {
      fLineStyleProviderForJSPEL = new LineStyleProviderForJSPEL();
    }
    return fLineStyleProviderForJSPEL;
  }
  
  public ILabelProvider getStatusLineLabelProvider(ISourceViewer sourceViewer)
  {
    if (fStatusLineLabelProvider == null) {
      fStatusLineLabelProvider = new JFaceNodeLabelProvider()
      {
        public String getText(Object element)
        {
          if (element == null) {
            return null;
          }
          StringBuffer s = new StringBuffer();
          Node node = (Node)element;
          while (node != null)
          {
            if (node.getNodeType() != 9) {
              s.insert(0, super.getText(node));
            }
            if (node.getNodeType() == 2) {
              node = ((Attr)node).getOwnerElement();
            } else {
              node = node.getParentNode();
            }
            if ((node != null) && (node.getNodeType() != 9)) {
              s.insert(0, '/');
            }
          }
          return s.toString();
        }
      };
    }
    return fStatusLineLabelProvider;
  }
  
  private StructuredTextViewerConfiguration getXMLSourceViewerConfiguration()
  {
    if (fXMLSourceViewerConfiguration == null) {
      fXMLSourceViewerConfiguration = new StructuredTextViewerConfigurationXML();
    }
    return fXMLSourceViewerConfiguration;
  }
  
  protected Map getHyperlinkDetectorTargets(ISourceViewer sourceViewer)
  {
    Map targets = super.getHyperlinkDetectorTargets(sourceViewer);
    targets.put(ContentTypeIdForJSP.ContentTypeID_JSP, null);
    
    targets.put(ContentTypeIdForHTML.ContentTypeID_HTML, null);
    targets.put(ContentTypeIdForXML.ContentTypeID_XML, null);
    return targets;
  }
}

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

public abstract interface IActionConstantsJSP
{
  public static final String ACTION_NAME_RENAME_ELEMENT = "RenameElement";
  public static final String ACTION_NAME_MOVE_ELEMENT = "MoveElement";
}

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

public abstract interface IActionDefinitionIdsJSP
{
  public static final String RENAME_ELEMENT = "org.eclipse.jdt.ui.edit.text.java.rename.element";
  public static final String MOVE_ELEMENT = "org.eclipse.jdt.ui.edit.text.java.move.element";
}

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

import java.util.MissingResourceException;
import java.util.ResourceBundle;
import org.eclipse.osgi.util.NLS;

public class JSPUIMessages
  extends NLS
{
  private static final String BUNDLE_NAME = "org.eclipse.jst.jsp.ui.internal.JSPUIPluginResources";
  private static ResourceBundle fResourceBundle;
  public static String Sample_JSP_doc;
  public static String JSP_Delimiters_UI_;
  public static String Refactor_label;
  public static String RenameElement_label;
  public static String MoveElement_label;
  public static String MoveElementWizard;
  public static String OK;
  public static String JSP_changes;
  public static String ActionContributorJSP_0;
  public static String JSPRenameElementAction_0;
  public static String JSPMoveElementAction_0;
  public static String BasicRefactorSearchRequestor_0;
  public static String BasicRefactorSearchRequestor_1;
  public static String BasicRefactorSearchRequestor_2;
  public static String BasicRefactorSearchRequestor_3;
  public static String BasicRefactorSearchRequestor_4;
  public static String BasicRefactorSearchRequestor_5;
  public static String BasicRefactorSearchRequestor_6;
  public static String BasicRefactorSearchRequestor_7;
  public static String BreakpointNotAllowed;
  public static String _UI_WIZARD_NEW_TITLE;
  public static String _UI_WIZARD_NEW_HEADING;
  public static String _UI_WIZARD_NEW_DESCRIPTION;
  public static String _UI_WIZARD_TAG_NEW_TITLE;
  public static String _UI_WIZARD_TAG_NEW_HEADING;
  public static String _UI_WIZARD_TAG_NEW_DESCRIPTION;
  public static String _ERROR_FILENAME_MUST_END_JSP;
  public static String _WARNING_FILE_MUST_BE_INSIDE_JAVA_PROJECT;
  public static String _WARNING_FOLDER_MUST_BE_INSIDE_WEB_CONTENT;
  public static String ResourceGroup_nameExists;
  public static String NewJSPTemplatesWizardPage_0;
  public static String NewJSPTemplatesWizardPage_1;
  public static String NewJSPTemplatesWizardPage_2;
  public static String NewJSPTemplatesWizardPage_3;
  public static String NewJSPTemplatesWizardPage_4;
  public static String NewJSPTemplatesWizardPage_5;
  public static String NewJSPTemplatesWizardPage_6;
  public static String NewJSPTemplatesWizardPage_7;
  public static String NewTagTemplatesWizardPage_0;
  public static String NewTagTemplatesWizardPage_1;
  public static String NewTagTemplatesWizardPage_2;
  public static String NewTagTemplatesWizardPage_3;
  public static String NewTagTemplatesWizardPage_4;
  public static String NewTagTemplatesWizardPage_5;
  public static String NewTagTemplatesWizardPage_6;
  public static String NewTagTemplatesWizardPage_7;
  public static String ToggleComment_label;
  public static String ToggleComment_tooltip;
  public static String ToggleComment_description;
  public static String AddBlockComment_label;
  public static String AddBlockComment_tooltip;
  public static String AddBlockComment_description;
  public static String RemoveBlockComment_label;
  public static String RemoveBlockComment_tooltip;
  public static String RemoveBlockComment_description;
  public static String CleanupDocument_label;
  public static String CleanupDocument_tooltip;
  public static String CleanupDocument_description;
  public static String FindOccurrences_label;
  public static String OccurrencesSearchQuery_0;
  public static String OccurrencesSearchQuery_2;
  public static String Override_method_in;
  public static String Creating_files_encoding;
  public static String Content_Assist_not_availab_UI_;
  public static String Java_Content_Assist_is_not_UI_;
  public static String JSPSourcePreferencePage_0;
  public static String JSPSourcePreferencePage_1;
  public static String JSPSourcePreferencePage_2;
  public static String JSPColorPage_jsp_content;
  public static String JSPFilesPreferencePage_0;
  public static String JSPFilesPreferencePage_1;
  public static String JSPFContentSettingsPropertyPage_0;
  public static String JSPFContentSettingsPropertyPage_1;
  public static String JSPFContentSettingsPropertyPage_2;
  public static String JSPFContentSettingsPropertyPage_3;
  public static String JSPFContentSettingsPropertyPage_4;
  public static String ProjectJSPFContentSettingsPropertyPage_0;
  public static String TagPropertyPage_desc;
  public static String Title_InvalidValue;
  public static String Message_InvalidValue;
  public static String SyntaxColoringPage_0;
  public static String SyntaxColoringPage_2;
  public static String SyntaxColoringPage_3;
  public static String SyntaxColoringPage_4;
  public static String SyntaxColoringPage_5;
  public static String SyntaxColoringPage_6;
  public static String _UI_STRUCTURED_TEXT_EDITOR_PREFS_LINK;
  public static String JSPTyping_Auto_Complete;
  public static String JSPTyping_Complete_Scriptlets;
  public static String JSPTyping_Complete_Braces;
  public static String JSPTyping_Complete_Comments;
  public static String JSPTyping_Java_Code;
  public static String JSPTyping_Close_Strings;
  public static String JSPTyping_Close_Brackets;
  public static String JSPValidationPreferencePage_0;
  public static String Validation_description;
  public static String Validation_Warning;
  public static String Validation_Error;
  public static String Validation_Ignore;
  public static String VALIDATION_HEADER_DIRECTIVE;
  public static String VALIDATION_DIRECTIVE_TAGLIB_DUPLICATE_PREFIXES_DIFFERENT_URIS;
  public static String VALIDATION_DIRECTIVE_TAGLIB_DUPLICATE_PREFIXES_SAME_URIS;
  public static String VALIDATION_DIRECTIVE_TAGLIB_MISSING_PREFIX;
  public static String VALIDATION_DIRECTIVE_TAGLIB_MISSING_URI_OR_TAGDIR;
  public static String VALIDATION_DIRECTIVE_TAGLIB_UNRESOLVABLE_URI_OR_TAGDIR;
  public static String VALIDATION_DIRECTIVE_PAGE_SUPERCLASS_NOT_FOUND;
  public static String VALIDATION_DIRECTIVE_INCLUDE_NO_FILE_SPECIFIED;
  public static String VALIDATION_DIRECTIVE_INCLUDE_FILE_NOT_FOUND;
  public static String VALIDATION_HEADER_JAVA;
  public static String VALIDATION_JAVA_NOTICE;
  public static String VALIDATION_JAVA_LOCAL_VARIABLE_NEVER_USED;
  public static String VALIDATION_JAVA_ARGUMENT_IS_NEVER_USED;
  public static String VALIDATION_JAVA_NULL_LOCAL_VARIABLE_REFERENCE;
  public static String VALIDATION_JAVA_POTENTIAL_NULL_LOCAL_VARIABLE_REFERENCE;
  public static String VALIDATION_JAVA_UNUSED_IMPORT;
  public static String VALIDATION_HEADER_EL;
  public static String VALIDATION_EL_SYNTAX;
  public static String VALIDATION_EL_LEXER;
  public static String VALIDATION_EL_FUNCTION_UNDEFINED;
  public static String VALIDATION_HEADER_CUSTOM_ACTIONS;
  public static String VALIDATION_ACTIONS_SEVERITY_MISSING_REQUIRED_ATTRIBUTE;
  public static String VALIDATION_ACTIONS_SEVERITY_UNKNOWN_ATTRIBUTE;
  public static String VALIDATION_ACTIONS_SEVERITY_UNEXPECTED_RTEXPRVALUE;
  public static String VALIDATION_ACTIONS_SEVERITY_NON_EMPTY_INLINE_TAG;
  public static String VALIDATION_TRANSLATION_TEI_VALIDATION_MESSAGE;
  public static String VALIDATION_TRANSLATION_TEI_CLASS_NOT_FOUND;
  public static String VALIDATION_TRANSLATION_TEI_CLASS_NOT_INSTANTIATED;
  public static String VALIDATION_TRANSLATION_TEI_CLASS_RUNTIME_EXCEPTION;
  public static String VALIDATION_TRANSLATION_TAG_HANDLER_CLASS_NOT_FOUND;
  public static String VALIDATION_HEADER_STANDARD_ACTIONS;
  public static String VALIDATION_TRANSLATION_USEBEAN_INVALID_ID;
  public static String VALIDATION_TRANSLATION_USBEAN_MISSING_TYPE_INFO;
  public static String VALIDATION_TRANSLATION_USEBEAN_AMBIGUOUS_TYPE_INFO;
  public static String Open;
  public static String TLDHyperlink_hyperlinkText;
  public static String CustomTagHyperlink_hyperlinkText;
  public static String TLDContentOutlineConfiguration_0;
  public static String JSPFilesPreferencePage_Search_group;
  public static String JSPFilesPreferencePage_Supply_JSP_search_to_Java_search;
  public static String JSPCodeAssist_Insertion;
  public static String JSPCodeAssist_Auto_Import;
  public static String Cycling_UI;
  
  static
  {
    NLS.initializeMessages("org.eclipse.jst.jsp.ui.internal.JSPUIPluginResources", JSPUIMessages.class);
  }
  
  public static ResourceBundle getResourceBundle()
  {
    try
    {
      if (fResourceBundle == null) {
        fResourceBundle = ResourceBundle.getBundle("org.eclipse.jst.jsp.ui.internal.JSPUIPluginResources");
      }
    }
    catch (MissingResourceException localMissingResourceException)
    {
      fResourceBundle = null;
    }
    return fResourceBundle;
  }
}

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

import java.io.IOException;
import org.eclipse.jface.text.templates.ContextTypeRegistry;
import org.eclipse.jface.text.templates.persistence.TemplateStore;
import org.eclipse.jst.jsp.ui.internal.preferences.JSPUIPreferenceNames;
import org.eclipse.jst.jsp.ui.internal.templates.TemplateContextTypeIdsJSP;
import org.eclipse.ui.editors.text.templates.ContributionContextTypeRegistry;
import org.eclipse.ui.editors.text.templates.ContributionTemplateStore;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.eclipse.wst.sse.ui.internal.provisional.registry.AdapterFactoryRegistry;
import org.eclipse.wst.sse.ui.internal.provisional.registry.AdapterFactoryRegistryImpl;

public class JSPUIPlugin
  extends AbstractUIPlugin
{
  public static final String ID = "org.eclipse.jst.jsp.ui";
  protected static JSPUIPlugin instance = null;
  private TemplateStore fTemplateStore;
  private ContextTypeRegistry fContextTypeRegistry;
  
  public JSPUIPlugin()
  {
    instance = this;
  }
  
  public static JSPUIPlugin getDefault()
  {
    return instance;
  }
  
  public static synchronized JSPUIPlugin getInstance()
  {
    return instance;
  }
  
  public AdapterFactoryRegistry getAdapterFactoryRegistry()
  {
    return AdapterFactoryRegistryImpl.getInstance();
  }
  
  public TemplateStore getTemplateStore()
  {
    if (fTemplateStore == null)
    {
      fTemplateStore = new ContributionTemplateStore(getTemplateContextRegistry(), getPreferenceStore(), JSPUIPreferenceNames.TEMPLATES_KEY);
      try
      {
        fTemplateStore.load();
      }
      catch (IOException e)
      {
        Logger.logException(e);
      }
    }
    return fTemplateStore;
  }
  
  public ContextTypeRegistry getTemplateContextRegistry()
  {
    if (fContextTypeRegistry == null)
    {
      ContributionContextTypeRegistry registry = new ContributionContextTypeRegistry();
      registry.addContextType(TemplateContextTypeIdsJSP.ALL);
      registry.addContextType(TemplateContextTypeIdsJSP.NEW);
      registry.addContextType(TemplateContextTypeIdsJSP.TAG);
      registry.addContextType(TemplateContextTypeIdsJSP.ATTRIBUTE);
      registry.addContextType(TemplateContextTypeIdsJSP.ATTRIBUTE_VALUE);
      registry.addContextType("tag_new");
      
      fContextTypeRegistry = registry;
    }
    return fContextTypeRegistry;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsp.ui.internal.JSPUIPlugin
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsp.ui.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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23

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