Okay everybody,

Here's what you will get:

- You will be able to define tagged values for umlElements directly
- You will be able to specialize every tagged value you like to be user defined. This will give you an TextField in the AndroMDA Tab table instead of a ComboBox so you have to edit this value! Don't use <default>xy</default> here, because as it should be user defined every update on the model will write xy to this value.

I will use a Stereotype "null" for this internally, so nobody should define a stereotype named "null". If you think this is not reasonable please tell me, I could change it to not use any stereotype at all, but with "null" this will suit neatly in the code already written.

Well, I am going to work on this now and hopefully will be able to post a new version to Gentleware tomorrow night.


The plugin still needs some refactoring, but the final version is reachable.

Stay tuned...

Cheers
Harald



<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE androMDA SYSTEM "androMDA.dtd">
<androMDA>
  <umlElement name="Attribute">
    <taggedValue tag="label" userDefined="true">
       <value>user defined</value>   
    </taggedValue>
    <stereotype name="XY">
      <taggedValue tag="test1">
        <value>bla</value>
      </taggedValue>
      <taggedValue tag="editable" userDefined="true"/>
    </stereotype>
  </umlElement>
  <umlElement name="UmlClass">
    <stereotype name="Entity">
      <taggedValue tag="test2">
        <value>bla</value>
      </taggedValue>
    </stereotype>
  </umlElement>
</androMDA>

<?xml version="1.0" encoding="ISO-8859-1"?>
<!ELEMENT androMDA (umlElement+)>

<!ELEMENT umlElement (taggedValue*,stereotype*)>
<!ATTLIST umlElement
        name CDATA #REQUIRED
>
<!ELEMENT stereotype (taggedValue+)>
<!ATTLIST stereotype
        name CDATA #REQUIRED
>
<!ELEMENT taggedValue (value*,default?)>
<!ATTLIST taggedValue
        tag CDATA #REQUIRED
    userDefined (true|false) #IMPLIED
>
<!ELEMENT value (#PCDATA)>
<!ELEMENT default (#PCDATA)>


Harald Weyhing wrote:
Hi Mark,

so what you expect to work is that you can set tagged values to umlElement types without specifying any stereotype. So for your Example you want to see the tagged value "label" in whenever you select an Attribute without taking the stereotype in concern. If it's stereotype is "XY" you want to see "label" and "test1".

Sounds reasonable to me and this should not be too much work. Currently I do have a lot of things to do, but I will try to solve this for you during this weekend.

stay tuned

Cheers Harald




Mark Hofmann wrote:
Hi Harald,
thanks for your feedback.
I just tried to use the plugin with the following dtd + xml: 

<?xml version="1.0" encoding="ISO-8859-1"?>
<!ELEMENT androMDA (umlElement+)>

<!ELEMENT umlElement (taggedValue*,stereotype*)>
<!ATTLIST umlElement
        name CDATA #REQUIRED
  

<!ELEMENT stereotype (taggedValue*)>
<!ATTLIST stereotype
        name CDATA #REQUIRED
  

<!ELEMENT taggedValue (value+,default?)>
<!ATTLIST taggedValue
        tag CDATA #REQUIRED
  

<!ELEMENT value (#PCDATA)>
<!ELEMENT default (#PCDATA)>


<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE androMDA SYSTEM "androMDA.dtd">
<androMDA>
  <umlElement name="Attribute">
    <taggedValue tag="label">
        <value>user defined</value>
    </taggedValue>
    <stereotype name="XY">
      <taggedValue tag="test1">
        <value>bla</value>
      </taggedValue>
    </stereotype>
  </umlElement>
  <umlElement name="UmlClass">
    <stereotype name="Entity">
      <taggedValue tag="test2">
        <value>bla</value>
      </taggedValue>
    </stereotype>
  </umlElement>
</androMDA>


This gives me the following exception:

2003-10-07 10:35:45,827 INFO  [main              ]: [INFO] Loaded plug-ins: 
com.gentleware.poseidon.uml14 (2.0/1); com.gentleware.poseidon.revengjava 
(2.0/1); com.gentleware.poseidon.uml.reveng (2.0/1); 
com.gentleware.poseidon.enhancedEditor (2.0/1); com.gentleware.umldoc 
(2.0.3/2.0.3); com.gentleware.AndroMDA (1/1)
2003-10-07 10:35:46,338 ERROR [main              ]: 
java.lang.NullPointerException
2003-10-07 10:35:46,340 ERROR [main              ]:     at 
com.gentleware.andromda.a.try.endElement(Unknown Source)
2003-10-07 10:35:46,340 ERROR [main              ]:     at 
org.apache.xerces.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:579)


When I leave out the part
    <taggedValue tag="label">
        <value>user defined</value>
    </taggedValue>
everything works ok.

Our project schedule has changed a bit and everything is more relaxed now, so 
don't feel pressured. However, it would be great if the above configuration 
could be used some day ;-)

Cheers,

Mark 


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Andromda-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/andromda-user

  


Reply via email to