Bug 123496 [IDE] Use operation validation API for IDE actions
We should use the Resources/Core operation validation API in the IDE actions for manipulating resources.
bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/RenameResourceAction.java
* @param resource the resource to rename
     */
    private void createTextEditor(final IResource resource) {
        
        textEditorParent = createParent();
        textEditorParent.setVisible(false);
        final int inset = getCellEditorInset(textEditorParent);
        if (inset > 0) 
            textEditorParent.addListener(SWT.Paint, new Listener() {
                public void handleEvent(Event e) {
                    Point textSize = textEditor.getSize();
                    Point parentSize = textEditorParent.getSize();
                    e.gc.drawRectangle(0, 0, Math.min(textSize.x + 4,
                            parentSize.x - 1), parentSize.y - 1);
                }
            });
        
        textEditor = new Text(textEditorParent, SWT.NONE);
        textEditor.setFont(navigatorTree.getFont());
        textEditorParent.setBackground(textEditor.getBackground());
        textEditor.addListener(SWT.Modify, new Listener() {
            public void handleEvent(Event e) {
                Point textSize = textEditor.computeSize(SWT.DEFAULT,
                        SWT.DEFAULT);
                textSize.x += textSize.y; 
                Point parentSize = textEditorParent.getSize();
                textEditor.setBounds(2, inset, Math.min(textSize.x,
                        parentSize.x - 4), parentSize.y - 2 * inset);
                textEditorParent.redraw();
            }