svn commit: r16474 - trunk/src/argouml-app/src/org/argouml/persistence/PGMLStackParser.java
Tom Morris <[email protected]>
| Newsgroups | gmane.comp.lang.uml.argouml.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: tfmorris
Date: 2008-12-30 14:09:28-0800
New Revision: 16474
Modified:
trunk/src/argouml-app/src/org/argouml/persistence/PGMLStackParser.java
Log:
Refactor constructors so deprecated constructor is ready for removal
Modified: trunk/src/argouml-app/src/org/argouml/persistence/PGMLStackParser.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/persistence/PGMLStackParser.java?view=diff&pathrev=16474&r1=16473&r2=16474
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/persistence/PGMLStackParser.java (original)
+++ trunk/src/argouml-app/src/org/argouml/persistence/PGMLStackParser.java 2008-12-30 14:09:28-0800
@@ -44,7 +44,6 @@
import org.argouml.uml.diagram.PathContainer;
import org.argouml.uml.diagram.StereotypeContainer;
import org.argouml.uml.diagram.VisibilityContainer;
-import org.argouml.uml.diagram.ui.ArgoFig;
import org.argouml.uml.diagram.ui.FigEdgeModelElement;
import org.argouml.uml.diagram.ui.FigEdgePort;
import org.tigris.gef.base.Diagram;
@@ -70,11 +69,7 @@
class PGMLStackParser
extends org.tigris.gef.persistence.pgml.PGMLStackParser {
- /**
- * Logger.
- */
- private static final Logger LOG =
- Logger.getLogger(PGMLStackParser.class);
+ private static final Logger LOG = Logger.getLogger(PGMLStackParser.class);
private List<EdgeData> figEdges = new ArrayList<EdgeData>(50);
@@ -93,9 +88,13 @@
@Deprecated
public PGMLStackParser(Map modelElementsByUuid) {
super(modelElementsByUuid);
- // TODO: Use stylesheet to convert or wait till we use Fig
- // factories in diagram subsystem.
- // What is the last version that used FigNote?
+ addTranslations();
+ }
+
+ // TODO: Use stylesheet to convert or wait till we use Fig
+ // factories in diagram subsystem.
+ // What is the last version that used FigNote?
+ private void addTranslations() {
addTranslation("org.argouml.uml.diagram.ui.FigNote",
"org.argouml.uml.diagram.static_structure.ui.FigComment");
addTranslation("org.argouml.uml.diagram.static_structure.ui.FigNote",
@@ -134,8 +133,8 @@
*/
public PGMLStackParser(Map<String, Object> modelElementsByUuid,
DiagramSettings defaultSettings) {
- // TODO: Move addTranslation here when deprecated constructor is removed
- this(modelElementsByUuid);
+ super(modelElementsByUuid);
+ addTranslations();
// Create a new diagram wide settings block which is backed by
// the project-wide defaults that we were passed
diagramSettings = new DiagramSettings(defaultSettings);
@@ -145,6 +144,7 @@
* @see org.tigris.gef.persistence.pgml.HandlerFactory#getHandler(
* HandlerStack, Object, String, String, String, Attributes)
*/
+ @Override
public DefaultHandler getHandler(HandlerStack stack,
Object container,
String uri,
@@ -196,6 +196,7 @@
* @see org.tigris.gef.persistence.pgml.PGMLStackParser#setAttrs(
* org.tigris.gef.presentation.Fig, org.xml.sax.Attributes)
*/
+ @Override
protected final void setAttrs(Fig f, Attributes attrList)
throws SAXException {
------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=996351
To unsubscribe from this discussion, e-mail: [[email protected]].