Author: b00__1
Date: 2007-07-14 10:06:07-0700
New Revision: 13071
Modified:
branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/EUMLModelImplementation.java
Log:
Style cleanup
Modified: branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/EUMLModelImplementation.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/EUMLModelImplementation.java?view=diff&rev=13071&p1=branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/EUMLModelImplementation.java&p2=branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/EUMLModelImplementation.java&r1=13070&r2=13071
==============================================================================
--- branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/EUMLModelImplementation.java (original)
+++ branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/EUMLModelImplementation.java 2007-07-14 10:06:07-0700
@@ -211,11 +211,12 @@
private void initializeEditingDomain() {
// If the eUML.resources system property is defined then we are in a
// stand alone application, else we're in an Eclipse plug in.
- // The eUML.resource should contain the path to the org.eclipse.uml2.uml.resource jar plugin.
+ // The eUML.resource should contain the path to the
+ // org.eclipse.uml2.uml.resource jar plugin.
String path = System.getProperty("eUML.resources"); //$NON-NLS-1$
ComposedAdapterFactory adapterFactory = null;
-
+
BasicCommandStack commandStack = new BasicCommandStack() {
@Override
@@ -226,7 +227,7 @@
}
};
-
+
commandStack.addCommandStackListener(new CommandStackListener() {
public void commandStackChanged(final EventObject event) {
@@ -249,42 +250,49 @@
factories.add(new UMLReflectiveItemProviderAdapterFactory());
adapterFactory = new ComposedAdapterFactory(factories);
}
-
+
editingDomain = new UML2AdapterFactoryEditingDomain(adapterFactory,
commandStack);
-
+
ResourceSet resourceSet = editingDomain.getResourceSet();
- Map<String, Object> extensionToFactoryMap = resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap();
+ Map<String, Object> extensionToFactoryMap = resourceSet
+ .getResourceFactoryRegistry().getExtensionToFactoryMap();
Map<URI, URI> uriMap = resourceSet.getURIConverter().getURIMap();
-
if (path != null) {
try {
FileInputStream in = new FileInputStream(path);
in.close();
} catch (IOException e) {
- throw(new RuntimeException(e));
+ throw (new RuntimeException(e));
}
-
+
path = path.replace('\\', '/');
if (Character.isLetter(path.charAt(0))) {
path = '/' + path;
}
URI uri = URI.createURI("jar:file:" + path + "!/"); //$NON-NLS-1$ //$NON-NLS-2$
LOG.debug("eUML.resource URI --> " + uri); //$NON-NLS-1$
-
- resourceSet.getPackageRegistry().put(UMLPackage.eNS_URI, UMLPackage.eINSTANCE);
- extensionToFactoryMap.put(UMLResource.FILE_EXTENSION, UMLResource.Factory.INSTANCE);
- uriMap.put(URI.createURI(UMLResource.LIBRARIES_PATHMAP), uri.appendSegment("libraries").appendSegment("")); //$NON-NLS-1$ //$NON-NLS-2$
- uriMap.put(URI.createURI(UMLResource.METAMODELS_PATHMAP), uri.appendSegment("metamodels").appendSegment("")); //$NON-NLS-1$//$NON-NLS-2$
- uriMap.put(URI.createURI(UMLResource.PROFILES_PATHMAP), uri.appendSegment("profiles").appendSegment("")); //$NON-NLS-1$//$NON-NLS-2$
+
+ resourceSet.getPackageRegistry().put(UMLPackage.eNS_URI,
+ UMLPackage.eINSTANCE);
+ extensionToFactoryMap.put(UMLResource.FILE_EXTENSION,
+ UMLResource.Factory.INSTANCE);
+ uriMap.put(URI.createURI(UMLResource.LIBRARIES_PATHMAP), uri
+ .appendSegment("libraries").appendSegment("")); //$NON-NLS-1$ //$NON-NLS-2$
+ uriMap.put(URI.createURI(UMLResource.METAMODELS_PATHMAP), uri
+ .appendSegment("metamodels").appendSegment("")); //$NON-NLS-1$//$NON-NLS-2$
+ uriMap.put(URI.createURI(UMLResource.PROFILES_PATHMAP), uri
+ .appendSegment("profiles").appendSegment("")); //$NON-NLS-1$//$NON-NLS-2$
}
- extensionToFactoryMap.put(UML22UMLResource.FILE_EXTENSION, UML22UMLResource.Factory.INSTANCE);
- extensionToFactoryMap.put(XMI2UMLResource.FILE_EXTENSION, XMI2UMLResource.Factory.INSTANCE);
+ extensionToFactoryMap.put(UML22UMLResource.FILE_EXTENSION,
+ UML22UMLResource.Factory.INSTANCE);
+ extensionToFactoryMap.put(XMI2UMLResource.FILE_EXTENSION,
+ XMI2UMLResource.Factory.INSTANCE);
uriMap.putAll(UML22UMLExtendedMetaData.getURIMap());
uriMap.putAll(XMI2UMLExtendedMetaData.getURIMap());
-
+
}
/**
@@ -321,7 +329,6 @@
if (theChangeableKind == null) {
theChangeableKind = new ChangeableKindEUMLImpl();
}
-
return theChangeableKind;
}
@@ -415,7 +422,6 @@
theExtensionMechanismsHelper =
new ExtensionMechanismsHelperEUMLImpl(this);
}
-
return theExtensionMechanismsHelper;
}
@@ -423,7 +429,6 @@
if (theFacade == null) {
theFacade = new FacadeEUMLImpl(this);
}
-
return theFacade;
}
@@ -460,7 +465,6 @@
if (theOrderingKind == null) {
theOrderingKind = new OrderingKindEUMLImpl();
}
-
return theOrderingKind;
}
@@ -526,7 +530,6 @@
if (theVisibilityKind == null) {
theVisibilityKind = new VisibilityKindEUMLImpl();
}
-
return theVisibilityKind;
}
@@ -549,6 +552,4 @@
return null;
}
-
-
}
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.