Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Anyway to inject our own name validation
Anyway to inject our own name validation [message #281199] Wed, 16 February 2005 11:43
Eclipse UserFriend
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
Previous Topic:Questions on Text Find/Replace
Next Topic:How can compile eclipse source code?
Goto Forum:
  


Current Time: Mon Nov 10 11:13:51 EST 2025

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

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

Back to the top