Login | Register
My pages Projects Community openCollabNet

Discussions > commits > svn commit: r68 - branches/026: . src/org/dbuml/argo/language src/org/dbuml/argo/model src/org/dbuml/argo/uml/diagram/ui src/org/dbuml/argo/uml/ui src/org/dbuml/base/model

argouml-db
Discussion topic

Back to topic list

svn commit: r68 - branches/026: . src/org/dbuml/argo/language src/org/dbuml/argo/model src/org/dbuml/argo/uml/diagram/ui src/org/dbuml/argo/uml/ui src/org/dbuml/base/model

Author jgrengbondai
Full name Jules Grengbondai
Date 2009-08-25 08:17:17 PDT
Message Author: jgrengbondai
Date: 2009-08-25 08:17:16-0700
New Revision: 68

Modified:
   branches/026/build.xml
   branches/026/dbuml.bat
   branches/026/module.properties
   branches/026/src/org​/dbuml/argo/language​/GeneratorSQL.java
   branches/026/src/org​/dbuml/argo/model/Ar​goDBModelFacade.java​
   branches/026/src/org​/dbuml/argo/uml/diag​ram/ui/DBDeploymentD​iagram.java
   branches/026/src/org​/dbuml/argo/uml/diag​ram/ui/DBSchemaDiagr​am.java
   branches/026/src/org​/dbuml/argo/uml/ui/A​ctionCreateColumn.ja​va
   branches/026/src/org​/dbuml/argo/uml/ui/A​ctionCreateEdge.java​
   branches/026/src/org​/dbuml/argo/uml/ui/A​ctionCreatePKEY.java​
   branches/026/src/org​/dbuml/argo/uml/ui/C​ommandEdge.java
   branches/026/src/org​/dbuml/argo/uml/ui/D​BModule.java
   branches/026/src/org​/dbuml/argo/uml/ui/D​BUMLTreeCellRenderer​.java
   branches/026/src/org​/dbuml/base/model/Co​lumn.java
   branches/026/src/org​/dbuml/base/model/DB​Element.java

Log:
Changes for ArgoUML 026

Modified: branches/026/build.xml
Url: http://argouml-db.ti​gris.org/source/brow​se/argouml-db/branch​es/026/build.xml?vie​w=diff&pathrevh​&r1g&r2h
====================​====================​====================​=================---​ branches/026/build.xml (original)
+++ branches/026/build.xml 2009-08-25 08:17:16-0700
@@ -42,7 +42,8 @@
     <tstamp/>

     <property file="module.properties"/>
- <property file="${argo.root.d​ir}/src_new/default.​properties"/>
+ <property file="${argo.root.d​ir}/default.properti​es"/>
+ <property file="${argo.root.d​ir}/src/argouml-app/​default.properties"/​>

     <property name="Name" value="ArgoModule-$​{argo.module.name}"/​>
     <property name="name" value="argomodule-$​{argo.module.name}"/​>
@@ -64,11 +65,14 @@
     <property name="module.release​-bundle.dest" value="${module.roo​t}/release-bundle"/​>
     <property name="argo.build.dest" value="${argo.build​.dir}/classes"/>

+<!-- Manually create the ext folder for now, Jules March 2009 -->
+
     <property name="module.jarfile.name" value="dbuml.jar"/>
     <property name="module.jarfile"
- value="${argo.root.​dir}/build/ext/${mo​dule.jarfile.name}"/​>
+ value="${argo.build​.dir}/ext/${module.​jarfile.name}"/>


+
     <echo message="${argo.root.dir} ${argo.src.dir} ${junit.jar.path} ${ant.home}"/>
     <property name="developer.lib.dir" value="${argo.build.dir}"/>

@@ -79,15 +83,7 @@
     <property name="module.version" value="${argo.core.​version}-${DSTAMP}-​${TSTAMP}"/>

     <path id="module.compile.c​lasspath">
- <pathelement location="${argo.bu​ild.dir}/argouml.jar​"/>
- <pathelement location="${ocl-arg​o.jar.path}"/>
- <pathelement location="${gef.jar.path}"/>
- <pathelement location="${log4j.j​ar.path}"/>
- <pathelement location="${swidget​s.jar.path}"/>
- <pathelement location="${toolbar​.jar.path}"/>
- <pathelement location="${commons​-logging.jar.path}"/​>
- <pathelement location="${antlral​l.jar.path}"/>
- <pathelement location="${argo.bu​ild.dir}/argouml-mod​el.jar"/>
+ <fileset dir="${argo.build.dir}" includes="*.jar"/>
         <pathelement location="${module.​lib.dir}/velocity-1.​4.jar"/>
     </path>

@@ -139,11 +135,11 @@
   <!-- Compiles the source directory -->
   <!-- ====================​====================​====================​======= -->
   <target name="compile" depends="prepare"
- description="compiles the module source code">
+ description="compiles the module source code">
       
     <available file="${argo.build.​dir}/argouml.jar" property="argo.is.pa​ckaged"/>
     <fail unless="argo.is.packaged"
