Hi Christian, no this change would brake the property panel for method bodies in UML1: the language field would disappear. (Both Comment and Method have a "body" attribute.)
It's strange: the original code seems to work when I run ArgoUML from command line, but when I run inside eclipse, then the Comment property panel gets broken. Thomas -------- Original-Nachricht -------- > Datum: Fri, 4 Jun 2010 14:51:02 +0200 > Von: "Christian López Espínola" <[email protected]> > An: [email protected] > Betreff: Re: [argouml-dev] help on property panels > Hi Bob, > > On Fri, Jun 4, 2010 at 2:26 PM, Bob Tarling <[email protected]> wrote: > > > getType should now be returning a class not a string. You could try > > > > Try changing that to "else if ("body".equals(prop.getName()) && > > prop.getType() instanceof String)" > > > > > prop.getType() returns null. > I just removed the check and it worked: > > } else if ("body".equals(prop.getName()) ){ // && > "String".equals(prop.getType())) { > > but I don't know the implications that it could have. Is OK to commit > this? > > > > > Bob > > > > On 4 June 2010 02:42, Thomas Neustupny <[email protected]> wrote: > > > Hi Christian, > > > > > > thank you for your answer. In detail my problem is, that in > > SwingUIFactory the clause > > > "else if ("body".equals(prop.getName()) && > > "String".equals(prop.getType()))" fails, because prop.getType() is not > > "String". How can I achieve that? > > > > > > (Don't bother with the getBody/setBody methods in eUML, I'm on it.) > > > > > > Thomas > > > > > > -------- Original-Nachricht -------- > > >> Datum: Fri, 4 Jun 2010 00:58:04 +0200 > > >> Von: "Christian López Espínola" <[email protected]> > > >> An: [email protected] > > >> Betreff: Re: [argouml-dev] help on property panels > > > > > >> On Thu, Jun 3, 2010 at 2:45 PM, Thomas Neustupny <[email protected]> > wrote: > > >> > > >> > Hi, > > >> > > > >> > for UML2, I wanted to create a prop panel for OpaqueBehavior. It > gets > > >> > displayed and shows an icon, but I failed showing the "body" > > textfield. > > >> The > > >> > property "body" has no type, but I explicitely added <textarea > > >> name="body" > > >> > type="String" /> in metamodel2.xml. I wanted to take care about the > > >> > getters/setters in the model subsystem later. Can someone help me > > >> > (Christian, Bob)? > > >> > > > >> > I committed my work, it's all UML2 only so it doesn't get in the > way. > > >> Also, > > >> > it's not very urgent and can wait until after your holidays, Bob. > > >> > > > >> > > > >> Hi Thomas, > > >> In > > >> > > > argouml-core-umlpropertypanels\src\org\argouml\core\propertypanels\ui\SwingUIFactory.java, > > >> L133, is where the GUI object representing the body is created. It > uses > > >> UMLCommentBodyDocument (maybe UMLCommentBodyDocument should be > renamed > > to > > >> UMLBodyDocument btw), which uses > > >> > > >> Model.getCoreHelper().setBody(getTarget(), text); > > >> > > >> and > > >> > > >> Model.getFacade().getBody(getTarget()); > > >> > > >> So if the EUML model implementation implements getBody and setBody > for > > the > > >> desired target (I suppose that this would be an instance of Behavior > or > > >> OpaqueBehavior) it should work as a charm. > > >> > > >> Let me know if you need more help. I have not fully understood your > > >> problem > > >> and I'm not familiar with UML2 metamodel nor EUML. > > >> > > >> > > >> > > >> > Thanks in advance, > > >> > Thomas > > >> > -- > > >> > GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT! > > >> > Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01 > > >> > > > >> > ------------------------------------------------------ > > >> > > > >> > > > >> > > > http://argouml.tigris.org/ds/viewMessage.do?dsForumId=450&dsMessageId=2616427 > > >> > > > >> > To unsubscribe from this discussion, e-mail: [ > > >> > [email protected]]. > > >> > To be allowed to post to the list contact the mailing list > moderator, > > >> > email: [[email protected]] > > >> > > > >> > > >> > > >> > > >> -- > > >> Cheers, > > >> > > >> Christian López Espínola <penyaskito AT computer DOT org> > > >> http://twitter.com/penyaskito | http://penyaskitodice.wordpress.com > > >> > > >> ------------------------------------------------------ > > >> > > > http://argouml.tigris.org/ds/viewMessage.do?dsForumId=450&dsMessageId=2616599 > > >> > > >> To unsubscribe from this discussion, e-mail: > > >> [[email protected]]. > > >> To be allowed to post to the list contact the mailing list moderator, > > >> email: [[email protected]] > > > > > > -- > > > GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT! > > > Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01 > > > > > > ------------------------------------------------------ > > > > > > http://argouml.tigris.org/ds/viewMessage.do?dsForumId=450&dsMessageId=2616735 > > > > > > To unsubscribe from this discussion, e-mail: [ > > [email protected]]. > > > To be allowed to post to the list contact the mailing list moderator, > > email: [[email protected]] > > > > > > > ------------------------------------------------------ > > > > > http://argouml.tigris.org/ds/viewMessage.do?dsForumId=450&dsMessageId=2616837 > > > > To unsubscribe from this discussion, e-mail: [ > > [email protected]]. > > To be allowed to post to the list contact the mailing list moderator, > > email: [[email protected]] > > > > > > -- > Cheers, > > Christian López Espínola <penyaskito AT computer DOT org> > http://twitter.com/penyaskito | http://penyaskitodice.wordpress.com > > ------------------------------------------------------ > http://argouml.tigris.org/ds/viewMessage.do?dsForumId=450&dsMessageId=2616844 > > To unsubscribe from this discussion, e-mail: > [[email protected]]. > To be allowed to post to the list contact the mailing list moderator, > email: [[email protected]] -- GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT! Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01 ------------------------------------------------------ http://argouml.tigris.org/ds/viewMessage.do?dsForumId=450&dsMessageId=2616876 To unsubscribe from this discussion, e-mail: [[email protected]]. To be allowed to post to the list contact the mailing list moderator, email: [[email protected]]
