I was slow to approve this message. Ken W K Lee is now also allowed to post.

       /Linus, moderator of the dev list.

2009/2/24 Ken W K Lee <[email protected]>

> Hi,
>
> I'm working on some modules that manipulate class diagrams. During the
> development, I would sometimes like to use a simple Main() to load an
> argouml project and run some test cases against it. I have tried the
> following codes but it always says the profile has not been initialized
> (i.e. "ProfileFacade's manager isn't initialized!"). What is the proper
> way of loading a project without loading the whole Argouml application?
>
> Thanks in advance
>
>
> Ken
> -----
>
>
>        String FILE = "test.zargo";
>
>        try {
>            File file = new File(FILE);
>            if (file.exists()) {
>                System.out.println("File exists");
>            }
>            org.argouml.kernel.Project prj =
>
> org.argouml.kernel.ProjectFactory.getInstance().createProject();
>            prj.setFile(file);
>
> org.argouml.kernel.ProjectManager.getManager().setCurrentProject(prj);
>
>            System.out.println("URI: " + prj.getURI());
>            System.out.println("Name: " + prj.getName());
>            System.out.println("Diagrams #: " + prj.getDiagrams().size());
>        } catch (Exception exc) {
>            exc.printStackTrace();
>        }
>
> ------------------------------------------------------
>
> http://argouml.tigris.org/ds/viewMessage.do?dsForumId=450&dsMessageId=1219975
>
> 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=1284393

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]]

Reply via email to