- message="You must package ArgoUML first, e.g., argouml/src_new> ant package"/>
+ message="You must package ArgoUML first, e.g., argouml> ant install"/>

     <javac srcdir="${module.src.dir}"
            destdir="${module.build.dest}"
@@ -241,21 +237,45 @@
     <delete dir="${module.relea​se-bundle.dest}"/​>

     <mkdir dir="${module.relea​se-bundle.dest}"/​>
+
+ <copy todir="${module.rel​ease-bundle.dest}"​>
+ <!--
+ <fileset dir="${developer.lib.dir}" includes="**/**" excludes=".svn/**"/>
+ -->
+ <fileset dir="${argo.build.dir}" includes="*.jar" excludes=".svn/**, *.bat, *.sh, *.txt"/>
+ </copy>
+
+ <property name="release.dest" value="${module.rel​ease-bundle.dest}"/​>
+
+ <antcall target="copy-common-dirs"/>
+
+ </target>
+
+ <!-- ====================​====================​====================​======= -->
+ <!-- Build release-bundle folder with bundled ArgoUML -->
+ <!-- ====================​====================​====================​======= -->
+ <target name="release-bundle-old" depends="init, jar"
+ description="Build release-bundle folder with bundled ArgoUML">
+ <echo message="Preparing the release-bundle directories"/>
+
+ <delete dir="${module.relea​se-bundle.dest}"/​>
+
+ <mkdir dir="${module.relea​se-bundle.dest}"/​>

- <copy tofile="${module.re​lease-bundle.dest}/a​ntlrall.jar"
- file="${argo.root.d​ir}/lib/antlrall-2.7​.2.jar"/>
+ <copy tofile="${module.re​lease-bundle.dest}/a​ntlr.jar"
+ file="${argo.root.d​ir}/build/antlr-2.7.​7.jar"/>
     <copy tofile="${module.re​lease-bundle.dest}/c​ommons-logging.jar"
- file="${argo.root.d​ir}/lib/commons-logg​ing-1.0.2.jar"/>
+ file="${argo.root.d​ir}/commons-logging-​1.0.2.jar"/>
     <copy tofile="${module.re​lease-bundle.dest}/g​ef.jar"
- file="${argo.root.d​ir}/lib/gef-0.12.3.j​ar"/>
+ file="${argo.root.d​ir}/gef-0.12.4.jar"/​>
     <copy tofile="${module.re​lease-bundle.dest}/l​og4j.jar"
- file="${argo.root.d​ir}/lib/log4j-1.2.6.​jar"/>
+ file="${argo.root.d​ir}/log4j-1.2.6.jar"​/>
     <copy tofile="${module.re​lease-bundle.dest}/o​cl-argo.jar"
- file="${argo.root.d​ir}/lib/ocl-argo-1.1​.jar"/>
+ file="${argo.root.d​ir}/ocl-argo-1.1.jar​"/>
     <copy tofile="${module.re​lease-bundle.dest}/s​widgets.jar"
- file="${argo.root.d​ir}/lib/swidgets-0.1​.4.jar"/>
+ file="${argo.root.d​ir}/swidgets-0.1.4.j​ar"/>
     <copy tofile="${module.re​lease-bundle.dest}/t​oolbar.jar"
- file="${argo.root.d​ir}/lib/toolbar-1.3.​jar"/>
+ file="${argo.root.d​ir}/toolbar-1.4*.jar​"/>
     <copy todir="${module.rel​ease-bundle.dest}"
       file="${argo.build.​dir}/argouml-mdr.jar​"/>
     <copy todir="${module.rel​ease-bundle.dest}"

Modified: branches/026/dbuml.bat
Url: http://argouml-db.ti​gris.org/source/brow​se/argouml-db/branch​es/026/dbuml.bat?vie​w=diff&pathrevh​&r1g&r2h
====================​====================​====================​=================---​ branches/026/dbuml.bat (original)
+++ branches/026/dbuml.bat 2009-08-25 08:17:16-0700
@@ -1 +1,4 @@
-java -cp argouml.jar;ext\pos​tgresql-8.2-505.jdbc​2.jar;ext\dbuml.jar​ org.argouml.application.Main
\ No newline at end of file
+@echo off
+java -Xmx512m -cp argouml.jar;ext\pos​tgresql-8.2-505.jdbc​2.jar;ext\dbuml.jar​ org.argouml.application.Main %1 %2 %3 %4 %5 %6 %7 %8
+
+if errorlevel 1 pause
\ No newline at end of file

Modified: branches/026/module.properties
Url: http://argouml-db.ti​gris.org/source/brow​se/argouml-db/branch​es/026/module.proper​ties?view=diff&p​athrevh&r1g&​r2h
====================​====================​====================​=================---​ branches/026/module.properties (original)
+++ branches/026/module.properties 2009-08-25 08:17:16-0700
@@ -1,4 +1,7 @@
 argo.module.name�uml
 argo.module.jarfile�uml
