| Anyway to inject our own name validation [message #281199] |
Wed, 16 February 2005 11:43 |
Eclipse User |
|
|
|
We are using the Resource Navigator view and want to perform extra
validation on the rename command to disallow Java keywords (catch, new,
etc).
Digging through the Eclipse Navigator code, it will install an action:
org.eclipse.ui.views.navigator.ResourceNavigatorRenameAction when you rt
select a tree item in the view. This action is installed programmatically
in org.eclipse.ui.views.navigator.RefactorActionGroup (and not via the
plugin.xml). The actual name validation is done by
org.eclipse.core.internal.resources.Workspace and just handles it sort of
generically (don't allow name to begin with a ".", no OS keywords,etc).
I don't see anyway to inject our own name validation since all this is done
internal to that view without us introducing our own custom view (overkill
for such a small issue). Any insight as to how we might be able to override
this functionality (note: we can't introduce our own custom rename menu
choice w/out being able to remove the existing rename).
The 2nd option is to allow the change and catch it with our resource change
listener that will verify the problem and display an error, but that opens
up a whole new can of worms.
thanks
|
|
|
Powered by
FUDForum. Page generated in 0.03220 seconds