Dear developers,

we're working on a mechanism that prevents the EditorManager from
sending TextEditActivities when a file encoding was changed.
When a file encoding is manipulated and there are no unsaved changes
in the editor, the content of the file is reloaded. This triggers the
TextEditActivity.

Our idea was to call FileReplacementInProgressObservable.start() at
the beginning of SharedResourceManager.handlePostChange().
Then call fileReplacementInProgressObservable.replacementDone() at the
end of handlePostChange.
This way we would prevent EditorManager from executing
textAboutToBeChanged() completely, since it starts with the lines

 if (fileReplacementInProgressObservable.isReplacementInProgress())
            return;

We've tested this "fix", and it seems to work. But since we're very
inexperienced with concurrency, we cannot say whether this is
reliable.
This should work only if textAboutToBeChanged() is called during
handlePostChanged, and this seems to be the case.
Why?
And would this be a misuse of the FileReplacementInProgressObservable?

Cheers,
Nils & Arsenij

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Dpp-devel mailing list
Dpp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dpp-devel

Reply via email to