Login | Register
My pages Projects Community openCollabNet

Discussions > modules-dev > Re: [argouml-modules-dev] get model elements in the class diagram

argouml
Discussion topic

Back to topic list

Re: [argouml-modules-dev] get model elements in the class diagram

Author bobtarling
Full name Bob Tarling
Date 2005-11-12 07:14:17 PST
Message Silly me. Try

  String packageName = "";
  Object ns = Model.getFacade().ge​tNamespace(myElement​)
  while (Model.getFacade().i​sAPackage(ns)) {
    if (packageName.length != 0) packageName = "." + packageName;
    packageName = Model.getFacade().getName(ns) + packageName;
  }

On 11/12/05, Bob Tarling <bob dot tarling at gmail dot com> wrote:
> I don't know of any utilities at the moment (although others may correct me)
>
> For each model element returned you will have to something like
> (haven't tested) -
>
> String packageName = "";
> Object ns = Model.getFacade().ge​tNamespace(myElement​)
> while (Model.getFacade().i​sAPackage(ns)) {
> if (packageName.length == 0) packageName += ".";
> packageName += Model.getFacade().getName(ns);
> }
>
> then test the packageName and reject as you wish.
>
> Guys - do we have any need for something like this, or have already?
> Would it be a sensible addition to the model interface
>
> e.g. Model.getFacade().ge​tQualifiedName(myEle​ment);
>
>
> Bob.
>

« Previous message in topic | 7 of 9 | Next message in topic »

Messages

Show all messages in topic

get model elements in the class diagram Thapelo Tlhong <tt102 at ecs dot soton dot ac dot uk> Thapelo Tlhong <tt102 at ecs dot soton dot ac dot uk> 2005-11-11 19:47:57 PST
     Re: [argouml-modules-dev] get model elements in the class diagram bobtarling Bob Tarling 2005-11-12 03:30:25 PST
         Re: [argouml-modules-dev] get model elements in the class diagram Thapelo Tlhong <tt102 at ecs dot soton dot ac dot uk> Thapelo Tlhong <tt102 at ecs dot soton dot ac dot uk> 2005-11-12 04:00:22 PST
             Re: [argouml-modules-dev] get model elements in the class diagram bobtarling Bob Tarling 2005-11-12 05:02:16 PST
                 Re: [argouml-modules-dev] get model elements in the class diagram Thapelo Tlhong <tt102 at ecs dot soton dot ac dot uk> Thapelo Tlhong <tt102 at ecs dot soton dot ac dot uk> 2005-11-12 06:35:12 PST
                     Re: [argouml-modules-dev] get model elements in the class diagram bobtarling Bob Tarling 2005-11-12 07:09:53 PST
                         Re: [argouml-modules-dev] get model elements in the class diagram bobtarling Bob Tarling 2005-11-12 07:14:17 PST
                             Re: [argouml-modules-dev] get model elements in the class diagram Thapelo Tlhong <tt102 at ecs dot soton dot ac dot uk> Thapelo Tlhong <tt102 at ecs dot soton dot ac dot uk> 2005-11-16 19:43:39 PST
                         Re: [argouml-modules-dev] get model elements in the class diagram Thapelo Tlhong <tt102 at ecs dot soton dot ac dot uk> Thapelo Tlhong <tt102 at ecs dot soton dot ac dot uk> 2005-11-12 08:44:09 PST
Messages per page: