diff options
Diffstat (limited to 'bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/AddXSDSchemaDirectiveCommand.java')
-rw-r--r-- | bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/AddXSDSchemaDirectiveCommand.java | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/AddXSDSchemaDirectiveCommand.java b/bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/AddXSDSchemaDirectiveCommand.java deleted file mode 100644 index a4f9008868..0000000000 --- a/bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/AddXSDSchemaDirectiveCommand.java +++ /dev/null @@ -1,60 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2006 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.common.commands; - -import java.util.Iterator; - -import org.eclipse.xsd.XSDConcreteComponent; -import org.eclipse.xsd.XSDSchema; -import org.eclipse.xsd.XSDSchemaDirective; - -public abstract class AddXSDSchemaDirectiveCommand extends BaseCommand -{ - protected XSDSchema xsdSchema; - - public AddXSDSchemaDirectiveCommand(String label) - { - super(label); - } - - public void undo() - { - super.undo(); - } - - protected boolean adopt(XSDConcreteComponent model) - { - return false; - } - - protected int findNextPositionToInsert() - { - int index = 0; - for (Iterator i = xsdSchema.getContents().iterator(); i.hasNext(); ) - { - Object o = i.next(); - if (o instanceof XSDSchemaDirective) - { - index ++; - } - else - { - break; - } - } - return index; - } - - public void execute() - { - ensureSchemaElement(xsdSchema); - } -} |