Author: mvw
Date: 2007-06-25 11:58:43-0700
New Revision: 12909
Modified:
trunk/src_new/org/argouml/ui/targetmanager/TargetManager.java
Log:
Remove cyclic dependency from TargetManager to UMLDiagram.
Modified: trunk/src_new/org/argouml/ui/targetmanager/TargetManager.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/ui/targetmanager/TargetManager.java?view=diff&rev=12909&p1=trunk/src_new/org/argouml/ui/targetmanager/TargetManager.java&p2=trunk/src_new/org/argouml/ui/targetmanager/TargetManager.java&r1=12908&r2=12909
==============================================================================
--- trunk/src_new/org/argouml/ui/targetmanager/TargetManager.java (original)
+++ trunk/src_new/org/argouml/ui/targetmanager/TargetManager.java 2007-06-25 11:58:43-0700
@@ -44,7 +44,6 @@
import org.argouml.kernel.Project;
import org.argouml.kernel.ProjectManager;
import org.argouml.model.Model;
-import org.argouml.uml.diagram.ui.UMLDiagram;
import org.tigris.gef.base.Diagram;
import org.tigris.gef.presentation.Fig;
@@ -433,7 +432,7 @@
if (o != null) {
Object newTarget;
- if (o instanceof UMLDiagram) { // Needed for Argo startup :-(
+ if (o instanceof Diagram) { // Needed for Argo startup :-(
newTarget = o;
} else {
newTarget = getOwner(o);
@@ -882,7 +881,7 @@
target = owner;
}
}
- return target instanceof UMLDiagram
+ return target instanceof Diagram
|| Model.getFacade().isAUMLElement(target) ? target : null;
}
@@ -955,8 +954,8 @@
private void addListener(Object o) {
if (Model.getFacade().isAModelElement(o)) {
Model.getPump().addModelEventListener(this, o, "remove");
- } else if (o instanceof UMLDiagram) {
- ((UMLDiagram) o).addPropertyChangeListener(this);
+ } else if (o instanceof Diagram) {
+ ((Diagram) o).addPropertyChangeListener(this);
} else if (o instanceof NotificationEmitter) {
((NotificationEmitter) o).addNotificationListener(
this, null, o);
@@ -966,8 +965,8 @@
private void removeListener(Object o) {
if (Model.getFacade().isAModelElement(o)) {
Model.getPump().removeModelEventListener(this, o, "remove");
- } else if (o instanceof UMLDiagram) {
- ((UMLDiagram) o).removePropertyChangeListener(this);
+ } else if (o instanceof Diagram) {
+ ((Diagram) o).removePropertyChangeListener(this);
} else if (o instanceof NotificationEmitter) {
try {
((NotificationEmitter) o).removeNotificationListener(this);
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.