public abstract class ProjectViewPsiTreeChangeListener extends PsiTreeChangeAdapter
Modifier | Constructor and Description |
---|---|
protected |
ProjectViewPsiTreeChangeListener(Project project) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
addSubtreeToUpdateByElement(PsiElement element) |
protected void |
addSubtreeToUpdateByRoot() |
void |
childAdded(PsiTreeChangeEvent event)
Invoked just after adding of a new child to the tree.
The added child is returned by event.getChild() .Parent element is returned by event.getParent() . |
void |
childMoved(PsiTreeChangeEvent event)
Invoked just after movement of a child in the tree by changing its parent or by changing its position in the same parent.
The moved child is returned by event.getChild() .The old parent is returned by event.getOldParent() .The new parent is returned by event.getNewParent() . |
void |
childRemoved(PsiTreeChangeEvent event)
Invoked just after removal of a child from the tree.
The removed child is returned by event.getChild() . |
protected void |
childrenChanged(PsiElement parent,
boolean stopProcessingForThisModificationCount) |
void |
childrenChanged(PsiTreeChangeEvent event)
Invoked after a mass change of children of the specified node.
The parent the nodes of which have changed is returned by event.getParent() . |
void |
childReplaced(PsiTreeChangeEvent event)
Invoked just after replacement of a child in the tree by another element.
The replaced child is returned by event.getOldChild() . |
protected abstract javax.swing.tree.DefaultMutableTreeNode |
getRootNode() |
protected abstract AbstractTreeUpdater |
getUpdater() |
protected abstract boolean |
isFlattenPackages() |
void |
propertyChanged(PsiTreeChangeEvent event)
Invoked just after changing of some property of an element.
Element, whose property has changed is returned by event.getElement() .The property name is returned by event.getPropertyName() .The old property value is returned by event.getOldValue() .The new property value is returned by event.getNewValue() . |
beforeChildAddition, beforeChildMovement, beforeChildRemoval, beforeChildrenChange, beforeChildReplacement, beforePropertyChange
protected ProjectViewPsiTreeChangeListener(Project project)
protected abstract AbstractTreeUpdater getUpdater()
protected abstract boolean isFlattenPackages()
protected abstract javax.swing.tree.DefaultMutableTreeNode getRootNode()
public final void childRemoved(PsiTreeChangeEvent event)
PsiTreeChangeListener
event.getChild()
. Note that
only equals()
, hashCode()
, isValid()
methods
can be safely invoked for this element, because it's not valid anymore.event.getParent()
.childRemoved
in interface PsiTreeChangeListener
childRemoved
in class PsiTreeChangeAdapter
event
- the event object describing the change.public final void childAdded(PsiTreeChangeEvent event)
PsiTreeChangeListener
event.getChild()
.event.getParent()
.childAdded
in interface PsiTreeChangeListener
childAdded
in class PsiTreeChangeAdapter
event
- the event object describing the change.public final void childReplaced(PsiTreeChangeEvent event)
PsiTreeChangeListener
event.getOldChild()
. Note that
only equals()
, hashCode()
, isValid()
methods
can be safely invoked for this element, because it's not valid anymore.event.getNewChild()
.event.getParent()
.childReplaced
in interface PsiTreeChangeListener
childReplaced
in class PsiTreeChangeAdapter
event
- the event object describing the change.public final void childMoved(PsiTreeChangeEvent event)
PsiTreeChangeListener
event.getChild()
.event.getOldParent()
.event.getNewParent()
.childMoved
in interface PsiTreeChangeListener
childMoved
in class PsiTreeChangeAdapter
event
- the event object describing the change.public final void childrenChanged(PsiTreeChangeEvent event)
PsiTreeChangeListener
event.getParent()
.childrenChanged
in interface PsiTreeChangeListener
childrenChanged
in class PsiTreeChangeAdapter
event
- the event object describing the change.protected void childrenChanged(PsiElement parent, boolean stopProcessingForThisModificationCount)
public void propertyChanged(PsiTreeChangeEvent event)
PsiTreeChangeListener
event.getElement()
.event.getPropertyName()
.event.getOldValue()
.event.getNewValue()
.propertyChanged
in interface PsiTreeChangeListener
propertyChanged
in class PsiTreeChangeAdapter
event
- the event object describing the change.protected void addSubtreeToUpdateByRoot()
protected boolean addSubtreeToUpdateByElement(PsiElement element)