Visual Paradigm Logo
     Build Quality Applications Faster, Better and Cheaper
 
Home | Products | Download | Documentation | Support | Resources | Partners | Quick Tour | Shop | Company |  
 
   Visual Paradigm Discussion Forum
  Login   [ Register ] Email: Password: Log me on automatically I lost my password  
Advanced Search
UnitTesting plugins?  
Forum Index -> Plug-in & Open API
Author Message
Anonymous

Hello

I am developing a plugin for Visual Paradigm and I would like to develop some tests for it. I had in mind tests that would load a saved *.vpp file and unittest (with JUnit) some model transformations that I'm doing.

Is there a way to load a project using OpenAPI? I didn't find a method to do that?

Regards,
Adam
 
Jick


Joined: 2005/04/29
Messages: 2881

Offline

Hi Adam,

Please try:
ApplicationManager.getProjectManager().openProject()
or
ApplicationManager.getProjectManager().openProject(File file);

The first one will show a filechooser. It returns true if the user selected a valid project file and the project is opened.

The second one will return true if the project is opened.

Best regards,
Jick

Visual Paradigm International Ltd.
http://www.visual-paradigm.com

Build Quality Applications Faster, Better and Cheaper
 
adamw


Joined: 2007/11/15
Messages: 4

Offline

Thanks for the reply
 
Anonymous

Yes but...
Is it possible, in a junit, to start an ApplicationManager: at this stage I can get it through ApplicationManager.instance() and this method returns NULL, wich is the expected behavior as I'm in a junit.
Regards
Joao
 
 
   Forum Index -> Plug-in & Open API
Go to:   
Powered by JForum 2.1.4 © 2005 - Rafael Steil