org.eclipse.jdt.debug.ui_3.6.1.v20111006_r372

16:45:06.531 INFO  jd.cli.Main - Decompiling org.eclipse.jdt.debug.ui_3.6.1.v20111006_r372.jar
package org.eclipse.jdt.debug.ui;

import org.eclipse.jdt.internal.debug.ui.JDIDebugUIPlugin;

public abstract interface IJavaDebugUIConstants
{
  public static final String PLUGIN_ID = ;
  public static final String EXTENSION_POINT_VM_INSTALL_TYPE_PAGE = "vmInstallTypePage";
  public static final String EXTENSION_POINT_VM_INSTALL_PAGES = "vmInstallPages";
  public static final String ID_DISPLAY_VIEW = PLUGIN_ID + ".DisplayView";
  public static final String ID_JAVA_SNIPPET_EDITOR = PLUGIN_ID + ".SnippetEditor";
  public static final String JAVA_SNIPPET_EDITOR_CONTEXT_MENU = "#JavaSnippetEditorContext";
  public static final String JAVA_SNIPPET_EDITOR_RULER_MENU = "#JavaSnippetRulerContext";
  public static final String EVALUATION_GROUP = "evaluationGroup";
  public static final int INTERNAL_ERROR = 150;
  public static final String PREF_SHOW_MONITOR_THREAD_INFO = PLUGIN_ID + ".show_monitor_thread_info";
  public static final String PREF_SHOW_SYSTEM_THREADS = PLUGIN_ID + ".show_system_threads";
  public static final String PREF_SHOW_THREAD_GROUPS = PLUGIN_ID + ".show_thread_group_info";
  public static final String PREF_ALLINSTANCES_MAX_COUNT = PLUGIN_ID + ".all_instances_max_count";
  public static final String PREF_ALLREFERENCES_MAX_COUNT = PLUGIN_ID + ".all_references_max_count";
}

/* Location:
 * Qualified Name:     org.eclipse.jdt.debug.ui.IJavaDebugUIConstants
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jdt.debug.ui;

import org.eclipse.debug.core.model.IDebugElement;
import org.eclipse.debug.core.model.IThread;
import org.eclipse.jdt.internal.debug.ui.JDIDebugUIPlugin;
import org.eclipse.jdt.internal.debug.ui.monitors.ThreadMonitorManager;
import org.eclipse.jface.preference.IPreferenceStore;

public class JavaDebugUtils
{
  public static IDebugElement[] getOwnedMonitors(IThread thread)
  {
    return ThreadMonitorManager.getDefault().getOwnedMonitors(thread);
  }
  
  public static IDebugElement getContendedMonitor(IThread thread)
  {
    return ThreadMonitorManager.getDefault().getContendedMonitor(thread);
  }
  
  public static IPreferenceStore getPreferenceStore()
  {
    return JDIDebugUIPlugin.getDefault().getPreferenceStore();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jdt.debug.ui.JavaDebugUtils
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jdt.debug.ui;

import org.eclipse.core.runtime.CoreException;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.jdt.internal.debug.ui.JDIDebugUIPlugin;
import org.eclipse.jdt.internal.debug.ui.launcher.LauncherMessages;
import org.eclipse.jdt.internal.debug.ui.launcher.SourceLookupBlock;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;

/**
 * @deprecated
 */
