diff options
| author | Stéphane Bégaudeau | 2016-03-30 09:32:38 +0000 |
|---|---|---|
| committer | Pierre-Charles David | 2016-03-30 11:55:40 +0000 |
| commit | 7c29e89d99c963edc673c8026b0ec9ea347ef15b (patch) | |
| tree | 8ea87296013197cbcca721079f0bb980d8916a93 | |
| parent | fcbc1898d0a2b7ec77846dd56b0ec4bc86e876dd (diff) | |
| download | org.eclipse.sirius-7c29e89d99c963edc673c8026b0ec9ea347ef15b.tar.gz org.eclipse.sirius-7c29e89d99c963edc673c8026b0ec9ea347ef15b.tar.xz org.eclipse.sirius-7c29e89d99c963edc673c8026b0ec9ea347ef15b.zip | |
[482528] Remove useless features from the ViewDescription
Bug: 482528
Change-Id: I8806091915225e387971ba5c8fa14910f5a13937
Signed-off-by: Stéphane Bégaudeau <stephane.begaudeau@obeo.fr>
15 files changed, 8 insertions, 684 deletions
diff --git a/incubation/org.eclipse.sirius.editor.properties/plugin.xml b/incubation/org.eclipse.sirius.editor.properties/plugin.xml index 6a90c7fa14..6ece204fc8 100644 --- a/incubation/org.eclipse.sirius.editor.properties/plugin.xml +++ b/incubation/org.eclipse.sirius.editor.properties/plugin.xml @@ -281,22 +281,6 @@ <input type="org.eclipse.sirius.properties.PageDescription"/> </propertySection> <propertySection - class="org.eclipse.sirius.properties.editor.properties.sections.properties.viewextensiondescription.ViewExtensionDescriptionLabelExpressionPropertySection" - id="properties.section.viewExtensionDescription.LabelExpression" - filter="org.eclipse.sirius.properties.editor.properties.filters.properties.viewextensiondescription.ViewExtensionDescriptionLabelExpressionFilter" - afterSection="properties.section.viewExtensionDescription.DefaultPage" - tab="viewpoint.tab.general"> - <input type="org.eclipse.sirius.properties.ViewExtensionDescription"/> - </propertySection> - <propertySection - class="org.eclipse.sirius.properties.editor.properties.sections.properties.viewextensiondescription.ViewExtensionDescriptionDefaultPagePropertySection" - id="properties.section.viewExtensionDescription.DefaultPage" - filter="org.eclipse.sirius.properties.editor.properties.filters.properties.viewextensiondescription.ViewExtensionDescriptionDefaultPageFilter" - afterSection="properties.section.viewExtensionDescription.Metamodels" - tab="viewpoint.tab.general"> - <input type="org.eclipse.sirius.properties.ViewExtensionDescription"/> - </propertySection> - <propertySection class="org.eclipse.sirius.properties.editor.properties.sections.properties.viewextensiondescription.ViewExtensionDescriptionMetamodelsPropertySection" id="properties.section.viewExtensionDescription.Metamodels" filter="org.eclipse.sirius.properties.editor.properties.filters.properties.viewextensiondescription.ViewExtensionDescriptionMetamodelsFilter" diff --git a/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/viewextensiondescription/ViewExtensionDescriptionDefaultPageFilter.java b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/viewextensiondescription/ViewExtensionDescriptionDefaultPageFilter.java deleted file mode 100644 index f57288c8e8..0000000000 --- a/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/viewextensiondescription/ViewExtensionDescriptionDefaultPageFilter.java +++ /dev/null @@ -1,45 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2016 Obeo. - * 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.properties.editor.properties.filters.properties.viewextensiondescription; - -// Start of user code specific imports - -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.sirius.editor.properties.filters.common.ViewpointPropertyFilter; -import org.eclipse.sirius.properties.PropertiesPackage; - -// End of user code specific imports - -/** - * A filter for the defaultPage property section. - */ -public class ViewExtensionDescriptionDefaultPageFilter extends ViewpointPropertyFilter { - - /** - * {@inheritDoc} - */ - @Override - protected EStructuralFeature getFeature() { - return PropertiesPackage.eINSTANCE.getViewExtensionDescription_DefaultPage(); - } - - /** - * {@inheritDoc} - */ - @Override - protected boolean isRightInputType(Object arg0) { - return arg0 instanceof org.eclipse.sirius.properties.ViewExtensionDescription; - } - - // Start of user code user methods - - // End of user code user methods - -} diff --git a/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/viewextensiondescription/ViewExtensionDescriptionLabelExpressionFilter.java b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/viewextensiondescription/ViewExtensionDescriptionLabelExpressionFilter.java deleted file mode 100644 index 665ac5f230..0000000000 --- a/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/viewextensiondescription/ViewExtensionDescriptionLabelExpressionFilter.java +++ /dev/null @@ -1,45 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2016 Obeo. - * 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.properties.editor.properties.filters.properties.viewextensiondescription; - -// Start of user code specific imports - -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.sirius.editor.properties.filters.common.ViewpointPropertyFilter; -import org.eclipse.sirius.properties.PropertiesPackage; - -// End of user code specific imports - -/** - * A filter for the labelExpression property section. - */ -public class ViewExtensionDescriptionLabelExpressionFilter extends ViewpointPropertyFilter { - - /** - * {@inheritDoc} - */ - @Override - protected EStructuralFeature getFeature() { - return PropertiesPackage.eINSTANCE.getViewExtensionDescription_LabelExpression(); - } - - /** - * {@inheritDoc} - */ - @Override - protected boolean isRightInputType(Object arg0) { - return arg0 instanceof org.eclipse.sirius.properties.ViewExtensionDescription; - } - - // Start of user code user methods - - // End of user code user methods - -} diff --git a/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/viewextensiondescription/ViewExtensionDescriptionDefaultPagePropertySection.java b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/viewextensiondescription/ViewExtensionDescriptionDefaultPagePropertySection.java deleted file mode 100644 index 6371fa4fe9..0000000000 --- a/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/viewextensiondescription/ViewExtensionDescriptionDefaultPagePropertySection.java +++ /dev/null @@ -1,132 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2016 Obeo. - * 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.properties.editor.properties.sections.properties.viewextensiondescription; - -// Start of user code imports - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import org.eclipse.emf.ecore.EReference; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; -import org.eclipse.sirius.editor.properties.sections.common.AbstractComboPropertySection; -import org.eclipse.sirius.properties.PropertiesPackage; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage; - -// End of user code imports - -/** - * A section for the defaultPage property of a ViewExtensionDescription object. - */ -public class ViewExtensionDescriptionDefaultPagePropertySection extends AbstractComboPropertySection { - /** - * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractComboPropertySection#getDefaultLabelText() - */ - @Override - protected String getDefaultLabelText() { - return "DefaultPage"; //$NON-NLS-1$ - } - - /** - * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractComboPropertySection#getLabelText() - */ - @Override - 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.properties.editor.properties.sections.AbstractComboPropertySection#getFeature() - */ - @Override - protected EReference getFeature() { - return PropertiesPackage.eINSTANCE.getViewExtensionDescription_DefaultPage(); - } - - /** - * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractComboPropertySection#getFeatureValue(int) - */ - @Override - protected Object getFeatureValue(int index) { - return getFeatureValueAt(index); - } - - /** - * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractComboPropertySection#isEqual(int) - */ - @Override - protected boolean isEqual(int index) { - boolean isEqual = false; - if (getFeatureValueAt(index) == null) { - isEqual = eObject.eGet(getFeature()) == null; - } else { - isEqual = getFeatureValueAt(index).equals(eObject.eGet(getFeature())); - } - return isEqual; - } - - /** - * Returns the value at the specified index in the choice of values for the - * feature. - * - * @param index - * Index of the value. - * @return the value at the specified index in the choice of values. - */ - protected Object getFeatureValueAt(int index) { - List<?> values = getChoiceOfValues(); - if (values.size() < index || values.size() == 0 || index == -1) { - return null; - } - return values.get(index); - } - - /** - * Fetches the list of available values for the feature. - * - * @return The list of available values for the feature. - */ - @Override - protected List<?> getChoiceOfValues() { - List<?> values = Collections.emptyList(); - List<IItemPropertyDescriptor> propertyDescriptors = getDescriptors(); - for (IItemPropertyDescriptor propertyDescriptor : propertyDescriptors) { - if (((EStructuralFeature) propertyDescriptor.getFeature(eObject)) == getFeature()) { - values = new ArrayList<Object>(propertyDescriptor.getChoiceOfValues(eObject)); - } - } - - // Start of user code choice of values - // End of user code choice of values - return values; - } - - /** - * {@inheritDoc} - */ - @Override - 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 -} diff --git a/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/viewextensiondescription/ViewExtensionDescriptionLabelExpressionPropertySection.java b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/viewextensiondescription/ViewExtensionDescriptionLabelExpressionPropertySection.java deleted file mode 100644 index cd26072039..0000000000 --- a/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/viewextensiondescription/ViewExtensionDescriptionLabelExpressionPropertySection.java +++ /dev/null @@ -1,123 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2016 Obeo. - * 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.properties.editor.properties.sections.properties.viewextensiondescription; - -// Start of user code imports - -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.sirius.editor.editorPlugin.SiriusEditor; -import org.eclipse.sirius.editor.properties.sections.common.AbstractTextWithButtonPropertySection; -import org.eclipse.sirius.editor.tools.api.assist.TypeContentProposalProvider; -import org.eclipse.sirius.editor.tools.internal.presentation.TextWithContentProposalDialog; -import org.eclipse.sirius.properties.PropertiesPackage; -import org.eclipse.sirius.ui.tools.api.assist.ContentProposalClient; -import org.eclipse.swt.events.SelectionAdapter; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.events.SelectionListener; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage; - -// End of user code imports - -/** - * A section for the labelExpression property of a ViewExtensionDescription - * object. - */ -public class ViewExtensionDescriptionLabelExpressionPropertySection extends AbstractTextWithButtonPropertySection implements ContentProposalClient { - - /** - * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractTextWithButtonPropertySection#getDefaultLabelText() - */ - @Override - protected String getDefaultLabelText() { - return "LabelExpression"; //$NON-NLS-1$ - } - - /** - * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractTextWithButtonPropertySection#getLabelText() - */ - @Override - 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.properties.editor.properties.sections.AbstractTextWithButtonPropertySection#getFeature() - */ - @Override - public EAttribute getFeature() { - return PropertiesPackage.eINSTANCE.getViewExtensionDescription_LabelExpression(); - } - - /** - * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractTextWithButtonPropertySection#getFeatureValue(String) - */ - @Override - protected Object getFeatureValue(String newText) { - return newText; - } - - /** - * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractTextWithButtonPropertySection#isEqual(String) - */ - @Override - protected boolean isEqual(String newText) { - return getFeatureAsText().equals(newText); - } - - /** - * {@inheritDoc} - */ - @Override - public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) { - super.createControls(parent, tabbedPropertySheetPage); - /* - * We set the color as it's a InterpretedExpression - */ - text.setBackground(SiriusEditor.getColorRegistry().get("yellow")); - - TypeContentProposalProvider.bindPluginsCompletionProcessors(this, text); - - // Start of user code create controls - - // End of user code create controls - - } - - @Override - protected SelectionListener createButtonListener() { - return new SelectionAdapter() { - @Override - public void widgetSelected(SelectionEvent e) { - TextWithContentProposalDialog dialog = new TextWithContentProposalDialog(composite.getShell(), ViewExtensionDescriptionLabelExpressionPropertySection.this, text.getText()); - dialog.open(); - text.setText(dialog.getResult()); - handleTextModified(); - } - }; - } - - /** - * {@inheritDoc} - */ - @Override - protected String getPropertyDescription() { - return ""; - } - - // Start of user code user operations - - // End of user code user operations -} diff --git a/incubation/org.eclipse.sirius.properties.edit/.classpath b/incubation/org.eclipse.sirius.properties.edit/.classpath index 858bac421b..75556083f6 100644 --- a/incubation/org.eclipse.sirius.properties.edit/.classpath +++ b/incubation/org.eclipse.sirius.properties.edit/.classpath @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="src" path="src-gen"/> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> <classpathentry kind="output" path="bin"/> </classpath> diff --git a/incubation/org.eclipse.sirius.properties.edit/plugin.properties b/incubation/org.eclipse.sirius.properties.edit/plugin.properties index a1f98c52ca..c3bea45284 100644 --- a/incubation/org.eclipse.sirius.properties.edit/plugin.properties +++ b/incubation/org.eclipse.sirius.properties.edit/plugin.properties @@ -28,8 +28,6 @@ _UI_Unknown_datatype= Value _UI_ViewExtensionDescription_identifier_feature = Identifier _UI_ViewExtensionDescription_metamodels_feature = Metamodels _UI_ViewExtensionDescription_pages_feature = Pages -_UI_ViewExtensionDescription_defaultPage_feature = Default Page -_UI_ViewExtensionDescription_labelExpression_feature = Label Expression _UI_ViewExtensionDescription_groups_feature = Groups _UI_PageDescription_identifier_feature = Identifier _UI_PageDescription_labelExpression_feature = Label Expression diff --git a/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/ViewExtensionDescriptionItemProvider.java b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/ViewExtensionDescriptionItemProvider.java index 5ed6d98716..0ba258e42e 100644 --- a/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/ViewExtensionDescriptionItemProvider.java +++ b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/ViewExtensionDescriptionItemProvider.java @@ -64,8 +64,6 @@ IItemPropertySource { addIdentifierPropertyDescriptor(object); addMetamodelsPropertyDescriptor(object); - addDefaultPagePropertyDescriptor(object); - addLabelExpressionPropertyDescriptor(object); } return itemPropertyDescriptors; } @@ -97,32 +95,6 @@ IItemPropertySource { } /** - * This adds a property descriptor for the Default Page feature. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - protected void addDefaultPagePropertyDescriptor(Object object) { - itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_ViewExtensionDescription_defaultPage_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_ViewExtensionDescription_defaultPage_feature", "_UI_ViewExtensionDescription_type"), - PropertiesPackage.Literals.VIEW_EXTENSION_DESCRIPTION__DEFAULT_PAGE, true, false, true, null, null, null)); - } - - /** - * This adds a property descriptor for the Label Expression feature. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - protected void addLabelExpressionPropertyDescriptor(Object object) { - itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_ViewExtensionDescription_labelExpression_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_ViewExtensionDescription_labelExpression_feature", "_UI_ViewExtensionDescription_type"), - PropertiesPackage.Literals.VIEW_EXTENSION_DESCRIPTION__LABEL_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); - } - - /** * This specifies how to implement {@link #getChildren} and is used to * deduce an appropriate feature for an * {@link org.eclipse.emf.edit.command.AddCommand}, @@ -193,7 +165,6 @@ IItemPropertySource { switch (notification.getFeatureID(ViewExtensionDescription.class)) { case PropertiesPackage.VIEW_EXTENSION_DESCRIPTION__IDENTIFIER: - case PropertiesPackage.VIEW_EXTENSION_DESCRIPTION__LABEL_EXPRESSION: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; case PropertiesPackage.VIEW_EXTENSION_DESCRIPTION__PAGES: diff --git a/incubation/org.eclipse.sirius.properties/model/properties.ecore b/incubation/org.eclipse.sirius.properties/model/properties.ecore index 65ae71c2df..6919e41339 100644 --- a/incubation/org.eclipse.sirius.properties/model/properties.ecore +++ b/incubation/org.eclipse.sirius.properties/model/properties.ecore @@ -9,8 +9,6 @@ eType="ecore:EClass ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EPackage"/> <eStructuralFeatures xsi:type="ecore:EReference" name="pages" upperBound="-1" eType="#//PageDescription" containment="true"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="defaultPage" eType="#//PageDescription"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="labelExpression" eType="ecore:EDataType ../../org.eclipse.sirius/model/viewpoint.ecore#//description/InterpretedExpression"/> <eStructuralFeatures xsi:type="ecore:EReference" name="groups" upperBound="-1" eType="#//GroupDescription" containment="true"/> </eClassifiers> diff --git a/incubation/org.eclipse.sirius.properties/model/properties.genmodel b/incubation/org.eclipse.sirius.properties/model/properties.genmodel index 623f966802..d0b9fa2a62 100644 --- a/incubation/org.eclipse.sirius.properties/model/properties.genmodel +++ b/incubation/org.eclipse.sirius.properties/model/properties.genmodel @@ -17,8 +17,6 @@ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference properties.ecore#//ViewExtensionDescription/metamodels"/> <genFeatures property="None" children="true" createChild="true" propertyCategory="" ecoreFeature="ecore:EReference properties.ecore#//ViewExtensionDescription/pages"/> - <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference properties.ecore#//ViewExtensionDescription/defaultPage"/> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//ViewExtensionDescription/labelExpression"/> <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference properties.ecore#//ViewExtensionDescription/groups"/> </genClasses> <genClasses ecoreClass="properties.ecore#//PageDescription"> diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/PropertiesPackage.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/PropertiesPackage.java index 057b97a038..5fe2ca377c 100644 --- a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/PropertiesPackage.java +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/PropertiesPackage.java @@ -103,31 +103,13 @@ public interface PropertiesPackage extends EPackage { int VIEW_EXTENSION_DESCRIPTION__PAGES = DescriptionPackage.EXTENSION_FEATURE_COUNT + 2; /** - * The feature id for the '<em><b>Default Page</b></em>' reference. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int VIEW_EXTENSION_DESCRIPTION__DEFAULT_PAGE = DescriptionPackage.EXTENSION_FEATURE_COUNT + 3; - - /** - * The feature id for the '<em><b>Label Expression</b></em>' attribute. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int VIEW_EXTENSION_DESCRIPTION__LABEL_EXPRESSION = DescriptionPackage.EXTENSION_FEATURE_COUNT + 4; - - /** * The feature id for the '<em><b>Groups</b></em>' containment reference * list. <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated * @ordered */ - int VIEW_EXTENSION_DESCRIPTION__GROUPS = DescriptionPackage.EXTENSION_FEATURE_COUNT + 5; + int VIEW_EXTENSION_DESCRIPTION__GROUPS = DescriptionPackage.EXTENSION_FEATURE_COUNT + 3; /** * The number of structural features of the ' @@ -137,7 +119,7 @@ public interface PropertiesPackage extends EPackage { * @generated * @ordered */ - int VIEW_EXTENSION_DESCRIPTION_FEATURE_COUNT = DescriptionPackage.EXTENSION_FEATURE_COUNT + 6; + int VIEW_EXTENSION_DESCRIPTION_FEATURE_COUNT = DescriptionPackage.EXTENSION_FEATURE_COUNT + 4; /** * The meta object id for the ' @@ -1574,31 +1556,6 @@ public interface PropertiesPackage extends EPackage { EReference getViewExtensionDescription_Pages(); /** - * Returns the meta object for the reference ' - * {@link org.eclipse.sirius.properties.ViewExtensionDescription#getDefaultPage - * <em>Default Page</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for the reference '<em>Default Page</em>'. - * @see org.eclipse.sirius.properties.ViewExtensionDescription#getDefaultPage() - * @see #getViewExtensionDescription() - * @generated - */ - EReference getViewExtensionDescription_DefaultPage(); - - /** - * Returns the meta object for the attribute ' - * {@link org.eclipse.sirius.properties.ViewExtensionDescription#getLabelExpression - * <em>Label Expression</em>}'. <!-- begin-user-doc --> <!-- end-user-doc - * --> - * - * @return the meta object for the attribute '<em>Label Expression</em>'. - * @see org.eclipse.sirius.properties.ViewExtensionDescription#getLabelExpression() - * @see #getViewExtensionDescription() - * @generated - */ - EAttribute getViewExtensionDescription_LabelExpression(); - - /** * Returns the meta object for the containment reference list ' * {@link org.eclipse.sirius.properties.ViewExtensionDescription#getGroups * <em>Groups</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> @@ -2775,22 +2732,6 @@ public interface PropertiesPackage extends EPackage { EReference VIEW_EXTENSION_DESCRIPTION__PAGES = PropertiesPackage.eINSTANCE.getViewExtensionDescription_Pages(); /** - * The meta object literal for the '<em><b>Default Page</b></em>' - * reference feature. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - EReference VIEW_EXTENSION_DESCRIPTION__DEFAULT_PAGE = PropertiesPackage.eINSTANCE.getViewExtensionDescription_DefaultPage(); - - /** - * The meta object literal for the '<em><b>Label Expression</b></em>' - * attribute feature. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - EAttribute VIEW_EXTENSION_DESCRIPTION__LABEL_EXPRESSION = PropertiesPackage.eINSTANCE.getViewExtensionDescription_LabelExpression(); - - /** * The meta object literal for the '<em><b>Groups</b></em>' containment * reference list feature. <!-- begin-user-doc --> <!-- end-user-doc --> * diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/ViewExtensionDescription.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/ViewExtensionDescription.java index 8fca773067..f6a3cad5a2 100644 --- a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/ViewExtensionDescription.java +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/ViewExtensionDescription.java @@ -30,12 +30,6 @@ import org.eclipse.sirius.viewpoint.description.Extension; * <em>Metamodels</em>}</li> * <li>{@link org.eclipse.sirius.properties.ViewExtensionDescription#getPages * <em>Pages</em>}</li> - * <li> - * {@link org.eclipse.sirius.properties.ViewExtensionDescription#getDefaultPage - * <em>Default Page</em>}</li> - * <li> - * {@link org.eclipse.sirius.properties.ViewExtensionDescription#getLabelExpression - * <em>Label Expression</em>}</li> * <li>{@link org.eclipse.sirius.properties.ViewExtensionDescription#getGroups * <em>Groups</em>}</li> * </ul> @@ -112,67 +106,6 @@ public interface ViewExtensionDescription extends Extension { EList<PageDescription> getPages(); /** - * Returns the value of the '<em><b>Default Page</b></em>' reference. <!-- - * begin-user-doc --> - * <p> - * If the meaning of the '<em>Default Page</em>' reference isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @return the value of the '<em>Default Page</em>' reference. - * @see #setDefaultPage(PageDescription) - * @see org.eclipse.sirius.properties.PropertiesPackage#getViewExtensionDescription_DefaultPage() - * @model - * @generated - */ - PageDescription getDefaultPage(); - - /** - * Sets the value of the ' - * {@link org.eclipse.sirius.properties.ViewExtensionDescription#getDefaultPage - * <em>Default Page</em>}' reference. <!-- begin-user-doc --> <!-- - * end-user-doc --> - * - * @param value - * the new value of the '<em>Default Page</em>' reference. - * @see #getDefaultPage() - * @generated - */ - void setDefaultPage(PageDescription value); - - /** - * Returns the value of the '<em><b>Label Expression</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Label Expression</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @return the value of the '<em>Label Expression</em>' attribute. - * @see #setLabelExpression(String) - * @see org.eclipse.sirius.properties.PropertiesPackage#getViewExtensionDescription_LabelExpression() - * @model dataType= - * "org.eclipse.sirius.viewpoint.description.InterpretedExpression" - * @generated - */ - String getLabelExpression(); - - /** - * Sets the value of the ' - * {@link org.eclipse.sirius.properties.ViewExtensionDescription#getLabelExpression - * <em>Label Expression</em>}' attribute. <!-- begin-user-doc --> <!-- - * end-user-doc --> - * - * @param value - * the new value of the '<em>Label Expression</em>' attribute. - * @see #getLabelExpression() - * @generated - */ - void setLabelExpression(String value); - - /** * Returns the value of the '<em><b>Groups</b></em>' containment reference * list. The list contents are of type * {@link org.eclipse.sirius.properties.GroupDescription}. <!-- diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/PropertiesPackageImpl.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/PropertiesPackageImpl.java index 7d276dda7b..b990f61569 100644 --- a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/PropertiesPackageImpl.java +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/PropertiesPackageImpl.java @@ -330,28 +330,8 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac * @generated */ @Override - public EReference getViewExtensionDescription_DefaultPage() { - return (EReference) viewExtensionDescriptionEClass.getEStructuralFeatures().get(3); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public EAttribute getViewExtensionDescription_LabelExpression() { - return (EAttribute) viewExtensionDescriptionEClass.getEStructuralFeatures().get(4); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override public EReference getViewExtensionDescription_Groups() { - return (EReference) viewExtensionDescriptionEClass.getEStructuralFeatures().get(5); + return (EReference) viewExtensionDescriptionEClass.getEStructuralFeatures().get(3); } /** @@ -1249,8 +1229,6 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac createEAttribute(viewExtensionDescriptionEClass, PropertiesPackage.VIEW_EXTENSION_DESCRIPTION__IDENTIFIER); createEReference(viewExtensionDescriptionEClass, PropertiesPackage.VIEW_EXTENSION_DESCRIPTION__METAMODELS); createEReference(viewExtensionDescriptionEClass, PropertiesPackage.VIEW_EXTENSION_DESCRIPTION__PAGES); - createEReference(viewExtensionDescriptionEClass, PropertiesPackage.VIEW_EXTENSION_DESCRIPTION__DEFAULT_PAGE); - createEAttribute(viewExtensionDescriptionEClass, PropertiesPackage.VIEW_EXTENSION_DESCRIPTION__LABEL_EXPRESSION); createEReference(viewExtensionDescriptionEClass, PropertiesPackage.VIEW_EXTENSION_DESCRIPTION__GROUPS); pageDescriptionEClass = createEClass(PropertiesPackage.PAGE_DESCRIPTION); @@ -1422,12 +1400,6 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac initEReference(getViewExtensionDescription_Pages(), this.getPageDescription(), null, "pages", null, 0, -1, ViewExtensionDescription.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE, EPackageImpl.IS_COMPOSITE, !EPackageImpl.IS_RESOLVE_PROXIES, !EPackageImpl.IS_UNSETTABLE, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); - initEReference(getViewExtensionDescription_DefaultPage(), this.getPageDescription(), null, "defaultPage", null, 0, 1, ViewExtensionDescription.class, !EPackageImpl.IS_TRANSIENT, - !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE, !EPackageImpl.IS_COMPOSITE, EPackageImpl.IS_RESOLVE_PROXIES, !EPackageImpl.IS_UNSETTABLE, EPackageImpl.IS_UNIQUE, - !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); - initEAttribute(getViewExtensionDescription_LabelExpression(), theDescriptionPackage.getInterpretedExpression(), "labelExpression", null, 0, 1, ViewExtensionDescription.class, - !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE, !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, - EPackageImpl.IS_ORDERED); initEReference(getViewExtensionDescription_Groups(), this.getGroupDescription(), null, "groups", null, 0, -1, ViewExtensionDescription.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE, EPackageImpl.IS_COMPOSITE, !EPackageImpl.IS_RESOLVE_PROXIES, !EPackageImpl.IS_UNSETTABLE, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/ViewExtensionDescriptionImpl.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/ViewExtensionDescriptionImpl.java index 3d1d13f7ad..5ec54c5f79 100644 --- a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/ViewExtensionDescriptionImpl.java +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/ViewExtensionDescriptionImpl.java @@ -45,12 +45,6 @@ import org.eclipse.sirius.properties.ViewExtensionDescription; * {@link org.eclipse.sirius.properties.impl.ViewExtensionDescriptionImpl#getPages * <em>Pages</em>}</li> * <li> - * {@link org.eclipse.sirius.properties.impl.ViewExtensionDescriptionImpl#getDefaultPage - * <em>Default Page</em>}</li> - * <li> - * {@link org.eclipse.sirius.properties.impl.ViewExtensionDescriptionImpl#getLabelExpression - * <em>Label Expression</em>}</li> - * <li> * {@link org.eclipse.sirius.properties.impl.ViewExtensionDescriptionImpl#getGroups * <em>Groups</em>}</li> * </ul> @@ -100,38 +94,6 @@ public class ViewExtensionDescriptionImpl extends MinimalEObjectImpl.Container i protected EList<PageDescription> pages; /** - * The cached value of the '{@link #getDefaultPage() <em>Default Page</em>}' - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see #getDefaultPage() - * @generated - * @ordered - */ - protected PageDescription defaultPage; - - /** - * The default value of the '{@link #getLabelExpression() - * <em>Label Expression</em>}' attribute. <!-- begin-user-doc --> <!-- - * end-user-doc --> - * - * @see #getLabelExpression() - * @generated - * @ordered - */ - protected static final String LABEL_EXPRESSION_EDEFAULT = null; - - /** - * The cached value of the '{@link #getLabelExpression() - * <em>Label Expression</em>}' attribute. <!-- begin-user-doc --> <!-- - * end-user-doc --> - * - * @see #getLabelExpression() - * @generated - * @ordered - */ - protected String labelExpression = ViewExtensionDescriptionImpl.LABEL_EXPRESSION_EDEFAULT; - - /** * The cached value of the '{@link #getGroups() <em>Groups</em>}' * containment reference list. <!-- begin-user-doc --> <!-- end-user-doc --> * @@ -216,72 +178,6 @@ public class ViewExtensionDescriptionImpl extends MinimalEObjectImpl.Container i * @generated */ @Override - public PageDescription getDefaultPage() { - if (defaultPage != null && defaultPage.eIsProxy()) { - InternalEObject oldDefaultPage = (InternalEObject) defaultPage; - defaultPage = (PageDescription) eResolveProxy(oldDefaultPage); - if (defaultPage != oldDefaultPage) { - if (eNotificationRequired()) { - eNotify(new ENotificationImpl(this, Notification.RESOLVE, PropertiesPackage.VIEW_EXTENSION_DESCRIPTION__DEFAULT_PAGE, oldDefaultPage, defaultPage)); - } - } - } - return defaultPage; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public PageDescription basicGetDefaultPage() { - return defaultPage; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public void setDefaultPage(PageDescription newDefaultPage) { - PageDescription oldDefaultPage = defaultPage; - defaultPage = newDefaultPage; - if (eNotificationRequired()) { - eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.VIEW_EXTENSION_DESCRIPTION__DEFAULT_PAGE, oldDefaultPage, defaultPage)); - } - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public String getLabelExpression() { - return labelExpression; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public void setLabelExpression(String newLabelExpression) { - String oldLabelExpression = labelExpression; - labelExpression = newLabelExpression; - if (eNotificationRequired()) { - eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.VIEW_EXTENSION_DESCRIPTION__LABEL_EXPRESSION, oldLabelExpression, labelExpression)); - } - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override public EList<GroupDescription> getGroups() { if (groups == null) { groups = new EObjectContainmentEList<GroupDescription>(GroupDescription.class, this, PropertiesPackage.VIEW_EXTENSION_DESCRIPTION__GROUPS); @@ -319,13 +215,6 @@ public class ViewExtensionDescriptionImpl extends MinimalEObjectImpl.Container i return getMetamodels(); case PropertiesPackage.VIEW_EXTENSION_DESCRIPTION__PAGES: return getPages(); - case PropertiesPackage.VIEW_EXTENSION_DESCRIPTION__DEFAULT_PAGE: - if (resolve) { - return getDefaultPage(); - } - return basicGetDefaultPage(); - case PropertiesPackage.VIEW_EXTENSION_DESCRIPTION__LABEL_EXPRESSION: - return getLabelExpression(); case PropertiesPackage.VIEW_EXTENSION_DESCRIPTION__GROUPS: return getGroups(); } @@ -352,12 +241,6 @@ public class ViewExtensionDescriptionImpl extends MinimalEObjectImpl.Container i getPages().clear(); getPages().addAll((Collection<? extends PageDescription>) newValue); return; - case PropertiesPackage.VIEW_EXTENSION_DESCRIPTION__DEFAULT_PAGE: - setDefaultPage((PageDescription) newValue); - return; - case PropertiesPackage.VIEW_EXTENSION_DESCRIPTION__LABEL_EXPRESSION: - setLabelExpression((String) newValue); - return; case PropertiesPackage.VIEW_EXTENSION_DESCRIPTION__GROUPS: getGroups().clear(); getGroups().addAll((Collection<? extends GroupDescription>) newValue); @@ -383,12 +266,6 @@ public class ViewExtensionDescriptionImpl extends MinimalEObjectImpl.Container i case PropertiesPackage.VIEW_EXTENSION_DESCRIPTION__PAGES: getPages().clear(); return; - case PropertiesPackage.VIEW_EXTENSION_DESCRIPTION__DEFAULT_PAGE: - setDefaultPage((PageDescription) null); - return; - case PropertiesPackage.VIEW_EXTENSION_DESCRIPTION__LABEL_EXPRESSION: - setLabelExpression(ViewExtensionDescriptionImpl.LABEL_EXPRESSION_EDEFAULT); - return; case PropertiesPackage.VIEW_EXTENSION_DESCRIPTION__GROUPS: getGroups().clear(); return; @@ -410,10 +287,6 @@ public class ViewExtensionDescriptionImpl extends MinimalEObjectImpl.Container i return metamodels != null && !metamodels.isEmpty(); case PropertiesPackage.VIEW_EXTENSION_DESCRIPTION__PAGES: return pages != null && !pages.isEmpty(); - case PropertiesPackage.VIEW_EXTENSION_DESCRIPTION__DEFAULT_PAGE: - return defaultPage != null; - case PropertiesPackage.VIEW_EXTENSION_DESCRIPTION__LABEL_EXPRESSION: - return ViewExtensionDescriptionImpl.LABEL_EXPRESSION_EDEFAULT == null ? labelExpression != null : !ViewExtensionDescriptionImpl.LABEL_EXPRESSION_EDEFAULT.equals(labelExpression); case PropertiesPackage.VIEW_EXTENSION_DESCRIPTION__GROUPS: return groups != null && !groups.isEmpty(); } @@ -434,8 +307,6 @@ public class ViewExtensionDescriptionImpl extends MinimalEObjectImpl.Container i StringBuffer result = new StringBuffer(super.toString()); result.append(" (identifier: "); result.append(identifier); - result.append(", labelExpression: "); - result.append(labelExpression); result.append(')'); return result.toString(); } diff --git a/incubation/org.eclipse.sirius.ui.properties/src/org/eclipse/sirius/ui/properties/internal/tabprovider/ViewDescriptionConverter.java b/incubation/org.eclipse.sirius.ui.properties/src/org/eclipse/sirius/ui/properties/internal/tabprovider/ViewDescriptionConverter.java index 116593787f..2dcd1919b1 100644 --- a/incubation/org.eclipse.sirius.ui.properties/src/org/eclipse/sirius/ui/properties/internal/tabprovider/ViewDescriptionConverter.java +++ b/incubation/org.eclipse.sirius.ui.properties/src/org/eclipse/sirius/ui/properties/internal/tabprovider/ViewDescriptionConverter.java @@ -93,6 +93,10 @@ public class ViewDescriptionConverter { */ public EEFViewDescription convert() { EEFViewDescription view = EefFactory.eINSTANCE.createEEFViewDescription(); + + // TODO Replace by the retrieval of the label from the label provider + view.setLabelExpression("feature:name"); + for (PageDescription pageDescription : pageDescriptions) { createPage(pageDescription, view); } @@ -395,5 +399,4 @@ public class ViewDescriptionConverter { return eefCustomDescription; } - } |