-argo.root.dir=C:/argosvn/argo
+#argo.root.dir=D:/a​rgouml026/src/argoum​l-build
+argo.root.dir=D:/argouml026
+argo.build.dir=${a​rgo.root.dir}/build
+


Modified: branches/026/src/org​/dbuml/argo/language​/GeneratorSQL.java
Url: http://argouml-db.ti​gris.org/source/brow​se/argouml-db/branch​es/026/src/org/dbuml​/argo/language/Gener​atorSQL.java?view=di​ff&pathrevh&​r1g&r2h
====================​====================​====================​=================---​ branches/026/src/org​/dbuml/argo/language​/GeneratorSQL.java (original)
+++ branches/026/src/org​/dbuml/argo/language​/GeneratorSQL.java 2009-08-25 08:17:16-0700
@@ -26,6 +26,7 @@
 import org.dbuml.base.factory.Factory;
 import org.dbuml.base.i18n.Translator;
 import org.dbuml.base.model​.DBModelFacade;
+import org.argouml.applicat​ion.api.Predicate;

 /*******************​********************​********************​***************
  * GeneratorSQL is called by:
@@ -59,6 +60,8 @@
         Language lang
                 GeneratorHelper.make​Language(cv, nn.getTitle(), nn.getIcon());
         GeneratorManager.get​Instance().addGenera​tor(lang, this);
+ // add models to be enabled in the source
+ org.argouml.uml.ui.T​abSrc.addPredicate(n​ew DBUMLPredicate());
     }

     /************************
@@ -296,4 +299,15 @@
         }
         return ret;
     }
+
+ class DBUMLPredicate implements Predicate {
+ // this method determines the type of models
+ // to be enabled in the source tab.
+ public boolean evaluate(Object object) {
+ return (DBModelFacade.getIn​stance().representsA​Schema(object)
+ || DBModelFacade.getIns​tance().representsAD​atabase(object));
+ // tables and views are already in the default predicate
+ }
+ }
+
 }

Modified: branches/026/src/org​/dbuml/argo/model/Ar​goDBModelFacade.java​
Url: http://argouml-db.ti​gris.org/source/brow​se/argouml-db/branch​es/026/src/org/dbuml​/argo/model/ArgoDBMo​delFacade.java?view=​diff&pathrevh​&r1g&r2h
====================​====================​====================​=================---​ branches/026/src/org​/dbuml/argo/model/Ar​goDBModelFacade.java​ (original)
+++ branches/026/src/org​/dbuml/argo/model/Ar​goDBModelFacade.java​ 2009-08-25 08:17:16-0700
@@ -37,7 +37,7 @@
 import org.apache.log4j.Logger;

 /**
- * A façade class for Argo models.
+ * A fa�ade class for Argo models.
  * @author jgunderson
  */
 public class ArgoDBModelFacade extends DBModelFacade {
@@ -255,6 +255,12 @@
         return this.findDatabase(null, sName);
     }

+ private Object getProjectModel() {
+ Collection models = ProjectManager.getMa​nager().getCurrentPr​oject().
+ getModels();
+ return ((models != null)? models.iterator().next() : null);
+ }
+
     /**
      * Finds a model element with this name with the given parent and make
      * Database (if it
@@ -266,8 +272,9 @@
      */
     public Database findDatabase(String parentName, String dbName) {
         Object parentModel;
- Object projectModel = ProjectManager.getManager()
- .getCurrentProject()​.getModel();
+// Object projectModel = ProjectManager.getManager()
+// .getCurrentProject()​.getModel();
+ Object projectModel = this.getProjectModel();
         if (parentName != null) {
             parentModel = Model.getFacade().lo​okupIn(projectModel,​
                     parentName);
@@ -1004,10 +1011,8 @@
                     column.getTypeNameJd​bc().toUpperCase(), false);
             }
         }
- Object model
- ProjectManager.getMa​nager().getCurrentPr​oject().getModel();
         Object mAttr
- Model.getCoreFactory​().buildAttribute(ta​bleModel, mType);
+ Model.getCoreFactory​().buildAttribute2(t​ableModel, mType);
         setVisibilityDefault(mAttr);
         column.setModelElement(mAttr);
         this.updateDBElement(column);
@@ -1252,7 +1257,8 @@
         // Make a package and
         Object objSchema = Model.getModelManage​mentFactory().buildP​ackage(
             schema.getName());
- Model.getCoreHelper(​).setNamespace(objSc​hema, owner);
+ //Maybe no longer needed? Jules april 3rd, 2009?
+// Model.getCoreHelper(​).setNamespace(objSc​hema, owner);
         schema.setModelEleme​nt(objSchema);

         // now use the updateDBElement method to set Stereotype and tags
