Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSarika Sinha2016-09-14 06:46:30 +0000
committerSarika Sinha2016-09-14 09:04:04 +0000
commit6b690a51433a052d1a94664fe75b2032a4fafd85 (patch)
tree5c1507df7101e894126db6ca6352a7445bda5a8a
parent9039749a16f8ef730eb3c05d5499cd962296f4e7 (diff)
downloadeclipse.platform.debug-6b690a51433a052d1a94664fe75b2032a4fafd85.tar.gz
eclipse.platform.debug-6b690a51433a052d1a94664fe75b2032a4fafd85.tar.xz
eclipse.platform.debug-6b690a51433a052d1a94664fe75b2032a4fafd85.zip
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/IBreakpointManager.java6
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/model/Breakpoint.java41
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/model/IBreakpoint.java27
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/BreakpointManager.java24
4 files changed, 15 insertions, 83 deletions
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/IBreakpointManager.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/IBreakpointManager.java
index e232732e7..d4ea08698 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/IBreakpointManager.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/core/IBreakpointManager.java
@@ -334,11 +334,12 @@ public interface IBreakpointManager {
/**
* Revisit all the trigger points to activate/deactivate trigger points.
*
- * @param triggerointList list of trigger points to be deactivated or
+ * @param triggerpoints list of trigger points to be deactivated or
* <code>null<code> to deactivate all trigger points
+ * @param enable enable if <code>true</code> or disable if <code>false</code>
* @since 3.11
*/
- public default void deActivateTriggerpoints(IBreakpoint[] triggerointList) {
+ public default void enableTriggerpoints(IBreakpoint[] triggerpoints, boolean enable) {
}
/**
@@ -347,7 +348,6 @@ public interface IBreakpointManager {
* @since 3.11
*/
public default void refreshTriggerpointDisplay() {
-
}
}
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/Breakpoint.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/model/Breakpoint.java
index aee0df9e5..0d2322066 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/Breakpoint.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/core/model/Breakpoint.java
@@ -55,17 +55,6 @@ public abstract class Breakpoint extends PlatformObject implements IBreakpoint {
private static final String TRIGGEREPOINT = "org.eclipse.debug.core.triggerpoint"; //$NON-NLS-1$
/**
- * Persisted breakpoint marker attribute (value
- * <code>"org.eclipse.debug.core.triggerpointactive"</code>). The attribute
- * is a <code>boolean</code> corresponding to whether the trigger breakpoint
- * is active or not.
- *
- * @see org.eclipse.core.resources.IMarker#getAttribute(String, boolean)
- * @since 3.11
- */
- private static final String TRIGGEREPOINTACTIVE = "org.eclipse.debug.core.triggerpointactive"; //$NON-NLS-1$
-
- /**
* Creates a breakpoint.
*
* @since 3.8
@@ -115,6 +104,9 @@ public abstract class Breakpoint extends PlatformObject implements IBreakpoint {
public void setEnabled(boolean enabled) throws CoreException {
if (enabled != isEnabled()) {
setAttribute(ENABLED, enabled);
+ if (isTriggerPoint()) {
+ DebugPlugin.getDefault().getBreakpointManager().refreshTriggerpointDisplay();
+ }
}
}
@@ -214,26 +206,6 @@ public abstract class Breakpoint extends PlatformObject implements IBreakpoint {
}
/**
- * @see IBreakpoint#isTriggerPointActive()
- * @since 3.11
- */
- @Override
- public boolean isTriggerPointActive() throws CoreException {
- return getMarker().getAttribute(TRIGGEREPOINTACTIVE, false);
- }
-
- /**
- * @see IBreakpoint#setTriggerPointActive(boolean)
- * @since 3.11
- */
- @Override
- public void setTriggerPointActive(boolean triggerPointActive) throws CoreException {
- if (isTriggerPointActive() != triggerPointActive) {
- setAttribute(TRIGGEREPOINTACTIVE, triggerPointActive);
- }
- }
-
- /**
* Convenience method to set the given boolean attribute of this
* breakpoint's underlying marker in a workspace runnable. Setting marker
* attributes in a workspace runnable prevents deadlock.
@@ -429,11 +401,4 @@ public abstract class Breakpoint extends PlatformObject implements IBreakpoint {
}
}
- /**
- * @since 3.11
- */
- protected static String getTriggerActivePropertyString() {
- return TRIGGEREPOINTACTIVE;
- }
-
}
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/IBreakpoint.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/model/IBreakpoint.java
index c59601c0f..cb3523eff 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/IBreakpoint.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/core/model/IBreakpoint.java
@@ -244,33 +244,6 @@ public interface IBreakpoint extends IAdaptable {
public default void setTriggerPoint(boolean trigger) throws CoreException {
}
- /**
- * Sets if the breakpoint is a trigger point and is active. If trigger point
- * is active <code>TRIGGERPOINTACTIVE</code> attribute on this breakpoint's
- * marker is set to <code>true</code>.
- *
- * @param active whether this breakpoint is to be treated as trigger point
- * for the workspace
- * @exception CoreException if unable to set the associated attribute on
- * this breakpoint's underlying marker.
- * @since 3.11
- */
- public default void setTriggerPointActive(boolean active) throws CoreException {
- }
-
- /**
- * Returns whether this breakpoint is a trigger point and is active.
- *
- * @return whether this breakpoint is a trigger point and it is active
- * @exception CoreException if unable to access the associated attribute on
- * this breakpoint's underlying marker
- * @since 3.11
- */
- public default boolean isTriggerPointActive() throws CoreException {
- return false;
- }
-
-
}
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/BreakpointManager.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/BreakpointManager.java
index e073dfc00..94c8fd678 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/BreakpointManager.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/BreakpointManager.java
@@ -1403,7 +1403,6 @@ public class BreakpointManager implements IBreakpointManager, IResourceChangeLis
IBreakpoint[] triggerPointBreakpointList = fTriggerPointBreakpointList.toArray(new IBreakpoint[0]);
for (IBreakpoint iBreakpoint : triggerPointBreakpointList) {
iBreakpoint.setTriggerPoint(false);
- iBreakpoint.setTriggerPointActive(false);
}
refreshTriggerpointDisplay();
}
@@ -1415,7 +1414,7 @@ public class BreakpointManager implements IBreakpointManager, IResourceChangeLis
}
for (IBreakpoint iBreakpoint : fTriggerPointBreakpointList) {
try {
- if (iBreakpoint.isTriggerPointActive()) {
+ if (iBreakpoint.isEnabled()) {
return false;
}
} catch (CoreException e) {
@@ -1425,27 +1424,22 @@ public class BreakpointManager implements IBreakpointManager, IResourceChangeLis
return true;
}
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.debug.core.IBreakpointManager#revisitTriggerpoints()
- * This version of implementation deactivate all the active trigger points
- */
@Override
- public void deActivateTriggerpoints(IBreakpoint[] triggerointList) {
- if (triggerointList == null) {
- triggerointList = fTriggerPointBreakpointList.toArray(new IBreakpoint[0]);
+ public void enableTriggerpoints(IBreakpoint[] triggerpoints, boolean enable) {
+ IBreakpoint[] triggerpointList = triggerpoints;
+ if (triggerpoints == null) {
+ triggerpointList = fTriggerPointBreakpointList.toArray(new IBreakpoint[0]);
}
- for (IBreakpoint iBreakpoint : triggerointList) {
+ for (IBreakpoint iBreakpoint : triggerpointList) {
try {
- if (iBreakpoint.isTriggerPointActive()) {
- iBreakpoint.setTriggerPointActive(false);
+ IMarker m = iBreakpoint.getMarker();
+ if (m != null && m.exists()) {
+ iBreakpoint.setEnabled(enable);
}
} catch (CoreException e) {
e.printStackTrace();
}
}
- refreshTriggerpointDisplay();
}
@Override

Back to the top