tags:

views:

35

answers:

1

Hi

I am working on a project where we are using RSA 6.0.1.

I have to run the some set of tasks programmatically. I have open the emx file using UMLModeler.openModel(absoluteModelPath); Then do some editing and save through UMLModeler.getEditingDomain().run( new ResourceSetModifyOperation("Update Operation") {},Monitor); Then I refreshed the project through sourceProject.refreshLocal(IProject.DEPTH_INFINITE,monitor); till now things goes fine and finally when I am closing the model through UMLModeler.closeModel(objUMLModel); It is running this code but not closing the EMX file in the editor.

There is no error , no exception. Can any one please suggest me what can I do to close this emx file.

A: 

First, I would upgrade to 7.5.4 as the model concept goes away, in fact the method you are using is deprecated.

From the API documentation: closeModel(Model model) Deprecated. Since 7.5, use the closeModelResource(Element) method, instead

Using the newer methods might resolve you problems. Additionally, do you try refreshing the workspace? Either manually by right clicking on the project and selecting refresh or doing it with code.

Finally the most likely issues is that there are multiple 'handles' to the model. Closing yours does not close the editor or project explorer handle. I do not work for IBM so I cannot know this for sure. You could test this by opening it in the project explorer, open it with your code, then close it in the explorer manually, and only then try running your transaction on the model and then closing it. What does the explorer look like when it closes?

Or post more details and maybe I can code my own example. I would try the debugging first and also post this on the IBM developer works site. They are likely going to tell you to upgrade though. :)

Ted Johnson

related questions