diff options
author | Mélanie Bats | 2016-04-15 16:03:28 +0000 |
---|---|---|
committer | Mélanie Bats | 2016-04-27 15:45:22 +0000 |
commit | cf79810d5638fd03190008a05e79a1d4c1f5b81f (patch) | |
tree | df90832cd2547f9f7e67274a83aecdcee0320c6c | |
parent | 921fd616761d951f10b38d93ad381bcd89d8a172 (diff) | |
download | org.eclipse.eef-cf79810d5638fd03190008a05e79a1d4c1f5b81f.tar.gz org.eclipse.eef-cf79810d5638fd03190008a05e79a1d4c1f5b81f.tar.xz org.eclipse.eef-cf79810d5638fd03190008a05e79a1d4c1f5b81f.zip |
Support styles on group
Change-Id: Idd165c057499688c8db94922bf98d575da2af529
Signed-off-by: Mélanie Bats <melanie.bats@obeo.fr>
30 files changed, 3403 insertions, 54 deletions
diff --git a/plugins/org.eclipse.eef.common.ui/src/org/eclipse/eef/common/ui/api/EEFWidgetFactory.java b/plugins/org.eclipse.eef.common.ui/src/org/eclipse/eef/common/ui/api/EEFWidgetFactory.java index 5209defd4..a3a593a78 100644 --- a/plugins/org.eclipse.eef.common.ui/src/org/eclipse/eef/common/ui/api/EEFWidgetFactory.java +++ b/plugins/org.eclipse.eef.common.ui/src/org/eclipse/eef/common/ui/api/EEFWidgetFactory.java @@ -19,11 +19,16 @@ import org.eclipse.swt.custom.CTabItem; import org.eclipse.swt.custom.ScrolledComposite; import org.eclipse.swt.custom.StyledText; import org.eclipse.swt.layout.FormLayout; +import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Group; +import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.List; +import org.eclipse.swt.widgets.Table; import org.eclipse.ui.forms.widgets.FormToolkit; +import org.eclipse.ui.forms.widgets.Hyperlink; +import org.eclipse.ui.forms.widgets.Section; /** * A FormToolkit customized for use by tabbed property sheet page and others. @@ -90,6 +95,9 @@ public class EEFWidgetFactory extends FormToolkit { @Override public Composite createComposite(Composite parent, int style) { Composite c = super.createComposite(parent, style); + c.setBackgroundMode(SWT.INHERIT_DEFAULT); + c.setBackground(parent.getBackground()); + c.setForeground(parent.getForeground()); this.paintBordersFor(c); return c; } @@ -116,7 +124,6 @@ public class EEFWidgetFactory extends FormToolkit { */ public Composite createPlainComposite(Composite parent, int style) { Composite c = super.createComposite(parent, style); - c.setBackground(parent.getBackground()); this.paintBordersFor(c); return c; } @@ -177,8 +184,9 @@ public class EEFWidgetFactory extends FormToolkit { public Group createGroup(Composite parent, String text) { Group group = new Group(parent, SWT.SHADOW_NONE); group.setText(text); - group.setBackground(getColors().getBackground()); - group.setForeground(getColors().getForeground()); + group.setBackgroundMode(SWT.INHERIT_DEFAULT); + group.setBackground(parent.getBackground()); + group.setForeground(parent.getForeground()); return group; } @@ -226,6 +234,7 @@ public class EEFWidgetFactory extends FormToolkit { public CLabel createCLabel(Composite parent, String text, int style) { final CLabel label = new CLabel(parent, style); label.setBackground(parent.getBackground()); + label.setForeground(parent.getForeground()); label.setText(text); return label; } @@ -241,13 +250,85 @@ public class EEFWidgetFactory extends FormToolkit { */ public StyledText createStyledText(Composite parent, int style) { final StyledText styledText = new StyledText(parent, style); + styledText.setBackgroundMode(SWT.INHERIT_DEFAULT); styledText.setBackground(parent.getBackground()); + styledText.setForeground(parent.getForeground()); return styledText; } /** * {@inheritDoc} * + * @see org.eclipse.ui.forms.widgets.FormToolkit#createButton(org.eclipse.swt.widgets.Composite, java.lang.String, + * int) + */ + @Override + public Button createButton(Composite parent, String text, int style) { + Button button = super.createButton(parent, text, style); + button.setBackground(parent.getBackground()); + button.setForeground(parent.getForeground()); + return button; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.ui.forms.widgets.FormToolkit#createSection(org.eclipse.swt.widgets.Composite, int) + */ + @Override + public Section createSection(Composite parent, int sectionStyle) { + Section section = super.createSection(parent, sectionStyle); + section.setBackgroundMode(SWT.INHERIT_DEFAULT); + section.setBackground(parent.getBackground()); + section.setForeground(parent.getForeground()); + return section; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.ui.forms.widgets.FormToolkit#createLabel(org.eclipse.swt.widgets.Composite, java.lang.String, + * int) + */ + @Override + public Label createLabel(Composite parent, String text, int style) { + Label label = super.createLabel(parent, text, style); + label.setBackground(parent.getBackground()); + label.setForeground(parent.getForeground()); + return label; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.ui.forms.widgets.FormToolkit#createHyperlink(org.eclipse.swt.widgets.Composite, + * java.lang.String, int) + */ + @Override + public Hyperlink createHyperlink(Composite parent, String text, int style) { + Hyperlink hyperlink = super.createHyperlink(parent, text, style); + hyperlink.setBackground(parent.getBackground()); + hyperlink.setForeground(parent.getForeground()); + return hyperlink; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.ui.forms.widgets.FormToolkit#createTable(org.eclipse.swt.widgets.Composite, int) + */ + @Override + public Table createTable(Composite parent, int style) { + Table table = super.createTable(parent, style); + table.setBackgroundMode(SWT.INHERIT_DEFAULT); + table.setBackground(parent.getBackground()); + table.setForeground(parent.getForeground()); + return table; + } + + /** + * {@inheritDoc} + * * @see org.eclipse.ui.forms.widgets.FormToolkit#dispose() */ @Override diff --git a/plugins/org.eclipse.eef.edit/icons/full/obj16/EEFGroupConditionalStyle.gif b/plugins/org.eclipse.eef.edit/icons/full/obj16/EEFGroupConditionalStyle.gif Binary files differnew file mode 100644 index 000000000..cb1755a71 --- /dev/null +++ b/plugins/org.eclipse.eef.edit/icons/full/obj16/EEFGroupConditionalStyle.gif diff --git a/plugins/org.eclipse.eef.edit/icons/full/obj16/EEFGroupStyle.gif b/plugins/org.eclipse.eef.edit/icons/full/obj16/EEFGroupStyle.gif Binary files differnew file mode 100644 index 000000000..c4fb30e96 --- /dev/null +++ b/plugins/org.eclipse.eef.edit/icons/full/obj16/EEFGroupStyle.gif diff --git a/plugins/org.eclipse.eef.edit/plugin.properties b/plugins/org.eclipse.eef.edit/plugin.properties index 030a9037d..485319512 100644 --- a/plugins/org.eclipse.eef.edit/plugin.properties +++ b/plugins/org.eclipse.eef.edit/plugin.properties @@ -197,3 +197,29 @@ _UI_EEF_VALIDATION_SEVERITY_DESCRIPTION_WARNING_literal = WARNING _UI_EEF_VALIDATION_SEVERITY_DESCRIPTION_ERROR_literal = ERROR _UI_EEF_FILL_LAYOUT_ORIENTATION_VERTICAL_literal = VERTICAL _UI_EEF_FILL_LAYOUT_ORIENTATION_HORIZONTAL_literal = HORIZONTAL +_UI_GroupStyle_type = Group Style +_UI_EEFGroupDescription_style_feature = Style +_UI_GroupStyle_backgroundColorExpression_feature = Background Color Expression +_UI_GroupStyle_foregroundColorExpression_feature = Foreground Color Expression +_UI_GroupStyle_fontNameExpression_feature = Font Name Expression +_UI_GroupStyle_fontSizeExpression_feature = Font Size Expression +_UI_GroupStyle_barStyle_feature = Bar Style +_UI_GroupStyle_toggleStyle_feature = Toggle Style +_UI_EEF_TOGGLE_STYLE_TWISTIE_literal = TWISTIE +_UI_EEF_TOGGLE_STYLE_TREE_NODE_literal = TREE_NODE +_UI_EEF_TOGGLE_STYLE_NONE_literal = NONE +_UI_EEF_TITLE_BAR_STYLE_TITLE_BAR_literal = TITLE_BAR +_UI_EEF_TITLE_BAR_STYLE_SHORT_TITLE_BAR_literal = SHORT_TITLE_BAR +_UI_EEF_TITLE_BAR_STYLE_NO_TITLE_literal = NO_TITLE +_UI_EEFGroupStyle_type = EEF Group Style +_UI_EEFGroupStyle_backgroundColorExpression_feature = Background Color Expression +_UI_EEFGroupStyle_foregroundColorExpression_feature = Foreground Color Expression +_UI_EEFGroupStyle_fontNameExpression_feature = Font Name Expression +_UI_EEFGroupStyle_fontSizeExpression_feature = Font Size Expression +_UI_EEFGroupStyle_barStyle_feature = Bar Style +_UI_EEFGroupStyle_toggleStyle_feature = Toggle Style +_UI_EEFGroupStyle_isExpandedByDefault_feature = Is Expanded By Default +_UI_EEFGroupStyle_expandedByDefault_feature = Expanded By Default +_UI_EEFGroupConditionalStyle_type = EEF Group Conditional Style +_UI_EEFGroupConditionalStyle_style_feature = Style +_UI_EEFGroupDescription_conditionalStyles_feature = Conditional Styles diff --git a/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFGroupConditionalStyleItemProvider.java b/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFGroupConditionalStyleItemProvider.java new file mode 100644 index 000000000..14b47c390 --- /dev/null +++ b/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFGroupConditionalStyleItemProvider.java @@ -0,0 +1,148 @@ +/** + * Copyright (c) 2015 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.htm + * Contributors: Obeo - initial API and implementation + */ +package org.eclipse.eef.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.eef.EEFGroupConditionalStyle; +import org.eclipse.eef.EefFactory; +import org.eclipse.eef.EefPackage; +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; + +/** + * This is the item provider adapter for a {@link org.eclipse.eef.EEFGroupConditionalStyle} object. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ +public class EEFGroupConditionalStyleItemProvider extends EEFConditionalStyleItemProvider { + /** + * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EEFGroupConditionalStyleItemProvider(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(EefPackage.Literals.EEF_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 EEFGroupConditionalStyle.gif. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/EEFGroupConditionalStyle")); //$NON-NLS-1$ + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((EEFGroupConditionalStyle) object).getPreconditionExpression(); + return label == null || label.length() == 0 ? getString("_UI_EEFGroupConditionalStyle_type") : //$NON-NLS-1$ + getString("_UI_EEFGroupConditionalStyle_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ + } + + /** + * 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(EEFGroupConditionalStyle.class)) { + case EefPackage.EEF_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(EefPackage.Literals.EEF_GROUP_CONDITIONAL_STYLE__STYLE, + EefFactory.eINSTANCE.createEEFGroupStyle())); + } + +} diff --git a/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFGroupDescriptionItemProvider.java b/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFGroupDescriptionItemProvider.java index 7a90cbcff..ab4dfbdbc 100644 --- a/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFGroupDescriptionItemProvider.java +++ b/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFGroupDescriptionItemProvider.java @@ -154,6 +154,8 @@ ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { childrenFeatures.add(EefPackage.Literals.EEF_GROUP_DESCRIPTION__CONTROLS); childrenFeatures.add(EefPackage.Literals.EEF_GROUP_DESCRIPTION__SEMANTIC_VALIDATION_RULES); childrenFeatures.add(EefPackage.Literals.EEF_GROUP_DESCRIPTION__PROPERTY_VALIDATION_RULES); + childrenFeatures.add(EefPackage.Literals.EEF_GROUP_DESCRIPTION__STYLE); + childrenFeatures.add(EefPackage.Literals.EEF_GROUP_DESCRIPTION__CONDITIONAL_STYLES); } return childrenFeatures; } @@ -225,6 +227,8 @@ ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { case EefPackage.EEF_GROUP_DESCRIPTION__CONTROLS: case EefPackage.EEF_GROUP_DESCRIPTION__SEMANTIC_VALIDATION_RULES: case EefPackage.EEF_GROUP_DESCRIPTION__PROPERTY_VALIDATION_RULES: + case EefPackage.EEF_GROUP_DESCRIPTION__STYLE: + case EefPackage.EEF_GROUP_DESCRIPTION__CONDITIONAL_STYLES: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); return; } @@ -263,6 +267,9 @@ ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { EefFactory.eINSTANCE.createEEFRadioDescription())); newChildDescriptors.add(createChildParameter(EefPackage.Literals.EEF_GROUP_DESCRIPTION__CONTROLS, + EefFactory.eINSTANCE.createEEFHyperlinkDescription())); + + newChildDescriptors.add(createChildParameter(EefPackage.Literals.EEF_GROUP_DESCRIPTION__CONTROLS, EefFactory.eINSTANCE.createEEFDynamicMappingFor())); newChildDescriptors.add(createChildParameter(EefPackage.Literals.EEF_GROUP_DESCRIPTION__CONTROLS, @@ -276,6 +283,11 @@ ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { newChildDescriptors.add(createChildParameter(EefPackage.Literals.EEF_GROUP_DESCRIPTION__PROPERTY_VALIDATION_RULES, EefFactory.eINSTANCE.createEEFPropertyValidationRuleDescription())); + + newChildDescriptors.add(createChildParameter(EefPackage.Literals.EEF_GROUP_DESCRIPTION__STYLE, EefFactory.eINSTANCE.createEEFGroupStyle())); + + newChildDescriptors.add(createChildParameter(EefPackage.Literals.EEF_GROUP_DESCRIPTION__CONDITIONAL_STYLES, + EefFactory.eINSTANCE.createEEFGroupConditionalStyle())); } /** diff --git a/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFGroupStyleItemProvider.java b/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFGroupStyleItemProvider.java new file mode 100644 index 000000000..beb11a0da --- /dev/null +++ b/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFGroupStyleItemProvider.java @@ -0,0 +1,248 @@ +/** + * Copyright (c) 2015 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.htm + * Contributors: Obeo - initial API and implementation + */ +package org.eclipse.eef.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.eef.EEFGroupStyle; +import org.eclipse.eef.EefPackage; +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; + +/** + * This is the item provider adapter for a {@link org.eclipse.eef.EEFGroupStyle} object. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ +public class EEFGroupStyleItemProvider 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 EEFGroupStyleItemProvider(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); + + addBackgroundColorExpressionPropertyDescriptor(object); + addForegroundColorExpressionPropertyDescriptor(object); + addFontNameExpressionPropertyDescriptor(object); + addFontSizeExpressionPropertyDescriptor(object); + addBarStylePropertyDescriptor(object); + addToggleStylePropertyDescriptor(object); + addExpandedByDefaultPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Background Color Expression feature. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + protected void addBackgroundColorExpressionPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_EEFGroupStyle_backgroundColorExpression_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_EEFGroupStyle_backgroundColorExpression_feature", "_UI_EEFGroupStyle_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + EefPackage.Literals.EEF_GROUP_STYLE__BACKGROUND_COLOR_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, null)); + } + + /** + * This adds a property descriptor for the Foreground Color Expression feature. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + protected void addForegroundColorExpressionPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_EEFGroupStyle_foregroundColorExpression_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_EEFGroupStyle_foregroundColorExpression_feature", "_UI_EEFGroupStyle_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + EefPackage.Literals.EEF_GROUP_STYLE__FOREGROUND_COLOR_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + 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_EEFGroupStyle_fontNameExpression_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_EEFGroupStyle_fontNameExpression_feature", "_UI_EEFGroupStyle_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + EefPackage.Literals.EEF_GROUP_STYLE__FONT_NAME_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, null)); + } + + /** + * This adds a property descriptor for the Font Size Expression feature. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + */ + protected void addFontSizeExpressionPropertyDescriptor(Object object) { + itemPropertyDescriptors + .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_EEFGroupStyle_fontSizeExpression_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_EEFGroupStyle_fontSizeExpression_feature", "_UI_EEFGroupStyle_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + EefPackage.Literals.EEF_GROUP_STYLE__FONT_SIZE_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_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_EEFGroupStyle_barStyle_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_EEFGroupStyle_barStyle_feature", "_UI_EEFGroupStyle_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + EefPackage.Literals.EEF_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_EEFGroupStyle_toggleStyle_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_EEFGroupStyle_toggleStyle_feature", "_UI_EEFGroupStyle_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + EefPackage.Literals.EEF_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_EEFGroupStyle_expandedByDefault_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_EEFGroupStyle_expandedByDefault_feature", "_UI_EEFGroupStyle_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + EefPackage.Literals.EEF_GROUP_STYLE__EXPANDED_BY_DEFAULT, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, + null, null)); + } + + /** + * This returns EEFGroupStyle.gif. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/EEFGroupStyle")); //$NON-NLS-1$ + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((EEFGroupStyle) object).getFontNameExpression(); + return label == null || label.length() == 0 ? getString("_UI_EEFGroupStyle_type") : //$NON-NLS-1$ + getString("_UI_EEFGroupStyle_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ + } + + /** + * 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(EEFGroupStyle.class)) { + case EefPackage.EEF_GROUP_STYLE__BACKGROUND_COLOR_EXPRESSION: + case EefPackage.EEF_GROUP_STYLE__FOREGROUND_COLOR_EXPRESSION: + case EefPackage.EEF_GROUP_STYLE__FONT_NAME_EXPRESSION: + case EefPackage.EEF_GROUP_STYLE__FONT_SIZE_EXPRESSION: + case EefPackage.EEF_GROUP_STYLE__BAR_STYLE: + case EefPackage.EEF_GROUP_STYLE__TOGGLE_STYLE: + case EefPackage.EEF_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 EefEditPlugin.INSTANCE; + } + +} diff --git a/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EefItemProviderAdapterFactory.java b/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EefItemProviderAdapterFactory.java index 2636b18bd..0860b9075 100644 --- a/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EefItemProviderAdapterFactory.java +++ b/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EefItemProviderAdapterFactory.java @@ -786,6 +786,29 @@ public class EefItemProviderAdapterFactory extends EefAdapterFactory implements } /** + * This keeps track of the one adapter used for all {@link org.eclipse.eef.EEFGroupStyle} instances. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected EEFGroupStyleItemProvider eefGroupStyleItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.eef.EEFGroupStyle}. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + */ + @Override + public Adapter createEEFGroupStyleAdapter() { + if (eefGroupStyleItemProvider == null) { + eefGroupStyleItemProvider = new EEFGroupStyleItemProvider(this); + } + + return eefGroupStyleItemProvider; + } + + /** * This keeps track of the one adapter used for all {@link org.eclipse.eef.EEFTextConditionalStyle} instances. <!-- * begin-user-doc --> <!-- end-user-doc --> * @@ -1016,6 +1039,29 @@ public class EefItemProviderAdapterFactory extends EefAdapterFactory implements } /** + * This keeps track of the one adapter used for all {@link org.eclipse.eef.EEFGroupConditionalStyle} instances. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected EEFGroupConditionalStyleItemProvider eefGroupConditionalStyleItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.eef.EEFGroupConditionalStyle}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public Adapter createEEFGroupConditionalStyleAdapter() { + if (eefGroupConditionalStyleItemProvider == null) { + eefGroupConditionalStyleItemProvider = new EEFGroupConditionalStyleItemProvider(this); + } + + return eefGroupConditionalStyleItemProvider; + } + + /** * This returns the root adapter factory that contains this factory. <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated @@ -1208,6 +1254,9 @@ public class EefItemProviderAdapterFactory extends EefAdapterFactory implements if (eefReferenceStyleItemProvider != null) { eefReferenceStyleItemProvider.dispose(); } + if (eefGroupStyleItemProvider != null) { + eefGroupStyleItemProvider.dispose(); + } if (eefTextConditionalStyleItemProvider != null) { eefTextConditionalStyleItemProvider.dispose(); } @@ -1238,6 +1287,9 @@ public class EefItemProviderAdapterFactory extends EefAdapterFactory implements if (eefReferenceConditionalStyleItemProvider != null) { eefReferenceConditionalStyleItemProvider.dispose(); } + if (eefGroupConditionalStyleItemProvider != null) { + eefGroupConditionalStyleItemProvider.dispose(); + } } } diff --git a/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFGroupLifecycleManager.java b/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFGroupLifecycleManager.java index a15ea7380..5eba9806d 100644 --- a/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFGroupLifecycleManager.java +++ b/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFGroupLifecycleManager.java @@ -16,7 +16,12 @@ import java.util.ArrayList; import java.util.List; import org.eclipse.eef.EEFControlDescription; +import org.eclipse.eef.EEFGroupConditionalStyle; import org.eclipse.eef.EEFGroupDescription; +import org.eclipse.eef.EEFGroupStyle; +import org.eclipse.eef.EEF_TITLE_BAR_STYLE; +import org.eclipse.eef.EEF_TOGGLE_STYLE; +import org.eclipse.eef.EefPackage; import org.eclipse.eef.common.ui.api.EEFWidgetFactory; import org.eclipse.eef.common.ui.api.IEEFFormContainer; import org.eclipse.eef.core.api.EditingContextAdapter; @@ -27,8 +32,13 @@ import org.eclipse.eef.core.api.controllers.IEEFGroupController; import org.eclipse.eef.core.api.utils.Eval; import org.eclipse.eef.ide.ui.api.ILifecycleManager; import org.eclipse.eef.ide.ui.api.widgets.AbstractEEFLifecycleManager; +import org.eclipse.eef.ide.ui.internal.widgets.styles.EEFColor; +import org.eclipse.eef.ide.ui.internal.widgets.styles.EEFFont; import org.eclipse.sirius.common.interpreter.api.IInterpreter; import org.eclipse.sirius.common.interpreter.api.IVariableManager; +import org.eclipse.swt.SWT; +import org.eclipse.swt.graphics.Color; +import org.eclipse.swt.graphics.Font; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; @@ -112,7 +122,32 @@ public class EEFGroupLifecycleManager extends AbstractEEFLifecycleManager { Composite groupComposite = widgetFactory.createComposite(parent); groupComposite.setLayout(new GridLayout(1, false)); - this.section = widgetFactory.createSection(groupComposite, Section.TITLE_BAR | Section.TWISTIE | Section.EXPANDED); + EEFGroupStyle styleDescription = this.description.getStyle(); + List<EEFGroupConditionalStyle> conditionalStyles = description.getConditionalStyles(); + if (conditionalStyles != null) { + for (EEFGroupConditionalStyle eefGroupConditionalStyle : conditionalStyles) { + String preconditionExpression = eefGroupConditionalStyle.getPreconditionExpression(); + Boolean preconditionValid = new Eval(interpreter, variableManager).get(preconditionExpression, Boolean.class); + if (preconditionValid != null && preconditionValid.booleanValue()) { + styleDescription = eefGroupConditionalStyle.getStyle(); + break; + } + } + } + + int style = Section.TITLE_BAR | Section.TWISTIE | Section.EXPANDED; + if (styleDescription != null) { + // Get bar style & toggle style from expression + style = getBarStyle(styleDescription.getBarStyle()) | getToggleStyle(styleDescription.getToggleStyle()); + + // Get if the group is expanded by default + boolean isExpandedByDefault = styleDescription.isExpandedByDefault(); + if (isExpandedByDefault) { + style |= Section.EXPANDED; + } + } + + this.section = widgetFactory.createSection(groupComposite, style); this.section.setText(""); //$NON-NLS-1$ String labelExpression = this.description.getLabelExpression(); @@ -132,6 +167,40 @@ public class EEFGroupLifecycleManager extends AbstractEEFLifecycleManager { // Three columns: label, help, widget GridLayout groupLayout = new GridLayout(3, false); group.setLayout(groupLayout); + + if (styleDescription != null) { + // Get background color from expression + Eval eval = new Eval(interpreter, variableManager); + String backgroundValue = eval.get(EefPackage.Literals.EEF_GROUP_STYLE__BACKGROUND_COLOR_EXPRESSION, + styleDescription.getBackgroundColorExpression(), String.class); + if (backgroundValue != null) { + Color backgroundColor = new EEFColor(backgroundValue).getColor(); + this.section.setBackground(backgroundColor); + group.setBackground(backgroundColor); + } + + // Get foreground color from expression + String foregroundValue = eval.get(EefPackage.Literals.EEF_GROUP_STYLE__FOREGROUND_COLOR_EXPRESSION, + styleDescription.getForegroundColorExpression(), String.class); + if (foregroundValue != null) { + Color foregroundColor = new EEFColor(foregroundValue).getColor(); + groupComposite.setForeground(foregroundColor); + this.section.setTitleBarForeground(foregroundColor); + this.section.setToggleColor(foregroundColor); + this.section.setForeground(foregroundColor); + group.setForeground(foregroundColor); + } + + // Get font name and size from expression + String fontName = eval.get(EefPackage.Literals.EEF_GROUP_STYLE__FONT_NAME_EXPRESSION, styleDescription.getFontNameExpression(), + String.class); + Integer fontSize = eval.get(EefPackage.Literals.EEF_GROUP_STYLE__FONT_SIZE_EXPRESSION, styleDescription.getFontSizeExpression(), + Integer.class); + Font font = new EEFFont(fontName, fontSize, SWT.BOLD).getFont(); + this.section.setFont(font); + group.setFont(font); + } + this.section.setClient(group); this.controller = new EEFControllersFactory().createGroupController(this.description, this.variableManager, this.interpreter); @@ -146,6 +215,52 @@ public class EEFGroupLifecycleManager extends AbstractEEFLifecycleManager { } /** + * Get the bar style. + * + * @param barStyleEnum + * Bar style + * @return Section bar style + */ + private int getBarStyle(EEF_TITLE_BAR_STYLE barStyleEnum) { + int barStyle = SWT.NONE; + switch (barStyleEnum) { + case SHORT_TITLE_BAR: + barStyle = Section.SHORT_TITLE_BAR; + break; + case NO_TITLE: + barStyle = Section.NO_TITLE; + break; + default: + barStyle = Section.TITLE_BAR; + break; + } + return barStyle; + } + + /** + * Get the toggle style. + * + * @param toggleStyleEnum + * Toggle style + * @return The section toggle style + */ + private int getToggleStyle(EEF_TOGGLE_STYLE toggleStyleEnum) { + int toggleStyle = Section.TWISTIE; + switch (toggleStyleEnum) { + case TREE_NODE: + toggleStyle = Section.TREE_NODE; + break; + case NONE: + toggleStyle = SWT.NONE; + break; + default: + toggleStyle = Section.TWISTIE; + break; + } + return toggleStyle; + } + + /** * {@inheritDoc} * * @see org.eclipse.eef.ide.ui.api.widgets.AbstractEEFLifecycleManager#getController() diff --git a/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFReferenceLifecycleManager.java b/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFReferenceLifecycleManager.java index 5d935f597..de11a9ee7 100644 --- a/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFReferenceLifecycleManager.java +++ b/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFReferenceLifecycleManager.java @@ -46,6 +46,7 @@ import org.eclipse.swt.SWT; import org.eclipse.swt.custom.ScrolledComposite; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.graphics.Color; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.layout.RowLayout; @@ -129,6 +130,11 @@ public class EEFReferenceLifecycleManager extends AbstractEEFWidgetLifecycleMana private EEFWidgetFactory widgetFactory; /** + * The default background color of the text field. + */ + private Color defaultBackgroundColor; + + /** * The constructor. * * @param description @@ -155,6 +161,8 @@ public class EEFReferenceLifecycleManager extends AbstractEEFWidgetLifecycleMana @Override protected void createMainControl(Composite parent, IEEFFormContainer formContainer) { widgetFactory = formContainer.getWidgetFactory(); + defaultBackgroundColor = parent.getBackground(); + this.reference = widgetFactory.createFlatFormComposite(parent); GridLayout layout = new GridLayout(2, false); reference.setLayout(layout); // this is the parent composite @@ -230,9 +238,8 @@ public class EEFReferenceLifecycleManager extends AbstractEEFWidgetLifecycleMana scrolledComposite.setLayoutData(gridData); final int clientWidth = scrolledComposite.getClientArea().width; - - this.tableViewer = new TableViewer(scrolledComposite, SWT.READ_ONLY | SWT.V_SCROLL | SWT.FULL_SELECTION | SWT.BORDER | SWT.MULTI); - this.table = tableViewer.getTable(); + this.table = widgetFactory.createTable(scrolledComposite, SWT.READ_ONLY | SWT.V_SCROLL | SWT.FULL_SELECTION | SWT.BORDER | SWT.MULTI); + this.tableViewer = new TableViewer(this.table); this.table.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false, 1, 1)); this.tableViewer.setContentProvider(ArrayContentProvider.getInstance()); this.tableViewer.setLabelProvider(new EEFTableReferencesLabelProvider()); @@ -519,22 +526,28 @@ public class EEFReferenceLifecycleManager extends AbstractEEFWidgetLifecycleMana @Override public void refresh() { super.refresh(); - if (this.hyperlink != null) { + if (this.text != null) { + this.text.setEnabled(isEnabled()); + this.text.setBackground(getBackgroundColor()); + } else if (this.hyperlink != null) { this.hyperlink.setEnabled(isEnabled()); + this.hyperlink.setBackground(getBackgroundColor()); } else if (this.table != null) { this.table.setEnabled(isEnabled()); - if (!isEnabled()) { - this.table.setBackground(widgetFactory.getColors().getInactiveBackground()); - } else { - this.table.setBackground(widgetFactory.getColors().getBackground()); - } - } else { - this.text.setEnabled(isEnabled()); - if (!isEnabled()) { - this.text.setBackground(widgetFactory.getColors().getInactiveBackground()); - } else { - this.text.setBackground(widgetFactory.getColors().getBackground()); - } + this.table.setBackground(getBackgroundColor()); + } + } + + /** + * Get the background color according to the current valid style. + * + * @return The background color to use in the text field. + */ + private Color getBackgroundColor() { + Color color = defaultBackgroundColor; + if (!isEnabled()) { + color = widgetFactory.getColors().getInactiveBackground(); } + return color; } } diff --git a/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFTextLifecycleManager.java b/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFTextLifecycleManager.java index 807d9c772..950b358c1 100644 --- a/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFTextLifecycleManager.java +++ b/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFTextLifecycleManager.java @@ -30,12 +30,14 @@ import org.eclipse.eef.core.api.controllers.IEEFTextController; import org.eclipse.eef.core.api.controllers.IEEFWidgetController; import org.eclipse.eef.core.api.utils.Eval; import org.eclipse.eef.ide.ui.api.widgets.AbstractEEFWidgetLifecycleManager; +import org.eclipse.eef.ide.ui.internal.widgets.styles.EEFColor; import org.eclipse.sirius.common.interpreter.api.IInterpreter; import org.eclipse.sirius.common.interpreter.api.IVariableManager; import org.eclipse.swt.SWT; import org.eclipse.swt.custom.StyledText; import org.eclipse.swt.events.ModifyEvent; import org.eclipse.swt.events.ModifyListener; +import org.eclipse.swt.graphics.Color; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; @@ -74,6 +76,11 @@ public class EEFTextLifecycleManager extends AbstractEEFWidgetLifecycleManager { private EEFWidgetFactory widgetFactory; /** + * The default background color of the text field. + */ + private Color defaultBackgroundColor; + + /** * The constructor. * * @param description @@ -100,6 +107,7 @@ public class EEFTextLifecycleManager extends AbstractEEFWidgetLifecycleManager { @Override protected void createMainControl(Composite parent, IEEFFormContainer formContainer) { widgetFactory = formContainer.getWidgetFactory(); + defaultBackgroundColor = parent.getBackground(); // Get text area line count int lineCount = description.getLineCount(); @@ -217,6 +225,15 @@ public class EEFTextLifecycleManager extends AbstractEEFWidgetLifecycleManager { * Set the style. */ private void setStyle() { + setTextStyle(getTextStyle(), text); + } + + /** + * Get the text style. + * + * @return The text style to apply on the widget + */ + private EEFTextStyle getTextStyle() { EEFTextStyle textStyle = description.getStyle(); List<EEFTextConditionalStyle> conditionalStyles = description.getConditionalStyles(); if (conditionalStyles != null) { @@ -229,7 +246,7 @@ public class EEFTextLifecycleManager extends AbstractEEFWidgetLifecycleManager { } } } - setTextStyle(textStyle, text); + return textStyle; } /** @@ -266,10 +283,26 @@ public class EEFTextLifecycleManager extends AbstractEEFWidgetLifecycleManager { public void refresh() { super.refresh(); this.text.setEnabled(isEnabled()); + this.text.setBackground(getBackgroundColor()); + } + + /** + * Get the background color according to the current valid style. + * + * @return The background color to use in the text field. + */ + private Color getBackgroundColor() { + Color color = defaultBackgroundColor; + EEFTextStyle style = getTextStyle(); if (!isEnabled()) { - this.text.setBackground(widgetFactory.getColors().getInactiveBackground()); - } else { - this.text.setBackground(widgetFactory.getColors().getBackground()); + color = widgetFactory.getColors().getInactiveBackground(); + } else if (style != null) { + String backgroundColorCode = style.getBackgroundColorExpression(); + if (backgroundColorCode != null && !backgroundColorCode.isEmpty()) { + EEFColor backgroundColor = new EEFColor(backgroundColorCode); + color = backgroundColor.getColor(); + } } + return color; } } diff --git a/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/RadioGroup.java b/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/RadioGroup.java index b95480221..c0dab96de 100644 --- a/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/RadioGroup.java +++ b/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/RadioGroup.java @@ -55,6 +55,8 @@ public class RadioGroup extends Composite { public RadioGroup(Composite parent, EEFWidgetFactory widgetFactory, int numberOfColumns) { super(parent, SWT.RADIO); this.widgetFactory = widgetFactory; + setBackground(parent.getBackground()); + setForeground(parent.getForeground()); if (numberOfColumns <= 0) { this.setLayout(new RowLayout(SWT.HORIZONTAL)); @@ -106,6 +108,8 @@ public class RadioGroup extends Composite { public void add(String string, int index) { if (buttons.get(index) == null) { Button button = widgetFactory.createButton(this, string, SWT.RADIO); + button.setBackground(this.getBackground()); + button.setForeground(this.getForeground()); buttons.put(index, button); } } diff --git a/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/styles/EEFColor.java b/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/styles/EEFColor.java index 702d79ab6..90d170145 100644 --- a/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/styles/EEFColor.java +++ b/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/styles/EEFColor.java @@ -60,6 +60,25 @@ public class EEFColor { } /** + * Constructor. + * + * @param color + * Color + */ + public EEFColor(Color color) { + this.color = color; + } + + /** + * Get the color as an rgb string. + * + * @return RGB string as rgb(0,0,0) + */ + public String colorToString() { + return "rgb(" + color.getRed() + "," + color.getGreen() + "," + color.getBlue() + ")"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + } + + /** * Convert an hex color code to a color. * * @param colorCode diff --git a/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/styles/EEFFont.java b/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/styles/EEFFont.java index 3d0f8de79..e281ad9cd 100644 --- a/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/styles/EEFFont.java +++ b/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/styles/EEFFont.java @@ -56,11 +56,21 @@ public class EEFFont { * @return The font */ private Font getFont(String name, int height, int style) { - String key = getFontKey(name, height, style); + FontData defaultFontData = JFaceResources.getFontRegistry().defaultFont().getFontData()[0]; + String fontName = name; + if (fontName == null) { + fontName = defaultFontData.getName(); + } + int fontHeight = height; + if (fontHeight == 0) { + fontHeight = defaultFontData.getHeight(); + } + + String key = getFontKey(fontName, fontHeight, style); if (JFaceResources.getFontRegistry().hasValueFor(key)) { return JFaceResources.getFontRegistry().get(key); } else { - JFaceResources.getFontRegistry().put(key, new FontData[] { new FontData(name, height, style) }); + JFaceResources.getFontRegistry().put(key, new FontData[] { new FontData(fontName, fontHeight, style) }); return getFont(key); } } diff --git a/plugins/org.eclipse.eef.properties.ui/src/org/eclipse/eef/properties/ui/api/EEFTabbedPropertySheetPage.java b/plugins/org.eclipse.eef.properties.ui/src/org/eclipse/eef/properties/ui/api/EEFTabbedPropertySheetPage.java index d6ce7b0b3..521bf1b01 100644 --- a/plugins/org.eclipse.eef.properties.ui/src/org/eclipse/eef/properties/ui/api/EEFTabbedPropertySheetPage.java +++ b/plugins/org.eclipse.eef.properties.ui/src/org/eclipse/eef/properties/ui/api/EEFTabbedPropertySheetPage.java @@ -612,6 +612,8 @@ public class EEFTabbedPropertySheetPage extends Page implements IPropertySheetPa Composite result = this.widgetFactory.createComposite(tabbedPropertyComposite.getTabComposite(), SWT.NO_FOCUS); result.setVisible(false); result.setLayout(new FillLayout()); + result.setBackground(this.widgetFactory.getColors().getBackground()); + result.setForeground(this.widgetFactory.getColors().getForeground()); FormData data = new FormData(); data.top = new FormAttachment(0, 0); data.bottom = new FormAttachment(100, 0); diff --git a/plugins/org.eclipse.eef/model/eef.ecore b/plugins/org.eclipse.eef/model/eef.ecore index 11d9cce6b..f6dea7aec 100644 --- a/plugins/org.eclipse.eef/model/eef.ecore +++ b/plugins/org.eclipse.eef/model/eef.ecore @@ -203,6 +203,18 @@ <details key="documentation" value="The validation rules used to validate widgets of the group."/> </eAnnotations> </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EReference" name="style" eType="#//EEFGroupStyle" + containment="true"> + <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> + <details key="documentation" value="Defines the group style"/> + </eAnnotations> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EReference" name="conditionalStyles" upperBound="-1" + eType="#//EEFGroupConditionalStyle" containment="true"> + <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> + <details key="documentation" value="Defines the text style associated to a precondition"/> + </eAnnotations> + </eStructuralFeatures> </eClassifiers> <eClassifiers xsi:type="ecore:EClass" name="EEFControlDescription" abstract="true"> <eStructuralFeatures xsi:type="ecore:EAttribute" name="identifier" lowerBound="1" @@ -766,6 +778,33 @@ <details key="documentation" value="Represents a style that can be applied on reference widgets."/> </eAnnotations> </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="EEFGroupStyle"> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="backgroundColorExpression" + eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"> + <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> + <details key="documentation" value="Defines the background color of the group. It must be defined as hex (#000000) or RGB (rgb(0,0,0))."/> + </eAnnotations> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="foregroundColorExpression" + eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"> + <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> + <details key="documentation" value="Defines the foreground color of the group. It must be defined as hex (#000000) or RGB (rgb(0,0,0))."/> + </eAnnotations> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="fontNameExpression" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"> + <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> + <details key="documentation" value="Defines the font's name of the group."/> + </eAnnotations> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="fontSizeExpression" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"> + <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> + <details key="documentation" value="Defines the font's size of the group."/> + </eAnnotations> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="barStyle" eType="#//EEF_TITLE_BAR_STYLE"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="toggleStyle" eType="#//EEF_TOGGLE_STYLE"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="expandedByDefault" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/> + </eClassifiers> <eClassifiers xsi:type="ecore:EClass" name="EEFConditionalStyle" abstract="true"> <eStructuralFeatures xsi:type="ecore:EAttribute" name="preconditionExpression" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> @@ -845,4 +884,21 @@ <eStructuralFeatures xsi:type="ecore:EReference" name="style" eType="#//EEFReferenceStyle" containment="true"/> </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="EEFGroupConditionalStyle" eSuperTypes="#//EEFConditionalStyle"> + <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> + <details key="documentation" value="Represents a conditional style that can be applied on groups."/> + </eAnnotations> + <eStructuralFeatures xsi:type="ecore:EReference" name="style" eType="#//EEFGroupStyle" + containment="true"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EEnum" name="EEF_TOGGLE_STYLE"> + <eLiterals name="TWISTIE"/> + <eLiterals name="TREE_NODE" value="1"/> + <eLiterals name="NONE" value="2"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EEnum" name="EEF_TITLE_BAR_STYLE"> + <eLiterals name="TITLE_BAR"/> + <eLiterals name="SHORT_TITLE_BAR" value="1"/> + <eLiterals name="NO_TITLE" value="2"/> + </eClassifiers> </ecore:EPackage> diff --git a/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/EEFGroupConditionalStyle.java b/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/EEFGroupConditionalStyle.java new file mode 100644 index 000000000..102561bb8 --- /dev/null +++ b/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/EEFGroupConditionalStyle.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) 2015 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.htm + * Contributors: Obeo - initial API and implementation + */ +package org.eclipse.eef; + +/** + * <!-- begin-user-doc --> A representation of the model object '<em><b>EEF Group Conditional Style</b></em>'. <!-- + * end-user-doc --> + * + * <!-- begin-model-doc --> Represents a conditional style that can be applied on groups. <!-- end-model-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.eclipse.eef.EEFGroupConditionalStyle#getStyle <em>Style</em>}</li> + * </ul> + * </p> + * + * @see org.eclipse.eef.EefPackage#getEEFGroupConditionalStyle() + * @model + * @generated + */ +public interface EEFGroupConditionalStyle extends EEFConditionalStyle { + /** + * 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(EEFGroupStyle) + * @see org.eclipse.eef.EefPackage#getEEFGroupConditionalStyle_Style() + * @model containment="true" resolveProxies="true" + * @generated + */ + EEFGroupStyle getStyle(); + + /** + * Sets the value of the '{@link org.eclipse.eef.EEFGroupConditionalStyle#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(EEFGroupStyle value); + +} // EEFGroupConditionalStyle diff --git a/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/EEFGroupDescription.java b/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/EEFGroupDescription.java index 1b60d7526..e3b3e642e 100644 --- a/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/EEFGroupDescription.java +++ b/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/EEFGroupDescription.java @@ -27,6 +27,8 @@ import org.eclipse.emf.ecore.EObject; * <li>{@link org.eclipse.eef.EEFGroupDescription#getControls <em>Controls</em>}</li> * <li>{@link org.eclipse.eef.EEFGroupDescription#getSemanticValidationRules <em>Semantic Validation Rules</em>}</li> * <li>{@link org.eclipse.eef.EEFGroupDescription#getPropertyValidationRules <em>Property Validation Rules</em>}</li> + * <li>{@link org.eclipse.eef.EEFGroupDescription#getStyle <em>Style</em>}</li> + * <li>{@link org.eclipse.eef.EEFGroupDescription#getConditionalStyles <em>Conditional Styles</em>}</li> * </ul> * </p> * @@ -190,4 +192,39 @@ public interface EEFGroupDescription extends EObject { */ EList<EEFPropertyValidationRuleDescription> getPropertyValidationRules(); + /** + * Returns the value of the '<em><b>Style</b></em>' containment reference. <!-- begin-user-doc --> <!-- end-user-doc + * --> <!-- begin-model-doc --> Defines the group style <!-- end-model-doc --> + * + * @return the value of the '<em>Style</em>' containment reference. + * @see #setStyle(EEFTextStyle) + * @see org.eclipse.eef.EefPackage#getEEFGroupDescription_Style() + * @model containment="true" resolveProxies="true" + * @generated + */ + EEFGroupStyle getStyle(); + + /** + * Sets the value of the '{@link org.eclipse.eef.EEFGroupDescription#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(EEFGroupStyle value); + + /** + * Returns the value of the '<em><b>Conditional Styles</b></em>' containment reference list. The list contents are + * of type {@link org.eclipse.eef.EEFGroupConditionalStyle}. <!-- begin-user-doc --> <!-- end-user-doc --> <!-- + * begin-model-doc --> Defines the text style associated to a precondition <!-- end-model-doc --> + * + * @return the value of the '<em>Conditional Styles</em>' containment reference list. + * @see org.eclipse.eef.EefPackage#getEEFGroupDescription_ConditionalStyles() + * @model containment="true" resolveProxies="true" + * @generated + */ + EList<EEFGroupConditionalStyle> getConditionalStyles(); + } // EEFGroupDescription diff --git a/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/EEFGroupStyle.java b/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/EEFGroupStyle.java new file mode 100644 index 000000000..8bdd410cc --- /dev/null +++ b/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/EEFGroupStyle.java @@ -0,0 +1,215 @@ +/** + * Copyright (c) 2015 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.htm + * Contributors: Obeo - initial API and implementation + */ +package org.eclipse.eef; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> A representation of the model object '<em><b>EEF Group Style</b></em>'. <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.eclipse.eef.EEFGroupStyle#getBackgroundColorExpression <em>Background Color Expression</em>}</li> + * <li>{@link org.eclipse.eef.EEFGroupStyle#getForegroundColorExpression <em>Foreground Color Expression</em>}</li> + * <li>{@link org.eclipse.eef.EEFGroupStyle#getFontNameExpression <em>Font Name Expression</em>}</li> + * <li>{@link org.eclipse.eef.EEFGroupStyle#getFontSizeExpression <em>Font Size Expression</em>}</li> + * <li>{@link org.eclipse.eef.EEFGroupStyle#getBarStyle <em>Bar Style</em>}</li> + * <li>{@link org.eclipse.eef.EEFGroupStyle#getToggleStyle <em>Toggle Style</em>}</li> + * <li>{@link org.eclipse.eef.EEFGroupStyle#isExpandedByDefault <em>Expanded By Default</em>}</li> + * </ul> + * </p> + * + * @see org.eclipse.eef.EefPackage#getEEFGroupStyle() + * @model + * @generated + */ +public interface EEFGroupStyle extends EObject { + /** + * Returns the value of the '<em><b>Background Color Expression</b></em>' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> <!-- begin-model-doc --> Defines the background color of the widget. It must be defined as hex + * (#000000) or RGB (rgb(0,0,0)). <!-- end-model-doc --> + * + * @return the value of the '<em>Background Color Expression</em>' attribute. + * @see #setBackgroundColorExpression(String) + * @see org.eclipse.eef.EefPackage#getEEFGroupStyle_BackgroundColorExpression() + * @model + * @generated + */ + String getBackgroundColorExpression(); + + /** + * Sets the value of the '{@link org.eclipse.eef.EEFGroupStyle#getBackgroundColorExpression + * <em>Background Color Expression</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Background Color Expression</em>' attribute. + * @see #getBackgroundColorExpression() + * @generated + */ + void setBackgroundColorExpression(String value); + + /** + * Returns the value of the '<em><b>Foreground Color Expression</b></em>' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> <!-- begin-model-doc --> Defines the foreground color of the widget. It must be defined as hex + * (#000000) or RGB (rgb(0,0,0)). <!-- end-model-doc --> + * + * @return the value of the '<em>Foreground Color Expression</em>' attribute. + * @see #setForegroundColorExpression(String) + * @see org.eclipse.eef.EefPackage#getEEFGroupStyle_ForegroundColorExpression() + * @model + * @generated + */ + String getForegroundColorExpression(); + + /** + * Sets the value of the '{@link org.eclipse.eef.EEFGroupStyle#getForegroundColorExpression + * <em>Foreground Color Expression</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Foreground Color Expression</em>' attribute. + * @see #getForegroundColorExpression() + * @generated + */ + void setForegroundColorExpression(String value); + + /** + * Returns the value of the '<em><b>Font Name Expression</b></em>' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> <!-- begin-model-doc --> Defines the font's name of the widget. <!-- end-model-doc --> + * + * @return the value of the '<em>Font Name Expression</em>' attribute. + * @see #setFontNameExpression(String) + * @see org.eclipse.eef.EefPackage#getEEFGroupStyle_FontNameExpression() + * @model + * @generated + */ + String getFontNameExpression(); + + /** + * Sets the value of the '{@link org.eclipse.eef.EEFGroupStyle#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 Expression</b></em>' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> <!-- begin-model-doc --> Defines the font's size of the widget. <!-- end-model-doc --> + * + * @return the value of the '<em>Font Size Expression</em>' attribute. + * @see #setFontSizeExpression(String) + * @see org.eclipse.eef.EefPackage#getEEFGroupStyle_FontSizeExpression() + * @model + * @generated + */ + String getFontSizeExpression(); + + /** + * Sets the value of the '{@link org.eclipse.eef.EEFGroupStyle#getFontSizeExpression <em>Font Size Expression</em>}' + * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Font Size Expression</em>' attribute. + * @see #getFontSizeExpression() + * @generated + */ + void setFontSizeExpression(String value); + + /** + * Returns the value of the '<em><b>Bar Style</b></em>' attribute. The literals are from the enumeration + * {@link org.eclipse.eef.EEF_TITLE_BAR_STYLE}. <!-- 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.eef.EEF_TITLE_BAR_STYLE + * @see #setBarStyle(EEF_TITLE_BAR_STYLE) + * @see org.eclipse.eef.EefPackage#getEEFGroupStyle_BarStyle() + * @model + * @generated + */ + EEF_TITLE_BAR_STYLE getBarStyle(); + + /** + * Sets the value of the '{@link org.eclipse.eef.EEFGroupStyle#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.eef.EEF_TITLE_BAR_STYLE + * @see #getBarStyle() + * @generated + */ + void setBarStyle(EEF_TITLE_BAR_STYLE value); + + /** + * Returns the value of the '<em><b>Toggle Style</b></em>' attribute. The literals are from the enumeration + * {@link org.eclipse.eef.EEF_TOGGLE_STYLE}. <!-- 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.eef.EEF_TOGGLE_STYLE + * @see #setToggleStyle(EEF_TOGGLE_STYLE) + * @see org.eclipse.eef.EefPackage#getEEFGroupStyle_ToggleStyle() + * @model + * @generated + */ + EEF_TOGGLE_STYLE getToggleStyle(); + + /** + * Sets the value of the '{@link org.eclipse.eef.EEFGroupStyle#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.eef.EEF_TOGGLE_STYLE + * @see #getToggleStyle() + * @generated + */ + void setToggleStyle(EEF_TOGGLE_STYLE 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.eef.EefPackage#getEEFGroupStyle_ExpandedByDefault() + * @model + * @generated + */ + boolean isExpandedByDefault(); + + /** + * Sets the value of the '{@link org.eclipse.eef.EEFGroupStyle#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); + +} // EEFGroupStyle diff --git a/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/EEF_TITLE_BAR_STYLE.java b/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/EEF_TITLE_BAR_STYLE.java new file mode 100644 index 000000000..49db4834b --- /dev/null +++ b/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/EEF_TITLE_BAR_STYLE.java @@ -0,0 +1,235 @@ +/** + * Copyright (c) 2015 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.htm + * Contributors: Obeo - initial API and implementation + */ +package org.eclipse.eef; + +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>EEF TITLE BAR STYLE</b></em>', + * and utility methods for working with them. <!-- end-user-doc --> + * + * @see org.eclipse.eef.EefPackage#getEEF_TITLE_BAR_STYLE() + * @model + * @generated + */ +public enum EEF_TITLE_BAR_STYLE 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"), //$NON-NLS-1$ //$NON-NLS-2$ + + /** + * 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"), //$NON-NLS-1$ //$NON-NLS-2$ + + /** + * 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"); //$NON-NLS-1$ //$NON-NLS-2$ + + /** + * 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>EEF TITLE BAR STYLE</b></em>' enumerators. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + */ + private static final EEF_TITLE_BAR_STYLE[] VALUES_ARRAY = new EEF_TITLE_BAR_STYLE[] { TITLE_BAR, SHORT_TITLE_BAR, NO_TITLE, }; + + /** + * A public read-only list of all the '<em><b>EEF TITLE BAR STYLE</b></em>' enumerators. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public static final List<EEF_TITLE_BAR_STYLE> VALUES = Collections.unmodifiableList(Arrays.asList(EEF_TITLE_BAR_STYLE.VALUES_ARRAY)); + + /** + * Returns the '<em><b>EEF TITLE BAR STYLE</b></em>' literal with the specified literal value. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + public static EEF_TITLE_BAR_STYLE get(String literal) { + for (EEF_TITLE_BAR_STYLE result : EEF_TITLE_BAR_STYLE.VALUES_ARRAY) { + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } + + /** + * Returns the '<em><b>EEF TITLE BAR STYLE</b></em>' literal with the specified name. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + public static EEF_TITLE_BAR_STYLE getByName(String name) { + for (EEF_TITLE_BAR_STYLE result : EEF_TITLE_BAR_STYLE.VALUES_ARRAY) { + if (result.getName().equals(name)) { + return result; + } + } + return null; + } + + /** + * Returns the '<em><b>EEF TITLE BAR STYLE</b></em>' literal with the specified integer value. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + public static EEF_TITLE_BAR_STYLE 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 EEF_TITLE_BAR_STYLE(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; + } + +} // EEF_TITLE_BAR_STYLE diff --git a/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/EEF_TOGGLE_STYLE.java b/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/EEF_TOGGLE_STYLE.java new file mode 100644 index 000000000..65f63a5d9 --- /dev/null +++ b/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/EEF_TOGGLE_STYLE.java @@ -0,0 +1,234 @@ +/** + * Copyright (c) 2015 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.htm + * Contributors: Obeo - initial API and implementation + */ +package org.eclipse.eef; + +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>EEF TOGGLE STYLE</b></em>', and + * utility methods for working with them. <!-- end-user-doc --> + * + * @see org.eclipse.eef.EefPackage#getEEF_TOGGLE_STYLE() + * @model + * @generated + */ +public enum EEF_TOGGLE_STYLE 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"), //$NON-NLS-1$ //$NON-NLS-2$ + + /** + * 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"), //$NON-NLS-1$ //$NON-NLS-2$ + + /** + * The '<em><b>NONE</b></em>' literal object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see #NONE_VALUE + * @generated + * @ordered + */ + NONE(2, "NONE", "NONE"); //$NON-NLS-1$ //$NON-NLS-2$ + + /** + * 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>EEF TOGGLE STYLE</b></em>' enumerators. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private static final EEF_TOGGLE_STYLE[] VALUES_ARRAY = new EEF_TOGGLE_STYLE[] { TWISTIE, TREE_NODE, NONE, }; + + /** + * A public read-only list of all the '<em><b>EEF TOGGLE STYLE</b></em>' enumerators. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + public static final List<EEF_TOGGLE_STYLE> VALUES = Collections.unmodifiableList(Arrays.asList(EEF_TOGGLE_STYLE.VALUES_ARRAY)); + + /** + * Returns the '<em><b>EEF TOGGLE STYLE</b></em>' literal with the specified literal value. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public static EEF_TOGGLE_STYLE get(String literal) { + for (EEF_TOGGLE_STYLE result : EEF_TOGGLE_STYLE.VALUES_ARRAY) { + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } + + /** + * Returns the '<em><b>EEF TOGGLE STYLE</b></em>' literal with the specified name. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + public static EEF_TOGGLE_STYLE getByName(String name) { + for (EEF_TOGGLE_STYLE result : EEF_TOGGLE_STYLE.VALUES_ARRAY) { + if (result.getName().equals(name)) { + return result; + } + } + return null; + } + + /** + * Returns the '<em><b>EEF TOGGLE STYLE</b></em>' literal with the specified integer value. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public static EEF_TOGGLE_STYLE 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 EEF_TOGGLE_STYLE(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; + } + +} // EEF_TOGGLE_STYLE diff --git a/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/EefFactory.java b/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/EefFactory.java index 6b3ef3c43..b7c3a7a33 100644 --- a/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/EefFactory.java +++ b/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/EefFactory.java @@ -273,6 +273,22 @@ public interface EefFactory extends EFactory { EEFCustomWidgetStyle createEEFCustomWidgetStyle(); /** + * Returns a new object of class '<em>EEF Reference Style</em>'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return a new object of class '<em>EEF Reference Style</em>'. + * @generated + */ + EEFReferenceStyle createEEFReferenceStyle(); + + /** + * Returns a new object of class '<em>EEF Group Style</em>'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return a new object of class '<em>EEF Group Style</em>'. + * @generated + */ + EEFGroupStyle createEEFGroupStyle(); + + /** * Returns a new object of class '<em>EEF Text Conditional Style</em>'. <!-- begin-user-doc --> <!-- end-user-doc * --> * @@ -362,12 +378,13 @@ public interface EefFactory extends EFactory { EEFReferenceConditionalStyle createEEFReferenceConditionalStyle(); /** - * Returns a new object of class '<em>EEF Reference Style</em>'. <!-- begin-user-doc --> <!-- end-user-doc --> + * Returns a new object of class '<em>EEF Group Conditional Style</em>'. <!-- begin-user-doc --> <!-- end-user-doc + * --> * - * @return a new object of class '<em>EEF Reference Style</em>'. + * @return a new object of class '<em>EEF Group Conditional Style</em>'. * @generated */ - EEFReferenceStyle createEEFReferenceStyle(); + EEFGroupConditionalStyle createEEFGroupConditionalStyle(); /** * Returns the package supported by this factory. <!-- begin-user-doc --> <!-- end-user-doc --> diff --git a/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/EefPackage.java b/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/EefPackage.java index 058e705b8..aaab7f3f5 100644 --- a/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/EefPackage.java +++ b/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/EefPackage.java @@ -529,13 +529,31 @@ public interface EefPackage extends EPackage { int EEF_GROUP_DESCRIPTION__PROPERTY_VALIDATION_RULES = 7; /** + * The feature id for the '<em><b>Style</b></em>' containment reference. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + * @ordered + */ + int EEF_GROUP_DESCRIPTION__STYLE = 8; + + /** + * The feature id for the '<em><b>Conditional Styles</b></em>' containment reference list. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int EEF_GROUP_DESCRIPTION__CONDITIONAL_STYLES = 9; + + /** * The number of structural features of the '<em>EEF Group Description</em>' class. <!-- begin-user-doc --> <!-- * end-user-doc --> * * @generated * @ordered */ - int EEF_GROUP_DESCRIPTION_FEATURE_COUNT = 8; + int EEF_GROUP_DESCRIPTION_FEATURE_COUNT = 10; /** * The meta object id for the '{@link org.eclipse.eef.impl.EEFControlDescriptionImpl @@ -2593,6 +2611,86 @@ public interface EefPackage extends EPackage { int EEF_REFERENCE_STYLE_FEATURE_COUNT = EefPackage.EEF_WIDGET_STYLE_FEATURE_COUNT + 0; /** + * The meta object id for the '{@link org.eclipse.eef.impl.EEFGroupStyleImpl <em>EEF Group Style</em>}' class. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.eef.impl.EEFGroupStyleImpl + * @see org.eclipse.eef.impl.EefPackageImpl#getEEFGroupStyle() + * @generated + */ + int EEF_GROUP_STYLE = 36; + + /** + * The feature id for the '<em><b>Background Color Expression</b></em>' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + * @ordered + */ + int EEF_GROUP_STYLE__BACKGROUND_COLOR_EXPRESSION = 0; + + /** + * The feature id for the '<em><b>Foreground Color Expression</b></em>' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + * @ordered + */ + int EEF_GROUP_STYLE__FOREGROUND_COLOR_EXPRESSION = 1; + + /** + * The feature id for the '<em><b>Font Name Expression</b></em>' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + * @ordered + */ + int EEF_GROUP_STYLE__FONT_NAME_EXPRESSION = 2; + + /** + * The feature id for the '<em><b>Font Size Expression</b></em>' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + * @ordered + */ + int EEF_GROUP_STYLE__FONT_SIZE_EXPRESSION = 3; + + /** + * The feature id for the '<em><b>Bar Style</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int EEF_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 EEF_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 EEF_GROUP_STYLE__EXPANDED_BY_DEFAULT = 6; + + /** + * The number of structural features of the '<em>EEF Group Style</em>' class. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + * @ordered + */ + int EEF_GROUP_STYLE_FEATURE_COUNT = 7; + + /** * The meta object id for the '{@link org.eclipse.eef.impl.EEFConditionalStyleImpl <em>EEF Conditional Style</em>}' * class. <!-- begin-user-doc --> <!-- end-user-doc --> * @@ -2600,7 +2698,7 @@ public interface EefPackage extends EPackage { * @see org.eclipse.eef.impl.EefPackageImpl#getEEFConditionalStyle() * @generated */ - int EEF_CONDITIONAL_STYLE = 36; + int EEF_CONDITIONAL_STYLE = 37; /** * The feature id for the '<em><b>Precondition Expression</b></em>' attribute. <!-- begin-user-doc --> <!-- @@ -2628,7 +2726,7 @@ public interface EefPackage extends EPackage { * @see org.eclipse.eef.impl.EefPackageImpl#getEEFTextConditionalStyle() * @generated */ - int EEF_TEXT_CONDITIONAL_STYLE = 37; + int EEF_TEXT_CONDITIONAL_STYLE = 38; /** * The feature id for the '<em><b>Precondition Expression</b></em>' attribute. <!-- begin-user-doc --> <!-- @@ -2665,7 +2763,7 @@ public interface EefPackage extends EPackage { * @see org.eclipse.eef.impl.EefPackageImpl#getEEFButtonConditionalStyle() * @generated */ - int EEF_BUTTON_CONDITIONAL_STYLE = 38; + int EEF_BUTTON_CONDITIONAL_STYLE = 39; /** * The feature id for the '<em><b>Precondition Expression</b></em>' attribute. <!-- begin-user-doc --> <!-- @@ -2702,7 +2800,7 @@ public interface EefPackage extends EPackage { * @see org.eclipse.eef.impl.EefPackageImpl#getEEFLabelConditionalStyle() * @generated */ - int EEF_LABEL_CONDITIONAL_STYLE = 39; + int EEF_LABEL_CONDITIONAL_STYLE = 40; /** * The feature id for the '<em><b>Precondition Expression</b></em>' attribute. <!-- begin-user-doc --> <!-- @@ -2739,7 +2837,7 @@ public interface EefPackage extends EPackage { * @see org.eclipse.eef.impl.EefPackageImpl#getEEFCheckboxConditionalStyle() * @generated */ - int EEF_CHECKBOX_CONDITIONAL_STYLE = 40; + int EEF_CHECKBOX_CONDITIONAL_STYLE = 41; /** * The feature id for the '<em><b>Precondition Expression</b></em>' attribute. <!-- begin-user-doc --> <!-- @@ -2776,7 +2874,7 @@ public interface EefPackage extends EPackage { * @see org.eclipse.eef.impl.EefPackageImpl#getEEFSelectConditionalStyle() * @generated */ - int EEF_SELECT_CONDITIONAL_STYLE = 41; + int EEF_SELECT_CONDITIONAL_STYLE = 42; /** * The feature id for the '<em><b>Precondition Expression</b></em>' attribute. <!-- begin-user-doc --> <!-- @@ -2813,7 +2911,7 @@ public interface EefPackage extends EPackage { * @see org.eclipse.eef.impl.EefPackageImpl#getEEFRadioConditionalStyle() * @generated */ - int EEF_RADIO_CONDITIONAL_STYLE = 42; + int EEF_RADIO_CONDITIONAL_STYLE = 43; /** * The feature id for the '<em><b>Precondition Expression</b></em>' attribute. <!-- begin-user-doc --> <!-- @@ -2850,7 +2948,7 @@ public interface EefPackage extends EPackage { * @see org.eclipse.eef.impl.EefPackageImpl#getEEFHyperlinkConditionalStyle() * @generated */ - int EEF_HYPERLINK_CONDITIONAL_STYLE = 43; + int EEF_HYPERLINK_CONDITIONAL_STYLE = 44; /** * The feature id for the '<em><b>Precondition Expression</b></em>' attribute. <!-- begin-user-doc --> <!-- @@ -2887,7 +2985,7 @@ public interface EefPackage extends EPackage { * @see org.eclipse.eef.impl.EefPackageImpl#getEEFCustomWidgetConditionalStyle() * @generated */ - int EEF_CUSTOM_WIDGET_CONDITIONAL_STYLE = 44; + int EEF_CUSTOM_WIDGET_CONDITIONAL_STYLE = 45; /** * The feature id for the '<em><b>Precondition Expression</b></em>' attribute. <!-- begin-user-doc --> <!-- @@ -2924,7 +3022,7 @@ public interface EefPackage extends EPackage { * @see org.eclipse.eef.impl.EefPackageImpl#getEEFWidgetAction() * @generated */ - int EEF_WIDGET_ACTION = 45; + int EEF_WIDGET_ACTION = 46; /** * The feature id for the '<em><b>Label Expression</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc @@ -2961,7 +3059,7 @@ public interface EefPackage extends EPackage { * @see org.eclipse.eef.impl.EefPackageImpl#getEEFReferenceConditionalStyle() * @generated */ - int EEF_REFERENCE_CONDITIONAL_STYLE = 46; + int EEF_REFERENCE_CONDITIONAL_STYLE = 47; /** * The feature id for the '<em><b>Precondition Expression</b></em>' attribute. <!-- begin-user-doc --> <!-- @@ -2991,6 +3089,43 @@ public interface EefPackage extends EPackage { int EEF_REFERENCE_CONDITIONAL_STYLE_FEATURE_COUNT = EefPackage.EEF_CONDITIONAL_STYLE_FEATURE_COUNT + 1; /** + * The meta object id for the '{@link org.eclipse.eef.impl.EEFGroupConditionalStyleImpl + * <em>EEF Group Conditional Style</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.eef.impl.EEFGroupConditionalStyleImpl + * @see org.eclipse.eef.impl.EefPackageImpl#getEEFGroupConditionalStyle() + * @generated + */ + int EEF_GROUP_CONDITIONAL_STYLE = 48; + + /** + * The feature id for the '<em><b>Precondition Expression</b></em>' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + * @ordered + */ + int EEF_GROUP_CONDITIONAL_STYLE__PRECONDITION_EXPRESSION = EefPackage.EEF_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 EEF_GROUP_CONDITIONAL_STYLE__STYLE = EefPackage.EEF_CONDITIONAL_STYLE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the '<em>EEF Group Conditional Style</em>' class. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int EEF_GROUP_CONDITIONAL_STYLE_FEATURE_COUNT = EefPackage.EEF_CONDITIONAL_STYLE_FEATURE_COUNT + 1; + + /** * The meta object id for the '{@link org.eclipse.eef.EEF_VALIDATION_SEVERITY_DESCRIPTION * <em>EEF VALIDATION SEVERITY DESCRIPTION</em>}' enum. <!-- begin-user-doc --> <!-- end-user-doc --> * @@ -2998,7 +3133,7 @@ public interface EefPackage extends EPackage { * @see org.eclipse.eef.impl.EefPackageImpl#getEEF_VALIDATION_SEVERITY_DESCRIPTION() * @generated */ - int EEF_VALIDATION_SEVERITY_DESCRIPTION = 47; + int EEF_VALIDATION_SEVERITY_DESCRIPTION = 49; /** * The meta object id for the '{@link org.eclipse.eef.EEF_FILL_LAYOUT_ORIENTATION @@ -3008,7 +3143,27 @@ public interface EefPackage extends EPackage { * @see org.eclipse.eef.impl.EefPackageImpl#getEEF_FILL_LAYOUT_ORIENTATION() * @generated */ - int EEF_FILL_LAYOUT_ORIENTATION = 48; + int EEF_FILL_LAYOUT_ORIENTATION = 50; + + /** + * The meta object id for the '{@link org.eclipse.eef.EEF_TOGGLE_STYLE <em>EEF TOGGLE STYLE</em>}' enum. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.eef.EEF_TOGGLE_STYLE + * @see org.eclipse.eef.impl.EefPackageImpl#getEEF_TOGGLE_STYLE() + * @generated + */ + int EEF_TOGGLE_STYLE = 51; + + /** + * The meta object id for the '{@link org.eclipse.eef.EEF_TITLE_BAR_STYLE <em>EEF TITLE BAR STYLE</em>}' enum. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.eef.EEF_TITLE_BAR_STYLE + * @see org.eclipse.eef.impl.EefPackageImpl#getEEF_TITLE_BAR_STYLE() + * @generated + */ + int EEF_TITLE_BAR_STYLE = 52; /** * Returns the meta object for class '{@link org.eclipse.eef.EEFViewDescription <em>EEF View Description</em>}'. @@ -3432,6 +3587,29 @@ public interface EefPackage extends EPackage { EReference getEEFGroupDescription_PropertyValidationRules(); /** + * Returns the meta object for the containment reference '{@link org.eclipse.eef.EEFGroupDescription#getStyle + * <em>Style</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the containment reference '<em>Style</em>'. + * @see org.eclipse.eef.EEFGroupDescription#getStyle() + * @see #getEEFGroupDescription() + * @generated + */ + EReference getEEFGroupDescription_Style(); + + /** + * Returns the meta object for the containment reference list ' + * {@link org.eclipse.eef.EEFGroupDescription#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.eef.EEFGroupDescription#getConditionalStyles() + * @see #getEEFGroupDescription() + * @generated + */ + EReference getEEFGroupDescription_ConditionalStyles(); + + /** * Returns the meta object for class '{@link org.eclipse.eef.EEFControlDescription <em>EEF Control Description</em>} * '. <!-- begin-user-doc --> <!-- end-user-doc --> * @@ -4612,6 +4790,93 @@ public interface EefPackage extends EPackage { EClass getEEFReferenceStyle(); /** + * Returns the meta object for class '{@link org.eclipse.eef.EEFGroupStyle <em>EEF Group Style</em>}'. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for class '<em>EEF Group Style</em>'. + * @see org.eclipse.eef.EEFGroupStyle + * @generated + */ + EClass getEEFGroupStyle(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.eef.EEFGroupStyle#getBackgroundColorExpression + * <em>Background Color Expression</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Background Color Expression</em>'. + * @see org.eclipse.eef.EEFGroupStyle#getBackgroundColorExpression() + * @see #getEEFGroupStyle() + * @generated + */ + EAttribute getEEFGroupStyle_BackgroundColorExpression(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.eef.EEFGroupStyle#getForegroundColorExpression + * <em>Foreground Color Expression</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Foreground Color Expression</em>'. + * @see org.eclipse.eef.EEFGroupStyle#getForegroundColorExpression() + * @see #getEEFGroupStyle() + * @generated + */ + EAttribute getEEFGroupStyle_ForegroundColorExpression(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.eef.EEFGroupStyle#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.eef.EEFGroupStyle#getFontNameExpression() + * @see #getEEFGroupStyle() + * @generated + */ + EAttribute getEEFGroupStyle_FontNameExpression(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.eef.EEFGroupStyle#getFontSizeExpression + * <em>Font Size Expression</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Font Size Expression</em>'. + * @see org.eclipse.eef.EEFGroupStyle#getFontSizeExpression() + * @see #getEEFGroupStyle() + * @generated + */ + EAttribute getEEFGroupStyle_FontSizeExpression(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.eef.EEFGroupStyle#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.eef.EEFGroupStyle#getBarStyle() + * @see #getEEFGroupStyle() + * @generated + */ + EAttribute getEEFGroupStyle_BarStyle(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.eef.EEFGroupStyle#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.eef.EEFGroupStyle#getToggleStyle() + * @see #getEEFGroupStyle() + * @generated + */ + EAttribute getEEFGroupStyle_ToggleStyle(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.eef.EEFGroupStyle#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.eef.EEFGroupStyle#isExpandedByDefault() + * @see #getEEFGroupStyle() + * @generated + */ + EAttribute getEEFGroupStyle_ExpandedByDefault(); + + /** * Returns the meta object for class '{@link org.eclipse.eef.EEFConditionalStyle <em>EEF Conditional Style</em>}'. * <!-- begin-user-doc --> <!-- end-user-doc --> * @@ -4858,6 +5123,27 @@ public interface EefPackage extends EPackage { EReference getEEFReferenceConditionalStyle_Style(); /** + * Returns the meta object for class '{@link org.eclipse.eef.EEFGroupConditionalStyle + * <em>EEF Group Conditional Style</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for class '<em>EEF Group Conditional Style</em>'. + * @see org.eclipse.eef.EEFGroupConditionalStyle + * @generated + */ + EClass getEEFGroupConditionalStyle(); + + /** + * Returns the meta object for the containment reference '{@link org.eclipse.eef.EEFGroupConditionalStyle#getStyle + * <em>Style</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the containment reference '<em>Style</em>'. + * @see org.eclipse.eef.EEFGroupConditionalStyle#getStyle() + * @see #getEEFGroupConditionalStyle() + * @generated + */ + EReference getEEFGroupConditionalStyle_Style(); + + /** * Returns the meta object for enum '{@link org.eclipse.eef.EEF_VALIDATION_SEVERITY_DESCRIPTION * <em>EEF VALIDATION SEVERITY DESCRIPTION</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> * @@ -4878,6 +5164,26 @@ public interface EefPackage extends EPackage { EEnum getEEF_FILL_LAYOUT_ORIENTATION(); /** + * Returns the meta object for enum '{@link org.eclipse.eef.EEF_TOGGLE_STYLE <em>EEF TOGGLE STYLE</em>}'. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for enum '<em>EEF TOGGLE STYLE</em>'. + * @see org.eclipse.eef.EEF_TOGGLE_STYLE + * @generated + */ + EEnum getEEF_TOGGLE_STYLE(); + + /** + * Returns the meta object for enum '{@link org.eclipse.eef.EEF_TITLE_BAR_STYLE <em>EEF TITLE BAR STYLE</em>}'. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for enum '<em>EEF TITLE BAR STYLE</em>'. + * @see org.eclipse.eef.EEF_TITLE_BAR_STYLE + * @generated + */ + EEnum getEEF_TITLE_BAR_STYLE(); + + /** * Returns the factory that creates the instances of the model. <!-- begin-user-doc --> <!-- end-user-doc --> * * @return the factory that creates the instances of the model. @@ -5220,6 +5526,22 @@ public interface EefPackage extends EPackage { EReference EEF_GROUP_DESCRIPTION__PROPERTY_VALIDATION_RULES = EefPackage.eINSTANCE.getEEFGroupDescription_PropertyValidationRules(); /** + * The meta object literal for the '<em><b>Style</b></em>' containment reference feature. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + EReference EEF_GROUP_DESCRIPTION__STYLE = EefPackage.eINSTANCE.getEEFGroupDescription_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 EEF_GROUP_DESCRIPTION__CONDITIONAL_STYLES = EefPackage.eINSTANCE.getEEFGroupDescription_ConditionalStyles(); + + /** * The meta object literal for the '{@link org.eclipse.eef.impl.EEFControlDescriptionImpl * <em>EEF Control Description</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc --> * @@ -6141,6 +6463,72 @@ public interface EefPackage extends EPackage { EClass EEF_REFERENCE_STYLE = EefPackage.eINSTANCE.getEEFReferenceStyle(); /** + * The meta object literal for the '{@link org.eclipse.eef.impl.EEFGroupStyleImpl <em>EEF Group Style</em>}' + * class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.eef.impl.EEFGroupStyleImpl + * @see org.eclipse.eef.impl.EefPackageImpl#getEEFGroupStyle() + * @generated + */ + EClass EEF_GROUP_STYLE = EefPackage.eINSTANCE.getEEFGroupStyle(); + + /** + * The meta object literal for the '<em><b>Background Color Expression</b></em>' attribute feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + EAttribute EEF_GROUP_STYLE__BACKGROUND_COLOR_EXPRESSION = EefPackage.eINSTANCE.getEEFGroupStyle_BackgroundColorExpression(); + + /** + * The meta object literal for the '<em><b>Foreground Color Expression</b></em>' attribute feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + EAttribute EEF_GROUP_STYLE__FOREGROUND_COLOR_EXPRESSION = EefPackage.eINSTANCE.getEEFGroupStyle_ForegroundColorExpression(); + + /** + * The meta object literal for the '<em><b>Font Name Expression</b></em>' attribute feature. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + EAttribute EEF_GROUP_STYLE__FONT_NAME_EXPRESSION = EefPackage.eINSTANCE.getEEFGroupStyle_FontNameExpression(); + + /** + * The meta object literal for the '<em><b>Font Size Expression</b></em>' attribute feature. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + EAttribute EEF_GROUP_STYLE__FONT_SIZE_EXPRESSION = EefPackage.eINSTANCE.getEEFGroupStyle_FontSizeExpression(); + + /** + * The meta object literal for the '<em><b>Bar Style</b></em>' attribute feature. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + EAttribute EEF_GROUP_STYLE__BAR_STYLE = EefPackage.eINSTANCE.getEEFGroupStyle_BarStyle(); + + /** + * The meta object literal for the '<em><b>Toggle Style</b></em>' attribute feature. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EAttribute EEF_GROUP_STYLE__TOGGLE_STYLE = EefPackage.eINSTANCE.getEEFGroupStyle_ToggleStyle(); + + /** + * The meta object literal for the '<em><b>Expanded By Default</b></em>' attribute feature. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + EAttribute EEF_GROUP_STYLE__EXPANDED_BY_DEFAULT = EefPackage.eINSTANCE.getEEFGroupStyle_ExpandedByDefault(); + + /** * The meta object literal for the '{@link org.eclipse.eef.impl.EEFConditionalStyleImpl * <em>EEF Conditional Style</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc --> * @@ -6347,6 +6735,24 @@ public interface EefPackage extends EPackage { EReference EEF_REFERENCE_CONDITIONAL_STYLE__STYLE = EefPackage.eINSTANCE.getEEFReferenceConditionalStyle_Style(); /** + * The meta object literal for the '{@link org.eclipse.eef.impl.EEFGroupConditionalStyleImpl + * <em>EEF Group Conditional Style</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.eef.impl.EEFGroupConditionalStyleImpl + * @see org.eclipse.eef.impl.EefPackageImpl#getEEFGroupConditionalStyle() + * @generated + */ + EClass EEF_GROUP_CONDITIONAL_STYLE = EefPackage.eINSTANCE.getEEFGroupConditionalStyle(); + + /** + * The meta object literal for the '<em><b>Style</b></em>' containment reference feature. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + EReference EEF_GROUP_CONDITIONAL_STYLE__STYLE = EefPackage.eINSTANCE.getEEFGroupConditionalStyle_Style(); + + /** * The meta object literal for the '{@link org.eclipse.eef.EEF_VALIDATION_SEVERITY_DESCRIPTION * <em>EEF VALIDATION SEVERITY DESCRIPTION</em>}' enum. <!-- begin-user-doc --> <!-- end-user-doc --> * @@ -6366,6 +6772,26 @@ public interface EefPackage extends EPackage { */ EEnum EEF_FILL_LAYOUT_ORIENTATION = EefPackage.eINSTANCE.getEEF_FILL_LAYOUT_ORIENTATION(); + /** + * The meta object literal for the '{@link org.eclipse.eef.EEF_TOGGLE_STYLE <em>EEF TOGGLE STYLE</em>}' enum. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.eef.EEF_TOGGLE_STYLE + * @see org.eclipse.eef.impl.EefPackageImpl#getEEF_TOGGLE_STYLE() + * @generated + */ + EEnum EEF_TOGGLE_STYLE = EefPackage.eINSTANCE.getEEF_TOGGLE_STYLE(); + + /** + * The meta object literal for the '{@link org.eclipse.eef.EEF_TITLE_BAR_STYLE <em>EEF TITLE BAR STYLE</em>}' + * enum. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.eef.EEF_TITLE_BAR_STYLE + * @see org.eclipse.eef.impl.EefPackageImpl#getEEF_TITLE_BAR_STYLE() + * @generated + */ + EEnum EEF_TITLE_BAR_STYLE = EefPackage.eINSTANCE.getEEF_TITLE_BAR_STYLE(); + } } // EefPackage diff --git a/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/impl/EEFGroupConditionalStyleImpl.java b/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/impl/EEFGroupConditionalStyleImpl.java new file mode 100644 index 000000000..b981508e6 --- /dev/null +++ b/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/impl/EEFGroupConditionalStyleImpl.java @@ -0,0 +1,221 @@ +/** + * Copyright (c) 2015 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.htm + * Contributors: Obeo - initial API and implementation + */ +package org.eclipse.eef.impl; + +import org.eclipse.eef.EEFGroupConditionalStyle; +import org.eclipse.eef.EEFGroupStyle; +import org.eclipse.eef.EefPackage; +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; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>EEF Group Conditional Style</b></em>'. <!-- + * end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.eclipse.eef.impl.EEFGroupConditionalStyleImpl#getStyle <em>Style</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class EEFGroupConditionalStyleImpl extends EEFConditionalStyleImpl implements EEFGroupConditionalStyle { + /** + * The cached value of the '{@link #getStyle() <em>Style</em>}' containment reference. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see #getStyle() + * @generated + * @ordered + */ + protected EEFGroupStyle style; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected EEFGroupConditionalStyleImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return EefPackage.Literals.EEF_GROUP_CONDITIONAL_STYLE; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EEFGroupStyle getStyle() { + if (style != null && style.eIsProxy()) { + InternalEObject oldStyle = (InternalEObject) style; + style = (EEFGroupStyle) eResolveProxy(oldStyle); + if (style != oldStyle) { + InternalEObject newStyle = (InternalEObject) style; + NotificationChain msgs = oldStyle.eInverseRemove(this, InternalEObject.EOPPOSITE_FEATURE_BASE + - EefPackage.EEF_GROUP_CONDITIONAL_STYLE__STYLE, null, null); + if (newStyle.eInternalContainer() == null) { + msgs = newStyle.eInverseAdd(this, InternalEObject.EOPPOSITE_FEATURE_BASE - EefPackage.EEF_GROUP_CONDITIONAL_STYLE__STYLE, null, + msgs); + } + if (msgs != null) { + msgs.dispatch(); + } + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.RESOLVE, EefPackage.EEF_GROUP_CONDITIONAL_STYLE__STYLE, oldStyle, style)); + } + } + } + return style; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EEFGroupStyle basicGetStyle() { + return style; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public NotificationChain basicSetStyle(EEFGroupStyle newStyle, NotificationChain msgs) { + EEFGroupStyle oldStyle = style; + style = newStyle; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EefPackage.EEF_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(EEFGroupStyle newStyle) { + if (newStyle != style) { + NotificationChain msgs = null; + if (style != null) { + msgs = ((InternalEObject) style).eInverseRemove(this, InternalEObject.EOPPOSITE_FEATURE_BASE + - EefPackage.EEF_GROUP_CONDITIONAL_STYLE__STYLE, null, msgs); + } + if (newStyle != null) { + msgs = ((InternalEObject) newStyle).eInverseAdd(this, InternalEObject.EOPPOSITE_FEATURE_BASE + - EefPackage.EEF_GROUP_CONDITIONAL_STYLE__STYLE, null, msgs); + } + msgs = basicSetStyle(newStyle, msgs); + if (msgs != null) { + msgs.dispatch(); + } + } else if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, EefPackage.EEF_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 EefPackage.EEF_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 EefPackage.EEF_GROUP_CONDITIONAL_STYLE__STYLE: + if (resolve) { + return getStyle(); + } + return basicGetStyle(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case EefPackage.EEF_GROUP_CONDITIONAL_STYLE__STYLE: + setStyle((EEFGroupStyle) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case EefPackage.EEF_GROUP_CONDITIONAL_STYLE__STYLE: + setStyle((EEFGroupStyle) null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case EefPackage.EEF_GROUP_CONDITIONAL_STYLE__STYLE: + return style != null; + } + return super.eIsSet(featureID); + } + +} // EEFGroupConditionalStyleImpl diff --git a/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/impl/EEFGroupDescriptionImpl.java b/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/impl/EEFGroupDescriptionImpl.java index 81ace8d07..74d986988 100644 --- a/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/impl/EEFGroupDescriptionImpl.java +++ b/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/impl/EEFGroupDescriptionImpl.java @@ -11,7 +11,9 @@ package org.eclipse.eef.impl; import java.util.Collection; import org.eclipse.eef.EEFControlDescription; +import org.eclipse.eef.EEFGroupConditionalStyle; import org.eclipse.eef.EEFGroupDescription; +import org.eclipse.eef.EEFGroupStyle; import org.eclipse.eef.EEFPropertyValidationRuleDescription; import org.eclipse.eef.EEFSemanticValidationRuleDescription; import org.eclipse.eef.EefPackage; @@ -42,6 +44,8 @@ import org.eclipse.emf.ecore.util.InternalEList; * </em>}</li> * <li>{@link org.eclipse.eef.impl.EEFGroupDescriptionImpl#getPropertyValidationRules <em>Property Validation Rules * </em>}</li> + * <li>{@link org.eclipse.eef.impl.EEFGroupDescriptionImpl#getStyle <em>Style</em>}</li> + * <li>{@link org.eclipse.eef.impl.EEFGroupDescriptionImpl#getConditionalStyles <em>Conditional Styles</em>}</li> * </ul> * </p> * @@ -179,6 +183,26 @@ public class EEFGroupDescriptionImpl extends MinimalEObjectImpl.Container implem protected EList<EEFPropertyValidationRuleDescription> propertyValidationRules; /** + * The cached value of the '{@link #getStyle() <em>Style</em>}' containment reference. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see #getStyle() + * @generated + * @ordered + */ + protected EEFGroupStyle 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<EEFGroupConditionalStyle> conditionalStyles; + + /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated @@ -368,6 +392,103 @@ public class EEFGroupDescriptionImpl extends MinimalEObjectImpl.Container implem * @generated */ @Override + public EEFGroupStyle getStyle() { + if (style != null && style.eIsProxy()) { + InternalEObject oldStyle = (InternalEObject) style; + style = (EEFGroupStyle) eResolveProxy(oldStyle); + if (style != oldStyle) { + InternalEObject newStyle = (InternalEObject) style; + NotificationChain msgs = oldStyle.eInverseRemove(this, InternalEObject.EOPPOSITE_FEATURE_BASE + - EefPackage.EEF_GROUP_DESCRIPTION__STYLE, null, null); + if (newStyle.eInternalContainer() == null) { + msgs = newStyle.eInverseAdd(this, InternalEObject.EOPPOSITE_FEATURE_BASE - EefPackage.EEF_GROUP_DESCRIPTION__STYLE, null, msgs); + } + if (msgs != null) { + msgs.dispatch(); + } + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.RESOLVE, EefPackage.EEF_GROUP_DESCRIPTION__STYLE, oldStyle, style)); + } + } + } + return style; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EEFGroupStyle basicGetStyle() { + return style; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public NotificationChain basicSetStyle(EEFGroupStyle newStyle, NotificationChain msgs) { + EEFGroupStyle oldStyle = style; + style = newStyle; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EefPackage.EEF_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(EEFGroupStyle newStyle) { + if (newStyle != style) { + NotificationChain msgs = null; + if (style != null) { + msgs = ((InternalEObject) style).eInverseRemove(this, InternalEObject.EOPPOSITE_FEATURE_BASE + - EefPackage.EEF_GROUP_DESCRIPTION__STYLE, null, msgs); + } + if (newStyle != null) { + msgs = ((InternalEObject) newStyle).eInverseAdd(this, InternalEObject.EOPPOSITE_FEATURE_BASE + - EefPackage.EEF_GROUP_DESCRIPTION__STYLE, null, msgs); + } + msgs = basicSetStyle(newStyle, msgs); + if (msgs != null) { + msgs.dispatch(); + } + } else if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, EefPackage.EEF_GROUP_DESCRIPTION__STYLE, newStyle, newStyle)); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EList<EEFGroupConditionalStyle> getConditionalStyles() { + if (conditionalStyles == null) { + conditionalStyles = new EObjectContainmentEList.Resolving<EEFGroupConditionalStyle>(EEFGroupConditionalStyle.class, this, + EefPackage.EEF_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 EefPackage.EEF_GROUP_DESCRIPTION__CONTROLS: @@ -376,6 +497,10 @@ public class EEFGroupDescriptionImpl extends MinimalEObjectImpl.Container implem return ((InternalEList<?>) getSemanticValidationRules()).basicRemove(otherEnd, msgs); case EefPackage.EEF_GROUP_DESCRIPTION__PROPERTY_VALIDATION_RULES: return ((InternalEList<?>) getPropertyValidationRules()).basicRemove(otherEnd, msgs); + case EefPackage.EEF_GROUP_DESCRIPTION__STYLE: + return basicSetStyle(null, msgs); + case EefPackage.EEF_GROUP_DESCRIPTION__CONDITIONAL_STYLES: + return ((InternalEList<?>) getConditionalStyles()).basicRemove(otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } @@ -404,6 +529,13 @@ public class EEFGroupDescriptionImpl extends MinimalEObjectImpl.Container implem return getSemanticValidationRules(); case EefPackage.EEF_GROUP_DESCRIPTION__PROPERTY_VALIDATION_RULES: return getPropertyValidationRules(); + case EefPackage.EEF_GROUP_DESCRIPTION__STYLE: + if (resolve) { + return getStyle(); + } + return basicGetStyle(); + case EefPackage.EEF_GROUP_DESCRIPTION__CONDITIONAL_STYLES: + return getConditionalStyles(); } return super.eGet(featureID, resolve, coreType); } @@ -444,6 +576,13 @@ public class EEFGroupDescriptionImpl extends MinimalEObjectImpl.Container implem getPropertyValidationRules().clear(); getPropertyValidationRules().addAll((Collection<? extends EEFPropertyValidationRuleDescription>) newValue); return; + case EefPackage.EEF_GROUP_DESCRIPTION__STYLE: + setStyle((EEFGroupStyle) newValue); + return; + case EefPackage.EEF_GROUP_DESCRIPTION__CONDITIONAL_STYLES: + getConditionalStyles().clear(); + getConditionalStyles().addAll((Collection<? extends EEFGroupConditionalStyle>) newValue); + return; } super.eSet(featureID, newValue); } @@ -480,6 +619,12 @@ public class EEFGroupDescriptionImpl extends MinimalEObjectImpl.Container implem case EefPackage.EEF_GROUP_DESCRIPTION__PROPERTY_VALIDATION_RULES: getPropertyValidationRules().clear(); return; + case EefPackage.EEF_GROUP_DESCRIPTION__STYLE: + setStyle((EEFGroupStyle) null); + return; + case EefPackage.EEF_GROUP_DESCRIPTION__CONDITIONAL_STYLES: + getConditionalStyles().clear(); + return; } super.eUnset(featureID); } @@ -513,6 +658,10 @@ public class EEFGroupDescriptionImpl extends MinimalEObjectImpl.Container implem return semanticValidationRules != null && !semanticValidationRules.isEmpty(); case EefPackage.EEF_GROUP_DESCRIPTION__PROPERTY_VALIDATION_RULES: return propertyValidationRules != null && !propertyValidationRules.isEmpty(); + case EefPackage.EEF_GROUP_DESCRIPTION__STYLE: + return style != null; + case EefPackage.EEF_GROUP_DESCRIPTION__CONDITIONAL_STYLES: + return conditionalStyles != null && !conditionalStyles.isEmpty(); } return super.eIsSet(featureID); } diff --git a/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/impl/EEFGroupStyleImpl.java b/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/impl/EEFGroupStyleImpl.java new file mode 100644 index 000000000..75d243eed --- /dev/null +++ b/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/impl/EEFGroupStyleImpl.java @@ -0,0 +1,522 @@ +/** + * Copyright (c) 2015 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.htm + * Contributors: Obeo - initial API and implementation + */ +package org.eclipse.eef.impl; + +import org.eclipse.eef.EEFGroupStyle; +import org.eclipse.eef.EEF_TITLE_BAR_STYLE; +import org.eclipse.eef.EEF_TOGGLE_STYLE; +import org.eclipse.eef.EefPackage; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>EEF Group Style</b></em>'. <!-- end-user-doc + * --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.eclipse.eef.impl.EEFGroupStyleImpl#getBackgroundColorExpression <em>Background Color Expression</em>}</li> + * <li>{@link org.eclipse.eef.impl.EEFGroupStyleImpl#getForegroundColorExpression <em>Foreground Color Expression</em>}</li> + * <li>{@link org.eclipse.eef.impl.EEFGroupStyleImpl#getFontNameExpression <em>Font Name Expression</em>}</li> + * <li>{@link org.eclipse.eef.impl.EEFGroupStyleImpl#getFontSizeExpression <em>Font Size Expression</em>}</li> + * <li>{@link org.eclipse.eef.impl.EEFGroupStyleImpl#getBarStyle <em>Bar Style</em>}</li> + * <li>{@link org.eclipse.eef.impl.EEFGroupStyleImpl#getToggleStyle <em>Toggle Style</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class EEFGroupStyleImpl extends MinimalEObjectImpl.Container implements EEFGroupStyle { + /** + * The default value of the '{@link #getBackgroundColorExpression() <em>Background Color Expression</em>}' + * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see #getBackgroundColorExpression() + * @generated + * @ordered + */ + protected static final String BACKGROUND_COLOR_EXPRESSION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getBackgroundColorExpression() <em>Background Color Expression</em>}' attribute. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see #getBackgroundColorExpression() + * @generated + * @ordered + */ + protected String backgroundColorExpression = EEFGroupStyleImpl.BACKGROUND_COLOR_EXPRESSION_EDEFAULT; + + /** + * The default value of the '{@link #getForegroundColorExpression() <em>Foreground Color Expression</em>}' + * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see #getForegroundColorExpression() + * @generated + * @ordered + */ + protected static final String FOREGROUND_COLOR_EXPRESSION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getForegroundColorExpression() <em>Foreground Color Expression</em>}' attribute. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see #getForegroundColorExpression() + * @generated + * @ordered + */ + protected String foregroundColorExpression = EEFGroupStyleImpl.FOREGROUND_COLOR_EXPRESSION_EDEFAULT; + + /** + * 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 = EEFGroupStyleImpl.FONT_NAME_EXPRESSION_EDEFAULT; + + /** + * The default value of the '{@link #getFontSizeExpression() <em>Font Size Expression</em>}' attribute. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @see #getFontSizeExpression() + * @generated + * @ordered + */ + protected static final String FONT_SIZE_EXPRESSION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getFontSizeExpression() <em>Font Size Expression</em>}' attribute. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @see #getFontSizeExpression() + * @generated + * @ordered + */ + protected String fontSizeExpression = EEFGroupStyleImpl.FONT_SIZE_EXPRESSION_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 EEF_TITLE_BAR_STYLE BAR_STYLE_EDEFAULT = EEF_TITLE_BAR_STYLE.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 EEF_TITLE_BAR_STYLE barStyle = EEFGroupStyleImpl.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 EEF_TOGGLE_STYLE TOGGLE_STYLE_EDEFAULT = EEF_TOGGLE_STYLE.TWISTIE; + + /** + * The cached value of the '{@link #getToggleStyle() <em>Toggle Style</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see #getToggleStyle() + * @generated + * @ordered + */ + protected EEF_TOGGLE_STYLE toggleStyle = EEFGroupStyleImpl.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 = EEFGroupStyleImpl.EXPANDED_BY_DEFAULT_EDEFAULT; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected EEFGroupStyleImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return EefPackage.Literals.EEF_GROUP_STYLE; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getBackgroundColorExpression() { + return backgroundColorExpression; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void setBackgroundColorExpression(String newBackgroundColorExpression) { + String oldBackgroundColorExpression = backgroundColorExpression; + backgroundColorExpression = newBackgroundColorExpression; + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, EefPackage.EEF_GROUP_STYLE__BACKGROUND_COLOR_EXPRESSION, + oldBackgroundColorExpression, backgroundColorExpression)); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getForegroundColorExpression() { + return foregroundColorExpression; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void setForegroundColorExpression(String newForegroundColorExpression) { + String oldForegroundColorExpression = foregroundColorExpression; + foregroundColorExpression = newForegroundColorExpression; + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, EefPackage.EEF_GROUP_STYLE__FOREGROUND_COLOR_EXPRESSION, + oldForegroundColorExpression, foregroundColorExpression)); + } + } + + /** + * <!-- 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, EefPackage.EEF_GROUP_STYLE__FONT_NAME_EXPRESSION, oldFontNameExpression, + fontNameExpression)); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getFontSizeExpression() { + return fontSizeExpression; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void setFontSizeExpression(String newFontSizeExpression) { + String oldFontSizeExpression = fontSizeExpression; + fontSizeExpression = newFontSizeExpression; + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, EefPackage.EEF_GROUP_STYLE__FONT_SIZE_EXPRESSION, oldFontSizeExpression, + fontSizeExpression)); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EEF_TITLE_BAR_STYLE getBarStyle() { + return barStyle; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void setBarStyle(EEF_TITLE_BAR_STYLE newBarStyle) { + EEF_TITLE_BAR_STYLE oldBarStyle = barStyle; + barStyle = newBarStyle == null ? EEFGroupStyleImpl.BAR_STYLE_EDEFAULT : newBarStyle; + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, EefPackage.EEF_GROUP_STYLE__BAR_STYLE, oldBarStyle, barStyle)); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EEF_TOGGLE_STYLE getToggleStyle() { + return toggleStyle; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void setToggleStyle(EEF_TOGGLE_STYLE newToggleStyle) { + EEF_TOGGLE_STYLE oldToggleStyle = toggleStyle; + toggleStyle = newToggleStyle == null ? EEFGroupStyleImpl.TOGGLE_STYLE_EDEFAULT : newToggleStyle; + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, EefPackage.EEF_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, EefPackage.EEF_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 EefPackage.EEF_GROUP_STYLE__BACKGROUND_COLOR_EXPRESSION: + return getBackgroundColorExpression(); + case EefPackage.EEF_GROUP_STYLE__FOREGROUND_COLOR_EXPRESSION: + return getForegroundColorExpression(); + case EefPackage.EEF_GROUP_STYLE__FONT_NAME_EXPRESSION: + return getFontNameExpression(); + case EefPackage.EEF_GROUP_STYLE__FONT_SIZE_EXPRESSION: + return getFontSizeExpression(); + case EefPackage.EEF_GROUP_STYLE__BAR_STYLE: + return getBarStyle(); + case EefPackage.EEF_GROUP_STYLE__TOGGLE_STYLE: + return getToggleStyle(); + case EefPackage.EEF_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 EefPackage.EEF_GROUP_STYLE__BACKGROUND_COLOR_EXPRESSION: + setBackgroundColorExpression((String) newValue); + return; + case EefPackage.EEF_GROUP_STYLE__FOREGROUND_COLOR_EXPRESSION: + setForegroundColorExpression((String) newValue); + return; + case EefPackage.EEF_GROUP_STYLE__FONT_NAME_EXPRESSION: + setFontNameExpression((String) newValue); + return; + case EefPackage.EEF_GROUP_STYLE__FONT_SIZE_EXPRESSION: + setFontSizeExpression((String) newValue); + return; + case EefPackage.EEF_GROUP_STYLE__BAR_STYLE: + setBarStyle((EEF_TITLE_BAR_STYLE) newValue); + return; + case EefPackage.EEF_GROUP_STYLE__TOGGLE_STYLE: + setToggleStyle((EEF_TOGGLE_STYLE) newValue); + return; + case EefPackage.EEF_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 EefPackage.EEF_GROUP_STYLE__BACKGROUND_COLOR_EXPRESSION: + setBackgroundColorExpression(EEFGroupStyleImpl.BACKGROUND_COLOR_EXPRESSION_EDEFAULT); + return; + case EefPackage.EEF_GROUP_STYLE__FOREGROUND_COLOR_EXPRESSION: + setForegroundColorExpression(EEFGroupStyleImpl.FOREGROUND_COLOR_EXPRESSION_EDEFAULT); + return; + case EefPackage.EEF_GROUP_STYLE__FONT_NAME_EXPRESSION: + setFontNameExpression(EEFGroupStyleImpl.FONT_NAME_EXPRESSION_EDEFAULT); + return; + case EefPackage.EEF_GROUP_STYLE__FONT_SIZE_EXPRESSION: + setFontSizeExpression(EEFGroupStyleImpl.FONT_SIZE_EXPRESSION_EDEFAULT); + return; + case EefPackage.EEF_GROUP_STYLE__BAR_STYLE: + setBarStyle(EEFGroupStyleImpl.BAR_STYLE_EDEFAULT); + return; + case EefPackage.EEF_GROUP_STYLE__TOGGLE_STYLE: + setToggleStyle(EEFGroupStyleImpl.TOGGLE_STYLE_EDEFAULT); + return; + case EefPackage.EEF_GROUP_STYLE__EXPANDED_BY_DEFAULT: + setExpandedByDefault(EEFGroupStyleImpl.EXPANDED_BY_DEFAULT_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case EefPackage.EEF_GROUP_STYLE__BACKGROUND_COLOR_EXPRESSION: + return EEFGroupStyleImpl.BACKGROUND_COLOR_EXPRESSION_EDEFAULT == null ? backgroundColorExpression != null + : !EEFGroupStyleImpl.BACKGROUND_COLOR_EXPRESSION_EDEFAULT.equals(backgroundColorExpression); + case EefPackage.EEF_GROUP_STYLE__FOREGROUND_COLOR_EXPRESSION: + return EEFGroupStyleImpl.FOREGROUND_COLOR_EXPRESSION_EDEFAULT == null ? foregroundColorExpression != null + : !EEFGroupStyleImpl.FOREGROUND_COLOR_EXPRESSION_EDEFAULT.equals(foregroundColorExpression); + case EefPackage.EEF_GROUP_STYLE__FONT_NAME_EXPRESSION: + return EEFGroupStyleImpl.FONT_NAME_EXPRESSION_EDEFAULT == null ? fontNameExpression != null + : !EEFGroupStyleImpl.FONT_NAME_EXPRESSION_EDEFAULT.equals(fontNameExpression); + case EefPackage.EEF_GROUP_STYLE__FONT_SIZE_EXPRESSION: + return EEFGroupStyleImpl.FONT_SIZE_EXPRESSION_EDEFAULT == null ? fontSizeExpression != null + : !EEFGroupStyleImpl.FONT_SIZE_EXPRESSION_EDEFAULT.equals(fontSizeExpression); + case EefPackage.EEF_GROUP_STYLE__BAR_STYLE: + return barStyle != EEFGroupStyleImpl.BAR_STYLE_EDEFAULT; + case EefPackage.EEF_GROUP_STYLE__TOGGLE_STYLE: + return toggleStyle != EEFGroupStyleImpl.TOGGLE_STYLE_EDEFAULT; + case EefPackage.EEF_GROUP_STYLE__EXPANDED_BY_DEFAULT: + return expandedByDefault != EEFGroupStyleImpl.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(" (backgroundColorExpression: "); //$NON-NLS-1$ + result.append(backgroundColorExpression); + result.append(", foregroundColorExpression: "); //$NON-NLS-1$ + result.append(foregroundColorExpression); + result.append(", fontNameExpression: "); //$NON-NLS-1$ + result.append(fontNameExpression); + result.append(", fontSizeExpression: "); //$NON-NLS-1$ + result.append(fontSizeExpression); + result.append(", barStyle: "); //$NON-NLS-1$ + result.append(barStyle); + result.append(", toggleStyle: "); //$NON-NLS-1$ + result.append(toggleStyle); + result.append(", expandedByDefault: "); //$NON-NLS-1$ + result.append(expandedByDefault); + result.append(')'); + return result.toString(); + } + +} // EEFGroupStyleImpl diff --git a/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/impl/EefFactoryImpl.java b/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/impl/EefFactoryImpl.java index f3739bcb1..42f6fea48 100644 --- a/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/impl/EefFactoryImpl.java +++ b/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/impl/EefFactoryImpl.java @@ -23,7 +23,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; @@ -50,6 +52,8 @@ import org.eclipse.eef.EEFValidationFixDescription; import org.eclipse.eef.EEFViewDescription; import org.eclipse.eef.EEFWidgetAction; 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.eef.EefPackage; @@ -162,6 +166,8 @@ public class EefFactoryImpl extends EFactoryImpl implements EefFactory { return createEEFCustomWidgetStyle(); case EefPackage.EEF_REFERENCE_STYLE: return createEEFReferenceStyle(); + case EefPackage.EEF_GROUP_STYLE: + return createEEFGroupStyle(); case EefPackage.EEF_TEXT_CONDITIONAL_STYLE: return createEEFTextConditionalStyle(); case EefPackage.EEF_BUTTON_CONDITIONAL_STYLE: @@ -182,6 +188,8 @@ public class EefFactoryImpl extends EFactoryImpl implements EefFactory { return createEEFWidgetAction(); case EefPackage.EEF_REFERENCE_CONDITIONAL_STYLE: return createEEFReferenceConditionalStyle(); + case EefPackage.EEF_GROUP_CONDITIONAL_STYLE: + return createEEFGroupConditionalStyle(); default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ } @@ -199,6 +207,10 @@ public class EefFactoryImpl extends EFactoryImpl implements EefFactory { return createEEF_VALIDATION_SEVERITY_DESCRIPTIONFromString(eDataType, initialValue); case EefPackage.EEF_FILL_LAYOUT_ORIENTATION: return createEEF_FILL_LAYOUT_ORIENTATIONFromString(eDataType, initialValue); + case EefPackage.EEF_TOGGLE_STYLE: + return createEEF_TOGGLE_STYLEFromString(eDataType, initialValue); + case EefPackage.EEF_TITLE_BAR_STYLE: + return createEEF_TITLE_BAR_STYLEFromString(eDataType, initialValue); default: throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ } @@ -216,6 +228,10 @@ public class EefFactoryImpl extends EFactoryImpl implements EefFactory { return convertEEF_VALIDATION_SEVERITY_DESCRIPTIONToString(eDataType, instanceValue); case EefPackage.EEF_FILL_LAYOUT_ORIENTATION: return convertEEF_FILL_LAYOUT_ORIENTATIONToString(eDataType, instanceValue); + case EefPackage.EEF_TOGGLE_STYLE: + return convertEEF_TOGGLE_STYLEToString(eDataType, instanceValue); + case EefPackage.EEF_TITLE_BAR_STYLE: + return convertEEF_TITLE_BAR_STYLEToString(eDataType, instanceValue); default: throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ } @@ -557,6 +573,28 @@ public class EefFactoryImpl extends EFactoryImpl implements EefFactory { * @generated */ @Override + public EEFReferenceStyle createEEFReferenceStyle() { + EEFReferenceStyleImpl eefReferenceStyle = new EEFReferenceStyleImpl(); + return eefReferenceStyle; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EEFGroupStyle createEEFGroupStyle() { + EEFGroupStyleImpl eefGroupStyle = new EEFGroupStyleImpl(); + return eefGroupStyle; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override public EEFTextConditionalStyle createEEFTextConditionalStyle() { EEFTextConditionalStyleImpl eefTextConditionalStyle = new EEFTextConditionalStyleImpl(); return eefTextConditionalStyle; @@ -667,9 +705,9 @@ public class EefFactoryImpl extends EFactoryImpl implements EefFactory { * @generated */ @Override - public EEFReferenceStyle createEEFReferenceStyle() { - EEFReferenceStyleImpl eefReferenceStyle = new EEFReferenceStyleImpl(); - return eefReferenceStyle; + public EEFGroupConditionalStyle createEEFGroupConditionalStyle() { + EEFGroupConditionalStyleImpl eefGroupConditionalStyle = new EEFGroupConditionalStyleImpl(); + return eefGroupConditionalStyle; } /** @@ -721,6 +759,50 @@ public class EefFactoryImpl extends EFactoryImpl implements EefFactory { * * @generated */ + public EEF_TOGGLE_STYLE createEEF_TOGGLE_STYLEFromString(EDataType eDataType, String initialValue) { + EEF_TOGGLE_STYLE result = EEF_TOGGLE_STYLE.get(initialValue); + if (result == null) { + throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + } + return result; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public String convertEEF_TOGGLE_STYLEToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EEF_TITLE_BAR_STYLE createEEF_TITLE_BAR_STYLEFromString(EDataType eDataType, String initialValue) { + EEF_TITLE_BAR_STYLE result = EEF_TITLE_BAR_STYLE.get(initialValue); + if (result == null) { + throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + } + return result; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public String convertEEF_TITLE_BAR_STYLEToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ @Override public EefPackage getEefPackage() { return (EefPackage) getEPackage(); diff --git a/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/impl/EefPackageImpl.java b/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/impl/EefPackageImpl.java index 3cdafb339..c47e81d93 100644 --- a/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/impl/EefPackageImpl.java +++ b/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/impl/EefPackageImpl.java @@ -25,7 +25,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; @@ -328,6 +330,13 @@ public class EefPackageImpl extends EPackageImpl implements EefPackage { * * @generated */ + private EClass eefGroupStyleEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ private EClass eefConditionalStyleEClass = null; /** @@ -405,6 +414,13 @@ public class EefPackageImpl extends EPackageImpl implements EefPackage { * * @generated */ + private EClass eefGroupConditionalStyleEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ private EEnum eeF_VALIDATION_SEVERITY_DESCRIPTIONEEnum = null; /** @@ -415,6 +431,20 @@ public class EefPackageImpl extends EPackageImpl implements EefPackage { private EEnum eeF_FILL_LAYOUT_ORIENTATIONEEnum = null; /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private EEnum eeF_TOGGLE_STYLEEEnum = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private EEnum eeF_TITLE_BAR_STYLEEEnum = 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. * <p> @@ -865,6 +895,26 @@ public class EefPackageImpl extends EPackageImpl implements EefPackage { * @generated */ @Override + public EReference getEEFGroupDescription_Style() { + return (EReference) eefGroupDescriptionEClass.getEStructuralFeatures().get(8); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getEEFGroupDescription_ConditionalStyles() { + return (EReference) eefGroupDescriptionEClass.getEStructuralFeatures().get(9); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override public EClass getEEFControlDescription() { return eefControlDescriptionEClass; } @@ -1945,6 +1995,86 @@ public class EefPackageImpl extends EPackageImpl implements EefPackage { * @generated */ @Override + public EClass getEEFGroupStyle() { + return eefGroupStyleEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getEEFGroupStyle_BackgroundColorExpression() { + return (EAttribute) eefGroupStyleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getEEFGroupStyle_ForegroundColorExpression() { + return (EAttribute) eefGroupStyleEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getEEFGroupStyle_FontNameExpression() { + return (EAttribute) eefGroupStyleEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getEEFGroupStyle_FontSizeExpression() { + return (EAttribute) eefGroupStyleEClass.getEStructuralFeatures().get(3); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getEEFGroupStyle_BarStyle() { + return (EAttribute) eefGroupStyleEClass.getEStructuralFeatures().get(4); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getEEFGroupStyle_ToggleStyle() { + return (EAttribute) eefGroupStyleEClass.getEStructuralFeatures().get(5); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getEEFGroupStyle_ExpandedByDefault() { + return (EAttribute) eefGroupStyleEClass.getEStructuralFeatures().get(6); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override public EClass getEEFConditionalStyle() { return eefConditionalStyleEClass; } @@ -2175,6 +2305,26 @@ public class EefPackageImpl extends EPackageImpl implements EefPackage { * @generated */ @Override + public EClass getEEFGroupConditionalStyle() { + return eefGroupConditionalStyleEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getEEFGroupConditionalStyle_Style() { + return (EReference) eefGroupConditionalStyleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override public EEnum getEEF_VALIDATION_SEVERITY_DESCRIPTION() { return eeF_VALIDATION_SEVERITY_DESCRIPTIONEEnum; } @@ -2195,6 +2345,26 @@ public class EefPackageImpl extends EPackageImpl implements EefPackage { * @generated */ @Override + public EEnum getEEF_TOGGLE_STYLE() { + return eeF_TOGGLE_STYLEEEnum; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EEnum getEEF_TITLE_BAR_STYLE() { + return eeF_TITLE_BAR_STYLEEEnum; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override public EefFactory getEefFactory() { return (EefFactory) getEFactoryInstance(); } @@ -2264,6 +2434,8 @@ public class EefPackageImpl extends EPackageImpl implements EefPackage { createEReference(eefGroupDescriptionEClass, EefPackage.EEF_GROUP_DESCRIPTION__CONTROLS); createEReference(eefGroupDescriptionEClass, EefPackage.EEF_GROUP_DESCRIPTION__SEMANTIC_VALIDATION_RULES); createEReference(eefGroupDescriptionEClass, EefPackage.EEF_GROUP_DESCRIPTION__PROPERTY_VALIDATION_RULES); + createEReference(eefGroupDescriptionEClass, EefPackage.EEF_GROUP_DESCRIPTION__STYLE); + createEReference(eefGroupDescriptionEClass, EefPackage.EEF_GROUP_DESCRIPTION__CONDITIONAL_STYLES); eefControlDescriptionEClass = createEClass(EefPackage.EEF_CONTROL_DESCRIPTION); createEAttribute(eefControlDescriptionEClass, EefPackage.EEF_CONTROL_DESCRIPTION__IDENTIFIER); @@ -2401,6 +2573,15 @@ public class EefPackageImpl extends EPackageImpl implements EefPackage { eefReferenceStyleEClass = createEClass(EefPackage.EEF_REFERENCE_STYLE); + eefGroupStyleEClass = createEClass(EefPackage.EEF_GROUP_STYLE); + createEAttribute(eefGroupStyleEClass, EefPackage.EEF_GROUP_STYLE__BACKGROUND_COLOR_EXPRESSION); + createEAttribute(eefGroupStyleEClass, EefPackage.EEF_GROUP_STYLE__FOREGROUND_COLOR_EXPRESSION); + createEAttribute(eefGroupStyleEClass, EefPackage.EEF_GROUP_STYLE__FONT_NAME_EXPRESSION); + createEAttribute(eefGroupStyleEClass, EefPackage.EEF_GROUP_STYLE__FONT_SIZE_EXPRESSION); + createEAttribute(eefGroupStyleEClass, EefPackage.EEF_GROUP_STYLE__BAR_STYLE); + createEAttribute(eefGroupStyleEClass, EefPackage.EEF_GROUP_STYLE__TOGGLE_STYLE); + createEAttribute(eefGroupStyleEClass, EefPackage.EEF_GROUP_STYLE__EXPANDED_BY_DEFAULT); + eefConditionalStyleEClass = createEClass(EefPackage.EEF_CONDITIONAL_STYLE); createEAttribute(eefConditionalStyleEClass, EefPackage.EEF_CONDITIONAL_STYLE__PRECONDITION_EXPRESSION); @@ -2435,9 +2616,14 @@ public class EefPackageImpl extends EPackageImpl implements EefPackage { eefReferenceConditionalStyleEClass = createEClass(EefPackage.EEF_REFERENCE_CONDITIONAL_STYLE); createEReference(eefReferenceConditionalStyleEClass, EefPackage.EEF_REFERENCE_CONDITIONAL_STYLE__STYLE); + eefGroupConditionalStyleEClass = createEClass(EefPackage.EEF_GROUP_CONDITIONAL_STYLE); + createEReference(eefGroupConditionalStyleEClass, EefPackage.EEF_GROUP_CONDITIONAL_STYLE__STYLE); + // Create enums eeF_VALIDATION_SEVERITY_DESCRIPTIONEEnum = createEEnum(EefPackage.EEF_VALIDATION_SEVERITY_DESCRIPTION); eeF_FILL_LAYOUT_ORIENTATIONEEnum = createEEnum(EefPackage.EEF_FILL_LAYOUT_ORIENTATION); + eeF_TOGGLE_STYLEEEnum = createEEnum(EefPackage.EEF_TOGGLE_STYLE); + eeF_TITLE_BAR_STYLEEEnum = createEEnum(EefPackage.EEF_TITLE_BAR_STYLE); } /** @@ -2506,6 +2692,7 @@ public class EefPackageImpl extends EPackageImpl implements EefPackage { eefHyperlinkConditionalStyleEClass.getESuperTypes().add(this.getEEFConditionalStyle()); eefCustomWidgetConditionalStyleEClass.getESuperTypes().add(this.getEEFConditionalStyle()); eefReferenceConditionalStyleEClass.getESuperTypes().add(this.getEEFConditionalStyle()); + eefGroupConditionalStyleEClass.getESuperTypes().add(this.getEEFConditionalStyle()); // Initialize classes and features; add operations and parameters initEClass(eefViewDescriptionEClass, EEFViewDescription.class, @@ -2666,6 +2853,16 @@ public class EefPackageImpl extends EPackageImpl implements EefPackage { this.getEEFPropertyValidationRuleDescription(), null, "propertyValidationRules", null, 0, -1, EEFGroupDescription.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); //$NON-NLS-1$ + initEReference( + getEEFGroupDescription_Style(), + this.getEEFGroupStyle(), + null, + "style", null, 0, 1, EEFGroupDescription.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); //$NON-NLS-1$ + initEReference( + getEEFGroupDescription_ConditionalStyles(), + this.getEEFGroupConditionalStyle(), + null, + "conditionalStyles", null, 0, -1, EEFGroupDescription.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); //$NON-NLS-1$ initEClass(eefControlDescriptionEClass, EEFControlDescription.class, "EEFControlDescription", EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ @@ -3097,6 +3294,37 @@ public class EefPackageImpl extends EPackageImpl implements EefPackage { initEClass(eefReferenceStyleEClass, EEFReferenceStyle.class, "EEFReferenceStyle", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEClass(eefGroupStyleEClass, EEFGroupStyle.class, + "EEFGroupStyle", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute( + getEEFGroupStyle_BackgroundColorExpression(), + ecorePackage.getEString(), + "backgroundColorExpression", null, 0, 1, EEFGroupStyle.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); //$NON-NLS-1$ + initEAttribute( + getEEFGroupStyle_ForegroundColorExpression(), + ecorePackage.getEString(), + "foregroundColorExpression", null, 0, 1, EEFGroupStyle.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); //$NON-NLS-1$ + initEAttribute( + getEEFGroupStyle_FontNameExpression(), + ecorePackage.getEString(), + "fontNameExpression", null, 0, 1, EEFGroupStyle.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); //$NON-NLS-1$ + initEAttribute( + getEEFGroupStyle_FontSizeExpression(), + ecorePackage.getEString(), + "fontSizeExpression", null, 0, 1, EEFGroupStyle.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); //$NON-NLS-1$ + initEAttribute( + getEEFGroupStyle_BarStyle(), + this.getEEF_TITLE_BAR_STYLE(), + "barStyle", null, 0, 1, EEFGroupStyle.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); //$NON-NLS-1$ + initEAttribute( + getEEFGroupStyle_ToggleStyle(), + this.getEEF_TOGGLE_STYLE(), + "toggleStyle", null, 0, 1, EEFGroupStyle.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); //$NON-NLS-1$ + initEAttribute( + getEEFGroupStyle_ExpandedByDefault(), + ecorePackage.getEBoolean(), + "expandedByDefault", null, 0, 1, EEFGroupStyle.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); //$NON-NLS-1$ + initEClass(eefConditionalStyleEClass, EEFConditionalStyle.class, "EEFConditionalStyle", EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ initEAttribute( @@ -3187,6 +3415,14 @@ public class EefPackageImpl extends EPackageImpl implements EefPackage { null, "style", null, 0, 1, EEFReferenceConditionalStyle.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); //$NON-NLS-1$ + initEClass(eefGroupConditionalStyleEClass, EEFGroupConditionalStyle.class, + "EEFGroupConditionalStyle", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEReference( + getEEFGroupConditionalStyle_Style(), + this.getEEFGroupStyle(), + null, + "style", null, 0, 1, EEFGroupConditionalStyle.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); //$NON-NLS-1$ + // Initialize enums and add enum literals initEEnum(eeF_VALIDATION_SEVERITY_DESCRIPTIONEEnum, org.eclipse.eef.EEF_VALIDATION_SEVERITY_DESCRIPTION.class, "EEF_VALIDATION_SEVERITY_DESCRIPTION"); //$NON-NLS-1$ @@ -3198,6 +3434,16 @@ public class EefPackageImpl extends EPackageImpl implements EefPackage { addEEnumLiteral(eeF_FILL_LAYOUT_ORIENTATIONEEnum, org.eclipse.eef.EEF_FILL_LAYOUT_ORIENTATION.VERTICAL); addEEnumLiteral(eeF_FILL_LAYOUT_ORIENTATIONEEnum, org.eclipse.eef.EEF_FILL_LAYOUT_ORIENTATION.HORIZONTAL); + initEEnum(eeF_TOGGLE_STYLEEEnum, org.eclipse.eef.EEF_TOGGLE_STYLE.class, "EEF_TOGGLE_STYLE"); //$NON-NLS-1$ + addEEnumLiteral(eeF_TOGGLE_STYLEEEnum, org.eclipse.eef.EEF_TOGGLE_STYLE.TWISTIE); + addEEnumLiteral(eeF_TOGGLE_STYLEEEnum, org.eclipse.eef.EEF_TOGGLE_STYLE.TREE_NODE); + addEEnumLiteral(eeF_TOGGLE_STYLEEEnum, org.eclipse.eef.EEF_TOGGLE_STYLE.NONE); + + initEEnum(eeF_TITLE_BAR_STYLEEEnum, org.eclipse.eef.EEF_TITLE_BAR_STYLE.class, "EEF_TITLE_BAR_STYLE"); //$NON-NLS-1$ + addEEnumLiteral(eeF_TITLE_BAR_STYLEEEnum, org.eclipse.eef.EEF_TITLE_BAR_STYLE.TITLE_BAR); + addEEnumLiteral(eeF_TITLE_BAR_STYLEEEnum, org.eclipse.eef.EEF_TITLE_BAR_STYLE.SHORT_TITLE_BAR); + addEEnumLiteral(eeF_TITLE_BAR_STYLEEEnum, org.eclipse.eef.EEF_TITLE_BAR_STYLE.NO_TITLE); + // Create resource createResource(EefPackage.eNS_URI); } diff --git a/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/util/EefAdapterFactory.java b/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/util/EefAdapterFactory.java index 8862e27f4..3066f6ecc 100644 --- a/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/util/EefAdapterFactory.java +++ b/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/util/EefAdapterFactory.java @@ -25,7 +25,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; @@ -293,6 +295,11 @@ public class EefAdapterFactory extends AdapterFactoryImpl { } @Override + public Adapter caseEEFGroupStyle(EEFGroupStyle object) { + return createEEFGroupStyleAdapter(); + } + + @Override public Adapter caseEEFConditionalStyle(EEFConditionalStyle object) { return createEEFConditionalStyleAdapter(); } @@ -348,6 +355,11 @@ public class EefAdapterFactory extends AdapterFactoryImpl { } @Override + public Adapter caseEEFGroupConditionalStyle(EEFGroupConditionalStyle object) { + return createEEFGroupConditionalStyleAdapter(); + } + + @Override public Adapter defaultCase(EObject object) { return createEObjectAdapter(); } @@ -851,6 +863,33 @@ public class EefAdapterFactory extends AdapterFactoryImpl { } /** + * Creates a new adapter for an object of class '{@link org.eclipse.eef.EEFReferenceStyle + * <em>EEF Reference 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.eef.EEFReferenceStyle + * @generated + */ + public Adapter createEEFReferenceStyleAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.eef.EEFGroupStyle <em>EEF 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.eef.EEFGroupStyle + * @generated + */ + public Adapter createEEFGroupStyleAdapter() { + return null; + } + + /** * Creates a new adapter for an object of class '{@link org.eclipse.eef.EEFConditionalStyle * <em>EEF 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. <!-- @@ -1004,16 +1043,16 @@ public class EefAdapterFactory extends AdapterFactoryImpl { } /** - * Creates a new adapter for an object of class '{@link org.eclipse.eef.EEFReferenceStyle - * <em>EEF Reference 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. <!-- + * Creates a new adapter for an object of class '{@link org.eclipse.eef.EEFGroupConditionalStyle + * <em>EEF 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.eef.EEFReferenceStyle + * @see org.eclipse.eef.EEFGroupConditionalStyle * @generated */ - public Adapter createEEFReferenceStyleAdapter() { + public Adapter createEEFGroupConditionalStyleAdapter() { return null; } diff --git a/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/util/EefSwitch.java b/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/util/EefSwitch.java index d41a60b27..64874a635 100644 --- a/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/util/EefSwitch.java +++ b/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/util/EefSwitch.java @@ -25,7 +25,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; @@ -500,6 +502,14 @@ public class EefSwitch<T> extends Switch<T> { } return result; } + case EefPackage.EEF_GROUP_STYLE: { + EEFGroupStyle eefGroupStyle = (EEFGroupStyle) theEObject; + T result = caseEEFGroupStyle(eefGroupStyle); + if (result == null) { + result = defaultCase(theEObject); + } + return result; + } case EefPackage.EEF_CONDITIONAL_STYLE: { EEFConditionalStyle eefConditionalStyle = (EEFConditionalStyle) theEObject; T result = caseEEFConditionalStyle(eefConditionalStyle); @@ -615,6 +625,17 @@ public class EefSwitch<T> extends Switch<T> { } return result; } + case EefPackage.EEF_GROUP_CONDITIONAL_STYLE: { + EEFGroupConditionalStyle eefGroupConditionalStyle = (EEFGroupConditionalStyle) theEObject; + T result = caseEEFGroupConditionalStyle(eefGroupConditionalStyle); + if (result == null) { + result = caseEEFConditionalStyle(eefGroupConditionalStyle); + } + if (result == null) { + result = defaultCase(theEObject); + } + return result; + } default: return defaultCase(theEObject); } @@ -1148,6 +1169,36 @@ public class EefSwitch<T> extends Switch<T> { } /** + * Returns the result of interpreting the object as an instance of '<em>EEF Reference 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>EEF Reference Style</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseEEFReferenceStyle(EEFReferenceStyle object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>EEF 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>EEF Group Style</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseEEFGroupStyle(EEFGroupStyle object) { + return null; + } + + /** * Returns the result of interpreting the object as an instance of '<em>EEF Conditional Style</em>'. <!-- * begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. <!-- * end-user-doc --> @@ -1313,17 +1364,17 @@ public class EefSwitch<T> extends Switch<T> { } /** - * Returns the result of interpreting the object as an instance of '<em>EEF Reference Style</em>'. <!-- + * Returns the result of interpreting the object as an instance of '<em>EEF 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>EEF Reference Style</em>'. + * @return the result of interpreting the object as an instance of '<em>EEF Group Conditional Style</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ - public T caseEEFReferenceStyle(EEFReferenceStyle object) { + public T caseEEFGroupConditionalStyle(EEFGroupConditionalStyle object) { return null; } |