Package com.nomagic.uml2.ext.jmi
Class QualifiedNameListener
- java.lang.Object
-
- com.nomagic.uml2.ext.jmi.QualifiedNameListener
-
- All Implemented Interfaces:
java.beans.PropertyChangeListener
,java.util.EventListener
class QualifiedNameListener extends java.lang.Object implements java.beans.PropertyChangeListener
Listens to model changes and firesPropertyNames.QUALIFIED_NAME
events
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
dirty
private java.util.Set<NamedElement>
elements
private java.util.Set<Element>
elementWithOwners
private ModelPropertyChangeListeners
listeners
-
Constructor Summary
Constructors Constructor Description QualifiedNameListener(ModelPropertyChangeListeners modelPropertyChangeListeners)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(NamedElement element)
private static Element
findNamedElementParent(Element e)
private java.util.Set<Element>
getElementWithOwners()
private static Namespace
getNamespaceForQualifiedName(NamedElement element)
Returns namespace which name should be used as a part of the element's qualified name.private static java.lang.String
getOldQualifiedName(Element source, java.lang.String qNameOld, java.lang.String qNameNew, NamedElement element, java.lang.String newName)
private static java.lang.String
getQualifiedName(Element e)
boolean
isDirty()
private void
notifyChildren(Element source, java.lang.String qNameOld, java.lang.String qNameNew)
void
propertyChange(java.beans.PropertyChangeEvent evt)
private void
registerNonMaskedPropertyChangeEventListener(AbstractRepository repository)
void
remove(NamedElement element)
void
setDirty(boolean dirty)
private void
updateTree()
-
-
-
Field Detail
-
listeners
private final ModelPropertyChangeListeners listeners
-
elements
private final java.util.Set<NamedElement> elements
-
elementWithOwners
private final java.util.Set<Element> elementWithOwners
-
dirty
private boolean dirty
-
-
Constructor Detail
-
QualifiedNameListener
public QualifiedNameListener(ModelPropertyChangeListeners modelPropertyChangeListeners)
-
-
Method Detail
-
registerNonMaskedPropertyChangeEventListener
private void registerNonMaskedPropertyChangeEventListener(AbstractRepository repository)
-
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent evt)
- Specified by:
propertyChange
in interfacejava.beans.PropertyChangeListener
-
getQualifiedName
@CheckForNull private static java.lang.String getQualifiedName(Element e)
-
setDirty
public void setDirty(boolean dirty)
-
isDirty
public boolean isDirty()
-
getElementWithOwners
private java.util.Set<Element> getElementWithOwners()
-
notifyChildren
private void notifyChildren(Element source, @CheckForNull java.lang.String qNameOld, @CheckForNull java.lang.String qNameNew)
-
getOldQualifiedName
@CheckForNull private static java.lang.String getOldQualifiedName(Element source, @CheckForNull java.lang.String qNameOld, @CheckForNull java.lang.String qNameNew, NamedElement element, java.lang.String newName)
-
getNamespaceForQualifiedName
@CheckForNull private static Namespace getNamespaceForQualifiedName(NamedElement element)
Returns namespace which name should be used as a part of the element's qualified name.- Parameters:
element
- an element.- Returns:
- namespace.
-
add
public void add(NamedElement element)
-
remove
public void remove(NamedElement element)
-
updateTree
private void updateTree()
-
-