preventing the user from deleting a file
Hi,
I need to keep the user from deleting certain files (from the project
view, f.ex), or give him a warning before he does.
I tried 2 ways (adding VirtualFileListener, and capturing the
EditorDelete and $Delete actions), to no avail.
Ideally, I would replace the system delete dialog by mine,
but adding a 2nd dialog, afterwards, would be acceptable.
Any clue?
Alain
Please sign in to leave a comment.
Is this possible?
Alain
Is it feasible?
Alain
The only way I see right away is to listen VirtualFileListener beforeFileDeletion()
events from VirtualFileManager and save (in memory?) the content of the files
to be deleted and restore them in somewhat ApplicationManager.getApplication().invokeLater().
-
Maxim Shafirov
http://www.jetbrains.com
"Develop with pleasure!"
max@jetbrains.com wrote:
>
Or I could trigger an UNDO, programmaticaly.
Can it be done through the openAPI?
Alain
Nope unfortunately. Though there's already an issue for this to be implemented
in Irida: http://www.jetbrains.net/jira/browse/IDEADEV-16
-
Maxim Shafirov
http://www.jetbrains.com
"Develop with pleasure!"
>> The only way I see right away is ..
>>