classpathhelper.eclipse.ui.packageview
Class PackagesViewPart

java.lang.Object
  extended byViewPart
      extended byclasspathhelper.eclipse.ui.packageview.PackagesViewPart
All Implemented Interfaces:
IClassPathChangeListener, ITreeNodeChangeListener, ITreeStructureChangeListener

public class PackagesViewPart
extends ViewPart
implements IClassPathChangeListener, ITreeNodeChangeListener, ITreeStructureChangeListener

View that shows a packages break down of the classpath, that is a view that doesn't organize the tree by locations (such as jars or folders), but instead allows browsing of the classpath based on the packages withing the classpath.

Browsing by package is useful when the location of a class is not known.

Since:
1.2
Author:
bharris
See Also:
Serialized Form

Constructor Summary
PackagesViewPart()
           
 
Method Summary
 void classpathChangedEvent(IClassPathModel model, CGClassLoader classLoader)
          Callback method indicating that the classpath has changed.
 void createPartControl(Composite parent)
           
 void dispose()
           
 void propertyChange(PropertyChangeEvent event)
           
 void setFocus()
           
 void showTreeElement(ITree element)
          Helper method to expose an element in the tree.
 void treeChildAdded(ITreeRoot treeRoot, ITree parent, java.lang.String[] properties, ITree[] children)
          Callback indicating that children where added to a node.
 void treeChildRemoved(ITreeRoot treeRoot, ITree parent, java.lang.String[] properties, ITree[] children)
          Callback indicating that children where removed from the node.
 void treeNodeChanged(ITreeRoot treeRoot, ITree[] nodes)
          Callback for a node change event.
 void treeNodeChanged(ITreeRoot treeRoot, ITree[] nodes, java.lang.String[][] properties)
          Callback for a node change event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PackagesViewPart

public PackagesViewPart()
Since:
1.2
Method Detail

createPartControl

public void createPartControl(Composite parent)

setFocus

public void setFocus()

dispose

public void dispose()

showTreeElement

public void showTreeElement(ITree element)
Helper method to expose an element in the tree.

Parameters:
element - The element in the tree.
Since:
1.2

classpathChangedEvent

public void classpathChangedEvent(IClassPathModel model,
                                  CGClassLoader classLoader)
Description copied from interface: IClassPathChangeListener
Callback method indicating that the classpath has changed.

Specified by:
classpathChangedEvent in interface IClassPathChangeListener
Parameters:
model - The source of this change event.
classLoader - The new classloader.

propertyChange

public void propertyChange(PropertyChangeEvent event)

treeNodeChanged

public void treeNodeChanged(ITreeRoot treeRoot,
                            ITree[] nodes)
Description copied from interface: ITreeNodeChangeListener
Callback for a node change event.

Specified by:
treeNodeChanged in interface ITreeNodeChangeListener
Parameters:
treeRoot - The root of the tree where the event originated.
nodes - The nodes whose internal state has changed.

treeNodeChanged

public void treeNodeChanged(ITreeRoot treeRoot,
                            ITree[] nodes,
                            java.lang.String[][] properties)
Description copied from interface: ITreeNodeChangeListener
Callback for a node change event.

Specified by:
treeNodeChanged in interface ITreeNodeChangeListener
Parameters:
treeRoot - The root of the tree where the event originated.
nodes - The nodes whose internal state has changed.
properties - Array of properties for each node. This array should be the same length as nodes although individual arrays at each index can be null.

treeChildAdded

public void treeChildAdded(ITreeRoot treeRoot,
                           ITree parent,
                           java.lang.String[] properties,
                           ITree[] children)
Description copied from interface: ITreeStructureChangeListener
Callback indicating that children where added to a node.

Specified by:
treeChildAdded in interface ITreeStructureChangeListener
Parameters:
treeRoot - The root of the tree where the event originated.
parent - The node where children where added.
properties - The properties of the parent that have changed with the adding of children or null if no properties were affected.
children - The children nodes that have been added.

treeChildRemoved

public void treeChildRemoved(ITreeRoot treeRoot,
                             ITree parent,
                             java.lang.String[] properties,
                             ITree[] children)
Description copied from interface: ITreeStructureChangeListener
Callback indicating that children where removed from the node.

Specified by:
treeChildRemoved in interface ITreeStructureChangeListener
Parameters:
treeRoot - The root of the tree where the event originated.
parent - The node where children where removed.
properties - The properties of the parent that have changed with the removal of children or null if no properties were affected.
children - The children nodes that have been removed.