Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Custom filename validation after copy paste into same directory
icon5.gif  Custom filename validation after copy paste into same directory [message #1249998] Tue, 18 February 2014 21:18 Go to next message
Alois Zoitl is currently offline Alois Zoitl
Messages: 4
Registered: January 2014
Junior Member
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.

My question now is is there an option for adding some fileanme validation code?
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
Re: Custom filename validation after copy paste into same directory [message #1251754 is a reply to message #1249998] Thu, 20 February 2014 15:10 Go to previous message
Alois Zoitl is currently offline Alois Zoitl
Messages: 4
Registered: January 2014
Junior Member
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.
Previous Topic:Contextual menu / selection provider / forms UI problems
Next Topic:JFace Databinding
Goto Forum:
  


Current Time: Fri Oct 24 23:21:34 GMT 2014

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

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