Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Resource rename and non-text based editors
Resource rename and non-text based editors [message #512841] Mon, 08 February 2010 07:21 Go to next message
Franck Mising name is currently offline Franck Mising name
Messages: 91
Registered: July 2009
Location: France
Member
Hi all,

What is the best way to extend the resource rename refactoring so that it detects a resource has been modified in an editor that is not using a text file buffer?

The ltk ResourceChange.ValidationState checks for dirty file buffers but I wrote structured editors that work with an object model constructed from the resource content.

I am wondering why the core ltk rename processor or some core rename participant isn't going through the workbench dirty saveables rather than looking for dirty text file buffers?

Should I write a refactoring participant that checks with my edited object mgr for dirty objects?

Franck

[Updated on: Mon, 08 February 2010 09:07]

Report message to a moderator

Re: Resource rename and non-text based editors [message #512869 is a reply to message #512841] Mon, 08 February 2010 09:24 Go to previous message
Franck Mising name is currently offline Franck Mising name
Messages: 91
Registered: July 2009
Location: France
Member
In fact I just found this in the "Logical Model Integration" help page:

"Logical model providers may use the Saveable API to manage the Save lifecycle of their model elements. If they do so, they should adapt their Saveable instances to a ResourceMapping to ensure that repository providers (and other tools) can determine which resources would be affected if the saveable was saved."

Wouldn't it make sense for the refactoring operations to do just that - try to adapt dirty saveables to ResourceMappings and see if the resource targeted by the refactoring operation is contained in a dirty mapping?
Previous Topic:Use ID on the extension element or as an attribute?
Next Topic:drasys.or.prob.NormalDistribution
Goto Forum:
  


Current Time: Sat Oct 25 12:04:19 GMT 2014

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

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