ModelProvider.validateChange limitations [message #675361] |
Tue, 31 May 2011 05:27  |
Eclipse User |
|
|
|
Hi all,
The "Model Roadmap for Logical Model Integration" has some very useful information on how to properly integrate an abstract model into Eclipse.
Unfortunately, the ability to validate operations performed on our model's resources using a ModelProvider is severely limited by the fact that its validateChange method is far from being called for all modifications.
Browsing through the code it seems that ModelProvider.validate change is essentially only called from IOperationHistory.execute, and there are many scenarios in which resource modifications are not going through that method.
For example it was decided that File/Folder creation should not be undoable anymore in 3.5, and following that change our ModelProvider is not consulted anymore when Project->New Folder is invoked in our projects.
It seems that the validation by a model provider has nothing to do with undo/redo or the operation history, is there a way the consultation of model providers could be made more universal?
Other typical use cases include refactoring operations, editors Save As, drag&drop...
Maybe WorkspaceModifyOperation would be the right place to consult the model provider?
|
|
|
|
|
|
Re: ModelProvider.validateChange limitations [message #756944 is a reply to message #756880] |
Tue, 15 November 2011 11:14  |
Eclipse User |
|
|
|
I am asking if core operations, ltk refactorings, and other Eclipse supplied frameworks that modify resources are still supposed / expected to check for a model provider and consult its validateChange method before changing a resource?
This is documented, the JDT refactorings do it, the history operations do it (see defect), but some operations have stopped doing it since Helios (see defect).
|
|
|
Powered by
FUDForum. Page generated in 0.06102 seconds