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
});
        textEditor.addListener(SWT.Traverse, new Listener() {
            public void handleEvent(Event event) {
                
                
                switch (event.detail) {
                case SWT.TRAVERSE_ESCAPE:
                    
                    disposeTextWidget();
                    event.doit = true;
                    event.detail = SWT.TRAVERSE_NONE;
                    break;
                case SWT.TRAVERSE_RETURN:
                    saveChangesAndDispose(resource);
                    event.doit = true;
                    event.detail = SWT.TRAVERSE_NONE;
                    break;
                }
            }
        });
        textEditor.addFocusListener(new FocusAdapter() {
            public void focusLost(FocusEvent fe) {
                saveChangesAndDispose(resource);
            }
        });
        if (textActionHandler != null)
            textActionHandler.addText(textEditor);
    }
    /**
     * Close the text widget and reset the editorText field.