diff -r 5329b63a56e5 api.debugger/apichanges.xml --- a/api.debugger/apichanges.xml Fri Jan 15 13:54:43 2010 +0100 +++ b/api.debugger/apichanges.xml Thu Jan 21 18:50:47 2010 +0100 @@ -364,6 +364,24 @@ + + + Breakpoints group properties. + + + + + +

+ Add Breakpoint.getGroupProperties() method, that returns an implementation + of GroupProperties class with the relevant grouping information + used by BreakpointsWindow to create hierarchy of breakpoint groups +

+
+ + +
+ diff -r 5329b63a56e5 api.debugger/manifest.mf --- a/api.debugger/manifest.mf Fri Jan 15 13:54:43 2010 +0100 +++ b/api.debugger/manifest.mf Thu Jan 21 18:50:47 2010 +0100 @@ -1,5 +1,5 @@ Manifest-Version: 1.0 OpenIDE-Module: org.netbeans.api.debugger/1 OpenIDE-Module-Localizing-Bundle: org/netbeans/api/debugger/Bundle.properties -OpenIDE-Module-Specification-Version: 1.22 +OpenIDE-Module-Specification-Version: 1.23 OpenIDE-Module-Layer: org/netbeans/api/debugger/layer.xml diff -r 5329b63a56e5 api.debugger/nbproject/project.xml --- a/api.debugger/nbproject/project.xml Fri Jan 15 13:54:43 2010 +0100 +++ b/api.debugger/nbproject/project.xml Thu Jan 21 18:50:47 2010 +0100 @@ -47,6 +47,15 @@ org.netbeans.api.debugger + org.netbeans.modules.projectapi + + + + 1 + 1.28 + + + org.openide.filesystems diff -r 5329b63a56e5 api.debugger/src/org/netbeans/api/debugger/Breakpoint.java --- a/api.debugger/src/org/netbeans/api/debugger/Breakpoint.java Fri Jan 15 13:54:43 2010 +0100 +++ b/api.debugger/src/org/netbeans/api/debugger/Breakpoint.java Thu Jan 21 18:50:47 2010 +0100 @@ -43,6 +43,8 @@ import java.beans.PropertyChangeListener; import java.beans.PropertyChangeSupport; +import org.netbeans.api.project.Project; +import org.openide.filesystems.FileObject; /** * Abstract definition of breakpoint. @@ -58,6 +60,9 @@ public static final String PROP_DISPOSED = "disposed"; // NOI18N /** Property name for name of group of the breakpoint. */ public static final String PROP_GROUP_NAME = "groupName"; // NOI18N + /** Property name for other group properties of the breakpoint. + * @since 1.23 */ + public static final String PROP_GROUP_PROPERTIES = "groupProperties"; // NOI18N /** Property name for breakpoint validity */ public static final String PROP_VALIDITY = "validity"; // NOI18N /** Property name constant. */ @@ -187,16 +192,39 @@ } firePropertyChange(PROP_HIT_COUNT_FILTER, old, newProp); } - + + /** + * Get the name of a user-created group for this breakpoint. + */ public String getGroupName () { return groupName; } + /** + * Set the name of a user-created group for this breakpoint. + */ public void setGroupName (String newGroupName) { if (groupName.equals (newGroupName)) return; String old = groupName; groupName = newGroupName.intern(); firePropertyChange (PROP_GROUP_NAME, old, newGroupName); + } + + /** + * Get group properties of the breakpoint. + * These are implementation-defined group properties as oposed to {@link #getGroupName()}, + * which returns user-defined group name. + *

+ * These properties are used by the Breakpoint Window to show a tree + * hierarchy of groups and associated breakpoints. + * Implementation should fire {@link #PROP_GROUP_PROPERTIES} event when + * the group properties change. + * @return {@link GroupProperties} or null when no group properties + * are defined. + * @since 1.23 + */ + public GroupProperties getGroupProperties() { + return null; } /** @@ -263,4 +291,49 @@ dispose (); firePropertyChange (PROP_DISPOSED, Boolean.FALSE, Boolean.TRUE); } + + /** + * Group properties of breakpoint. + * These are used by the Breakpoint Window to show a tree hierarchy of + * groups and associated breakpoints. + * @since 1.23 + */ + public static abstract class GroupProperties { + + /** + * Get the language of the source file with the breakpoint. + * @return The human-readable language of the breakpoint source file or null + * when this does not apply. + * @see org.netbeans.spi.debugger.ui.BreakpointType.getCategoryDisplayName() + */ + public abstract String getLanguage(); + + /** + * Get the breakpoint type. + * @return The human-readable type of the breakpoint or null + * when this does not apply. + * @see org.netbeans.spi.debugger.ui.BreakpointType.getTypeDisplayName() + */ + public abstract String getType(); + + /** + * Get the source files containing this breakpoint. + * @return The source files where this breakpoint is submitted or null + * when this does not apply. + */ + public abstract FileObject[] getFiles(); + + /** + * Get the projects containing this breakpoint. + * @return The projects in which this breakpoint is submitted or null + * when this does not apply. + */ + public abstract Project[] getProjects(); + + /** + * Test is this breakpoint is hidden (not visible to the user). + * @return true when this breakpoint is hidden, false otherwise. + */ + public abstract boolean isHidden(); + } }