diff options
| author | Mélanie Bats | 2016-04-15 16:06:42 +0000 |
|---|---|---|
| committer | Pierre-Charles David | 2016-04-28 08:29:02 +0000 |
| commit | 9ca1a7406188b0e6c386f7ce459dd503ac8ebd4f (patch) | |
| tree | e5a5577b1578ed9e0a3a6e984657baff93b313bf | |
| parent | c222f5cce045a8a78eb2950d383b3c88d8d098d6 (diff) | |
| download | org.eclipse.sirius-9ca1a7406188b0e6c386f7ce459dd503ac8ebd4f.tar.gz org.eclipse.sirius-9ca1a7406188b0e6c386f7ce459dd503ac8ebd4f.tar.xz org.eclipse.sirius-9ca1a7406188b0e6c386f7ce459dd503ac8ebd4f.zip | |
[482528] Support styles on group
Bug: 482528
Change-Id: I44350c3e7d5516d5afce7ba6523b9cb6a57d1466
Signed-off-by: Mélanie Bats <melanie.bats@obeo.fr>
40 files changed, 4414 insertions, 26 deletions
diff --git a/incubation/org.eclipse.sirius.editor.properties/help/contexts.xml b/incubation/org.eclipse.sirius.editor.properties/help/contexts.xml index dee708b801..360adb3863 100644 --- a/incubation/org.eclipse.sirius.editor.properties/help/contexts.xml +++ b/incubation/org.eclipse.sirius.editor.properties/help/contexts.xml @@ -414,6 +414,17 @@ </description> </context> + <context id="GroupStyle"> + <description> + + + + <!-- Start of user code GroupStyle description --> + + <!-- End of user code GroupStyle description --> + + </description> + </context> <context id="WidgetConditionalStyle"> <description> @@ -535,4 +546,15 @@ </description> </context> + <context id="GroupConditionalStyle"> + <description> + + + + <!-- Start of user code GroupConditionalStyle description --> + + <!-- End of user code GroupConditionalStyle description --> + + </description> + </context> </contexts>
\ No newline at end of file diff --git a/incubation/org.eclipse.sirius.editor.properties/plugin.xml b/incubation/org.eclipse.sirius.editor.properties/plugin.xml index 9c295ee1d2..8d5ad1159d 100644 --- a/incubation/org.eclipse.sirius.editor.properties/plugin.xml +++ b/incubation/org.eclipse.sirius.editor.properties/plugin.xml @@ -31,6 +31,61 @@ <input type="org.eclipse.sirius.properties.WidgetConditionalStyle"/> </propertySection> <propertySection + class="org.eclipse.sirius.properties.editor.properties.sections.properties.groupstyle.GroupStyleExpandedByDefaultPropertySection" + id="properties.section.groupStyle.ExpandedByDefault" + filter="org.eclipse.sirius.properties.editor.properties.filters.properties.groupstyle.GroupStyleExpandedByDefaultFilter" + afterSection="properties.section.groupStyle.ToggleStyle" + tab="viewpoint.tab.general"> + <input type="org.eclipse.sirius.properties.GroupStyle"/> + </propertySection> + <propertySection + class="org.eclipse.sirius.properties.editor.properties.sections.properties.groupstyle.GroupStyleToggleStylePropertySection" + id="properties.section.groupStyle.ToggleStyle" + filter="org.eclipse.sirius.properties.editor.properties.filters.properties.groupstyle.GroupStyleToggleStyleFilter" + afterSection="properties.section.groupStyle.BarStyle" + tab="viewpoint.tab.general"> + <input type="org.eclipse.sirius.properties.GroupStyle"/> + </propertySection> + <propertySection + class="org.eclipse.sirius.properties.editor.properties.sections.properties.groupstyle.GroupStyleBarStylePropertySection" + id="properties.section.groupStyle.BarStyle" + filter="org.eclipse.sirius.properties.editor.properties.filters.properties.groupstyle.GroupStyleBarStyleFilter" + afterSection="properties.section.groupStyle.FontSize" + tab="viewpoint.tab.general"> + <input type="org.eclipse.sirius.properties.GroupStyle"/> + </propertySection> + <propertySection + class="org.eclipse.sirius.properties.editor.properties.sections.properties.groupstyle.GroupStyleFontSizePropertySection" + id="properties.section.groupStyle.FontSize" + filter="org.eclipse.sirius.properties.editor.properties.filters.properties.groupstyle.GroupStyleFontSizeFilter" + afterSection="properties.section.groupStyle.FontNameExpression" + tab="viewpoint.tab.general"> + <input type="org.eclipse.sirius.properties.GroupStyle"/> + </propertySection> + <propertySection + class="org.eclipse.sirius.properties.editor.properties.sections.properties.groupstyle.GroupStyleFontNameExpressionPropertySection" + id="properties.section.groupStyle.FontNameExpression" + filter="org.eclipse.sirius.properties.editor.properties.filters.properties.groupstyle.GroupStyleFontNameExpressionFilter" + afterSection="properties.section.groupStyle.ForegroundColor" + tab="viewpoint.tab.general"> + <input type="org.eclipse.sirius.properties.GroupStyle"/> + </propertySection> + <propertySection + class="org.eclipse.sirius.properties.editor.properties.sections.properties.groupstyle.GroupStyleForegroundColorPropertySection" + id="properties.section.groupStyle.ForegroundColor" + filter="org.eclipse.sirius.properties.editor.properties.filters.properties.groupstyle.GroupStyleForegroundColorFilter" + afterSection="properties.section.groupStyle.BackgroundColor" + tab="viewpoint.tab.general"> + <input type="org.eclipse.sirius.properties.GroupStyle"/> + </propertySection> + <propertySection + class="org.eclipse.sirius.properties.editor.properties.sections.properties.groupstyle.GroupStyleBackgroundColorPropertySection" + id="properties.section.groupStyle.BackgroundColor" + filter="org.eclipse.sirius.properties.editor.properties.filters.properties.groupstyle.GroupStyleBackgroundColorFilter" + tab="viewpoint.tab.general"> + <input type="org.eclipse.sirius.properties.GroupStyle"/> + </propertySection> + <propertySection class="org.eclipse.sirius.properties.editor.properties.sections.properties.hyperlinkwidgetstyle.HyperlinkWidgetStyleFontFormatPropertySection" id="properties.section.hyperlinkWidgetStyle.FontFormat" filter="org.eclipse.sirius.properties.editor.properties.filters.properties.hyperlinkwidgetstyle.HyperlinkWidgetStyleFontFormatFilter" diff --git a/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/groupstyle/GroupStyleBackgroundColorFilter.java b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/groupstyle/GroupStyleBackgroundColorFilter.java new file mode 100644 index 0000000000..50f09ae015 --- /dev/null +++ b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/groupstyle/GroupStyleBackgroundColorFilter.java @@ -0,0 +1,45 @@ +/******************************************************************************* + * 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.groupstyle; + +// 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 backgroundColor property section. + */ +public class GroupStyleBackgroundColorFilter extends ViewpointPropertyFilter { + + /** + * {@inheritDoc} + */ + @Override + protected EStructuralFeature getFeature() { + return PropertiesPackage.eINSTANCE.getGroupStyle_BackgroundColor(); + } + + /** + * {@inheritDoc} + */ + @Override + protected boolean isRightInputType(Object arg0) { + return arg0 instanceof org.eclipse.sirius.properties.GroupStyle; + } + + // 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/groupstyle/GroupStyleBarStyleFilter.java b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/groupstyle/GroupStyleBarStyleFilter.java new file mode 100644 index 0000000000..797eebd188 --- /dev/null +++ b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/groupstyle/GroupStyleBarStyleFilter.java @@ -0,0 +1,45 @@ +/******************************************************************************* + * 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.groupstyle; + +// 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 barStyle property section. + */ +public class GroupStyleBarStyleFilter extends ViewpointPropertyFilter { + + /** + * {@inheritDoc} + */ + @Override + protected EStructuralFeature getFeature() { + return PropertiesPackage.eINSTANCE.getGroupStyle_BarStyle(); + } + + /** + * {@inheritDoc} + */ + @Override + protected boolean isRightInputType(Object arg0) { + return arg0 instanceof org.eclipse.sirius.properties.GroupStyle; + } + + // 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/groupstyle/GroupStyleExpandedByDefaultFilter.java b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/groupstyle/GroupStyleExpandedByDefaultFilter.java new file mode 100644 index 0000000000..128939cb9f --- /dev/null +++ b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/groupstyle/GroupStyleExpandedByDefaultFilter.java @@ -0,0 +1,45 @@ +/******************************************************************************* + * 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.groupstyle; + +// 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 expandedByDefault property section. + */ +public class GroupStyleExpandedByDefaultFilter extends ViewpointPropertyFilter { + + /** + * {@inheritDoc} + */ + @Override + protected EStructuralFeature getFeature() { + return PropertiesPackage.eINSTANCE.getGroupStyle_ExpandedByDefault(); + } + + /** + * {@inheritDoc} + */ + @Override + protected boolean isRightInputType(Object arg0) { + return arg0 instanceof org.eclipse.sirius.properties.GroupStyle; + } + + // 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/groupstyle/GroupStyleFontNameExpressionFilter.java b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/groupstyle/GroupStyleFontNameExpressionFilter.java new file mode 100644 index 0000000000..37b7038ac5 --- /dev/null +++ b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/groupstyle/GroupStyleFontNameExpressionFilter.java @@ -0,0 +1,45 @@ +/******************************************************************************* + * 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.groupstyle; + +// 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 fontNameExpression property section. + */ +public class GroupStyleFontNameExpressionFilter extends ViewpointPropertyFilter { + + /** + * {@inheritDoc} + */ + @Override + protected EStructuralFeature getFeature() { + return PropertiesPackage.eINSTANCE.getGroupStyle_FontNameExpression(); + } + + /** + * {@inheritDoc} + */ + @Override + protected boolean isRightInputType(Object arg0) { + return arg0 instanceof org.eclipse.sirius.properties.GroupStyle; + } + + // 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/groupstyle/GroupStyleFontSizeFilter.java b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/groupstyle/GroupStyleFontSizeFilter.java new file mode 100644 index 0000000000..bef19c4433 --- /dev/null +++ b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/groupstyle/GroupStyleFontSizeFilter.java @@ -0,0 +1,45 @@ +/******************************************************************************* + * 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.groupstyle; + +// 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 fontSize property section. + */ +public class GroupStyleFontSizeFilter extends ViewpointPropertyFilter { + + /** + * {@inheritDoc} + */ + @Override + protected EStructuralFeature getFeature() { + return PropertiesPackage.eINSTANCE.getGroupStyle_FontSize(); + } + + /** + * {@inheritDoc} + */ + @Override + protected boolean isRightInputType(Object arg0) { + return arg0 instanceof org.eclipse.sirius.properties.GroupStyle; + } + + // 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/groupstyle/GroupStyleForegroundColorFilter.java b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/groupstyle/GroupStyleForegroundColorFilter.java new file mode 100644 index 0000000000..da63ed1f97 --- /dev/null +++ b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/groupstyle/GroupStyleForegroundColorFilter.java @@ -0,0 +1,45 @@ +/******************************************************************************* + * 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.groupstyle; + +// 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 foregroundColor property section. + */ +public class GroupStyleForegroundColorFilter extends ViewpointPropertyFilter { + + /** + * {@inheritDoc} + */ + @Override + protected EStructuralFeature getFeature() { + return PropertiesPackage.eINSTANCE.getGroupStyle_ForegroundColor(); + } + + /** + * {@inheritDoc} + */ + @Override + protected boolean isRightInputType(Object arg0) { + return arg0 instanceof org.eclipse.sirius.properties.GroupStyle; + } + + // 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/groupstyle/GroupStyleToggleStyleFilter.java b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/groupstyle/GroupStyleToggleStyleFilter.java new file mode 100644 index 0000000000..0d28b4404d --- /dev/null +++ b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/groupstyle/GroupStyleToggleStyleFilter.java @@ -0,0 +1,45 @@ +/******************************************************************************* + * 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.groupstyle; + +// 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 toggleStyle property section. + */ +public class GroupStyleToggleStyleFilter extends ViewpointPropertyFilter { + + /** + * {@inheritDoc} + */ + @Override + protected EStructuralFeature getFeature() { + return PropertiesPackage.eINSTANCE.getGroupStyle_ToggleStyle(); + } + + /** + * {@inheritDoc} + */ + @Override + protected boolean isRightInputType(Object arg0) { + return arg0 instanceof org.eclipse.sirius.properties.GroupStyle; + } + + // 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/groupstyle/GroupStyleBackgroundColorPropertySection.java b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/groupstyle/GroupStyleBackgroundColorPropertySection.java new file mode 100644 index 0000000000..497d1b7ada --- /dev/null +++ b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/groupstyle/GroupStyleBackgroundColorPropertySection.java @@ -0,0 +1,132 @@ +/******************************************************************************* + * 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.groupstyle; + +// 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 backgroundColor property of a GroupStyle object. + */ +public class GroupStyleBackgroundColorPropertySection extends AbstractComboPropertySection { + /** + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractComboPropertySection#getDefaultLabelText() + */ + @Override + protected String getDefaultLabelText() { + return "BackgroundColor"; //$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.getGroupStyle_BackgroundColor(); + } + + /** + * @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/groupstyle/GroupStyleBarStylePropertySection.java b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/groupstyle/GroupStyleBarStylePropertySection.java new file mode 100644 index 0000000000..54b7b3ee11 --- /dev/null +++ b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/groupstyle/GroupStyleBarStylePropertySection.java @@ -0,0 +1,90 @@ +/******************************************************************************* + * 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.groupstyle; + +// Start of user code imports + +import java.util.List; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.sirius.editor.properties.sections.common.AbstractRadioButtonPropertySection; +import org.eclipse.sirius.properties.PropertiesPackage; +import org.eclipse.sirius.properties.TitleBarStyle; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage; + +// End of user code imports + +/** + * A section for the barStyle property of a GroupStyle object. + */ +public class GroupStyleBarStylePropertySection extends AbstractRadioButtonPropertySection { + /** + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractRadioButtonPropertySection#getDefaultLabelText() + */ + @Override + protected String getDefaultLabelText() { + return "BarStyle"; //$NON-NLS-1$ + } + + /** + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractRadioButtonPropertySection#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.AbstractRadioButtonPropertySection#getFeature() + */ + @Override + protected EAttribute getFeature() { + return PropertiesPackage.eINSTANCE.getGroupStyle_BarStyle(); + } + + /** + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractRadioButtonPropertySection#getFeatureValue(int) + */ + @Override + protected Object getFeatureValue(int index) { + return getChoiceOfValues().get(index); + } + + /** + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractRadioButtonPropertySection#isEqual(int) + */ + @Override + protected boolean isEqual(int index) { + return getChoiceOfValues().get(index).equals(eObject.eGet(getFeature())); + } + + /** + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractRadioButtonPropertySection#getEnumerationFeatureValues() + */ + @Override + protected List<?> getChoiceOfValues() { + return TitleBarStyle.VALUES; + } + + /** + * {@inheritDoc} + */ + @Override + public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) { + super.createControls(parent, tabbedPropertySheetPage); + + } +} diff --git a/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/groupstyle/GroupStyleExpandedByDefaultPropertySection.java b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/groupstyle/GroupStyleExpandedByDefaultPropertySection.java new file mode 100644 index 0000000000..b2daee88ae --- /dev/null +++ b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/groupstyle/GroupStyleExpandedByDefaultPropertySection.java @@ -0,0 +1,109 @@ +/******************************************************************************* + * 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.groupstyle; + +// Start of user code imports + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.sirius.editor.properties.sections.common.AbstractCheckBoxPropertySection; +// End of user code imports +import org.eclipse.sirius.properties.PropertiesPackage; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage; + +/** + * A section for the expandedByDefault property of a GroupStyle object. + */ +public class GroupStyleExpandedByDefaultPropertySection extends AbstractCheckBoxPropertySection { + /** + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractCheckBoxPropertySection#getDefaultLabelText() + */ + @Override + protected String getDefaultLabelText() { + return "ExpandedByDefault"; //$NON-NLS-1$ + } + + /** + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractCheckBoxPropertySection#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.AbstractCheckBoxPropertySection#getFeature() + */ + @Override + protected EAttribute getFeature() { + return PropertiesPackage.eINSTANCE.getGroupStyle_ExpandedByDefault(); + } + + /** + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractCheckBoxPropertySection#getFeatureAsInteger() + */ + @Override + protected String getDefaultFeatureAsText() { + String value = new String(); + if (eObject.eGet(getFeature()) != null) { + value = toBoolean(eObject.eGet(getFeature()).toString()).toString(); + } + return value; + } + + /** + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractCheckBoxPropertySection#getFeatureValue(int) + */ + @Override + protected Object getFeatureValue(String newText) { + return toBoolean(newText); + } + + /** + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractCheckBoxPropertySection#isEqual(int) + */ + @Override + protected boolean isEqual(String newText) { + boolean equal = true; + if (toBoolean(newText) != null) { + equal = getFeatureAsText().equals(toBoolean(newText).toString()); + } else { + refresh(); + } + return equal; + } + + /** + * Converts the given text to the boolean it represents if applicable. + * + * @return The boolean the given text represents if applicable, + * <code>null</code> otherwise. + */ + private Boolean toBoolean(String text) { + Boolean booleanValue = null; + if (text.toLowerCase().matches("true|false")) { + booleanValue = Boolean.parseBoolean(text); + } + return booleanValue; + } + + /** + * {@inheritDoc} + */ + @Override + public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) { + super.createControls(parent, tabbedPropertySheetPage); + } +} diff --git a/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/groupstyle/GroupStyleFontNameExpressionPropertySection.java b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/groupstyle/GroupStyleFontNameExpressionPropertySection.java new file mode 100644 index 0000000000..0acdf93b37 --- /dev/null +++ b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/groupstyle/GroupStyleFontNameExpressionPropertySection.java @@ -0,0 +1,120 @@ +/******************************************************************************* + * 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.groupstyle; + +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 fontNameExpression property of a GroupStyle object. + */ +public class GroupStyleFontNameExpressionPropertySection extends AbstractTextWithButtonPropertySection implements ContentProposalClient { + + /** + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractTextWithButtonPropertySection#getDefaultLabelText() + */ + @Override + protected String getDefaultLabelText() { + return "FontNameExpression"; //$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.getGroupStyle_FontNameExpression(); + } + + /** + * @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(), GroupStyleFontNameExpressionPropertySection.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.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/groupstyle/GroupStyleFontSizePropertySection.java b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/groupstyle/GroupStyleFontSizePropertySection.java new file mode 100644 index 0000000000..287c9db29b --- /dev/null +++ b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/groupstyle/GroupStyleFontSizePropertySection.java @@ -0,0 +1,112 @@ +/******************************************************************************* + * 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.groupstyle; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.sirius.editor.properties.sections.common.AbstractSpinnerPropertySection; +import org.eclipse.sirius.properties.PropertiesPackage; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage; + +/** + * A section for the fontSize property of a GroupStyle object. + */ +public class GroupStyleFontSizePropertySection extends AbstractSpinnerPropertySection { + /** + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractSpinnerPropertySection#getDefaultLabelText() + */ + @Override + protected String getDefaultLabelText() { + return "FontSize"; //$NON-NLS-1$ + } + + /** + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractSpinnerPropertySection#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.AbstractSpinnerPropertySection#getFeature() + */ + @Override + protected EAttribute getFeature() { + return PropertiesPackage.eINSTANCE.getGroupStyle_FontSize(); + } + + /** + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractSpinnerPropertySection#getFeatureAsInteger() + */ + @Override + protected String getFeatureAsText() { + String value = new String(); + if (eObject.eGet(getFeature()) != null) { + value = toInteger(eObject.eGet(getFeature()).toString()).toString(); + } + return value; + } + + /** + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractSpinnerPropertySection#isEqual(int) + */ + @Override + protected boolean isEqual(String newText) { + boolean equal = true; + if (toInteger(newText) != null) { + equal = getFeatureAsText().equals(toInteger(newText).toString()); + } else { + refresh(); + } + return equal; + } + + /** + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractSpinnerPropertySection#getFeatureValue(int) + */ + @Override + protected Object getFeatureValue(String newText) { + return toInteger(newText); + } + + /** + * Converts the given text to the integer it represents if applicable. + * + * @return The integer the given text represents if applicable, + * <code>null</code> otherwise. + */ + private Integer toInteger(String text) { + Integer integerValue = null; + try { + integerValue = new Integer(text); + } catch (NumberFormatException e) { + // Not a Integer + } + return integerValue; + } + + /** + * {@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 + } +} diff --git a/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/groupstyle/GroupStyleForegroundColorPropertySection.java b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/groupstyle/GroupStyleForegroundColorPropertySection.java new file mode 100644 index 0000000000..c1a734d64c --- /dev/null +++ b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/groupstyle/GroupStyleForegroundColorPropertySection.java @@ -0,0 +1,132 @@ +/******************************************************************************* + * 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.groupstyle; + +// 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 foregroundColor property of a GroupStyle object. + */ +public class GroupStyleForegroundColorPropertySection extends AbstractComboPropertySection { + /** + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractComboPropertySection#getDefaultLabelText() + */ + @Override + protected String getDefaultLabelText() { + return "ForegroundColor"; //$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.getGroupStyle_ForegroundColor(); + } + + /** + * @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/groupstyle/GroupStyleToggleStylePropertySection.java b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/groupstyle/GroupStyleToggleStylePropertySection.java new file mode 100644 index 0000000000..105de00a85 --- /dev/null +++ b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/groupstyle/GroupStyleToggleStylePropertySection.java @@ -0,0 +1,90 @@ +/******************************************************************************* + * 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.groupstyle; + +// Start of user code imports + +import java.util.List; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.sirius.editor.properties.sections.common.AbstractRadioButtonPropertySection; +import org.eclipse.sirius.properties.PropertiesPackage; +import org.eclipse.sirius.properties.ToggleStyle; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage; + +// End of user code imports + +/** + * A section for the toggleStyle property of a GroupStyle object. + */ +public class GroupStyleToggleStylePropertySection extends AbstractRadioButtonPropertySection { + /** + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractRadioButtonPropertySection#getDefaultLabelText() + */ + @Override + protected String getDefaultLabelText() { + return "ToggleStyle"; //$NON-NLS-1$ + } + + /** + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractRadioButtonPropertySection#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.AbstractRadioButtonPropertySection#getFeature() + */ + @Override + protected EAttribute getFeature() { + return PropertiesPackage.eINSTANCE.getGroupStyle_ToggleStyle(); + } + + /** + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractRadioButtonPropertySection#getFeatureValue(int) + */ + @Override + protected Object getFeatureValue(int index) { + return getChoiceOfValues().get(index); + } + + /** + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractRadioButtonPropertySection#isEqual(int) + */ + @Override + protected boolean isEqual(int index) { + return getChoiceOfValues().get(index).equals(eObject.eGet(getFeature())); + } + + /** + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractRadioButtonPropertySection#getEnumerationFeatureValues() + */ + @Override + protected List<?> getChoiceOfValues() { + return ToggleStyle.VALUES; + } + + /** + * {@inheritDoc} + */ + @Override + public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) { + super.createControls(parent, tabbedPropertySheetPage); + + } +} diff --git a/incubation/org.eclipse.sirius.properties.edit/icons/full/obj16/GroupConditionalStyle.gif b/incubation/org.eclipse.sirius.properties.edit/icons/full/obj16/GroupConditionalStyle.gif Binary files differnew file mode 100644 index 0000000000..05dc74ad5d --- /dev/null +++ b/incubation/org.eclipse.sirius.properties.edit/icons/full/obj16/GroupConditionalStyle.gif diff --git a/incubation/org.eclipse.sirius.properties.edit/icons/full/obj16/GroupStyle.gif b/incubation/org.eclipse.sirius.properties.edit/icons/full/obj16/GroupStyle.gif Binary files differnew file mode 100644 index 0000000000..f8041d2255 --- /dev/null +++ b/incubation/org.eclipse.sirius.properties.edit/icons/full/obj16/GroupStyle.gif diff --git a/incubation/org.eclipse.sirius.properties.edit/plugin.properties b/incubation/org.eclipse.sirius.properties.edit/plugin.properties index 33aa3dcca2..842e488388 100644 --- a/incubation/org.eclipse.sirius.properties.edit/plugin.properties +++ b/incubation/org.eclipse.sirius.properties.edit/plugin.properties @@ -225,3 +225,22 @@ _UI_WidgetAction_initialOperation_feature = Initial Operation _UI_ReferenceWidgetConditionalStyle_type = Reference Widget Conditional Style _UI_ReferenceDescription_conditionalStyles_feature = Conditional Styles _UI_ReferenceWidgetConditionalStyle_style_feature = Style +_UI_GroupStyle_type = Group Style +_UI_GroupDescription_style_feature = Style +_UI_GroupStyle_backgroundColor_feature = Background Color +_UI_GroupStyle_foregroundColor_feature = Foreground Color +_UI_GroupStyle_fontNameExpression_feature = Font Name Expression +_UI_GroupStyle_fontSize_feature = Font Size +_UI_GroupStyle_barStyle_feature = Bar Style +_UI_GroupStyle_toggleStyle_feature = Toggle Style +_UI_ToggleStyle_TWISTIE_literal = TWISTIE +_UI_ToggleStyle_TREE_NODE_literal = TREE_NODE +_UI_ToggleStyle_NONE_literal = NONE +_UI_TitleBarStyle_TITLE_BAR_literal = TITLE_BAR +_UI_TitleBarStyle_SHORT_TITLE_BAR_literal = SHORT_TITLE_BAR +_UI_TitleBarStyle_NO_TITLE_literal = NO_TITLE +_UI_GroupStyle_isExpandedByDefault_feature = Is Expanded By Default +_UI_GroupStyle_expandedByDefault_feature = Expanded By Default +_UI_GroupConditionalStyle_type = Group Conditional Style +_UI_GroupConditionalStyle_style_feature = Style +_UI_GroupDescription_conditionalStyles_feature = Conditional Styles diff --git a/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/GroupConditionalStyleItemProvider.java b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/GroupConditionalStyleItemProvider.java new file mode 100644 index 0000000000..d410b1b1fb --- /dev/null +++ b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/GroupConditionalStyleItemProvider.java @@ -0,0 +1,149 @@ +/** + * 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.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; +import org.eclipse.sirius.properties.GroupConditionalStyle; +import org.eclipse.sirius.properties.PropertiesFactory; +import org.eclipse.sirius.properties.PropertiesPackage; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.properties.GroupConditionalStyle} object. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class GroupConditionalStyleItemProvider extends WidgetConditionalStyleItemProvider { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public GroupConditionalStyleItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This specifies how to implement {@link #getChildren} and is used to + * deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, + * {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in + * {@link #createCommand}. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(PropertiesPackage.Literals.GROUP_CONDITIONAL_STYLE__STYLE); + } + return childrenFeatures; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper + // feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns GroupConditionalStyle.gif. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/GroupConditionalStyle")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((GroupConditionalStyle) object).getPreconditionExpression(); + return label == null || label.length() == 0 ? getString("_UI_GroupConditionalStyle_type") : getString("_UI_GroupConditionalStyle_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(GroupConditionalStyle.class)) { + case PropertiesPackage.GROUP_CONDITIONAL_STYLE__STYLE: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s + * describing the children that can be created under this object. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.GROUP_CONDITIONAL_STYLE__STYLE, PropertiesFactory.eINSTANCE.createGroupStyle())); + } + +} diff --git a/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/GroupDescriptionItemProvider.java b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/GroupDescriptionItemProvider.java index c92135cea0..f234440df7 100644 --- a/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/GroupDescriptionItemProvider.java +++ b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/GroupDescriptionItemProvider.java @@ -149,6 +149,8 @@ public class GroupDescriptionItemProvider extends ItemProviderAdapter super.getChildrenFeatures(object); childrenFeatures.add(PropertiesPackage.Literals.GROUP_DESCRIPTION__CONTROLS); childrenFeatures.add(PropertiesPackage.Literals.GROUP_DESCRIPTION__VALIDATION_SET); + childrenFeatures.add(PropertiesPackage.Literals.GROUP_DESCRIPTION__STYLE); + childrenFeatures.add(PropertiesPackage.Literals.GROUP_DESCRIPTION__CONDITIONAL_STYLES); } return childrenFeatures; } @@ -212,6 +214,8 @@ public class GroupDescriptionItemProvider extends ItemProviderAdapter return; case PropertiesPackage.GROUP_DESCRIPTION__CONTROLS: case PropertiesPackage.GROUP_DESCRIPTION__VALIDATION_SET: + case PropertiesPackage.GROUP_DESCRIPTION__STYLE: + case PropertiesPackage.GROUP_DESCRIPTION__CONDITIONAL_STYLES: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); return; } @@ -254,6 +258,10 @@ public class GroupDescriptionItemProvider extends ItemProviderAdapter newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.GROUP_DESCRIPTION__CONTROLS, PropertiesFactory.eINSTANCE.createHyperlinkDescription())); newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.GROUP_DESCRIPTION__VALIDATION_SET, PropertiesFactory.eINSTANCE.createGroupValidationSetDescription())); + + newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.GROUP_DESCRIPTION__STYLE, PropertiesFactory.eINSTANCE.createGroupStyle())); + + newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.GROUP_DESCRIPTION__CONDITIONAL_STYLES, PropertiesFactory.eINSTANCE.createGroupConditionalStyle())); } /** diff --git a/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/GroupStyleItemProvider.java b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/GroupStyleItemProvider.java new file mode 100644 index 0000000000..608c0321fd --- /dev/null +++ b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/GroupStyleItemProvider.java @@ -0,0 +1,228 @@ +/** + * 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.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.ResourceLocator; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; +import org.eclipse.emf.edit.provider.ViewerNotification; +import org.eclipse.sirius.properties.GroupStyle; +import org.eclipse.sirius.properties.PropertiesPackage; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.properties.GroupStyle} object. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ +public class GroupStyleItemProvider extends ItemProviderAdapter + implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public GroupStyleItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addBackgroundColorPropertyDescriptor(object); + addForegroundColorPropertyDescriptor(object); + addFontNameExpressionPropertyDescriptor(object); + addFontSizePropertyDescriptor(object); + addBarStylePropertyDescriptor(object); + addToggleStylePropertyDescriptor(object); + addExpandedByDefaultPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Background Color feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addBackgroundColorPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_GroupStyle_backgroundColor_feature"), getString("_UI_PropertyDescriptor_description", "_UI_GroupStyle_backgroundColor_feature", "_UI_GroupStyle_type"), + PropertiesPackage.Literals.GROUP_STYLE__BACKGROUND_COLOR, true, false, true, null, null, null)); + } + + /** + * This adds a property descriptor for the Foreground Color feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addForegroundColorPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_GroupStyle_foregroundColor_feature"), getString("_UI_PropertyDescriptor_description", "_UI_GroupStyle_foregroundColor_feature", "_UI_GroupStyle_type"), + PropertiesPackage.Literals.GROUP_STYLE__FOREGROUND_COLOR, true, false, true, null, null, null)); + } + + /** + * This adds a property descriptor for the Font Name Expression feature. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addFontNameExpressionPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_GroupStyle_fontNameExpression_feature"), getString("_UI_PropertyDescriptor_description", "_UI_GroupStyle_fontNameExpression_feature", "_UI_GroupStyle_type"), + PropertiesPackage.Literals.GROUP_STYLE__FONT_NAME_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + } + + /** + * This adds a property descriptor for the Font Size feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addFontSizePropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_GroupStyle_fontSize_feature"), getString("_UI_PropertyDescriptor_description", "_UI_GroupStyle_fontSize_feature", "_UI_GroupStyle_type"), + PropertiesPackage.Literals.GROUP_STYLE__FONT_SIZE, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); + } + + /** + * This adds a property descriptor for the Bar Style feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addBarStylePropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_GroupStyle_barStyle_feature"), getString("_UI_PropertyDescriptor_description", "_UI_GroupStyle_barStyle_feature", "_UI_GroupStyle_type"), + PropertiesPackage.Literals.GROUP_STYLE__BAR_STYLE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + } + + /** + * This adds a property descriptor for the Toggle Style feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addToggleStylePropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_GroupStyle_toggleStyle_feature"), getString("_UI_PropertyDescriptor_description", "_UI_GroupStyle_toggleStyle_feature", "_UI_GroupStyle_type"), + PropertiesPackage.Literals.GROUP_STYLE__TOGGLE_STYLE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + } + + /** + * This adds a property descriptor for the Expanded By Default feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addExpandedByDefaultPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_GroupStyle_expandedByDefault_feature"), getString("_UI_PropertyDescriptor_description", "_UI_GroupStyle_expandedByDefault_feature", "_UI_GroupStyle_type"), + PropertiesPackage.Literals.GROUP_STYLE__EXPANDED_BY_DEFAULT, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); + } + + /** + * This returns GroupStyle.gif. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/GroupStyle")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((GroupStyle) object).getFontNameExpression(); + return label == null || label.length() == 0 ? getString("_UI_GroupStyle_type") : getString("_UI_GroupStyle_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(GroupStyle.class)) { + case PropertiesPackage.GROUP_STYLE__FONT_NAME_EXPRESSION: + case PropertiesPackage.GROUP_STYLE__FONT_SIZE: + case PropertiesPackage.GROUP_STYLE__BAR_STYLE: + case PropertiesPackage.GROUP_STYLE__TOGGLE_STYLE: + case PropertiesPackage.GROUP_STYLE__EXPANDED_BY_DEFAULT: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s + * describing the children that can be created under this object. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return PropertiesEditPlugin.INSTANCE; + } + +} diff --git a/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/PropertiesItemProviderAdapterFactory.java b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/PropertiesItemProviderAdapterFactory.java index 5f8cace6d2..f2f67dba7f 100644 --- a/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/PropertiesItemProviderAdapterFactory.java +++ b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/PropertiesItemProviderAdapterFactory.java @@ -946,6 +946,31 @@ public class PropertiesItemProviderAdapterFactory extends PropertiesAdapterFacto /** * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.properties.GroupStyle} instances. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected GroupStyleItemProvider groupStyleItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.properties.GroupStyle}. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createGroupStyleAdapter() { + if (groupStyleItemProvider == null) { + groupStyleItemProvider = new GroupStyleItemProvider(this); + } + + return groupStyleItemProvider; + } + + /** + * This keeps track of the one adapter used for all * {@link org.eclipse.sirius.properties.TextWidgetConditionalStyle} * instances. <!-- begin-user-doc --> <!-- end-user-doc --> * @@ -1195,6 +1220,31 @@ public class PropertiesItemProviderAdapterFactory extends PropertiesAdapterFacto } /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.properties.GroupConditionalStyle} instances. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected GroupConditionalStyleItemProvider groupConditionalStyleItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.properties.GroupConditionalStyle}. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createGroupConditionalStyleAdapter() { + if (groupConditionalStyleItemProvider == null) { + groupConditionalStyleItemProvider = new GroupConditionalStyleItemProvider(this); + } + + return groupConditionalStyleItemProvider; + } + + /** * This returns the root adapter factory that contains this factory. <!-- * begin-user-doc --> <!-- end-user-doc --> * @@ -1400,6 +1450,9 @@ public class PropertiesItemProviderAdapterFactory extends PropertiesAdapterFacto if (hyperlinkWidgetStyleItemProvider != null) { hyperlinkWidgetStyleItemProvider.dispose(); } + if (groupStyleItemProvider != null) { + groupStyleItemProvider.dispose(); + } if (textWidgetConditionalStyleItemProvider != null) { textWidgetConditionalStyleItemProvider.dispose(); } @@ -1430,6 +1483,9 @@ public class PropertiesItemProviderAdapterFactory extends PropertiesAdapterFacto if (hyperlinkWidgetConditionalStyleItemProvider != null) { hyperlinkWidgetConditionalStyleItemProvider.dispose(); } + if (groupConditionalStyleItemProvider != null) { + groupConditionalStyleItemProvider.dispose(); + } } /** diff --git a/incubation/org.eclipse.sirius.properties/model/properties.ecore b/incubation/org.eclipse.sirius.properties/model/properties.ecore index a6e5821655..16e222f1a9 100644 --- a/incubation/org.eclipse.sirius.properties/model/properties.ecore +++ b/incubation/org.eclipse.sirius.properties/model/properties.ecore @@ -48,6 +48,10 @@ eType="#//ControlDescription" containment="true"/> <eStructuralFeatures xsi:type="ecore:EReference" name="validationSet" eType="#//GroupValidationSetDescription" containment="true"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="style" eType="#//GroupStyle" + containment="true"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="conditionalStyles" upperBound="-1" + eType="#//GroupConditionalStyle" containment="true"/> </eClassifiers> <eClassifiers xsi:type="ecore:EClass" name="GroupValidationSetDescription"> <eStructuralFeatures xsi:type="ecore:EReference" name="semanticValidationRules" @@ -317,6 +321,25 @@ <eStructuralFeatures xsi:type="ecore:EAttribute" name="fontFormat" upperBound="4" eType="ecore:EEnum ../../org.eclipse.sirius/model/viewpoint.ecore#//FontFormat"/> </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="GroupStyle"> + <eStructuralFeatures xsi:type="ecore:EReference" name="backgroundColor" eType="ecore:EClass ../../org.eclipse.sirius/model/viewpoint.ecore#//description/ColorDescription"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="foregroundColor" eType="ecore:EClass ../../org.eclipse.sirius/model/viewpoint.ecore#//description/ColorDescription"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="fontNameExpression" eType="ecore:EDataType ../../org.eclipse.sirius/model/viewpoint.ecore#//description/InterpretedExpression"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="fontSize" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="barStyle" eType="#//TitleBarStyle"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="toggleStyle" eType="#//ToggleStyle"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="expandedByDefault" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EEnum" name="ToggleStyle"> + <eLiterals name="TWISTIE"/> + <eLiterals name="TREE_NODE" value="1"/> + <eLiterals name="NONE" value="2"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EEnum" name="TitleBarStyle"> + <eLiterals name="TITLE_BAR"/> + <eLiterals name="SHORT_TITLE_BAR" value="1"/> + <eLiterals name="NO_TITLE" value="2"/> + </eClassifiers> <eClassifiers xsi:type="ecore:EClass" name="WidgetConditionalStyle" abstract="true"> <eStructuralFeatures xsi:type="ecore:EAttribute" name="preconditionExpression" eType="ecore:EDataType ../../org.eclipse.sirius/model/viewpoint.ecore#//description/InterpretedExpression"/> @@ -367,4 +390,8 @@ <eStructuralFeatures xsi:type="ecore:EReference" name="style" eType="#//HyperlinkWidgetStyle" containment="true"/> </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="GroupConditionalStyle" eSuperTypes="#//WidgetConditionalStyle"> + <eStructuralFeatures xsi:type="ecore:EReference" name="style" eType="#//GroupStyle" + containment="true"/> + </eClassifiers> </ecore:EPackage> diff --git a/incubation/org.eclipse.sirius.properties/model/properties.genmodel b/incubation/org.eclipse.sirius.properties/model/properties.genmodel index 9bd80efb72..1fdca0189b 100644 --- a/incubation/org.eclipse.sirius.properties/model/properties.genmodel +++ b/incubation/org.eclipse.sirius.properties/model/properties.genmodel @@ -16,6 +16,16 @@ <genEnumLiterals ecoreEnumLiteral="properties.ecore#//FILL_LAYOUT_ORIENTATION/VERTICAL"/> <genEnumLiterals ecoreEnumLiteral="properties.ecore#//FILL_LAYOUT_ORIENTATION/HORIZONTAL"/> </genEnums> + <genEnums typeSafeEnumCompatible="false" ecoreEnum="properties.ecore#//ToggleStyle"> + <genEnumLiterals ecoreEnumLiteral="properties.ecore#//ToggleStyle/TWISTIE"/> + <genEnumLiterals ecoreEnumLiteral="properties.ecore#//ToggleStyle/TREE_NODE"/> + <genEnumLiterals ecoreEnumLiteral="properties.ecore#//ToggleStyle/NONE"/> + </genEnums> + <genEnums typeSafeEnumCompatible="false" ecoreEnum="properties.ecore#//TitleBarStyle"> + <genEnumLiterals ecoreEnumLiteral="properties.ecore#//TitleBarStyle/TITLE_BAR"/> + <genEnumLiterals ecoreEnumLiteral="properties.ecore#//TitleBarStyle/SHORT_TITLE_BAR"/> + <genEnumLiterals ecoreEnumLiteral="properties.ecore#//TitleBarStyle/NO_TITLE"/> + </genEnums> <genClasses ecoreClass="properties.ecore#//ViewExtensionDescription"> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//ViewExtensionDescription/identifier"/> <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference properties.ecore#//ViewExtensionDescription/metamodels"/> @@ -46,6 +56,8 @@ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//GroupDescription/preconditionExpression"/> <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference properties.ecore#//GroupDescription/controls"/> <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference properties.ecore#//GroupDescription/validationSet"/> + <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference properties.ecore#//GroupDescription/style"/> + <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference properties.ecore#//GroupDescription/conditionalStyles"/> </genClasses> <genClasses ecoreClass="properties.ecore#//GroupValidationSetDescription"> <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference properties.ecore#//GroupValidationSetDescription/semanticValidationRules"/> @@ -188,6 +200,15 @@ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference properties.ecore#//HyperlinkWidgetStyle/backgroundColor"/> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//HyperlinkWidgetStyle/fontFormat"/> </genClasses> + <genClasses ecoreClass="properties.ecore#//GroupStyle"> + <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference properties.ecore#//GroupStyle/backgroundColor"/> + <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference properties.ecore#//GroupStyle/foregroundColor"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//GroupStyle/fontNameExpression"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//GroupStyle/fontSize"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//GroupStyle/barStyle"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//GroupStyle/toggleStyle"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//GroupStyle/expandedByDefault"/> + </genClasses> <genClasses image="false" ecoreClass="properties.ecore#//WidgetConditionalStyle"> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//WidgetConditionalStyle/preconditionExpression"/> </genClasses> @@ -222,5 +243,8 @@ <genClasses ecoreClass="properties.ecore#//HyperlinkWidgetConditionalStyle"> <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference properties.ecore#//HyperlinkWidgetConditionalStyle/style"/> </genClasses> + <genClasses ecoreClass="properties.ecore#//GroupConditionalStyle"> + <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference properties.ecore#//GroupConditionalStyle/style"/> + </genClasses> </genPackages> </genmodel:GenModel> diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/GroupConditionalStyle.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/GroupConditionalStyle.java new file mode 100644 index 0000000000..1bdf4866f7 --- /dev/null +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/GroupConditionalStyle.java @@ -0,0 +1,61 @@ +/** + * 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; + +/** + * <!-- begin-user-doc --> A representation of the model object ' + * <em><b>Group Conditional Style</b></em>'. <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link org.eclipse.sirius.properties.GroupConditionalStyle#getStyle + * <em>Style</em>}</li> + * </ul> + * + * @see org.eclipse.sirius.properties.PropertiesPackage#getGroupConditionalStyle() + * @model + * @generated + */ +public interface GroupConditionalStyle extends WidgetConditionalStyle { + /** + * Returns the value of the '<em><b>Style</b></em>' containment reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Style</em>' containment reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Style</em>' containment reference. + * @see #setStyle(GroupStyle) + * @see org.eclipse.sirius.properties.PropertiesPackage#getGroupConditionalStyle_Style() + * @model containment="true" + * @generated + */ + GroupStyle getStyle(); + + /** + * Sets the value of the ' + * {@link org.eclipse.sirius.properties.GroupConditionalStyle#getStyle + * <em>Style</em>}' containment reference. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @param value + * the new value of the '<em>Style</em>' containment reference. + * @see #getStyle() + * @generated + */ + void setStyle(GroupStyle value); + +} // GroupConditionalStyle diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/GroupDescription.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/GroupDescription.java index 3982df6829..132d04fd57 100644 --- a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/GroupDescription.java +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/GroupDescription.java @@ -38,6 +38,11 @@ import org.eclipse.emf.ecore.EObject; * <em>Controls</em>}</li> * <li>{@link org.eclipse.sirius.properties.GroupDescription#getValidationSet * <em>Validation Set</em>}</li> + * <li>{@link org.eclipse.sirius.properties.GroupDescription#getStyle + * <em>Style</em>}</li> + * <li> + * {@link org.eclipse.sirius.properties.GroupDescription#getConditionalStyles + * <em>Conditional Styles</em>}</li> * </ul> * * @see org.eclipse.sirius.properties.PropertiesPackage#getGroupDescription() @@ -250,4 +255,53 @@ public interface GroupDescription extends EObject { */ void setValidationSet(GroupValidationSetDescription value); + /** + * Returns the value of the '<em><b>Style</b></em>' containment reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Style</em>' containment reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Style</em>' containment reference. + * @see #setStyle(GroupStyle) + * @see org.eclipse.sirius.properties.PropertiesPackage#getGroupDescription_Style() + * @model containment="true" + * @generated + */ + GroupStyle getStyle(); + + /** + * Sets the value of the ' + * {@link org.eclipse.sirius.properties.GroupDescription#getStyle + * <em>Style</em>}' containment reference. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @param value + * the new value of the '<em>Style</em>' containment reference. + * @see #getStyle() + * @generated + */ + void setStyle(GroupStyle value); + + /** + * Returns the value of the '<em><b>Conditional Styles</b></em>' containment + * reference list. The list contents are of type + * {@link org.eclipse.sirius.properties.GroupConditionalStyle}. <!-- + * begin-user-doc --> + * <p> + * If the meaning of the '<em>Conditional Styles</em>' containment reference + * list isn't clear, there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Conditional Styles</em>' containment + * reference list. + * @see org.eclipse.sirius.properties.PropertiesPackage#getGroupDescription_ConditionalStyles() + * @model containment="true" + * @generated + */ + EList<GroupConditionalStyle> getConditionalStyles(); + } // GroupDescription diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/GroupStyle.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/GroupStyle.java new file mode 100644 index 0000000000..f4232e090f --- /dev/null +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/GroupStyle.java @@ -0,0 +1,266 @@ +/** + * 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; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.sirius.viewpoint.description.ColorDescription; + +/** + * <!-- begin-user-doc --> A representation of the model object ' + * <em><b>Group Style</b></em>'. <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link org.eclipse.sirius.properties.GroupStyle#getBackgroundColor + * <em>Background Color</em>}</li> + * <li>{@link org.eclipse.sirius.properties.GroupStyle#getForegroundColor + * <em>Foreground Color</em>}</li> + * <li>{@link org.eclipse.sirius.properties.GroupStyle#getFontNameExpression + * <em>Font Name Expression</em>}</li> + * <li>{@link org.eclipse.sirius.properties.GroupStyle#getFontSize + * <em>Font Size</em>}</li> + * <li>{@link org.eclipse.sirius.properties.GroupStyle#getBarStyle + * <em>Bar Style</em>}</li> + * <li>{@link org.eclipse.sirius.properties.GroupStyle#getToggleStyle + * <em>Toggle Style</em>}</li> + * <li>{@link org.eclipse.sirius.properties.GroupStyle#isExpandedByDefault + * <em>Expanded By Default</em>}</li> + * </ul> + * + * @see org.eclipse.sirius.properties.PropertiesPackage#getGroupStyle() + * @model + * @generated + */ +public interface GroupStyle extends EObject { + /** + * Returns the value of the '<em><b>Background Color</b></em>' reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Background Color</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Background Color</em>' reference. + * @see #setBackgroundColor(ColorDescription) + * @see org.eclipse.sirius.properties.PropertiesPackage#getGroupStyle_BackgroundColor() + * @model + * @generated + */ + ColorDescription getBackgroundColor(); + + /** + * Sets the value of the ' + * {@link org.eclipse.sirius.properties.GroupStyle#getBackgroundColor + * <em>Background Color</em>}' reference. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @param value + * the new value of the '<em>Background Color</em>' reference. + * @see #getBackgroundColor() + * @generated + */ + void setBackgroundColor(ColorDescription value); + + /** + * Returns the value of the '<em><b>Foreground Color</b></em>' reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Foreground Color</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Foreground Color</em>' reference. + * @see #setForegroundColor(ColorDescription) + * @see org.eclipse.sirius.properties.PropertiesPackage#getGroupStyle_ForegroundColor() + * @model + * @generated + */ + ColorDescription getForegroundColor(); + + /** + * Sets the value of the ' + * {@link org.eclipse.sirius.properties.GroupStyle#getForegroundColor + * <em>Foreground Color</em>}' reference. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @param value + * the new value of the '<em>Foreground Color</em>' reference. + * @see #getForegroundColor() + * @generated + */ + void setForegroundColor(ColorDescription value); + + /** + * Returns the value of the '<em><b>Font Name Expression</b></em>' + * attribute. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Font Name 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>Font Name Expression</em>' attribute. + * @see #setFontNameExpression(String) + * @see org.eclipse.sirius.properties.PropertiesPackage#getGroupStyle_FontNameExpression() + * @model dataType= + * "org.eclipse.sirius.viewpoint.description.InterpretedExpression" + * @generated + */ + String getFontNameExpression(); + + /** + * Sets the value of the ' + * {@link org.eclipse.sirius.properties.GroupStyle#getFontNameExpression + * <em>Font Name Expression</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @param value + * the new value of the '<em>Font Name Expression</em>' + * attribute. + * @see #getFontNameExpression() + * @generated + */ + void setFontNameExpression(String value); + + /** + * Returns the value of the '<em><b>Font Size</b></em>' attribute. <!-- + * begin-user-doc --> + * <p> + * If the meaning of the '<em>Font Size</em>' attribute isn't clear, there + * really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Font Size</em>' attribute. + * @see #setFontSize(int) + * @see org.eclipse.sirius.properties.PropertiesPackage#getGroupStyle_FontSize() + * @model + * @generated + */ + int getFontSize(); + + /** + * Sets the value of the ' + * {@link org.eclipse.sirius.properties.GroupStyle#getFontSize + * <em>Font Size</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @param value + * the new value of the '<em>Font Size</em>' attribute. + * @see #getFontSize() + * @generated + */ + void setFontSize(int value); + + /** + * Returns the value of the '<em><b>Bar Style</b></em>' attribute. The + * literals are from the enumeration + * {@link org.eclipse.sirius.properties.TitleBarStyle}. <!-- begin-user-doc + * --> + * <p> + * If the meaning of the '<em>Bar Style</em>' attribute isn't clear, there + * really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Bar Style</em>' attribute. + * @see org.eclipse.sirius.properties.TitleBarStyle + * @see #setBarStyle(TitleBarStyle) + * @see org.eclipse.sirius.properties.PropertiesPackage#getGroupStyle_BarStyle() + * @model + * @generated + */ + TitleBarStyle getBarStyle(); + + /** + * Sets the value of the ' + * {@link org.eclipse.sirius.properties.GroupStyle#getBarStyle + * <em>Bar Style</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @param value + * the new value of the '<em>Bar Style</em>' attribute. + * @see org.eclipse.sirius.properties.TitleBarStyle + * @see #getBarStyle() + * @generated + */ + void setBarStyle(TitleBarStyle value); + + /** + * Returns the value of the '<em><b>Toggle Style</b></em>' attribute. The + * literals are from the enumeration + * {@link org.eclipse.sirius.properties.ToggleStyle}. <!-- begin-user-doc + * --> + * <p> + * If the meaning of the '<em>Toggle Style</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Toggle Style</em>' attribute. + * @see org.eclipse.sirius.properties.ToggleStyle + * @see #setToggleStyle(ToggleStyle) + * @see org.eclipse.sirius.properties.PropertiesPackage#getGroupStyle_ToggleStyle() + * @model + * @generated + */ + ToggleStyle getToggleStyle(); + + /** + * Sets the value of the ' + * {@link org.eclipse.sirius.properties.GroupStyle#getToggleStyle + * <em>Toggle Style</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @param value + * the new value of the '<em>Toggle Style</em>' attribute. + * @see org.eclipse.sirius.properties.ToggleStyle + * @see #getToggleStyle() + * @generated + */ + void setToggleStyle(ToggleStyle value); + + /** + * Returns the value of the '<em><b>Expanded By Default</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Expanded By Default</em>' attribute isn't + * clear, there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Expanded By Default</em>' attribute. + * @see #setExpandedByDefault(boolean) + * @see org.eclipse.sirius.properties.PropertiesPackage#getGroupStyle_ExpandedByDefault() + * @model + * @generated + */ + boolean isExpandedByDefault(); + + /** + * Sets the value of the ' + * {@link org.eclipse.sirius.properties.GroupStyle#isExpandedByDefault + * <em>Expanded By Default</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @param value + * the new value of the '<em>Expanded By Default</em>' attribute. + * @see #isExpandedByDefault() + * @generated + */ + void setExpandedByDefault(boolean value); + +} // GroupStyle diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/PropertiesFactory.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/PropertiesFactory.java index 86b75edfe0..f0f3fab395 100644 --- a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/PropertiesFactory.java +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/PropertiesFactory.java @@ -337,6 +337,15 @@ public interface PropertiesFactory extends EFactory { HyperlinkWidgetStyle createHyperlinkWidgetStyle(); /** + * Returns a new object of class '<em>Group Style</em>'. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @return a new object of class '<em>Group Style</em>'. + * @generated + */ + GroupStyle createGroupStyle(); + + /** * Returns a new object of class '<em>Text Widget Conditional Style</em>'. * <!-- begin-user-doc --> <!-- end-user-doc --> * @@ -432,6 +441,15 @@ public interface PropertiesFactory extends EFactory { HyperlinkWidgetConditionalStyle createHyperlinkWidgetConditionalStyle(); /** + * Returns a new object of class '<em>Group Conditional Style</em>'. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @return a new object of class '<em>Group Conditional Style</em>'. + * @generated + */ + GroupConditionalStyle createGroupConditionalStyle(); + + /** * Returns the package supported by this factory. <!-- begin-user-doc --> * <!-- end-user-doc --> * 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 35f074fafc..82c0000c7f 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 @@ -398,13 +398,31 @@ public interface PropertiesPackage extends EPackage { int GROUP_DESCRIPTION__VALIDATION_SET = 6; /** + * The feature id for the '<em><b>Style</b></em>' containment reference. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int GROUP_DESCRIPTION__STYLE = 7; + + /** + * The feature id for the '<em><b>Conditional Styles</b></em>' containment + * reference list. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int GROUP_DESCRIPTION__CONDITIONAL_STYLES = 8; + + /** * The number of structural features of the '<em>Group Description</em>' * class. <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated * @ordered */ - int GROUP_DESCRIPTION_FEATURE_COUNT = 7; + int GROUP_DESCRIPTION_FEATURE_COUNT = 9; /** * The meta object id for the ' @@ -2507,7 +2525,7 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getWidgetConditionalStyle() * @generated */ - int WIDGET_CONDITIONAL_STYLE = 37; + int WIDGET_CONDITIONAL_STYLE = 38; /** * The meta object id for the ' @@ -2519,7 +2537,7 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getTextWidgetConditionalStyle() * @generated */ - int TEXT_WIDGET_CONDITIONAL_STYLE = 38; + int TEXT_WIDGET_CONDITIONAL_STYLE = 39; /** * The meta object id for the ' @@ -2531,7 +2549,7 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getLabelWidgetConditionalStyle() * @generated */ - int LABEL_WIDGET_CONDITIONAL_STYLE = 39; + int LABEL_WIDGET_CONDITIONAL_STYLE = 40; /** * The meta object id for the ' @@ -2543,7 +2561,7 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getCheckboxWidgetConditionalStyle() * @generated */ - int CHECKBOX_WIDGET_CONDITIONAL_STYLE = 40; + int CHECKBOX_WIDGET_CONDITIONAL_STYLE = 41; /** * The meta object id for the ' @@ -2555,7 +2573,7 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getRadioWidgetConditionalStyle() * @generated */ - int RADIO_WIDGET_CONDITIONAL_STYLE = 41; + int RADIO_WIDGET_CONDITIONAL_STYLE = 42; /** * The meta object id for the ' @@ -2567,7 +2585,7 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getButtonWidgetConditionalStyle() * @generated */ - int BUTTON_WIDGET_CONDITIONAL_STYLE = 42; + int BUTTON_WIDGET_CONDITIONAL_STYLE = 43; /** * The meta object id for the ' @@ -2579,7 +2597,7 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getSelectWidgetConditionalStyle() * @generated */ - int SELECT_WIDGET_CONDITIONAL_STYLE = 43; + int SELECT_WIDGET_CONDITIONAL_STYLE = 44; /** * The meta object id for the ' @@ -2591,7 +2609,7 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getCustomWidgetConditionalStyle() * @generated */ - int CUSTOM_WIDGET_CONDITIONAL_STYLE = 44; + int CUSTOM_WIDGET_CONDITIONAL_STYLE = 45; /** * The meta object id for the ' @@ -2603,7 +2621,7 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getReferenceWidgetConditionalStyle() * @generated */ - int REFERENCE_WIDGET_CONDITIONAL_STYLE = 45; + int REFERENCE_WIDGET_CONDITIONAL_STYLE = 46; /** * The meta object id for the ' @@ -2615,7 +2633,7 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getWidgetAction() * @generated */ - int WIDGET_ACTION = 46; + int WIDGET_ACTION = 47; /** * The meta object id for the ' @@ -2786,6 +2804,90 @@ public interface PropertiesPackage extends EPackage { int HYPERLINK_WIDGET_STYLE_FEATURE_COUNT = PropertiesPackage.WIDGET_STYLE_FEATURE_COUNT + 4; /** + * The meta object id for the ' + * {@link org.eclipse.sirius.properties.impl.GroupStyleImpl + * <em>Group Style</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @see org.eclipse.sirius.properties.impl.GroupStyleImpl + * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getGroupStyle() + * @generated + */ + int GROUP_STYLE = 37; + + /** + * The feature id for the '<em><b>Background Color</b></em>' reference. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int GROUP_STYLE__BACKGROUND_COLOR = 0; + + /** + * The feature id for the '<em><b>Foreground Color</b></em>' reference. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int GROUP_STYLE__FOREGROUND_COLOR = 1; + + /** + * The feature id for the '<em><b>Font Name Expression</b></em>' attribute. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int GROUP_STYLE__FONT_NAME_EXPRESSION = 2; + + /** + * The feature id for the '<em><b>Font Size</b></em>' attribute. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int GROUP_STYLE__FONT_SIZE = 3; + + /** + * The feature id for the '<em><b>Bar Style</b></em>' attribute. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int GROUP_STYLE__BAR_STYLE = 4; + + /** + * The feature id for the '<em><b>Toggle Style</b></em>' attribute. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int GROUP_STYLE__TOGGLE_STYLE = 5; + + /** + * The feature id for the '<em><b>Expanded By Default</b></em>' attribute. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int GROUP_STYLE__EXPANDED_BY_DEFAULT = 6; + + /** + * The number of structural features of the '<em>Group Style</em>' class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int GROUP_STYLE_FEATURE_COUNT = 7; + + /** * The feature id for the '<em><b>Precondition Expression</b></em>' * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> * @@ -3065,7 +3167,7 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getHyperlinkWidgetConditionalStyle() * @generated */ - int HYPERLINK_WIDGET_CONDITIONAL_STYLE = 47; + int HYPERLINK_WIDGET_CONDITIONAL_STYLE = 48; /** * The feature id for the '<em><b>Precondition Expression</b></em>' @@ -3097,6 +3199,46 @@ public interface PropertiesPackage extends EPackage { /** * The meta object id for the ' + * {@link org.eclipse.sirius.properties.impl.GroupConditionalStyleImpl + * <em>Group Conditional Style</em>}' class. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see org.eclipse.sirius.properties.impl.GroupConditionalStyleImpl + * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getGroupConditionalStyle() + * @generated + */ + int GROUP_CONDITIONAL_STYLE = 49; + + /** + * The feature id for the '<em><b>Precondition Expression</b></em>' + * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int GROUP_CONDITIONAL_STYLE__PRECONDITION_EXPRESSION = PropertiesPackage.WIDGET_CONDITIONAL_STYLE__PRECONDITION_EXPRESSION; + + /** + * The feature id for the '<em><b>Style</b></em>' containment reference. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int GROUP_CONDITIONAL_STYLE__STYLE = PropertiesPackage.WIDGET_CONDITIONAL_STYLE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the ' + * <em>Group Conditional Style</em>' class. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + * @ordered + */ + int GROUP_CONDITIONAL_STYLE_FEATURE_COUNT = PropertiesPackage.WIDGET_CONDITIONAL_STYLE_FEATURE_COUNT + 1; + + /** + * The meta object id for the ' * {@link org.eclipse.sirius.properties.FILL_LAYOUT_ORIENTATION * <em>FILL LAYOUT ORIENTATION</em>}' enum. <!-- begin-user-doc --> <!-- * end-user-doc --> @@ -3105,7 +3247,30 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getFILL_LAYOUT_ORIENTATION() * @generated */ - int FILL_LAYOUT_ORIENTATION = 48; + int FILL_LAYOUT_ORIENTATION = 50; + + /** + * The meta object id for the ' + * {@link org.eclipse.sirius.properties.ToggleStyle <em>Toggle Style</em>}' + * enum. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.sirius.properties.ToggleStyle + * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getToggleStyle() + * @generated + */ + int TOGGLE_STYLE = 51; + + /** + * The meta object id for the ' + * {@link org.eclipse.sirius.properties.TitleBarStyle + * <em>Title Bar Style</em>}' enum. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see org.eclipse.sirius.properties.TitleBarStyle + * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getTitleBarStyle() + * @generated + */ + int TITLE_BAR_STYLE = 52; /** * Returns the meta object for class ' @@ -3426,6 +3591,32 @@ public interface PropertiesPackage extends EPackage { EReference getGroupDescription_ValidationSet(); /** + * Returns the meta object for the containment reference ' + * {@link org.eclipse.sirius.properties.GroupDescription#getStyle + * <em>Style</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the containment reference '<em>Style</em>'. + * @see org.eclipse.sirius.properties.GroupDescription#getStyle() + * @see #getGroupDescription() + * @generated + */ + EReference getGroupDescription_Style(); + + /** + * Returns the meta object for the containment reference list ' + * {@link org.eclipse.sirius.properties.GroupDescription#getConditionalStyles + * <em>Conditional Styles</em>}'. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @return the meta object for the containment reference list ' + * <em>Conditional Styles</em>'. + * @see org.eclipse.sirius.properties.GroupDescription#getConditionalStyles() + * @see #getGroupDescription() + * @generated + */ + EReference getGroupDescription_ConditionalStyles(); + + /** * Returns the meta object for class ' * {@link org.eclipse.sirius.properties.GroupValidationSetDescription * <em>Group Validation Set Description</em>}'. <!-- begin-user-doc --> <!-- @@ -5128,6 +5319,30 @@ public interface PropertiesPackage extends EPackage { /** * Returns the meta object for class ' + * {@link org.eclipse.sirius.properties.GroupConditionalStyle + * <em>Group Conditional Style</em>}'. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @return the meta object for class '<em>Group Conditional Style</em>'. + * @see org.eclipse.sirius.properties.GroupConditionalStyle + * @generated + */ + EClass getGroupConditionalStyle(); + + /** + * Returns the meta object for the containment reference ' + * {@link org.eclipse.sirius.properties.GroupConditionalStyle#getStyle + * <em>Style</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the containment reference '<em>Style</em>'. + * @see org.eclipse.sirius.properties.GroupConditionalStyle#getStyle() + * @see #getGroupConditionalStyle() + * @generated + */ + EReference getGroupConditionalStyle_Style(); + + /** + * Returns the meta object for class ' * {@link org.eclipse.sirius.properties.ReferenceWidgetStyle * <em>Reference Widget Style</em>}'. <!-- begin-user-doc --> <!-- * end-user-doc --> @@ -5202,6 +5417,106 @@ public interface PropertiesPackage extends EPackage { EAttribute getHyperlinkWidgetStyle_FontFormat(); /** + * Returns the meta object for class ' + * {@link org.eclipse.sirius.properties.GroupStyle <em>Group Style</em>}'. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for class '<em>Group Style</em>'. + * @see org.eclipse.sirius.properties.GroupStyle + * @generated + */ + EClass getGroupStyle(); + + /** + * Returns the meta object for the reference ' + * {@link org.eclipse.sirius.properties.GroupStyle#getBackgroundColor + * <em>Background Color</em>}'. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @return the meta object for the reference '<em>Background Color</em>'. + * @see org.eclipse.sirius.properties.GroupStyle#getBackgroundColor() + * @see #getGroupStyle() + * @generated + */ + EReference getGroupStyle_BackgroundColor(); + + /** + * Returns the meta object for the reference ' + * {@link org.eclipse.sirius.properties.GroupStyle#getForegroundColor + * <em>Foreground Color</em>}'. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @return the meta object for the reference '<em>Foreground Color</em>'. + * @see org.eclipse.sirius.properties.GroupStyle#getForegroundColor() + * @see #getGroupStyle() + * @generated + */ + EReference getGroupStyle_ForegroundColor(); + + /** + * Returns the meta object for the attribute ' + * {@link org.eclipse.sirius.properties.GroupStyle#getFontNameExpression + * <em>Font Name Expression</em>}'. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @return the meta object for the attribute '<em>Font Name Expression</em> + * '. + * @see org.eclipse.sirius.properties.GroupStyle#getFontNameExpression() + * @see #getGroupStyle() + * @generated + */ + EAttribute getGroupStyle_FontNameExpression(); + + /** + * Returns the meta object for the attribute ' + * {@link org.eclipse.sirius.properties.GroupStyle#getFontSize + * <em>Font Size</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Font Size</em>'. + * @see org.eclipse.sirius.properties.GroupStyle#getFontSize() + * @see #getGroupStyle() + * @generated + */ + EAttribute getGroupStyle_FontSize(); + + /** + * Returns the meta object for the attribute ' + * {@link org.eclipse.sirius.properties.GroupStyle#getBarStyle + * <em>Bar Style</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Bar Style</em>'. + * @see org.eclipse.sirius.properties.GroupStyle#getBarStyle() + * @see #getGroupStyle() + * @generated + */ + EAttribute getGroupStyle_BarStyle(); + + /** + * Returns the meta object for the attribute ' + * {@link org.eclipse.sirius.properties.GroupStyle#getToggleStyle + * <em>Toggle Style</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Toggle Style</em>'. + * @see org.eclipse.sirius.properties.GroupStyle#getToggleStyle() + * @see #getGroupStyle() + * @generated + */ + EAttribute getGroupStyle_ToggleStyle(); + + /** + * Returns the meta object for the attribute ' + * {@link org.eclipse.sirius.properties.GroupStyle#isExpandedByDefault + * <em>Expanded By Default</em>}'. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @return the meta object for the attribute '<em>Expanded By Default</em>'. + * @see org.eclipse.sirius.properties.GroupStyle#isExpandedByDefault() + * @see #getGroupStyle() + * @generated + */ + EAttribute getGroupStyle_ExpandedByDefault(); + + /** * Returns the meta object for enum ' * {@link org.eclipse.sirius.properties.FILL_LAYOUT_ORIENTATION * <em>FILL LAYOUT ORIENTATION</em>}'. <!-- begin-user-doc --> <!-- @@ -5214,6 +5529,28 @@ public interface PropertiesPackage extends EPackage { EEnum getFILL_LAYOUT_ORIENTATION(); /** + * Returns the meta object for enum ' + * {@link org.eclipse.sirius.properties.ToggleStyle <em>Toggle Style</em>}'. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for enum '<em>Toggle Style</em>'. + * @see org.eclipse.sirius.properties.ToggleStyle + * @generated + */ + EEnum getToggleStyle(); + + /** + * Returns the meta object for enum ' + * {@link org.eclipse.sirius.properties.TitleBarStyle + * <em>Title Bar Style</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for enum '<em>Title Bar Style</em>'. + * @see org.eclipse.sirius.properties.TitleBarStyle + * @generated + */ + EEnum getTitleBarStyle(); + + /** * Returns the factory that creates the instances of the model. <!-- * begin-user-doc --> <!-- end-user-doc --> * @@ -5465,6 +5802,23 @@ public interface PropertiesPackage extends EPackage { EReference GROUP_DESCRIPTION__VALIDATION_SET = PropertiesPackage.eINSTANCE.getGroupDescription_ValidationSet(); /** + * The meta object literal for the '<em><b>Style</b></em>' containment + * reference feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + EReference GROUP_DESCRIPTION__STYLE = PropertiesPackage.eINSTANCE.getGroupDescription_Style(); + + /** + * The meta object literal for the '<em><b>Conditional Styles</b></em>' + * containment reference list feature. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + EReference GROUP_DESCRIPTION__CONDITIONAL_STYLES = PropertiesPackage.eINSTANCE.getGroupDescription_ConditionalStyles(); + + /** * The meta object literal for the ' * {@link org.eclipse.sirius.properties.impl.GroupValidationSetDescriptionImpl * <em>Group Validation Set Description</em>}' class. <!-- @@ -6730,6 +7084,26 @@ public interface PropertiesPackage extends EPackage { /** * The meta object literal for the ' + * {@link org.eclipse.sirius.properties.impl.GroupConditionalStyleImpl + * <em>Group Conditional Style</em>}' class. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see org.eclipse.sirius.properties.impl.GroupConditionalStyleImpl + * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getGroupConditionalStyle() + * @generated + */ + EClass GROUP_CONDITIONAL_STYLE = PropertiesPackage.eINSTANCE.getGroupConditionalStyle(); + + /** + * The meta object literal for the '<em><b>Style</b></em>' containment + * reference feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + EReference GROUP_CONDITIONAL_STYLE__STYLE = PropertiesPackage.eINSTANCE.getGroupConditionalStyle_Style(); + + /** + * The meta object literal for the ' * {@link org.eclipse.sirius.properties.impl.ReferenceWidgetStyleImpl * <em>Reference Widget Style</em>}' class. <!-- begin-user-doc --> <!-- * end-user-doc --> @@ -6786,6 +7160,74 @@ public interface PropertiesPackage extends EPackage { /** * The meta object literal for the ' + * {@link org.eclipse.sirius.properties.impl.GroupStyleImpl + * <em>Group Style</em>}' class. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see org.eclipse.sirius.properties.impl.GroupStyleImpl + * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getGroupStyle() + * @generated + */ + EClass GROUP_STYLE = PropertiesPackage.eINSTANCE.getGroupStyle(); + + /** + * The meta object literal for the '<em><b>Background Color</b></em>' + * reference feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + EReference GROUP_STYLE__BACKGROUND_COLOR = PropertiesPackage.eINSTANCE.getGroupStyle_BackgroundColor(); + + /** + * The meta object literal for the '<em><b>Foreground Color</b></em>' + * reference feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + EReference GROUP_STYLE__FOREGROUND_COLOR = PropertiesPackage.eINSTANCE.getGroupStyle_ForegroundColor(); + + /** + * The meta object literal for the '<em><b>Font Name Expression</b></em> + * ' attribute feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + EAttribute GROUP_STYLE__FONT_NAME_EXPRESSION = PropertiesPackage.eINSTANCE.getGroupStyle_FontNameExpression(); + + /** + * The meta object literal for the '<em><b>Font Size</b></em>' attribute + * feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + EAttribute GROUP_STYLE__FONT_SIZE = PropertiesPackage.eINSTANCE.getGroupStyle_FontSize(); + + /** + * The meta object literal for the '<em><b>Bar Style</b></em>' attribute + * feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + EAttribute GROUP_STYLE__BAR_STYLE = PropertiesPackage.eINSTANCE.getGroupStyle_BarStyle(); + + /** + * The meta object literal for the '<em><b>Toggle Style</b></em>' + * attribute feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + EAttribute GROUP_STYLE__TOGGLE_STYLE = PropertiesPackage.eINSTANCE.getGroupStyle_ToggleStyle(); + + /** + * The meta object literal for the '<em><b>Expanded By Default</b></em>' + * attribute feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + EAttribute GROUP_STYLE__EXPANDED_BY_DEFAULT = PropertiesPackage.eINSTANCE.getGroupStyle_ExpandedByDefault(); + + /** + * The meta object literal for the ' * {@link org.eclipse.sirius.properties.FILL_LAYOUT_ORIENTATION * <em>FILL LAYOUT ORIENTATION</em>}' enum. <!-- begin-user-doc --> <!-- * end-user-doc --> @@ -6796,6 +7238,30 @@ public interface PropertiesPackage extends EPackage { */ EEnum FILL_LAYOUT_ORIENTATION = PropertiesPackage.eINSTANCE.getFILL_LAYOUT_ORIENTATION(); + /** + * The meta object literal for the ' + * {@link org.eclipse.sirius.properties.ToggleStyle + * <em>Toggle Style</em>}' enum. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see org.eclipse.sirius.properties.ToggleStyle + * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getToggleStyle() + * @generated + */ + EEnum TOGGLE_STYLE = PropertiesPackage.eINSTANCE.getToggleStyle(); + + /** + * The meta object literal for the ' + * {@link org.eclipse.sirius.properties.TitleBarStyle + * <em>Title Bar Style</em>}' enum. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see org.eclipse.sirius.properties.TitleBarStyle + * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getTitleBarStyle() + * @generated + */ + EEnum TITLE_BAR_STYLE = PropertiesPackage.eINSTANCE.getTitleBarStyle(); + } } // PropertiesPackage diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/TitleBarStyle.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/TitleBarStyle.java new file mode 100644 index 0000000000..c601d8a46c --- /dev/null +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/TitleBarStyle.java @@ -0,0 +1,253 @@ +/** + * 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; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.util.Enumerator; + +/** + * <!-- begin-user-doc --> A representation of the literals of the enumeration ' + * <em><b>Title Bar Style</b></em>', and utility methods for working with them. + * <!-- end-user-doc --> + * + * @see org.eclipse.sirius.properties.PropertiesPackage#getTitleBarStyle() + * @model + * @generated + */ +public enum TitleBarStyle implements Enumerator { + /** + * The '<em><b>TITLE BAR</b></em>' literal object. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #TITLE_BAR_VALUE + * @generated + * @ordered + */ + TITLE_BAR(0, "TITLE_BAR", "TITLE_BAR"), + + /** + * The '<em><b>SHORT TITLE BAR</b></em>' literal object. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @see #SHORT_TITLE_BAR_VALUE + * @generated + * @ordered + */ + SHORT_TITLE_BAR(1, "SHORT_TITLE_BAR", "SHORT_TITLE_BAR"), + + /** + * The '<em><b>NO TITLE</b></em>' literal object. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #NO_TITLE_VALUE + * @generated + * @ordered + */ + NO_TITLE(2, "NO_TITLE", "NO_TITLE"); + + /** + * The '<em><b>TITLE BAR</b></em>' literal value. <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>TITLE BAR</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @see #TITLE_BAR + * @model + * @generated + * @ordered + */ + public static final int TITLE_BAR_VALUE = 0; + + /** + * The '<em><b>SHORT TITLE BAR</b></em>' literal value. <!-- begin-user-doc + * --> + * <p> + * If the meaning of '<em><b>SHORT TITLE BAR</b></em>' literal object isn't + * clear, there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @see #SHORT_TITLE_BAR + * @model + * @generated + * @ordered + */ + public static final int SHORT_TITLE_BAR_VALUE = 1; + + /** + * The '<em><b>NO TITLE</b></em>' literal value. <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>NO TITLE</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @see #NO_TITLE + * @model + * @generated + * @ordered + */ + public static final int NO_TITLE_VALUE = 2; + + /** + * An array of all the '<em><b>Title Bar Style</b></em>' enumerators. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private static final TitleBarStyle[] VALUES_ARRAY = new TitleBarStyle[] { TITLE_BAR, SHORT_TITLE_BAR, NO_TITLE, }; + + /** + * A public read-only list of all the '<em><b>Title Bar Style</b></em>' + * enumerators. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public static final List<TitleBarStyle> VALUES = Collections.unmodifiableList(Arrays.asList(TitleBarStyle.VALUES_ARRAY)); + + /** + * Returns the '<em><b>Title Bar Style</b></em>' literal with the specified + * literal value. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @param literal + * the literal. + * @return the matching enumerator or <code>null</code>. + * @generated + */ + public static TitleBarStyle get(String literal) { + for (TitleBarStyle result : TitleBarStyle.VALUES_ARRAY) { + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } + + /** + * Returns the '<em><b>Title Bar Style</b></em>' literal with the specified + * name. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @param name + * the name. + * @return the matching enumerator or <code>null</code>. + * @generated + */ + public static TitleBarStyle getByName(String name) { + for (TitleBarStyle result : TitleBarStyle.VALUES_ARRAY) { + if (result.getName().equals(name)) { + return result; + } + } + return null; + } + + /** + * Returns the '<em><b>Title Bar Style</b></em>' literal with the specified + * integer value. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the integer value. + * @return the matching enumerator or <code>null</code>. + * @generated + */ + public static TitleBarStyle get(int value) { + switch (value) { + case TITLE_BAR_VALUE: + return TITLE_BAR; + case SHORT_TITLE_BAR_VALUE: + return SHORT_TITLE_BAR; + case NO_TITLE_VALUE: + return NO_TITLE; + } + return null; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private final int value; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private final String name; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + private TitleBarStyle(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public int getValue() { + return value; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getName() { + return name; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getLiteral() { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string + * representation. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String toString() { + return literal; + } + +} // TitleBarStyle diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/ToggleStyle.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/ToggleStyle.java new file mode 100644 index 0000000000..96bea7b98b --- /dev/null +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/ToggleStyle.java @@ -0,0 +1,252 @@ +/** + * 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; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.util.Enumerator; + +/** + * <!-- begin-user-doc --> A representation of the literals of the enumeration ' + * <em><b>Toggle Style</b></em>', and utility methods for working with them. + * <!-- end-user-doc --> + * + * @see org.eclipse.sirius.properties.PropertiesPackage#getToggleStyle() + * @model + * @generated + */ +public enum ToggleStyle implements Enumerator { + /** + * The '<em><b>TWISTIE</b></em>' literal object. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #TWISTIE_VALUE + * @generated + * @ordered + */ + TWISTIE(0, "TWISTIE", "TWISTIE"), + + /** + * The '<em><b>TREE NODE</b></em>' literal object. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #TREE_NODE_VALUE + * @generated + * @ordered + */ + TREE_NODE(1, "TREE_NODE", "TREE_NODE"), + + /** + * The '<em><b>NONE</b></em>' literal object. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see #NONE_VALUE + * @generated + * @ordered + */ + NONE(2, "NONE", "NONE"); + + /** + * The '<em><b>TWISTIE</b></em>' literal value. <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>TWISTIE</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @see #TWISTIE + * @model + * @generated + * @ordered + */ + public static final int TWISTIE_VALUE = 0; + + /** + * The '<em><b>TREE NODE</b></em>' literal value. <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>TREE NODE</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @see #TREE_NODE + * @model + * @generated + * @ordered + */ + public static final int TREE_NODE_VALUE = 1; + + /** + * The '<em><b>NONE</b></em>' literal value. <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>NONE</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @see #NONE + * @model + * @generated + * @ordered + */ + public static final int NONE_VALUE = 2; + + /** + * An array of all the '<em><b>Toggle Style</b></em>' enumerators. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private static final ToggleStyle[] VALUES_ARRAY = new ToggleStyle[] { TWISTIE, TREE_NODE, NONE, }; + + /** + * A public read-only list of all the '<em><b>Toggle Style</b></em>' + * enumerators. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public static final List<ToggleStyle> VALUES = Collections.unmodifiableList(Arrays.asList(ToggleStyle.VALUES_ARRAY)); + + /** + * Returns the '<em><b>Toggle Style</b></em>' literal with the specified + * literal value. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @param literal + * the literal. + * @return the matching enumerator or <code>null</code>. + * @generated + */ + public static ToggleStyle get(String literal) { + for (ToggleStyle result : ToggleStyle.VALUES_ARRAY) { + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } + + /** + * Returns the '<em><b>Toggle Style</b></em>' literal with the specified + * name. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @param name + * the name. + * @return the matching enumerator or <code>null</code>. + * @generated + */ + public static ToggleStyle getByName(String name) { + for (ToggleStyle result : ToggleStyle.VALUES_ARRAY) { + if (result.getName().equals(name)) { + return result; + } + } + return null; + } + + /** + * Returns the '<em><b>Toggle Style</b></em>' literal with the specified + * integer value. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the integer value. + * @return the matching enumerator or <code>null</code>. + * @generated + */ + public static ToggleStyle get(int value) { + switch (value) { + case TWISTIE_VALUE: + return TWISTIE; + case TREE_NODE_VALUE: + return TREE_NODE; + case NONE_VALUE: + return NONE; + } + return null; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private final int value; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private final String name; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + private ToggleStyle(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public int getValue() { + return value; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getName() { + return name; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getLiteral() { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string + * representation. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String toString() { + return literal; + } + +} // ToggleStyle diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/GroupConditionalStyleImpl.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/GroupConditionalStyleImpl.java new file mode 100644 index 0000000000..eba2103667 --- /dev/null +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/GroupConditionalStyleImpl.java @@ -0,0 +1,192 @@ +/** + * 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.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.sirius.properties.GroupConditionalStyle; +import org.eclipse.sirius.properties.GroupStyle; +import org.eclipse.sirius.properties.PropertiesPackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object ' + * <em><b>Group Conditional Style</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li> + * {@link org.eclipse.sirius.properties.impl.GroupConditionalStyleImpl#getStyle + * <em>Style</em>}</li> + * </ul> + * + * @generated + */ +public class GroupConditionalStyleImpl extends WidgetConditionalStyleImpl implements GroupConditionalStyle { + /** + * The cached value of the '{@link #getStyle() <em>Style</em>}' containment + * reference. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see #getStyle() + * @generated + * @ordered + */ + protected GroupStyle style; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected GroupConditionalStyleImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return PropertiesPackage.Literals.GROUP_CONDITIONAL_STYLE; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public GroupStyle getStyle() { + return style; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public NotificationChain basicSetStyle(GroupStyle newStyle, NotificationChain msgs) { + GroupStyle oldStyle = style; + style = newStyle; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PropertiesPackage.GROUP_CONDITIONAL_STYLE__STYLE, oldStyle, newStyle); + if (msgs == null) { + msgs = notification; + } else { + msgs.add(notification); + } + } + return msgs; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void setStyle(GroupStyle newStyle) { + if (newStyle != style) { + NotificationChain msgs = null; + if (style != null) { + msgs = ((InternalEObject) style).eInverseRemove(this, InternalEObject.EOPPOSITE_FEATURE_BASE - PropertiesPackage.GROUP_CONDITIONAL_STYLE__STYLE, null, msgs); + } + if (newStyle != null) { + msgs = ((InternalEObject) newStyle).eInverseAdd(this, InternalEObject.EOPPOSITE_FEATURE_BASE - PropertiesPackage.GROUP_CONDITIONAL_STYLE__STYLE, null, msgs); + } + msgs = basicSetStyle(newStyle, msgs); + if (msgs != null) { + msgs.dispatch(); + } + } else if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.GROUP_CONDITIONAL_STYLE__STYLE, newStyle, newStyle)); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case PropertiesPackage.GROUP_CONDITIONAL_STYLE__STYLE: + return basicSetStyle(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case PropertiesPackage.GROUP_CONDITIONAL_STYLE__STYLE: + return getStyle(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case PropertiesPackage.GROUP_CONDITIONAL_STYLE__STYLE: + setStyle((GroupStyle) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case PropertiesPackage.GROUP_CONDITIONAL_STYLE__STYLE: + setStyle((GroupStyle) null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case PropertiesPackage.GROUP_CONDITIONAL_STYLE__STYLE: + return style != null; + } + return super.eIsSet(featureID); + } + +} // GroupConditionalStyleImpl diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/GroupDescriptionImpl.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/GroupDescriptionImpl.java index a2fd30b527..e9b0fef694 100644 --- a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/GroupDescriptionImpl.java +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/GroupDescriptionImpl.java @@ -23,7 +23,9 @@ import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; import org.eclipse.emf.ecore.util.EObjectContainmentEList; import org.eclipse.emf.ecore.util.InternalEList; import org.eclipse.sirius.properties.ControlDescription; +import org.eclipse.sirius.properties.GroupConditionalStyle; import org.eclipse.sirius.properties.GroupDescription; +import org.eclipse.sirius.properties.GroupStyle; import org.eclipse.sirius.properties.GroupValidationSetDescription; import org.eclipse.sirius.properties.PropertiesPackage; @@ -55,6 +57,11 @@ import org.eclipse.sirius.properties.PropertiesPackage; * <li> * {@link org.eclipse.sirius.properties.impl.GroupDescriptionImpl#getValidationSet * <em>Validation Set</em>}</li> + * <li>{@link org.eclipse.sirius.properties.impl.GroupDescriptionImpl#getStyle + * <em>Style</em>}</li> + * <li> + * {@link org.eclipse.sirius.properties.impl.GroupDescriptionImpl#getConditionalStyles + * <em>Conditional Styles</em>}</li> * </ul> * * @generated @@ -188,6 +195,27 @@ public class GroupDescriptionImpl extends MinimalEObjectImpl.Container implement protected GroupValidationSetDescription validationSet; /** + * The cached value of the '{@link #getStyle() <em>Style</em>}' containment + * reference. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see #getStyle() + * @generated + * @ordered + */ + protected GroupStyle style; + + /** + * The cached value of the '{@link #getConditionalStyles() + * <em>Conditional Styles</em>}' containment reference list. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @see #getConditionalStyles() + * @generated + * @ordered + */ + protected EList<GroupConditionalStyle> conditionalStyles; + + /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated @@ -398,12 +426,82 @@ public class GroupDescriptionImpl extends MinimalEObjectImpl.Container implement * @generated */ @Override + public GroupStyle getStyle() { + return style; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public NotificationChain basicSetStyle(GroupStyle newStyle, NotificationChain msgs) { + GroupStyle oldStyle = style; + style = newStyle; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PropertiesPackage.GROUP_DESCRIPTION__STYLE, oldStyle, newStyle); + if (msgs == null) { + msgs = notification; + } else { + msgs.add(notification); + } + } + return msgs; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void setStyle(GroupStyle newStyle) { + if (newStyle != style) { + NotificationChain msgs = null; + if (style != null) { + msgs = ((InternalEObject) style).eInverseRemove(this, InternalEObject.EOPPOSITE_FEATURE_BASE - PropertiesPackage.GROUP_DESCRIPTION__STYLE, null, msgs); + } + if (newStyle != null) { + msgs = ((InternalEObject) newStyle).eInverseAdd(this, InternalEObject.EOPPOSITE_FEATURE_BASE - PropertiesPackage.GROUP_DESCRIPTION__STYLE, null, msgs); + } + msgs = basicSetStyle(newStyle, msgs); + if (msgs != null) { + msgs.dispatch(); + } + } else if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.GROUP_DESCRIPTION__STYLE, newStyle, newStyle)); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EList<GroupConditionalStyle> getConditionalStyles() { + if (conditionalStyles == null) { + conditionalStyles = new EObjectContainmentEList<GroupConditionalStyle>(GroupConditionalStyle.class, this, PropertiesPackage.GROUP_DESCRIPTION__CONDITIONAL_STYLES); + } + return conditionalStyles; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case PropertiesPackage.GROUP_DESCRIPTION__CONTROLS: return ((InternalEList<?>) getControls()).basicRemove(otherEnd, msgs); case PropertiesPackage.GROUP_DESCRIPTION__VALIDATION_SET: return basicSetValidationSet(null, msgs); + case PropertiesPackage.GROUP_DESCRIPTION__STYLE: + return basicSetStyle(null, msgs); + case PropertiesPackage.GROUP_DESCRIPTION__CONDITIONAL_STYLES: + return ((InternalEList<?>) getConditionalStyles()).basicRemove(otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } @@ -430,6 +528,10 @@ public class GroupDescriptionImpl extends MinimalEObjectImpl.Container implement return getControls(); case PropertiesPackage.GROUP_DESCRIPTION__VALIDATION_SET: return getValidationSet(); + case PropertiesPackage.GROUP_DESCRIPTION__STYLE: + return getStyle(); + case PropertiesPackage.GROUP_DESCRIPTION__CONDITIONAL_STYLES: + return getConditionalStyles(); } return super.eGet(featureID, resolve, coreType); } @@ -465,6 +567,13 @@ public class GroupDescriptionImpl extends MinimalEObjectImpl.Container implement case PropertiesPackage.GROUP_DESCRIPTION__VALIDATION_SET: setValidationSet((GroupValidationSetDescription) newValue); return; + case PropertiesPackage.GROUP_DESCRIPTION__STYLE: + setStyle((GroupStyle) newValue); + return; + case PropertiesPackage.GROUP_DESCRIPTION__CONDITIONAL_STYLES: + getConditionalStyles().clear(); + getConditionalStyles().addAll((Collection<? extends GroupConditionalStyle>) newValue); + return; } super.eSet(featureID, newValue); } @@ -498,6 +607,12 @@ public class GroupDescriptionImpl extends MinimalEObjectImpl.Container implement case PropertiesPackage.GROUP_DESCRIPTION__VALIDATION_SET: setValidationSet((GroupValidationSetDescription) null); return; + case PropertiesPackage.GROUP_DESCRIPTION__STYLE: + setStyle((GroupStyle) null); + return; + case PropertiesPackage.GROUP_DESCRIPTION__CONDITIONAL_STYLES: + getConditionalStyles().clear(); + return; } super.eUnset(featureID); } @@ -526,6 +641,10 @@ public class GroupDescriptionImpl extends MinimalEObjectImpl.Container implement return controls != null && !controls.isEmpty(); case PropertiesPackage.GROUP_DESCRIPTION__VALIDATION_SET: return validationSet != null; + case PropertiesPackage.GROUP_DESCRIPTION__STYLE: + return style != null; + case PropertiesPackage.GROUP_DESCRIPTION__CONDITIONAL_STYLES: + return conditionalStyles != null && !conditionalStyles.isEmpty(); } return super.eIsSet(featureID); } diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/GroupStyleImpl.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/GroupStyleImpl.java new file mode 100644 index 0000000000..1509d222cf --- /dev/null +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/GroupStyleImpl.java @@ -0,0 +1,554 @@ +/** + * 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.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; +import org.eclipse.sirius.properties.GroupStyle; +import org.eclipse.sirius.properties.PropertiesPackage; +import org.eclipse.sirius.properties.TitleBarStyle; +import org.eclipse.sirius.properties.ToggleStyle; +import org.eclipse.sirius.viewpoint.description.ColorDescription; + +/** + * <!-- begin-user-doc --> An implementation of the model object ' + * <em><b>Group Style</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li> + * {@link org.eclipse.sirius.properties.impl.GroupStyleImpl#getBackgroundColor + * <em>Background Color</em>}</li> + * <li> + * {@link org.eclipse.sirius.properties.impl.GroupStyleImpl#getForegroundColor + * <em>Foreground Color</em>}</li> + * <li> + * {@link org.eclipse.sirius.properties.impl.GroupStyleImpl#getFontNameExpression + * <em>Font Name Expression</em>}</li> + * <li>{@link org.eclipse.sirius.properties.impl.GroupStyleImpl#getFontSize + * <em>Font Size</em>}</li> + * <li>{@link org.eclipse.sirius.properties.impl.GroupStyleImpl#getBarStyle + * <em>Bar Style</em>}</li> + * <li>{@link org.eclipse.sirius.properties.impl.GroupStyleImpl#getToggleStyle + * <em>Toggle Style</em>}</li> + * <li> + * {@link org.eclipse.sirius.properties.impl.GroupStyleImpl#isExpandedByDefault + * <em>Expanded By Default</em>}</li> + * </ul> + * + * @generated + */ +public class GroupStyleImpl extends MinimalEObjectImpl.Container implements GroupStyle { + /** + * The cached value of the '{@link #getBackgroundColor() + * <em>Background Color</em>}' reference. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see #getBackgroundColor() + * @generated + * @ordered + */ + protected ColorDescription backgroundColor; + + /** + * The cached value of the '{@link #getForegroundColor() + * <em>Foreground Color</em>}' reference. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see #getForegroundColor() + * @generated + * @ordered + */ + protected ColorDescription foregroundColor; + + /** + * The default value of the '{@link #getFontNameExpression() + * <em>Font Name Expression</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see #getFontNameExpression() + * @generated + * @ordered + */ + protected static final String FONT_NAME_EXPRESSION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getFontNameExpression() + * <em>Font Name Expression</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see #getFontNameExpression() + * @generated + * @ordered + */ + protected String fontNameExpression = GroupStyleImpl.FONT_NAME_EXPRESSION_EDEFAULT; + + /** + * The default value of the '{@link #getFontSize() <em>Font Size</em>}' + * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see #getFontSize() + * @generated + * @ordered + */ + protected static final int FONT_SIZE_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getFontSize() <em>Font Size</em>}' + * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see #getFontSize() + * @generated + * @ordered + */ + protected int fontSize = GroupStyleImpl.FONT_SIZE_EDEFAULT; + + /** + * The default value of the '{@link #getBarStyle() <em>Bar Style</em>}' + * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see #getBarStyle() + * @generated + * @ordered + */ + protected static final TitleBarStyle BAR_STYLE_EDEFAULT = TitleBarStyle.TITLE_BAR; + + /** + * The cached value of the '{@link #getBarStyle() <em>Bar Style</em>}' + * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see #getBarStyle() + * @generated + * @ordered + */ + protected TitleBarStyle barStyle = GroupStyleImpl.BAR_STYLE_EDEFAULT; + + /** + * The default value of the '{@link #getToggleStyle() <em>Toggle Style</em>} + * ' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see #getToggleStyle() + * @generated + * @ordered + */ + protected static final ToggleStyle TOGGLE_STYLE_EDEFAULT = ToggleStyle.TWISTIE; + + /** + * The cached value of the '{@link #getToggleStyle() <em>Toggle Style</em>}' + * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see #getToggleStyle() + * @generated + * @ordered + */ + protected ToggleStyle toggleStyle = GroupStyleImpl.TOGGLE_STYLE_EDEFAULT; + + /** + * The default value of the '{@link #isExpandedByDefault() + * <em>Expanded By Default</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see #isExpandedByDefault() + * @generated + * @ordered + */ + protected static final boolean EXPANDED_BY_DEFAULT_EDEFAULT = false; + + /** + * The cached value of the '{@link #isExpandedByDefault() + * <em>Expanded By Default</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see #isExpandedByDefault() + * @generated + * @ordered + */ + protected boolean expandedByDefault = GroupStyleImpl.EXPANDED_BY_DEFAULT_EDEFAULT; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected GroupStyleImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return PropertiesPackage.Literals.GROUP_STYLE; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ColorDescription getBackgroundColor() { + if (backgroundColor != null && backgroundColor.eIsProxy()) { + InternalEObject oldBackgroundColor = (InternalEObject) backgroundColor; + backgroundColor = (ColorDescription) eResolveProxy(oldBackgroundColor); + if (backgroundColor != oldBackgroundColor) { + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.RESOLVE, PropertiesPackage.GROUP_STYLE__BACKGROUND_COLOR, oldBackgroundColor, backgroundColor)); + } + } + } + return backgroundColor; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public ColorDescription basicGetBackgroundColor() { + return backgroundColor; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void setBackgroundColor(ColorDescription newBackgroundColor) { + ColorDescription oldBackgroundColor = backgroundColor; + backgroundColor = newBackgroundColor; + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.GROUP_STYLE__BACKGROUND_COLOR, oldBackgroundColor, backgroundColor)); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ColorDescription getForegroundColor() { + if (foregroundColor != null && foregroundColor.eIsProxy()) { + InternalEObject oldForegroundColor = (InternalEObject) foregroundColor; + foregroundColor = (ColorDescription) eResolveProxy(oldForegroundColor); + if (foregroundColor != oldForegroundColor) { + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.RESOLVE, PropertiesPackage.GROUP_STYLE__FOREGROUND_COLOR, oldForegroundColor, foregroundColor)); + } + } + } + return foregroundColor; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public ColorDescription basicGetForegroundColor() { + return foregroundColor; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void setForegroundColor(ColorDescription newForegroundColor) { + ColorDescription oldForegroundColor = foregroundColor; + foregroundColor = newForegroundColor; + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.GROUP_STYLE__FOREGROUND_COLOR, oldForegroundColor, foregroundColor)); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getFontNameExpression() { + return fontNameExpression; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void setFontNameExpression(String newFontNameExpression) { + String oldFontNameExpression = fontNameExpression; + fontNameExpression = newFontNameExpression; + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.GROUP_STYLE__FONT_NAME_EXPRESSION, oldFontNameExpression, fontNameExpression)); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public int getFontSize() { + return fontSize; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void setFontSize(int newFontSize) { + int oldFontSize = fontSize; + fontSize = newFontSize; + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.GROUP_STYLE__FONT_SIZE, oldFontSize, fontSize)); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public TitleBarStyle getBarStyle() { + return barStyle; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void setBarStyle(TitleBarStyle newBarStyle) { + TitleBarStyle oldBarStyle = barStyle; + barStyle = newBarStyle == null ? GroupStyleImpl.BAR_STYLE_EDEFAULT : newBarStyle; + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.GROUP_STYLE__BAR_STYLE, oldBarStyle, barStyle)); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ToggleStyle getToggleStyle() { + return toggleStyle; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void setToggleStyle(ToggleStyle newToggleStyle) { + ToggleStyle oldToggleStyle = toggleStyle; + toggleStyle = newToggleStyle == null ? GroupStyleImpl.TOGGLE_STYLE_EDEFAULT : newToggleStyle; + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.GROUP_STYLE__TOGGLE_STYLE, oldToggleStyle, toggleStyle)); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean isExpandedByDefault() { + return expandedByDefault; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void setExpandedByDefault(boolean newExpandedByDefault) { + boolean oldExpandedByDefault = expandedByDefault; + expandedByDefault = newExpandedByDefault; + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.GROUP_STYLE__EXPANDED_BY_DEFAULT, oldExpandedByDefault, expandedByDefault)); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case PropertiesPackage.GROUP_STYLE__BACKGROUND_COLOR: + if (resolve) { + return getBackgroundColor(); + } + return basicGetBackgroundColor(); + case PropertiesPackage.GROUP_STYLE__FOREGROUND_COLOR: + if (resolve) { + return getForegroundColor(); + } + return basicGetForegroundColor(); + case PropertiesPackage.GROUP_STYLE__FONT_NAME_EXPRESSION: + return getFontNameExpression(); + case PropertiesPackage.GROUP_STYLE__FONT_SIZE: + return getFontSize(); + case PropertiesPackage.GROUP_STYLE__BAR_STYLE: + return getBarStyle(); + case PropertiesPackage.GROUP_STYLE__TOGGLE_STYLE: + return getToggleStyle(); + case PropertiesPackage.GROUP_STYLE__EXPANDED_BY_DEFAULT: + return isExpandedByDefault(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case PropertiesPackage.GROUP_STYLE__BACKGROUND_COLOR: + setBackgroundColor((ColorDescription) newValue); + return; + case PropertiesPackage.GROUP_STYLE__FOREGROUND_COLOR: + setForegroundColor((ColorDescription) newValue); + return; + case PropertiesPackage.GROUP_STYLE__FONT_NAME_EXPRESSION: + setFontNameExpression((String) newValue); + return; + case PropertiesPackage.GROUP_STYLE__FONT_SIZE: + setFontSize((Integer) newValue); + return; + case PropertiesPackage.GROUP_STYLE__BAR_STYLE: + setBarStyle((TitleBarStyle) newValue); + return; + case PropertiesPackage.GROUP_STYLE__TOGGLE_STYLE: + setToggleStyle((ToggleStyle) newValue); + return; + case PropertiesPackage.GROUP_STYLE__EXPANDED_BY_DEFAULT: + setExpandedByDefault((Boolean) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case PropertiesPackage.GROUP_STYLE__BACKGROUND_COLOR: + setBackgroundColor((ColorDescription) null); + return; + case PropertiesPackage.GROUP_STYLE__FOREGROUND_COLOR: + setForegroundColor((ColorDescription) null); + return; + case PropertiesPackage.GROUP_STYLE__FONT_NAME_EXPRESSION: + setFontNameExpression(GroupStyleImpl.FONT_NAME_EXPRESSION_EDEFAULT); + return; + case PropertiesPackage.GROUP_STYLE__FONT_SIZE: + setFontSize(GroupStyleImpl.FONT_SIZE_EDEFAULT); + return; + case PropertiesPackage.GROUP_STYLE__BAR_STYLE: + setBarStyle(GroupStyleImpl.BAR_STYLE_EDEFAULT); + return; + case PropertiesPackage.GROUP_STYLE__TOGGLE_STYLE: + setToggleStyle(GroupStyleImpl.TOGGLE_STYLE_EDEFAULT); + return; + case PropertiesPackage.GROUP_STYLE__EXPANDED_BY_DEFAULT: + setExpandedByDefault(GroupStyleImpl.EXPANDED_BY_DEFAULT_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case PropertiesPackage.GROUP_STYLE__BACKGROUND_COLOR: + return backgroundColor != null; + case PropertiesPackage.GROUP_STYLE__FOREGROUND_COLOR: + return foregroundColor != null; + case PropertiesPackage.GROUP_STYLE__FONT_NAME_EXPRESSION: + return GroupStyleImpl.FONT_NAME_EXPRESSION_EDEFAULT == null ? fontNameExpression != null : !GroupStyleImpl.FONT_NAME_EXPRESSION_EDEFAULT.equals(fontNameExpression); + case PropertiesPackage.GROUP_STYLE__FONT_SIZE: + return fontSize != GroupStyleImpl.FONT_SIZE_EDEFAULT; + case PropertiesPackage.GROUP_STYLE__BAR_STYLE: + return barStyle != GroupStyleImpl.BAR_STYLE_EDEFAULT; + case PropertiesPackage.GROUP_STYLE__TOGGLE_STYLE: + return toggleStyle != GroupStyleImpl.TOGGLE_STYLE_EDEFAULT; + case PropertiesPackage.GROUP_STYLE__EXPANDED_BY_DEFAULT: + return expandedByDefault != GroupStyleImpl.EXPANDED_BY_DEFAULT_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) { + return super.toString(); + } + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (fontNameExpression: "); + result.append(fontNameExpression); + result.append(", fontSize: "); + result.append(fontSize); + result.append(", barStyle: "); + result.append(barStyle); + result.append(", toggleStyle: "); + result.append(toggleStyle); + result.append(", expandedByDefault: "); + result.append(expandedByDefault); + result.append(')'); + return result.toString(); + } + +} // GroupStyleImpl diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/PropertiesFactoryImpl.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/PropertiesFactoryImpl.java index e5d9ce4139..5ccddf2ee9 100644 --- a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/PropertiesFactoryImpl.java +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/PropertiesFactoryImpl.java @@ -34,7 +34,9 @@ import org.eclipse.sirius.properties.DynamicMappingIf; import org.eclipse.sirius.properties.FILL_LAYOUT_ORIENTATION; import org.eclipse.sirius.properties.FillLayoutDescription; import org.eclipse.sirius.properties.GridLayoutDescription; +import org.eclipse.sirius.properties.GroupConditionalStyle; import org.eclipse.sirius.properties.GroupDescription; +import org.eclipse.sirius.properties.GroupStyle; import org.eclipse.sirius.properties.GroupValidationSetDescription; import org.eclipse.sirius.properties.HyperlinkDescription; import org.eclipse.sirius.properties.HyperlinkWidgetConditionalStyle; @@ -61,6 +63,8 @@ import org.eclipse.sirius.properties.TextAreaDescription; import org.eclipse.sirius.properties.TextDescription; import org.eclipse.sirius.properties.TextWidgetConditionalStyle; import org.eclipse.sirius.properties.TextWidgetStyle; +import org.eclipse.sirius.properties.TitleBarStyle; +import org.eclipse.sirius.properties.ToggleStyle; import org.eclipse.sirius.properties.ViewExtensionDescription; import org.eclipse.sirius.properties.WidgetAction; import org.eclipse.sirius.properties.WidgetStyle; @@ -176,6 +180,8 @@ public class PropertiesFactoryImpl extends EFactoryImpl implements PropertiesFac return createReferenceWidgetStyle(); case PropertiesPackage.HYPERLINK_WIDGET_STYLE: return createHyperlinkWidgetStyle(); + case PropertiesPackage.GROUP_STYLE: + return createGroupStyle(); case PropertiesPackage.TEXT_WIDGET_CONDITIONAL_STYLE: return createTextWidgetConditionalStyle(); case PropertiesPackage.LABEL_WIDGET_CONDITIONAL_STYLE: @@ -196,6 +202,8 @@ public class PropertiesFactoryImpl extends EFactoryImpl implements PropertiesFac return createWidgetAction(); case PropertiesPackage.HYPERLINK_WIDGET_CONDITIONAL_STYLE: return createHyperlinkWidgetConditionalStyle(); + case PropertiesPackage.GROUP_CONDITIONAL_STYLE: + return createGroupConditionalStyle(); default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); } @@ -211,6 +219,10 @@ public class PropertiesFactoryImpl extends EFactoryImpl implements PropertiesFac switch (eDataType.getClassifierID()) { case PropertiesPackage.FILL_LAYOUT_ORIENTATION: return createFILL_LAYOUT_ORIENTATIONFromString(eDataType, initialValue); + case PropertiesPackage.TOGGLE_STYLE: + return createToggleStyleFromString(eDataType, initialValue); + case PropertiesPackage.TITLE_BAR_STYLE: + return createTitleBarStyleFromString(eDataType, initialValue); default: throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); } @@ -226,6 +238,10 @@ public class PropertiesFactoryImpl extends EFactoryImpl implements PropertiesFac switch (eDataType.getClassifierID()) { case PropertiesPackage.FILL_LAYOUT_ORIENTATION: return convertFILL_LAYOUT_ORIENTATIONToString(eDataType, instanceValue); + case PropertiesPackage.TOGGLE_STYLE: + return convertToggleStyleToString(eDataType, instanceValue); + case PropertiesPackage.TITLE_BAR_STYLE: + return convertTitleBarStyleToString(eDataType, instanceValue); default: throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); } @@ -611,6 +627,17 @@ public class PropertiesFactoryImpl extends EFactoryImpl implements PropertiesFac * @generated */ @Override + public GroupStyle createGroupStyle() { + GroupStyleImpl groupStyle = new GroupStyleImpl(); + return groupStyle; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override public TextWidgetConditionalStyle createTextWidgetConditionalStyle() { TextWidgetConditionalStyleImpl textWidgetConditionalStyle = new TextWidgetConditionalStyleImpl(); return textWidgetConditionalStyle; @@ -720,6 +747,17 @@ public class PropertiesFactoryImpl extends EFactoryImpl implements PropertiesFac * * @generated */ + @Override + public GroupConditionalStyle createGroupConditionalStyle() { + GroupConditionalStyleImpl groupConditionalStyle = new GroupConditionalStyleImpl(); + return groupConditionalStyle; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ public FILL_LAYOUT_ORIENTATION createFILL_LAYOUT_ORIENTATIONFromString(EDataType eDataType, String initialValue) { FILL_LAYOUT_ORIENTATION result = FILL_LAYOUT_ORIENTATION.get(initialValue); if (result == null) { @@ -742,6 +780,50 @@ public class PropertiesFactoryImpl extends EFactoryImpl implements PropertiesFac * * @generated */ + public ToggleStyle createToggleStyleFromString(EDataType eDataType, String initialValue) { + ToggleStyle result = ToggleStyle.get(initialValue); + if (result == null) { + throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); + } + return result; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public String convertToggleStyleToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public TitleBarStyle createTitleBarStyleFromString(EDataType eDataType, String initialValue) { + TitleBarStyle result = TitleBarStyle.get(initialValue); + if (result == null) { + throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); + } + return result; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public String convertTitleBarStyleToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ @Override public PropertiesPackage getPropertiesPackage() { return (PropertiesPackage) getEPackage(); 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 e0d348efa6..4a2e838968 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 @@ -35,7 +35,9 @@ import org.eclipse.sirius.properties.DynamicMappingFor; import org.eclipse.sirius.properties.DynamicMappingIf; import org.eclipse.sirius.properties.FillLayoutDescription; import org.eclipse.sirius.properties.GridLayoutDescription; +import org.eclipse.sirius.properties.GroupConditionalStyle; import org.eclipse.sirius.properties.GroupDescription; +import org.eclipse.sirius.properties.GroupStyle; import org.eclipse.sirius.properties.GroupValidationSetDescription; import org.eclipse.sirius.properties.HyperlinkDescription; import org.eclipse.sirius.properties.HyperlinkWidgetConditionalStyle; @@ -63,6 +65,8 @@ import org.eclipse.sirius.properties.TextAreaDescription; import org.eclipse.sirius.properties.TextDescription; import org.eclipse.sirius.properties.TextWidgetConditionalStyle; import org.eclipse.sirius.properties.TextWidgetStyle; +import org.eclipse.sirius.properties.TitleBarStyle; +import org.eclipse.sirius.properties.ToggleStyle; import org.eclipse.sirius.properties.ViewExtensionDescription; import org.eclipse.sirius.properties.WidgetAction; import org.eclipse.sirius.properties.WidgetConditionalStyle; @@ -407,6 +411,13 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac * * @generated */ + private EClass groupConditionalStyleEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ private EClass referenceWidgetStyleEClass = null; /** @@ -421,9 +432,30 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac * * @generated */ + private EClass groupStyleEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ private EEnum filL_LAYOUT_ORIENTATIONEEnum = null; /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private EEnum toggleStyleEEnum = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private EEnum titleBarStyleEEnum = null; + + /** * Creates an instance of the model <b>Package</b>, registered with * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the * package package URI value. @@ -748,6 +780,26 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac * @generated */ @Override + public EReference getGroupDescription_Style() { + return (EReference) groupDescriptionEClass.getEStructuralFeatures().get(7); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getGroupDescription_ConditionalStyles() { + return (EReference) groupDescriptionEClass.getEStructuralFeatures().get(8); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override public EClass getGroupValidationSetDescription() { return groupValidationSetDescriptionEClass; } @@ -2078,6 +2130,26 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac * @generated */ @Override + public EClass getGroupConditionalStyle() { + return groupConditionalStyleEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getGroupConditionalStyle_Style() { + return (EReference) groupConditionalStyleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override public EClass getReferenceWidgetStyle() { return referenceWidgetStyleEClass; } @@ -2138,6 +2210,86 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac * @generated */ @Override + public EClass getGroupStyle() { + return groupStyleEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getGroupStyle_BackgroundColor() { + return (EReference) groupStyleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getGroupStyle_ForegroundColor() { + return (EReference) groupStyleEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getGroupStyle_FontNameExpression() { + return (EAttribute) groupStyleEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getGroupStyle_FontSize() { + return (EAttribute) groupStyleEClass.getEStructuralFeatures().get(3); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getGroupStyle_BarStyle() { + return (EAttribute) groupStyleEClass.getEStructuralFeatures().get(4); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getGroupStyle_ToggleStyle() { + return (EAttribute) groupStyleEClass.getEStructuralFeatures().get(5); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getGroupStyle_ExpandedByDefault() { + return (EAttribute) groupStyleEClass.getEStructuralFeatures().get(6); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override public EEnum getFILL_LAYOUT_ORIENTATION() { return filL_LAYOUT_ORIENTATIONEEnum; } @@ -2148,6 +2300,26 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac * @generated */ @Override + public EEnum getToggleStyle() { + return toggleStyleEEnum; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EEnum getTitleBarStyle() { + return titleBarStyleEEnum; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override public PropertiesFactory getPropertiesFactory() { return (PropertiesFactory) getEFactoryInstance(); } @@ -2202,6 +2374,8 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac createEAttribute(groupDescriptionEClass, PropertiesPackage.GROUP_DESCRIPTION__PRECONDITION_EXPRESSION); createEReference(groupDescriptionEClass, PropertiesPackage.GROUP_DESCRIPTION__CONTROLS); createEReference(groupDescriptionEClass, PropertiesPackage.GROUP_DESCRIPTION__VALIDATION_SET); + createEReference(groupDescriptionEClass, PropertiesPackage.GROUP_DESCRIPTION__STYLE); + createEReference(groupDescriptionEClass, PropertiesPackage.GROUP_DESCRIPTION__CONDITIONAL_STYLES); groupValidationSetDescriptionEClass = createEClass(PropertiesPackage.GROUP_VALIDATION_SET_DESCRIPTION); createEReference(groupValidationSetDescriptionEClass, PropertiesPackage.GROUP_VALIDATION_SET_DESCRIPTION__SEMANTIC_VALIDATION_RULES); @@ -2351,6 +2525,15 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac createEReference(hyperlinkWidgetStyleEClass, PropertiesPackage.HYPERLINK_WIDGET_STYLE__BACKGROUND_COLOR); createEAttribute(hyperlinkWidgetStyleEClass, PropertiesPackage.HYPERLINK_WIDGET_STYLE__FONT_FORMAT); + groupStyleEClass = createEClass(PropertiesPackage.GROUP_STYLE); + createEReference(groupStyleEClass, PropertiesPackage.GROUP_STYLE__BACKGROUND_COLOR); + createEReference(groupStyleEClass, PropertiesPackage.GROUP_STYLE__FOREGROUND_COLOR); + createEAttribute(groupStyleEClass, PropertiesPackage.GROUP_STYLE__FONT_NAME_EXPRESSION); + createEAttribute(groupStyleEClass, PropertiesPackage.GROUP_STYLE__FONT_SIZE); + createEAttribute(groupStyleEClass, PropertiesPackage.GROUP_STYLE__BAR_STYLE); + createEAttribute(groupStyleEClass, PropertiesPackage.GROUP_STYLE__TOGGLE_STYLE); + createEAttribute(groupStyleEClass, PropertiesPackage.GROUP_STYLE__EXPANDED_BY_DEFAULT); + widgetConditionalStyleEClass = createEClass(PropertiesPackage.WIDGET_CONDITIONAL_STYLE); createEAttribute(widgetConditionalStyleEClass, PropertiesPackage.WIDGET_CONDITIONAL_STYLE__PRECONDITION_EXPRESSION); @@ -2385,8 +2568,13 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac hyperlinkWidgetConditionalStyleEClass = createEClass(PropertiesPackage.HYPERLINK_WIDGET_CONDITIONAL_STYLE); createEReference(hyperlinkWidgetConditionalStyleEClass, PropertiesPackage.HYPERLINK_WIDGET_CONDITIONAL_STYLE__STYLE); + groupConditionalStyleEClass = createEClass(PropertiesPackage.GROUP_CONDITIONAL_STYLE); + createEReference(groupConditionalStyleEClass, PropertiesPackage.GROUP_CONDITIONAL_STYLE__STYLE); + // Create enums filL_LAYOUT_ORIENTATIONEEnum = createEEnum(PropertiesPackage.FILL_LAYOUT_ORIENTATION); + toggleStyleEEnum = createEEnum(PropertiesPackage.TOGGLE_STYLE); + titleBarStyleEEnum = createEEnum(PropertiesPackage.TITLE_BAR_STYLE); } /** @@ -2461,6 +2649,7 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac customWidgetConditionalStyleEClass.getESuperTypes().add(this.getWidgetConditionalStyle()); referenceWidgetConditionalStyleEClass.getESuperTypes().add(this.getWidgetConditionalStyle()); hyperlinkWidgetConditionalStyleEClass.getESuperTypes().add(this.getWidgetConditionalStyle()); + groupConditionalStyleEClass.getESuperTypes().add(this.getWidgetConditionalStyle()); // Initialize classes and features; add operations and parameters initEClass(viewExtensionDescriptionEClass, ViewExtensionDescription.class, "ViewExtensionDescription", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, @@ -2528,6 +2717,12 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac initEReference(getGroupDescription_ValidationSet(), this.getGroupValidationSetDescription(), null, "validationSet", null, 0, 1, GroupDescription.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(getGroupDescription_Style(), this.getGroupStyle(), null, "style", null, 0, 1, GroupDescription.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(getGroupDescription_ConditionalStyles(), this.getGroupConditionalStyle(), null, "conditionalStyles", null, 0, -1, GroupDescription.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); initEClass(groupValidationSetDescriptionEClass, GroupValidationSetDescription.class, "GroupValidationSetDescription", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS); @@ -2816,6 +3011,24 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac initEAttribute(getHyperlinkWidgetStyle_FontFormat(), theViewpointPackage.getFontFormat(), "fontFormat", null, 0, 4, HyperlinkWidgetStyle.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); + initEClass(groupStyleEClass, GroupStyle.class, "GroupStyle", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS); + initEReference(getGroupStyle_BackgroundColor(), theDescriptionPackage.getColorDescription(), null, "backgroundColor", null, 0, 1, GroupStyle.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(getGroupStyle_ForegroundColor(), theDescriptionPackage.getColorDescription(), null, "foregroundColor", null, 0, 1, GroupStyle.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(getGroupStyle_FontNameExpression(), theDescriptionPackage.getInterpretedExpression(), "fontNameExpression", null, 0, 1, GroupStyle.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); + initEAttribute(getGroupStyle_FontSize(), ecorePackage.getEInt(), "fontSize", null, 0, 1, GroupStyle.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); + initEAttribute(getGroupStyle_BarStyle(), this.getTitleBarStyle(), "barStyle", null, 0, 1, GroupStyle.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); + initEAttribute(getGroupStyle_ToggleStyle(), this.getToggleStyle(), "toggleStyle", null, 0, 1, GroupStyle.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); + initEAttribute(getGroupStyle_ExpandedByDefault(), ecorePackage.getEBoolean(), "expandedByDefault", null, 0, 1, GroupStyle.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); + initEClass(widgetConditionalStyleEClass, WidgetConditionalStyle.class, "WidgetConditionalStyle", EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS); initEAttribute(getWidgetConditionalStyle_PreconditionExpression(), theDescriptionPackage.getInterpretedExpression(), "preconditionExpression", null, 0, 1, WidgetConditionalStyle.class, @@ -2883,11 +3096,26 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac !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); + initEClass(groupConditionalStyleEClass, GroupConditionalStyle.class, "GroupConditionalStyle", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS); + initEReference(getGroupConditionalStyle_Style(), this.getGroupStyle(), null, "style", null, 0, 1, GroupConditionalStyle.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); + // Initialize enums and add enum literals initEEnum(filL_LAYOUT_ORIENTATIONEEnum, org.eclipse.sirius.properties.FILL_LAYOUT_ORIENTATION.class, "FILL_LAYOUT_ORIENTATION"); addEEnumLiteral(filL_LAYOUT_ORIENTATIONEEnum, org.eclipse.sirius.properties.FILL_LAYOUT_ORIENTATION.VERTICAL); addEEnumLiteral(filL_LAYOUT_ORIENTATIONEEnum, org.eclipse.sirius.properties.FILL_LAYOUT_ORIENTATION.HORIZONTAL); + initEEnum(toggleStyleEEnum, ToggleStyle.class, "ToggleStyle"); + addEEnumLiteral(toggleStyleEEnum, ToggleStyle.TWISTIE); + addEEnumLiteral(toggleStyleEEnum, ToggleStyle.TREE_NODE); + addEEnumLiteral(toggleStyleEEnum, ToggleStyle.NONE); + + initEEnum(titleBarStyleEEnum, TitleBarStyle.class, "TitleBarStyle"); + addEEnumLiteral(titleBarStyleEEnum, TitleBarStyle.TITLE_BAR); + addEEnumLiteral(titleBarStyleEEnum, TitleBarStyle.SHORT_TITLE_BAR); + addEEnumLiteral(titleBarStyleEEnum, TitleBarStyle.NO_TITLE); + // Create resource createResource(PropertiesPackage.eNS_URI); } diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/util/PropertiesAdapterFactory.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/util/PropertiesAdapterFactory.java index ff928747e9..5bb212271d 100644 --- a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/util/PropertiesAdapterFactory.java +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/util/PropertiesAdapterFactory.java @@ -32,7 +32,9 @@ import org.eclipse.sirius.properties.DynamicMappingFor; import org.eclipse.sirius.properties.DynamicMappingIf; import org.eclipse.sirius.properties.FillLayoutDescription; import org.eclipse.sirius.properties.GridLayoutDescription; +import org.eclipse.sirius.properties.GroupConditionalStyle; import org.eclipse.sirius.properties.GroupDescription; +import org.eclipse.sirius.properties.GroupStyle; import org.eclipse.sirius.properties.GroupValidationSetDescription; import org.eclipse.sirius.properties.HyperlinkDescription; import org.eclipse.sirius.properties.HyperlinkWidgetConditionalStyle; @@ -309,6 +311,11 @@ public class PropertiesAdapterFactory extends AdapterFactoryImpl { } @Override + public Adapter caseGroupStyle(GroupStyle object) { + return createGroupStyleAdapter(); + } + + @Override public Adapter caseWidgetConditionalStyle(WidgetConditionalStyle object) { return createWidgetConditionalStyleAdapter(); } @@ -364,6 +371,11 @@ public class PropertiesAdapterFactory extends AdapterFactoryImpl { } @Override + public Adapter caseGroupConditionalStyle(GroupConditionalStyle object) { + return createGroupConditionalStyleAdapter(); + } + + @Override public Adapter caseExtension(Extension object) { return createExtensionAdapter(); } @@ -991,6 +1003,21 @@ public class PropertiesAdapterFactory extends AdapterFactoryImpl { /** * Creates a new adapter for an object of class ' + * {@link org.eclipse.sirius.properties.GroupStyle <em>Group Style</em>}'. + * <!-- begin-user-doc --> This default implementation returns null so that + * we can easily ignore cases; it's useful to ignore a case when inheritance + * will catch all the cases anyway. <!-- end-user-doc --> + * + * @return the new adapter. + * @see org.eclipse.sirius.properties.GroupStyle + * @generated + */ + public Adapter createGroupStyleAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class ' * {@link org.eclipse.sirius.properties.WidgetConditionalStyle * <em>Widget Conditional Style</em>}'. <!-- begin-user-doc --> This default * implementation returns null so that we can easily ignore cases; it's @@ -1166,6 +1193,22 @@ public class PropertiesAdapterFactory extends AdapterFactoryImpl { /** * Creates a new adapter for an object of class ' + * {@link org.eclipse.sirius.properties.GroupConditionalStyle + * <em>Group Conditional Style</em>}'. <!-- begin-user-doc --> This default + * implementation returns null so that we can easily ignore cases; it's + * useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * + * @return the new adapter. + * @see org.eclipse.sirius.properties.GroupConditionalStyle + * @generated + */ + public Adapter createGroupConditionalStyleAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class ' * {@link org.eclipse.sirius.viewpoint.description.Extension * <em>Extension</em>}'. <!-- begin-user-doc --> This default implementation * returns null so that we can easily ignore cases; it's useful to ignore a diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/util/PropertiesSwitch.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/util/PropertiesSwitch.java index 540af8da6d..7790496604 100644 --- a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/util/PropertiesSwitch.java +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/util/PropertiesSwitch.java @@ -32,7 +32,9 @@ import org.eclipse.sirius.properties.DynamicMappingFor; import org.eclipse.sirius.properties.DynamicMappingIf; import org.eclipse.sirius.properties.FillLayoutDescription; import org.eclipse.sirius.properties.GridLayoutDescription; +import org.eclipse.sirius.properties.GroupConditionalStyle; import org.eclipse.sirius.properties.GroupDescription; +import org.eclipse.sirius.properties.GroupStyle; import org.eclipse.sirius.properties.GroupValidationSetDescription; import org.eclipse.sirius.properties.HyperlinkDescription; import org.eclipse.sirius.properties.HyperlinkWidgetConditionalStyle; @@ -551,6 +553,14 @@ public class PropertiesSwitch<T> { } return result; } + case PropertiesPackage.GROUP_STYLE: { + GroupStyle groupStyle = (GroupStyle) theEObject; + T result = caseGroupStyle(groupStyle); + if (result == null) { + result = defaultCase(theEObject); + } + return result; + } case PropertiesPackage.WIDGET_CONDITIONAL_STYLE: { WidgetConditionalStyle widgetConditionalStyle = (WidgetConditionalStyle) theEObject; T result = caseWidgetConditionalStyle(widgetConditionalStyle); @@ -666,6 +676,17 @@ public class PropertiesSwitch<T> { } return result; } + case PropertiesPackage.GROUP_CONDITIONAL_STYLE: { + GroupConditionalStyle groupConditionalStyle = (GroupConditionalStyle) theEObject; + T result = caseGroupConditionalStyle(groupConditionalStyle); + if (result == null) { + result = caseWidgetConditionalStyle(groupConditionalStyle); + } + if (result == null) { + result = defaultCase(theEObject); + } + return result; + } default: return defaultCase(theEObject); } @@ -1302,6 +1323,23 @@ public class PropertiesSwitch<T> { /** * Returns the result of interpreting the object as an instance of ' + * <em>Group Style</em>'. <!-- begin-user-doc --> This implementation + * returns null; returning a non-null result will terminate the switch. <!-- + * end-user-doc --> + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of ' + * <em>Group Style</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseGroupStyle(GroupStyle object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of ' * <em>Widget Conditional Style</em>'. <!-- begin-user-doc --> This * implementation returns null; returning a non-null result will terminate * the switch. <!-- end-user-doc --> @@ -1489,6 +1527,23 @@ public class PropertiesSwitch<T> { /** * Returns the result of interpreting the object as an instance of ' + * <em>Group Conditional Style</em>'. <!-- begin-user-doc --> This + * implementation returns null; returning a non-null result will terminate + * the switch. <!-- end-user-doc --> + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of ' + * <em>Group Conditional Style</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseGroupConditionalStyle(GroupConditionalStyle object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of ' * <em>Extension</em>'. <!-- begin-user-doc --> This implementation returns * null; returning a non-null result will terminate the switch. <!-- * end-user-doc --> 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 fe2bea2734..bb075a79cf 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 @@ -34,7 +34,9 @@ import org.eclipse.eef.EEFDynamicMappingFor; import org.eclipse.eef.EEFDynamicMappingIf; import org.eclipse.eef.EEFFillLayoutDescription; import org.eclipse.eef.EEFGridLayoutDescription; +import org.eclipse.eef.EEFGroupConditionalStyle; import org.eclipse.eef.EEFGroupDescription; +import org.eclipse.eef.EEFGroupStyle; import org.eclipse.eef.EEFHyperlinkConditionalStyle; import org.eclipse.eef.EEFHyperlinkDescription; import org.eclipse.eef.EEFHyperlinkStyle; @@ -64,6 +66,8 @@ import org.eclipse.eef.EEFWidgetAction; import org.eclipse.eef.EEFWidgetDescription; import org.eclipse.eef.EEFWidgetStyle; import org.eclipse.eef.EEF_FILL_LAYOUT_ORIENTATION; +import org.eclipse.eef.EEF_TITLE_BAR_STYLE; +import org.eclipse.eef.EEF_TOGGLE_STYLE; import org.eclipse.eef.EEF_VALIDATION_SEVERITY_DESCRIPTION; import org.eclipse.eef.EefFactory; import org.eclipse.emf.ecore.EObject; @@ -88,7 +92,9 @@ import org.eclipse.sirius.properties.DynamicMappingIf; import org.eclipse.sirius.properties.FILL_LAYOUT_ORIENTATION; import org.eclipse.sirius.properties.FillLayoutDescription; import org.eclipse.sirius.properties.GridLayoutDescription; +import org.eclipse.sirius.properties.GroupConditionalStyle; import org.eclipse.sirius.properties.GroupDescription; +import org.eclipse.sirius.properties.GroupStyle; import org.eclipse.sirius.properties.HyperlinkDescription; import org.eclipse.sirius.properties.HyperlinkWidgetConditionalStyle; import org.eclipse.sirius.properties.HyperlinkWidgetStyle; @@ -295,33 +301,84 @@ public class ViewDescriptionConverter { * Creates a concrete group instance bound to a specific semantic target. */ private void createGroup(GroupDescription groupDescription, EEFPageDescription page, EEFViewDescription view) { - EEFGroupDescription group = EefFactory.eINSTANCE.createEEFGroupDescription(); - group.setIdentifier(groupDescription.getIdentifier()); - group.setLabelExpression(groupDescription.getLabelExpression()); - group.setDomainClass(groupDescription.getDomainClass()); - group.setSemanticCandidateExpression(groupDescription.getSemanticCandidateExpression()); - group.setPreconditionExpression(groupDescription.getPreconditionExpression()); + EEFGroupDescription eefGroup = EefFactory.eINSTANCE.createEEFGroupDescription(); + eefGroup.setIdentifier(groupDescription.getIdentifier()); + eefGroup.setLabelExpression(groupDescription.getLabelExpression()); + eefGroup.setDomainClass(groupDescription.getDomainClass()); + eefGroup.setSemanticCandidateExpression(groupDescription.getSemanticCandidateExpression()); + eefGroup.setPreconditionExpression(groupDescription.getPreconditionExpression()); - if (group.getIdentifier() == null || group.getIdentifier().trim().length() == 0) { - group.setIdentifier(EcoreUtil.getURI(groupDescription).toString()); + EEFGroupStyle eefGroupStyle = createEEFGroupStyle(groupDescription.getStyle()); + if (eefGroupStyle != null) { + eefGroup.setStyle(eefGroupStyle); } - convertGroupContents(groupDescription, group); + List<GroupConditionalStyle> conditionalStyles = groupDescription.getConditionalStyles(); + if (conditionalStyles != null && !conditionalStyles.isEmpty()) { + List<EEFGroupConditionalStyle> eefConditionalStyles = new ArrayList<EEFGroupConditionalStyle>(); + for (GroupConditionalStyle conditionalStyle : conditionalStyles) { + EEFGroupConditionalStyle eefConditionalStyle = EefFactory.eINSTANCE.createEEFGroupConditionalStyle(); + eefConditionalStyle.setPreconditionExpression(conditionalStyle.getPreconditionExpression()); + EEFGroupStyle eefConditionalStyleGroupStyle = createEEFGroupStyle(conditionalStyle.getStyle()); + if (eefConditionalStyleGroupStyle != null) { + eefConditionalStyle.setStyle(eefConditionalStyleGroupStyle); + } + eefConditionalStyles.add(eefConditionalStyle); + } + + if (eefConditionalStyles != null && !eefConditionalStyles.isEmpty()) { + eefGroup.getConditionalStyles().addAll(eefConditionalStyles); + } + } + + if (eefGroup.getIdentifier() == null || eefGroup.getIdentifier().trim().length() == 0) { + eefGroup.setIdentifier(EcoreUtil.getURI(groupDescription).toString()); + } + + convertGroupContents(groupDescription, eefGroup); if (groupDescription.getValidationSet() != null) { for (SemanticValidationRule semanticValidationRule : groupDescription.getValidationSet().getSemanticValidationRules()) { - group.getSemanticValidationRules().add(this.createSemanticValidationRuleDescription(semanticValidationRule)); + eefGroup.getSemanticValidationRules().add(this.createSemanticValidationRuleDescription(semanticValidationRule)); } for (PropertyValidationRule propertyValidationRule : groupDescription.getValidationSet().getPropertyValidationRules()) { EEFPropertyValidationRuleDescription propertyValidationRuleDescription = this.createPropertyValidationRuleDescription(propertyValidationRule); this.eefPropertyValidationRule2propertyValidationRule.put(propertyValidationRuleDescription, propertyValidationRule); - group.getPropertyValidationRules().add(propertyValidationRuleDescription); + eefGroup.getPropertyValidationRules().add(propertyValidationRuleDescription); } } - page.getGroups().add(group); - view.getGroups().add(group); + page.getGroups().add(eefGroup); + view.getGroups().add(eefGroup); + } + + private EEFGroupStyle createEEFGroupStyle(GroupStyle groupStyle) { + if (groupStyle != null) { + EEFGroupStyle eefGroupStyle = EefFactory.eINSTANCE.createEEFGroupStyle(); + ColorDescription backgroundColorDescription = groupStyle.getBackgroundColor(); + if (backgroundColorDescription != null) { + String backgroundColorExpression = getColorExpression(backgroundColorDescription); + if (backgroundColorExpression != null) { + eefGroupStyle.setBackgroundColorExpression(backgroundColorExpression); + } + } + ColorDescription foregroundColorDescription = groupStyle.getForegroundColor(); + if (foregroundColorDescription != null) { + String foregroundColorExpression = getColorExpression(foregroundColorDescription); + if (foregroundColorExpression != null) { + eefGroupStyle.setForegroundColorExpression(foregroundColorExpression); + } + } + eefGroupStyle.setFontNameExpression(groupStyle.getFontNameExpression()); + eefGroupStyle.setFontSizeExpression(Integer.toString(groupStyle.getFontSize())); + eefGroupStyle.setBarStyle(EEF_TITLE_BAR_STYLE.get(groupStyle.getBarStyle().getValue())); + eefGroupStyle.setToggleStyle(EEF_TOGGLE_STYLE.get(groupStyle.getToggleStyle().getValue())); + eefGroupStyle.setExpandedByDefault(groupStyle.isExpandedByDefault()); + + return eefGroupStyle; + } + return null; } private void convertGroupContents(GroupDescription groupDescription, EEFGroupDescription group) { |
