Search in sources :

Example 1 with RemoveExtensionNodeCommand

use of org.eclipse.wst.xsd.ui.internal.common.commands.RemoveExtensionNodeCommand in project webtools.sourceediting by eclipse.

the class ExtensionsSection method getRemoveExtensionCommand.

protected Command getRemoveExtensionCommand(Object o) {
    Command command = null;
    try {
        if (o instanceof Node) {
            Node node = (Node) o;
            ExtensibleRemoveExtensionNodeCommand removeCommand = getExtensionsSchemasRegistry().getRemoveExtensionNodeCommand(node.getNamespaceURI());
            if (removeCommand != null) {
                removeCommand.setInput((XSDConcreteComponent) input);
                removeCommand.setNode(node);
                return removeCommand;
            } else {
                command = new RemoveExtensionNodeCommand(Messages._UI_ACTION_DELETE_APPINFO_ELEMENT, node);
            // command.execute();
            }
        }
    } catch (Exception e) {
    }
    return command;
}
Also used : ExtensibleRemoveExtensionNodeCommand(org.eclipse.wst.xsd.ui.internal.common.commands.ExtensibleRemoveExtensionNodeCommand) RemoveExtensionNodeCommand(org.eclipse.wst.xsd.ui.internal.common.commands.RemoveExtensionNodeCommand) ExtensibleAddExtensionCommand(org.eclipse.wst.xsd.ui.internal.common.commands.ExtensibleAddExtensionCommand) AddExtensionElementCommand(org.eclipse.wst.xsd.ui.internal.common.commands.AddExtensionElementCommand) AddExtensionAttributeCommand(org.eclipse.wst.xsd.ui.internal.common.commands.AddExtensionAttributeCommand) Command(org.eclipse.gef.commands.Command) AddExtensionCommand(org.eclipse.wst.xsd.ui.internal.common.commands.AddExtensionCommand) Node(org.w3c.dom.Node) ExtensibleRemoveExtensionNodeCommand(org.eclipse.wst.xsd.ui.internal.common.commands.ExtensibleRemoveExtensionNodeCommand) RemoveExtensionNodeCommand(org.eclipse.wst.xsd.ui.internal.common.commands.RemoveExtensionNodeCommand) ExtensibleRemoveExtensionNodeCommand(org.eclipse.wst.xsd.ui.internal.common.commands.ExtensibleRemoveExtensionNodeCommand)

Aggregations

Command (org.eclipse.gef.commands.Command)1 AddExtensionAttributeCommand (org.eclipse.wst.xsd.ui.internal.common.commands.AddExtensionAttributeCommand)1 AddExtensionCommand (org.eclipse.wst.xsd.ui.internal.common.commands.AddExtensionCommand)1 AddExtensionElementCommand (org.eclipse.wst.xsd.ui.internal.common.commands.AddExtensionElementCommand)1 ExtensibleAddExtensionCommand (org.eclipse.wst.xsd.ui.internal.common.commands.ExtensibleAddExtensionCommand)1 ExtensibleRemoveExtensionNodeCommand (org.eclipse.wst.xsd.ui.internal.common.commands.ExtensibleRemoveExtensionNodeCommand)1 RemoveExtensionNodeCommand (org.eclipse.wst.xsd.ui.internal.common.commands.RemoveExtensionNodeCommand)1 Node (org.w3c.dom.Node)1