mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
unused code cleanup
This commit is contained in:
@@ -317,7 +317,6 @@ public class DebugProcessEvents extends DebugProcessImpl {
|
||||
threadDeathRequest.setSuspendPolicy(EventRequest.SUSPEND_NONE);
|
||||
threadDeathRequest.enable();
|
||||
|
||||
DebuggerManagerEx.getInstanceEx(getProject()).getBreakpointManager().setInitialBreakpointsState();
|
||||
myDebugProcessDispatcher.getMulticaster().processAttached(this);
|
||||
|
||||
final String addressDisplayName = DebuggerBundle.getAddressDisplayName(getConnection());
|
||||
|
||||
@@ -62,25 +62,13 @@ public abstract class Breakpoint<P extends JavaBreakpointProperties> implements
|
||||
final XBreakpoint<P> myXBreakpoint;
|
||||
protected final Project myProject;
|
||||
|
||||
//private boolean ENABLED = true;
|
||||
//private boolean LOG_ENABLED = false;
|
||||
//private boolean LOG_EXPRESSION_ENABLED = false;
|
||||
//private boolean REMOVE_AFTER_HIT = false;
|
||||
//private TextWithImports myLogMessage; // an expression to be evaluated and printed
|
||||
@NonNls private static final String LOG_MESSAGE_OPTION_NAME = "LOG_MESSAGE";
|
||||
public static final Breakpoint[] EMPTY_ARRAY = new Breakpoint[0];
|
||||
protected boolean myCachedVerifiedState = false;
|
||||
//private TextWithImportsImpl myLogMessage;
|
||||
|
||||
protected Breakpoint(@NotNull Project project, XBreakpoint<P> xBreakpoint) {
|
||||
//super(project);
|
||||
myProject = project;
|
||||
myXBreakpoint = xBreakpoint;
|
||||
//myLogMessage = new TextWithImportsImpl(CodeFragmentKind.EXPRESSION, "");
|
||||
//noinspection AbstractMethodCallInConstructor
|
||||
//final BreakpointDefaults defaults = DebuggerManagerEx.getInstanceEx(project).getBreakpointManager().getBreakpointDefaults(getCategory());
|
||||
//SUSPEND_POLICY = defaults.getSuspendPolicy();
|
||||
//CONDITION_ENABLED = defaults.isConditionEnabled();
|
||||
}
|
||||
|
||||
public Project getProject() {
|
||||
@@ -469,16 +457,6 @@ public abstract class Breakpoint<P extends JavaBreakpointProperties> implements
|
||||
}
|
||||
}
|
||||
|
||||
//@Override
|
||||
//public void writeExternal(Element parentNode) throws WriteExternalException {
|
||||
//super.writeExternal(parentNode);
|
||||
//JDOMExternalizerUtil.writeField(parentNode, LOG_MESSAGE_OPTION_NAME, getLogMessage().toExternalForm());
|
||||
//}
|
||||
|
||||
//public void setLogMessage(TextWithImports logMessage) {
|
||||
// myLogMessage = logMessage;
|
||||
//}
|
||||
|
||||
@Nullable
|
||||
public abstract PsiElement getEvaluationElement();
|
||||
|
||||
|
||||
+5
-273
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -23,7 +23,6 @@ package com.intellij.debugger.ui.breakpoints;
|
||||
import com.intellij.debugger.DebuggerBundle;
|
||||
import com.intellij.debugger.DebuggerInvocationUtil;
|
||||
import com.intellij.debugger.DebuggerManagerEx;
|
||||
import com.intellij.debugger.SourcePosition;
|
||||
import com.intellij.debugger.engine.BreakpointStepMethodFilter;
|
||||
import com.intellij.debugger.engine.DebugProcessImpl;
|
||||
import com.intellij.debugger.engine.requests.RequestManagerImpl;
|
||||
@@ -42,7 +41,10 @@ import com.intellij.openapi.fileEditor.FileDocumentManager;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.startup.StartupManager;
|
||||
import com.intellij.openapi.ui.MessageType;
|
||||
import com.intellij.openapi.util.*;
|
||||
import com.intellij.openapi.util.Comparing;
|
||||
import com.intellij.openapi.util.Computable;
|
||||
import com.intellij.openapi.util.InvalidDataException;
|
||||
import com.intellij.openapi.util.Key;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.openapi.vfs.VirtualFileManager;
|
||||
import com.intellij.psi.PsiField;
|
||||
@@ -61,7 +63,6 @@ import com.sun.jdi.InternalException;
|
||||
import com.sun.jdi.ThreadReference;
|
||||
import com.sun.jdi.request.*;
|
||||
import gnu.trove.THashMap;
|
||||
import gnu.trove.TIntHashSet;
|
||||
import org.jdom.Element;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -86,45 +87,11 @@ public class BreakpointManager {
|
||||
private final Map<XBreakpoint, Breakpoint> myBreakpoints = new HashMap<XBreakpoint, Breakpoint>(); // breakpoints storage, access should be synchronized
|
||||
@Nullable private List<Breakpoint> myBreakpointsListForIteration = null; // another list for breakpoints iteration, unsynchronized access ok
|
||||
private final Map<String, String> myUIProperties = new LinkedHashMap<String, String>();
|
||||
//private final Map<Key<? extends Breakpoint>, BreakpointDefaults> myBreakpointDefaults = new LinkedHashMap<Key<? extends Breakpoint>, BreakpointDefaults>();
|
||||
|
||||
private final EventDispatcher<BreakpointManagerListener> myDispatcher = EventDispatcher.create(BreakpointManagerListener.class);
|
||||
|
||||
private final StartupManager myStartupManager;
|
||||
|
||||
private void update(@NotNull List<BreakpointWithHighlighter> breakpoints) {
|
||||
final TIntHashSet intHash = new TIntHashSet();
|
||||
for (BreakpointWithHighlighter breakpoint : breakpoints) {
|
||||
SourcePosition sourcePosition = breakpoint.getSourcePosition();
|
||||
breakpoint.reload();
|
||||
|
||||
if (breakpoint.isValid()) {
|
||||
if (sourcePosition == null || breakpoint.getSourcePosition().getLine() != sourcePosition.getLine()) {
|
||||
fireBreakpointChanged(breakpoint);
|
||||
}
|
||||
|
||||
if (intHash.contains(breakpoint.getLineIndex())) {
|
||||
remove(breakpoint);
|
||||
}
|
||||
else {
|
||||
intHash.add(breakpoint.getLineIndex());
|
||||
}
|
||||
}
|
||||
else {
|
||||
remove(breakpoint);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void remove(final BreakpointWithHighlighter breakpoint) {
|
||||
DebuggerInvocationUtil.invokeLater(myProject, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
removeBreakpoint(breakpoint);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public BreakpointManager(@NotNull Project project, @NotNull StartupManager startupManager, @NotNull DebuggerManagerImpl debuggerManager) {
|
||||
myProject = project;
|
||||
myStartupManager = startupManager;
|
||||
@@ -204,15 +171,6 @@ public class BreakpointManager {
|
||||
});
|
||||
}
|
||||
|
||||
//@NotNull
|
||||
//public BreakpointDefaults getBreakpointDefaults(Key<? extends Breakpoint> category) {
|
||||
// BreakpointDefaults defaults = myBreakpointDefaults.get(category);
|
||||
// if (defaults == null) {
|
||||
// defaults = new BreakpointDefaults();
|
||||
// }
|
||||
// return defaults;
|
||||
//}
|
||||
|
||||
public void setBreakpointDefaults(Key<? extends Breakpoint> category, BreakpointDefaults defaults) {
|
||||
Class typeCls = null;
|
||||
if (LineBreakpoint.CATEGORY.toString().equals(category.toString())) {
|
||||
@@ -231,10 +189,8 @@ public class BreakpointManager {
|
||||
XBreakpointType<XBreakpoint<?>, ?> type = XDebuggerUtil.getInstance().findBreakpointType(typeCls);
|
||||
((XBreakpointManagerImpl)getXBreakpointManager()).getBreakpointDefaults(type).setSuspendPolicy(Breakpoint.transformSuspendPolicy(defaults.getSuspendPolicy()));
|
||||
}
|
||||
//myBreakpointDefaults.put(category, defaults);
|
||||
}
|
||||
|
||||
|
||||
@Nullable
|
||||
public RunToCursorBreakpoint addRunToCursorBreakpoint(Document document, int lineIndex, final boolean ignoreBreakpoints) {
|
||||
return RunToCursorBreakpoint.create(myProject, document, lineIndex, ignoreBreakpoints);
|
||||
@@ -261,16 +217,6 @@ public class BreakpointManager {
|
||||
return breakpoint;
|
||||
}
|
||||
|
||||
//@Nullable
|
||||
//public FieldBreakpoint addFieldBreakpoint(Field field, ObjectReference object) {
|
||||
// ApplicationManager.getApplication().assertIsDispatchThread();
|
||||
// final FieldBreakpoint fieldBreakpoint = FieldBreakpoint.create(myProject, field, object, null);
|
||||
// if (fieldBreakpoint != null) {
|
||||
// addBreakpoint(fieldBreakpoint);
|
||||
// }
|
||||
// return fieldBreakpoint;
|
||||
//}
|
||||
|
||||
@Nullable
|
||||
public FieldBreakpoint addFieldBreakpoint(@NotNull Document document, int offset) {
|
||||
PsiField field = FieldBreakpoint.findField(myProject, document, offset);
|
||||
@@ -344,50 +290,6 @@ public class BreakpointManager {
|
||||
});
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public WildcardMethodBreakpoint addMethodBreakpoint(String classPattern, String methodName) {
|
||||
ApplicationManager.getApplication().assertIsDispatchThread();
|
||||
WildcardMethodBreakpoint breakpoint = WildcardMethodBreakpoint.create(myProject, classPattern, methodName, null);
|
||||
if (breakpoint == null) {
|
||||
return null;
|
||||
}
|
||||
addBreakpoint(breakpoint);
|
||||
return breakpoint;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return null if not found or a breakpoint object
|
||||
*/
|
||||
@NotNull
|
||||
public List<BreakpointWithHighlighter> findBreakpoints(final Document document, final int offset) {
|
||||
LinkedList<BreakpointWithHighlighter> result = new LinkedList<BreakpointWithHighlighter>();
|
||||
ApplicationManager.getApplication().assertIsDispatchThread();
|
||||
for (final Breakpoint breakpoint : getBreakpoints()) {
|
||||
if (breakpoint instanceof BreakpointWithHighlighter && ((BreakpointWithHighlighter)breakpoint).isAt(document, offset)) {
|
||||
result.add((BreakpointWithHighlighter)breakpoint);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public List<BreakpointWithHighlighter> findBreakpoints(@NotNull Document document, @NotNull TextRange textRange) {
|
||||
ApplicationManager.getApplication().assertIsDispatchThread();
|
||||
List<BreakpointWithHighlighter> result = new ArrayList<BreakpointWithHighlighter>();
|
||||
int startLine = document.getLineNumber(textRange.getStartOffset());
|
||||
int endLine = document.getLineNumber(textRange.getEndOffset())+1;
|
||||
TextRange lineRange = new TextRange(startLine, endLine);
|
||||
for (final Breakpoint breakpoint : getBreakpoints()) {
|
||||
if (breakpoint instanceof BreakpointWithHighlighter &&
|
||||
lineRange.contains(((BreakpointWithHighlighter)breakpoint).getLineIndex())) {
|
||||
result.add((BreakpointWithHighlighter)breakpoint);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param category breakpoint category, null if the category does not matter
|
||||
*/
|
||||
@@ -658,115 +560,6 @@ public class BreakpointManager {
|
||||
}
|
||||
|
||||
parentNode.addContent(myOriginalBreakpointsNodes.values());
|
||||
//ApplicationManager.getApplication().runReadAction(new Runnable() {
|
||||
// @Override
|
||||
// public void run() {
|
||||
// removeInvalidBreakpoints();
|
||||
// final Map<Key<? extends Breakpoint>, Element> categoryToElementMap = new THashMap<Key<? extends Breakpoint>, Element>();
|
||||
// for (Key<? extends Breakpoint> category : myBreakpointDefaults.keySet()) {
|
||||
// final Element group = getCategoryGroupElement(categoryToElementMap, category, parentNode);
|
||||
// final BreakpointDefaults defaults = getBreakpointDefaults(category);
|
||||
// group.setAttribute(DEFAULT_SUSPEND_POLICY_ATTRIBUTE_NAME, String.valueOf(defaults.getSuspendPolicy()));
|
||||
// group.setAttribute(DEFAULT_CONDITION_STATE_ATTRIBUTE_NAME, String.valueOf(defaults.isConditionEnabled()));
|
||||
// }
|
||||
// // don't store invisible breakpoints
|
||||
// for (Breakpoint breakpoint : getBreakpoints()) {
|
||||
// if (breakpoint.isValid() &&
|
||||
// (!(breakpoint instanceof BreakpointWithHighlighter) || ((BreakpointWithHighlighter)breakpoint).isVisible())) {
|
||||
// writeBreakpoint(getCategoryGroupElement(categoryToElementMap, breakpoint.getCategory(), parentNode), breakpoint);
|
||||
// }
|
||||
// }
|
||||
// final AnyExceptionBreakpoint anyExceptionBreakpoint = getAnyExceptionBreakpoint();
|
||||
// final Element group = getCategoryGroupElement(categoryToElementMap, anyExceptionBreakpoint.getCategory(), parentNode);
|
||||
// writeBreakpoint(group, anyExceptionBreakpoint);
|
||||
//
|
||||
// final Element rules = new Element(RULES_GROUP_NAME);
|
||||
// parentNode.addContent(rules);
|
||||
// //for (EnableBreakpointRule myBreakpointRule : myBreakpointRules) {
|
||||
// // writeRule(myBreakpointRule, rules);
|
||||
// //}
|
||||
// }
|
||||
//});
|
||||
//
|
||||
//final Element uiProperties = new Element("ui_properties");
|
||||
//parentNode.addContent(uiProperties);
|
||||
//for (final String name : myUIProperties.keySet()) {
|
||||
// Element property = new Element("property");
|
||||
// uiProperties.addContent(property);
|
||||
// property.setAttribute("name", name);
|
||||
// property.setAttribute("value", myUIProperties.get(name));
|
||||
//}
|
||||
}
|
||||
|
||||
//@SuppressWarnings({"HardCodedStringLiteral"})
|
||||
//private static void writeRule(@NotNull final EnableBreakpointRule enableBreakpointRule, @NotNull Element element) {
|
||||
// Element rule = new Element("rule");
|
||||
// if (enableBreakpointRule.isLeaveEnabled()) {
|
||||
// rule.setAttribute("leaveEnabled", Boolean.toString(true));
|
||||
// }
|
||||
// element.addContent(rule);
|
||||
// writeRuleBreakpoint(rule, MASTER_BREAKPOINT_TAGNAME, enableBreakpointRule.getMasterBreakpoint());
|
||||
// writeRuleBreakpoint(rule, SLAVE_BREAKPOINT_TAGNAME, enableBreakpointRule.getSlaveBreakpoint());
|
||||
//}
|
||||
|
||||
//@SuppressWarnings({"HardCodedStringLiteral"}) private static void writeRuleBreakpoint(@NotNull final Element element, final String tagName, @NotNull final Breakpoint breakpoint) {
|
||||
// Element master = new Element(tagName);
|
||||
// element.addContent(master);
|
||||
// master.setAttribute("name", breakpoint.getDisplayName());
|
||||
//}
|
||||
|
||||
//@SuppressWarnings({"HardCodedStringLiteral"})
|
||||
//private static void writeBreakpoint(@NotNull final Element group, @NotNull final Breakpoint breakpoint) {
|
||||
// Element breakpointNode = new Element("breakpoint");
|
||||
// group.addContent(breakpointNode);
|
||||
// try {
|
||||
// breakpoint.writeExternal(breakpointNode);
|
||||
// }
|
||||
// catch (WriteExternalException e) {
|
||||
// LOG.error(e);
|
||||
// }
|
||||
//}
|
||||
|
||||
private static <T extends Breakpoint> Element getCategoryGroupElement(@NotNull final Map<Key<? extends Breakpoint>, Element> categoryToElementMap, @NotNull final Key<T> category, @NotNull final Element parentNode) {
|
||||
Element group = categoryToElementMap.get(category);
|
||||
if (group == null) {
|
||||
group = new Element(category.toString());
|
||||
categoryToElementMap.put(category, group);
|
||||
parentNode.addContent(group);
|
||||
}
|
||||
return group;
|
||||
}
|
||||
|
||||
private void removeInvalidBreakpoints() {
|
||||
ArrayList<Breakpoint> toDelete = new ArrayList<Breakpoint>();
|
||||
|
||||
for (Breakpoint breakpoint : getBreakpoints()) {
|
||||
if (!breakpoint.isValid()) {
|
||||
toDelete.add(breakpoint);
|
||||
}
|
||||
}
|
||||
|
||||
for (final Breakpoint aToDelete : toDelete) {
|
||||
removeBreakpoint(aToDelete);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return breakpoints of one of the category:
|
||||
* LINE_BREAKPOINTS, EXCEPTION_BREAKPOINTS, FIELD_BREAKPOINTS, METHOD_BREAKPOINTS
|
||||
*/
|
||||
public <T extends Breakpoint> Breakpoint[] getBreakpoints(@NotNull final Key<T> category) {
|
||||
ApplicationManager.getApplication().assertIsDispatchThread();
|
||||
removeInvalidBreakpoints();
|
||||
|
||||
final ArrayList<Breakpoint> breakpoints = new ArrayList<Breakpoint>();
|
||||
for (Breakpoint breakpoint : getBreakpoints()) {
|
||||
if (category.equals(breakpoint.getCategory())) {
|
||||
breakpoints.add(breakpoint);
|
||||
}
|
||||
}
|
||||
|
||||
return breakpoints.toArray(new Breakpoint[breakpoints.size()]);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@@ -969,43 +762,8 @@ public class BreakpointManager {
|
||||
public void setBreakpointEnabled(@NotNull final Breakpoint breakpoint, final boolean enabled) {
|
||||
if (breakpoint.isEnabled() != enabled) {
|
||||
breakpoint.setEnabled(enabled);
|
||||
//fireBreakpointChanged(breakpoint);
|
||||
//breakpoint.updateUI();
|
||||
}
|
||||
}
|
||||
|
||||
public void addBreakpointRule(@NotNull EnableBreakpointRule rule) {
|
||||
//rule.init();
|
||||
//myBreakpointRules.add(rule);
|
||||
}
|
||||
|
||||
public boolean removeBreakpointRule(@NotNull EnableBreakpointRule rule) {
|
||||
//final boolean removed = myBreakpointRules.remove(rule);
|
||||
//if (removed) {
|
||||
// rule.dispose();
|
||||
//}
|
||||
//return removed;
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean removeBreakpointRule(@NotNull Breakpoint slaveBreakpoint) {
|
||||
//for (final EnableBreakpointRule rule : myBreakpointRules) {
|
||||
// if (slaveBreakpoint.equals(rule.getSlaveBreakpoint())) {
|
||||
// removeBreakpointRule(rule);
|
||||
// return true;
|
||||
// }
|
||||
//}
|
||||
return false;
|
||||
}
|
||||
|
||||
//private void updateBreakpointRules(@NotNull Breakpoint removedBreakpoint) {
|
||||
// for (Iterator<EnableBreakpointRule> it = myBreakpointRules.iterator(); it.hasNext();) {
|
||||
// final EnableBreakpointRule rule = it.next();
|
||||
// if (removedBreakpoint.equals(rule.getMasterBreakpoint()) || removedBreakpoint.equals(rule.getSlaveBreakpoint())) {
|
||||
// it.remove();
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
// copied from XDebugSessionImpl processDependencies
|
||||
public void processBreakpointHit(@NotNull final Breakpoint breakpoint) {
|
||||
@@ -1035,38 +793,12 @@ public class BreakpointManager {
|
||||
}
|
||||
}
|
||||
|
||||
public void setInitialBreakpointsState() {
|
||||
//myAllowMulticasting = false;
|
||||
//for (final EnableBreakpointRule myBreakpointRule : myBreakpointRules) {
|
||||
// myBreakpointRule.init();
|
||||
//}
|
||||
//myAllowMulticasting = true;
|
||||
//if (!myBreakpointRules.isEmpty()) {
|
||||
// IJSwingUtilities.invoke(new Runnable() {
|
||||
// @Override
|
||||
// public void run() {
|
||||
// myDispatcher.getMulticaster().breakpointsChanged();
|
||||
// }
|
||||
// });
|
||||
//}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Breakpoint findMasterBreakpoint(@NotNull Breakpoint dependentBreakpoint) {
|
||||
XDependentBreakpointManager dependentBreakpointManager = ((XBreakpointManagerImpl)getXBreakpointManager()).getDependentBreakpointManager();
|
||||
return myBreakpoints.get(dependentBreakpointManager.getMasterBreakpoint(dependentBreakpoint.myXBreakpoint));
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public EnableBreakpointRule findBreakpointRule(@NotNull Breakpoint dependentBreakpoint) {
|
||||
//for (final EnableBreakpointRule rule : myBreakpointRules) {
|
||||
// if (dependentBreakpoint.equals(rule.getSlaveBreakpoint())) {
|
||||
// return rule;
|
||||
// }
|
||||
//}
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getProperty(String name) {
|
||||
return myUIProperties.get(name);
|
||||
}
|
||||
|
||||
-442
@@ -1,442 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="com.intellij.debugger.ui.breakpoints.BreakpointPropertiesPanel">
|
||||
<grid id="6570" binding="myPanel" layout-manager="GridLayoutManager" row-count="4" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<xy x="23" y="37" width="751" height="404"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="7978d" layout-manager="GridLayoutManager" row-count="1" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="1" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<xy id="f3049" binding="myConditionComboPanel" layout-manager="XYLayout" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</xy>
|
||||
<component id="ecb15" class="javax.swing.JCheckBox" binding="myConditionCheckbox">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text value="&Condition"/>
|
||||
</properties>
|
||||
</component>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="763d0" layout-manager="GridLayoutManager" row-count="1" column-count="5" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="true"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<clientProperties>
|
||||
<BorderFactoryClass class="java.lang.String" value="com.intellij.ui.IdeBorderFactory$PlainSmallWithoutIndent"/>
|
||||
</clientProperties>
|
||||
<border type="none">
|
||||
<font/>
|
||||
</border>
|
||||
<children>
|
||||
<component id="f6192" class="javax.swing.JRadioButton" binding="myRbSuspendThread">
|
||||
<constraints>
|
||||
<grid row="0" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text resource-bundle="messages/DebuggerBundle" key="breakpoint.properties.panel.option.suspend.thread"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="106f5" class="javax.swing.JRadioButton" binding="myRbSuspendAll">
|
||||
<constraints>
|
||||
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text resource-bundle="messages/DebuggerBundle" key="breakpoint.properties.panel.option.suspend.all"/>
|
||||
</properties>
|
||||
</component>
|
||||
<hspacer id="46ea8">
|
||||
<constraints>
|
||||
<grid row="0" column="3" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
</hspacer>
|
||||
<component id="be00d" class="javax.swing.JButton" binding="myMakeDefaultButton">
|
||||
<constraints>
|
||||
<grid row="0" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text resource-bundle="messages/DebuggerBundle" key="breakpoint.properties.panel.option.suspend.default"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="f0c10" class="javax.swing.JCheckBox" binding="myCbSuspend">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text value="&Suspend"/>
|
||||
</properties>
|
||||
</component>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="5aab2" layout-manager="GridLayoutManager" row-count="1" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="da86f" layout-manager="GridLayoutManager" row-count="3" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false">
|
||||
<preferred-size width="245" height="251"/>
|
||||
</grid>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="1d1c" binding="myActionsPanel" layout-manager="GridLayoutManager" row-count="3" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="5"/>
|
||||
<constraints>
|
||||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<clientProperties>
|
||||
<BorderFactoryClass class="java.lang.String" value="com.intellij.ui.IdeBorderFactory$PlainSmallWithoutIndent"/>
|
||||
</clientProperties>
|
||||
<border type="etched" title-resource-bundle="messages/DebuggerBundle" title-key="label.breakpoint.properties.panel.group.actions"/>
|
||||
<children>
|
||||
<component id="185b0" class="javax.swing.JCheckBox" binding="myLogMessageCheckBox">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="7" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text resource-bundle="messages/DebuggerBundle" key="breakpoint.properties.panel.option.log.message"/>
|
||||
</properties>
|
||||
</component>
|
||||
<grid id="42168" layout-manager="GridLayoutManager" row-count="2" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="7" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="4a38" layout-manager="GridLayoutManager" row-count="1" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="1" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<hspacer id="9c54c">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="1" hsize-policy="0" anchor="0" fill="1" indent="0" use-parent-layout="false">
|
||||
<preferred-size width="15" height="-1"/>
|
||||
</grid>
|
||||
</constraints>
|
||||
</hspacer>
|
||||
<grid id="80950" binding="myLogExpressionComboPanel" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="7" anchor="1" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
<component id="7b0ce" class="javax.swing.JCheckBox" binding="myLogExpressionCheckBox">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="7" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text resource-bundle="messages/DebuggerBundle" key="breakpoint.properties.panel.option.log.expression"/>
|
||||
</properties>
|
||||
</component>
|
||||
</children>
|
||||
</grid>
|
||||
<component id="50916" class="javax.swing.JCheckBox" binding="myTemporaryCheckBox" default-binding="true">
|
||||
<constraints>
|
||||
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text value="&Remove once hit"/>
|
||||
</properties>
|
||||
</component>
|
||||
</children>
|
||||
</grid>
|
||||
<xy id="862d9" binding="mySpecialBoxPanel" layout-manager="XYLayout" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<visible value="true"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</xy>
|
||||
<grid id="d7b0a" binding="myDependsOnPanel" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<clientProperties>
|
||||
<BorderFactoryClass class="java.lang.String" value=""/>
|
||||
</clientProperties>
|
||||
<border type="empty"/>
|
||||
<children>
|
||||
<grid id="4241e" layout-manager="GridLayoutManager" row-count="3" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="5"/>
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="9b21c" binding="myDependentBreakpointComboPanel" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="15" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="1" column="0" row-span="1" col-span="3" vsize-policy="0" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
<component id="7f1f0" class="javax.swing.JLabel" binding="myEnableOrDisableLabel">
|
||||
<constraints>
|
||||
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text resource-bundle="messages/DebuggerBundle" key="breakpoint.properties.panel.option.dependency.type.lable"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="e3baf" class="javax.swing.JRadioButton" binding="myDisableAgainRadio" default-binding="true">
|
||||
<constraints>
|
||||
<grid row="2" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text resource-bundle="messages/DebuggerBundle" key="breakpoint.properties.panel.option.depends.disable.again"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="10e41" class="javax.swing.JRadioButton" binding="myLeaveEnabledRadioButton" default-binding="true">
|
||||
<constraints>
|
||||
<grid row="2" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text resource-bundle="messages/DebuggerBundle" key="breakpoint.properties.panel.option.depends.leave.enabled"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="f3672" class="com.intellij.ui.components.JBLabel">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text resource-bundle="messages/XDebuggerBundle" key="xbreakpoint.master.breakpoint.description"/>
|
||||
</properties>
|
||||
</component>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="d03f5" binding="myConditionsPanel" layout-manager="GridLayoutManager" row-count="4" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="7">
|
||||
<margin top="2" left="2" bottom="5" right="5"/>
|
||||
<constraints>
|
||||
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="3" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<clientProperties>
|
||||
<BorderFactoryClass class="java.lang.String" value="com.intellij.ui.IdeBorderFactory$PlainSmallWithoutIndent"/>
|
||||
</clientProperties>
|
||||
<border type="etched" title-resource-bundle="messages/DebuggerBundle" title-key="label.breakpoint.properties.panel.group.conditions"/>
|
||||
<children>
|
||||
<grid id="b404a" binding="myInstanceFiltersPanel" layout-manager="GridLayoutManager" row-count="2" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="0">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="2" vsize-policy="3" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<component id="20b41" class="javax.swing.JCheckBox" binding="myInstanceFiltersCheckBox">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<margin top="2" left="2" bottom="0" right="2"/>
|
||||
<text resource-bundle="messages/DebuggerBundle" key="breakpoint.properties.panel.option.instance.filters"/>
|
||||
</properties>
|
||||
</component>
|
||||
<grid id="d9be2" layout-manager="GridLayoutManager" row-count="1" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<hspacer id="e6448">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="1" hsize-policy="0" anchor="0" fill="1" indent="0" use-parent-layout="false">
|
||||
<preferred-size width="15" height="-1"/>
|
||||
</grid>
|
||||
</constraints>
|
||||
</hspacer>
|
||||
<xy id="1114b" binding="myInstanceFiltersFieldPanel" layout-manager="XYLayout" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</xy>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="f07fc" binding="myClassFiltersPanel" layout-manager="GridLayoutManager" row-count="2" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="0">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="1" column="0" row-span="1" col-span="2" vsize-policy="3" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<component id="40e6b" class="javax.swing.JCheckBox" binding="myClassFiltersCheckBox">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<margin top="2" left="2" bottom="0" right="2"/>
|
||||
<text resource-bundle="messages/DebuggerBundle" key="breakpoint.properties.panel.option.class.filters"/>
|
||||
</properties>
|
||||
</component>
|
||||
<grid id="fbeb4" layout-manager="GridLayoutManager" row-count="1" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<xy id="72d13" binding="myClassFiltersFieldPanel" layout-manager="XYLayout" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</xy>
|
||||
<hspacer id="1d45">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="1" hsize-policy="0" anchor="0" fill="1" indent="0" use-parent-layout="false">
|
||||
<preferred-size width="15" height="-1"/>
|
||||
</grid>
|
||||
</constraints>
|
||||
</hspacer>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="21edd" binding="myPassCountPanel" layout-manager="GridLayoutManager" row-count="2" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="0">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="2" column="0" row-span="1" col-span="2" vsize-policy="3" hsize-policy="7" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<component id="11e5a" class="javax.swing.JCheckBox" binding="myPassCountCheckbox">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<margin top="2" left="2" bottom="0" right="2"/>
|
||||
<text resource-bundle="messages/DebuggerBundle" key="breakpoint.properties.panel.option.pass.count"/>
|
||||
</properties>
|
||||
</component>
|
||||
<grid id="e8cc5" layout-manager="GridLayoutManager" row-count="1" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<component id="64df8" class="javax.swing.JTextField" binding="myPassCountField">
|
||||
<constraints>
|
||||
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
|
||||
<preferred-size width="15" height="-1"/>
|
||||
</grid>
|
||||
</constraints>
|
||||
<properties>
|
||||
<enabled value="true"/>
|
||||
<horizontalAlignment value="10"/>
|
||||
</properties>
|
||||
</component>
|
||||
<hspacer id="9be08">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="1" hsize-policy="0" anchor="0" fill="1" indent="0" use-parent-layout="false">
|
||||
<preferred-size width="15" height="-1"/>
|
||||
</grid>
|
||||
</constraints>
|
||||
</hspacer>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
<vspacer id="905e2">
|
||||
<constraints>
|
||||
<grid row="3" column="1" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
</vspacer>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="22269" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<component id="247a5" class="javax.swing.JCheckBox" binding="myEnabledCheckbox">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<font size="11" style="1"/>
|
||||
<text value="Enabled"/>
|
||||
</properties>
|
||||
</component>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
<buttonGroups>
|
||||
<group name="buttonGroup1">
|
||||
<member id="e3baf"/>
|
||||
<member id="10e41"/>
|
||||
</group>
|
||||
</buttonGroups>
|
||||
</form>
|
||||
-897
@@ -1,897 +0,0 @@
|
||||
/*
|
||||
* Copyright 2000-2012 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Class BreakpointPropertiesPanel
|
||||
* @author Jeka
|
||||
*/
|
||||
package com.intellij.debugger.ui.breakpoints;
|
||||
|
||||
import com.intellij.debugger.DebuggerManagerEx;
|
||||
import com.intellij.debugger.InstanceFilter;
|
||||
import com.intellij.debugger.engine.evaluation.CodeFragmentKind;
|
||||
import com.intellij.debugger.engine.evaluation.DefaultCodeFragmentFactory;
|
||||
import com.intellij.debugger.engine.evaluation.TextWithImportsImpl;
|
||||
import com.intellij.debugger.settings.DebuggerSettings;
|
||||
import com.intellij.debugger.ui.CompletionEditor;
|
||||
import com.intellij.debugger.ui.DebuggerExpressionComboBox;
|
||||
import com.intellij.debugger.ui.DebuggerStatementEditor;
|
||||
import com.intellij.debugger.ui.JavaDebuggerSupport;
|
||||
import com.intellij.ide.util.ClassFilter;
|
||||
import com.intellij.openapi.editor.event.DocumentEvent;
|
||||
import com.intellij.openapi.editor.event.DocumentListener;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.ui.DialogWrapper;
|
||||
import com.intellij.openapi.ui.FixedSizeButton;
|
||||
import com.intellij.openapi.util.Key;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.openapi.wm.IdeFocusManager;
|
||||
import com.intellij.psi.PsiClass;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.ui.FieldPanel;
|
||||
import com.intellij.ui.MultiLineTooltipUI;
|
||||
import com.intellij.ui.popup.util.DetailView;
|
||||
import com.intellij.util.IJSwingUtilities;
|
||||
import com.intellij.xdebugger.impl.DebuggerSupport;
|
||||
import com.intellij.xdebugger.impl.breakpoints.ui.BreakpointChooser;
|
||||
import com.intellij.xdebugger.impl.breakpoints.ui.BreakpointItem;
|
||||
import com.intellij.xdebugger.impl.breakpoints.ui.BreakpointNoneItem;
|
||||
import com.intellij.xdebugger.impl.ui.DebuggerUIUtil;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
/*
|
||||
* Not used any more, since move to xBreakpoints
|
||||
*/
|
||||
public abstract class BreakpointPropertiesPanel {
|
||||
|
||||
private BreakpointChooser myMasterBreakpointChooser;
|
||||
|
||||
public void setDetailView(DetailView detailView) {
|
||||
myMasterBreakpointChooser.setDetailView(detailView);
|
||||
}
|
||||
|
||||
protected final Project myProject;
|
||||
private final Key<? extends Breakpoint> myBreakpointCategory;
|
||||
private boolean myCompact;
|
||||
private JPanel myPanel;
|
||||
private final DebuggerExpressionComboBox myConditionCombo;
|
||||
private final DebuggerExpressionComboBox myLogExpressionCombo;
|
||||
private JTextField myPassCountField;
|
||||
private final FieldPanel myInstanceFiltersField;
|
||||
|
||||
private final FieldPanel myClassFiltersField;
|
||||
private com.intellij.ui.classFilter.ClassFilter[] myClassFilters;
|
||||
private com.intellij.ui.classFilter.ClassFilter[] myClassExclusionFilters;
|
||||
private InstanceFilter[] myInstanceFilters;
|
||||
|
||||
private JCheckBox myLogExpressionCheckBox;
|
||||
private JCheckBox myLogMessageCheckBox;
|
||||
protected JCheckBox myPassCountCheckbox;
|
||||
private JCheckBox myInstanceFiltersCheckBox;
|
||||
private JCheckBox myClassFiltersCheckBox;
|
||||
|
||||
private JPanel myInstanceFiltersFieldPanel;
|
||||
private JPanel myClassFiltersFieldPanel;
|
||||
private JPanel myConditionComboPanel;
|
||||
private JPanel myLogExpressionComboPanel;
|
||||
private JPanel myDependentBreakpointComboPanel;
|
||||
private JPanel mySpecialBoxPanel;
|
||||
private PsiClass myBreakpointPsiClass;
|
||||
|
||||
private JRadioButton myRbSuspendThread;
|
||||
private JRadioButton myRbSuspendAll;
|
||||
private JCheckBox myCbSuspend;
|
||||
private JButton myMakeDefaultButton;
|
||||
|
||||
private JRadioButton myDisableAgainRadio;
|
||||
private JRadioButton myLeaveEnabledRadioButton;
|
||||
|
||||
private JLabel myEnableOrDisableLabel;
|
||||
private JPanel myDependsOnPanel;
|
||||
private JPanel myInstanceFiltersPanel;
|
||||
private JPanel myClassFiltersPanel;
|
||||
private JPanel myPassCountPanel;
|
||||
private JPanel myConditionsPanel;
|
||||
private JPanel myActionsPanel;
|
||||
private JCheckBox myConditionCheckbox;
|
||||
private JCheckBox myTemporaryCheckBox;
|
||||
private JCheckBox myEnabledCheckbox;
|
||||
|
||||
ButtonGroup mySuspendPolicyGroup;
|
||||
public static final String CONTROL_LOG_MESSAGE = "logMessage";
|
||||
private final FixedSizeButton myConditionMagnifierButton;
|
||||
private boolean myMoreOptionsVisible = true;
|
||||
private Breakpoint myBreakpoint;
|
||||
|
||||
public boolean isMoreOptionsVisible() {
|
||||
return myMoreOptionsVisible;
|
||||
}
|
||||
|
||||
public interface Delegate {
|
||||
|
||||
void showActionsPanel();
|
||||
}
|
||||
private Delegate myDelegate;
|
||||
|
||||
public JComponent getControl(String control) {
|
||||
if(CONTROL_LOG_MESSAGE.equals(control)) {
|
||||
return myLogExpressionCombo;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public void dispose() {
|
||||
if (myConditionCombo != null) {
|
||||
myConditionCombo.dispose();
|
||||
}
|
||||
if (myLogExpressionCombo != null) {
|
||||
myLogExpressionCombo.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
public void setActionsPanelVisible(boolean b) {
|
||||
myActionsPanel.setVisible(b);
|
||||
}
|
||||
|
||||
public void setMoreOptionsVisible(boolean b) {
|
||||
myMoreOptionsVisible = b;
|
||||
myDependsOnPanel.setVisible(b);
|
||||
myConditionsPanel.setVisible(b);
|
||||
if (b) {
|
||||
myActionsPanel.setVisible(true);
|
||||
}
|
||||
if (!b) {
|
||||
myPanel.setPreferredSize(new Dimension(500, -1));
|
||||
}
|
||||
}
|
||||
|
||||
public void setDelegate(Delegate delegate) {
|
||||
myDelegate = delegate;
|
||||
}
|
||||
|
||||
private class MyTextField extends JTextField {
|
||||
public MyTextField() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getToolTipText(MouseEvent event) {
|
||||
reloadClassFilters();
|
||||
updateClassFilterEditor(false);
|
||||
reloadInstanceFilters();
|
||||
updateInstanceFilterEditor(false);
|
||||
String toolTipText = super.getToolTipText(event);
|
||||
return getToolTipText().length() == 0 ? null : toolTipText;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JToolTip createToolTip() {
|
||||
JToolTip toolTip = new JToolTip(){{
|
||||
setUI(new MultiLineTooltipUI());
|
||||
}};
|
||||
toolTip.setComponent(this);
|
||||
return toolTip;
|
||||
}
|
||||
}
|
||||
|
||||
private static void insert(JPanel panel, JComponent component) {
|
||||
panel.setLayout(new BorderLayout());
|
||||
panel.add(component, BorderLayout.CENTER);
|
||||
}
|
||||
|
||||
public BreakpointPropertiesPanel(final Project project, final Key<? extends Breakpoint> breakpointCategory, boolean compact) {
|
||||
myProject = project;
|
||||
myBreakpointCategory = breakpointCategory;
|
||||
myCompact = compact;
|
||||
|
||||
mySuspendPolicyGroup = new ButtonGroup();
|
||||
mySuspendPolicyGroup.add(myRbSuspendAll);
|
||||
mySuspendPolicyGroup.add(myRbSuspendThread);
|
||||
|
||||
updateSuspendPolicyRbFont();
|
||||
final ItemListener suspendPolicyChangeListener = new ItemListener() {
|
||||
@Override
|
||||
public void itemStateChanged(final ItemEvent e) {
|
||||
//final BreakpointDefaults defaults = getBreakpointManager(myProject).getBreakpointDefaults(breakpointCategory);
|
||||
//myMakeDefaultButton.setEnabled(!defaults.getSuspendPolicy().equals(getSelectedSuspendPolicy()) || defaults.isConditionEnabled() != myConditionCheckbox.isSelected());
|
||||
}
|
||||
};
|
||||
|
||||
myCbSuspend.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent event) {
|
||||
final boolean enabled = myCbSuspend.isSelected();
|
||||
myRbSuspendAll.setEnabled(enabled);
|
||||
myRbSuspendThread.setEnabled(enabled);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
myRbSuspendAll.addItemListener(suspendPolicyChangeListener);
|
||||
myRbSuspendThread.addItemListener(suspendPolicyChangeListener);
|
||||
myConditionCheckbox.addItemListener(suspendPolicyChangeListener);
|
||||
|
||||
myMakeDefaultButton.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(final ActionEvent e) {
|
||||
final BreakpointManager breakpointManager = getBreakpointManager(myProject);
|
||||
final String suspendPolicy = getSelectedSuspendPolicy();
|
||||
breakpointManager.setBreakpointDefaults(breakpointCategory, new BreakpointDefaults(suspendPolicy, myConditionCheckbox.isSelected()));
|
||||
updateSuspendPolicyRbFont();
|
||||
if (DebuggerSettings.SUSPEND_THREAD.equals(suspendPolicy)) {
|
||||
myRbSuspendThread.requestFocus();
|
||||
}
|
||||
else {
|
||||
myRbSuspendAll.requestFocus();
|
||||
}
|
||||
myMakeDefaultButton.setEnabled(false);
|
||||
}
|
||||
});
|
||||
|
||||
myConditionCombo = new DebuggerExpressionComboBox(project, "LineBreakpoint condition");
|
||||
myConditionCombo.addDocumentListener(new DocumentListener() {
|
||||
@Override
|
||||
public void beforeDocumentChange(DocumentEvent event) {
|
||||
myConditionCheckbox.setSelected(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void documentChanged(DocumentEvent event) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
myConditionCombo.getEditorComponent().addMouseListener(new MouseAdapter() {
|
||||
@Override
|
||||
public void mouseClicked(MouseEvent event) {
|
||||
myConditionCombo.setEnabled(true);
|
||||
myConditionCheckbox.setSelected(true);
|
||||
}
|
||||
});
|
||||
|
||||
if (myCompact) {
|
||||
myPanel.addFocusListener(new FocusAdapter() {
|
||||
@Override
|
||||
public void focusGained(FocusEvent event) {
|
||||
DebuggerExpressionComboBox focus;
|
||||
if (myLogExpressionCheckBox.isSelected()) {
|
||||
focus = myLogExpressionCombo;
|
||||
} else {
|
||||
focus = myConditionCombo;
|
||||
}
|
||||
IdeFocusManager.findInstance().requestFocus(focus, true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
myLogExpressionCombo = new DebuggerExpressionComboBox(project, "LineBreakpoint logMessage");
|
||||
|
||||
myInstanceFiltersField = new FieldPanel(new MyTextField(), "", null,
|
||||
new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
reloadInstanceFilters();
|
||||
EditInstanceFiltersDialog _dialog = new EditInstanceFiltersDialog(myProject);
|
||||
_dialog.setFilters(myInstanceFilters);
|
||||
_dialog.show();
|
||||
if(_dialog.getExitCode() == DialogWrapper.OK_EXIT_CODE) {
|
||||
myInstanceFilters = _dialog.getFilters();
|
||||
updateInstanceFilterEditor(true);
|
||||
}
|
||||
}
|
||||
},
|
||||
null
|
||||
);
|
||||
|
||||
myClassFiltersField = new FieldPanel(new MyTextField(), "", null,
|
||||
new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
reloadClassFilters();
|
||||
|
||||
ClassFilter classFilter = createClassConditionFilter();
|
||||
|
||||
EditClassFiltersDialog _dialog = new EditClassFiltersDialog(myProject, classFilter);
|
||||
_dialog.setFilters(myClassFilters, myClassExclusionFilters);
|
||||
_dialog.show();
|
||||
if (_dialog.getExitCode() == DialogWrapper.OK_EXIT_CODE) {
|
||||
myClassFilters = _dialog.getFilters();
|
||||
myClassExclusionFilters = _dialog.getExclusionFilters();
|
||||
updateClassFilterEditor(true);
|
||||
}
|
||||
}
|
||||
},
|
||||
null
|
||||
);
|
||||
ToolTipManager.sharedInstance().registerComponent(myClassFiltersField.getTextField());
|
||||
ToolTipManager.sharedInstance().registerComponent(myInstanceFiltersField.getTextField());
|
||||
|
||||
JComponent specialBox = createSpecialBox();
|
||||
if(specialBox != null) {
|
||||
insert(mySpecialBoxPanel, specialBox);
|
||||
}
|
||||
else {
|
||||
mySpecialBoxPanel.setVisible(false);
|
||||
}
|
||||
|
||||
final JPanel conditionPanel = new JPanel(new BorderLayout());
|
||||
conditionPanel.add(myConditionCombo, BorderLayout.CENTER);
|
||||
myConditionMagnifierButton = new FixedSizeButton(myConditionCombo);
|
||||
conditionPanel.add(myConditionMagnifierButton, BorderLayout.EAST);
|
||||
myConditionMagnifierButton.setFocusable(false);
|
||||
myConditionMagnifierButton.addActionListener(new MagnifierButtonAction(project, myConditionCombo, "Condition"));
|
||||
|
||||
insert(myConditionComboPanel, conditionPanel);
|
||||
insert(myLogExpressionComboPanel, myLogExpressionCombo);
|
||||
|
||||
insert(myInstanceFiltersFieldPanel, myInstanceFiltersField);
|
||||
insert(myClassFiltersFieldPanel, myClassFiltersField);
|
||||
|
||||
DebuggerUIUtil.enableEditorOnCheck(myLogExpressionCheckBox, myLogExpressionCombo);
|
||||
ActionListener updateListener = new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
updateCheckboxes();
|
||||
}
|
||||
};
|
||||
|
||||
myPassCountCheckbox.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent event) {
|
||||
if (myPassCountCheckbox.isSelected()) {
|
||||
myConditionCheckbox.setSelected(false);
|
||||
}
|
||||
updateCheckboxes();
|
||||
}
|
||||
});
|
||||
myInstanceFiltersCheckBox.addActionListener(updateListener);
|
||||
myClassFiltersCheckBox.addActionListener(updateListener);
|
||||
myConditionCheckbox.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent event) {
|
||||
if (myConditionCheckbox.isSelected()) {
|
||||
myPassCountCheckbox.setSelected(false);
|
||||
}
|
||||
updateCheckboxes();
|
||||
}
|
||||
});
|
||||
DebuggerUIUtil.focusEditorOnCheck(myPassCountCheckbox, myPassCountField);
|
||||
DebuggerUIUtil.focusEditorOnCheck(myLogExpressionCheckBox, myLogExpressionCombo);
|
||||
DebuggerUIUtil.focusEditorOnCheck(myInstanceFiltersCheckBox, myInstanceFiltersField.getTextField());
|
||||
DebuggerUIUtil.focusEditorOnCheck(myClassFiltersCheckBox, myClassFiltersField.getTextField());
|
||||
DebuggerUIUtil.focusEditorOnCheck(myConditionCheckbox, myConditionCombo);
|
||||
|
||||
IJSwingUtilities.adjustComponentsOnMac(myCbSuspend);
|
||||
IJSwingUtilities.adjustComponentsOnMac(myLogExpressionCheckBox);
|
||||
IJSwingUtilities.adjustComponentsOnMac(myLogMessageCheckBox);
|
||||
IJSwingUtilities.adjustComponentsOnMac(myTemporaryCheckBox);
|
||||
IJSwingUtilities.adjustComponentsOnMac(myEnabledCheckbox);
|
||||
}
|
||||
|
||||
private List<BreakpointItem> getBreakpointItemsExceptMy() {
|
||||
List<BreakpointItem> items = new ArrayList<BreakpointItem>();
|
||||
final DebuggerSupport support = DebuggerSupport.getDebuggerSupport(JavaDebuggerSupport.class);
|
||||
support.getBreakpointPanelProvider().provideBreakpointItems(myProject, items);
|
||||
for (BreakpointItem item : items) {
|
||||
if (item.getBreakpoint() == myBreakpoint) {
|
||||
items.remove(item);
|
||||
break;
|
||||
}
|
||||
}
|
||||
items.add(new BreakpointNoneItem());
|
||||
return items;
|
||||
}
|
||||
|
||||
private void saveMasterBreakpoint() {
|
||||
Breakpoint masterBreakpoint = (Breakpoint)myMasterBreakpointChooser.getSelectedBreakpoint();
|
||||
if (masterBreakpoint == null) {
|
||||
getBreakpointManager(myProject).removeBreakpointRule(myBreakpoint);
|
||||
}
|
||||
else {
|
||||
EnableBreakpointRule rule = findMasterBreakpointRule();
|
||||
boolean selected = myLeaveEnabledRadioButton.isSelected();
|
||||
if (rule != null) {
|
||||
if (rule.getMasterBreakpoint() != masterBreakpoint || rule.isLeaveEnabled() != selected) {
|
||||
getBreakpointManager(myProject).removeBreakpointRule(rule);
|
||||
}
|
||||
else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
getBreakpointManager(myProject).addBreakpointRule(new EnableBreakpointRule(getBreakpointManager(myProject), masterBreakpoint, myBreakpoint, selected));
|
||||
}
|
||||
}
|
||||
|
||||
private String getSelectedSuspendPolicy() {
|
||||
if (myRbSuspendThread.isSelected()) {
|
||||
return DebuggerSettings.SUSPEND_THREAD;
|
||||
}
|
||||
return DebuggerSettings.SUSPEND_ALL;
|
||||
}
|
||||
|
||||
private void updateSuspendPolicyRbFont() {
|
||||
//final String defPolicy = getBreakpointManager(myProject).getBreakpointDefaults(myBreakpointCategory).getSuspendPolicy();
|
||||
|
||||
final Font font = myRbSuspendAll.getFont().deriveFont(Font.PLAIN);
|
||||
final Font boldFont = font.deriveFont(Font.BOLD);
|
||||
|
||||
//myRbSuspendAll.setFont(DebuggerSettings.SUSPEND_ALL.equals(defPolicy)? boldFont : font);
|
||||
//myRbSuspendThread.setFont(DebuggerSettings.SUSPEND_THREAD.equals(defPolicy)? boldFont : font);
|
||||
}
|
||||
|
||||
protected ClassFilter createClassConditionFilter() {
|
||||
ClassFilter classFilter;
|
||||
if(myBreakpointPsiClass != null) {
|
||||
classFilter = new ClassFilter() {
|
||||
@Override
|
||||
public boolean isAccepted(PsiClass aClass) {
|
||||
return myBreakpointPsiClass == aClass || aClass.isInheritor(myBreakpointPsiClass, true);
|
||||
}
|
||||
};
|
||||
}
|
||||
else {
|
||||
classFilter = null;
|
||||
}
|
||||
return classFilter;
|
||||
}
|
||||
|
||||
protected JComponent createSpecialBox() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Init UI components with the values from Breakpoint
|
||||
*/
|
||||
public void initFrom(Breakpoint breakpoint, boolean moreOptionsVisible1) {
|
||||
//myBreakpoint = breakpoint;
|
||||
//boolean moreOptionsVisible = moreOptionsVisible1;
|
||||
//boolean actionsPanelVisible = moreOptionsVisible1;
|
||||
//
|
||||
//initMasterBreakpointPanel();
|
||||
//
|
||||
//if (breakpoint.getCountFilter() > 0) {
|
||||
// myPassCountField.setText(Integer.toString(breakpoint.getCountFilter()));
|
||||
// moreOptionsVisible = true;
|
||||
//}
|
||||
//else {
|
||||
// myPassCountField.setText("");
|
||||
//}
|
||||
//
|
||||
//PsiElement context = breakpoint.getEvaluationElement();
|
||||
//myPassCountCheckbox.setSelected(breakpoint.isCountFilterEnabled());
|
||||
//
|
||||
//myConditionCheckbox.setSelected(breakpoint.isConditionEnabled());
|
||||
//
|
||||
//myConditionCombo.setEnabled(breakpoint.isConditionEnabled());
|
||||
//
|
||||
//myConditionCombo.setContext(context);
|
||||
//myConditionCombo.setText(breakpoint.getCondition() != null ? breakpoint.getCondition() : emptyText());
|
||||
//
|
||||
//myCbSuspend.setSelected(breakpoint.isSuspend());
|
||||
//myRbSuspendThread.setEnabled(myCbSuspend.isSelected());
|
||||
//myRbSuspendAll.setEnabled(myCbSuspend.isSelected());
|
||||
//
|
||||
//if(!breakpoint.isSuspend()) {
|
||||
// actionsPanelVisible = true;
|
||||
//}
|
||||
//if(DebuggerSettings.SUSPEND_THREAD.equals(breakpoint.getSuspendPolicy())){
|
||||
// myRbSuspendThread.setSelected(true);
|
||||
//}
|
||||
//else {
|
||||
// myRbSuspendAll.setSelected(true);
|
||||
//}
|
||||
//
|
||||
//myCbSuspend.addActionListener(new ActionListener() {
|
||||
// @Override
|
||||
// public void actionPerformed(ActionEvent event) {
|
||||
// if (!myActionsPanel.isVisible()) {
|
||||
// if (!myCbSuspend.isSelected()) {
|
||||
// if (myDelegate != null) {
|
||||
// myDelegate.showActionsPanel();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// myRbSuspendThread.setEnabled(myCbSuspend.isSelected());
|
||||
// myRbSuspendAll.setEnabled(myCbSuspend.isSelected());
|
||||
// }
|
||||
//});
|
||||
//myLogMessageCheckBox.setSelected(breakpoint.isLogEnabled());
|
||||
//myTemporaryCheckBox.setSelected(breakpoint.isRemoveAfterHit());
|
||||
//myEnabledCheckbox.setSelected(breakpoint.isEnabled());
|
||||
//myEnabledCheckbox.setText(breakpoint.getShortName() + " enabled");
|
||||
//
|
||||
//DebuggerManagerEx.getInstanceEx(myProject).getBreakpointManager().addBreakpointManagerListener(new BreakpointManagerListener() {
|
||||
// @Override
|
||||
// public void breakpointsChanged() {
|
||||
// myEnabledCheckbox.setSelected(myBreakpoint.isEnabled());
|
||||
// }
|
||||
//});
|
||||
//
|
||||
//myEnabledCheckbox.addActionListener(new ActionListener() {
|
||||
// @Override
|
||||
// public void actionPerformed(ActionEvent event) {
|
||||
// if (myBreakpoint.isEnabled() != myEnabledCheckbox.isSelected()) {
|
||||
// myBreakpoint.setEnabled(myEnabledCheckbox.isSelected());
|
||||
// getBreakpointManager(myProject).fireBreakpointChanged(myBreakpoint);
|
||||
// myBreakpoint.updateUI();
|
||||
// }
|
||||
// }
|
||||
//});
|
||||
//myTemporaryCheckBox.setVisible(breakpoint instanceof LineBreakpoint);
|
||||
//myLogExpressionCheckBox.setSelected(breakpoint.isLogExpressionEnabled());
|
||||
//if (breakpoint.isLogEnabled() ||
|
||||
// breakpoint.isLogExpressionEnabled() || (breakpoint instanceof LineBreakpoint && breakpoint.isRemoveAfterHit())) {
|
||||
// actionsPanelVisible = true;
|
||||
//}
|
||||
//
|
||||
//myLogExpressionCombo.setContext(context);
|
||||
//
|
||||
//if (breakpoint.getLogMessage() != null) {
|
||||
// myLogExpressionCombo.setText(breakpoint.getLogMessage());
|
||||
//}
|
||||
//else {
|
||||
// myLogExpressionCombo.setText(emptyText());
|
||||
//}
|
||||
//
|
||||
//myLogExpressionCombo.setEnabled(breakpoint.isLogExpressionEnabled());
|
||||
//if (breakpoint.isLogExpressionEnabled()) {
|
||||
// actionsPanelVisible = true;
|
||||
//}
|
||||
//
|
||||
//myInstanceFiltersCheckBox.setSelected(breakpoint.isInstanceFiltersEnabled());
|
||||
//myInstanceFiltersField.setEnabled(breakpoint.isInstanceFiltersEnabled());
|
||||
//myInstanceFiltersField.getTextField().setEditable(breakpoint.isInstanceFiltersEnabled());
|
||||
//myInstanceFilters = breakpoint.getInstanceFilters();
|
||||
//updateInstanceFilterEditor(true);
|
||||
//if (breakpoint.isInstanceFiltersEnabled()) {
|
||||
// moreOptionsVisible = true;
|
||||
//}
|
||||
//
|
||||
//myClassFiltersCheckBox.setSelected(breakpoint.isClassFiltersEnabled());
|
||||
//myClassFiltersField.setEnabled(breakpoint.isClassFiltersEnabled());
|
||||
//myClassFiltersField.getTextField().setEditable(breakpoint.isClassFiltersEnabled());
|
||||
//myClassFilters = breakpoint.getClassFilters();
|
||||
//myClassExclusionFilters = breakpoint.getClassExclusionFilters();
|
||||
//updateClassFilterEditor(true);
|
||||
//if (breakpoint.isClassFiltersEnabled()) {
|
||||
// moreOptionsVisible = true;
|
||||
//}
|
||||
//
|
||||
//myBreakpointPsiClass = breakpoint.getPsiClass();
|
||||
//
|
||||
//updateCheckboxes();
|
||||
//
|
||||
//setActionsPanelVisible(actionsPanelVisible && !moreOptionsVisible1);
|
||||
//setMoreOptionsVisible(moreOptionsVisible);
|
||||
}
|
||||
|
||||
private void initMasterBreakpointPanel() {
|
||||
final EnableBreakpointRule rule = findMasterBreakpointRule();
|
||||
|
||||
final Breakpoint baseBreakpoint = rule != null ? rule.getMasterBreakpoint() : null;
|
||||
updateMasterBreakpointPanel(rule);
|
||||
|
||||
|
||||
myMasterBreakpointChooser = new BreakpointChooser(myProject, new BreakpointChooser.Delegate() {
|
||||
@Override
|
||||
public void breakpointChosen(Project project, BreakpointItem item) {
|
||||
final boolean enabled = item != null && item.getBreakpoint() != null;
|
||||
myLeaveEnabledRadioButton.setEnabled(enabled);
|
||||
myDisableAgainRadio.setEnabled(enabled);
|
||||
myEnableOrDisableLabel.setEnabled(enabled);
|
||||
|
||||
if (item != null) {
|
||||
|
||||
saveMasterBreakpoint();
|
||||
}
|
||||
|
||||
updateMasterBreakpointPanel(findMasterBreakpointRule());
|
||||
|
||||
}
|
||||
}, baseBreakpoint, getBreakpointItemsExceptMy());
|
||||
|
||||
insert(myDependentBreakpointComboPanel, myMasterBreakpointChooser.getComponent());
|
||||
|
||||
}
|
||||
|
||||
private @Nullable EnableBreakpointRule findMasterBreakpointRule() {
|
||||
return myBreakpoint != null? getBreakpointManager(myProject).findBreakpointRule(myBreakpoint) : null;
|
||||
}
|
||||
|
||||
private void updateMasterBreakpointPanel(@Nullable EnableBreakpointRule rule) {
|
||||
final boolean leaveEnabled = rule != null && rule.isLeaveEnabled();
|
||||
if (leaveEnabled) {
|
||||
myLeaveEnabledRadioButton.setSelected(true);
|
||||
}
|
||||
else {
|
||||
myDisableAgainRadio.setSelected(true);
|
||||
}
|
||||
}
|
||||
|
||||
private static TextWithImportsImpl emptyText() {
|
||||
return new TextWithImportsImpl(CodeFragmentKind.EXPRESSION, "");
|
||||
}
|
||||
|
||||
/**
|
||||
* Save values in the UI components to the breakpoint object
|
||||
*/
|
||||
public void saveTo(Breakpoint breakpoint) {
|
||||
|
||||
//saveMasterBreakpoint();
|
||||
//try {
|
||||
// String text = myPassCountField.getText().trim();
|
||||
// breakpoint.setCountFilter(!text.isEmpty() ? Integer.parseInt(text) : 0);
|
||||
// if (breakpoint.getCountFilter() < 0) {
|
||||
// breakpoint.setCountFilter(0);
|
||||
// }
|
||||
//}
|
||||
//catch (Exception ignored) {
|
||||
//}
|
||||
//
|
||||
//breakpoint.setCountFilterEnabled(breakpoint.getCountFilter() > 0 && myPassCountCheckbox.isSelected());
|
||||
//breakpoint.setCondition(myConditionCombo.getText().getText());
|
||||
////breakpoint.setConditionEnabled(myConditionCheckbox.isSelected());
|
||||
//breakpoint.setLogMessage(myLogExpressionCombo.getText());
|
||||
//breakpoint.setLogExpressionEnabled(!breakpoint.getLogMessage().isEmpty() && myLogExpressionCheckBox.isSelected());
|
||||
//breakpoint.setLogEnabled(myLogMessageCheckBox.isSelected());
|
||||
//breakpoint.setEnabled(myEnabledCheckbox.isSelected());
|
||||
//breakpoint.setRemoveAfterHit(myTemporaryCheckBox.isSelected());
|
||||
////breakpoint.setSuspend(myCbSuspend.isSelected());
|
||||
//breakpoint.setSuspendPolicy(getSelectedSuspendPolicy());
|
||||
//reloadInstanceFilters();
|
||||
//reloadClassFilters();
|
||||
//updateInstanceFilterEditor(true);
|
||||
//updateClassFilterEditor(true);
|
||||
//
|
||||
//breakpoint.setInstanceFiltersEnabled(myInstanceFiltersField.getText().length() > 0 && myInstanceFiltersCheckBox.isSelected());
|
||||
//breakpoint.setClassFiltersEnabled(myClassFiltersField.getText().length() > 0 && myClassFiltersCheckBox.isSelected());
|
||||
//breakpoint.setClassFilters(myClassFilters);
|
||||
//breakpoint.setClassExclusionFilters(myClassExclusionFilters);
|
||||
//breakpoint.setInstanceFilters(myInstanceFilters);
|
||||
//
|
||||
//myConditionCombo.addRecent(myConditionCombo.getText());
|
||||
//myLogExpressionCombo.addRecent(myLogExpressionCombo.getText());
|
||||
//breakpoint.updateUI();
|
||||
}
|
||||
|
||||
private static String concatWithEx(List<String> s, String concator, int N, String NthConcator) {
|
||||
String result = "";
|
||||
int i = 1;
|
||||
for (Iterator iterator = s.iterator(); iterator.hasNext(); i++) {
|
||||
String str = (String) iterator.next();
|
||||
result += str;
|
||||
if(iterator.hasNext()){
|
||||
if(i % N == 0){
|
||||
result += NthConcator;
|
||||
}
|
||||
else {
|
||||
result += concator;
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private void updateInstanceFilterEditor(boolean updateText) {
|
||||
List<String> filters = new ArrayList<String>();
|
||||
for (InstanceFilter instanceFilter : myInstanceFilters) {
|
||||
if (instanceFilter.isEnabled()) {
|
||||
filters.add(Long.toString(instanceFilter.getId()));
|
||||
}
|
||||
}
|
||||
if (updateText) {
|
||||
myInstanceFiltersField.setText(StringUtil.join(filters, " "));
|
||||
}
|
||||
|
||||
String tipText = concatWithEx(filters, " ", (int)Math.sqrt(myInstanceFilters.length) + 1, "\n");
|
||||
myInstanceFiltersField.getTextField().setToolTipText(tipText);
|
||||
}
|
||||
|
||||
private void reloadInstanceFilters() {
|
||||
String filtersText = myInstanceFiltersField.getText();
|
||||
|
||||
ArrayList<InstanceFilter> idxs = new ArrayList<InstanceFilter>();
|
||||
int startNumber = -1;
|
||||
for(int i = 0; i <= filtersText.length(); i++) {
|
||||
if(i < filtersText.length() && Character.isDigit(filtersText.charAt(i))) {
|
||||
if(startNumber == -1) {
|
||||
startNumber = i;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(startNumber >=0) {
|
||||
idxs.add(InstanceFilter.create(filtersText.substring(startNumber, i)));
|
||||
startNumber = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (InstanceFilter instanceFilter : myInstanceFilters) {
|
||||
if (!instanceFilter.isEnabled()) {
|
||||
idxs.add(instanceFilter);
|
||||
}
|
||||
}
|
||||
myInstanceFilters = idxs.toArray(new InstanceFilter[idxs.size()]);
|
||||
}
|
||||
|
||||
private void updateClassFilterEditor(boolean updateText) {
|
||||
List<String> filters = new ArrayList<String>();
|
||||
for (com.intellij.ui.classFilter.ClassFilter classFilter : myClassFilters) {
|
||||
if (classFilter.isEnabled()) {
|
||||
filters.add(classFilter.getPattern());
|
||||
}
|
||||
}
|
||||
List<String> excludeFilters = new ArrayList<String>();
|
||||
for (com.intellij.ui.classFilter.ClassFilter classFilter : myClassExclusionFilters) {
|
||||
if (classFilter.isEnabled()) {
|
||||
excludeFilters.add("-" + classFilter.getPattern());
|
||||
}
|
||||
}
|
||||
if (updateText) {
|
||||
String editorText = StringUtil.join(filters, " ");
|
||||
if(!filters.isEmpty()) {
|
||||
editorText += " ";
|
||||
}
|
||||
editorText += StringUtil.join(excludeFilters, " ");
|
||||
myClassFiltersField.setText(editorText);
|
||||
}
|
||||
|
||||
int width = (int)Math.sqrt(myClassExclusionFilters.length + myClassFilters.length) + 1;
|
||||
String tipText = concatWithEx(filters, " ", width, "\n");
|
||||
if(!filters.isEmpty()) {
|
||||
tipText += "\n";
|
||||
}
|
||||
tipText += concatWithEx(excludeFilters, " ", width, "\n");
|
||||
myClassFiltersField.getTextField().setToolTipText(tipText);
|
||||
}
|
||||
|
||||
private void reloadClassFilters() {
|
||||
String filtersText = myClassFiltersField.getText();
|
||||
|
||||
ArrayList<com.intellij.ui.classFilter.ClassFilter> classFilters = new ArrayList<com.intellij.ui.classFilter.ClassFilter>();
|
||||
ArrayList<com.intellij.ui.classFilter.ClassFilter> exclusionFilters = new ArrayList<com.intellij.ui.classFilter.ClassFilter>();
|
||||
int startFilter = -1;
|
||||
for(int i = 0; i <= filtersText.length(); i++) {
|
||||
if(i < filtersText.length() && !Character.isWhitespace(filtersText.charAt(i))){
|
||||
if(startFilter == -1) {
|
||||
startFilter = i;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(startFilter >=0) {
|
||||
if(filtersText.charAt(startFilter) == '-') {
|
||||
exclusionFilters.add(new com.intellij.ui.classFilter.ClassFilter(filtersText.substring(startFilter + 1, i)));
|
||||
}
|
||||
else {
|
||||
classFilters.add(new com.intellij.ui.classFilter.ClassFilter(filtersText.substring(startFilter, i)));
|
||||
}
|
||||
startFilter = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (com.intellij.ui.classFilter.ClassFilter classFilter : myClassFilters) {
|
||||
if (!classFilter.isEnabled()) {
|
||||
classFilters.add(classFilter);
|
||||
}
|
||||
}
|
||||
for (com.intellij.ui.classFilter.ClassFilter classFilter : myClassExclusionFilters) {
|
||||
if (!classFilter.isEnabled()) {
|
||||
exclusionFilters.add(classFilter);
|
||||
}
|
||||
}
|
||||
myClassFilters = classFilters .toArray(new com.intellij.ui.classFilter.ClassFilter[classFilters .size()]);
|
||||
myClassExclusionFilters = exclusionFilters.toArray(new com.intellij.ui.classFilter.ClassFilter[exclusionFilters.size()]);
|
||||
}
|
||||
|
||||
public void setEnabled(boolean enabled) {
|
||||
myPanel.setEnabled(enabled);
|
||||
Component[] components = myPanel.getComponents();
|
||||
for (Component component : components) {
|
||||
component.setEnabled(enabled);
|
||||
}
|
||||
}
|
||||
|
||||
protected void updateCheckboxes() {
|
||||
boolean passCountApplicable = true;
|
||||
if (myInstanceFiltersCheckBox.isSelected() || myClassFiltersCheckBox.isSelected()) {
|
||||
passCountApplicable = false;
|
||||
}
|
||||
myPassCountCheckbox.setEnabled(passCountApplicable);
|
||||
|
||||
final boolean passCountSelected = myPassCountCheckbox.isSelected();
|
||||
myInstanceFiltersCheckBox.setEnabled(!passCountSelected);
|
||||
myClassFiltersCheckBox.setEnabled(!passCountSelected);
|
||||
|
||||
myPassCountField.setEditable(myPassCountCheckbox.isSelected());
|
||||
myPassCountField.setEnabled (myPassCountCheckbox.isSelected());
|
||||
|
||||
myConditionCombo.setEnabled(myConditionCheckbox.isSelected());
|
||||
myConditionMagnifierButton.setEnabled(myConditionCheckbox.isSelected());
|
||||
|
||||
myInstanceFiltersField.setEnabled(myInstanceFiltersCheckBox.isSelected());
|
||||
myInstanceFiltersField.getTextField().setEditable(myInstanceFiltersCheckBox.isSelected());
|
||||
|
||||
myClassFiltersField.setEnabled(myClassFiltersCheckBox.isSelected());
|
||||
myClassFiltersField.getTextField().setEditable(myClassFiltersCheckBox.isSelected());
|
||||
}
|
||||
|
||||
public JPanel getPanel() {
|
||||
return myPanel;
|
||||
}
|
||||
|
||||
private static BreakpointManager getBreakpointManager(Project project) {
|
||||
return DebuggerManagerEx.getInstanceEx(project).getBreakpointManager();
|
||||
}
|
||||
|
||||
private static class MagnifierButtonAction implements ActionListener {
|
||||
private final Project myProject;
|
||||
private final CompletionEditor myTargetEditor;
|
||||
private final String myDialogTitle;
|
||||
private DebuggerStatementEditor myEditor;
|
||||
|
||||
private MagnifierButtonAction(final Project project, final CompletionEditor targetEditor, final String dialogTitle) {
|
||||
myProject = project;
|
||||
myTargetEditor = targetEditor;
|
||||
myDialogTitle = dialogTitle;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void actionPerformed(final ActionEvent e) {
|
||||
new DialogWrapper(myTargetEditor, true){
|
||||
@Override
|
||||
public void show() {
|
||||
setTitle(myDialogTitle);
|
||||
setModal(true);
|
||||
init();
|
||||
super.show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public JComponent getPreferredFocusedComponent() {
|
||||
return myEditor;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
protected JComponent createCenterPanel() {
|
||||
final JPanel panel = new JPanel(new BorderLayout());
|
||||
myEditor = new DebuggerStatementEditor(myProject, myTargetEditor.getContext(), myTargetEditor.getRecentsId(), DefaultCodeFragmentFactory.getInstance());
|
||||
myEditor.setPreferredSize(new Dimension(400, 150));
|
||||
myEditor.setText(myTargetEditor.getText());
|
||||
panel.add(myEditor, BorderLayout.CENTER);
|
||||
return panel;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dispose() {
|
||||
super.dispose();
|
||||
myEditor.dispose();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doOKAction() {
|
||||
myTargetEditor.setText(myEditor.getText());
|
||||
super.doOKAction();
|
||||
}
|
||||
}.show();
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
-241
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2013 JetBrains s.r.o.
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -28,12 +28,6 @@ import com.intellij.debugger.settings.DebuggerSettings;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.editor.Document;
|
||||
import com.intellij.openapi.editor.colors.EditorColorsManager;
|
||||
import com.intellij.openapi.editor.colors.EditorColorsScheme;
|
||||
import com.intellij.openapi.editor.ex.MarkupModelEx;
|
||||
import com.intellij.openapi.editor.impl.DocumentMarkupModel;
|
||||
import com.intellij.openapi.editor.markup.RangeHighlighter;
|
||||
import com.intellij.openapi.editor.markup.TextAttributes;
|
||||
import com.intellij.openapi.fileEditor.FileDocumentManager;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.Computable;
|
||||
@@ -52,7 +46,6 @@ import com.intellij.xdebugger.XSourcePosition;
|
||||
import com.intellij.xdebugger.breakpoints.XBreakpoint;
|
||||
import com.intellij.xdebugger.breakpoints.XBreakpointManager;
|
||||
import com.intellij.xdebugger.breakpoints.XLineBreakpoint;
|
||||
import com.intellij.xdebugger.ui.DebuggerColors;
|
||||
import com.intellij.xml.util.XmlStringUtil;
|
||||
import com.sun.jdi.ReferenceType;
|
||||
import org.jdom.Element;
|
||||
@@ -385,20 +378,6 @@ public abstract class BreakpointWithHighlighter<P extends JavaBreakpointProperti
|
||||
final XBreakpointManager breakpointManager = XDebuggerManager.getInstance(myProject).getBreakpointManager();
|
||||
breakpointManager.updateBreakpointPresentation((XLineBreakpoint)myXBreakpoint, getIcon(), null);
|
||||
}
|
||||
//RangeHighlighter highlighter = myHighlighter;
|
||||
//if (highlighter != null && highlighter.isValid() && isValid()) {
|
||||
// AppUIUtil.invokeLaterIfProjectAlive(myProject, new Runnable() {
|
||||
// @Override
|
||||
// public void run() {
|
||||
// if (isValid()) {
|
||||
// setupGutterRenderer(myHighlighter);
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
//}
|
||||
//else {
|
||||
// DebuggerManagerEx.getInstanceEx(myProject).getBreakpointManager().removeBreakpoint(this);
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -428,67 +407,9 @@ public abstract class BreakpointWithHighlighter<P extends JavaBreakpointProperti
|
||||
});
|
||||
}
|
||||
|
||||
//private void setupGutterRenderer(@NotNull RangeHighlighter highlighter) {
|
||||
// highlighter.setGutterIconRenderer(new MyGutterIconRenderer(getIcon(), getDescription()));
|
||||
//}
|
||||
|
||||
@Override
|
||||
public abstract Key<? extends BreakpointWithHighlighter> getCategory();
|
||||
|
||||
//public boolean canMoveTo(@Nullable final SourcePosition position) {
|
||||
// if (position == null || !position.getFile().isValid()) {
|
||||
// return false;
|
||||
// }
|
||||
// final PsiFile psiFile = position.getFile();
|
||||
// final Document document = PsiDocumentManager.getInstance(getProject()).getDocument(psiFile);
|
||||
// if (document == null) {
|
||||
// return false;
|
||||
// }
|
||||
// final int spOffset = position.getOffset();
|
||||
// if (spOffset < 0) {
|
||||
// return false;
|
||||
// }
|
||||
// final BreakpointManager breakpointManager = DebuggerManagerEx.getInstanceEx(getProject()).getBreakpointManager();
|
||||
// return breakpointManager.findBreakpoint(document, spOffset, getCategory()) == null;
|
||||
//}
|
||||
|
||||
//public boolean moveTo(@NotNull SourcePosition position) {
|
||||
// if (!canMoveTo(position)) {
|
||||
// return false;
|
||||
// }
|
||||
// final PsiFile psiFile = position.getFile();
|
||||
// final PsiFile oldFile = getSourcePosition().getFile();
|
||||
// final Document document = PsiDocumentManager.getInstance(getProject()).getDocument(psiFile);
|
||||
// final Document oldDocument = PsiDocumentManager.getInstance(getProject()).getDocument(oldFile);
|
||||
// if (document == null || oldDocument == null) {
|
||||
// return false;
|
||||
// }
|
||||
// final RangeHighlighter newHighlighter = createHighlighter(myProject, document, position.getLine());
|
||||
// if (newHighlighter == null) {
|
||||
// return false;
|
||||
// }
|
||||
// final RangeHighlighter oldHighlighter = myHighlighter;
|
||||
// myHighlighter = newHighlighter;
|
||||
//
|
||||
// reload();
|
||||
//
|
||||
// if (!isValid()) {
|
||||
// myHighlighter.dispose();
|
||||
// myHighlighter = oldHighlighter;
|
||||
// reload();
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// if (oldHighlighter != null) {
|
||||
// oldHighlighter.dispose();
|
||||
// }
|
||||
//
|
||||
// DebuggerManagerEx.getInstanceEx(getProject()).getBreakpointManager().fireBreakpointChanged(this);
|
||||
// updateUI();
|
||||
//
|
||||
// return true;
|
||||
//}
|
||||
|
||||
public boolean isVisible() {
|
||||
return myVisible;
|
||||
}
|
||||
@@ -516,25 +437,6 @@ public abstract class BreakpointWithHighlighter<P extends JavaBreakpointProperti
|
||||
return sourcePosition != null ? sourcePosition.getFile().getName() : "";
|
||||
}
|
||||
|
||||
@Nullable
|
||||
protected static RangeHighlighter createHighlighter(@NotNull Project project, @NotNull Document document, int lineIndex) {
|
||||
if (lineIndex < 0 || lineIndex >= document.getLineCount()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
EditorColorsScheme scheme = EditorColorsManager.getInstance().getGlobalScheme();
|
||||
TextAttributes attributes = scheme.getAttributes(DebuggerColors.BREAKPOINT_ATTRIBUTES);
|
||||
|
||||
RangeHighlighter highlighter = ((MarkupModelEx)DocumentMarkupModel.forDocument(document, project, true))
|
||||
.addPersistentLineHighlighter(lineIndex, DebuggerColors.BREAKPOINT_HIGHLIGHTER_LAYER, attributes);
|
||||
if (highlighter == null || !highlighter.isValid()) {
|
||||
return null;
|
||||
}
|
||||
highlighter.putUserData(DebuggerColors.BREAKPOINT_HIGHLIGHTER_KEY, Boolean.TRUE);
|
||||
highlighter.setErrorStripeTooltip(DebuggerBundle.message("breakpoint.tooltip.text", lineIndex + 1));
|
||||
return highlighter;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readExternal(@NotNull Element breakpointNode) throws InvalidDataException {
|
||||
super.readExternal(breakpointNode);
|
||||
@@ -552,147 +454,5 @@ public abstract class BreakpointWithHighlighter<P extends JavaBreakpointProperti
|
||||
if (packageName != null) {
|
||||
myPackageName = packageName;
|
||||
}
|
||||
|
||||
//VirtualFile vFile = VirtualFileManager.getInstance().findFileByUrl(url);
|
||||
//if (vFile == null) {
|
||||
// throw new InvalidDataException(DebuggerBundle.message("error.breakpoint.file.not.found", url));
|
||||
//}
|
||||
//final Document doc = FileDocumentManager.getInstance().getDocument(vFile);
|
||||
//if (doc == null) {
|
||||
// throw new InvalidDataException(DebuggerBundle.message("error.cannot.load.breakpoint.file", url));
|
||||
//}
|
||||
//
|
||||
//// line number
|
||||
//final int line;
|
||||
//try {
|
||||
// //noinspection HardCodedStringLiteral
|
||||
// line = Integer.parseInt(breakpointNode.getAttributeValue("line"));
|
||||
//}
|
||||
//catch (Exception e) {
|
||||
// throw new InvalidDataException("Line number is invalid for breakpoint");
|
||||
//}
|
||||
//if (line < 0) {
|
||||
// throw new InvalidDataException("Line number is invalid for breakpoint");
|
||||
//}
|
||||
//
|
||||
//RangeHighlighter highlighter = createHighlighter(myProject, doc, line);
|
||||
//
|
||||
//if (highlighter == null) {
|
||||
// throw new InvalidDataException("");
|
||||
//}
|
||||
//
|
||||
//myHighlighter = highlighter;
|
||||
//reload();
|
||||
}
|
||||
//
|
||||
//@Override
|
||||
//@SuppressWarnings({"HardCodedStringLiteral"})
|
||||
//public void writeExternal(@NotNull Element parentNode) throws WriteExternalException {
|
||||
// super.writeExternal(parentNode);
|
||||
// PsiFile psiFile = getSourcePosition().getFile();
|
||||
// final VirtualFile virtualFile = psiFile.getVirtualFile();
|
||||
// final String url = virtualFile != null ? virtualFile.getUrl() : "";
|
||||
// parentNode.setAttribute("url", url);
|
||||
// parentNode.setAttribute("line", Integer.toString(getSourcePosition().getLine()));
|
||||
// if (myClassName != null) {
|
||||
// parentNode.setAttribute("class", myClassName);
|
||||
// }
|
||||
// if (myPackageName != null) {
|
||||
// parentNode.setAttribute("package", myPackageName);
|
||||
// }
|
||||
//}
|
||||
|
||||
//private class MyGutterIconRenderer extends GutterIconRenderer {
|
||||
// private final Icon myIcon;
|
||||
// private final String myDescription;
|
||||
//
|
||||
// public MyGutterIconRenderer(@NotNull Icon icon, @NotNull String description) {
|
||||
// myIcon = icon;
|
||||
// myDescription = description;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// @NotNull
|
||||
// public Icon getIcon() {
|
||||
// return myIcon;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String getTooltipText() {
|
||||
// return myDescription;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public Alignment getAlignment() {
|
||||
// return Alignment.RIGHT;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public AnAction getClickAction() {
|
||||
// return new AnAction() {
|
||||
// @Override
|
||||
// public void actionPerformed(AnActionEvent e) {
|
||||
// DebuggerManagerEx.getInstanceEx(myProject).getBreakpointManager().removeBreakpoint(BreakpointWithHighlighter.this);
|
||||
// }
|
||||
// };
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public AnAction getMiddleButtonClickAction() {
|
||||
// return new AnAction() {
|
||||
// @Override
|
||||
// public void actionPerformed(AnActionEvent e) {
|
||||
// setEnabled(!isEnabled());
|
||||
// DebuggerManagerEx.getInstanceEx(getProject()).getBreakpointManager().fireBreakpointChanged(BreakpointWithHighlighter.this);
|
||||
// updateUI();
|
||||
// }
|
||||
// };
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public ActionGroup getPopupMenuActions() {
|
||||
// return null;
|
||||
// }
|
||||
//
|
||||
// @Nullable
|
||||
// @Override
|
||||
// public AnAction getRightButtonClickAction() {
|
||||
// return new EditBreakpointAction.ContextAction(this, BreakpointWithHighlighter.this, DebuggerSupport.getDebuggerSupport(JavaDebuggerSupport.class));
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public GutterDraggableObject getDraggableObject() {
|
||||
// return new GutterDraggableObject() {
|
||||
// @Override
|
||||
// public boolean copy(int line, @NotNull VirtualFile file) {
|
||||
// final PsiFile psiFile = PsiManager.getInstance(getProject()).findFile(file);
|
||||
// return psiFile != null && moveTo(SourcePosition.createFromLine(psiFile, line));
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public Cursor getCursor(int line) {
|
||||
// final SourcePosition newPosition = SourcePosition.createFromLine(getSourcePosition().getFile(), line);
|
||||
// return canMoveTo(newPosition) ? DragSource.DefaultMoveDrop : DragSource.DefaultMoveNoDrop;
|
||||
// }
|
||||
// };
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean equals(@NotNull Object obj) {
|
||||
// return obj instanceof MyGutterIconRenderer &&
|
||||
// Comparing.equal(getTooltipText(), ((MyGutterIconRenderer)obj).getTooltipText()) &&
|
||||
// Comparing.equal(getIcon(), ((MyGutterIconRenderer)obj).getIcon());
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public int hashCode() {
|
||||
// return getIcon().hashCode();
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String toString() {
|
||||
// return "LB " + getDisplayName();
|
||||
// }
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.intellij.debugger.ui.breakpoints;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* @author Eugene Zhuravlev
|
||||
* Date: May 10, 2005
|
||||
*/
|
||||
public class EnableBreakpointRule {
|
||||
private final BreakpointManager myManager;
|
||||
private final boolean myLeaveEnabled;
|
||||
private final Breakpoint myMasterBreakpoint;
|
||||
private final Breakpoint mySlaveBreakpoint;
|
||||
|
||||
public EnableBreakpointRule(@NotNull BreakpointManager manager, @NotNull Breakpoint masterBreakpoint, @NotNull Breakpoint slaveBreakpoint) {
|
||||
this(manager,masterBreakpoint, slaveBreakpoint, false);
|
||||
}
|
||||
|
||||
public EnableBreakpointRule(@NotNull BreakpointManager manager, @NotNull Breakpoint masterBreakpoint, @NotNull Breakpoint slaveBreakpoint, boolean leaveEnabled) {
|
||||
myMasterBreakpoint = masterBreakpoint;
|
||||
mySlaveBreakpoint = slaveBreakpoint;
|
||||
myManager = manager;
|
||||
myLeaveEnabled = leaveEnabled;
|
||||
}
|
||||
|
||||
public Breakpoint getMasterBreakpoint() {
|
||||
return myMasterBreakpoint;
|
||||
}
|
||||
|
||||
public Breakpoint getSlaveBreakpoint() {
|
||||
return mySlaveBreakpoint;
|
||||
}
|
||||
|
||||
public boolean isLeaveEnabled() {
|
||||
return myLeaveEnabled;
|
||||
}
|
||||
|
||||
public void init() {
|
||||
myManager.setBreakpointEnabled(getSlaveBreakpoint(), false);
|
||||
}
|
||||
|
||||
public void dispose() {
|
||||
myManager.setBreakpointEnabled(getSlaveBreakpoint(), true);
|
||||
}
|
||||
|
||||
public void processBreakpointHit(Breakpoint breakpointHit) {
|
||||
if (getMasterBreakpoint().equals(breakpointHit)) {
|
||||
myManager.setBreakpointEnabled(getSlaveBreakpoint(), true);
|
||||
}
|
||||
else if (getSlaveBreakpoint().equals(breakpointHit)){
|
||||
if (!myLeaveEnabled) {
|
||||
myManager.setBreakpointEnabled(getSlaveBreakpoint(), false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user