001: /*******************************************************************************
002: * Copyright (c) 2000, 2005 IBM Corporation and others.
003: * All rights reserved. This program and the accompanying materials
004: * are made available under the terms of the Eclipse Public License v1.0
005: * which accompanies this distribution, and is available at
006: * http://www.eclipse.org/legal/epl-v10.html
007: *
008: * Contributors:
009: * IBM Corporation - initial API and implementation
010: *******************************************************************************/package org.eclipse.jdt.debug.core;
011:
012: import org.eclipse.core.runtime.CoreException;
013: import org.eclipse.debug.core.model.ILineBreakpoint;
014:
015: /**
016: * A breakpoint that suspends execution when a particular line of code
017: * is reached.
018: * <p>
019: * Clients are not intended to implement this interface
020: * </p>
021: * @since 2.0
022: */
023: public interface IJavaLineBreakpoint extends IJavaBreakpoint,
024: ILineBreakpoint {
025:
026: /**
027: * Returns whether this breakpoint supports a conditional
028: * expression. Conditional breakpoints only suspend when
029: * their associated condition evaluates to <code>true</code>.
030: *
031: * @return whether this breakpoint supports a condition
032: */
033: public boolean supportsCondition();
034:
035: /**
036: * Returns the conditional expression associated with this breakpoint,
037: * or <code>null</code> if this breakpoint does not have a condition.
038: *
039: * @return this breakpoint's conditional expression, or <code>null</code>
040: * @exception CoreException if unable to access the property on
041: * this breakpoint's underlying marker
042: */
043: public String getCondition() throws CoreException;
044:
045: /**
046: * Sets the condition associated with this breakpoint.
047: * When the condition is enabled, this breakpoint will only suspend execution
048: * when the given condition evaluates to <code>true</code>.
049: * Setting the condition to <code>null</code> or an empty string removes
050: * the condition.
051: * <p>
052: * If this breakpoint does not support conditions, setting the condition has
053: * no effect.
054: * </p>
055: * @param condition conditional expression
056: * @exception CoreException if unable to set the property on
057: * this breakpoint's underlying marker
058: */
059: public void setCondition(String condition) throws CoreException;
060:
061: /**
062: * Returns whether the condition on this breakpoint is enabled.
063: *
064: * @return whether this breakpoint's condition is enabled
065: * @exception CoreException if unable to access the property on
066: * this breakpoint's underlying marker
067: */
068: public boolean isConditionEnabled() throws CoreException;
069:
070: /**
071: * Sets the enabled state of this breakpoint's condition to the given
072: * state. When enabled, this breakpoint will only suspend when its
073: * condition evaluates to true. When disabled, this breakpoint will suspend
074: * as it would with no condition defined.
075: *
076: * @exception CoreException if unable to set the property on
077: * this breakpoint's underlying marker
078: */
079: public void setConditionEnabled(boolean enabled)
080: throws CoreException;
081:
082: /**
083: * Returns whether the breakpoint suspends when the value of the condition
084: * is <code>true</code> or when the value of the condition changes.
085: *
086: * @return <code>true</code> if this breakpoint suspends when the value of
087: * the condition is <code>true</code>, <code>false</code> if this breakpoint
088: * suspends when the value of the condition changes.
089: * @exception CoreException if unable to access the property on
090: * this breakpoint's underlying marker
091: * @since 2.1
092: */
093: public boolean isConditionSuspendOnTrue() throws CoreException;
094:
095: /**
096: * Set the suspend state of this breakpoint's condition. If the value is
097: * <code>true</code>, the breakpoint will stop when the value of the
098: * condition is <code>true</code>. If the value is <code>false</code>, the
099: * breakpoint will stop when the value of the condition changes.
100: *
101: * @exception CoreException if unable to access the property on this
102: * breakpoint's underlying marker
103: * @since 2.1
104: */
105: public void setConditionSuspendOnTrue(boolean suspendOnTrue)
106: throws CoreException;
107:
108: }
|