Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Custom filename validation after copy paste into same directory
Custom filename validation after copy paste into same directory [message #1256257] Tue, 25 February 2014 08:46
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1582
Registered: January 2014
Senior Member

I already posted this question in RCP (http://www.eclipse.org/forums/index.php/m/1251754/#msg_1251754) but I think it may be better suited here.


In my RCP certain file names have to conform to defined rules. With the refectoring environment and an RenameParticipant I was able to correctly handle this situation for file renames in a CNF based view.

However my problem now is that if I peform copy paste in this CNF view and I paste into the same directory (i.e. file name exists there already) I'm prompted with a different rename dialog with the clasical "copy of filename" already filled in.

So I thought may be the CopyParticipant could solve this now, but that was not the case. Also stepping throught he code of the dialog and sourounding classes did not give my an hint how I could plugin some filename validation code.

After some further searching the only solution I found sofar is to copy the CopyFilesAndFoldersOperation class and add my verifier to it. This means I have to also copy and modify the CopyAction class and write my own EditActionProvider. I really don't like such a solution.

My question now is is there an option for adding some fileanme validation code, similar to the RenameParticipant of the refactoring infrastructure?
Is there also an option for defining what the default new filename should be (i.e., instead of "copy of filename")?

Thanks in advance,
Alois
Previous Topic:DND - CNF dropAssistant doesn't get executed
Next Topic:Project running only in 'run' mode
Goto Forum:
  


Current Time: Tue Apr 16 20:03:48 GMT 2024

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

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

Back to the top