@@ -1324,8 +1330,12 @@
             for (Enumeration e = vStereos.elements(); e.hasMoreElements();) {
                 Object objStereo = e.nextElement();
                 if (objStereo != null) {
- if (Model.getFacade().g​etName(objStereo)
- == dbelem.getStereostring()) {
+// if (Model.getFacade().g​etName(objStereo)
+// == dbelem.getStereostring()) {
+// return;
+// }
+ if ( dbelem.getStereostri​ng().equals(
+ Model.getFacade().ge​tName(objStereo))) {
                         return;
                     }
                 }
@@ -1337,17 +1347,22 @@
             // todo: needs testing as this was changed for new model package
             // and not sure how to get the namespace

- Object model = ProjectManager.getMa​nager().getCurrentPr​oject()
- .getModel();
+ Object model = this.getProjectModel();
             //Object ns = Model.getFacade().ge​tNamespace(model);
             vStereos = new Vector(
                 Model.getExtensionMe​chanismsHelper().get​Stereotypes(model));​
             for (Enumeration e = vStereos.elements(); e.hasMoreElements();) {
                 Object objStereo = e.nextElement();
                 if (objStereo != null) {
- if (Model.getFacade().g​etName(objStereo)
- == dbelem.getStereostring()) {
- Model.getCoreHelper(​).addStereotype(
+// if (Model.getFacade().g​etName(objStereo)
+// == dbelem.getStereostring()) {
+// Model.getCoreHelper(​).addStereotype(
+// objElement, objStereo);
+// return;
+// }
+ if (dbelem.getStereostr​ing().equals(
+ Model.getFacade().ge​tName(objStereo))) {
+ Model.getCoreHelper(​).addStereotype(
                             objElement, objStereo);
                         return;
                     }
@@ -1838,7 +1853,7 @@
         if (sStereo != null && sStereo != "") {
             Object myNS = Model.getFacade().is​ANamespace(obj)
                 ? obj
- : ProjectManager.getMa​nager().getCurrentPr​oject().getModel();
+ : this.getProjectModel();
             newStereo
                 = Model.getExtensionMe​chanismsFactory().bu​ildStereotype(
                     obj, sStereo, myNS);
@@ -1861,8 +1876,7 @@
                     .buildTaggedValue(sKey, (String) properties.get(sKey));
             collTags.add(objTag);
         }
- Model.getExtensionMe​chanismsHelper().set​TaggedValue(
- obj, collTags);
+ Model.getCoreHelper(​).setTaggedValues(ob​j, collTags);
     }

     /**
@@ -1969,13 +1983,11 @@
             mPackage
                 Model.getModelManage​mentFactory().buildP​ackage(
                     getRelativePackageName(name));
- Model.getCoreHelper(​).setNamespace(mPack​age,
- ProjectManager.getMa​nager().getCurrentPr​oject().getModel());​
+ Model.getCoreHelper(​).setNamespace(mPack​age, getProjectModel());

             // Find the owner for this package.
             if ("".equals(getPackag​eName(name))) {
- Model.getCoreHelper(​).addOwnedElement(
- ProjectManager.getMa​nager().getCurrentPr​oject().getModel(),
+ Model.getCoreHelper(​).addOwnedElement( getProjectModel(),
                         mPackage);
             } else {
                 Model.getCoreHelper(​).addOwnedElement(
@@ -1998,8 +2010,7 @@
      */
     private Object searchPackageInModel(String name) {
         if ("".equals(getPackag​eName(name))) {
- return Model.getFacade().lookupIn(
- ProjectManager.getMa​nager().getCurrentPr​oject().getModel(),
+ return Model.getFacade().lo​okupIn(this.getProje​ctModel(),
                     name);
         } else {
             Object owner = searchPackageInModel​(getPackageName(name​));

Modified: branches/026/src/org​/dbuml/argo/uml/diag​ram/ui/DBDeploymentD​iagram.java
Url: http://argouml-db.ti​gris.org/source/brow​se/argouml-db/branch​es/026/src/org/dbuml​/argo/uml/diagram/ui​/DBDeploymentDiagram​.java?view=diff&​pathrevh&r1g​&r2h
====================​====================​====================​=================---​ branches/026/src/org​/dbuml/argo/uml/diag​ram/ui/DBDeploymentD​iagram.java (original)
+++ branches/026/src/org​/dbuml/argo/uml/diag​ram/ui/DBDeploymentD​iagram.java 2009-08-25 08:17:16-0700
@@ -5,7 +5,6 @@
 package org.dbuml.argo.uml.diagram.ui;

 import java.beans.PropertyV​etoException;
-
 import javax.swing.Action;

 import org.apache.log4j.Logger;
@@ -13,16 +12,19 @@
 import org.argouml.model.Model;
 import org.argouml.uml.diag​ram.deployment.Deplo​ymentDiagramGraphMod​el;
 import org.argouml.uml.diag​ram.deployment.ui.UM​LDeploymentDiagram;
-import org.argouml.util.Too​lBarUtility;
+//import org.argouml.swingext​.ToolBarUtility;
+import org.argouml.util.Too​lBarUtility; // 026 changes
+
+import org.tigris.gef.base.​LayerPerspective;
+import org.tigris.gef.base.​LayerPerspectiveMuta​ble;
+import org.tigris.gef.base.​ModeCreatePolyEdge;
 import org.dbuml.argo.uml.u​i.ActionCreateDataba​se;
-import org.dbuml.argo.uml.u​i.ActionCreateEdge;
 import org.dbuml.argo.uml.u​i.ActionCreateSchema​;
-import org.dbuml.argo.uml.u​i.CommandEdge;
 import org.dbuml.base.datab​ase.DBMetadata;
 import org.dbuml.base.model​.DBModelFacade;
-import org.tigris.gef.base.​LayerPerspective;
-import org.tigris.gef.base.​LayerPerspectiveMuta​ble;
-import org.tigris.gef.base.​ModeCreatePolyEdge;
+
+import org.dbuml.argo.uml.u​i.CommandEdge;
+import org.dbuml.argo.uml.u​i.ActionCreateEdge;

 /**
  * Deployment diagram for DBUML models.
@@ -81,6 +83,7 @@
      * Creates a new diagram name.
      * @return String
      */
+ @Override
     protected String getNewDiagramName() {
         String name = null;
         name = getLabelName() + _DiagramSerial;
@@ -95,6 +98,7 @@
      * Gets default label name for new deployment diagrams.
      * @return The default name.
      */
+ @Override
     public String getLabelName() {
         return "Database Deployment Diagram ";
     }
@@ -105,6 +109,7 @@
      *
      * @param handle The namespece object model.
      */
+ @Override
     public void setNamespace(Object handle) {
         if (!Model.getFacade().​isANamespace(handle)​) {
             cat.error(
@@ -136,6 +141,7 @@
      * graphic triggers
      * @return An array of actions.
      */
+ @Override
     protected Object[] getUmlActions() {
         Object actions[]
         {

Modified: branches/026/src/org​/dbuml/argo/uml/diag​ram/ui/DBSchemaDiagr​am.java
Url: http://argouml-db.ti​gris.org/source/brow​se/argouml-db/branch​es/026/src/org/dbuml​/argo/uml/diagram/ui​/DBSchemaDiagram.jav​a?view=diff&path​revh&r1g&r2h​
====================​====================​====================​=================---​ branches/026/src/org​/dbuml/argo/uml/diag​ram/ui/DBSchemaDiagr​am.java (original)
+++ branches/026/src/org​/dbuml/argo/uml/diag​ram/ui/DBSchemaDiagr​am.java 2009-08-25 08:17:16-0700
@@ -6,7 +6,6 @@


 import java.beans.PropertyV​etoException;
-
 import javax.swing.Action;
 import javax.swing.ImageIcon;

@@ -15,21 +14,24 @@
 import org.argouml.uml.diag​ram.static_structure​.ClassDiagramGraphMo​del;
 import org.argouml.uml.diag​ram.static_structure​.ui.ClassDiagramRend​erer;
 import org.argouml.uml.diag​ram.static_structure​.ui.UMLClassDiagram;​
+//import org.argouml.swingext​.ToolBarUtility;
+import org.argouml.util.Too​lBarUtility; // 026 changes
 import org.argouml.uml.ui.f​oundation.core.Actio​nAddOperation;
-import org.argouml.util.Too​lBarUtility;
-import org.dbuml.argo.uml.u​i.ActionCreateColumn​;
-import org.dbuml.argo.uml.u​i.ActionCreateEdge;
-import org.dbuml.argo.uml.u​i.ActionCreatePKEY;
-import org.dbuml.argo.uml.u​i.ActionCreateSchema​;
+
 import org.dbuml.argo.uml.u​i.ActionCreateTable;​
 import org.dbuml.argo.uml.u​i.ActionCreateView;
+import org.dbuml.argo.uml.u​i.ActionCreateSchema​;
+import org.dbuml.argo.uml.u​i.ActionCreateColumn​;
+import org.dbuml.argo.uml.u​i.ActionCreatePKEY;
+import org.dbuml.argo.uml.u​i.ActionCreateEdge;
 import org.dbuml.argo.uml.u​i.CommandEdge;
-import org.dbuml.base.datab​ase.DBMetadata;
-import org.dbuml.base.i18n.Translator;
 import org.dbuml.base.model​.DBModelFacade;
+import org.dbuml.base.datab​ase.DBMetadata;
+
 import org.tigris.gef.base.​LayerPerspective;
 import org.tigris.gef.base.​LayerPerspectiveMuta​ble;
 import org.tigris.gef.base.​ModeCreatePolyEdge;
+import org.dbuml.base.i18n.Translator;

 /**
  *Schema diagram for DBUML.
@@ -107,6 +109,7 @@
      * Makes aa new daiagram name.
      * @return A default name.
      */
+ @Override
     protected String getNewDiagramName() {
         String name = null;
         name = getLabelName() + _DiagramSerial;
@@ -121,6 +124,7 @@
      * Gets a label fornew diagram names.
      * @return The default new diagram name label.
      */
+ @Override
     public String getLabelName() {
         return "Database Schema Diagram ";
     }
@@ -129,6 +133,7 @@
      * Set the namespace of the diagram.
      * @param handle The namespace.
      */
+ @Override
     public void setNamespace(Object handle) {
         super.setNamespace(handle);
         ClassDiagramGraphModel gm = this.getDBGraphModel();
@@ -153,6 +158,7 @@
      * @see org.argouml.uml.diag​ram.ui.UMLDiagram#ge​tUmlActions()
      * @return An array of actions.
      */
+ @Override
     protected Object[] getUmlActions() {
         Object actions[] = {
             actionSchema,
@@ -185,7 +191,7 @@
         // This calls the getters to fetch actions even though the
         // action variables are defined is instances of this class.
         // This is because any number of action getters could have
- // been overridden in a descendant and it is the action from
+ // been overridden in a descendent and it is the action from
         // that overridden method that should be returned in the array.
         Object[] actions = {
             getActionAssociation(),

Modified: branches/026/src/org​/dbuml/argo/uml/ui/A​ctionCreateColumn.ja​va
Url: http://argouml-db.ti​gris.org/source/brow​se/argouml-db/branch​es/026/src/org/dbuml​/argo/uml/ui/ActionC​reateColumn.java?vie​w=diff&pathrevh​&r1g&r2h
====================​====================​====================​=================---​ branches/026/src/org​/dbuml/argo/uml/ui/A​ctionCreateColumn.ja​va (original)
+++ branches/026/src/org​/dbuml/argo/uml/ui/A​ctionCreateColumn.ja​va 2009-08-25 08:17:16-0700
@@ -75,10 +75,11 @@
         Project project = ProjectManager.getMa​nager().getCurrentPr​oject();

         Object intType = project.findType("int");
- Object model = project.getModel();
+// Object model = project.getModel();
         Object attr
- Model.getCoreFactory​().buildAttribute(
+ Model.getCoreFactory​().buildAttribute2(
                 classifier,
+// model,
                 intType);
         TargetManager.getIns​tance().setTarget(at​tr);
         CreateActions.create​Column(attr);

Modified: branches/026/src/org​/dbuml/argo/uml/ui/A​ctionCreateEdge.java​
Url: http://argouml-db.ti​gris.org/source/brow​se/argouml-db/branch​es/026/src/org/dbuml​/argo/uml/ui/ActionC​reateEdge.java?view=​diff&pathrevh​&r1g&r2h
====================​====================​====================​=================---​ branches/026/src/org​/dbuml/argo/uml/ui/A​ctionCreateEdge.java​ (original)
+++ branches/026/src/org​/dbuml/argo/uml/ui/A​ctionCreateEdge.java​ 2009-08-25 08:17:16-0700
@@ -6,9 +6,8 @@
 package org.dbuml.argo.uml.ui;


+//import org.argouml.ui.CmdSetMode;
 import javax.swing.Action;
-import org.argouml.uml.diag​ram.ui.ActionSetMode​;
-
 /**
  *
  * @author jgunderson
@@ -19,22 +18,8 @@
      * @param cmd
      * @param hint
      */
- public ActionCreateEdge(ActionSetMode cmd, String hint) {
- super(cmd);
+ public ActionCreateEdge(Action action, String hint) {
+ super(action);
         putValue(Action.SHOR​T_DESCRIPTION, hint);
- //putValue(Action.SMALL_ICON, new ImageIcon(getClass()​.getResource("/org/d​buml/argo/uml/ui/Tab​le1.gif")));
     }
-
- //
- // The following is called on selection of the action button, not after the dependency
- // is added to the diagram. Same is tru of actionPerformed( ) of the CmdSetMode.
- //
-
-// /**
-// *
-// * @param event
-// */
-// public void actionPerformed(java​.awt.event.ActionEve​nt event) {
-// super.actionPerformed(event);
-// }
 }

Modified: branches/026/src/org​/dbuml/argo/uml/ui/A​ctionCreatePKEY.java​
Url: http://argouml-db.ti​gris.org/source/brow​se/argouml-db/branch​es/026/src/org/dbuml​/argo/uml/ui/ActionC​reatePKEY.java?view=​diff&pathrevh​&r1g&r2h
====================​====================​====================​=================---​ branches/026/src/org​/dbuml/argo/uml/ui/A​ctionCreatePKEY.java​ (original)
+++ branches/026/src/org​/dbuml/argo/uml/ui/A​ctionCreatePKEY.java​ 2009-08-25 08:17:16-0700
@@ -83,9 +83,8 @@
         Project project = ProjectManager.getMa​nager().getCurrentPr​oject();

         Object intType = project.findType("int");
- Object model = project.getModel();
         Object attr
- Model.getCoreFactory​().buildAttribute(
+ Model.getCoreFactory​().buildAttribute2(
                 classifier,
                 intType);
         TargetManager.getIns​tance().setTarget(at​tr);

Modified: branches/026/src/org​/dbuml/argo/uml/ui/C​ommandEdge.java
Url: http://argouml-db.ti​gris.org/source/brow​se/argouml-db/branch​es/026/src/org/dbuml​/argo/uml/ui/Command​Edge.java?view=diff​&pathrevh&r1g​&r2h
====================​====================​====================​=================---​ branches/026/src/org​/dbuml/argo/uml/ui/C​ommandEdge.java (original)
+++ branches/026/src/org​/dbuml/argo/uml/ui/C​ommandEdge.java 2009-08-25 08:17:16-0700
@@ -7,6 +7,7 @@

 import org.argouml.uml.diag​ram.ui.ActionSetMode​;

+//public class CommandEdge extends org.argouml.ui.CmdSetMode {
 public class CommandEdge extends ActionSetMode {

     /**

Modified: branches/026/src/org​/dbuml/argo/uml/ui/D​BModule.java
Url: http://argouml-db.ti​gris.org/source/brow​se/argouml-db/branch​es/026/src/org/dbuml​/argo/uml/ui/DBModul​e.java?view=diff​&pathrevh&r1g​&r2h
====================​====================​====================​=================---​ branches/026/src/org​/dbuml/argo/uml/ui/D​BModule.java (original)
+++ branches/026/src/org​/dbuml/argo/uml/ui/D​BModule.java 2009-08-25 08:17:16-0700
@@ -18,6 +18,10 @@
 import org.dbuml.argo.model​.ArgoDBModelFacade;
 import org.dbuml.argo.uml.d​iagram.ui.FigureFact​ory;
 import org.dbuml.base.i18n.Translator;
+import java.util.Collection;
+import java.util.ArrayList;
+import java.util.List;
+import javax.swing.ImageIcon;


 /**
@@ -65,6 +69,9 @@
         //Argo issue 4822
         //dbuml:removed
 // ResourceLoaderWrappe​r.addResourceLocatio​n("/org/dbuml/argo/I​mages");
+// Re-added by Jules
+ ResourceLoaderWrappe​r.addResourceLocatio​n("/org/dbuml/argo/I​mages");
+

         //dbuml:removed
 // org.argouml.ui.Proje​ctBrowser.getInstanc​e().getExplorerPane(​).getExplorerTree().​setCellRenderer(
@@ -85,7 +92,9 @@
         if (_schemaMenu == null) {
             _schemaMenu = new JMenuItem("New Database Schema Diagram",
 // ResourceLoaderWrappe​r.lookupIconResource​("ClassDiagram"));
- ResourceLoaderWrappe​r.lookupIconResource​("DBSchemaDiagram"))​;
+// ResourceLoaderWrappe​r.lookupIconResource​("DBSchemaDiagram"))​;
+ new ImageIcon(getClass()​.getResource("/org/d​buml/argo/Images/DBS​chemaDiagram.gif")))​;
+
         }
         if (_schemaAction == null) {
             _schemaAction = new DBSchemaDiagramMenu();
@@ -99,7 +108,8 @@
         if (_deployMenu == null) {
             _deployMenu = new JMenuItem("New Database Deployment Diagram",
 // ResourceLoaderWrappe​r.lookupIconResource​("DeploymentDiagram"​));
- ResourceLoaderWrappe​r.lookupIconResource​("DBDeploymentDiagra​m"));
+// ResourceLoaderWrappe​r.lookupIconResource​("DBDeploymentDiagra​m"));
+ new ImageIcon(getClass()​.getResource("/org/d​buml/argo/Images/DBD​eploymentDiagram.gif​")));
         }
         if (_deployAction == null) {
             _deployAction = new DBDeploymentDiagramMenu();
@@ -175,14 +185,24 @@
         // Create a root model.
         Object model = Model.getModelManage​mentFactory().create​Model();
         Model.getCoreHelper(​).setName(model,"unt​itledmodel");
- p.setRoot(model);
+ Collection roots = new ArrayList();
+ //p.setRoot(model);
+ roots.add(model);
+ p.setRoots(roots);
+
         p.setCurrentNamespace(model);
         p.addMember(model);
+
+ List pModelList = p.getUserDefinedModelList();
+ Object pModel = pModelList.get(0);

         // create and add DB-UML diagrams.
- org.dbuml.argo.uml.d​iagram.ui.DBDeployme​ntDiagram d = new org.dbuml.argo.uml.d​iagram.ui.DBDeployme​ntDiagram(p.getModel​());
- p.addDiagram(d);
- p.addDiagram(new org.dbuml.argo.uml.d​iagram.ui.DBSchemaDi​agram(p.getModel()))​;
+// org.dbuml.argo.uml.d​iagram.ui.DBDeployme​ntDiagram d = new org.dbuml.argo.uml.d​iagram.ui.DBDeployme​ntDiagram(p.getModel​());
+ org.dbuml.argo.uml.d​iagram.ui.DBDeployme​ntDiagram d = new org.dbuml.argo.uml.d​iagram.ui.DBDeployme​ntDiagram(pModel);
+// p.addDiagram(d);
+ p.addMember(d);
+// p.addDiagram(new org.dbuml.argo.uml.d​iagram.ui.DBSchemaDi​agram(p.getModel()))​;
+ p.addMember(new org.dbuml.argo.uml.d​iagram.ui.DBSchemaDi​agram(pModel));
         p.setActiveDiagram(d);

         //refresh the project, otherwise nothing is shown in the explorer.

Modified: branches/026/src/org​/dbuml/argo/uml/ui/D​BUMLTreeCellRenderer​.java
Url: http://argouml-db.ti​gris.org/source/brow​se/argouml-db/branch​es/026/src/org/dbuml​/argo/uml/ui/DBUMLTr​eeCellRenderer.java?​view=diff&pathre​vh&r1g&r2h
====================​====================​====================​=================---​ branches/026/src/org​/dbuml/argo/uml/ui/D​BUMLTreeCellRenderer​.java (original)
+++ branches/026/src/org​/dbuml/argo/uml/ui/D​BUMLTreeCellRenderer​.java 2009-08-25 08:17:16-0700
@@ -30,7 +30,8 @@
     /** Creates a new instance of DBUMLTreeCellRenderer */
     public DBUMLTreeCellRenderer() {
     }
-
+
+ @Override
     public Component getTreeCellRendererComponent(
         JTree tree,
         Object value,

Modified: branches/026/src/org​/dbuml/base/model/Co​lumn.java
Url: http://argouml-db.ti​gris.org/source/brow​se/argouml-db/branch​es/026/src/org/dbuml​/base/model/Column.j​ava?view=diff&pa​threvh&r1g&r​2h
====================​====================​====================​=================---​ branches/026/src/org​/dbuml/base/model/Co​lumn.java (original)
+++ branches/026/src/org​/dbuml/base/model/Co​lumn.java 2009-08-25 08:17:16-0700
@@ -52,6 +52,7 @@
      */
     private boolean unique = false;
     private boolean partOfUniqueConstraint = false;
+
     /**
      * The owning table.
      */
@@ -60,6 +61,12 @@
     // Does the column allow nulls in the database?
     private boolean allowNulls = true;

+ // Is this an unsigned number?
+ private boolean unsigned = false;
+
+ // Is this an auto increment number?
+ private boolean autoIncrement = false;
+

     // the combination of isHomogeneousArray of true, with a name of null
     // means that the status of homogeneous is unknown.
@@ -84,8 +91,10 @@
      */
     public Column(final String name) {
         setName(name);
+ this.initBasicProps();
     }

+
     /**
      * Creates a new instance of with a given name, model element,
      * properties. Used when retrieving elements.
@@ -98,6 +107,16 @@
         super(sName, objModel, properties);
     }

+ /** Sets default properties to be used in the tag values.
+ *
+ */
+ protected void initBasicProps() {
+ this.setProperty(PROP_LENGTH, null);
+ this.setProperty(thi​s.PROP_DEFAULT, null);
+ this.setProperty(thi​s.PROP_PRECISION, null);
+ this.setProperty(thi​s.PROP_SCALE, null);
+ }
+
     /**
      * Determines whether or not this column allows null values. Primary keys
      * are excluded in teh check.
@@ -124,13 +143,45 @@

     /**
      * Sets the flag of for allowing null values.
- * @param flag true or lase to set the flag.
+ * @param flag true or false to set the flag.
      */
     public void setAllowsNulls(boolean flag) {
         this.allowNulls = flag;
     }

     /**
+ * Sets the flag for an unsigned number.
+ * @param flag true or false to set the flag.
+ */
+ public void setUnsigned(boolean flag) {
+ this.unsigned = flag;
+ }
+
+ /**
+ * Checks whether this column is an unsigned number.
+ *
+ */
+ public boolean isUnsigned() {
+ return this.unsigned;
+ }
+
+ /**
+ * Checks whether this column is an auto increment number.
+ *
+ */
+ public boolean isAutoIncrement() {
+ return this.autoIncrement;
+ }
+
+ /**
+ * Sets the flag for an autoIncrement number.
+ * @param flag true or false to set the flag.
+ */
+ public void setAutoIncrement(boolean flag) {
+ this.autoIncrement = flag;
+ }
+
+ /**
      * Determines whether or not this column is part of unique constraint.
      * @return true or false value.
      */

Modified: branches/026/src/org​/dbuml/base/model/DB​Element.java
Url: http://argouml-db.ti​gris.org/source/brow​se/argouml-db/branch​es/026/src/org/dbuml​/base/model/DBElemen​t.java?view=diff​&pathrevh&r1g​&r2h
====================​====================​====================​=================---​ branches/026/src/org​/dbuml/base/model/DB​Element.java (original)
+++ branches/026/src/org​/dbuml/base/model/DB​Element.java 2009-08-25 08:17:16-0700
@@ -95,7 +95,7 @@

     /**
      * Sets a property value. If the property doesn't exist it is created, if it
- * does exist it is overwritten.
+ * exists it is overwritten.
      *
      * @param name The Property name
      * @param value The new Property value

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

svn commit: r68 - branches/026: . src/org/dbuml/argo/language src/org/dbuml/argo/model src/org/dbuml/argo/uml/diagram/ui src/org/dbuml/argo/uml/ui src/org/dbuml/base/model jgrengbondai Jules Grengbondai 2009-08-25 08:17:17 PDT
Messages per page: