Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » How to replace the current diagram or diagram content at runtime
icon4.gif  How to replace the current diagram or diagram content at runtime [message #729950] Tue, 27 September 2011 10:55 Go to next message
Lars Heinemann is currently offline Lars HeinemannFriend
Messages: 21
Registered: January 2011
Junior Member

Hi,

I have a rather complex model and want to show only parts of that model inside the diagram editor.
Currently I am able to show a specific part of the model but I'd like to know what I
have to do if I want to change the displayed model part at runtime?

I tried to recreate the diagram and editing domain and set this as input and it displays the figures correctly but I am not able to interact with the diagram (move etc) any longer afterwards as it spits always

!MESSAGE GFCommandStack.execute(Command) java.lang.IllegalStateException: Cannot modify resource set without a write transaction

Does anybody know how to get around this problem?

Many thanks in advance,
Lars
Re: How to replace the current diagram or diagram content at runtime [message #729970 is a reply to message #729950] Tue, 27 September 2011 11:47 Go to previous messageGo to next message
Hernan Gonzalez is currently offline Hernan GonzalezFriend
Messages: 188
Registered: October 2010
Location: Buenos Aires, Argentina
Senior Member
To have a diagram that includes part of the model is doable (and noy unusual) in Graphiti. But I'm not clear about what relation this requirement has with your problem. Are you saying that you can manipulate your diagram ok when it comprises all the model, but you get that error when it's a partial view? That would be strange. Are you interacting with the model by the standard Graphiti ways (features), or are you manipulating it programatically? If so, are you aware that all modifications must be done inside a EMF transaction ? (when you modify the diagram inside a Graphiti feature, the framework takes care of this, elsewhere you must do that explicitly)
Re: How to replace the current diagram or diagram content at runtime [message #729978 is a reply to message #729970] Tue, 27 September 2011 12:01 Go to previous message
Lars Heinemann is currently offline Lars HeinemannFriend
Messages: 21
Registered: January 2011
Junior Member

I always only show parts of the model. With the initial loaded diagram all works fine but when I switch to another part of the model it causes that issue.

What you say about the transactions sounds interesting. What I was really wondering about is that after "recreating" the diagram the move / layout features for example do not work any longer and spit that transaction error. I guess I have done something wrong when switching the diagram.

Previous Topic:From where to start?
Next Topic:Newbie question about a RCP Graphiti editor
Goto Forum:
  


Current Time: Sat Apr 20 04:42:35 GMT 2024

Powered by FUDForum. Page generated in 0.03168 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top