[gme-users] Create Model/Folder programmatically
Kevin Smyth
ksmyth at isis.vanderbilt.edu
Mon Feb 7 10:27:48 CST 2011
Hi Lucy,
The classes in org.isis.gme.bon are intended for use by interpreter authors,
as they are easier to use than the classes in org.isis.gme.mga.
Here's an example for the MetaGME paradigm:
public void invokeEx(JBuilder builder, JBuilderObject focus,
Collection selected, int param) {
JBuilderModel model = builder.getRootFolder().createNewModel(
"ParadigmSheet");
model.setName("NewModel");
JBuilderAtom fco = model.createNewAtom("FCO");
fco.setName("NewFCO");
}
Kevin
From: Lucy_efrizoni [mailto:lusi_dl at yahoo.co.id]
Sent: Tuesday, February 01, 2011 3:43 AM
To: Kevin Smyth; gme-users
Cc: billy.montolalu at gmail.com
Subject: Create Model/Folder programmatically
Dear Kevin,
We have tried to make a folder with following codes and it is work well but
the thing we need to know is how to create other objects other than folder
like atom/model, connection, and fill attribute after atom/model successful
is created.
public void invokeEx(JBuilder builder, JBuilderObject focus,
Collection selected, int param) {
// TODO Auto-generated method stub
MgaFolder dest_root = builder.getProject().getRootFolder();
MgaMetaFolder meta_folder =
builder.getProject().getRootMeta().getRootFolder().getDefinedFolders().getIt
em(0);
MgaFolder folder = dest_root.createFolder(meta_folder);
folder.setName("created_folder1");
folder = dest_root.createFolder(meta_folder);
folder.setName("created_folder2");
}
Your advices, quidances, hints are very much appreciated.
Thank you,
Lusiana Efrizoni
* Software Engineering Department
Faculty of Computer Science and Information Systems
Universiti Teknologi Malaysia
81300 UTM Skudai Johor, Malaysia (Phone: +60167825101)
* STMIK-AMIK Riau Pekanbaru
Jl. Purwodadi Indah Km. 10 Panam Pekanbaru
Riau - Indonesia (Phone: +628127516817)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.isis.vanderbilt.edu/pipermail/gme-users/attachments/20110207/c3e62710/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4934 bytes
Desc: not available
Url : http://list.isis.vanderbilt.edu/pipermail/gme-users/attachments/20110207/c3e62710/attachment.bin
More information about the gme-users
mailing list