Index: apichanges.xml =================================================================== RCS file: /cvs/debuggercore/viewmodel/apichanges.xml,v retrieving revision 1.12 diff -u -r1.12 apichanges.xml --- apichanges.xml 6 Apr 2005 09:32:00 -0000 1.12 +++ apichanges.xml 14 Jul 2005 14:10:06 -0000 @@ -170,6 +170,20 @@ + + + ModelEvent enhanced with more fine-grained changes + + + + + + NodeChanged events need to distinguish what node property has changed. Mask constant were added for + display name, icon, short description and children properties. By default, mask that aggregates all + these properties is used - to assure compatibility. + + + Index: manifest.mf =================================================================== RCS file: /cvs/debuggercore/viewmodel/manifest.mf,v retrieving revision 1.11 diff -u -r1.11 manifest.mf --- manifest.mf 6 Apr 2005 08:58:20 -0000 1.11 +++ manifest.mf 14 Jul 2005 14:10:06 -0000 @@ -1,5 +1,5 @@ Manifest-Version: 1.0 OpenIDE-Module: org.netbeans.spi.viewmodel/2 OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/viewmodel/Bundle.properties -OpenIDE-Module-Specification-Version: 1.5 +OpenIDE-Module-Specification-Version: 1.6 Index: src/org/netbeans/spi/viewmodel/ModelEvent.java =================================================================== RCS file: /cvs/debuggercore/viewmodel/src/org/netbeans/spi/viewmodel/ModelEvent.java,v retrieving revision 1.2 diff -u -r1.2 ModelEvent.java --- src/org/netbeans/spi/viewmodel/ModelEvent.java 6 Apr 2005 08:58:20 -0000 1.2 +++ src/org/netbeans/spi/viewmodel/ModelEvent.java 14 Jul 2005 14:10:06 -0000 @@ -108,7 +108,25 @@ */ public static class NodeChanged extends ModelEvent { + /** + * The mask for display name change. + */ + public static final int DISPLAY_NAME_MASK = 1; + /** + * The mask for icon change. + */ + public static final int ICON_MASK = 2; + /** + * The mask for short description change. + */ + public static final int SHORT_DESCRIPTION_MASK = 4; + /** + * The mask for children change. + */ + public static final int CHILDREN_MASK = 8; + private Object node; + private int change; /** * Creates a new instance of NodeChanged event. @@ -122,8 +140,13 @@ Object source, Object node ) { + this (source, node, 0xFFFFFFFF); + } + + public NodeChanged(Object source, Object node, int change) { super (source); this.node = node; + this.change = change; } /** @@ -135,6 +158,16 @@ */ public Object getNode () { return node; + } + + /** + * Get the change mask. + * + * @return the change mask, one of the *_MASK constant or their aggregation. + * @since 1.6 + */ + public int getChange() { + return change; } } }