Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/structure/AbstractCommand.java')
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/structure/AbstractCommand.java71
1 files changed, 0 insertions, 71 deletions
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/structure/AbstractCommand.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/structure/AbstractCommand.java
deleted file mode 100644
index 3972831329..0000000000
--- a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/structure/AbstractCommand.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsd.ui.internal.refactor.structure;
-
-import org.eclipse.wst.sse.core.internal.format.IStructuredFormatProcessor;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.eclipse.wst.xml.core.internal.provisional.format.FormatProcessorXML;
-import org.eclipse.xsd.XSDConcreteComponent;
-import org.w3c.dom.Element;
-
-public abstract class AbstractCommand
-{
- private XSDConcreteComponent parent;
- private XSDConcreteComponent model;
-
- protected AbstractCommand(XSDConcreteComponent parent)
- {
- this.parent = parent;
- }
-
- public abstract void run();
-
- protected XSDConcreteComponent getParent()
- {
- return parent;
- }
-
- public XSDConcreteComponent getModelObject()
- {
- return model;
- }
-
- protected void setModelObject(XSDConcreteComponent model)
- {
- this.model = model;
- }
-
- // Establish part-whole relationship
- protected abstract boolean adopt(XSDConcreteComponent model);
-
- protected void formatChild(Element child)
- {
- if (child instanceof IDOMNode)
- {
- IDOMModel model = ((IDOMNode)child).getModel();
- try
- {
- // tell the model that we are about to make a big model change
- model.aboutToChangeModel();
-
- IStructuredFormatProcessor formatProcessor = new FormatProcessorXML();
- formatProcessor.formatNode(child);
- }
- finally
- {
- // tell the model that we are done with the big model change
- model.changedModel();
- }
- }
- }
-
-}

Back to the top