Forum Index - Topic Index How to use of Astah (Pro/SysML/GSN/Com) rapidly create operations/attributes part2 |
Threaded | Newest First | Previous Topic | Next Topic | Bottom |
Poster | Thread |
---|---|
xenocide | Posted on: 2012/10/15 15:46 |
Just popping in Joined: 2012/9/4 From: Posts: 15 |
rapidly create operations/attributes part2 As a preface, I am using Astah to model Perl software built with the Moose object system. Perl has no programmatic-ally enforced encapsulation, and Moose attributes can automatically create getters and setters depending on setting read-only, read-write, or bare (none).
I notice that Astah has the ability to create getter/setter from an attribute, this seems neat, but I have the problem that it uses Java-esque naming conventions. Perl's naming conventions are completely different. Generally with moose I leave my getter/setter to have the same name as the attribute. Can I change the template Astah uses to create these names? Even better can I set it so that when I create an attribute it automatically creates an appropriately named getter? |
Joba | Posted on: 2012/10/16 15:58 |
Developer Joined: 2006/6/6 From: Posts: 969 |
Re: rapidly create operations/attributes part2 Hi, thank you for your additional post.
Unfortunately there is no way to customize to do so, but I'd suggest you to use "Script Plug-in" which is the easiest way to access Astah via scripting languages. For details and download, please visit Astah Script Plug-in page. We've created java script for you, so here's the step to use. 1. Install Astah Script Plug-in 2. In the structure tree (Top left pane of Astah) select Attributes you want to change the setter/getter names of 3. Go to [Tool] - [Script], copy and paste the java script below (Customize the scripts in red below) and run it
Hope this helps. If you have any further questions, let us know. Cheers, SJ |
Threaded | Newest First | Previous Topic | Next Topic | Top |