Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/commands/SetMultiplicityCommand.java')
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/commands/SetMultiplicityCommand.java66
1 files changed, 0 insertions, 66 deletions
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/commands/SetMultiplicityCommand.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/commands/SetMultiplicityCommand.java
deleted file mode 100644
index 4c8c27db08..0000000000
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/commands/SetMultiplicityCommand.java
+++ /dev/null
@@ -1,66 +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.commands;
-
-import org.eclipse.xsd.XSDConcreteComponent;
-import org.eclipse.xsd.XSDParticle;
-import org.eclipse.xsd.XSDParticleContent;
-
-public class SetMultiplicityCommand extends AbstractCommand
-{
- int maxOccurs, minOccurs;
-
- /**
- * @param parent
- */
- public SetMultiplicityCommand(XSDConcreteComponent parent)
- {
- super(parent);
- }
-
- public void setMaxOccurs(int i)
- {
- maxOccurs=i;
- }
-
- public void setMinOccurs(int i)
- {
- minOccurs=i;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.xsd.ui.internal.commands.AbstractCommand#run()
- */
- public void run()
- {
- XSDConcreteComponent parent = getParent();
- if (parent instanceof XSDParticleContent)
- {
- XSDParticleContent xsdParticleContent = (XSDParticleContent)parent;
- XSDParticle xsdParticle = (XSDParticle)xsdParticleContent.getContainer();
- if (maxOccurs < 0)
- {
- maxOccurs = XSDParticle.UNBOUNDED;
- }
- xsdParticle.setMaxOccurs(maxOccurs);
- xsdParticle.setMinOccurs(minOccurs);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.xsd.ui.internal.commands.AbstractCommand#adopt(org.eclipse.xsd.XSDConcreteComponent)
- */
- protected boolean adopt(XSDConcreteComponent model)
- {
- return false;
- }
-
-}

Back to the top