Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Expose DefaultUpdateBehavior.workspaceSynchronizer to Extenders
Expose DefaultUpdateBehavior.workspaceSynchronizer to Extenders [message #910962] Mon, 10 September 2012 17:59 Go to next message
Rob Cernich is currently offline Rob CernichFriend
Messages: 40
Registered: September 2011
Member
Hey all,

I've got a situation where I have three resources that are active within my editor:
* model
* diagram
* other

My editor is opened against the model (I override the default persistency behavior).

The way I read the default synchronizer behavior, the editor input uri will be changed if any of the resources in the resource set are moved, regardless of whether or not the resource moved was actually the input for the editor. (In my case, I really don't care whether or not the diagram file is changed outside the editor, as I do not want to synchronize those changes. The user shouldn't be messing with the diagram file anyway, especially when the editor is opened.) Also, I'd like to update the URI for the diagram resource, in the event the model URI is updated (they move in parallel). I also don't want the diagram unloaded if the diagram resource is deleted (ok, though if the model resource is deleted).

As far as that third, "other," resource goes, I'm doing some crazy stuff with that (it's actually a "derived" resource produced by a builder). I would like to be notified of changes, but want to handle them in a very specific fashion.

I think this would be simpler for me if creation of the workspaceSynchronizer was delegated to a create method that could be overridden by exenders.

Opinions?

Best,
Rob
Re: Expose DefaultUpdateBehavior.workspaceSynchronizer to Extenders [message #911168 is a reply to message #910962] Tue, 11 September 2012 05:50 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1931
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Rob,

to achieve that now you could override initializeEditingDomain() in
DefaultUpdateBehavior. But this does a lot more and it would be nice to have
a factory method for synchronizer creation seperated that is overridable by
clients. Would you please file that as an enhancement bugzilla?

Thanks,
Michael
Re: Expose DefaultUpdateBehavior.workspaceSynchronizer to Extenders [message #911949 is a reply to message #910962] Wed, 12 September 2012 16:26 Go to previous messageGo to next message
Rob Cernich is currently offline Rob CernichFriend
Messages: 40
Registered: September 2011
Member
Done: https://bugs.eclipse.org/bugs/show_bug.cgi?id=389426

Thanks!
Re: Expose DefaultUpdateBehavior.workspaceSynchronizer to Extenders [message #912311 is a reply to message #911949] Thu, 13 September 2012 10:18 Go to previous messageGo to next message
Joao S is currently offline Joao SFriend
Messages: 51
Registered: January 2011
Member
Hello,

I have a question that I think it might me related to this thread.

If I have two resources:

->Model
->Diagram

If model file location is changed, how do i manage to update href in the diagram?

Is it done automatically? If so, how?

Or do I have to do it manually?

Thanks,
Joao
Re: Expose DefaultUpdateBehavior.workspaceSynchronizer to Extenders [message #912343 is a reply to message #912311] Thu, 13 September 2012 11:43 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1931
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Joao,

that depends on how you change the model file location. If you simply do a
file rename or move you will have to adapt references manually. Using EMF
functionality (adding eobjects to other resource) will let EMF case about
that automatically.

HTH,
Michael
Re: Expose DefaultUpdateBehavior.workspaceSynchronizer to Extenders [message #912424 is a reply to message #912343] Thu, 13 September 2012 14:50 Go to previous message
Joao S is currently offline Joao SFriend
Messages: 51
Registered: January 2011
Member
Hi Michael,

Using EMF functionality fits my needs.

Thanks,
Joao
Previous Topic:Redraw widgets for different types of input in Properties view
Next Topic:Graphiti as View instead of Editor?
Goto Forum:
  


Current Time: Thu Apr 18 16:58:25 GMT 2024

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

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

Back to the top