Hi Ken,
On Tue, Feb 24, 2009 at 10:55 AM, Ken W K Lee <[email protected]> wrote:
> 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?
You need to initialize some necessary subsystems.
In this case, you'll need to add a call to
new InitProfileSubsystem().init();
If you find more problems like this one, check the initialization done
at org.argouml.application.Main
Hope this helps.
> 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]]
>
--
Cheers,
Christian López Espínola <penyaskito>
------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=450&dsMessageId=1321243
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]]