| Legal way to intervene in file save operations? [message #280739] |
Tue, 08 February 2005 15:36 |
|
Originally posted by: bert.visi.com
I'd like to have a plugin get a chance to look at every file save
operation, even if it's coming from an editor that came from
elsewhere. This means I can't just add code to the editor's doSave()
method.
I've found 4 places where this operation gets initiated: The
workbench File->Save menu/Save push-button, each editor's right-click
context menu Save selection, the Resource Save operation when the
file is closed from the editor window, and the Workbench save
operation when the workbench is closed while the file is open. Are
there more?
Other than the ISaveParticipant interface, I don't find any "legal"
public method for insinuating myself into the process. I've found
examples of people doing it, but they've used internal classes,
and used some dodgy techniques to get their action stuck in place of
the standard SaveActions. Also, the techniques used resulted in an
all-or-nothing implementation. If someone hijacks the SaveActions,
anybody else who tried to do the same would get lost; there's no way
to "chain" these save peekers.
Is there any legal way to do this? I've only looked in 3.0.1; is
anything changing in 3.1?
--
Bert Hyman | St. Paul, MN | bert@visi.com
|
|
|
Powered by
FUDForum. Page generated in 0.01578 seconds