public class JavaSourceLookupDialog
  extends Dialog
{
  private SourceLookupBlock fSourceLookupBlock;
  private ILaunchConfiguration fConfiguration;
  private String fMessage;
  private boolean fNotAskAgain;
  private Button fAskAgainCheckBox;
  
  public JavaSourceLookupDialog(Shell shell, String message, ILaunchConfiguration configuration)
  {
    super(shell);
    fSourceLookupBlock = new SourceLookupBlock();
    fMessage = message;
    fNotAskAgain = false;
    fAskAgainCheckBox = null;
    fConfiguration = configuration;
  }
  
  public boolean isNotAskAgain()
  {
    return fNotAskAgain;
  }
  
  protected Control createDialogArea(Composite parent)
  {
    Font font = parent.getFont();
    initializeDialogUnits(parent);
    getShell().setText(LauncherMessages.JavaUISourceLocator_selectprojects_title);
    
    Composite composite = (Composite)super.createDialogArea(parent);
    composite.setLayout(new GridLayout());
    composite.setFont(font);
    
    int pixelWidth = convertWidthInCharsToPixels(70);
    Label message = new Label(composite, 16448);
    message.setText(fMessage);
    GridData data = new GridData();
    widthHint = pixelWidth;
    message.setLayoutData(data);
    message.setFont(font);
    
    fSourceLookupBlock.createControl(composite);
    Control inner = fSourceLookupBlock.getControl();
    fSourceLookupBlock.initializeFrom(fConfiguration);
    GridData gd = new GridData(1808);
    int height = getCurrentgetBoundsheight;
    heightHint = ((int)(0.4F * height));
    inner.setLayoutData(gd);
    fAskAgainCheckBox = new Button(composite, 96);
    data = new GridData();
    widthHint = pixelWidth;
    fAskAgainCheckBox.setLayoutData(data);
    fAskAgainCheckBox.setFont(font);
    fAskAgainCheckBox.setText(LauncherMessages.JavaUISourceLocator_askagain_message);
    
    return composite;
  }
  
  protected void okPressed()
  {
    try
    {
      if (fAskAgainCheckBox != null) {
        fNotAskAgain = fAskAgainCheckBox.getSelection();
      }
      ILaunchConfigurationWorkingCopy wc = fConfiguration.getWorkingCopy();
      fSourceLookupBlock.performApply(wc);
      if (!fConfiguration.contentsEqual(wc)) {
        fConfiguration = wc.doSave();
      }
    }
    catch (CoreException e)
    {
      JDIDebugUIPlugin.log(e);
    }
    super.okPressed();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jdt.debug.ui.JavaSourceLookupDialog
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jdt.debug.ui;

import com.ibm.icu.text.MessageFormat;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.jdt.debug.core.IJavaStackFrame;
import org.eclipse.jdt.internal.debug.ui.JDIDebugUIPlugin;
import org.eclipse.jdt.internal.debug.ui.launcher.LauncherMessages;

class JavaUISourceLocator$1
  implements Runnable
{
  final JavaUISourceLocator this$0;
  private final IJavaStackFrame val$frame;
  
  JavaUISourceLocator$1(JavaUISourceLocator paramJavaUISourceLocator, IJavaStackFrame paramIJavaStackFrame)
  {
    this$0 = paramJavaUISourceLocator;val$frame = paramIJavaStackFrame;
  }
  
  public void run()
  {
    try
    {
      String message = MessageFormat.format(LauncherMessages.JavaUISourceLocator_selectprojects_message, new String[] { val$frame.getDeclaringTypeName() });
      
      ILaunchConfiguration configuration = 
        val$frame.getLaunch().getLaunchConfiguration();
      JavaSourceLookupDialog dialog = 
        new JavaSourceLookupDialog(
        JDIDebugUIPlugin.getActiveWorkbenchShell(), 
        message, 
        configuration);
      int result = dialog.open();
      if (result == 0)
      {
        JavaUISourceLocator.access$0(this$0, !dialog.isNotAskAgain());
        this$0.initializeDefaults(
          configuration);
      }
    }
    catch (CoreException e)
    {
      if (e.getStatus().getCode() != 
        100) {
        JDIDebugUIPlugin.log(e);
      }
    }
  }
}

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

import com.ibm.icu.text.MessageFormat;
import java.util.HashMap;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.debug.core.DebugException;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.model.IPersistableSourceLocator;
import org.eclipse.debug.core.model.IStackFrame;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.debug.core.IJavaReferenceType;
import org.eclipse.jdt.debug.core.IJavaStackFrame;
import org.eclipse.jdt.internal.debug.ui.DebugUIMessages;
import org.eclipse.jdt.internal.debug.ui.JDIDebugUIPlugin;
import org.eclipse.jdt.internal.debug.ui.launcher.LauncherMessages;
import org.eclipse.jdt.internal.debug.ui.launcher.SourceElementLabelProvider;
import org.eclipse.jdt.internal.debug.ui.launcher.SourceElementQualifierProvider;
import org.eclipse.jdt.launching.JavaRuntime;
import org.eclipse.jdt.launching.sourcelookup.IJavaSourceLocation;
import org.eclipse.jdt.launching.sourcelookup.JavaSourceLocator;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.dialogs.TwoPaneElementSelector;

/**
 * @deprecated
 */
public class JavaUISourceLocator
  implements IPersistableSourceLocator
{
  public static final String ID_PROMPTING_JAVA_SOURCE_LOCATOR = IJavaDebugUIConstants.PLUGIN_ID + ".javaSourceLocator";
  public static final String ATTR_FIND_ALL_SOURCE_ELEMENTS = IJavaDebugUIConstants.PLUGIN_ID + ".ATTR_FIND_ALL_SOURCE_ELEMENTS";
  private IJavaProject fJavaProject;
  private JavaSourceLocator fSourceLocator;
  private boolean fAllowedToAsk;
  private boolean fIsFindAllSourceElements = false;
  private HashMap fTypesToSource = null;
  
  public JavaUISourceLocator()
  {
    fSourceLocator = new JavaSourceLocator();
    fAllowedToAsk = true;
  }
  
  public JavaUISourceLocator(IJavaProject[] projects, boolean includeRequired)
    throws CoreException
  {
    fSourceLocator = new JavaSourceLocator(projects, includeRequired);
    fAllowedToAsk = true;
  }
  
  public JavaUISourceLocator(IJavaProject project)
    throws CoreException
  {
    fJavaProject = project;
    IJavaSourceLocation[] sls = 
      JavaSourceLocator.getDefaultSourceLocations(project);
    fSourceLocator = new JavaSourceLocator(project);
    if (sls != null) {
      fSourceLocator.setSourceLocations(sls);
    }
    fAllowedToAsk = true;
  }
  
  public Object getSourceElement(IStackFrame stackFrame)
  {
    Object res = findSourceElement(stackFrame);
    if ((res == null) && (fAllowedToAsk))
    {
      IJavaStackFrame frame = 
        (IJavaStackFrame)stackFrame.getAdapter(IJavaStackFrame.class);
      if (frame != null) {
        try
        {
          if (!frame.isObsolete())
          {
            showDebugSourcePage(frame);
            res = fSourceLocator.getSourceElement(stackFrame);
          }
        }
        catch (DebugException localDebugException) {}
      }
    }
    return res;
  }
  
  private Object findSourceElement(IStackFrame stackFrame)
  {
    if (isFindAllSourceElements())
    {
      Object[] sourceElements = fSourceLocator.getSourceElements(stackFrame);
      if ((sourceElements == null) || (sourceElements.length == 0)) {
        return null;
      }
      if (sourceElements.length == 1) {
        return sourceElements[0];
      }
      try
      {
        IJavaStackFrame frame = (IJavaStackFrame)stackFrame;
        IJavaReferenceType type = frame.getReferenceType();
        Object cachedSource = getSourceElement(type);
        if (cachedSource != null) {
          return cachedSource;
        }
        TwoPaneElementSelector dialog = new TwoPaneElementSelector(JDIDebugUIPlugin.getActiveWorkbenchShell(), new SourceElementLabelProvider(), new SourceElementQualifierProvider());
        dialog.setTitle(DebugUIMessages.JavaUISourceLocator_Select_Source_1);
        dialog.setMessage(MessageFormat.format(DebugUIMessages.JavaUISourceLocator__Select_the_source_that_corresponds_to__0__2, new String[] { type.getName() }));
        dialog.setElements(sourceElements);
        dialog.setMultipleSelection(false);
        dialog.setUpperListLabel(DebugUIMessages.JavaUISourceLocator__Matching_files__3);
        dialog.setLowerListLabel(DebugUIMessages.JavaUISourceLocator__Location__4);
        dialog.open();
        Object[] result = dialog.getResult();
        if (result == null) {
          return null;
        }
        Object sourceElement = result[0];
        cacheSourceElement(sourceElement, type);
        return sourceElement;
      }
      catch (CoreException e)
      {
        JDIDebugUIPlugin.log(e);
        return sourceElements[0];
      }
    }
    return fSourceLocator.getSourceElement(stackFrame);
  }
  
  private Object getSourceElement(IJavaReferenceType type)
  {
    if (fTypesToSource == null) {
      return null;
    }
    return fTypesToSource.get(type);
  }
  
  private void cacheSourceElement(Object sourceElement, IJavaReferenceType type)
  {
    if (fTypesToSource == null) {
      fTypesToSource = new HashMap();
    }
    fTypesToSource.put(type, sourceElement);
  }
  
  private void showDebugSourcePage(IJavaStackFrame frame)
  {
    Runnable prompter = new Runnable()
    {
      private final IJavaStackFrame val$frame;
      
      public void run()
      {
        try
        {
          String message = MessageFormat.format(LauncherMessages.JavaUISourceLocator_selectprojects_message, new String[] { val$frame.getDeclaringTypeName() });
          
          ILaunchConfiguration configuration = 
            val$frame.getLaunch().getLaunchConfiguration();
          JavaSourceLookupDialog dialog = 
            new JavaSourceLookupDialog(
            JDIDebugUIPlugin.getActiveWorkbenchShell(), 
            message, 
            configuration);
          int result = dialog.open();
          if (result == 0)
          {
            fAllowedToAsk = (!dialog.isNotAskAgain());
            initializeDefaults(
              configuration);
          }
        }
        catch (CoreException e)
        {
          if (e.getStatus().getCode() != 
            100) {
            JDIDebugUIPlugin.log(e);
          }
        }
      }
    };
    JDIDebugUIPlugin.getStandardDisplay().syncExec(prompter);
  }
  
  public String getMemento()
    throws CoreException
  {
    String memento = fSourceLocator.getMemento();
    String handle = fJavaProject.getHandleIdentifier();
    String findAll = Boolean.valueOf(isFindAllSourceElements()).toString();
    
    StringBuffer buffer = new StringBuffer();
    buffer.append("<project>");
    buffer.append(handle);
    buffer.append("</project>");
    buffer.append("<findAll>");
    buffer.append(findAll);
    buffer.append("</findAll>");
    buffer.append(memento);
    return buffer.toString();
  }
  
  public void initializeDefaults(ILaunchConfiguration configuration)
    throws CoreException
  {
    fSourceLocator.initializeDefaults(configuration);
    fJavaProject = JavaRuntime.getJavaProject(configuration);
    fIsFindAllSourceElements = 
      configuration.getAttribute(ATTR_FIND_ALL_SOURCE_ELEMENTS, false);
  }
  
  public void initializeFromMemento(String memento)
    throws CoreException
  {
    if (memento.startsWith("<project>"))
    {
      int index = memento.indexOf("</project>");
      if (index > 0)
      {
        String handle = memento.substring(9, index);
        int start = index + 19;
        index = memento.indexOf("</findAll>", start);
        if (index > 0)
        {
          String findAll = memento.substring(start, index);
          Boolean all = Boolean.valueOf(findAll);
          String rest = memento.substring(index + 10);
          fJavaProject = ((IJavaProject)JavaCore.create(handle));
          fIsFindAllSourceElements = all.booleanValue();
          fSourceLocator.initializeFromMemento(rest);
        }
      }
    }
    else
    {
      int index = memento.indexOf('\n');
      String handle = memento.substring(0, index);
      String rest = memento.substring(index + 1);
      fJavaProject = ((IJavaProject)JavaCore.create(handle));
      fIsFindAllSourceElements = false;
      fSourceLocator.initializeFromMemento(rest);
    }
  }
  
  public IJavaSourceLocation[] getSourceLocations()
  {
    return fSourceLocator.getSourceLocations();
  }
  
  public void setSourceLocations(IJavaSourceLocation[] locations)
  {
    fSourceLocator.setSourceLocations(locations);
  }
  
  public boolean isFindAllSourceElements()
  {
    return fIsFindAllSourceElements;
  }
  
  public void setFindAllSourceElement(boolean findAll)
  {
    fIsFindAllSourceElements = findAll;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jdt.debug.ui.JavaUISourceLocator
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jdt.debug.ui.actions;

import org.eclipse.jdt.internal.debug.ui.actions.JavaBreakpointPropertiesRulerAction;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.text.source.IVerticalRulerInfo;
import org.eclipse.ui.texteditor.AbstractRulerActionDelegate;
import org.eclipse.ui.texteditor.ITextEditor;

public class JavaBreakpointPropertiesRulerActionDelegate
  extends AbstractRulerActionDelegate
{
  protected IAction createAction(ITextEditor editor, IVerticalRulerInfo rulerInfo)
  {
    return new JavaBreakpointPropertiesRulerAction(editor, rulerInfo);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jdt.debug.ui.actions.JavaBreakpointPropertiesRulerActionDelegate
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jdt.debug.ui.breakpoints;

import org.eclipse.jdt.internal.debug.ui.display.DisplayViewerConfiguration;
import org.eclipse.jface.text.contentassist.IContentAssistProcessor;

class JavaBreakpointConditionEditor$1
  extends DisplayViewerConfiguration
{
  final JavaBreakpointConditionEditor this$0;
  
  JavaBreakpointConditionEditor$1(JavaBreakpointConditionEditor paramJavaBreakpointConditionEditor)
  {
    this$0 = paramJavaBreakpointConditionEditor;
  }
  
  public IContentAssistProcessor getContentAssistantProcessor()
  {
    return JavaBreakpointConditionEditor.access$0(this$0);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jdt.debug.ui.breakpoints.JavaBreakpointConditionEditor.1
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jdt.debug.ui.breakpoints;

import org.eclipse.swt.events.FocusAdapter;
import org.eclipse.swt.events.FocusEvent;

class JavaBreakpointConditionEditor$10
  extends FocusAdapter
{
  final JavaBreakpointConditionEditor this$0;
  
  JavaBreakpointConditionEditor$10(JavaBreakpointConditionEditor paramJavaBreakpointConditionEditor)
  {
    this$0 = paramJavaBreakpointConditionEditor;
  }
  
  public void focusGained(FocusEvent e)
  {
    JavaBreakpointConditionEditor.access$8(this$0);
  }
  
  public void focusLost(FocusEvent e)
  {
    JavaBreakpointConditionEditor.access$9(this$0);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jdt.debug.ui.breakpoints.JavaBreakpointConditionEditor.10
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jdt.debug.ui.breakpoints;

import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;

class JavaBreakpointConditionEditor$11
  implements DisposeListener
{
  final JavaBreakpointConditionEditor this$0;
  
  JavaBreakpointConditionEditor$11(JavaBreakpointConditionEditor paramJavaBreakpointConditionEditor)
  {
    this$0 = paramJavaBreakpointConditionEditor;
  }
  
  public void widgetDisposed(DisposeEvent e)
  {
    this$0.dispose();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jdt.debug.ui.breakpoints.JavaBreakpointConditionEditor.11
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jdt.debug.ui.breakpoints;

import org.eclipse.jface.text.DocumentEvent;
import org.eclipse.jface.text.IDocumentListener;

class JavaBreakpointConditionEditor$2
  implements IDocumentListener
{
  final JavaBreakpointConditionEditor this$0;
  
  JavaBreakpointConditionEditor$2(JavaBreakpointConditionEditor paramJavaBreakpointConditionEditor)
  {
    this$0 = paramJavaBreakpointConditionEditor;
  }
  
  public void documentAboutToBeChanged(DocumentEvent event) {}
  
  public void documentChanged(DocumentEvent event)
  {
    JavaBreakpointConditionEditor.access$1(this$0, 4097);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jdt.debug.ui.breakpoints.JavaBreakpointConditionEditor.2
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jdt.debug.ui.breakpoints;

import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Button;

class JavaBreakpointConditionEditor$3
  extends SelectionAdapter
{
  final JavaBreakpointConditionEditor this$0;
  
  JavaBreakpointConditionEditor$3(JavaBreakpointConditionEditor paramJavaBreakpointConditionEditor)
  {
    this$0 = paramJavaBreakpointConditionEditor;
  }
  
  public void widgetSelected(SelectionEvent e)
  {
    boolean checked = JavaBreakpointConditionEditor.access$2(this$0).getSelection();
    JavaBreakpointConditionEditor.access$3(this$0, checked, true);
    JavaBreakpointConditionEditor.access$1(this$0, 4098);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jdt.debug.ui.breakpoints.JavaBreakpointConditionEditor.3
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jdt.debug.ui.breakpoints;

import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;

class JavaBreakpointConditionEditor$4
  extends SelectionAdapter
{
  final JavaBreakpointConditionEditor this$0;
  
  JavaBreakpointConditionEditor$4(JavaBreakpointConditionEditor paramJavaBreakpointConditionEditor)
  {
    this$0 = paramJavaBreakpointConditionEditor;
  }
  
  public void widgetSelected(SelectionEvent e)
  {
    JavaBreakpointConditionEditor.access$1(this$0, 4099);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jdt.debug.ui.breakpoints.JavaBreakpointConditionEditor.4
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jdt.debug.ui.breakpoints;

import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;

class JavaBreakpointConditionEditor$5
  extends SelectionAdapter
{
  final JavaBreakpointConditionEditor this$0;
  
  JavaBreakpointConditionEditor$5(JavaBreakpointConditionEditor paramJavaBreakpointConditionEditor)
  {
    this$0 = paramJavaBreakpointConditionEditor;
  }
  
  public void widgetSelected(SelectionEvent e)
  {
    JavaBreakpointConditionEditor.access$1(this$0, 4099);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jdt.debug.ui.breakpoints.JavaBreakpointConditionEditor.5
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jdt.debug.ui.breakpoints;

import org.eclipse.jdt.internal.debug.ui.JDISourceViewer;
import org.eclipse.jface.text.IDocument;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Combo;

class JavaBreakpointConditionEditor$6
  extends SelectionAdapter
{
  final JavaBreakpointConditionEditor this$0;
  
  JavaBreakpointConditionEditor$6(JavaBreakpointConditionEditor paramJavaBreakpointConditionEditor)
  {
    this$0 = paramJavaBreakpointConditionEditor;
  }
  
  public void widgetSelected(SelectionEvent e)
  {
    int historyIndex = JavaBreakpointConditionEditor.access$4(this$0).getSelectionIndex() - 1;
    if ((historyIndex >= 0) && (historyIndex != JavaBreakpointConditionEditor.access$5(this$0))) {
      JavaBreakpointConditionEditor.access$6(this$0).getDocument().set(JavaBreakpointConditionEditor.access$7(this$0)[historyIndex]);
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jdt.debug.ui.breakpoints.JavaBreakpointConditionEditor.6
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jdt.debug.ui.breakpoints;

import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.jdt.internal.debug.ui.JDISourceViewer;

class JavaBreakpointConditionEditor$7
  extends AbstractHandler
{
  final JavaBreakpointConditionEditor this$0;
  
  JavaBreakpointConditionEditor$7(JavaBreakpointConditionEditor paramJavaBreakpointConditionEditor)
  {
    this$0 = paramJavaBreakpointConditionEditor;
  }
  
  public Object execute(ExecutionEvent event)
    throws ExecutionException
  {
    JavaBreakpointConditionEditor.access$6(this$0).doOperation(13);
    return null;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jdt.debug.ui.breakpoints.JavaBreakpointConditionEditor.7
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jdt.debug.ui.breakpoints;

import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.jdt.internal.debug.ui.JDISourceViewer;

class JavaBreakpointConditionEditor$8
  extends AbstractHandler
{
  final JavaBreakpointConditionEditor this$0;
  
  JavaBreakpointConditionEditor$8(JavaBreakpointConditionEditor paramJavaBreakpointConditionEditor)
  {
    this$0 = paramJavaBreakpointConditionEditor;
  }
  
  public Object execute(ExecutionEvent event)
    throws ExecutionException
  {
    JavaBreakpointConditionEditor.access$6(this$0).doOperation(1);
    return null;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jdt.debug.ui.breakpoints.JavaBreakpointConditionEditor.8
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jdt.debug.ui.breakpoints;

import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.jdt.internal.debug.ui.JDISourceViewer;

class JavaBreakpointConditionEditor$9
  extends AbstractHandler
{
  final JavaBreakpointConditionEditor this$0;
  
  JavaBreakpointConditionEditor$9(JavaBreakpointConditionEditor paramJavaBreakpointConditionEditor)
  {
    this$0 = paramJavaBreakpointConditionEditor;
  }
  
  public Object execute(ExecutionEvent event)
    throws ExecutionException
  {
    JavaBreakpointConditionEditor.access$6(this$0).doOperation(2);
    return null;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jdt.debug.ui.breakpoints.JavaBreakpointConditionEditor.9
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jdt.debug.ui.breakpoints;

import java.util.HashMap;
import java.util.Map;
import java.util.Stack;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.commands.IHandler;
import org.eclipse.core.commands.operations.IUndoContext;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.debug.internal.ui.SWTFactory;
import org.eclipse.jdt.core.IClassFile;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.debug.core.IJavaLineBreakpoint;
import org.eclipse.jdt.internal.debug.ui.BreakpointUtils;
import org.eclipse.jdt.internal.debug.ui.JDIDebugUIPlugin;
import org.eclipse.jdt.internal.debug.ui.JDISourceViewer;
import org.eclipse.jdt.internal.debug.ui.breakpoints.AbstractJavaBreakpointEditor;
import org.eclipse.jdt.internal.debug.ui.contentassist.IJavaDebugContentAssistContext;
import org.eclipse.jdt.internal.debug.ui.contentassist.JavaDebugContentAssistProcessor;
import org.eclipse.jdt.internal.debug.ui.contentassist.TypeContext;
import org.eclipse.jdt.internal.debug.ui.display.DisplayViewerConfiguration;
import org.eclipse.jdt.internal.debug.ui.propertypages.PropertyPageMessages;
import org.eclipse.jdt.ui.text.JavaTextTools;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.DialogSettings;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.fieldassist.ControlDecoration;
import org.eclipse.jface.fieldassist.FieldDecoration;
import org.eclipse.jface.fieldassist.FieldDecorationRegistry;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.Document;
import org.eclipse.jface.text.DocumentEvent;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IDocumentListener;
import org.eclipse.jface.text.ITextViewerExtension6;
import org.eclipse.jface.text.IUndoManager;
import org.eclipse.jface.text.IUndoManagerExtension;
import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.events.FocusAdapter;
import org.eclipse.swt.events.FocusEvent;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.FontMetrics;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IPropertyListener;
import org.eclipse.ui.IViewSite;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchPartSite;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.handlers.IHandlerActivation;
import org.eclipse.ui.handlers.IHandlerService;
import org.eclipse.ui.help.IWorkbenchHelpSystem;
import org.eclipse.ui.operations.OperationHistoryActionHandler;
import org.eclipse.ui.operations.RedoActionHandler;
import org.eclipse.ui.operations.UndoActionHandler;
import org.eclipse.ui.texteditor.IAbstractTextEditorHelpContextIds;
import org.eclipse.ui.texteditor.ITextEditorActionConstants;

public final class JavaBreakpointConditionEditor
  extends AbstractJavaBreakpointEditor
{
  private Button fConditional;
  private Button fWhenTrue;
  private Button fWhenChange;
  private JDISourceViewer fViewer;
  private IContentAssistProcessor fCompletionProcessor;
  private IJavaLineBreakpoint fBreakpoint;
  private IHandlerService fHandlerService;
  private IHandler fContentAssistHandler;
  private IHandlerActivation fContentAssistActivation;
  private IHandler fUndoHandler;
  private IHandlerActivation fUndoActivation;
  private IHandler fRedoHandler;
  private IHandlerActivation fRedoActivation;
  private IDocumentListener fDocumentListener;
  private Combo fConditionHistory;
  private IDialogSettings fConditionHistoryDialogSettings;
  private boolean fReplaceConditionInHistory;
  private Map fLocalConditionHistory;
  private int fSeparatorIndex;
  private IViewSite fBreakpointsViewSite;
  private IAction fViewUndoAction;
  private IAction fViewRedoAction;
  private OperationHistoryActionHandler fViewerUndoAction;
  private OperationHistoryActionHandler fViewerRedoAction;
  public static final int PROP_CONDITION = 4097;
  public static final int PROP_CONDITION_ENABLED = 4098;
  public static final int PROP_CONDITION_SUSPEND_POLICY = 4099;
  private static final int MAX_HISTORY_SIZE = 10;
  private static final String DS_SECTION_CONDITION_HISTORY = "conditionHistory";
  private static final String DS_KEY_HISTORY_ENTRY_COUNT = "conditionHistoryEntryCount";
  private static final String DS_KEY_HISTORY_ENTRY_PREFIX = "conditionHistoryEntry_";
  private static final Pattern NEWLINE_PATTERN = Pattern.compile("\r\n|\r|\n");
  
  public JavaBreakpointConditionEditor() {}
  
  public JavaBreakpointConditionEditor(IDialogSettings dialogSettings)
  {
    fConditionHistoryDialogSettings = (dialogSettings != null ? dialogSettings : DialogSettings.getOrCreateSection(JDIDebugUIPlugin.getDefault().getDialogSettings(), "conditionHistory"));
  }
  
  public void addPropertyListener(IPropertyListener listener)
  {
    super.addPropertyListener(listener);
  }
  
  public void removePropertyListener(IPropertyListener listener)
  {
    super.removePropertyListener(listener);
  }
  
  /* Error */
  public void setInput(Object input)
    throws CoreException
  {
    // Byte code:
    //   0: aload_0
    //   1: getfield 792	org/eclipse/jdt/debug/ui/breakpoints/JavaBreakpointConditionEditor:fBreakpoint	Lorg/eclipse/jdt/debug/core/IJavaLineBreakpoint;
    //   4: aload_1
    //   5: if_acmpne +7 -> 12
    //   8: iconst_1
    //   9: goto +4 -> 13
    //   12: iconst_0
    //   13: istore_2
    //   14: aload_0
    //   15: iconst_1
    //   16: invokevirtual 865	org/eclipse/jdt/debug/ui/breakpoints/JavaBreakpointConditionEditor:suppressPropertyChanges	(Z)V
    //   19: aload_1
    //   20: instanceof 398
    //   23: ifeq +14 -> 37
    //   26: aload_0
    //   27: aload_1
    //   28: checkcast 398	org/eclipse/jdt/debug/core/IJavaLineBreakpoint
    //   31: invokespecial 871	org/eclipse/jdt/debug/ui/breakpoints/JavaBreakpointConditionEditor:setBreakpoint	(Lorg/eclipse/jdt/debug/core/IJavaLineBreakpoint;)V
    //   34: goto +8 -> 42
    //   37: aload_0
    //   38: aconst_null
    //   39: invokespecial 871	org/eclipse/jdt/debug/ui/breakpoints/JavaBreakpointConditionEditor:setBreakpoint	(Lorg/eclipse/jdt/debug/core/IJavaLineBreakpoint;)V
    //   42: aload_0
    //   43: invokespecial 861	org/eclipse/jdt/debug/ui/breakpoints/JavaBreakpointConditionEditor:hasConditionHistory	()Z
    //   46: ifeq +27 -> 73
    //   49: iload_2
    //   50: ifne +8 -> 58
    //   53: aload_0
    //   54: iconst_0
    //   55: putfield 785	org/eclipse/jdt/debug/ui/breakpoints/JavaBreakpointConditionEditor:fReplaceConditionInHistory	Z
    //   58: aload_0
    //   59: invokespecial 857	org/eclipse/jdt/debug/ui/breakpoints/JavaBreakpointConditionEditor:initializeConditionHistoryDropDown	()V
    //   62: goto +11 -> 73
    //   65: astore_3
    //   66: aload_0
    //   67: iconst_0
    //   68: invokevirtual 865	org/eclipse/jdt/debug/ui/breakpoints/JavaBreakpointConditionEditor:suppressPropertyChanges	(Z)V
    //   71: aload_3
    //   72: athrow
    //   73: aload_0
    //   74: iconst_0
    //   75: invokevirtual 865	org/eclipse/jdt/debug/ui/breakpoints/JavaBreakpointConditionEditor:suppressPropertyChanges	(Z)V
    //   78: return
    // Line number table:
    //   Java source line #221	-> byte code offset #0
    //   Java source line #222	-> byte code offset #14
    //   Java source line #223	-> byte code offset #19
    //   Java source line #224	-> byte code offset #26
    //   Java source line #226	-> byte code offset #37
    //   Java source line #228	-> byte code offset #42
    //   Java source line #229	-> byte code offset #49
    //   Java source line #230	-> byte code offset #53
    //   Java source line #231	-> byte code offset #58
    //   Java source line #233	-> byte code offset #65
    //   Java source line #234	-> byte code offset #66
    //   Java source line #235	-> byte code offset #71
    //   Java source line #234	-> byte code offset #73
    //   Java source line #236	-> byte code offset #78
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	79	0	this	JavaBreakpointConditionEditor
    //   0	79	1	input	Object
    //   13	37	2	sameBreakpoint	boolean
    //   65	7	3	localObject	Object
    // Exception table:
    //   from	to	target	type
    //   0	65	65	finally
  }
  
  private void setBreakpoint(IJavaLineBreakpoint breakpoint)
    throws CoreException
  {
    fBreakpoint = breakpoint;
    if (fDocumentListener != null)
    {
      fViewer.getDocument().removeDocumentListener(fDocumentListener);
      fDocumentListener = null;
    }
    fViewer.unconfigure();
    IDocument document = new Document();
    JDIDebugUIPlugin.getDefault().getJavaTextTools().setupJavaDocumentPartitioner(document, "___java_partitioning");
    fViewer.setInput(document);
    String condition = null;
    IType type = null;
    boolean controlsEnabled = false;
    boolean conditionEnabled = false;
    boolean whenTrue = true;
    if (breakpoint != null)
    {
      controlsEnabled = true;
      if (breakpoint.supportsCondition())
      {
        condition = breakpoint.getCondition();
        conditionEnabled = breakpoint.isConditionEnabled();
        whenTrue = breakpoint.isConditionSuspendOnTrue();
        type = BreakpointUtils.getType(breakpoint);
      }
    }
    IJavaDebugContentAssistContext context = null;
    if ((type == null) || (breakpoint == null))
    {
      context = new TypeContext(null, -1);
    }
    else
    {
      String source = null;
      ICompilationUnit compilationUnit = type.getCompilationUnit();
      if ((compilationUnit != null) && (compilationUnit.getJavaProject().getProject().exists()))
      {
        source = compilationUnit.getSource();
      }
      else
      {
        IClassFile classFile = type.getClassFile();
        if (classFile != null) {
          source = classFile.getSource();
        }
      }
      int lineNumber = breakpoint.getMarker().getAttribute("lineNumber", -1);
      int position = -1;
      if ((source != null) && (lineNumber != -1)) {
        try
        {
          position = new Document(source).getLineOffset(lineNumber - 1);
        }
        catch (BadLocationException e)
        {
          JDIDebugUIPlugin.log(e);
        }
      }
      context = new TypeContext(type, position);
    }
    fCompletionProcessor = new JavaDebugContentAssistProcessor(context);
    document.set(condition == null ? "" : condition);
    fViewer.configure(new DisplayViewerConfiguration()
    {
      public IContentAssistProcessor getContentAssistantProcessor()
      {
        return fCompletionProcessor;
      }
    });
    fDocumentListener = new IDocumentListener()
    {
      public void documentAboutToBeChanged(DocumentEvent event) {}
      
      public void documentChanged(DocumentEvent event)
      {
        setDirty(4097);
      }
    };
    fViewer.getDocument().addDocumentListener(fDocumentListener);
    fConditional.setEnabled(controlsEnabled);
    fConditional.setSelection(conditionEnabled);
    fWhenTrue.setSelection(whenTrue);
    fWhenChange.setSelection(!whenTrue);
    setEnabled((conditionEnabled) && (breakpoint != null) && (breakpoint.supportsCondition()), false);
    setDirty(false);
    checkIfUsedInBreakpointsView();
    registerViewerUndoRedoActions();
  }
  
  public Control createControl(Composite parent)
  {
    Composite controls = SWTFactory.createComposite(parent, parent.getFont(), 2, 1, 768, 0, 0);
    fConditional = SWTFactory.createCheckButton(controls, 
      processMnemonics(PropertyPageMessages.JavaBreakpointConditionEditor_0), 
      null, 
      false, 
      1);
    fConditional.setLayoutData(new GridData(1, 16777216, false, false));
    fConditional.addSelectionListener(new SelectionAdapter()
    {
      public void widgetSelected(SelectionEvent e)
      {
        boolean checked = fConditional.getSelection();
        JavaBreakpointConditionEditor.this.setEnabled(checked, true);
        setDirty(4098);
      }
    });
    Composite radios = SWTFactory.createComposite(controls, controls.getFont(), 2, 1, 768, 0, 0);
    fWhenTrue = SWTFactory.createRadioButton(radios, processMnemonics(PropertyPageMessages.JavaBreakpointConditionEditor_1));
    fWhenTrue.setLayoutData(new GridData());
    fWhenChange = SWTFactory.createRadioButton(radios, processMnemonics(PropertyPageMessages.JavaBreakpointConditionEditor_2));
    fWhenChange.setLayoutData(new GridData());
    fWhenTrue.addSelectionListener(new SelectionAdapter()
    {
      public void widgetSelected(SelectionEvent e)
      {
        setDirty(4099);
      }
    });
    fWhenChange.addSel
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56

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