org.eclipse.wst.sse.ui_1.3.2.v201201041522

16:49:27.119 INFO  jd.cli.Main - Decompiling org.eclipse.wst.sse.ui_1.3.2.v201201041522.jar
package org.eclipse.wst.sse.ui;

import java.lang.reflect.InvocationTargetException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.ISafeRunnable;
import org.eclipse.core.runtime.SafeRunner;
import org.eclipse.core.runtime.jobs.ISchedulingRule;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPartSite;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
import org.eclipse.wst.sse.ui.internal.Logger;
import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;

class EditorExecutionContext$ReusableUIRunner
  implements Runnable, IRunnableWithProgress
{
  private StructuredTextEditor editor;
  private ISafeRunnable fRunnable = null;
  
  EditorExecutionContext$ReusableUIRunner(StructuredTextEditor part)
  {
    editor = part;
  }
  
  public void run()
  {
    IWorkbenchPartSite site = editor.getEditorPart().getSite();
    IWorkbenchWindow workbenchWindow = site == null ? null : site.getWorkbenchWindow(); Class 
      tmp40_37 = EditorExecutionContext.class$0;
    if (tmp40_37 == null)
    {
      tmp40_37;
      try
      {
        tmpTernaryOp = (EditorExecutionContext.class$0 = Class.forName("org.eclipse.ui.progress.IWorkbenchSiteProgressService"));
      }
      catch (ClassNotFoundException localClassNotFoundException1)
      {
        throw new NoClassDefFoundError(localClassNotFoundException1.getMessage());
      }
    }
    IWorkbenchSiteProgressService jobService = (IWorkbenchSiteProgressService)(site == null ? null : site.getAdapter(tmp40_37));
    if ((workbenchWindow != null) && (jobService != null))
    {
      try
      {
        Class tmp104_101 = EditorExecutionContext.class$1;
        if (tmp104_101 == null)
        {
          tmp104_101;
          try
          {
            tmpTernaryOp = (EditorExecutionContext.class$1 = Class.forName("org.eclipse.core.resources.IResource"));
          }
          catch (ClassNotFoundException localClassNotFoundException2)
          {
            throw new NoClassDefFoundError(localClassNotFoundException2.getMessage());
          }
        }
        jobService.runInUI(workbenchWindow, this, (ISchedulingRule)editor.getEditorPart().getEditorInput().getAdapter(tmp104_101));
      }
      catch (InvocationTargetException e)
      {
        Logger.logException(e);
      }
      catch (InterruptedException e)
      {
        Logger.logException(e);
      }
    }
    else
    {
      IWorkbench workbench = SSEUIPlugin.getInstance().getWorkbench();
      Display display = workbench.getDisplay();
      if ((display != null) && (!display.isDisposed()))
      {
        editor.beginBackgroundOperation();
        try
        {
          SafeRunner.run(fRunnable);
        }
        finally
        {
          editor.endBackgroundOperation();
        }
      }
      fRunnable = null;
    }
  }
  
  public void run(IProgressMonitor monitor)
    throws InvocationTargetException, InterruptedException
  {
    if (fRunnable != null) {
      SafeRunner.run(fRunnable);
    }
  }
  
  void setRunnable(ISafeRunnable r)
  {
    fRunnable = r;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.wst.sse.ui.EditorExecutionContext.ReusableUIRunner
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.sse.ui;

import java.lang.reflect.InvocationTargetException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.ISafeRunnable;
import org.eclipse.core.runtime.SafeRunner;
import org.eclipse.core.runtime.jobs.ISchedulingRule;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPartSite;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
import org.eclipse.wst.sse.core.internal.IExecutionDelegate;
import org.eclipse.wst.sse.ui.internal.Logger;
import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;

class EditorExecutionContext
  implements IExecutionDelegate
{
  StructuredTextEditor fEditor;
  private ReusableUIRunner fReusableRunner;
  static Class class$0;
  static Class class$1;
  
  private static class ReusableUIRunner
    implements Runnable, IRunnableWithProgress
  {
    private StructuredTextEditor editor;
    private ISafeRunnable fRunnable = null;
    
    ReusableUIRunner(StructuredTextEditor part)
    {
      editor = part;
    }
    
    public void run()
    {
      IWorkbenchPartSite site = editor.getEditorPart().getSite();
      IWorkbenchWindow workbenchWindow = site == null ? null : site.getWorkbenchWindow(); Class 
        tmp40_37 = EditorExecutionContext.class$0;
      if (tmp40_37 == null)
      {
        tmp40_37;
        try
        {
          tmpTernaryOp = (EditorExecutionContext.class$0 = Class.forName("org.eclipse.ui.progress.IWorkbenchSiteProgressService"));
        }
        catch (ClassNotFoundException localClassNotFoundException1)
        {
          throw new NoClassDefFoundError(localClassNotFoundException1.getMessage());
        }
      }
      IWorkbenchSiteProgressService jobService = (IWorkbenchSiteProgressService)(site == null ? null : site.getAdapter(tmp40_37));
      if ((workbenchWindow != null) && (jobService != null))
      {
        try
        {
          Class tmp104_101 = EditorExecutionContext.class$1;
          if (tmp104_101 == null)
          {
            tmp104_101;
            try
            {
              tmpTernaryOp = (EditorExecutionContext.class$1 = Class.forName("org.eclipse.core.resources.IResource"));
            }
            catch (ClassNotFoundException localClassNotFoundException2)
            {
              throw new NoClassDefFoundError(localClassNotFoundException2.getMessage());
            }
          }
          jobService.runInUI(workbenchWindow, this, (ISchedulingRule)editor.getEditorPart().getEditorInput().getAdapter(tmp104_101));
        }
        catch (InvocationTargetException e)
        {
          Logger.logException(e);
        }
        catch (InterruptedException e)
        {
          Logger.logException(e);
        }
      }
      else
      {
        IWorkbench workbench = SSEUIPlugin.getInstance().getWorkbench();
        Display display = workbench.getDisplay();
        if ((display != null) && (!display.isDisposed()))
        {
          editor.beginBackgroundOperation();
          try
          {
            SafeRunner.run(fRunnable);
          }
          finally
          {
            editor.endBackgroundOperation();
          }
        }
        fRunnable = null;
      }
    }
    
    public void run(IProgressMonitor monitor)
      throws InvocationTargetException, InterruptedException
    {
      if (fRunnable != null) {
        SafeRunner.run(fRunnable);
      }
    }
    
    void setRunnable(ISafeRunnable r)
    {
      fRunnable = r;
    }
  }
  
  public EditorExecutionContext(StructuredTextEditor editor)
  {
    fEditor = editor;
    fReusableRunner = new ReusableUIRunner(fEditor);
  }
  
  public void execute(ISafeRunnable runnable)
  {
    IWorkbench workbench = SSEUIPlugin.getInstance().getWorkbench();
    Display display = workbench.getDisplay();
    if (display.getThread() == Thread.currentThread())
    {
      SafeRunner.run(runnable);
    }
    else
    {
      fReusableRunner.setRunnable(runnable);
      display.syncExec(fReusableRunner);
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.wst.sse.ui.EditorExecutionContext
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.sse.ui;

import org.eclipse.ui.editors.text.DefaultEncodingSupport;
import org.eclipse.ui.editors.text.IEncodingSupport;
import org.eclipse.ui.texteditor.StatusTextEditor;
import org.eclipse.wst.sse.ui.internal.ExtendedConfigurationBuilder;

class EncodingSupport
  extends DefaultEncodingSupport
{
  private String[] fConfigurationPoints = null;
  private StatusTextEditor fStatusTextEditor;
  IEncodingSupport fSupportDelegate = null;
  
  EncodingSupport(String[] configurationPoints)
  {
    fConfigurationPoints = configurationPoints;
  }
  
  public void dispose()
  {
    super.dispose();
    if ((fSupportDelegate instanceof DefaultEncodingSupport)) {
      ((DefaultEncodingSupport)fSupportDelegate).dispose();
    }
    fSupportDelegate = null;
    fStatusTextEditor = null;
  }
  
  public String getDefaultEncoding()
  {
    IEncodingSupport delegate = getEncodingSupportDelegate();
    if (delegate != null) {
      return delegate.getDefaultEncoding();
    }
    return super.getDefaultEncoding();
  }
  
  public String getEncoding()
  {
    IEncodingSupport delegate = getEncodingSupportDelegate();
    if (delegate != null) {
      return delegate.getEncoding();
    }
    return super.getEncoding();
  }
  
  IEncodingSupport getEncodingSupportDelegate()
  {
    if (fSupportDelegate == null)
    {
      ExtendedConfigurationBuilder builder = ExtendedConfigurationBuilder.getInstance();
      for (int i = 0; (fSupportDelegate == null) && (i < fConfigurationPoints.length); i++) {
        fSupportDelegate = ((IEncodingSupport)builder.getConfiguration(IEncodingSupport.class.getName(), fConfigurationPoints[i]));
      }
    }
    return fSupportDelegate;
  }
  
  public void initialize(StatusTextEditor textEditor)
  {
    super.initialize(textEditor);
    fStatusTextEditor = textEditor;
    
    IEncodingSupport encodingSupportDelegate = getEncodingSupportDelegate();
    if ((encodingSupportDelegate instanceof DefaultEncodingSupport)) {
      ((DefaultEncodingSupport)encodingSupportDelegate).initialize(textEditor);
    }
  }
  
  void reinitialize(String[] configurationPoints)
  {
    if ((fSupportDelegate instanceof DefaultEncodingSupport)) {
      ((DefaultEncodingSupport)fSupportDelegate).dispose();
    }
    fSupportDelegate = null;
    
    fConfigurationPoints = configurationPoints;
    
    IEncodingSupport encodingSupportDelegate = getEncodingSupportDelegate();
    if ((encodingSupportDelegate instanceof DefaultEncodingSupport)) {
      ((DefaultEncodingSupport)encodingSupportDelegate).initialize(fStatusTextEditor);
    }
  }
  
  protected void setEncoding(String encoding, boolean overwrite)
  {
    super.setEncoding(encoding, overwrite);
    
    IEncodingSupport delegate = getEncodingSupportDelegate();
    if ((delegate != null) && (overwrite)) {
      delegate.setEncoding(encoding);
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.wst.sse.ui.EncodingSupport
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.sse.ui;

import org.eclipse.jface.text.source.projection.IProjectionListener;

class FoldingActionGroup$1
  implements IProjectionListener
{
  final FoldingActionGroup this$0;
  
  FoldingActionGroup$1(FoldingActionGroup paramFoldingActionGroup)
  {
    this$0 = paramFoldingActionGroup;
  }
  
  public void projectionEnabled()
  {
    this$0.update();
  }
  
  public void projectionDisabled()
  {
    this$0.update();
  }
}

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

import java.util.ResourceBundle;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.text.ITextOperationTarget;
import org.eclipse.ui.texteditor.ITextEditor;
import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;

class FoldingActionGroup$2
  extends FoldingActionGroup.PreferenceAction
{
  final FoldingActionGroup this$0;
  private final ITextEditor val$editor;
  
  FoldingActionGroup$2(FoldingActionGroup paramFoldingActionGroup, ResourceBundle $anonymous0, String $anonymous1, int $anonymous2, ITextEditor paramITextEditor)
  {
    super($anonymous0, $anonymous1, $anonymous2);this$0 = paramFoldingActionGroup;val$editor = paramITextEditor;
  }
  
  public void run()
  {
    IPreferenceStore store = SSEUIPlugin.getDefault().getPreferenceStore();
    boolean current = store.getBoolean("foldingEnabled");
    store.setValue("foldingEnabled", !current);
  }
  
  public void update()
  {
    Class tmp7_4 = FoldingActionGroup.class$0;
    if (tmp7_4 == null)
    {
      tmp7_4;
      try
      {
        tmpTernaryOp = (FoldingActionGroup.class$0 = Class.forName("org.eclipse.jface.text.ITextOperationTarget"));
      }
      catch (ClassNotFoundException localClassNotFoundException)
      {
        throw new NoClassDefFoundError(localClassNotFoundException.getMessage());
      }
    }
    ITextOperationTarget target = (ITextOperationTarget)val$editor.getAdapter(tmp7_4);
    
    boolean isEnabled = (target != null) && (target.canDoOperation(19));
    setEnabled(isEnabled);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.wst.sse.ui.FoldingActionGroup.2
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.sse.ui;

import java.util.ResourceBundle;
import org.eclipse.ui.texteditor.IUpdate;
import org.eclipse.ui.texteditor.ResourceAction;

abstract class FoldingActionGroup$PreferenceAction
  extends ResourceAction
  implements IUpdate
{
  FoldingActionGroup$PreferenceAction(ResourceBundle bundle, String prefix, int style)
  {
    super(bundle, prefix, style);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.wst.sse.ui.FoldingActionGroup.PreferenceAction
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.sse.ui;

import java.util.ResourceBundle;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.text.ITextOperationTarget;
import org.eclipse.jface.text.ITextViewer;
import org.eclipse.jface.text.source.projection.IProjectionListener;
import org.eclipse.jface.text.source.projection.ProjectionViewer;
import org.eclipse.ui.actions.ActionGroup;
import org.eclipse.ui.texteditor.ITextEditor;
import org.eclipse.ui.texteditor.IUpdate;
import org.eclipse.ui.texteditor.ResourceAction;
import org.eclipse.ui.texteditor.TextOperationAction;
import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;

class FoldingActionGroup
  extends ActionGroup
{
  private ProjectionViewer fViewer;
  private final PreferenceAction fToggle;
  private final TextOperationAction fExpand;
  private final TextOperationAction fExpandAll;
  private final IProjectionListener fProjectionListener;
  private final TextOperationAction fCollapse;
  private final TextOperationAction fCollapseAll;
  static Class class$0;
  
  private static abstract class PreferenceAction
    extends ResourceAction
    implements IUpdate
  {
    PreferenceAction(ResourceBundle bundle, String prefix, int style)
    {
      super(prefix, style);
    }
  }
  
  public FoldingActionGroup(ITextEditor editor, ITextViewer viewer)
  {
    if (!(viewer instanceof ProjectionViewer))
    {
      fToggle = null;
      fExpand = null;
      fExpandAll = null;
      fCollapse = null;
      fCollapseAll = null;
      fProjectionListener = null;
      return;
    }
    fViewer = ((ProjectionViewer)viewer);
    
    fProjectionListener = new IProjectionListener()
    {
      public void projectionEnabled()
      {
        update();
      }
      
      public void projectionDisabled()
      {
        update();
      }
    };
    fViewer.addProjectionListener(fProjectionListener);
    
    fToggle = new PreferenceAction(SSEUIMessages.getResourceBundle(), "Projection_Toggle_", 2)
    {
      private final ITextEditor val$editor;
      
      public void run()
      {
        IPreferenceStore store = SSEUIPlugin.getDefault().getPreferenceStore();
        boolean current = store.getBoolean("foldingEnabled");
        store.setValue("foldingEnabled", !current);
      }
      
      public void update()
      {
        Class tmp7_4 = FoldingActionGroup.class$0;
        if (tmp7_4 == null)
        {
          tmp7_4;
          try
          {
            tmpTernaryOp = (FoldingActionGroup.class$0 = Class.forName("org.eclipse.jface.text.ITextOperationTarget"));
          }
          catch (ClassNotFoundException localClassNotFoundException)
          {
            throw new NoClassDefFoundError(localClassNotFoundException.getMessage());
          }
        }
        ITextOperationTarget target = (ITextOperationTarget)val$editor.getAdapter(tmp7_4);
        
        boolean isEnabled = (target != null) && (target.canDoOperation(19));
        setEnabled(isEnabled);
      }
    };
    IPreferenceStore store = SSEUIPlugin.getDefault().getPreferenceStore();
    boolean checked = store.getBoolean("foldingEnabled");
    fToggle.setChecked(checked);
    fToggle.setActionDefinitionId("org.eclipse.ui.edit.text.folding.toggle");
    editor.setAction("FoldingToggle", fToggle);
    
    fExpand = new TextOperationAction(SSEUIMessages.getResourceBundle(), "Projection_Expand_", editor, 17, true);
    fExpand.setActionDefinitionId("org.eclipse.ui.edit.text.folding.expand");
    editor.setAction("FoldingExpand", fExpand);
    
    fExpandAll = new TextOperationAction(SSEUIMessages.getResourceBundle(), "Projection_ExpandAll_", editor, 20, true);
    fExpandAll.setActionDefinitionId("org.eclipse.ui.edit.text.folding.expand_all");
    editor.setAction("FoldingExpandAll", fExpandAll);
    
    fCollapse = new TextOperationAction(SSEUIMessages.getResourceBundle(), "Projection_Collapse_", editor, 18, true);
    fCollapse.setActionDefinitionId("org.eclipse.ui.edit.text.folding.collapse");
    editor.setAction("FoldingCollapse", fCollapse);
    
    fCollapseAll = new TextOperationAction(SSEUIMessages.getResourceBundle(), "Projection_CollapseAll_", editor, 21, true);
    fCollapseAll.setActionDefinitionId("org.eclipse.ui.edit.text.folding.collapse_all");
    editor.setAction("FoldingCollapseAll", fCollapseAll);
  }
  
  protected boolean isEnabled()
  {
    return fViewer != null;
  }
  
  public void dispose()
  {
    if (isEnabled())
    {
      fViewer.removeProjectionListener(fProjectionListener);
      fViewer = null;
    }
    super.dispose();
  }
  
  protected void update()
  {
    if (isEnabled())
    {
      fToggle.update();
      fToggle.setChecked(fViewer.isProjectionMode());
      fExpand.update();
      fExpandAll.update();
      fCollapse.update();
      fCollapseAll.update();
    }
  }
  
  public void fillMenu(IMenuManager manager)
  {
    if (isEnabled())
    {
      update();
      manager.add(fToggle);
      manager.add(fExpand);
      manager.add(fExpandAll);
      manager.add(fCollapse);
      manager.add(fCollapseAll);
    }
  }
  
  public void updateActionBars()
  {
    update();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.wst.sse.ui.FoldingActionGroup
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.sse.ui;

import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.TreeViewer;

public abstract interface IContentSelectionProvider
{
  public abstract ISelection getSelection(TreeViewer paramTreeViewer, ISelection paramISelection);
}

/* Location:
 * Qualified Name:     org.eclipse.wst.sse.ui.IContentSelectionProvider
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.sse.ui;

import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.text.Position;
import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;

public abstract interface ISemanticHighlighting
{
  public abstract String getBoldPreferenceKey();
  
  public abstract String getUnderlinePreferenceKey();
  
  public abstract String getStrikethroughPreferenceKey();
  
  public abstract String getItalicPreferenceKey();
  
  public abstract String getColorPreferenceKey();
  
  public abstract IPreferenceStore getPreferenceStore();
  
  public abstract String getEnabledPreferenceKey();
  
  public abstract String getDisplayName();
  
  public abstract Position[] consumes(IStructuredDocumentRegion paramIStructuredDocumentRegion);
}

/* Location:
 * Qualified Name:     org.eclipse.wst.sse.ui.ISemanticHighlighting
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.sse.ui;

import org.eclipse.jface.text.Position;
import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;

public abstract interface ISemanticHighlightingExtension
{
  public abstract Position[] consumes(IStructuredDocumentRegion paramIStructuredDocumentRegion, IndexedRegion paramIndexedRegion);
}

/* Location:
 * Qualified Name:     org.eclipse.wst.sse.ui.ISemanticHighlightingExtension
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.sse.ui;

public abstract interface ISemanticHighlightingExtension2
{
  public abstract String getBackgroundColorPreferenceKey();
}

/* Location:
 * Qualified Name:     org.eclipse.wst.sse.ui.ISemanticHighlightingExtension2
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.sse.ui;

import org.eclipse.jface.text.source.AnnotationPainter;
import org.eclipse.jface.text.source.AnnotationPainter.SquigglesStrategy;
import org.eclipse.jface.text.source.IAnnotationAccess;
import org.eclipse.jface.text.source.IOverviewRuler;
import org.eclipse.jface.text.source.ISharedTextColors;
import org.eclipse.jface.text.source.ISourceViewer;
import org.eclipse.ui.texteditor.SourceViewerDecorationSupport;

class StructuredSourceViewerDecorationSupport
  extends SourceViewerDecorationSupport
{
  public StructuredSourceViewerDecorationSupport(ISourceViewer sourceViewer, IOverviewRuler overviewRuler, IAnnotationAccess annotationAccess, ISharedTextColors sharedTextColors)
  {
    super(sourceViewer, overviewRuler, annotationAccess, sharedTextColors);
  }
  
  protected AnnotationPainter createAnnotationPainter()
  {
    AnnotationPainter painter = super.createAnnotationPainter();
    
    painter.addTextStyleStrategy("SQUIGGLES", null);
    
    painter.addDrawingStrategy("SQUIGGLES", new AnnotationPainter.SquigglesStrategy());
    
    painter.addTextStyleStrategy("PROBLEM_UNDERLINE", null);
    
    painter.addDrawingStrategy("PROBLEM_UNDERLINE", new AnnotationPainter.SquigglesStrategy());
    return painter;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.wst.sse.ui.StructuredSourceViewerDecorationSupport
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.sse.ui;

class StructuredTextEditor$1
  implements Runnable
{
  final StructuredTextEditor.InternalModelStateListener this$1;
  
  StructuredTextEditor$1(StructuredTextEditor.InternalModelStateListener paramInternalModelStateListener)
  {
    this$1 = paramInternalModelStateListener;
  }
  
  public void run()
  {
    StructuredTextEditor.access$3(StructuredTextEditor.InternalModelStateListener.access$1(this$1));
    StructuredTextEditor.access$4(StructuredTextEditor.InternalModelStateListener.access$1(this$1), false);
  }
}

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

import org.eclipse.jface.text.DefaultInformationControl;
import org.eclipse.jface.text.IInformationControl;
import org.eclipse.jface.text.IInformationControlCreator;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.wst.sse.ui.internal.derived.HTMLTextPresenter;

class StructuredTextEditor$10
  implements IInformationControlCreator
{
  final StructuredTextEditor this$0;
  
  StructuredTextEditor$10(StructuredTextEditor paramStructuredTextEditor)
  {
    this$0 = paramStructuredTextEditor;
  }
  
  public IInformationControl createInformationControl(Shell shell)
  {
    boolean cutDown = false;
    int style = cutDown ? 0 : 768;
    return new DefaultInformationControl(shell, 20, style, new HTMLTextPresenter(cutDown));
  }
}

/* Location:
 * Qualified Name:     org.eclipse.wst.sse.ui.StructuredTextEditor.10
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.sse.ui;

import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.SelectionChangedEvent;

class StructuredTextEditor$11
  implements ISelectionChangedListener
{
  final StructuredTextEditor this$0;
  
  StructuredTextEditor$11(StructuredTextEditor paramStructuredTextEditor)
  {
    this$0 = paramStructuredTextEditor;
  }
  
  public void selectionChanged(SelectionChangedEvent event)
  {
    this$0.updateStatusLine(event.getSelection());
  }
}

/* Location:
 * Qualified Name:     org.eclipse.wst.sse.ui.StructuredTextEditor.11
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.sse.ui;

import org.eclipse.jface.text.DefaultInformationControl;
import org.eclipse.jface.text.IInformationControl;
import org.eclipse.jface.text.IInformationControlCreator;
import org.eclipse.swt.widgets.Shell;

class StructuredTextEditor$12
  implements IInformationControlCreator
{
  final StructuredTextEditor this$0;
  
  StructuredTextEditor$12(StructuredTextEditor paramStructuredTextEditor)
  {
    this$0 = paramStructuredTextEditor;
  }
  
  public IInformationControl createInformationControl(Shell parent)
  {
    return new DefaultInformationControl(parent);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.wst.sse.ui.StructuredTextEditor.12
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.sse.ui;

import org.eclipse.core.runtime.ISafeRunnable;
import org.eclipse.wst.sse.ui.typing.AbstractCharacterPairInserter;

class StructuredTextEditor$13
  implements ISafeRunnable
{
  final StructuredTextEditor this$0;
  private final StructuredTextEditor.CharacterPairing val$pairing;
  
  StructuredTextEditor$13(StructuredTextEditor paramStructuredTextEditor, StructuredTextEditor.CharacterPairing paramCharacterPairing)
  {
    this$0 = paramStructuredTextEditor;val$pairing = paramCharacterPairing;
  }
  
  public void run()
    throws Exception
  {
    val$pairing.inserter.initialize();
  }
  
  public void handleException(Throwable exception) {}
}

/* Location:
 * Qualified Name:     org.eclipse.wst.sse.ui.StructuredTextEditor.13
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.sse.ui;

import org.eclipse.jface.text.IInformationControl;
import org.eclipse.jface.text.IInformationControlCreator;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.wst.sse.ui.internal.quickoutline.QuickOutlinePopupDialog;
import org.eclipse.wst.sse.ui.quickoutline.AbstractQuickOutlineConfiguration;

class StructuredTextEditor$14
  implements IInformationControlCreator
{
  final StructuredTextEditor this$0;
  private final AbstractQuickOutlineConfiguration val$config;
  
  StructuredTextEditor$14(StructuredTextEditor paramStructuredTextEditor, AbstractQuickOutlineConfiguration paramAbstractQuickOutlineConfiguration)
  {
    this$0 = paramStructuredTextEditor;val$config = paramAbstractQuickOutlineConfiguration;
  }
  
  public IInformationControl createInformationControl(Shell parent)
  {
    int shellStyle = 16;
    return new QuickOutlinePopupDialog(parent, shellStyle, this$0.getInternalModel(), val$config);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.wst.sse.ui.StructuredTextEditor.14
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.sse.ui;

import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.SelectionChangedEvent;

class StructuredTextEditor$2
  implements ISelectionChangedListener
{
  final StructuredTextEditor.StructuredSelectionProvider this$1;
  
  StructuredTextEditor$2(StructuredTextEditor.StructuredSelectionProvider paramStructuredSelectionProvider)
  {
    this$1 = paramStructuredSelectionProvider;
  }
  
  public void selectionChanged(SelectionChangedEvent event)
  {
    this$1.handleSelectionChanged(event);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.wst.sse.ui.StructuredTextEditor.2
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.sse.ui;

import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.SelectionChangedEvent;

class StructuredTextEditor$3
  implements ISelectionChangedListener
{
  final StructuredTextEditor.StructuredSelectionProvider this$1;
  
  StructuredTextEditor$3(StructuredTextEditor.StructuredSelectionProvider paramStructuredSelectionProvider)
  {
    this$1 = paramStructuredSelectionProvider;
  }
  
  public void selectionChanged(SelectionChangedEvent event)
  {
    this$1.handlePostSelectionChanged(event);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.wst.sse.ui.StructuredTextEditor.3
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.sse.ui;

import org.eclipse.jface.util.SafeRunnable;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.SelectionChangedEvent;

class StructuredTextEditor$4
  extends SafeRunnable
{
  final StructuredTextEditor.StructuredSelectionProvider this$1;
  private final ISelectionChangedListener val$l;
  private final SelectionChangedEvent val$event;
  
  StructuredTextEditor$4(StructuredTextEditor.StructuredSelectionProvider paramStructuredSelectionProvider, ISelectionChangedListener paramISelectionChangedListener, SelectionChangedEvent paramSelectionChangedEvent)
  {
    this$1 = paramStructuredSelectionProvider;val$l = paramISelectionChangedListener;val$event = paramSelectionChangedEvent;
  }
  
  public void run()
  {
    val$l.selectionChanged(val$event);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.wst.sse.ui.StructuredTextEditor.4
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.sse.ui;

import org.eclipse.swt.widgets.Display;

class StructuredTextEditor$5
  implements Runnable
{
  final StructuredTextEditor.TimeOutExpired this$1;
  private final byte[] val$result;
  
  StructuredTextEditor$5(StructuredTextEditor.TimeOutExpired paramTimeOutExpired, byte[] paramArrayOfByte)
  {
    this$1 = paramTimeOutExpired;val$result = paramArrayOfByte;
  }
  
  public void run()
  {
    if ((StructuredTextEditor.TimeOutExpired.access$0(this$1).getDisplay() != null) && (!StructuredTextEditor.TimeOutExpired.access$0(this$1).getDisplay().isDisposed())) {
      StructuredTextEditor.access$6(StructuredTextEditor.TimeOutExpired.access$0(this$1), val$result);
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.wst.sse.ui.StructuredTextEditor.5
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.sse.ui;

import org.eclipse.jface.text.contentassist.ContentAssistEvent;
import org.eclipse.jface.text.contentassist.ICompletionListener;
import org.eclipse.jface.text.contentassist.ICompletionProposal;

class StructuredTextEditor$6
  implements ICompletionListener
{
  final StructuredTextEditor.CharacterPairListener this$1;
  
  StructuredTextEditor$6(StructuredTextEditor.CharacterPairListener paramCharacterPairListener)
  {
    this$1 = paramCharacterPairListener;
  }
  
  public void assistSessionStarted(ContentAssistEvent event)
  {
    StructuredTextEditor.CharacterPairListener.access$1(this$1, true);
  }
  
  public void assistSessionEnded(ContentAssistEvent event)
  {
    StructuredTextEditor.CharacterPairListener.access$1(this$1, false);
  }
  
  public void selectionChanged(ICompletionProposal proposal, boolean smartToggle) {}
}

/* Location:
 * Qualified Name:     org.eclipse.wst.sse.ui.StructuredTextEditor.6
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.sse.ui;

import org.eclipse.core.runtime.ISafeRunnable;
import org.eclipse.wst.sse.ui.typing.AbstractCharacterPairInserter;

class StructuredTextEditor$7
  implements ISafeRunnable
{
  final StructuredTextEditor.CharacterPairListener this$1;
  private final AbstractCharacterPairInserter val$inserter;
  
  StructuredTextEditor$7(StructuredTextEditor.CharacterPairListener paramCharacterPairListener, AbstractCharacterPairInserter paramAbstractCharacterPairInserter)
  {
    this$1 = paramCharacterPairListener;val$inserter = paramAbstractCharacterPairInserter;
  }
  
  public void handleException(Throwable exception) {}
  
  public void run()
    throws Exception
  {
    val$inserter.dispose();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.wst.sse.ui.StructuredTextEditor.7
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.sse.ui;

import org.eclipse.core.runtime.ISafeRunnable;
import org.eclipse.swt.events.VerifyEvent;
import org.eclipse.wst.sse.ui.typing.AbstractCharacterPairInserter;

class StructuredTextEditor$8
  implements ISafeRunnable
{
  final StructuredTextEditor.CharacterPairListener this$1;
  private final StructuredTextEditor.CharacterPairing val$pairing;
  private final VerifyEvent val$event;
  private final boolean[] val$paired;
  
  StructuredTextEditor$8(StructuredTextEditor.CharacterPairListener paramCharacterPairListener, StructuredTextEditor.CharacterPairing paramCharacterPairing, VerifyEvent paramVerifyEvent, boolean[] paramArrayOfBoolean)
  {
    this$1 = paramCharacterPairListener;val$pairing = paramCharacterPairing;val$event = paramVerifyEvent;val$paired = paramArrayOfBoolean;
  }
  
  public void run()
    throws Exception
  {
    AbstractCharacterPairInserter inserter = val$pairing.inserter;
    if ((inserter.hasPair(val$event.character)) && 
      (StructuredTextEditor.CharacterPairListener.access$2(this$1, val$event, inserter, val$pairing.partitions))) {
      val$paired[0] = true;
    }
  }
  
  public void handleException(Throwable exception) {}
}

/* Location:
 * Qualified Name:     org.eclipse.wst.sse.ui.StructuredTextEditor.8
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.sse.ui;

import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchPartSite;

class StructuredTextEditor$9
  implements Runnable
{
  final StructuredTextEditor this$0;
  private final boolean val$save;
  
  StructuredTextEditor$9(StructuredTextEditor paramStructuredTextEditor, boolean paramBoolean)
  {
    this$0 = paramStructuredTextEditor;val$save = paramBoolean;
  }
  
  public void run()
  {
    this$0.getSite().getPage().closeEditor(this$0.getEditorPart(), val$save);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.wst.sse.ui.StructuredTextEditor.9
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.sse.ui;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Set;
import org.eclipse.core.runtime.SafeRunner;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.ITextSelection;
import org.eclipse.jface.text.ITypedRegion;
import org.eclipse.jface.text.contentassist.ICompletionListener;
import org.eclipse.jface.text.source.ContentAssistantFacade;
import org.eclipse.jface.text.source.ISourceViewer;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.swt.custom.VerifyKeyListener;
import org.eclipse.swt.events.VerifyEvent;
import org.eclipse.swt.graphics.Point;
import org.eclipse.wst.sse.ui.internal.StructuredTextViewer;
import org.eclipse.wst.sse.ui.typing.AbstractCharacterPairInserter;

class StructuredTextEditor$CharacterPairListener
  implements VerifyKeyListener
{
  private StructuredTextEditor.CharacterPairing[] fInserters;
  private ICompletionListener fCompletionListener;
  private boolean fIsCompleting;
  final StructuredTextEditor this$0;
  
  StructuredTextEditor$CharacterPairListener(StructuredTextEditor paramStructuredTextEditor, CharacterPairListener paramCharacterPairListener)
  {
    this(paramStructuredTextEditor);
  }
  
  private StructuredTextEditor$CharacterPairListener(StructuredTextEditor paramStructuredTextEditor)
  {
    this$0 = paramStructuredTextEditor;
    fInserters = new StructuredTextEditor.CharacterPairing[0];
    
    fIsCompleting = false;
  }
  
  public void installCompletionListener()
  {
    ISourceViewer viewer = StructuredTextEditor.access$1(this$0);
    if ((viewer instanceof StructuredTextViewer))
    {
      fCompletionListener = new StructuredTextEditor.6(this);
      
      ContentAssistantFacade facade = ((StructuredTextViewer)viewer).getContentAssistFacade();
      if (facade != null) {
        facade.addCompletionListener(fCompletionListener);
      }
    }
  }
  
  void addInserter(StructuredTextEditor.CharacterPairing pairing)
  {
    List pairings = new ArrayList(Arrays.asList(fInserters));
    pairings.add(pairing);
    fInserters = ((StructuredTextEditor.CharacterPairing[])pairings.toArray(new StructuredTextEditor.CharacterPairing[pairings.size()]));
  }
  
  void prioritize()
  {
    Arrays.sort(fInserters);
  }
  
  void dispose()
  {
    ISourceViewer viewer = StructuredTextEditor.access$1(this$0);
    if ((viewer instanceof StructuredTextViewer))
    {
      ContentAssistantFacade facade = ((StructuredTextViewer)viewer).getContentAssistFacade();
      if (facade != null) {
        facade.removeCompletionListener(fCompletionListener);
      }
    }
    for (int i = 0; i < fInserters.length; i++)
    {
      AbstractCharacterPairInserter inserter = fInserters[i].inserter;
      SafeRunner.run(new StructuredTextEditor.7(this, inserter));
    }
  }
  
  public void verifyKey(VerifyEvent event)
  {
    if ((!doit) || (this$0.getInsertMode() != StructuredTextEditor.SMART_INSERT) || (fIsCompleting) || ((this$0.isBlockSelectionModeEnabled()) && (isMultilineSelection()))) {
      return;
    }
    boolean[] paired = new boolean[1];
    for (int i = 0; i < fInserters.length; i++)
    {
      StructuredTextEditor.CharacterPairing pairing = fInserters[i];
      
      SafeRunner.run(new StructuredTextEditor.8(this, pairing, event, paired));
      if (paired[0] != 0) {
        return;
      }
    }
  }
  
  private boolean pair(VerifyEvent event, AbstractCharacterPairInserter inserter, Set partitions)
  {
    ISourceViewer viewer = StructuredTextEditor.access$1(this$0);
    IDocument document = StructuredTextEditor.access$1(this$0).getDocument();
    if (document != null) {
      try
      {
        Point selection = viewer.getSelectedRange();
        int offset = x;
        ITypedRegion partition = document.getPartition(offset);
        if (partitions.contains(partition.getType()))
        {
          if (!this$0.validateEditorInputState()) {
            return false;
          }
          doit = (!inserter.pair(viewer, character));
          return true;
        }
      }
      catch (BadLocationException localBadLocationException) {}
    }
    return false;
  }
  
  private boolean isMultilineSelection()
  {
    ISelection selection = this$0.getSelectionProvider().getSelection();
    if ((selection instanceof ITextSelection))
    {
      ITextSelection ts = (ITextSelection)selection;
      return ts.getStartLine() != ts.getEndLine();
    }
    return false;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.wst.sse.ui.StructuredTextEditor.CharacterPairListener
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.sse.ui;

import java.util.Set;
import org.eclipse.wst.sse.ui.typing.AbstractCharacterPairInserter;

class Structured
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50

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