diff options
Diffstat (limited to 'plugins/org.eclipse.sirius.editor/src-gen/org/eclipse/sirius/editor/properties/sections/concern/concerndescription/ConcernDescriptionBehaviorsPropertySection.java')
-rw-r--r-- | plugins/org.eclipse.sirius.editor/src-gen/org/eclipse/sirius/editor/properties/sections/concern/concerndescription/ConcernDescriptionBehaviorsPropertySection.java | 97 |
1 files changed, 97 insertions, 0 deletions
diff --git a/plugins/org.eclipse.sirius.editor/src-gen/org/eclipse/sirius/editor/properties/sections/concern/concerndescription/ConcernDescriptionBehaviorsPropertySection.java b/plugins/org.eclipse.sirius.editor/src-gen/org/eclipse/sirius/editor/properties/sections/concern/concerndescription/ConcernDescriptionBehaviorsPropertySection.java new file mode 100644 index 0000000000..e0b64dceaa --- /dev/null +++ b/plugins/org.eclipse.sirius.editor/src-gen/org/eclipse/sirius/editor/properties/sections/concern/concerndescription/ConcernDescriptionBehaviorsPropertySection.java @@ -0,0 +1,97 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 THALES GLOBAL SERVICES. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.editor.properties.sections.concern.concerndescription; + +// Start of user code imports + +import java.util.Iterator; +import java.util.List; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage; + +import org.eclipse.sirius.description.concern.ConcernPackage; +import org.eclipse.sirius.editor.properties.sections.common.AbstractEditorDialogPropertySection; + +// End of user code imports + +/** + * A section for the behaviors property of a ConcernDescription object. + */ +public class ConcernDescriptionBehaviorsPropertySection extends AbstractEditorDialogPropertySection { + /** + * @see org.eclipse.sirius.editor.properties.sections.AbstractEditorDialogPropertySection#getDefaultLabelText() + */ + protected String getDefaultLabelText() { + return "Behaviors"; //$NON-NLS-1$ + } + + /** + * @see org.eclipse.sirius.editor.properties.sections.AbstractEditorDialogPropertySection#getLabelText() + */ + protected String getLabelText() { + String labelText; + labelText = super.getLabelText() + ":"; //$NON-NLS-1$ + // Start of user code get label text + + // End of user code get label text + return labelText; + } + + /** + * @see org.eclipse.sirius.editor.properties.sections.AbstractEditorDialogPropertySection#getFeature() + */ + protected EReference getFeature() { + return ConcernPackage.eINSTANCE.getConcernDescription_Behaviors(); + } + + /** + * @see org.eclipse.sirius.editor.properties.sections.AbstractEditorDialogPropertySection#getFeatureAsText() + */ + protected String getFeatureAsText() { + String string = new String(); + + if (eObject.eGet(getFeature()) != null) { + List<?> values = (List<?>) eObject.eGet(getFeature()); + for (Iterator<?> iterator = values.iterator(); iterator.hasNext();) { + EObject eObj = (EObject) iterator.next(); + string += getAdapterFactoryLabelProvider(eObj).getText(eObj); + if (iterator.hasNext()) + string += ", "; + } + } + + return string; + } + + /** + * @see org.eclipse.sirius.editor.properties.sections.AbstractEditorDialogPropertySection#isEqual(java.util.List) + */ + protected boolean isEqual(List<?> newList) { + return newList.equals(eObject.eGet(getFeature())); + } + + /** + * {@inheritDoc} + */ + public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) { + super.createControls(parent, tabbedPropertySheetPage); + // Start of user code create controls + + // End of user code create controls + } + + // Start of user code user operations + + // End of user code user operations +} |