diff options
| author | Stéphane Bégaudeau | 2016-09-01 12:16:22 +0000 |
|---|---|---|
| committer | Pierre-Charles David | 2016-09-14 15:20:21 +0000 |
| commit | 75605cbc17cb132c6daa8b516f1787cb29f9a896 (patch) | |
| tree | 141ead583590b74667fad293045b7818c1f05dfd | |
| parent | 763e077d6c83471450631d0bf2fccfe0e5aa4e7d (diff) | |
| download | org.eclipse.sirius-75605cbc17cb132c6daa8b516f1787cb29f9a896.tar.gz org.eclipse.sirius-75605cbc17cb132c6daa8b516f1787cb29f9a896.tar.xz org.eclipse.sirius-75605cbc17cb132c6daa8b516f1787cb29f9a896.zip | |
[500561] Fix an issue with the labelFontSize and fontSize
Bug: 500561
Change-Id: I3d7ecdbb87230fbcdfe5f1e70baca06d5a9a4d8f
Signed-off-by: Stéphane Bégaudeau <stephane.begaudeau@obeo.fr>
38 files changed, 836 insertions, 655 deletions
diff --git a/plugins/org.eclipse.sirius.doc/doc/Release_Notes.html b/plugins/org.eclipse.sirius.doc/doc/Release_Notes.html index 0efd8a76b0..db6c8b386d 100644 --- a/plugins/org.eclipse.sirius.doc/doc/Release_Notes.html +++ b/plugins/org.eclipse.sirius.doc/doc/Release_Notes.html @@ -159,6 +159,12 @@ <code>org.eclipse.sirius.diagram.ui.layoutDataManager</code> is deprecated. It is replaced by the new extension point <code>org.eclipse.sirius.diagram.ui.formatDataManager</code>. The deprecated extension point will be removed in the next 5.0 Sirius major release. Several classes associated with this deprecated extension point are also deprecated (see Developer-Visible Changes for details). </li> + <li><span class="label label-info">Modified</span> The properties + <code>fontSize</code> and + <code>labelFontSize</code> have been renamed into + <code>fontSizeExpression</code> and + <code>labelFontSizeExpression</code> since both of them were already treated as expression. + </li> </ul> <h3 id="DeveloperVisibleChanges">Developer-Visible Changes</h3> <ul> @@ -537,6 +543,12 @@ <code>domainClassExpression</code> has been renamed into <code>iterableExpression</code>. </li> + <li><span class="label label-info">Modified</span> The properties + <code>fontSize</code> and + <code>labelFontSize</code> have been renamed into + <code>fontSizeExpression</code> and + <code>labelFontSizeExpression</code> since both of them were already treated as expression. + </li> </ul> <h4 id="Changesinorg.eclipse.sirius.ecore.extender">Changes in <code>org.eclipse.sirius.ecore.extender</code> diff --git a/plugins/org.eclipse.sirius.doc/doc/Release_Notes.textile b/plugins/org.eclipse.sirius.doc/doc/Release_Notes.textile index c9282293fb..1f05ef01ea 100644 --- a/plugins/org.eclipse.sirius.doc/doc/Release_Notes.textile +++ b/plugins/org.eclipse.sirius.doc/doc/Release_Notes.textile @@ -24,6 +24,7 @@ h3. Specifier-Visible Changes * <span class="label label-success">Added</span> In the definition of the Properties view, hyperlink and label widgets can now have widget actions * <span class="label label-success">Added</span> Hyperlink and label widgets now have a @displayExpression@, if blank the result of the value expression will be used after a call to the method @java.lang.Object#toString()@. * <span class="label label-info">Modified</span> The rules concerning the layout of compartments have been changed/completed. You can have a look at the "dedicated chapter":specifier/diagrams/Diagrams.html#compartments_layout in the specifier documentation for more details. +* <span class="label label-info">Modified</span> The properties @fontSize@ and @labelFontSize@ have been renamed into @fontSizeExpression@ and @labelFontSizeExpression@ since both of them were already treated as expression. * <span class="label label-info">Modified</span> The property @Domain Class Expression@ in @DynamicMappingFor@ elements (in properties views definitions) has been renamed into @Iterable Expression@. * <span class="label label-warning">Deprecated</span> The extension point @org.eclipse.sirius.diagram.ui.layoutDataManager@ is deprecated. It is replaced by the new extension point @org.eclipse.sirius.diagram.ui.formatDataManager@. The deprecated extension point will be removed in the next 5.0 Sirius major release. Several classes associated with this deprecated extension point are also deprecated (see Developer-Visible Changes for details). @@ -126,6 +127,7 @@ h4. Changes in @org.eclipse.sirius.tests.swtbot.support@ h4. Changes in @org.eclipse.sirius.properties@ * <span class="label label-info">Modified</span> The property @domainClassExpression@ has been renamed into @iterableExpression@. +* <span class="label label-info">Modified</span> The properties @fontSize@ and @labelFontSize@ have been renamed into @fontSizeExpression@ and @labelFontSizeExpression@ since both of them were already treated as expression. h4. Changes in @org.eclipse.sirius.ecore.extender@ diff --git a/plugins/org.eclipse.sirius.doc/doc/specifier/properties/Properties_View_Description.html b/plugins/org.eclipse.sirius.doc/doc/specifier/properties/Properties_View_Description.html index 1815b7641e..854427f075 100644 --- a/plugins/org.eclipse.sirius.doc/doc/specifier/properties/Properties_View_Description.html +++ b/plugins/org.eclipse.sirius.doc/doc/specifier/properties/Properties_View_Description.html @@ -356,7 +356,7 @@ <em>Font name expression</em>: Is used to computes the name of the font to use. </li> <li> - <em>Font size</em>: Indicates the font size to use in points. + <em>Font size Expression</em>: Indicates the font size to use in points. </li> <li> <em>Foreground color</em>: You can specify the foreground color using @@ -506,7 +506,7 @@ <em>Font Name Expression</em>: Is used to compute the name of the font to use for the text field. </li> <li> - <em>Font Size</em> : Indicates the font size to use in points. + <em>Font Size Expression</em> : Indicates the font size to use in points. </li> <li> <em>Background Color</em>: You can specify the background color of the text field using @@ -587,7 +587,7 @@ <em>Font Name Expression</em>: Is used to compute the name of the font to use for the description. </li> <li> - <em>Font Size</em> : Indicates the font size to use in points. + <em>Font Size Expression</em> : Indicates the font size to use in points. </li> <li> <em>Background Color</em>: You can specify the background color of the description using @@ -758,7 +758,7 @@ <em>Font Name Expression</em>: Is used to compute the name of the font to use for the text field. </li> <li> - <em>Font Size</em> : Indicates the font size to use in points. + <em>Font Size Expression</em> : Indicates the font size to use in points. </li> <li> <em>Background Color</em>: You can specify the background color of the text field using @@ -974,7 +974,7 @@ <em>Label Font Name Expression</em>: Is used to compute the name of the font to use for the label. </li> <li> - <em>Label Font Size</em> : Indicates the font size to use in points. + <em>Label Font Size Expression</em> : Indicates the font size to use in points. </li> <li> <em>Label Background Color</em>: You can specify the background color of the label using diff --git a/plugins/org.eclipse.sirius.doc/doc/specifier/properties/Properties_View_Description.textile b/plugins/org.eclipse.sirius.doc/doc/specifier/properties/Properties_View_Description.textile index d698f37c30..e42880454e 100644 --- a/plugins/org.eclipse.sirius.doc/doc/specifier/properties/Properties_View_Description.textile +++ b/plugins/org.eclipse.sirius.doc/doc/specifier/properties/Properties_View_Description.textile @@ -116,7 +116,7 @@ For groups you can define the following style attributes: * _Bar style_ : Is used to define the section style. It exists 3 different styles : @TITLE BAR@, @SHORT TITLE BAR@, @NO TITLE@ (see the first table below for illusrations of these styles). * _Expanded by default_: This flag is used to define if the section should be expanded or collapsed. * _Font name expression_: Is used to computes the name of the font to use. -* _Font size_: Indicates the font size to use in points. +* _Font size Expression_: Indicates the font size to use in points. * _Foreground color_: You can specify the foreground color using "color":#colors sub-elements. * _Toggle style_: Is used to define the style of the toggle. It exists 3 different toggles : @TWISTIE@, @TREE NODE@, @NONE@ (see the second table below for illusrations of these styles). @@ -172,7 +172,7 @@ See the "styles":#styling section for a general presentation of how styles are d One of the responsibility of texts styles is to describe how text fields will be formated. The following properties are available : * _Font Name Expression_: Is used to compute the name of the font to use for the text field. -* _Font Size_ : Indicates the font size to use in points. +* _Font Size Expression_ : Indicates the font size to use in points. * _Background Color_: You can specify the background color of the text field using "color":#colors sub-elements. * _Foreground Color_: You can specify the foreground color of the text field using "color":#colors sub-elements. * _Font Format_: Is used to specify the font style attributes (Bold and/or Italic and/or Underline and/or Strike through). @@ -217,7 +217,7 @@ See the "styles":#styling section for a general presentation of how styles are d One of the responsibility of labels styles is to describe how descriptions will be formated. The following properties are available : * _Font Name Expression_: Is used to compute the name of the font to use for the description. -* _Font Size_ : Indicates the font size to use in points. +* _Font Size Expression_ : Indicates the font size to use in points. * _Background Color_: You can specify the background color of the description using "color":#colors sub-elements. * _Foreground Color_: You can specify the foreground color of the description using "color":#colors sub-elements. * _Font Format_: Is used to specify the font style attributes (Bold and/or Italic and/or Underline and/or Strike through). @@ -310,7 +310,7 @@ See the "styles":#styling section for a general presentation of how styles are d One of the responsibility of hyperlinks styles is to describe how hyperlinks will be formated. The following properties are available : * _Font Name Expression_: Is used to compute the name of the font to use for the text field. -* _Font Size_ : Indicates the font size to use in points. +* _Font Size Expression_ : Indicates the font size to use in points. * _Background Color_: You can specify the background color of the text field using "color":#colors sub-elements. * _Font Format_: Is used to specify the font style attributes (Bold and/or Italic and/or Strike through). @@ -419,7 +419,7 @@ h3(#widgets_styles). Widgets styles One of the responsibility of widgets styles is to describe how labels will be formated. The following properties are available : * _Label Font Name Expression_: Is used to compute the name of the font to use for the label. -* _Label Font Size_ : Indicates the font size to use in points. +* _Label Font Size Expression_ : Indicates the font size to use in points. * _Label Background Color_: You can specify the background color of the label using "color":#colors sub-elements. * _Label Foreground Color_: You can specify the foreground color of the label using "color":#colors sub-elements. * _Label Font Format_: Is used to specify the font style attributes (Bold and/or Italic and/or Underline and/or Strike through). diff --git a/plugins/org.eclipse.sirius.editor.properties/plugin.xml b/plugins/org.eclipse.sirius.editor.properties/plugin.xml index 335c427928..7b1a9d8bac 100644 --- a/plugins/org.eclipse.sirius.editor.properties/plugin.xml +++ b/plugins/org.eclipse.sirius.editor.properties/plugin.xml @@ -50,14 +50,14 @@ class="org.eclipse.sirius.properties.editor.properties.sections.properties.groupstyle.GroupStyleBarStylePropertySection" id="properties.section.groupStyle.BarStyle" filter="org.eclipse.sirius.properties.editor.properties.filters.properties.groupstyle.GroupStyleBarStyleFilter" - afterSection="properties.section.groupStyle.FontSize" + afterSection="properties.section.groupStyle.FontSizeExpression" tab="viewpoint.tab.general"> <input type="org.eclipse.sirius.properties.GroupStyle"/> </propertySection> <propertySection - class="org.eclipse.sirius.properties.editor.properties.sections.properties.groupstyle.GroupStyleFontSizePropertySection" - id="properties.section.groupStyle.FontSize" - filter="org.eclipse.sirius.properties.editor.properties.filters.properties.groupstyle.GroupStyleFontSizeFilter" + class="org.eclipse.sirius.properties.editor.properties.sections.properties.groupstyle.GroupStyleFontSizeExpressionPropertySection" + id="properties.section.groupStyle.FontSizeExpression" + filter="org.eclipse.sirius.properties.editor.properties.filters.properties.groupstyle.GroupStyleFontSizeExpressionFilter" afterSection="properties.section.groupStyle.FontNameExpression" tab="viewpoint.tab.general"> <input type="org.eclipse.sirius.properties.GroupStyle"/> @@ -97,14 +97,14 @@ class="org.eclipse.sirius.properties.editor.properties.sections.properties.hyperlinkwidgetstyle.HyperlinkWidgetStyleBackgroundColorPropertySection" id="properties.section.hyperlinkWidgetStyle.BackgroundColor" filter="org.eclipse.sirius.properties.editor.properties.filters.properties.hyperlinkwidgetstyle.HyperlinkWidgetStyleBackgroundColorFilter" - afterSection="properties.section.hyperlinkWidgetStyle.FontSize" + afterSection="properties.section.hyperlinkWidgetStyle.FontSizeExpression" tab="viewpoint.tab.general"> <input type="org.eclipse.sirius.properties.HyperlinkWidgetStyle"/> </propertySection> <propertySection - class="org.eclipse.sirius.properties.editor.properties.sections.properties.hyperlinkwidgetstyle.HyperlinkWidgetStyleFontSizePropertySection" - id="properties.section.hyperlinkWidgetStyle.FontSize" - filter="org.eclipse.sirius.properties.editor.properties.filters.properties.hyperlinkwidgetstyle.HyperlinkWidgetStyleFontSizeFilter" + class="org.eclipse.sirius.properties.editor.properties.sections.properties.hyperlinkwidgetstyle.HyperlinkWidgetStyleFontSizeExpressionPropertySection" + id="properties.section.hyperlinkWidgetStyle.FontSizeExpression" + filter="org.eclipse.sirius.properties.editor.properties.filters.properties.hyperlinkwidgetstyle.HyperlinkWidgetStyleFontSizeExpressionFilter" afterSection="properties.section.hyperlinkWidgetStyle.FontNameExpression" tab="viewpoint.tab.general"> <input type="org.eclipse.sirius.properties.HyperlinkWidgetStyle"/> @@ -136,14 +136,14 @@ class="org.eclipse.sirius.properties.editor.properties.sections.properties.labelwidgetstyle.LabelWidgetStyleBackgroundColorPropertySection" id="properties.section.labelWidgetStyle.BackgroundColor" filter="org.eclipse.sirius.properties.editor.properties.filters.properties.labelwidgetstyle.LabelWidgetStyleBackgroundColorFilter" - afterSection="properties.section.labelWidgetStyle.FontSize" + afterSection="properties.section.labelWidgetStyle.FontSizeExpression" tab="viewpoint.tab.general"> <input type="org.eclipse.sirius.properties.LabelWidgetStyle"/> </propertySection> <propertySection - class="org.eclipse.sirius.properties.editor.properties.sections.properties.labelwidgetstyle.LabelWidgetStyleFontSizePropertySection" - id="properties.section.labelWidgetStyle.FontSize" - filter="org.eclipse.sirius.properties.editor.properties.filters.properties.labelwidgetstyle.LabelWidgetStyleFontSizeFilter" + class="org.eclipse.sirius.properties.editor.properties.sections.properties.labelwidgetstyle.LabelWidgetStyleFontSizeExpressionPropertySection" + id="properties.section.labelWidgetStyle.FontSizeExpression" + filter="org.eclipse.sirius.properties.editor.properties.filters.properties.labelwidgetstyle.LabelWidgetStyleFontSizeExpressionFilter" afterSection="properties.section.labelWidgetStyle.FontNameExpression" tab="viewpoint.tab.general"> <input type="org.eclipse.sirius.properties.LabelWidgetStyle"/> @@ -156,7 +156,7 @@ <input type="org.eclipse.sirius.properties.LabelWidgetStyle"/> </propertySection> <propertySection - class="org.eclipse.sirius.properties.editor.properties.sections.properties.textwidgetstyle.TextWidgetStyleFontFormatPropertySectionSpec" + class="org.eclipse.sirius.properties.editor.properties.sections.properties.textwidgetstyle.TextWidgetStyleFontFormatPropertySection" id="properties.section.textWidgetStyle.FontFormat" filter="org.eclipse.sirius.properties.editor.properties.filters.properties.textwidgetstyle.TextWidgetStyleFontFormatFilter" afterSection="properties.section.textWidgetStyle.ForegroundColor" @@ -175,14 +175,14 @@ class="org.eclipse.sirius.properties.editor.properties.sections.properties.textwidgetstyle.TextWidgetStyleBackgroundColorPropertySection" id="properties.section.textWidgetStyle.BackgroundColor" filter="org.eclipse.sirius.properties.editor.properties.filters.properties.textwidgetstyle.TextWidgetStyleBackgroundColorFilter" - afterSection="properties.section.textWidgetStyle.FontSize" + afterSection="properties.section.textWidgetStyle.FontSizeExpression" tab="viewpoint.tab.general"> <input type="org.eclipse.sirius.properties.TextWidgetStyle"/> </propertySection> <propertySection - class="org.eclipse.sirius.properties.editor.properties.sections.properties.textwidgetstyle.TextWidgetStyleFontSizePropertySection" - id="properties.section.textWidgetStyle.FontSize" - filter="org.eclipse.sirius.properties.editor.properties.filters.properties.textwidgetstyle.TextWidgetStyleFontSizeFilter" + class="org.eclipse.sirius.properties.editor.properties.sections.properties.textwidgetstyle.TextWidgetStyleFontSizeExpressionPropertySection" + id="properties.section.textWidgetStyle.FontSizeExpression" + filter="org.eclipse.sirius.properties.editor.properties.filters.properties.textwidgetstyle.TextWidgetStyleFontSizeExpressionFilter" afterSection="properties.section.textWidgetStyle.FontNameExpression" tab="viewpoint.tab.general"> <input type="org.eclipse.sirius.properties.TextWidgetStyle"/> @@ -214,14 +214,14 @@ class="org.eclipse.sirius.properties.editor.properties.sections.properties.widgetstyle.WidgetStyleLabelBackgroundColorPropertySection" id="properties.section.widgetStyle.LabelBackgroundColor" filter="org.eclipse.sirius.properties.editor.properties.filters.properties.widgetstyle.WidgetStyleLabelBackgroundColorFilter" - afterSection="properties.section.widgetStyle.LabelFontSize" + afterSection="properties.section.widgetStyle.LabelFontSizeExpression" tab="viewpoint.tab.label"> <input type="org.eclipse.sirius.properties.WidgetStyle"/> </propertySection> <propertySection - class="org.eclipse.sirius.properties.editor.properties.sections.properties.widgetstyle.WidgetStyleLabelFontSizePropertySection" - id="properties.section.widgetStyle.LabelFontSize" - filter="org.eclipse.sirius.properties.editor.properties.filters.properties.widgetstyle.WidgetStyleLabelFontSizeFilter" + class="org.eclipse.sirius.properties.editor.properties.sections.properties.widgetstyle.WidgetStyleLabelFontSizeExpressionPropertySection" + id="properties.section.widgetStyle.LabelFontSizeExpression" + filter="org.eclipse.sirius.properties.editor.properties.filters.properties.widgetstyle.WidgetStyleLabelFontSizeExpressionFilter" afterSection="properties.section.widgetStyle.LabelFontNameExpression" tab="viewpoint.tab.label"> <input type="org.eclipse.sirius.properties.WidgetStyle"/> diff --git a/plugins/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/groupstyle/GroupStyleFontSizeFilter.java b/plugins/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/groupstyle/GroupStyleFontSizeExpressionFilter.java index bef19c4433..d89a405f53 100644 --- a/plugins/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/groupstyle/GroupStyleFontSizeFilter.java +++ b/plugins/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/groupstyle/GroupStyleFontSizeExpressionFilter.java @@ -18,16 +18,16 @@ import org.eclipse.sirius.properties.PropertiesPackage; // End of user code specific imports /** - * A filter for the fontSize property section. + * A filter for the fontSizeExpression property section. */ -public class GroupStyleFontSizeFilter extends ViewpointPropertyFilter { +public class GroupStyleFontSizeExpressionFilter extends ViewpointPropertyFilter { /** * {@inheritDoc} */ @Override protected EStructuralFeature getFeature() { - return PropertiesPackage.eINSTANCE.getGroupStyle_FontSize(); + return PropertiesPackage.eINSTANCE.getGroupStyle_FontSizeExpression(); } /** diff --git a/plugins/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/hyperlinkwidgetstyle/HyperlinkWidgetStyleFontSizeFilter.java b/plugins/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/hyperlinkwidgetstyle/HyperlinkWidgetStyleFontSizeExpressionFilter.java index 1664a3ba03..e29fb46b8f 100644 --- a/plugins/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/hyperlinkwidgetstyle/HyperlinkWidgetStyleFontSizeFilter.java +++ b/plugins/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/hyperlinkwidgetstyle/HyperlinkWidgetStyleFontSizeExpressionFilter.java @@ -18,16 +18,16 @@ import org.eclipse.sirius.properties.PropertiesPackage; // End of user code specific imports /** - * A filter for the fontSize property section. + * A filter for the fontSizeExpression property section. */ -public class HyperlinkWidgetStyleFontSizeFilter extends ViewpointPropertyFilter { +public class HyperlinkWidgetStyleFontSizeExpressionFilter extends ViewpointPropertyFilter { /** * {@inheritDoc} */ @Override protected EStructuralFeature getFeature() { - return PropertiesPackage.eINSTANCE.getHyperlinkWidgetStyle_FontSize(); + return PropertiesPackage.eINSTANCE.getHyperlinkWidgetStyle_FontSizeExpression(); } /** diff --git a/plugins/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/labelwidgetstyle/LabelWidgetStyleFontSizeFilter.java b/plugins/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/labelwidgetstyle/LabelWidgetStyleFontSizeExpressionFilter.java index 64e5df2c50..84c6969e62 100644 --- a/plugins/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/labelwidgetstyle/LabelWidgetStyleFontSizeFilter.java +++ b/plugins/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/labelwidgetstyle/LabelWidgetStyleFontSizeExpressionFilter.java @@ -18,16 +18,16 @@ import org.eclipse.sirius.properties.PropertiesPackage; // End of user code specific imports /** - * A filter for the fontSize property section. + * A filter for the fontSizeExpression property section. */ -public class LabelWidgetStyleFontSizeFilter extends ViewpointPropertyFilter { +public class LabelWidgetStyleFontSizeExpressionFilter extends ViewpointPropertyFilter { /** * {@inheritDoc} */ @Override protected EStructuralFeature getFeature() { - return PropertiesPackage.eINSTANCE.getLabelWidgetStyle_FontSize(); + return PropertiesPackage.eINSTANCE.getLabelWidgetStyle_FontSizeExpression(); } /** diff --git a/plugins/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/textwidgetstyle/TextWidgetStyleFontSizeFilter.java b/plugins/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/textwidgetstyle/TextWidgetStyleFontSizeExpressionFilter.java index 31ee94fb78..d1bb084ed2 100644 --- a/plugins/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/textwidgetstyle/TextWidgetStyleFontSizeFilter.java +++ b/plugins/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/textwidgetstyle/TextWidgetStyleFontSizeExpressionFilter.java @@ -18,16 +18,16 @@ import org.eclipse.sirius.properties.PropertiesPackage; // End of user code specific imports /** - * A filter for the fontSize property section. + * A filter for the fontSizeExpression property section. */ -public class TextWidgetStyleFontSizeFilter extends ViewpointPropertyFilter { +public class TextWidgetStyleFontSizeExpressionFilter extends ViewpointPropertyFilter { /** * {@inheritDoc} */ @Override protected EStructuralFeature getFeature() { - return PropertiesPackage.eINSTANCE.getTextWidgetStyle_FontSize(); + return PropertiesPackage.eINSTANCE.getTextWidgetStyle_FontSizeExpression(); } /** diff --git a/plugins/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/widgetstyle/WidgetStyleLabelFontSizeFilter.java b/plugins/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/widgetstyle/WidgetStyleLabelFontSizeExpressionFilter.java index 213ac81f61..2d4d79dc30 100644 --- a/plugins/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/widgetstyle/WidgetStyleLabelFontSizeFilter.java +++ b/plugins/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/widgetstyle/WidgetStyleLabelFontSizeExpressionFilter.java @@ -18,16 +18,16 @@ import org.eclipse.sirius.properties.PropertiesPackage; // End of user code specific imports /** - * A filter for the labelFontSize property section. + * A filter for the labelFontSizeExpression property section. */ -public class WidgetStyleLabelFontSizeFilter extends ViewpointPropertyFilter { +public class WidgetStyleLabelFontSizeExpressionFilter extends ViewpointPropertyFilter { /** * {@inheritDoc} */ @Override protected EStructuralFeature getFeature() { - return PropertiesPackage.eINSTANCE.getWidgetStyle_LabelFontSize(); + return PropertiesPackage.eINSTANCE.getWidgetStyle_LabelFontSizeExpression(); } /** diff --git a/plugins/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/groupstyle/GroupStyleFontSizePropertySection.java b/plugins/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/groupstyle/GroupStyleFontSizeExpressionPropertySection.java index 287c9db29b..4404cf8c48 100644 --- a/plugins/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/groupstyle/GroupStyleFontSizePropertySection.java +++ b/plugins/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/groupstyle/GroupStyleFontSizeExpressionPropertySection.java @@ -10,25 +10,35 @@ package org.eclipse.sirius.properties.editor.properties.sections.properties.groupstyle; import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.sirius.editor.properties.sections.common.AbstractSpinnerPropertySection; +import org.eclipse.sirius.editor.editorPlugin.SiriusEditor; +import org.eclipse.sirius.editor.properties.sections.common.AbstractTextWithButtonPropertySection; +import org.eclipse.sirius.editor.tools.api.assist.TypeContentProposalProvider; +import org.eclipse.sirius.editor.tools.internal.presentation.TextWithContentProposalDialog; import org.eclipse.sirius.properties.PropertiesPackage; +import org.eclipse.sirius.ui.tools.api.assist.ContentProposalClient; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage; +// End of user code imports + /** - * A section for the fontSize property of a GroupStyle object. + * A section for the fontSizeExpression property of a GroupStyle object. */ -public class GroupStyleFontSizePropertySection extends AbstractSpinnerPropertySection { +public class GroupStyleFontSizeExpressionPropertySection extends AbstractTextWithButtonPropertySection implements ContentProposalClient { + /** - * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractSpinnerPropertySection#getDefaultLabelText() + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractTextWithButtonPropertySection#getDefaultLabelText() */ @Override protected String getDefaultLabelText() { - return "FontSize"; //$NON-NLS-1$ + return "FontSizeExpression"; //$NON-NLS-1$ } /** - * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractSpinnerPropertySection#getLabelText() + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractTextWithButtonPropertySection#getLabelText() */ @Override protected String getLabelText() { @@ -41,72 +51,70 @@ public class GroupStyleFontSizePropertySection extends AbstractSpinnerPropertySe } /** - * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractSpinnerPropertySection#getFeature() + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractTextWithButtonPropertySection#getFeature() */ @Override - protected EAttribute getFeature() { - return PropertiesPackage.eINSTANCE.getGroupStyle_FontSize(); + public EAttribute getFeature() { + return PropertiesPackage.eINSTANCE.getGroupStyle_FontSizeExpression(); } /** - * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractSpinnerPropertySection#getFeatureAsInteger() + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractTextWithButtonPropertySection#getFeatureValue(String) */ @Override - protected String getFeatureAsText() { - String value = new String(); - if (eObject.eGet(getFeature()) != null) { - value = toInteger(eObject.eGet(getFeature()).toString()).toString(); - } - return value; + protected Object getFeatureValue(String newText) { + return newText; } /** - * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractSpinnerPropertySection#isEqual(int) + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractTextWithButtonPropertySection#isEqual(String) */ @Override protected boolean isEqual(String newText) { - boolean equal = true; - if (toInteger(newText) != null) { - equal = getFeatureAsText().equals(toInteger(newText).toString()); - } else { - refresh(); - } - return equal; + return getFeatureAsText().equals(newText); } /** - * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractSpinnerPropertySection#getFeatureValue(int) + * {@inheritDoc} */ @Override - protected Object getFeatureValue(String newText) { - return toInteger(newText); + public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) { + super.createControls(parent, tabbedPropertySheetPage); + /* + * We set the color as it's a InterpretedExpression + */ + text.setBackground(SiriusEditor.getColorRegistry().get("yellow")); + + TypeContentProposalProvider.bindPluginsCompletionProcessors(this, text); + + // Start of user code create controls + + // End of user code create controls + } - /** - * Converts the given text to the integer it represents if applicable. - * - * @return The integer the given text represents if applicable, - * <code>null</code> otherwise. - */ - private Integer toInteger(String text) { - Integer integerValue = null; - try { - integerValue = new Integer(text); - } catch (NumberFormatException e) { - // Not a Integer - } - return integerValue; + @Override + protected SelectionListener createButtonListener() { + return new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + TextWithContentProposalDialog dialog = new TextWithContentProposalDialog(composite.getShell(), GroupStyleFontSizeExpressionPropertySection.this, text.getText()); + dialog.open(); + text.setText(dialog.getResult()); + handleTextModified(); + } + }; } /** * {@inheritDoc} */ @Override - public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) { - super.createControls(parent, tabbedPropertySheetPage); + protected String getPropertyDescription() { + return ""; + } - // Start of user code create controls + // Start of user code user operations - // End of user code create controls - } + // End of user code user operations } diff --git a/plugins/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/hyperlinkwidgetstyle/HyperlinkWidgetStyleFontSizePropertySection.java b/plugins/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/hyperlinkwidgetstyle/HyperlinkWidgetStyleFontSizeExpressionPropertySection.java index b4b350b9c8..d2c72be352 100644 --- a/plugins/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/hyperlinkwidgetstyle/HyperlinkWidgetStyleFontSizePropertySection.java +++ b/plugins/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/hyperlinkwidgetstyle/HyperlinkWidgetStyleFontSizeExpressionPropertySection.java @@ -10,25 +10,36 @@ package org.eclipse.sirius.properties.editor.properties.sections.properties.hyperlinkwidgetstyle; import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.sirius.editor.properties.sections.common.AbstractSpinnerPropertySection; +import org.eclipse.sirius.editor.editorPlugin.SiriusEditor; +import org.eclipse.sirius.editor.properties.sections.common.AbstractTextWithButtonPropertySection; +import org.eclipse.sirius.editor.tools.api.assist.TypeContentProposalProvider; +import org.eclipse.sirius.editor.tools.internal.presentation.TextWithContentProposalDialog; import org.eclipse.sirius.properties.PropertiesPackage; +import org.eclipse.sirius.ui.tools.api.assist.ContentProposalClient; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage; +// End of user code imports + /** - * A section for the fontSize property of a HyperlinkWidgetStyle object. + * A section for the fontSizeExpression property of a HyperlinkWidgetStyle + * object. */ -public class HyperlinkWidgetStyleFontSizePropertySection extends AbstractSpinnerPropertySection { +public class HyperlinkWidgetStyleFontSizeExpressionPropertySection extends AbstractTextWithButtonPropertySection implements ContentProposalClient { + /** - * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractSpinnerPropertySection#getDefaultLabelText() + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractTextWithButtonPropertySection#getDefaultLabelText() */ @Override protected String getDefaultLabelText() { - return "FontSize"; //$NON-NLS-1$ + return "FontSizeExpression"; //$NON-NLS-1$ } /** - * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractSpinnerPropertySection#getLabelText() + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractTextWithButtonPropertySection#getLabelText() */ @Override protected String getLabelText() { @@ -41,72 +52,70 @@ public class HyperlinkWidgetStyleFontSizePropertySection extends AbstractSpinner } /** - * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractSpinnerPropertySection#getFeature() + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractTextWithButtonPropertySection#getFeature() */ @Override - protected EAttribute getFeature() { - return PropertiesPackage.eINSTANCE.getHyperlinkWidgetStyle_FontSize(); + public EAttribute getFeature() { + return PropertiesPackage.eINSTANCE.getHyperlinkWidgetStyle_FontSizeExpression(); } /** - * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractSpinnerPropertySection#getFeatureAsInteger() + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractTextWithButtonPropertySection#getFeatureValue(String) */ @Override - protected String getFeatureAsText() { - String value = new String(); - if (eObject.eGet(getFeature()) != null) { - value = toInteger(eObject.eGet(getFeature()).toString()).toString(); - } - return value; + protected Object getFeatureValue(String newText) { + return newText; } /** - * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractSpinnerPropertySection#isEqual(int) + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractTextWithButtonPropertySection#isEqual(String) */ @Override protected boolean isEqual(String newText) { - boolean equal = true; - if (toInteger(newText) != null) { - equal = getFeatureAsText().equals(toInteger(newText).toString()); - } else { - refresh(); - } - return equal; + return getFeatureAsText().equals(newText); } /** - * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractSpinnerPropertySection#getFeatureValue(int) + * {@inheritDoc} */ @Override - protected Object getFeatureValue(String newText) { - return toInteger(newText); + public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) { + super.createControls(parent, tabbedPropertySheetPage); + /* + * We set the color as it's a InterpretedExpression + */ + text.setBackground(SiriusEditor.getColorRegistry().get("yellow")); + + TypeContentProposalProvider.bindPluginsCompletionProcessors(this, text); + + // Start of user code create controls + + // End of user code create controls + } - /** - * Converts the given text to the integer it represents if applicable. - * - * @return The integer the given text represents if applicable, - * <code>null</code> otherwise. - */ - private Integer toInteger(String text) { - Integer integerValue = null; - try { - integerValue = new Integer(text); - } catch (NumberFormatException e) { - // Not a Integer - } - return integerValue; + @Override + protected SelectionListener createButtonListener() { + return new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + TextWithContentProposalDialog dialog = new TextWithContentProposalDialog(composite.getShell(), HyperlinkWidgetStyleFontSizeExpressionPropertySection.this, text.getText()); + dialog.open(); + text.setText(dialog.getResult()); + handleTextModified(); + } + }; } /** * {@inheritDoc} */ @Override - public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) { - super.createControls(parent, tabbedPropertySheetPage); + protected String getPropertyDescription() { + return ""; + } - // Start of user code create controls + // Start of user code user operations - // End of user code create controls - } + // End of user code user operations } diff --git a/plugins/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/labelwidgetstyle/LabelWidgetStyleFontSizePropertySection.java b/plugins/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/labelwidgetstyle/LabelWidgetStyleFontSizeExpressionPropertySection.java index e520ede0bf..e4dc8d8a8c 100644 --- a/plugins/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/labelwidgetstyle/LabelWidgetStyleFontSizePropertySection.java +++ b/plugins/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/labelwidgetstyle/LabelWidgetStyleFontSizeExpressionPropertySection.java @@ -10,25 +10,35 @@ package org.eclipse.sirius.properties.editor.properties.sections.properties.labelwidgetstyle; import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.sirius.editor.properties.sections.common.AbstractSpinnerPropertySection; +import org.eclipse.sirius.editor.editorPlugin.SiriusEditor; +import org.eclipse.sirius.editor.properties.sections.common.AbstractTextWithButtonPropertySection; +import org.eclipse.sirius.editor.tools.api.assist.TypeContentProposalProvider; +import org.eclipse.sirius.editor.tools.internal.presentation.TextWithContentProposalDialog; import org.eclipse.sirius.properties.PropertiesPackage; +import org.eclipse.sirius.ui.tools.api.assist.ContentProposalClient; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage; +// End of user code imports + /** - * A section for the fontSize property of a LabelWidgetStyle object. + * A section for the fontSizeExpression property of a LabelWidgetStyle object. */ -public class LabelWidgetStyleFontSizePropertySection extends AbstractSpinnerPropertySection { +public class LabelWidgetStyleFontSizeExpressionPropertySection extends AbstractTextWithButtonPropertySection implements ContentProposalClient { + /** - * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractSpinnerPropertySection#getDefaultLabelText() + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractTextWithButtonPropertySection#getDefaultLabelText() */ @Override protected String getDefaultLabelText() { - return "FontSize"; //$NON-NLS-1$ + return "FontSizeExpression"; //$NON-NLS-1$ } /** - * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractSpinnerPropertySection#getLabelText() + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractTextWithButtonPropertySection#getLabelText() */ @Override protected String getLabelText() { @@ -41,72 +51,70 @@ public class LabelWidgetStyleFontSizePropertySection extends AbstractSpinnerProp } /** - * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractSpinnerPropertySection#getFeature() + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractTextWithButtonPropertySection#getFeature() */ @Override - protected EAttribute getFeature() { - return PropertiesPackage.eINSTANCE.getLabelWidgetStyle_FontSize(); + public EAttribute getFeature() { + return PropertiesPackage.eINSTANCE.getLabelWidgetStyle_FontSizeExpression(); } /** - * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractSpinnerPropertySection#getFeatureAsInteger() + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractTextWithButtonPropertySection#getFeatureValue(String) */ @Override - protected String getFeatureAsText() { - String value = new String(); - if (eObject.eGet(getFeature()) != null) { - value = toInteger(eObject.eGet(getFeature()).toString()).toString(); - } - return value; + protected Object getFeatureValue(String newText) { + return newText; } /** - * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractSpinnerPropertySection#isEqual(int) + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractTextWithButtonPropertySection#isEqual(String) */ @Override protected boolean isEqual(String newText) { - boolean equal = true; - if (toInteger(newText) != null) { - equal = getFeatureAsText().equals(toInteger(newText).toString()); - } else { - refresh(); - } - return equal; + return getFeatureAsText().equals(newText); } /** - * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractSpinnerPropertySection#getFeatureValue(int) + * {@inheritDoc} */ @Override - protected Object getFeatureValue(String newText) { - return toInteger(newText); + public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) { + super.createControls(parent, tabbedPropertySheetPage); + /* + * We set the color as it's a InterpretedExpression + */ + text.setBackground(SiriusEditor.getColorRegistry().get("yellow")); + + TypeContentProposalProvider.bindPluginsCompletionProcessors(this, text); + + // Start of user code create controls + + // End of user code create controls + } - /** - * Converts the given text to the integer it represents if applicable. - * - * @return The integer the given text represents if applicable, - * <code>null</code> otherwise. - */ - private Integer toInteger(String text) { - Integer integerValue = null; - try { - integerValue = new Integer(text); - } catch (NumberFormatException e) { - // Not a Integer - } - return integerValue; + @Override + protected SelectionListener createButtonListener() { + return new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + TextWithContentProposalDialog dialog = new TextWithContentProposalDialog(composite.getShell(), LabelWidgetStyleFontSizeExpressionPropertySection.this, text.getText()); + dialog.open(); + text.setText(dialog.getResult()); + handleTextModified(); + } + }; } /** * {@inheritDoc} */ @Override - public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) { - super.createControls(parent, tabbedPropertySheetPage); + protected String getPropertyDescription() { + return ""; + } - // Start of user code create controls + // Start of user code user operations - // End of user code create controls - } + // End of user code user operations } diff --git a/plugins/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/textwidgetstyle/TextWidgetStyleFontSizePropertySection.java b/plugins/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/textwidgetstyle/TextWidgetStyleFontSizeExpressionPropertySection.java index b9bf786698..23394d1373 100644 --- a/plugins/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/textwidgetstyle/TextWidgetStyleFontSizePropertySection.java +++ b/plugins/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/textwidgetstyle/TextWidgetStyleFontSizeExpressionPropertySection.java @@ -10,25 +10,35 @@ package org.eclipse.sirius.properties.editor.properties.sections.properties.textwidgetstyle; import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.sirius.editor.properties.sections.common.AbstractSpinnerPropertySection; +import org.eclipse.sirius.editor.editorPlugin.SiriusEditor; +import org.eclipse.sirius.editor.properties.sections.common.AbstractTextWithButtonPropertySection; +import org.eclipse.sirius.editor.tools.api.assist.TypeContentProposalProvider; +import org.eclipse.sirius.editor.tools.internal.presentation.TextWithContentProposalDialog; import org.eclipse.sirius.properties.PropertiesPackage; +import org.eclipse.sirius.ui.tools.api.assist.ContentProposalClient; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage; +// End of user code imports + /** - * A section for the fontSize property of a TextWidgetStyle object. + * A section for the fontSizeExpression property of a TextWidgetStyle object. */ -public class TextWidgetStyleFontSizePropertySection extends AbstractSpinnerPropertySection { +public class TextWidgetStyleFontSizeExpressionPropertySection extends AbstractTextWithButtonPropertySection implements ContentProposalClient { + /** - * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractSpinnerPropertySection#getDefaultLabelText() + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractTextWithButtonPropertySection#getDefaultLabelText() */ @Override protected String getDefaultLabelText() { - return "FontSize"; //$NON-NLS-1$ + return "FontSizeExpression"; //$NON-NLS-1$ } /** - * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractSpinnerPropertySection#getLabelText() + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractTextWithButtonPropertySection#getLabelText() */ @Override protected String getLabelText() { @@ -41,72 +51,70 @@ public class TextWidgetStyleFontSizePropertySection extends AbstractSpinnerPrope } /** - * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractSpinnerPropertySection#getFeature() + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractTextWithButtonPropertySection#getFeature() */ @Override - protected EAttribute getFeature() { - return PropertiesPackage.eINSTANCE.getTextWidgetStyle_FontSize(); + public EAttribute getFeature() { + return PropertiesPackage.eINSTANCE.getTextWidgetStyle_FontSizeExpression(); } /** - * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractSpinnerPropertySection#getFeatureAsInteger() + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractTextWithButtonPropertySection#getFeatureValue(String) */ @Override - protected String getFeatureAsText() { - String value = new String(); - if (eObject.eGet(getFeature()) != null) { - value = toInteger(eObject.eGet(getFeature()).toString()).toString(); - } - return value; + protected Object getFeatureValue(String newText) { + return newText; } /** - * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractSpinnerPropertySection#isEqual(int) + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractTextWithButtonPropertySection#isEqual(String) */ @Override protected boolean isEqual(String newText) { - boolean equal = true; - if (toInteger(newText) != null) { - equal = getFeatureAsText().equals(toInteger(newText).toString()); - } else { - refresh(); - } - return equal; + return getFeatureAsText().equals(newText); } /** - * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractSpinnerPropertySection#getFeatureValue(int) + * {@inheritDoc} */ @Override - protected Object getFeatureValue(String newText) { - return toInteger(newText); + public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) { + super.createControls(parent, tabbedPropertySheetPage); + /* + * We set the color as it's a InterpretedExpression + */ + text.setBackground(SiriusEditor.getColorRegistry().get("yellow")); + + TypeContentProposalProvider.bindPluginsCompletionProcessors(this, text); + + // Start of user code create controls + + // End of user code create controls + } - /** - * Converts the given text to the integer it represents if applicable. - * - * @return The integer the given text represents if applicable, - * <code>null</code> otherwise. - */ - private Integer toInteger(String text) { - Integer integerValue = null; - try { - integerValue = new Integer(text); - } catch (NumberFormatException e) { - // Not a Integer - } - return integerValue; + @Override + protected SelectionListener createButtonListener() { + return new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + TextWithContentProposalDialog dialog = new TextWithContentProposalDialog(composite.getShell(), TextWidgetStyleFontSizeExpressionPropertySection.this, text.getText()); + dialog.open(); + text.setText(dialog.getResult()); + handleTextModified(); + } + }; } /** * {@inheritDoc} */ @Override - public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) { - super.createControls(parent, tabbedPropertySheetPage); + protected String getPropertyDescription() { + return ""; + } - // Start of user code create controls + // Start of user code user operations - // End of user code create controls - } + // End of user code user operations } diff --git a/plugins/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/widgetstyle/WidgetStyleLabelFontSizePropertySection.java b/plugins/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/widgetstyle/WidgetStyleLabelFontSizeExpressionPropertySection.java index 7a5d4d40e1..68d5983fb2 100644 --- a/plugins/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/widgetstyle/WidgetStyleLabelFontSizePropertySection.java +++ b/plugins/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/widgetstyle/WidgetStyleLabelFontSizeExpressionPropertySection.java @@ -10,25 +10,35 @@ package org.eclipse.sirius.properties.editor.properties.sections.properties.widgetstyle; import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.sirius.editor.properties.sections.common.AbstractSpinnerPropertySection; +import org.eclipse.sirius.editor.editorPlugin.SiriusEditor; +import org.eclipse.sirius.editor.properties.sections.common.AbstractTextWithButtonPropertySection; +import org.eclipse.sirius.editor.tools.api.assist.TypeContentProposalProvider; +import org.eclipse.sirius.editor.tools.internal.presentation.TextWithContentProposalDialog; import org.eclipse.sirius.properties.PropertiesPackage; +import org.eclipse.sirius.ui.tools.api.assist.ContentProposalClient; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage; +// End of user code imports + /** - * A section for the labelFontSize property of a WidgetStyle object. + * A section for the labelFontSizeExpression property of a WidgetStyle object. */ -public class WidgetStyleLabelFontSizePropertySection extends AbstractSpinnerPropertySection { +public class WidgetStyleLabelFontSizeExpressionPropertySection extends AbstractTextWithButtonPropertySection implements ContentProposalClient { + /** - * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractSpinnerPropertySection#getDefaultLabelText() + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractTextWithButtonPropertySection#getDefaultLabelText() */ @Override protected String getDefaultLabelText() { - return "LabelFontSize"; //$NON-NLS-1$ + return "LabelFontSizeExpression"; //$NON-NLS-1$ } /** - * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractSpinnerPropertySection#getLabelText() + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractTextWithButtonPropertySection#getLabelText() */ @Override protected String getLabelText() { @@ -41,72 +51,70 @@ public class WidgetStyleLabelFontSizePropertySection extends AbstractSpinnerProp } /** - * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractSpinnerPropertySection#getFeature() + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractTextWithButtonPropertySection#getFeature() */ @Override - protected EAttribute getFeature() { - return PropertiesPackage.eINSTANCE.getWidgetStyle_LabelFontSize(); + public EAttribute getFeature() { + return PropertiesPackage.eINSTANCE.getWidgetStyle_LabelFontSizeExpression(); } /** - * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractSpinnerPropertySection#getFeatureAsInteger() + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractTextWithButtonPropertySection#getFeatureValue(String) */ @Override - protected String getFeatureAsText() { - String value = new String(); - if (eObject.eGet(getFeature()) != null) { - value = toInteger(eObject.eGet(getFeature()).toString()).toString(); - } - return value; + protected Object getFeatureValue(String newText) { + return newText; } /** - * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractSpinnerPropertySection#isEqual(int) + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractTextWithButtonPropertySection#isEqual(String) */ @Override protected boolean isEqual(String newText) { - boolean equal = true; - if (toInteger(newText) != null) { - equal = getFeatureAsText().equals(toInteger(newText).toString()); - } else { - refresh(); - } - return equal; + return getFeatureAsText().equals(newText); } /** - * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractSpinnerPropertySection#getFeatureValue(int) + * {@inheritDoc} */ @Override - protected Object getFeatureValue(String newText) { - return toInteger(newText); + public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) { + super.createControls(parent, tabbedPropertySheetPage); + /* + * We set the color as it's a InterpretedExpression + */ + text.setBackground(SiriusEditor.getColorRegistry().get("yellow")); + + TypeContentProposalProvider.bindPluginsCompletionProcessors(this, text); + + // Start of user code create controls + + // End of user code create controls + } - /** - * Converts the given text to the integer it represents if applicable. - * - * @return The integer the given text represents if applicable, - * <code>null</code> otherwise. - */ - private Integer toInteger(String text) { - Integer integerValue = null; - try { - integerValue = new Integer(text); - } catch (NumberFormatException e) { - // Not a Integer - } - return integerValue; + @Override + protected SelectionListener createButtonListener() { + return new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + TextWithContentProposalDialog dialog = new TextWithContentProposalDialog(composite.getShell(), WidgetStyleLabelFontSizeExpressionPropertySection.this, text.getText()); + dialog.open(); + text.setText(dialog.getResult()); + handleTextModified(); + } + }; } /** * {@inheritDoc} */ @Override - public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) { - super.createControls(parent, tabbedPropertySheetPage); + protected String getPropertyDescription() { + return ""; + } - // Start of user code create controls + // Start of user code user operations - // End of user code create controls - } + // End of user code user operations } diff --git a/plugins/org.eclipse.sirius.properties.edit/plugin.properties b/plugins/org.eclipse.sirius.properties.edit/plugin.properties index 79dfdf8dc2..c8ac6305ea 100644 --- a/plugins/org.eclipse.sirius.properties.edit/plugin.properties +++ b/plugins/org.eclipse.sirius.properties.edit/plugin.properties @@ -109,22 +109,22 @@ _UI_LabelDescription_style_feature = Style _UI_TextWidgetStyle_type = Style _UI_LabelWidgetStyle_type = Style _UI_WidgetStyle_labelFontNameExpression_feature = Label Font Name Expression -_UI_WidgetStyle_labelFontSize_feature = Label Font Size +_UI_WidgetStyle_labelFontSizeExpression_feature = Label Font Size Expression _UI_WidgetStyle_labelBackgroundColor_feature = Label Background Color _UI_WidgetStyle_labelForegroundColor_feature = Label Foreground Color _UI_WidgetStyle_labelFontFormat_feature = Label Font Format _UI_TextWidgetStyle_fontNameExpression_feature = Font Name Expression -_UI_TextWidgetStyle_fontSize_feature = Font Size +_UI_TextWidgetStyle_fontSizeExpression_feature = Font Size Expression _UI_TextWidgetStyle_backgroundColor_feature = Background Color _UI_TextWidgetStyle_foregroundColor_feature = Foreground Color _UI_TextWidgetStyle_fontFormat_feature = Font Format _UI_LabelWidgetStyle_fontNameExpression_feature = Font Name Expression -_UI_LabelWidgetStyle_fontSize_feature = Font Size +_UI_LabelWidgetStyle_fontSizeExpression_feature = Font Size Expression _UI_LabelWidgetStyle_backgroundColor_feature = Background Color _UI_LabelWidgetStyle_foregroundColor_feature = Foreground Color _UI_LabelWidgetStyle_fontFormat_feature = Font Format _UI_HyperlinkWidgetStyle_fontNameExpression_feature = Font Name Expression -_UI_HyperlinkWidgetStyle_fontSize_feature = Font Size +_UI_HyperlinkWidgetStyle_fontSizeExpression_feature = Font Size Expression _UI_HyperlinkWidgetStyle_backgroundColor_feature = Background Color _UI_HyperlinkWidgetStyle_fontFormat_feature = Font Format _UI_CheckboxWidgetStyle_type = Style @@ -194,7 +194,7 @@ _UI_GroupDescription_style_feature = Style _UI_GroupStyle_backgroundColor_feature = Background Color _UI_GroupStyle_foregroundColor_feature = Foreground Color _UI_GroupStyle_fontNameExpression_feature = Font Name Expression -_UI_GroupStyle_fontSize_feature = Font Size +_UI_GroupStyle_fontSizeExpression_feature = Font Size Expression _UI_GroupStyle_barStyle_feature = Bar Style _UI_GroupStyle_toggleStyle_feature = Toggle Style _UI_ToggleStyle_TWISTIE_literal = TWISTIE diff --git a/plugins/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/GroupStyleItemProvider.java b/plugins/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/GroupStyleItemProvider.java index cb12f27c0f..5a348815db 100644 --- a/plugins/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/GroupStyleItemProvider.java +++ b/plugins/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/GroupStyleItemProvider.java @@ -64,7 +64,7 @@ public class GroupStyleItemProvider extends ItemProviderAdapter addBackgroundColorPropertyDescriptor(object); addForegroundColorPropertyDescriptor(object); addFontNameExpressionPropertyDescriptor(object); - addFontSizePropertyDescriptor(object); + addFontSizeExpressionPropertyDescriptor(object); addBarStylePropertyDescriptor(object); addToggleStylePropertyDescriptor(object); addExpandedByDefaultPropertyDescriptor(object); @@ -112,16 +112,16 @@ public class GroupStyleItemProvider extends ItemProviderAdapter } /** - * This adds a property descriptor for the Font Size feature. <!-- - * begin-user-doc --> <!-- end-user-doc --> + * This adds a property descriptor for the Font Size Expression feature. + * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ - protected void addFontSizePropertyDescriptor(Object object) { + protected void addFontSizeExpressionPropertyDescriptor(Object object) { itemPropertyDescriptors - .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_GroupStyle_fontSize_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_GroupStyle_fontSize_feature", "_UI_GroupStyle_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - PropertiesPackage.Literals.GROUP_STYLE__FONT_SIZE, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); + .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_GroupStyle_fontSizeExpression_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_GroupStyle_fontSizeExpression_feature", "_UI_GroupStyle_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + PropertiesPackage.Literals.GROUP_STYLE__FONT_SIZE_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } /** @@ -201,7 +201,7 @@ public class GroupStyleItemProvider extends ItemProviderAdapter switch (notification.getFeatureID(GroupStyle.class)) { case PropertiesPackage.GROUP_STYLE__FONT_NAME_EXPRESSION: - case PropertiesPackage.GROUP_STYLE__FONT_SIZE: + case PropertiesPackage.GROUP_STYLE__FONT_SIZE_EXPRESSION: case PropertiesPackage.GROUP_STYLE__BAR_STYLE: case PropertiesPackage.GROUP_STYLE__TOGGLE_STYLE: case PropertiesPackage.GROUP_STYLE__EXPANDED_BY_DEFAULT: diff --git a/plugins/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/HyperlinkWidgetStyleItemProvider.java b/plugins/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/HyperlinkWidgetStyleItemProvider.java index 5148e3892e..67e3b07c3e 100644 --- a/plugins/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/HyperlinkWidgetStyleItemProvider.java +++ b/plugins/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/HyperlinkWidgetStyleItemProvider.java @@ -53,7 +53,7 @@ public class HyperlinkWidgetStyleItemProvider extends WidgetStyleItemProvider { super.getPropertyDescriptors(object); addFontNameExpressionPropertyDescriptor(object); - addFontSizePropertyDescriptor(object); + addFontSizeExpressionPropertyDescriptor(object); addBackgroundColorPropertyDescriptor(object); addFontFormatPropertyDescriptor(object); } @@ -74,16 +74,16 @@ public class HyperlinkWidgetStyleItemProvider extends WidgetStyleItemProvider { } /** - * This adds a property descriptor for the Font Size feature. <!-- - * begin-user-doc --> <!-- end-user-doc --> + * This adds a property descriptor for the Font Size Expression feature. + * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ - protected void addFontSizePropertyDescriptor(Object object) { - itemPropertyDescriptors - .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_HyperlinkWidgetStyle_fontSize_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_HyperlinkWidgetStyle_fontSize_feature", "_UI_HyperlinkWidgetStyle_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - PropertiesPackage.Literals.HYPERLINK_WIDGET_STYLE__FONT_SIZE, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); + protected void addFontSizeExpressionPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_HyperlinkWidgetStyle_fontSizeExpression_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_HyperlinkWidgetStyle_fontSizeExpression_feature", "_UI_HyperlinkWidgetStyle_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + PropertiesPackage.Literals.HYPERLINK_WIDGET_STYLE__FONT_SIZE_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } /** @@ -150,7 +150,7 @@ public class HyperlinkWidgetStyleItemProvider extends WidgetStyleItemProvider { switch (notification.getFeatureID(HyperlinkWidgetStyle.class)) { case PropertiesPackage.HYPERLINK_WIDGET_STYLE__FONT_NAME_EXPRESSION: - case PropertiesPackage.HYPERLINK_WIDGET_STYLE__FONT_SIZE: + case PropertiesPackage.HYPERLINK_WIDGET_STYLE__FONT_SIZE_EXPRESSION: case PropertiesPackage.HYPERLINK_WIDGET_STYLE__FONT_FORMAT: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; diff --git a/plugins/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/LabelWidgetStyleItemProvider.java b/plugins/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/LabelWidgetStyleItemProvider.java index 1ee7fee9b7..b992ef3330 100644 --- a/plugins/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/LabelWidgetStyleItemProvider.java +++ b/plugins/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/LabelWidgetStyleItemProvider.java @@ -53,7 +53,7 @@ public class LabelWidgetStyleItemProvider extends WidgetStyleItemProvider { super.getPropertyDescriptors(object); addFontNameExpressionPropertyDescriptor(object); - addFontSizePropertyDescriptor(object); + addFontSizeExpressionPropertyDescriptor(object); addBackgroundColorPropertyDescriptor(object); addForegroundColorPropertyDescriptor(object); addFontFormatPropertyDescriptor(object); @@ -75,16 +75,16 @@ public class LabelWidgetStyleItemProvider extends WidgetStyleItemProvider { } /** - * This adds a property descriptor for the Font Size feature. <!-- - * begin-user-doc --> <!-- end-user-doc --> + * This adds a property descriptor for the Font Size Expression feature. + * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ - protected void addFontSizePropertyDescriptor(Object object) { - itemPropertyDescriptors - .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_LabelWidgetStyle_fontSize_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_LabelWidgetStyle_fontSize_feature", "_UI_LabelWidgetStyle_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - PropertiesPackage.Literals.LABEL_WIDGET_STYLE__FONT_SIZE, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); + protected void addFontSizeExpressionPropertyDescriptor(Object object) { + itemPropertyDescriptors.add( + createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_LabelWidgetStyle_fontSizeExpression_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_LabelWidgetStyle_fontSizeExpression_feature", "_UI_LabelWidgetStyle_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + PropertiesPackage.Literals.LABEL_WIDGET_STYLE__FONT_SIZE_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } /** @@ -164,7 +164,7 @@ public class LabelWidgetStyleItemProvider extends WidgetStyleItemProvider { switch (notification.getFeatureID(LabelWidgetStyle.class)) { case PropertiesPackage.LABEL_WIDGET_STYLE__FONT_NAME_EXPRESSION: - case PropertiesPackage.LABEL_WIDGET_STYLE__FONT_SIZE: + case PropertiesPackage.LABEL_WIDGET_STYLE__FONT_SIZE_EXPRESSION: case PropertiesPackage.LABEL_WIDGET_STYLE__FONT_FORMAT: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; diff --git a/plugins/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/TextWidgetStyleItemProvider.java b/plugins/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/TextWidgetStyleItemProvider.java index 4223d4a5d7..d6c16bd05f 100644 --- a/plugins/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/TextWidgetStyleItemProvider.java +++ b/plugins/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/TextWidgetStyleItemProvider.java @@ -53,7 +53,7 @@ public class TextWidgetStyleItemProvider extends WidgetStyleItemProvider { super.getPropertyDescriptors(object); addFontNameExpressionPropertyDescriptor(object); - addFontSizePropertyDescriptor(object); + addFontSizeExpressionPropertyDescriptor(object); addBackgroundColorPropertyDescriptor(object); addForegroundColorPropertyDescriptor(object); addFontFormatPropertyDescriptor(object); @@ -75,16 +75,16 @@ public class TextWidgetStyleItemProvider extends WidgetStyleItemProvider { } /** - * This adds a property descriptor for the Font Size feature. <!-- - * begin-user-doc --> <!-- end-user-doc --> + * This adds a property descriptor for the Font Size Expression feature. + * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ - protected void addFontSizePropertyDescriptor(Object object) { - itemPropertyDescriptors - .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_TextWidgetStyle_fontSize_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_TextWidgetStyle_fontSize_feature", "_UI_TextWidgetStyle_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - PropertiesPackage.Literals.TEXT_WIDGET_STYLE__FONT_SIZE, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); + protected void addFontSizeExpressionPropertyDescriptor(Object object) { + itemPropertyDescriptors.add( + createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_TextWidgetStyle_fontSizeExpression_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_TextWidgetStyle_fontSizeExpression_feature", "_UI_TextWidgetStyle_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + PropertiesPackage.Literals.TEXT_WIDGET_STYLE__FONT_SIZE_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } /** @@ -164,7 +164,7 @@ public class TextWidgetStyleItemProvider extends WidgetStyleItemProvider { switch (notification.getFeatureID(TextWidgetStyle.class)) { case PropertiesPackage.TEXT_WIDGET_STYLE__FONT_NAME_EXPRESSION: - case PropertiesPackage.TEXT_WIDGET_STYLE__FONT_SIZE: + case PropertiesPackage.TEXT_WIDGET_STYLE__FONT_SIZE_EXPRESSION: case PropertiesPackage.TEXT_WIDGET_STYLE__FONT_FORMAT: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; diff --git a/plugins/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/WidgetStyleItemProvider.java b/plugins/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/WidgetStyleItemProvider.java index 13c9335581..b36cf7bf26 100644 --- a/plugins/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/WidgetStyleItemProvider.java +++ b/plugins/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/WidgetStyleItemProvider.java @@ -62,7 +62,7 @@ public class WidgetStyleItemProvider extends ItemProviderAdapter super.getPropertyDescriptors(object); addLabelFontNameExpressionPropertyDescriptor(object); - addLabelFontSizePropertyDescriptor(object); + addLabelFontSizeExpressionPropertyDescriptor(object); addLabelBackgroundColorPropertyDescriptor(object); addLabelForegroundColorPropertyDescriptor(object); addLabelFontFormatPropertyDescriptor(object); @@ -84,16 +84,16 @@ public class WidgetStyleItemProvider extends ItemProviderAdapter } /** - * This adds a property descriptor for the Label Font Size feature. <!-- - * begin-user-doc --> <!-- end-user-doc --> + * This adds a property descriptor for the Label Font Size Expression + * feature. <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ - protected void addLabelFontSizePropertyDescriptor(Object object) { - itemPropertyDescriptors - .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_WidgetStyle_labelFontSize_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_WidgetStyle_labelFontSize_feature", "_UI_WidgetStyle_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - PropertiesPackage.Literals.WIDGET_STYLE__LABEL_FONT_SIZE, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); + protected void addLabelFontSizeExpressionPropertyDescriptor(Object object) { + itemPropertyDescriptors.add( + createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_WidgetStyle_labelFontSizeExpression_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_WidgetStyle_labelFontSizeExpression_feature", "_UI_WidgetStyle_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + PropertiesPackage.Literals.WIDGET_STYLE__LABEL_FONT_SIZE_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } /** @@ -173,7 +173,7 @@ public class WidgetStyleItemProvider extends ItemProviderAdapter switch (notification.getFeatureID(WidgetStyle.class)) { case PropertiesPackage.WIDGET_STYLE__LABEL_FONT_NAME_EXPRESSION: - case PropertiesPackage.WIDGET_STYLE__LABEL_FONT_SIZE: + case PropertiesPackage.WIDGET_STYLE__LABEL_FONT_SIZE_EXPRESSION: case PropertiesPackage.WIDGET_STYLE__LABEL_FONT_FORMAT: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; diff --git a/plugins/org.eclipse.sirius.properties/model/properties.ecore b/plugins/org.eclipse.sirius.properties/model/properties.ecore index d8a5d63028..627f173565 100644 --- a/plugins/org.eclipse.sirius.properties/model/properties.ecore +++ b/plugins/org.eclipse.sirius.properties/model/properties.ecore @@ -288,7 +288,8 @@ <eClassifiers xsi:type="ecore:EClass" name="WidgetStyle"> <eStructuralFeatures xsi:type="ecore:EAttribute" name="labelFontNameExpression" eType="ecore:EDataType ../../org.eclipse.sirius/model/viewpoint.ecore#//description/InterpretedExpression"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="labelFontSize" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="labelFontSizeExpression" + eType="ecore:EDataType ../../org.eclipse.sirius/model/viewpoint.ecore#//description/InterpretedExpression"/> <eStructuralFeatures xsi:type="ecore:EReference" name="labelBackgroundColor" eType="ecore:EClass ../../org.eclipse.sirius/model/viewpoint.ecore#//description/ColorDescription"/> <eStructuralFeatures xsi:type="ecore:EReference" name="labelForegroundColor" eType="ecore:EClass ../../org.eclipse.sirius/model/viewpoint.ecore#//description/ColorDescription"/> <eStructuralFeatures xsi:type="ecore:EAttribute" name="labelFontFormat" upperBound="4" @@ -296,7 +297,7 @@ </eClassifiers> <eClassifiers xsi:type="ecore:EClass" name="TextWidgetStyle" eSuperTypes="#//WidgetStyle"> <eStructuralFeatures xsi:type="ecore:EAttribute" name="fontNameExpression" eType="ecore:EDataType ../../org.eclipse.sirius/model/viewpoint.ecore#//description/InterpretedExpression"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="fontSize" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="fontSizeExpression" eType="ecore:EDataType ../../org.eclipse.sirius/model/viewpoint.ecore#//description/InterpretedExpression"/> <eStructuralFeatures xsi:type="ecore:EReference" name="backgroundColor" eType="ecore:EClass ../../org.eclipse.sirius/model/viewpoint.ecore#//description/ColorDescription"/> <eStructuralFeatures xsi:type="ecore:EReference" name="foregroundColor" eType="ecore:EClass ../../org.eclipse.sirius/model/viewpoint.ecore#//description/ColorDescription"/> <eStructuralFeatures xsi:type="ecore:EAttribute" name="fontFormat" upperBound="4" @@ -304,7 +305,7 @@ </eClassifiers> <eClassifiers xsi:type="ecore:EClass" name="LabelWidgetStyle" eSuperTypes="#//WidgetStyle"> <eStructuralFeatures xsi:type="ecore:EAttribute" name="fontNameExpression" eType="ecore:EDataType ../../org.eclipse.sirius/model/viewpoint.ecore#//description/InterpretedExpression"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="fontSize" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="fontSizeExpression" eType="ecore:EDataType ../../org.eclipse.sirius/model/viewpoint.ecore#//description/InterpretedExpression"/> <eStructuralFeatures xsi:type="ecore:EReference" name="backgroundColor" eType="ecore:EClass ../../org.eclipse.sirius/model/viewpoint.ecore#//description/ColorDescription"/> <eStructuralFeatures xsi:type="ecore:EReference" name="foregroundColor" eType="ecore:EClass ../../org.eclipse.sirius/model/viewpoint.ecore#//description/ColorDescription"/> <eStructuralFeatures xsi:type="ecore:EAttribute" name="fontFormat" upperBound="4" @@ -318,7 +319,7 @@ <eClassifiers xsi:type="ecore:EClass" name="ReferenceWidgetStyle" eSuperTypes="#//WidgetStyle"/> <eClassifiers xsi:type="ecore:EClass" name="HyperlinkWidgetStyle" eSuperTypes="#//WidgetStyle"> <eStructuralFeatures xsi:type="ecore:EAttribute" name="fontNameExpression" eType="ecore:EDataType ../../org.eclipse.sirius/model/viewpoint.ecore#//description/InterpretedExpression"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="fontSize" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="fontSizeExpression" eType="ecore:EDataType ../../org.eclipse.sirius/model/viewpoint.ecore#//description/InterpretedExpression"/> <eStructuralFeatures xsi:type="ecore:EReference" name="backgroundColor" eType="ecore:EClass ../../org.eclipse.sirius/model/viewpoint.ecore#//description/ColorDescription"/> <eStructuralFeatures xsi:type="ecore:EAttribute" name="fontFormat" upperBound="4" eType="ecore:EEnum ../../org.eclipse.sirius/model/viewpoint.ecore#//FontFormat"/> @@ -327,7 +328,7 @@ <eStructuralFeatures xsi:type="ecore:EReference" name="backgroundColor" eType="ecore:EClass ../../org.eclipse.sirius/model/viewpoint.ecore#//description/ColorDescription"/> <eStructuralFeatures xsi:type="ecore:EReference" name="foregroundColor" eType="ecore:EClass ../../org.eclipse.sirius/model/viewpoint.ecore#//description/ColorDescription"/> <eStructuralFeatures xsi:type="ecore:EAttribute" name="fontNameExpression" eType="ecore:EDataType ../../org.eclipse.sirius/model/viewpoint.ecore#//description/InterpretedExpression"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="fontSize" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="fontSizeExpression" eType="ecore:EDataType ../../org.eclipse.sirius/model/viewpoint.ecore#//description/InterpretedExpression"/> <eStructuralFeatures xsi:type="ecore:EAttribute" name="barStyle" eType="#//TitleBarStyle"/> <eStructuralFeatures xsi:type="ecore:EAttribute" name="toggleStyle" eType="#//ToggleStyle"/> <eStructuralFeatures xsi:type="ecore:EAttribute" name="expandedByDefault" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/> diff --git a/plugins/org.eclipse.sirius.properties/model/properties.genmodel b/plugins/org.eclipse.sirius.properties/model/properties.genmodel index 4fcbfaa222..2841581626 100644 --- a/plugins/org.eclipse.sirius.properties/model/properties.genmodel +++ b/plugins/org.eclipse.sirius.properties/model/properties.genmodel @@ -173,21 +173,21 @@ </genClasses> <genClasses ecoreClass="properties.ecore#//WidgetStyle"> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//WidgetStyle/labelFontNameExpression"/> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//WidgetStyle/labelFontSize"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//WidgetStyle/labelFontSizeExpression"/> <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference properties.ecore#//WidgetStyle/labelBackgroundColor"/> <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference properties.ecore#//WidgetStyle/labelForegroundColor"/> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//WidgetStyle/labelFontFormat"/> </genClasses> <genClasses ecoreClass="properties.ecore#//TextWidgetStyle"> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//TextWidgetStyle/fontNameExpression"/> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//TextWidgetStyle/fontSize"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//TextWidgetStyle/fontSizeExpression"/> <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference properties.ecore#//TextWidgetStyle/backgroundColor"/> <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference properties.ecore#//TextWidgetStyle/foregroundColor"/> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//TextWidgetStyle/fontFormat"/> </genClasses> <genClasses ecoreClass="properties.ecore#//LabelWidgetStyle"> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//LabelWidgetStyle/fontNameExpression"/> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//LabelWidgetStyle/fontSize"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//LabelWidgetStyle/fontSizeExpression"/> <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference properties.ecore#//LabelWidgetStyle/backgroundColor"/> <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference properties.ecore#//LabelWidgetStyle/foregroundColor"/> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//LabelWidgetStyle/fontFormat"/> @@ -200,7 +200,7 @@ <genClasses ecoreClass="properties.ecore#//ReferenceWidgetStyle"/> <genClasses ecoreClass="properties.ecore#//HyperlinkWidgetStyle"> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//HyperlinkWidgetStyle/fontNameExpression"/> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//HyperlinkWidgetStyle/fontSize"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//HyperlinkWidgetStyle/fontSizeExpression"/> <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference properties.ecore#//HyperlinkWidgetStyle/backgroundColor"/> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//HyperlinkWidgetStyle/fontFormat"/> </genClasses> @@ -208,7 +208,7 @@ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference properties.ecore#//GroupStyle/backgroundColor"/> <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference properties.ecore#//GroupStyle/foregroundColor"/> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//GroupStyle/fontNameExpression"/> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//GroupStyle/fontSize"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//GroupStyle/fontSizeExpression"/> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//GroupStyle/barStyle"/> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//GroupStyle/toggleStyle"/> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//GroupStyle/expandedByDefault"/> diff --git a/plugins/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/GroupStyle.java b/plugins/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/GroupStyle.java index f4232e090f..1b896f43bb 100644 --- a/plugins/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/GroupStyle.java +++ b/plugins/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/GroupStyle.java @@ -28,8 +28,8 @@ import org.eclipse.sirius.viewpoint.description.ColorDescription; * <em>Foreground Color</em>}</li> * <li>{@link org.eclipse.sirius.properties.GroupStyle#getFontNameExpression * <em>Font Name Expression</em>}</li> - * <li>{@link org.eclipse.sirius.properties.GroupStyle#getFontSize - * <em>Font Size</em>}</li> + * <li>{@link org.eclipse.sirius.properties.GroupStyle#getFontSizeExpression + * <em>Font Size Expression</em>}</li> * <li>{@link org.eclipse.sirius.properties.GroupStyle#getBarStyle * <em>Bar Style</em>}</li> * <li>{@link org.eclipse.sirius.properties.GroupStyle#getToggleStyle @@ -136,34 +136,36 @@ public interface GroupStyle extends EObject { void setFontNameExpression(String value); /** - * Returns the value of the '<em><b>Font Size</b></em>' attribute. <!-- - * begin-user-doc --> + * Returns the value of the '<em><b>Font Size Expression</b></em>' + * attribute. <!-- begin-user-doc --> * <p> - * If the meaning of the '<em>Font Size</em>' attribute isn't clear, there - * really should be more of a description here... + * If the meaning of the '<em>Font Size Expression</em>' attribute isn't + * clear, there really should be more of a description here... * </p> * <!-- end-user-doc --> * - * @return the value of the '<em>Font Size</em>' attribute. - * @see #setFontSize(int) - * @see org.eclipse.sirius.properties.PropertiesPackage#getGroupStyle_FontSize() - * @model + * @return the value of the '<em>Font Size Expression</em>' attribute. + * @see #setFontSizeExpression(String) + * @see org.eclipse.sirius.properties.PropertiesPackage#getGroupStyle_FontSizeExpression() + * @model dataType= + * "org.eclipse.sirius.viewpoint.description.InterpretedExpression" * @generated */ - int getFontSize(); + String getFontSizeExpression(); /** * Sets the value of the ' - * {@link org.eclipse.sirius.properties.GroupStyle#getFontSize - * <em>Font Size</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc - * --> + * {@link org.eclipse.sirius.properties.GroupStyle#getFontSizeExpression + * <em>Font Size Expression</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> * * @param value - * the new value of the '<em>Font Size</em>' attribute. - * @see #getFontSize() + * the new value of the '<em>Font Size Expression</em>' + * attribute. + * @see #getFontSizeExpression() * @generated */ - void setFontSize(int value); + void setFontSizeExpression(String value); /** * Returns the value of the '<em><b>Bar Style</b></em>' attribute. The diff --git a/plugins/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/HyperlinkWidgetStyle.java b/plugins/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/HyperlinkWidgetStyle.java index 76dc538ed2..c7f63aa5f3 100644 --- a/plugins/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/HyperlinkWidgetStyle.java +++ b/plugins/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/HyperlinkWidgetStyle.java @@ -26,8 +26,9 @@ import org.eclipse.sirius.viewpoint.description.ColorDescription; * <li> * {@link org.eclipse.sirius.properties.HyperlinkWidgetStyle#getFontNameExpression * <em>Font Name Expression</em>}</li> - * <li>{@link org.eclipse.sirius.properties.HyperlinkWidgetStyle#getFontSize - * <em>Font Size</em>}</li> + * <li> + * {@link org.eclipse.sirius.properties.HyperlinkWidgetStyle#getFontSizeExpression + * <em>Font Size Expression</em>}</li> * <li> * {@link org.eclipse.sirius.properties.HyperlinkWidgetStyle#getBackgroundColor * <em>Background Color</em>}</li> @@ -73,34 +74,36 @@ public interface HyperlinkWidgetStyle extends WidgetStyle { void setFontNameExpression(String value); /** - * Returns the value of the '<em><b>Font Size</b></em>' attribute. <!-- - * begin-user-doc --> + * Returns the value of the '<em><b>Font Size Expression</b></em>' + * attribute. <!-- begin-user-doc --> * <p> - * If the meaning of the '<em>Font Size</em>' attribute isn't clear, there - * really should be more of a description here... + * If the meaning of the '<em>Font Size Expression</em>' attribute isn't + * clear, there really should be more of a description here... * </p> * <!-- end-user-doc --> * - * @return the value of the '<em>Font Size</em>' attribute. - * @see #setFontSize(int) - * @see org.eclipse.sirius.properties.PropertiesPackage#getHyperlinkWidgetStyle_FontSize() - * @model + * @return the value of the '<em>Font Size Expression</em>' attribute. + * @see #setFontSizeExpression(String) + * @see org.eclipse.sirius.properties.PropertiesPackage#getHyperlinkWidgetStyle_FontSizeExpression() + * @model dataType= + * "org.eclipse.sirius.viewpoint.description.InterpretedExpression" * @generated */ - int getFontSize(); + String getFontSizeExpression(); /** * Sets the value of the ' - * {@link org.eclipse.sirius.properties.HyperlinkWidgetStyle#getFontSize - * <em>Font Size</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc - * --> + * {@link org.eclipse.sirius.properties.HyperlinkWidgetStyle#getFontSizeExpression + * <em>Font Size Expression</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> * * @param value - * the new value of the '<em>Font Size</em>' attribute. - * @see #getFontSize() + * the new value of the '<em>Font Size Expression</em>' + * attribute. + * @see #getFontSizeExpression() * @generated */ - void setFontSize(int value); + void setFontSizeExpression(String value); /** * Returns the value of the '<em><b>Background Color</b></em>' reference. diff --git a/plugins/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/LabelWidgetStyle.java b/plugins/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/LabelWidgetStyle.java index b58e5556b8..63448ab12c 100644 --- a/plugins/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/LabelWidgetStyle.java +++ b/plugins/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/LabelWidgetStyle.java @@ -26,8 +26,9 @@ import org.eclipse.sirius.viewpoint.description.ColorDescription; * <li> * {@link org.eclipse.sirius.properties.LabelWidgetStyle#getFontNameExpression * <em>Font Name Expression</em>}</li> - * <li>{@link org.eclipse.sirius.properties.LabelWidgetStyle#getFontSize - * <em>Font Size</em>}</li> + * <li> + * {@link org.eclipse.sirius.properties.LabelWidgetStyle#getFontSizeExpression + * <em>Font Size Expression</em>}</li> * <li>{@link org.eclipse.sirius.properties.LabelWidgetStyle#getBackgroundColor * <em>Background Color</em>}</li> * <li>{@link org.eclipse.sirius.properties.LabelWidgetStyle#getForegroundColor @@ -74,34 +75,36 @@ public interface LabelWidgetStyle extends WidgetStyle { void setFontNameExpression(String value); /** - * Returns the value of the '<em><b>Font Size</b></em>' attribute. <!-- - * begin-user-doc --> + * Returns the value of the '<em><b>Font Size Expression</b></em>' + * attribute. <!-- begin-user-doc --> * <p> - * If the meaning of the '<em>Font Size</em>' attribute isn't clear, there - * really should be more of a description here... + * If the meaning of the '<em>Font Size Expression</em>' attribute isn't + * clear, there really should be more of a description here... * </p> * <!-- end-user-doc --> * - * @return the value of the '<em>Font Size</em>' attribute. - * @see #setFontSize(int) - * @see org.eclipse.sirius.properties.PropertiesPackage#getLabelWidgetStyle_FontSize() - * @model + * @return the value of the '<em>Font Size Expression</em>' attribute. + * @see #setFontSizeExpression(String) + * @see org.eclipse.sirius.properties.PropertiesPackage#getLabelWidgetStyle_FontSizeExpression() + * @model dataType= + * "org.eclipse.sirius.viewpoint.description.InterpretedExpression" * @generated */ - int getFontSize(); + String getFontSizeExpression(); /** * Sets the value of the ' - * {@link org.eclipse.sirius.properties.LabelWidgetStyle#getFontSize - * <em>Font Size</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc - * --> + * {@link org.eclipse.sirius.properties.LabelWidgetStyle#getFontSizeExpression + * <em>Font Size Expression</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> * * @param value - * the new value of the '<em>Font Size</em>' attribute. - * @see #getFontSize() + * the new value of the '<em>Font Size Expression</em>' + * attribute. + * @see #getFontSizeExpression() * @generated */ - void setFontSize(int value); + void setFontSizeExpression(String value); /** * Returns the value of the '<em><b>Background Color</b></em>' reference. diff --git a/plugins/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/PropertiesPackage.java b/plugins/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/PropertiesPackage.java index 793673f8f8..bc0793f878 100644 --- a/plugins/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/PropertiesPackage.java +++ b/plugins/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/PropertiesPackage.java @@ -1955,13 +1955,13 @@ public interface PropertiesPackage extends EPackage { int WIDGET_STYLE__LABEL_FONT_NAME_EXPRESSION = 0; /** - * The feature id for the '<em><b>Label Font Size</b></em>' attribute. <!-- - * begin-user-doc --> <!-- end-user-doc --> + * The feature id for the '<em><b>Label Font Size Expression</b></em>' + * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated * @ordered */ - int WIDGET_STYLE__LABEL_FONT_SIZE = 1; + int WIDGET_STYLE__LABEL_FONT_SIZE_EXPRESSION = 1; /** * The feature id for the '<em><b>Label Background Color</b></em>' @@ -2021,13 +2021,13 @@ public interface PropertiesPackage extends EPackage { int TEXT_WIDGET_STYLE__LABEL_FONT_NAME_EXPRESSION = PropertiesPackage.WIDGET_STYLE__LABEL_FONT_NAME_EXPRESSION; /** - * The feature id for the '<em><b>Label Font Size</b></em>' attribute. <!-- - * begin-user-doc --> <!-- end-user-doc --> + * The feature id for the '<em><b>Label Font Size Expression</b></em>' + * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated * @ordered */ - int TEXT_WIDGET_STYLE__LABEL_FONT_SIZE = PropertiesPackage.WIDGET_STYLE__LABEL_FONT_SIZE; + int TEXT_WIDGET_STYLE__LABEL_FONT_SIZE_EXPRESSION = PropertiesPackage.WIDGET_STYLE__LABEL_FONT_SIZE_EXPRESSION; /** * The feature id for the '<em><b>Label Background Color</b></em>' @@ -2066,13 +2066,13 @@ public interface PropertiesPackage extends EPackage { int TEXT_WIDGET_STYLE__FONT_NAME_EXPRESSION = PropertiesPackage.WIDGET_STYLE_FEATURE_COUNT + 0; /** - * The feature id for the '<em><b>Font Size</b></em>' attribute. <!-- - * begin-user-doc --> <!-- end-user-doc --> + * The feature id for the '<em><b>Font Size Expression</b></em>' attribute. + * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated * @ordered */ - int TEXT_WIDGET_STYLE__FONT_SIZE = PropertiesPackage.WIDGET_STYLE_FEATURE_COUNT + 1; + int TEXT_WIDGET_STYLE__FONT_SIZE_EXPRESSION = PropertiesPackage.WIDGET_STYLE_FEATURE_COUNT + 1; /** * The feature id for the '<em><b>Background Color</b></em>' reference. <!-- @@ -2132,13 +2132,13 @@ public interface PropertiesPackage extends EPackage { int LABEL_WIDGET_STYLE__LABEL_FONT_NAME_EXPRESSION = PropertiesPackage.WIDGET_STYLE__LABEL_FONT_NAME_EXPRESSION; /** - * The feature id for the '<em><b>Label Font Size</b></em>' attribute. <!-- - * begin-user-doc --> <!-- end-user-doc --> + * The feature id for the '<em><b>Label Font Size Expression</b></em>' + * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated * @ordered */ - int LABEL_WIDGET_STYLE__LABEL_FONT_SIZE = PropertiesPackage.WIDGET_STYLE__LABEL_FONT_SIZE; + int LABEL_WIDGET_STYLE__LABEL_FONT_SIZE_EXPRESSION = PropertiesPackage.WIDGET_STYLE__LABEL_FONT_SIZE_EXPRESSION; /** * The feature id for the '<em><b>Label Background Color</b></em>' @@ -2177,13 +2177,13 @@ public interface PropertiesPackage extends EPackage { int LABEL_WIDGET_STYLE__FONT_NAME_EXPRESSION = PropertiesPackage.WIDGET_STYLE_FEATURE_COUNT + 0; /** - * The feature id for the '<em><b>Font Size</b></em>' attribute. <!-- - * begin-user-doc --> <!-- end-user-doc --> + * The feature id for the '<em><b>Font Size Expression</b></em>' attribute. + * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated * @ordered */ - int LABEL_WIDGET_STYLE__FONT_SIZE = PropertiesPackage.WIDGET_STYLE_FEATURE_COUNT + 1; + int LABEL_WIDGET_STYLE__FONT_SIZE_EXPRESSION = PropertiesPackage.WIDGET_STYLE_FEATURE_COUNT + 1; /** * The feature id for the '<em><b>Background Color</b></em>' reference. <!-- @@ -2243,13 +2243,13 @@ public interface PropertiesPackage extends EPackage { int CHECKBOX_WIDGET_STYLE__LABEL_FONT_NAME_EXPRESSION = PropertiesPackage.WIDGET_STYLE__LABEL_FONT_NAME_EXPRESSION; /** - * The feature id for the '<em><b>Label Font Size</b></em>' attribute. <!-- - * begin-user-doc --> <!-- end-user-doc --> + * The feature id for the '<em><b>Label Font Size Expression</b></em>' + * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated * @ordered */ - int CHECKBOX_WIDGET_STYLE__LABEL_FONT_SIZE = PropertiesPackage.WIDGET_STYLE__LABEL_FONT_SIZE; + int CHECKBOX_WIDGET_STYLE__LABEL_FONT_SIZE_EXPRESSION = PropertiesPackage.WIDGET_STYLE__LABEL_FONT_SIZE_EXPRESSION; /** * The feature id for the '<em><b>Label Background Color</b></em>' @@ -2309,13 +2309,13 @@ public interface PropertiesPackage extends EPackage { int RADIO_WIDGET_STYLE__LABEL_FONT_NAME_EXPRESSION = PropertiesPackage.WIDGET_STYLE__LABEL_FONT_NAME_EXPRESSION; /** - * The feature id for the '<em><b>Label Font Size</b></em>' attribute. <!-- - * begin-user-doc --> <!-- end-user-doc --> + * The feature id for the '<em><b>Label Font Size Expression</b></em>' + * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated * @ordered */ - int RADIO_WIDGET_STYLE__LABEL_FONT_SIZE = PropertiesPackage.WIDGET_STYLE__LABEL_FONT_SIZE; + int RADIO_WIDGET_STYLE__LABEL_FONT_SIZE_EXPRESSION = PropertiesPackage.WIDGET_STYLE__LABEL_FONT_SIZE_EXPRESSION; /** * The feature id for the '<em><b>Label Background Color</b></em>' @@ -2375,13 +2375,13 @@ public interface PropertiesPackage extends EPackage { int BUTTON_WIDGET_STYLE__LABEL_FONT_NAME_EXPRESSION = PropertiesPackage.WIDGET_STYLE__LABEL_FONT_NAME_EXPRESSION; /** - * The feature id for the '<em><b>Label Font Size</b></em>' attribute. <!-- - * begin-user-doc --> <!-- end-user-doc --> + * The feature id for the '<em><b>Label Font Size Expression</b></em>' + * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated * @ordered */ - int BUTTON_WIDGET_STYLE__LABEL_FONT_SIZE = PropertiesPackage.WIDGET_STYLE__LABEL_FONT_SIZE; + int BUTTON_WIDGET_STYLE__LABEL_FONT_SIZE_EXPRESSION = PropertiesPackage.WIDGET_STYLE__LABEL_FONT_SIZE_EXPRESSION; /** * The feature id for the '<em><b>Label Background Color</b></em>' @@ -2441,13 +2441,13 @@ public interface PropertiesPackage extends EPackage { int SELECT_WIDGET_STYLE__LABEL_FONT_NAME_EXPRESSION = PropertiesPackage.WIDGET_STYLE__LABEL_FONT_NAME_EXPRESSION; /** - * The feature id for the '<em><b>Label Font Size</b></em>' attribute. <!-- - * begin-user-doc --> <!-- end-user-doc --> + * The feature id for the '<em><b>Label Font Size Expression</b></em>' + * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated * @ordered */ - int SELECT_WIDGET_STYLE__LABEL_FONT_SIZE = PropertiesPackage.WIDGET_STYLE__LABEL_FONT_SIZE; + int SELECT_WIDGET_STYLE__LABEL_FONT_SIZE_EXPRESSION = PropertiesPackage.WIDGET_STYLE__LABEL_FONT_SIZE_EXPRESSION; /** * The feature id for the '<em><b>Label Background Color</b></em>' @@ -2507,13 +2507,13 @@ public interface PropertiesPackage extends EPackage { int CUSTOM_WIDGET_STYLE__LABEL_FONT_NAME_EXPRESSION = PropertiesPackage.WIDGET_STYLE__LABEL_FONT_NAME_EXPRESSION; /** - * The feature id for the '<em><b>Label Font Size</b></em>' attribute. <!-- - * begin-user-doc --> <!-- end-user-doc --> + * The feature id for the '<em><b>Label Font Size Expression</b></em>' + * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated * @ordered */ - int CUSTOM_WIDGET_STYLE__LABEL_FONT_SIZE = PropertiesPackage.WIDGET_STYLE__LABEL_FONT_SIZE; + int CUSTOM_WIDGET_STYLE__LABEL_FONT_SIZE_EXPRESSION = PropertiesPackage.WIDGET_STYLE__LABEL_FONT_SIZE_EXPRESSION; /** * The feature id for the '<em><b>Label Background Color</b></em>' @@ -2693,13 +2693,13 @@ public interface PropertiesPackage extends EPackage { int REFERENCE_WIDGET_STYLE__LABEL_FONT_NAME_EXPRESSION = PropertiesPackage.WIDGET_STYLE__LABEL_FONT_NAME_EXPRESSION; /** - * The feature id for the '<em><b>Label Font Size</b></em>' attribute. <!-- - * begin-user-doc --> <!-- end-user-doc --> + * The feature id for the '<em><b>Label Font Size Expression</b></em>' + * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated * @ordered */ - int REFERENCE_WIDGET_STYLE__LABEL_FONT_SIZE = PropertiesPackage.WIDGET_STYLE__LABEL_FONT_SIZE; + int REFERENCE_WIDGET_STYLE__LABEL_FONT_SIZE_EXPRESSION = PropertiesPackage.WIDGET_STYLE__LABEL_FONT_SIZE_EXPRESSION; /** * The feature id for the '<em><b>Label Background Color</b></em>' @@ -2759,13 +2759,13 @@ public interface PropertiesPackage extends EPackage { int HYPERLINK_WIDGET_STYLE__LABEL_FONT_NAME_EXPRESSION = PropertiesPackage.WIDGET_STYLE__LABEL_FONT_NAME_EXPRESSION; /** - * The feature id for the '<em><b>Label Font Size</b></em>' attribute. <!-- - * begin-user-doc --> <!-- end-user-doc --> + * The feature id for the '<em><b>Label Font Size Expression</b></em>' + * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated * @ordered */ - int HYPERLINK_WIDGET_STYLE__LABEL_FONT_SIZE = PropertiesPackage.WIDGET_STYLE__LABEL_FONT_SIZE; + int HYPERLINK_WIDGET_STYLE__LABEL_FONT_SIZE_EXPRESSION = PropertiesPackage.WIDGET_STYLE__LABEL_FONT_SIZE_EXPRESSION; /** * The feature id for the '<em><b>Label Background Color</b></em>' @@ -2804,13 +2804,13 @@ public interface PropertiesPackage extends EPackage { int HYPERLINK_WIDGET_STYLE__FONT_NAME_EXPRESSION = PropertiesPackage.WIDGET_STYLE_FEATURE_COUNT + 0; /** - * The feature id for the '<em><b>Font Size</b></em>' attribute. <!-- - * begin-user-doc --> <!-- end-user-doc --> + * The feature id for the '<em><b>Font Size Expression</b></em>' attribute. + * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated * @ordered */ - int HYPERLINK_WIDGET_STYLE__FONT_SIZE = PropertiesPackage.WIDGET_STYLE_FEATURE_COUNT + 1; + int HYPERLINK_WIDGET_STYLE__FONT_SIZE_EXPRESSION = PropertiesPackage.WIDGET_STYLE_FEATURE_COUNT + 1; /** * The feature id for the '<em><b>Background Color</b></em>' reference. <!-- @@ -2879,13 +2879,13 @@ public interface PropertiesPackage extends EPackage { int GROUP_STYLE__FONT_NAME_EXPRESSION = 2; /** - * The feature id for the '<em><b>Font Size</b></em>' attribute. <!-- - * begin-user-doc --> <!-- end-user-doc --> + * The feature id for the '<em><b>Font Size Expression</b></em>' attribute. + * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated * @ordered */ - int GROUP_STYLE__FONT_SIZE = 3; + int GROUP_STYLE__FONT_SIZE_EXPRESSION = 3; /** * The feature id for the '<em><b>Bar Style</b></em>' attribute. <!-- @@ -4852,15 +4852,17 @@ public interface PropertiesPackage extends EPackage { /** * Returns the meta object for the attribute ' - * {@link org.eclipse.sirius.properties.WidgetStyle#getLabelFontSize - * <em>Label Font Size</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * {@link org.eclipse.sirius.properties.WidgetStyle#getLabelFontSizeExpression + * <em>Label Font Size Expression</em>}'. <!-- begin-user-doc --> <!-- + * end-user-doc --> * - * @return the meta object for the attribute '<em>Label Font Size</em>'. - * @see org.eclipse.sirius.properties.WidgetStyle#getLabelFontSize() + * @return the meta object for the attribute ' + * <em>Label Font Size Expression</em>'. + * @see org.eclipse.sirius.properties.WidgetStyle#getLabelFontSizeExpression() * @see #getWidgetStyle() * @generated */ - EAttribute getWidgetStyle_LabelFontSize(); + EAttribute getWidgetStyle_LabelFontSizeExpression(); /** * Returns the meta object for the reference ' @@ -4932,15 +4934,17 @@ public interface PropertiesPackage extends EPackage { /** * Returns the meta object for the attribute ' - * {@link org.eclipse.sirius.properties.TextWidgetStyle#getFontSize - * <em>Font Size</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * {@link org.eclipse.sirius.properties.TextWidgetStyle#getFontSizeExpression + * <em>Font Size Expression</em>}'. <!-- begin-user-doc --> <!-- + * end-user-doc --> * - * @return the meta object for the attribute '<em>Font Size</em>'. - * @see org.eclipse.sirius.properties.TextWidgetStyle#getFontSize() + * @return the meta object for the attribute '<em>Font Size Expression</em> + * '. + * @see org.eclipse.sirius.properties.TextWidgetStyle#getFontSizeExpression() * @see #getTextWidgetStyle() * @generated */ - EAttribute getTextWidgetStyle_FontSize(); + EAttribute getTextWidgetStyle_FontSizeExpression(); /** * Returns the meta object for the reference ' @@ -5008,15 +5012,17 @@ public interface PropertiesPackage extends EPackage { /** * Returns the meta object for the attribute ' - * {@link org.eclipse.sirius.properties.LabelWidgetStyle#getFontSize - * <em>Font Size</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * {@link org.eclipse.sirius.properties.LabelWidgetStyle#getFontSizeExpression + * <em>Font Size Expression</em>}'. <!-- begin-user-doc --> <!-- + * end-user-doc --> * - * @return the meta object for the attribute '<em>Font Size</em>'. - * @see org.eclipse.sirius.properties.LabelWidgetStyle#getFontSize() + * @return the meta object for the attribute '<em>Font Size Expression</em> + * '. + * @see org.eclipse.sirius.properties.LabelWidgetStyle#getFontSizeExpression() * @see #getLabelWidgetStyle() * @generated */ - EAttribute getLabelWidgetStyle_FontSize(); + EAttribute getLabelWidgetStyle_FontSizeExpression(); /** * Returns the meta object for the reference ' @@ -5469,15 +5475,17 @@ public interface PropertiesPackage extends EPackage { /** * Returns the meta object for the attribute ' - * {@link org.eclipse.sirius.properties.HyperlinkWidgetStyle#getFontSize - * <em>Font Size</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * {@link org.eclipse.sirius.properties.HyperlinkWidgetStyle#getFontSizeExpression + * <em>Font Size Expression</em>}'. <!-- begin-user-doc --> <!-- + * end-user-doc --> * - * @return the meta object for the attribute '<em>Font Size</em>'. - * @see org.eclipse.sirius.properties.HyperlinkWidgetStyle#getFontSize() + * @return the meta object for the attribute '<em>Font Size Expression</em> + * '. + * @see org.eclipse.sirius.properties.HyperlinkWidgetStyle#getFontSizeExpression() * @see #getHyperlinkWidgetStyle() * @generated */ - EAttribute getHyperlinkWidgetStyle_FontSize(); + EAttribute getHyperlinkWidgetStyle_FontSizeExpression(); /** * Returns the meta object for the reference ' @@ -5557,15 +5565,17 @@ public interface PropertiesPackage extends EPackage { /** * Returns the meta object for the attribute ' - * {@link org.eclipse.sirius.properties.GroupStyle#getFontSize - * <em>Font Size</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * {@link org.eclipse.sirius.properties.GroupStyle#getFontSizeExpression + * <em>Font Size Expression</em>}'. <!-- begin-user-doc --> <!-- + * end-user-doc --> * - * @return the meta object for the attribute '<em>Font Size</em>'. - * @see org.eclipse.sirius.properties.GroupStyle#getFontSize() + * @return the meta object for the attribute '<em>Font Size Expression</em> + * '. + * @see org.eclipse.sirius.properties.GroupStyle#getFontSizeExpression() * @see #getGroupStyle() * @generated */ - EAttribute getGroupStyle_FontSize(); + EAttribute getGroupStyle_FontSizeExpression(); /** * Returns the meta object for the attribute ' @@ -6774,12 +6784,13 @@ public interface PropertiesPackage extends EPackage { EAttribute WIDGET_STYLE__LABEL_FONT_NAME_EXPRESSION = PropertiesPackage.eINSTANCE.getWidgetStyle_LabelFontNameExpression(); /** - * The meta object literal for the '<em><b>Label Font Size</b></em>' - * attribute feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * The meta object literal for the ' + * <em><b>Label Font Size Expression</b></em>' attribute feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> * * @generated */ - EAttribute WIDGET_STYLE__LABEL_FONT_SIZE = PropertiesPackage.eINSTANCE.getWidgetStyle_LabelFontSize(); + EAttribute WIDGET_STYLE__LABEL_FONT_SIZE_EXPRESSION = PropertiesPackage.eINSTANCE.getWidgetStyle_LabelFontSizeExpression(); /** * The meta object literal for the ' @@ -6828,12 +6839,12 @@ public interface PropertiesPackage extends EPackage { EAttribute TEXT_WIDGET_STYLE__FONT_NAME_EXPRESSION = PropertiesPackage.eINSTANCE.getTextWidgetStyle_FontNameExpression(); /** - * The meta object literal for the '<em><b>Font Size</b></em>' attribute - * feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * The meta object literal for the '<em><b>Font Size Expression</b></em> + * ' attribute feature. <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ - EAttribute TEXT_WIDGET_STYLE__FONT_SIZE = PropertiesPackage.eINSTANCE.getTextWidgetStyle_FontSize(); + EAttribute TEXT_WIDGET_STYLE__FONT_SIZE_EXPRESSION = PropertiesPackage.eINSTANCE.getTextWidgetStyle_FontSizeExpression(); /** * The meta object literal for the '<em><b>Background Color</b></em>' @@ -6880,12 +6891,12 @@ public interface PropertiesPackage extends EPackage { EAttribute LABEL_WIDGET_STYLE__FONT_NAME_EXPRESSION = PropertiesPackage.eINSTANCE.getLabelWidgetStyle_FontNameExpression(); /** - * The meta object literal for the '<em><b>Font Size</b></em>' attribute - * feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * The meta object literal for the '<em><b>Font Size Expression</b></em> + * ' attribute feature. <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ - EAttribute LABEL_WIDGET_STYLE__FONT_SIZE = PropertiesPackage.eINSTANCE.getLabelWidgetStyle_FontSize(); + EAttribute LABEL_WIDGET_STYLE__FONT_SIZE_EXPRESSION = PropertiesPackage.eINSTANCE.getLabelWidgetStyle_FontSizeExpression(); /** * The meta object literal for the '<em><b>Background Color</b></em>' @@ -7254,12 +7265,12 @@ public interface PropertiesPackage extends EPackage { EAttribute HYPERLINK_WIDGET_STYLE__FONT_NAME_EXPRESSION = PropertiesPackage.eINSTANCE.getHyperlinkWidgetStyle_FontNameExpression(); /** - * The meta object literal for the '<em><b>Font Size</b></em>' attribute - * feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * The meta object literal for the '<em><b>Font Size Expression</b></em> + * ' attribute feature. <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ - EAttribute HYPERLINK_WIDGET_STYLE__FONT_SIZE = PropertiesPackage.eINSTANCE.getHyperlinkWidgetStyle_FontSize(); + EAttribute HYPERLINK_WIDGET_STYLE__FONT_SIZE_EXPRESSION = PropertiesPackage.eINSTANCE.getHyperlinkWidgetStyle_FontSizeExpression(); /** * The meta object literal for the '<em><b>Background Color</b></em>' @@ -7314,12 +7325,12 @@ public interface PropertiesPackage extends EPackage { EAttribute GROUP_STYLE__FONT_NAME_EXPRESSION = PropertiesPackage.eINSTANCE.getGroupStyle_FontNameExpression(); /** - * The meta object literal for the '<em><b>Font Size</b></em>' attribute - * feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * The meta object literal for the '<em><b>Font Size Expression</b></em> + * ' attribute feature. <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ - EAttribute GROUP_STYLE__FONT_SIZE = PropertiesPackage.eINSTANCE.getGroupStyle_FontSize(); + EAttribute GROUP_STYLE__FONT_SIZE_EXPRESSION = PropertiesPackage.eINSTANCE.getGroupStyle_FontSizeExpression(); /** * The meta object literal for the '<em><b>Bar Style</b></em>' attribute diff --git a/plugins/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/TextWidgetStyle.java b/plugins/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/TextWidgetStyle.java index 1c394939ea..06fcc9370b 100644 --- a/plugins/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/TextWidgetStyle.java +++ b/plugins/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/TextWidgetStyle.java @@ -26,8 +26,9 @@ import org.eclipse.sirius.viewpoint.description.ColorDescription; * <li> * {@link org.eclipse.sirius.properties.TextWidgetStyle#getFontNameExpression * <em>Font Name Expression</em>}</li> - * <li>{@link org.eclipse.sirius.properties.TextWidgetStyle#getFontSize - * <em>Font Size</em>}</li> + * <li> + * {@link org.eclipse.sirius.properties.TextWidgetStyle#getFontSizeExpression + * <em>Font Size Expression</em>}</li> * <li>{@link org.eclipse.sirius.properties.TextWidgetStyle#getBackgroundColor * <em>Background Color</em>}</li> * <li>{@link org.eclipse.sirius.properties.TextWidgetStyle#getForegroundColor @@ -74,34 +75,36 @@ public interface TextWidgetStyle extends WidgetStyle { void setFontNameExpression(String value); /** - * Returns the value of the '<em><b>Font Size</b></em>' attribute. <!-- - * begin-user-doc --> + * Returns the value of the '<em><b>Font Size Expression</b></em>' + * attribute. <!-- begin-user-doc --> * <p> - * If the meaning of the '<em>Font Size</em>' attribute isn't clear, there - * really should be more of a description here... + * If the meaning of the '<em>Font Size Expression</em>' attribute isn't + * clear, there really should be more of a description here... * </p> * <!-- end-user-doc --> * - * @return the value of the '<em>Font Size</em>' attribute. - * @see #setFontSize(int) - * @see org.eclipse.sirius.properties.PropertiesPackage#getTextWidgetStyle_FontSize() - * @model + * @return the value of the '<em>Font Size Expression</em>' attribute. + * @see #setFontSizeExpression(String) + * @see org.eclipse.sirius.properties.PropertiesPackage#getTextWidgetStyle_FontSizeExpression() + * @model dataType= + * "org.eclipse.sirius.viewpoint.description.InterpretedExpression" * @generated */ - int getFontSize(); + String getFontSizeExpression(); /** * Sets the value of the ' - * {@link org.eclipse.sirius.properties.TextWidgetStyle#getFontSize - * <em>Font Size</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc - * --> + * {@link org.eclipse.sirius.properties.TextWidgetStyle#getFontSizeExpression + * <em>Font Size Expression</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> * * @param value - * the new value of the '<em>Font Size</em>' attribute. - * @see #getFontSize() + * the new value of the '<em>Font Size Expression</em>' + * attribute. + * @see #getFontSizeExpression() * @generated */ - void setFontSize(int value); + void setFontSizeExpression(String value); /** * Returns the value of the '<em><b>Background Color</b></em>' reference. diff --git a/plugins/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/WidgetStyle.java b/plugins/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/WidgetStyle.java index e99c83de74..7fda1f44c6 100644 --- a/plugins/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/WidgetStyle.java +++ b/plugins/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/WidgetStyle.java @@ -27,8 +27,9 @@ import org.eclipse.sirius.viewpoint.description.ColorDescription; * <li> * {@link org.eclipse.sirius.properties.WidgetStyle#getLabelFontNameExpression * <em>Label Font Name Expression</em>}</li> - * <li>{@link org.eclipse.sirius.properties.WidgetStyle#getLabelFontSize - * <em>Label Font Size</em>}</li> + * <li> + * {@link org.eclipse.sirius.properties.WidgetStyle#getLabelFontSizeExpression + * <em>Label Font Size Expression</em>}</li> * <li>{@link org.eclipse.sirius.properties.WidgetStyle#getLabelBackgroundColor * <em>Label Background Color</em>}</li> * <li>{@link org.eclipse.sirius.properties.WidgetStyle#getLabelForegroundColor @@ -75,34 +76,36 @@ public interface WidgetStyle extends EObject { void setLabelFontNameExpression(String value); /** - * Returns the value of the '<em><b>Label Font Size</b></em>' attribute. - * <!-- begin-user-doc --> + * Returns the value of the '<em><b>Label Font Size Expression</b></em>' + * attribute. <!-- begin-user-doc --> * <p> - * If the meaning of the '<em>Label Font Size</em>' attribute isn't clear, - * there really should be more of a description here... + * If the meaning of the '<em>Label Font Size Expression</em>' attribute + * isn't clear, there really should be more of a description here... * </p> * <!-- end-user-doc --> * - * @return the value of the '<em>Label Font Size</em>' attribute. - * @see #setLabelFontSize(int) - * @see org.eclipse.sirius.properties.PropertiesPackage#getWidgetStyle_LabelFontSize() - * @model + * @return the value of the '<em>Label Font Size Expression</em>' attribute. + * @see #setLabelFontSizeExpression(String) + * @see org.eclipse.sirius.properties.PropertiesPackage#getWidgetStyle_LabelFontSizeExpression() + * @model dataType= + * "org.eclipse.sirius.viewpoint.description.InterpretedExpression" * @generated */ - int getLabelFontSize(); + String getLabelFontSizeExpression(); /** * Sets the value of the ' - * {@link org.eclipse.sirius.properties.WidgetStyle#getLabelFontSize - * <em>Label Font Size</em>}' attribute. <!-- begin-user-doc --> <!-- - * end-user-doc --> + * {@link org.eclipse.sirius.properties.WidgetStyle#getLabelFontSizeExpression + * <em>Label Font Size Expression</em>}' attribute. <!-- begin-user-doc --> + * <!-- end-user-doc --> * * @param value - * the new value of the '<em>Label Font Size</em>' attribute. - * @see #getLabelFontSize() + * the new value of the '<em>Label Font Size Expression</em>' + * attribute. + * @see #getLabelFontSizeExpression() * @generated */ - void setLabelFontSize(int value); + void setLabelFontSizeExpression(String value); /** * Returns the value of the '<em><b>Label Background Color</b></em>' diff --git a/plugins/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/GroupStyleImpl.java b/plugins/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/GroupStyleImpl.java index 6c14a1412a..055d1b94eb 100644 --- a/plugins/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/GroupStyleImpl.java +++ b/plugins/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/GroupStyleImpl.java @@ -38,8 +38,9 @@ import org.eclipse.sirius.viewpoint.description.ColorDescription; * <li> * {@link org.eclipse.sirius.properties.impl.GroupStyleImpl#getFontNameExpression * <em>Font Name Expression</em>}</li> - * <li>{@link org.eclipse.sirius.properties.impl.GroupStyleImpl#getFontSize - * <em>Font Size</em>}</li> + * <li> + * {@link org.eclipse.sirius.properties.impl.GroupStyleImpl#getFontSizeExpression + * <em>Font Size Expression</em>}</li> * <li>{@link org.eclipse.sirius.properties.impl.GroupStyleImpl#getBarStyle * <em>Bar Style</em>}</li> * <li>{@link org.eclipse.sirius.properties.impl.GroupStyleImpl#getToggleStyle @@ -97,24 +98,26 @@ public class GroupStyleImpl extends MinimalEObjectImpl.Container implements Grou protected String fontNameExpression = GroupStyleImpl.FONT_NAME_EXPRESSION_EDEFAULT; /** - * The default value of the '{@link #getFontSize() <em>Font Size</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * The default value of the '{@link #getFontSizeExpression() + * <em>Font Size Expression</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> * - * @see #getFontSize() + * @see #getFontSizeExpression() * @generated * @ordered */ - protected static final int FONT_SIZE_EDEFAULT = 0; + protected static final String FONT_SIZE_EXPRESSION_EDEFAULT = null; /** - * The cached value of the '{@link #getFontSize() <em>Font Size</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * The cached value of the '{@link #getFontSizeExpression() + * <em>Font Size Expression</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> * - * @see #getFontSize() + * @see #getFontSizeExpression() * @generated * @ordered */ - protected int fontSize = GroupStyleImpl.FONT_SIZE_EDEFAULT; + protected String fontSizeExpression = GroupStyleImpl.FONT_SIZE_EXPRESSION_EDEFAULT; /** * The default value of the '{@link #getBarStyle() <em>Bar Style</em>}' @@ -311,8 +314,8 @@ public class GroupStyleImpl extends MinimalEObjectImpl.Container implements Grou * @generated */ @Override - public int getFontSize() { - return fontSize; + public String getFontSizeExpression() { + return fontSizeExpression; } /** @@ -321,11 +324,11 @@ public class GroupStyleImpl extends MinimalEObjectImpl.Container implements Grou * @generated */ @Override - public void setFontSize(int newFontSize) { - int oldFontSize = fontSize; - fontSize = newFontSize; + public void setFontSizeExpression(String newFontSizeExpression) { + String oldFontSizeExpression = fontSizeExpression; + fontSizeExpression = newFontSizeExpression; if (eNotificationRequired()) { - eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.GROUP_STYLE__FONT_SIZE, oldFontSize, fontSize)); + eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.GROUP_STYLE__FONT_SIZE_EXPRESSION, oldFontSizeExpression, fontSizeExpression)); } } @@ -421,8 +424,8 @@ public class GroupStyleImpl extends MinimalEObjectImpl.Container implements Grou return basicGetForegroundColor(); case PropertiesPackage.GROUP_STYLE__FONT_NAME_EXPRESSION: return getFontNameExpression(); - case PropertiesPackage.GROUP_STYLE__FONT_SIZE: - return getFontSize(); + case PropertiesPackage.GROUP_STYLE__FONT_SIZE_EXPRESSION: + return getFontSizeExpression(); case PropertiesPackage.GROUP_STYLE__BAR_STYLE: return getBarStyle(); case PropertiesPackage.GROUP_STYLE__TOGGLE_STYLE: @@ -450,8 +453,8 @@ public class GroupStyleImpl extends MinimalEObjectImpl.Container implements Grou case PropertiesPackage.GROUP_STYLE__FONT_NAME_EXPRESSION: setFontNameExpression((String) newValue); return; - case PropertiesPackage.GROUP_STYLE__FONT_SIZE: - setFontSize((Integer) newValue); + case PropertiesPackage.GROUP_STYLE__FONT_SIZE_EXPRESSION: + setFontSizeExpression((String) newValue); return; case PropertiesPackage.GROUP_STYLE__BAR_STYLE: setBarStyle((TitleBarStyle) newValue); @@ -483,8 +486,8 @@ public class GroupStyleImpl extends MinimalEObjectImpl.Container implements Grou case PropertiesPackage.GROUP_STYLE__FONT_NAME_EXPRESSION: setFontNameExpression(GroupStyleImpl.FONT_NAME_EXPRESSION_EDEFAULT); return; - case PropertiesPackage.GROUP_STYLE__FONT_SIZE: - setFontSize(GroupStyleImpl.FONT_SIZE_EDEFAULT); + case PropertiesPackage.GROUP_STYLE__FONT_SIZE_EXPRESSION: + setFontSizeExpression(GroupStyleImpl.FONT_SIZE_EXPRESSION_EDEFAULT); return; case PropertiesPackage.GROUP_STYLE__BAR_STYLE: setBarStyle(GroupStyleImpl.BAR_STYLE_EDEFAULT); @@ -513,8 +516,8 @@ public class GroupStyleImpl extends MinimalEObjectImpl.Container implements Grou return foregroundColor != null; case PropertiesPackage.GROUP_STYLE__FONT_NAME_EXPRESSION: return GroupStyleImpl.FONT_NAME_EXPRESSION_EDEFAULT == null ? fontNameExpression != null : !GroupStyleImpl.FONT_NAME_EXPRESSION_EDEFAULT.equals(fontNameExpression); - case PropertiesPackage.GROUP_STYLE__FONT_SIZE: - return fontSize != GroupStyleImpl.FONT_SIZE_EDEFAULT; + case PropertiesPackage.GROUP_STYLE__FONT_SIZE_EXPRESSION: + return GroupStyleImpl.FONT_SIZE_EXPRESSION_EDEFAULT == null ? fontSizeExpression != null : !GroupStyleImpl.FONT_SIZE_EXPRESSION_EDEFAULT.equals(fontSizeExpression); case PropertiesPackage.GROUP_STYLE__BAR_STYLE: return barStyle != GroupStyleImpl.BAR_STYLE_EDEFAULT; case PropertiesPackage.GROUP_STYLE__TOGGLE_STYLE: @@ -539,8 +542,8 @@ public class GroupStyleImpl extends MinimalEObjectImpl.Container implements Grou StringBuffer result = new StringBuffer(super.toString()); result.append(" (fontNameExpression: "); //$NON-NLS-1$ result.append(fontNameExpression); - result.append(", fontSize: "); //$NON-NLS-1$ - result.append(fontSize); + result.append(", fontSizeExpression: "); //$NON-NLS-1$ + result.append(fontSizeExpression); result.append(", barStyle: "); //$NON-NLS-1$ result.append(barStyle); result.append(", toggleStyle: "); //$NON-NLS-1$ diff --git a/plugins/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/HyperlinkWidgetStyleImpl.java b/plugins/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/HyperlinkWidgetStyleImpl.java index 96fdd2f6d0..2ef4671961 100644 --- a/plugins/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/HyperlinkWidgetStyleImpl.java +++ b/plugins/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/HyperlinkWidgetStyleImpl.java @@ -35,8 +35,8 @@ import org.eclipse.sirius.viewpoint.description.ColorDescription; * {@link org.eclipse.sirius.properties.impl.HyperlinkWidgetStyleImpl#getFontNameExpression * <em>Font Name Expression</em>}</li> * <li> - * {@link org.eclipse.sirius.properties.impl.HyperlinkWidgetStyleImpl#getFontSize - * <em>Font Size</em>}</li> + * {@link org.eclipse.sirius.properties.impl.HyperlinkWidgetStyleImpl#getFontSizeExpression + * <em>Font Size Expression</em>}</li> * <li> * {@link org.eclipse.sirius.properties.impl.HyperlinkWidgetStyleImpl#getBackgroundColor * <em>Background Color</em>}</li> @@ -71,24 +71,26 @@ public class HyperlinkWidgetStyleImpl extends WidgetStyleImpl implements Hyperli protected String fontNameExpression = HyperlinkWidgetStyleImpl.FONT_NAME_EXPRESSION_EDEFAULT; /** - * The default value of the '{@link #getFontSize() <em>Font Size</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * The default value of the '{@link #getFontSizeExpression() + * <em>Font Size Expression</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> * - * @see #getFontSize() + * @see #getFontSizeExpression() * @generated * @ordered */ - protected static final int FONT_SIZE_EDEFAULT = 0; + protected static final String FONT_SIZE_EXPRESSION_EDEFAULT = null; /** - * The cached value of the '{@link #getFontSize() <em>Font Size</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * The cached value of the '{@link #getFontSizeExpression() + * <em>Font Size Expression</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> * - * @see #getFontSize() + * @see #getFontSizeExpression() * @generated * @ordered */ - protected int fontSize = HyperlinkWidgetStyleImpl.FONT_SIZE_EDEFAULT; + protected String fontSizeExpression = HyperlinkWidgetStyleImpl.FONT_SIZE_EXPRESSION_EDEFAULT; /** * The cached value of the '{@link #getBackgroundColor() @@ -160,8 +162,8 @@ public class HyperlinkWidgetStyleImpl extends WidgetStyleImpl implements Hyperli * @generated */ @Override - public int getFontSize() { - return fontSize; + public String getFontSizeExpression() { + return fontSizeExpression; } /** @@ -170,11 +172,11 @@ public class HyperlinkWidgetStyleImpl extends WidgetStyleImpl implements Hyperli * @generated */ @Override - public void setFontSize(int newFontSize) { - int oldFontSize = fontSize; - fontSize = newFontSize; + public void setFontSizeExpression(String newFontSizeExpression) { + String oldFontSizeExpression = fontSizeExpression; + fontSizeExpression = newFontSizeExpression; if (eNotificationRequired()) { - eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.HYPERLINK_WIDGET_STYLE__FONT_SIZE, oldFontSize, fontSize)); + eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.HYPERLINK_WIDGET_STYLE__FONT_SIZE_EXPRESSION, oldFontSizeExpression, fontSizeExpression)); } } @@ -243,8 +245,8 @@ public class HyperlinkWidgetStyleImpl extends WidgetStyleImpl implements Hyperli switch (featureID) { case PropertiesPackage.HYPERLINK_WIDGET_STYLE__FONT_NAME_EXPRESSION: return getFontNameExpression(); - case PropertiesPackage.HYPERLINK_WIDGET_STYLE__FONT_SIZE: - return getFontSize(); + case PropertiesPackage.HYPERLINK_WIDGET_STYLE__FONT_SIZE_EXPRESSION: + return getFontSizeExpression(); case PropertiesPackage.HYPERLINK_WIDGET_STYLE__BACKGROUND_COLOR: if (resolve) { return getBackgroundColor(); @@ -268,8 +270,8 @@ public class HyperlinkWidgetStyleImpl extends WidgetStyleImpl implements Hyperli case PropertiesPackage.HYPERLINK_WIDGET_STYLE__FONT_NAME_EXPRESSION: setFontNameExpression((String) newValue); return; - case PropertiesPackage.HYPERLINK_WIDGET_STYLE__FONT_SIZE: - setFontSize((Integer) newValue); + case PropertiesPackage.HYPERLINK_WIDGET_STYLE__FONT_SIZE_EXPRESSION: + setFontSizeExpression((String) newValue); return; case PropertiesPackage.HYPERLINK_WIDGET_STYLE__BACKGROUND_COLOR: setBackgroundColor((ColorDescription) newValue); @@ -293,8 +295,8 @@ public class HyperlinkWidgetStyleImpl extends WidgetStyleImpl implements Hyperli case PropertiesPackage.HYPERLINK_WIDGET_STYLE__FONT_NAME_EXPRESSION: setFontNameExpression(HyperlinkWidgetStyleImpl.FONT_NAME_EXPRESSION_EDEFAULT); return; - case PropertiesPackage.HYPERLINK_WIDGET_STYLE__FONT_SIZE: - setFontSize(HyperlinkWidgetStyleImpl.FONT_SIZE_EDEFAULT); + case PropertiesPackage.HYPERLINK_WIDGET_STYLE__FONT_SIZE_EXPRESSION: + setFontSizeExpression(HyperlinkWidgetStyleImpl.FONT_SIZE_EXPRESSION_EDEFAULT); return; case PropertiesPackage.HYPERLINK_WIDGET_STYLE__BACKGROUND_COLOR: setBackgroundColor((ColorDescription) null); @@ -316,8 +318,8 @@ public class HyperlinkWidgetStyleImpl extends WidgetStyleImpl implements Hyperli switch (featureID) { case PropertiesPackage.HYPERLINK_WIDGET_STYLE__FONT_NAME_EXPRESSION: return HyperlinkWidgetStyleImpl.FONT_NAME_EXPRESSION_EDEFAULT == null ? fontNameExpression != null : !HyperlinkWidgetStyleImpl.FONT_NAME_EXPRESSION_EDEFAULT.equals(fontNameExpression); - case PropertiesPackage.HYPERLINK_WIDGET_STYLE__FONT_SIZE: - return fontSize != HyperlinkWidgetStyleImpl.FONT_SIZE_EDEFAULT; + case PropertiesPackage.HYPERLINK_WIDGET_STYLE__FONT_SIZE_EXPRESSION: + return HyperlinkWidgetStyleImpl.FONT_SIZE_EXPRESSION_EDEFAULT == null ? fontSizeExpression != null : !HyperlinkWidgetStyleImpl.FONT_SIZE_EXPRESSION_EDEFAULT.equals(fontSizeExpression); case PropertiesPackage.HYPERLINK_WIDGET_STYLE__BACKGROUND_COLOR: return backgroundColor != null; case PropertiesPackage.HYPERLINK_WIDGET_STYLE__FONT_FORMAT: @@ -340,8 +342,8 @@ public class HyperlinkWidgetStyleImpl extends WidgetStyleImpl implements Hyperli StringBuffer result = new StringBuffer(super.toString()); result.append(" (fontNameExpression: "); //$NON-NLS-1$ result.append(fontNameExpression); - result.append(", fontSize: "); //$NON-NLS-1$ - result.append(fontSize); + result.append(", fontSizeExpression: "); //$NON-NLS-1$ + result.append(fontSizeExpression); result.append(", fontFormat: "); //$NON-NLS-1$ result.append(fontFormat); result.append(')'); diff --git a/plugins/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/LabelWidgetStyleImpl.java b/plugins/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/LabelWidgetStyleImpl.java index 07f6218ef8..6b44fd4cc6 100644 --- a/plugins/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/LabelWidgetStyleImpl.java +++ b/plugins/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/LabelWidgetStyleImpl.java @@ -35,8 +35,8 @@ import org.eclipse.sirius.viewpoint.description.ColorDescription; * {@link org.eclipse.sirius.properties.impl.LabelWidgetStyleImpl#getFontNameExpression * <em>Font Name Expression</em>}</li> * <li> - * {@link org.eclipse.sirius.properties.impl.LabelWidgetStyleImpl#getFontSize - * <em>Font Size</em>}</li> + * {@link org.eclipse.sirius.properties.impl.LabelWidgetStyleImpl#getFontSizeExpression + * <em>Font Size Expression</em>}</li> * <li> * {@link org.eclipse.sirius.properties.impl.LabelWidgetStyleImpl#getBackgroundColor * <em>Background Color</em>}</li> @@ -74,24 +74,26 @@ public class LabelWidgetStyleImpl extends WidgetStyleImpl implements LabelWidget protected String fontNameExpression = LabelWidgetStyleImpl.FONT_NAME_EXPRESSION_EDEFAULT; /** - * The default value of the '{@link #getFontSize() <em>Font Size</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * The default value of the '{@link #getFontSizeExpression() + * <em>Font Size Expression</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> * - * @see #getFontSize() + * @see #getFontSizeExpression() * @generated * @ordered */ - protected static final int FONT_SIZE_EDEFAULT = 0; + protected static final String FONT_SIZE_EXPRESSION_EDEFAULT = null; /** - * The cached value of the '{@link #getFontSize() <em>Font Size</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * The cached value of the '{@link #getFontSizeExpression() + * <em>Font Size Expression</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> * - * @see #getFontSize() + * @see #getFontSizeExpression() * @generated * @ordered */ - protected int fontSize = LabelWidgetStyleImpl.FONT_SIZE_EDEFAULT; + protected String fontSizeExpression = LabelWidgetStyleImpl.FONT_SIZE_EXPRESSION_EDEFAULT; /** * The cached value of the '{@link #getBackgroundColor() @@ -174,8 +176,8 @@ public class LabelWidgetStyleImpl extends WidgetStyleImpl implements LabelWidget * @generated */ @Override - public int getFontSize() { - return fontSize; + public String getFontSizeExpression() { + return fontSizeExpression; } /** @@ -184,11 +186,11 @@ public class LabelWidgetStyleImpl extends WidgetStyleImpl implements LabelWidget * @generated */ @Override - public void setFontSize(int newFontSize) { - int oldFontSize = fontSize; - fontSize = newFontSize; + public void setFontSizeExpression(String newFontSizeExpression) { + String oldFontSizeExpression = fontSizeExpression; + fontSizeExpression = newFontSizeExpression; if (eNotificationRequired()) { - eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.LABEL_WIDGET_STYLE__FONT_SIZE, oldFontSize, fontSize)); + eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.LABEL_WIDGET_STYLE__FONT_SIZE_EXPRESSION, oldFontSizeExpression, fontSizeExpression)); } } @@ -299,8 +301,8 @@ public class LabelWidgetStyleImpl extends WidgetStyleImpl implements LabelWidget switch (featureID) { case PropertiesPackage.LABEL_WIDGET_STYLE__FONT_NAME_EXPRESSION: return getFontNameExpression(); - case PropertiesPackage.LABEL_WIDGET_STYLE__FONT_SIZE: - return getFontSize(); + case PropertiesPackage.LABEL_WIDGET_STYLE__FONT_SIZE_EXPRESSION: + return getFontSizeExpression(); case PropertiesPackage.LABEL_WIDGET_STYLE__BACKGROUND_COLOR: if (resolve) { return getBackgroundColor(); @@ -329,8 +331,8 @@ public class LabelWidgetStyleImpl extends WidgetStyleImpl implements LabelWidget case PropertiesPackage.LABEL_WIDGET_STYLE__FONT_NAME_EXPRESSION: setFontNameExpression((String) newValue); return; - case PropertiesPackage.LABEL_WIDGET_STYLE__FONT_SIZE: - setFontSize((Integer) newValue); + case PropertiesPackage.LABEL_WIDGET_STYLE__FONT_SIZE_EXPRESSION: + setFontSizeExpression((String) newValue); return; case PropertiesPackage.LABEL_WIDGET_STYLE__BACKGROUND_COLOR: setBackgroundColor((ColorDescription) newValue); @@ -357,8 +359,8 @@ public class LabelWidgetStyleImpl extends WidgetStyleImpl implements LabelWidget case PropertiesPackage.LABEL_WIDGET_STYLE__FONT_NAME_EXPRESSION: setFontNameExpression(LabelWidgetStyleImpl.FONT_NAME_EXPRESSION_EDEFAULT); return; - case PropertiesPackage.LABEL_WIDGET_STYLE__FONT_SIZE: - setFontSize(LabelWidgetStyleImpl.FONT_SIZE_EDEFAULT); + case PropertiesPackage.LABEL_WIDGET_STYLE__FONT_SIZE_EXPRESSION: + setFontSizeExpression(LabelWidgetStyleImpl.FONT_SIZE_EXPRESSION_EDEFAULT); return; case PropertiesPackage.LABEL_WIDGET_STYLE__BACKGROUND_COLOR: setBackgroundColor((ColorDescription) null); @@ -383,8 +385,8 @@ public class LabelWidgetStyleImpl extends WidgetStyleImpl implements LabelWidget switch (featureID) { case PropertiesPackage.LABEL_WIDGET_STYLE__FONT_NAME_EXPRESSION: return LabelWidgetStyleImpl.FONT_NAME_EXPRESSION_EDEFAULT == null ? fontNameExpression != null : !LabelWidgetStyleImpl.FONT_NAME_EXPRESSION_EDEFAULT.equals(fontNameExpression); - case PropertiesPackage.LABEL_WIDGET_STYLE__FONT_SIZE: - return fontSize != LabelWidgetStyleImpl.FONT_SIZE_EDEFAULT; + case PropertiesPackage.LABEL_WIDGET_STYLE__FONT_SIZE_EXPRESSION: + return LabelWidgetStyleImpl.FONT_SIZE_EXPRESSION_EDEFAULT == null ? fontSizeExpression != null : !LabelWidgetStyleImpl.FONT_SIZE_EXPRESSION_EDEFAULT.equals(fontSizeExpression); case PropertiesPackage.LABEL_WIDGET_STYLE__BACKGROUND_COLOR: return backgroundColor != null; case PropertiesPackage.LABEL_WIDGET_STYLE__FOREGROUND_COLOR: @@ -409,8 +411,8 @@ public class LabelWidgetStyleImpl extends WidgetStyleImpl implements LabelWidget StringBuffer result = new StringBuffer(super.toString()); result.append(" (fontNameExpression: "); //$NON-NLS-1$ result.append(fontNameExpression); - result.append(", fontSize: "); //$NON-NLS-1$ - result.append(fontSize); + result.append(", fontSizeExpression: "); //$NON-NLS-1$ + result.append(fontSizeExpression); result.append(", fontFormat: "); //$NON-NLS-1$ result.append(fontFormat); result.append(')'); diff --git a/plugins/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/PropertiesPackageImpl.java b/plugins/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/PropertiesPackageImpl.java index 5d68a2415d..15130f02a7 100644 --- a/plugins/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/PropertiesPackageImpl.java +++ b/plugins/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/PropertiesPackageImpl.java @@ -1730,7 +1730,7 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac * @generated */ @Override - public EAttribute getWidgetStyle_LabelFontSize() { + public EAttribute getWidgetStyle_LabelFontSizeExpression() { return (EAttribute) widgetStyleEClass.getEStructuralFeatures().get(1); } @@ -1790,7 +1790,7 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac * @generated */ @Override - public EAttribute getTextWidgetStyle_FontSize() { + public EAttribute getTextWidgetStyle_FontSizeExpression() { return (EAttribute) textWidgetStyleEClass.getEStructuralFeatures().get(1); } @@ -1850,7 +1850,7 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac * @generated */ @Override - public EAttribute getLabelWidgetStyle_FontSize() { + public EAttribute getLabelWidgetStyle_FontSizeExpression() { return (EAttribute) labelWidgetStyleEClass.getEStructuralFeatures().get(1); } @@ -2220,7 +2220,7 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac * @generated */ @Override - public EAttribute getHyperlinkWidgetStyle_FontSize() { + public EAttribute getHyperlinkWidgetStyle_FontSizeExpression() { return (EAttribute) hyperlinkWidgetStyleEClass.getEStructuralFeatures().get(1); } @@ -2290,7 +2290,7 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac * @generated */ @Override - public EAttribute getGroupStyle_FontSize() { + public EAttribute getGroupStyle_FontSizeExpression() { return (EAttribute) groupStyleEClass.getEStructuralFeatures().get(3); } @@ -2532,21 +2532,21 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac widgetStyleEClass = createEClass(PropertiesPackage.WIDGET_STYLE); createEAttribute(widgetStyleEClass, PropertiesPackage.WIDGET_STYLE__LABEL_FONT_NAME_EXPRESSION); - createEAttribute(widgetStyleEClass, PropertiesPackage.WIDGET_STYLE__LABEL_FONT_SIZE); + createEAttribute(widgetStyleEClass, PropertiesPackage.WIDGET_STYLE__LABEL_FONT_SIZE_EXPRESSION); createEReference(widgetStyleEClass, PropertiesPackage.WIDGET_STYLE__LABEL_BACKGROUND_COLOR); createEReference(widgetStyleEClass, PropertiesPackage.WIDGET_STYLE__LABEL_FOREGROUND_COLOR); createEAttribute(widgetStyleEClass, PropertiesPackage.WIDGET_STYLE__LABEL_FONT_FORMAT); textWidgetStyleEClass = createEClass(PropertiesPackage.TEXT_WIDGET_STYLE); createEAttribute(textWidgetStyleEClass, PropertiesPackage.TEXT_WIDGET_STYLE__FONT_NAME_EXPRESSION); - createEAttribute(textWidgetStyleEClass, PropertiesPackage.TEXT_WIDGET_STYLE__FONT_SIZE); + createEAttribute(textWidgetStyleEClass, PropertiesPackage.TEXT_WIDGET_STYLE__FONT_SIZE_EXPRESSION); createEReference(textWidgetStyleEClass, PropertiesPackage.TEXT_WIDGET_STYLE__BACKGROUND_COLOR); createEReference(textWidgetStyleEClass, PropertiesPackage.TEXT_WIDGET_STYLE__FOREGROUND_COLOR); createEAttribute(textWidgetStyleEClass, PropertiesPackage.TEXT_WIDGET_STYLE__FONT_FORMAT); labelWidgetStyleEClass = createEClass(PropertiesPackage.LABEL_WIDGET_STYLE); createEAttribute(labelWidgetStyleEClass, PropertiesPackage.LABEL_WIDGET_STYLE__FONT_NAME_EXPRESSION); - createEAttribute(labelWidgetStyleEClass, PropertiesPackage.LABEL_WIDGET_STYLE__FONT_SIZE); + createEAttribute(labelWidgetStyleEClass, PropertiesPackage.LABEL_WIDGET_STYLE__FONT_SIZE_EXPRESSION); createEReference(labelWidgetStyleEClass, PropertiesPackage.LABEL_WIDGET_STYLE__BACKGROUND_COLOR); createEReference(labelWidgetStyleEClass, PropertiesPackage.LABEL_WIDGET_STYLE__FOREGROUND_COLOR); createEAttribute(labelWidgetStyleEClass, PropertiesPackage.LABEL_WIDGET_STYLE__FONT_FORMAT); @@ -2565,7 +2565,7 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac hyperlinkWidgetStyleEClass = createEClass(PropertiesPackage.HYPERLINK_WIDGET_STYLE); createEAttribute(hyperlinkWidgetStyleEClass, PropertiesPackage.HYPERLINK_WIDGET_STYLE__FONT_NAME_EXPRESSION); - createEAttribute(hyperlinkWidgetStyleEClass, PropertiesPackage.HYPERLINK_WIDGET_STYLE__FONT_SIZE); + createEAttribute(hyperlinkWidgetStyleEClass, PropertiesPackage.HYPERLINK_WIDGET_STYLE__FONT_SIZE_EXPRESSION); createEReference(hyperlinkWidgetStyleEClass, PropertiesPackage.HYPERLINK_WIDGET_STYLE__BACKGROUND_COLOR); createEAttribute(hyperlinkWidgetStyleEClass, PropertiesPackage.HYPERLINK_WIDGET_STYLE__FONT_FORMAT); @@ -2573,7 +2573,7 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac createEReference(groupStyleEClass, PropertiesPackage.GROUP_STYLE__BACKGROUND_COLOR); createEReference(groupStyleEClass, PropertiesPackage.GROUP_STYLE__FOREGROUND_COLOR); createEAttribute(groupStyleEClass, PropertiesPackage.GROUP_STYLE__FONT_NAME_EXPRESSION); - createEAttribute(groupStyleEClass, PropertiesPackage.GROUP_STYLE__FONT_SIZE); + createEAttribute(groupStyleEClass, PropertiesPackage.GROUP_STYLE__FONT_SIZE_EXPRESSION); createEAttribute(groupStyleEClass, PropertiesPackage.GROUP_STYLE__BAR_STYLE); createEAttribute(groupStyleEClass, PropertiesPackage.GROUP_STYLE__TOGGLE_STYLE); createEAttribute(groupStyleEClass, PropertiesPackage.GROUP_STYLE__EXPANDED_BY_DEFAULT); @@ -3005,8 +3005,8 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac initEClass(widgetStyleEClass, WidgetStyle.class, "WidgetStyle", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ initEAttribute(getWidgetStyle_LabelFontNameExpression(), theDescriptionPackage.getInterpretedExpression(), "labelFontNameExpression", null, 0, 1, WidgetStyle.class, !EPackageImpl.IS_TRANSIENT, //$NON-NLS-1$ !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE, !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); - initEAttribute(getWidgetStyle_LabelFontSize(), ecorePackage.getEInt(), "labelFontSize", null, 0, 1, WidgetStyle.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, //$NON-NLS-1$ - EPackageImpl.IS_CHANGEABLE, !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); + initEAttribute(getWidgetStyle_LabelFontSizeExpression(), theDescriptionPackage.getInterpretedExpression(), "labelFontSizeExpression", null, 0, 1, WidgetStyle.class, !EPackageImpl.IS_TRANSIENT, //$NON-NLS-1$ + !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE, !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); initEReference(getWidgetStyle_LabelBackgroundColor(), theDescriptionPackage.getColorDescription(), null, "labelBackgroundColor", null, 0, 1, WidgetStyle.class, !EPackageImpl.IS_TRANSIENT, //$NON-NLS-1$ !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); @@ -3019,8 +3019,8 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac initEClass(textWidgetStyleEClass, TextWidgetStyle.class, "TextWidgetStyle", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ initEAttribute(getTextWidgetStyle_FontNameExpression(), theDescriptionPackage.getInterpretedExpression(), "fontNameExpression", null, 0, 1, TextWidgetStyle.class, !EPackageImpl.IS_TRANSIENT, //$NON-NLS-1$ !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE, !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); - initEAttribute(getTextWidgetStyle_FontSize(), ecorePackage.getEInt(), "fontSize", null, 0, 1, TextWidgetStyle.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, //$NON-NLS-1$ - EPackageImpl.IS_CHANGEABLE, !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); + initEAttribute(getTextWidgetStyle_FontSizeExpression(), theDescriptionPackage.getInterpretedExpression(), "fontSizeExpression", null, 0, 1, TextWidgetStyle.class, !EPackageImpl.IS_TRANSIENT, //$NON-NLS-1$ + !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE, !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); initEReference(getTextWidgetStyle_BackgroundColor(), theDescriptionPackage.getColorDescription(), null, "backgroundColor", null, 0, 1, TextWidgetStyle.class, !EPackageImpl.IS_TRANSIENT, //$NON-NLS-1$ !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); @@ -3033,8 +3033,8 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac initEClass(labelWidgetStyleEClass, LabelWidgetStyle.class, "LabelWidgetStyle", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ initEAttribute(getLabelWidgetStyle_FontNameExpression(), theDescriptionPackage.getInterpretedExpression(), "fontNameExpression", null, 0, 1, LabelWidgetStyle.class, !EPackageImpl.IS_TRANSIENT, //$NON-NLS-1$ !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE, !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); - initEAttribute(getLabelWidgetStyle_FontSize(), ecorePackage.getEInt(), "fontSize", null, 0, 1, LabelWidgetStyle.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, //$NON-NLS-1$ - EPackageImpl.IS_CHANGEABLE, !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); + initEAttribute(getLabelWidgetStyle_FontSizeExpression(), theDescriptionPackage.getInterpretedExpression(), "fontSizeExpression", null, 0, 1, LabelWidgetStyle.class, !EPackageImpl.IS_TRANSIENT, //$NON-NLS-1$ + !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE, !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); initEReference(getLabelWidgetStyle_BackgroundColor(), theDescriptionPackage.getColorDescription(), null, "backgroundColor", null, 0, 1, LabelWidgetStyle.class, !EPackageImpl.IS_TRANSIENT, //$NON-NLS-1$ !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); @@ -3060,8 +3060,9 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac initEAttribute(getHyperlinkWidgetStyle_FontNameExpression(), theDescriptionPackage.getInterpretedExpression(), "fontNameExpression", null, 0, 1, HyperlinkWidgetStyle.class, //$NON-NLS-1$ !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE, !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); - initEAttribute(getHyperlinkWidgetStyle_FontSize(), ecorePackage.getEInt(), "fontSize", null, 0, 1, HyperlinkWidgetStyle.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, //$NON-NLS-1$ - EPackageImpl.IS_CHANGEABLE, !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); + initEAttribute(getHyperlinkWidgetStyle_FontSizeExpression(), theDescriptionPackage.getInterpretedExpression(), "fontSizeExpression", null, 0, 1, HyperlinkWidgetStyle.class, //$NON-NLS-1$ + !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE, !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, + EPackageImpl.IS_ORDERED); initEReference(getHyperlinkWidgetStyle_BackgroundColor(), theDescriptionPackage.getColorDescription(), null, "backgroundColor", null, 0, 1, HyperlinkWidgetStyle.class, //$NON-NLS-1$ !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); @@ -3077,8 +3078,8 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); initEAttribute(getGroupStyle_FontNameExpression(), theDescriptionPackage.getInterpretedExpression(), "fontNameExpression", null, 0, 1, GroupStyle.class, !EPackageImpl.IS_TRANSIENT, //$NON-NLS-1$ !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE, !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); - initEAttribute(getGroupStyle_FontSize(), ecorePackage.getEInt(), "fontSize", null, 0, 1, GroupStyle.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE, //$NON-NLS-1$ - !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); + initEAttribute(getGroupStyle_FontSizeExpression(), theDescriptionPackage.getInterpretedExpression(), "fontSizeExpression", null, 0, 1, GroupStyle.class, !EPackageImpl.IS_TRANSIENT, //$NON-NLS-1$ + !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE, !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); initEAttribute(getGroupStyle_BarStyle(), this.getTitleBarStyle(), "barStyle", null, 0, 1, GroupStyle.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE, //$NON-NLS-1$ !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); initEAttribute(getGroupStyle_ToggleStyle(), this.getToggleStyle(), "toggleStyle", null, 0, 1, GroupStyle.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, //$NON-NLS-1$ diff --git a/plugins/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/TextWidgetStyleImpl.java b/plugins/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/TextWidgetStyleImpl.java index fff49dab8c..e490ddfdb2 100644 --- a/plugins/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/TextWidgetStyleImpl.java +++ b/plugins/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/TextWidgetStyleImpl.java @@ -34,8 +34,9 @@ import org.eclipse.sirius.viewpoint.description.ColorDescription; * <li> * {@link org.eclipse.sirius.properties.impl.TextWidgetStyleImpl#getFontNameExpression * <em>Font Name Expression</em>}</li> - * <li>{@link org.eclipse.sirius.properties.impl.TextWidgetStyleImpl#getFontSize - * <em>Font Size</em>}</li> + * <li> + * {@link org.eclipse.sirius.properties.impl.TextWidgetStyleImpl#getFontSizeExpression + * <em>Font Size Expression</em>}</li> * <li> * {@link org.eclipse.sirius.properties.impl.TextWidgetStyleImpl#getBackgroundColor * <em>Background Color</em>}</li> @@ -73,24 +74,26 @@ public class TextWidgetStyleImpl extends WidgetStyleImpl implements TextWidgetSt protected String fontNameExpression = TextWidgetStyleImpl.FONT_NAME_EXPRESSION_EDEFAULT; /** - * The default value of the '{@link #getFontSize() <em>Font Size</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * The default value of the '{@link #getFontSizeExpression() + * <em>Font Size Expression</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> * - * @see #getFontSize() + * @see #getFontSizeExpression() * @generated * @ordered */ - protected static final int FONT_SIZE_EDEFAULT = 0; + protected static final String FONT_SIZE_EXPRESSION_EDEFAULT = null; /** - * The cached value of the '{@link #getFontSize() <em>Font Size</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * The cached value of the '{@link #getFontSizeExpression() + * <em>Font Size Expression</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> * - * @see #getFontSize() + * @see #getFontSizeExpression() * @generated * @ordered */ - protected int fontSize = TextWidgetStyleImpl.FONT_SIZE_EDEFAULT; + protected String fontSizeExpression = TextWidgetStyleImpl.FONT_SIZE_EXPRESSION_EDEFAULT; /** * The cached value of the '{@link #getBackgroundColor() @@ -173,8 +176,8 @@ public class TextWidgetStyleImpl extends WidgetStyleImpl implements TextWidgetSt * @generated */ @Override - public int getFontSize() { - return fontSize; + public String getFontSizeExpression() { + return fontSizeExpression; } /** @@ -183,11 +186,11 @@ public class TextWidgetStyleImpl extends WidgetStyleImpl implements TextWidgetSt * @generated */ @Override - public void setFontSize(int newFontSize) { - int oldFontSize = fontSize; - fontSize = newFontSize; + public void setFontSizeExpression(String newFontSizeExpression) { + String oldFontSizeExpression = fontSizeExpression; + fontSizeExpression = newFontSizeExpression; if (eNotificationRequired()) { - eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.TEXT_WIDGET_STYLE__FONT_SIZE, oldFontSize, fontSize)); + eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.TEXT_WIDGET_STYLE__FONT_SIZE_EXPRESSION, oldFontSizeExpression, fontSizeExpression)); } } @@ -298,8 +301,8 @@ public class TextWidgetStyleImpl extends WidgetStyleImpl implements TextWidgetSt switch (featureID) { case PropertiesPackage.TEXT_WIDGET_STYLE__FONT_NAME_EXPRESSION: return getFontNameExpression(); - case PropertiesPackage.TEXT_WIDGET_STYLE__FONT_SIZE: - return getFontSize(); + case PropertiesPackage.TEXT_WIDGET_STYLE__FONT_SIZE_EXPRESSION: + return getFontSizeExpression(); case PropertiesPackage.TEXT_WIDGET_STYLE__BACKGROUND_COLOR: if (resolve) { return getBackgroundColor(); @@ -328,8 +331,8 @@ public class TextWidgetStyleImpl extends WidgetStyleImpl implements TextWidgetSt case PropertiesPackage.TEXT_WIDGET_STYLE__FONT_NAME_EXPRESSION: setFontNameExpression((String) newValue); return; - case PropertiesPackage.TEXT_WIDGET_STYLE__FONT_SIZE: - setFontSize((Integer) newValue); + case PropertiesPackage.TEXT_WIDGET_STYLE__FONT_SIZE_EXPRESSION: + setFontSizeExpression((String) newValue); return; case PropertiesPackage.TEXT_WIDGET_STYLE__BACKGROUND_COLOR: setBackgroundColor((ColorDescription) newValue); @@ -356,8 +359,8 @@ public class TextWidgetStyleImpl extends WidgetStyleImpl implements TextWidgetSt case PropertiesPackage.TEXT_WIDGET_STYLE__FONT_NAME_EXPRESSION: setFontNameExpression(TextWidgetStyleImpl.FONT_NAME_EXPRESSION_EDEFAULT); return; - case PropertiesPackage.TEXT_WIDGET_STYLE__FONT_SIZE: - setFontSize(TextWidgetStyleImpl.FONT_SIZE_EDEFAULT); + case PropertiesPackage.TEXT_WIDGET_STYLE__FONT_SIZE_EXPRESSION: + setFontSizeExpression(TextWidgetStyleImpl.FONT_SIZE_EXPRESSION_EDEFAULT); return; case PropertiesPackage.TEXT_WIDGET_STYLE__BACKGROUND_COLOR: setBackgroundColor((ColorDescription) null); @@ -382,8 +385,8 @@ public class TextWidgetStyleImpl extends WidgetStyleImpl implements TextWidgetSt switch (featureID) { case PropertiesPackage.TEXT_WIDGET_STYLE__FONT_NAME_EXPRESSION: return TextWidgetStyleImpl.FONT_NAME_EXPRESSION_EDEFAULT == null ? fontNameExpression != null : !TextWidgetStyleImpl.FONT_NAME_EXPRESSION_EDEFAULT.equals(fontNameExpression); - case PropertiesPackage.TEXT_WIDGET_STYLE__FONT_SIZE: - return fontSize != TextWidgetStyleImpl.FONT_SIZE_EDEFAULT; + case PropertiesPackage.TEXT_WIDGET_STYLE__FONT_SIZE_EXPRESSION: + return TextWidgetStyleImpl.FONT_SIZE_EXPRESSION_EDEFAULT == null ? fontSizeExpression != null : !TextWidgetStyleImpl.FONT_SIZE_EXPRESSION_EDEFAULT.equals(fontSizeExpression); case PropertiesPackage.TEXT_WIDGET_STYLE__BACKGROUND_COLOR: return backgroundColor != null; case PropertiesPackage.TEXT_WIDGET_STYLE__FOREGROUND_COLOR: @@ -408,8 +411,8 @@ public class TextWidgetStyleImpl extends WidgetStyleImpl implements TextWidgetSt StringBuffer result = new StringBuffer(super.toString()); result.append(" (fontNameExpression: "); //$NON-NLS-1$ result.append(fontNameExpression); - result.append(", fontSize: "); //$NON-NLS-1$ - result.append(fontSize); + result.append(", fontSizeExpression: "); //$NON-NLS-1$ + result.append(fontSizeExpression); result.append(", fontFormat: "); //$NON-NLS-1$ result.append(fontFormat); result.append(')'); diff --git a/plugins/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/WidgetStyleImpl.java b/plugins/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/WidgetStyleImpl.java index 0256859e07..1bac693ce4 100644 --- a/plugins/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/WidgetStyleImpl.java +++ b/plugins/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/WidgetStyleImpl.java @@ -36,8 +36,8 @@ import org.eclipse.sirius.viewpoint.description.ColorDescription; * {@link org.eclipse.sirius.properties.impl.WidgetStyleImpl#getLabelFontNameExpression * <em>Label Font Name Expression</em>}</li> * <li> - * {@link org.eclipse.sirius.properties.impl.WidgetStyleImpl#getLabelFontSize - * <em>Label Font Size</em>}</li> + * {@link org.eclipse.sirius.properties.impl.WidgetStyleImpl#getLabelFontSizeExpression + * <em>Label Font Size Expression</em>}</li> * <li> * {@link org.eclipse.sirius.properties.impl.WidgetStyleImpl#getLabelBackgroundColor * <em>Label Background Color</em>}</li> @@ -75,26 +75,26 @@ public class WidgetStyleImpl extends MinimalEObjectImpl.Container implements Wid protected String labelFontNameExpression = WidgetStyleImpl.LABEL_FONT_NAME_EXPRESSION_EDEFAULT; /** - * The default value of the '{@link #getLabelFontSize() - * <em>Label Font Size</em>}' attribute. <!-- begin-user-doc --> <!-- - * end-user-doc --> + * The default value of the '{@link #getLabelFontSizeExpression() + * <em>Label Font Size Expression</em>}' attribute. <!-- begin-user-doc --> + * <!-- end-user-doc --> * - * @see #getLabelFontSize() + * @see #getLabelFontSizeExpression() * @generated * @ordered */ - protected static final int LABEL_FONT_SIZE_EDEFAULT = 0; + protected static final String LABEL_FONT_SIZE_EXPRESSION_EDEFAULT = null; /** - * The cached value of the '{@link #getLabelFontSize() - * <em>Label Font Size</em>}' attribute. <!-- begin-user-doc --> <!-- - * end-user-doc --> + * The cached value of the '{@link #getLabelFontSizeExpression() + * <em>Label Font Size Expression</em>}' attribute. <!-- begin-user-doc --> + * <!-- end-user-doc --> * - * @see #getLabelFontSize() + * @see #getLabelFontSizeExpression() * @generated * @ordered */ - protected int labelFontSize = WidgetStyleImpl.LABEL_FONT_SIZE_EDEFAULT; + protected String labelFontSizeExpression = WidgetStyleImpl.LABEL_FONT_SIZE_EXPRESSION_EDEFAULT; /** * The cached value of the '{@link #getLabelBackgroundColor() @@ -178,8 +178,8 @@ public class WidgetStyleImpl extends MinimalEObjectImpl.Container implements Wid * @generated */ @Override - public int getLabelFontSize() { - return labelFontSize; + public String getLabelFontSizeExpression() { + return labelFontSizeExpression; } /** @@ -188,11 +188,11 @@ public class WidgetStyleImpl extends MinimalEObjectImpl.Container implements Wid * @generated */ @Override - public void setLabelFontSize(int newLabelFontSize) { - int oldLabelFontSize = labelFontSize; - labelFontSize = newLabelFontSize; + public void setLabelFontSizeExpression(String newLabelFontSizeExpression) { + String oldLabelFontSizeExpression = labelFontSizeExpression; + labelFontSizeExpression = newLabelFontSizeExpression; if (eNotificationRequired()) { - eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.WIDGET_STYLE__LABEL_FONT_SIZE, oldLabelFontSize, labelFontSize)); + eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.WIDGET_STYLE__LABEL_FONT_SIZE_EXPRESSION, oldLabelFontSizeExpression, labelFontSizeExpression)); } } @@ -303,8 +303,8 @@ public class WidgetStyleImpl extends MinimalEObjectImpl.Container implements Wid switch (featureID) { case PropertiesPackage.WIDGET_STYLE__LABEL_FONT_NAME_EXPRESSION: return getLabelFontNameExpression(); - case PropertiesPackage.WIDGET_STYLE__LABEL_FONT_SIZE: - return getLabelFontSize(); + case PropertiesPackage.WIDGET_STYLE__LABEL_FONT_SIZE_EXPRESSION: + return getLabelFontSizeExpression(); case PropertiesPackage.WIDGET_STYLE__LABEL_BACKGROUND_COLOR: if (resolve) { return getLabelBackgroundColor(); @@ -333,8 +333,8 @@ public class WidgetStyleImpl extends MinimalEObjectImpl.Container implements Wid case PropertiesPackage.WIDGET_STYLE__LABEL_FONT_NAME_EXPRESSION: setLabelFontNameExpression((String) newValue); return; - case PropertiesPackage.WIDGET_STYLE__LABEL_FONT_SIZE: - setLabelFontSize((Integer) newValue); + case PropertiesPackage.WIDGET_STYLE__LABEL_FONT_SIZE_EXPRESSION: + setLabelFontSizeExpression((String) newValue); return; case PropertiesPackage.WIDGET_STYLE__LABEL_BACKGROUND_COLOR: setLabelBackgroundColor((ColorDescription) newValue); @@ -361,8 +361,8 @@ public class WidgetStyleImpl extends MinimalEObjectImpl.Container implements Wid case PropertiesPackage.WIDGET_STYLE__LABEL_FONT_NAME_EXPRESSION: setLabelFontNameExpression(WidgetStyleImpl.LABEL_FONT_NAME_EXPRESSION_EDEFAULT); return; - case PropertiesPackage.WIDGET_STYLE__LABEL_FONT_SIZE: - setLabelFontSize(WidgetStyleImpl.LABEL_FONT_SIZE_EDEFAULT); + case PropertiesPackage.WIDGET_STYLE__LABEL_FONT_SIZE_EXPRESSION: + setLabelFontSizeExpression(WidgetStyleImpl.LABEL_FONT_SIZE_EXPRESSION_EDEFAULT); return; case PropertiesPackage.WIDGET_STYLE__LABEL_BACKGROUND_COLOR: setLabelBackgroundColor((ColorDescription) null); @@ -387,8 +387,8 @@ public class WidgetStyleImpl extends MinimalEObjectImpl.Container implements Wid switch (featureID) { case PropertiesPackage.WIDGET_STYLE__LABEL_FONT_NAME_EXPRESSION: return WidgetStyleImpl.LABEL_FONT_NAME_EXPRESSION_EDEFAULT == null ? labelFontNameExpression != null : !WidgetStyleImpl.LABEL_FONT_NAME_EXPRESSION_EDEFAULT.equals(labelFontNameExpression); - case PropertiesPackage.WIDGET_STYLE__LABEL_FONT_SIZE: - return labelFontSize != WidgetStyleImpl.LABEL_FONT_SIZE_EDEFAULT; + case PropertiesPackage.WIDGET_STYLE__LABEL_FONT_SIZE_EXPRESSION: + return WidgetStyleImpl.LABEL_FONT_SIZE_EXPRESSION_EDEFAULT == null ? labelFontSizeExpression != null : !WidgetStyleImpl.LABEL_FONT_SIZE_EXPRESSION_EDEFAULT.equals(labelFontSizeExpression); case PropertiesPackage.WIDGET_STYLE__LABEL_BACKGROUND_COLOR: return labelBackgroundColor != null; case PropertiesPackage.WIDGET_STYLE__LABEL_FOREGROUND_COLOR: @@ -413,8 +413,8 @@ public class WidgetStyleImpl extends MinimalEObjectImpl.Container implements Wid StringBuffer result = new StringBuffer(super.toString()); result.append(" (labelFontNameExpression: "); //$NON-NLS-1$ result.append(labelFontNameExpression); - result.append(", labelFontSize: "); //$NON-NLS-1$ - result.append(labelFontSize); + result.append(", labelFontSizeExpression: "); //$NON-NLS-1$ + result.append(labelFontSizeExpression); result.append(", labelFontFormat: "); //$NON-NLS-1$ result.append(labelFontFormat); result.append(')'); diff --git a/plugins/org.eclipse.sirius.ui.properties/plugin.xml b/plugins/org.eclipse.sirius.ui.properties/plugin.xml index 09226deea4..d99e5de794 100644 --- a/plugins/org.eclipse.sirius.ui.properties/plugin.xml +++ b/plugins/org.eclipse.sirius.ui.properties/plugin.xml @@ -74,5 +74,9 @@ class="org.eclipse.sirius.ui.properties.internal.migration.DomainClassExpressionMigrationParticipant" kind="VSM"> </participant> + <participant + class="org.eclipse.sirius.ui.properties.internal.migration.FontSizeMigrationParticipant" + kind="VSM"> + </participant> </extension> </plugin> diff --git a/plugins/org.eclipse.sirius.ui.properties/src/org/eclipse/sirius/ui/properties/internal/migration/FontSizeMigrationParticipant.java b/plugins/org.eclipse.sirius.ui.properties/src/org/eclipse/sirius/ui/properties/internal/migration/FontSizeMigrationParticipant.java new file mode 100644 index 0000000000..c6d8c7c969 --- /dev/null +++ b/plugins/org.eclipse.sirius.ui.properties/src/org/eclipse/sirius/ui/properties/internal/migration/FontSizeMigrationParticipant.java @@ -0,0 +1,85 @@ +/******************************************************************************* + * Copyright (c) 2016 Obeo. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.ui.properties.internal.migration; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.sirius.business.api.migration.AbstractVSMMigrationParticipant; +import org.eclipse.sirius.properties.PropertiesPackage; +import org.osgi.framework.Version; + +/** + * This migration participant is responsible for the migration of the fontSize + * and labelFontSize properties of the widget style, text widget style, label + * widget style, hyperlink widget style and group style. + * + * @author sbegaudeau + */ +public class FontSizeMigrationParticipant extends AbstractVSMMigrationParticipant { + + private static final Version MIGRATION_VERSION = new Version("11.0.0.201609011200"); //$NON-NLS-1$ + + /** + * The name of the property label font size. + */ + private static final String LABEL_FONT_SIZE = "labelFontSize"; //$NON-NLS-1$ + + /** + * The name of the property font size. + */ + private static final String FONT_SIZE = "fontSize"; //$NON-NLS-1$ + + @Override + public Version getMigrationVersion() { + return MIGRATION_VERSION; + } + + @Override + public EStructuralFeature getAttribute(EClass eClass, String name, String loadedVersion) { + if (Version.parseVersion(loadedVersion).compareTo(MIGRATION_VERSION) < 0) { + EAttribute eAttribute = null; + + if (PropertiesPackage.Literals.WIDGET_STYLE.isSuperTypeOf(eClass) && LABEL_FONT_SIZE.equals(name)) { + eAttribute = PropertiesPackage.Literals.WIDGET_STYLE__LABEL_FONT_SIZE_EXPRESSION; + } else if (PropertiesPackage.Literals.TEXT_WIDGET_STYLE.equals(eClass) && FONT_SIZE.equals(name)) { + eAttribute = PropertiesPackage.Literals.TEXT_WIDGET_STYLE__FONT_SIZE_EXPRESSION; + } else if (PropertiesPackage.Literals.LABEL_WIDGET_STYLE.equals(eClass) && FONT_SIZE.equals(name)) { + eAttribute = PropertiesPackage.Literals.LABEL_WIDGET_STYLE__FONT_SIZE_EXPRESSION; + } else if (PropertiesPackage.Literals.HYPERLINK_WIDGET_STYLE.equals(eClass) && FONT_SIZE.equals(name)) { + eAttribute = PropertiesPackage.Literals.HYPERLINK_WIDGET_STYLE__FONT_SIZE_EXPRESSION; + } else if (PropertiesPackage.Literals.GROUP_STYLE.equals(eClass) && FONT_SIZE.equals(name)) { + eAttribute = PropertiesPackage.Literals.GROUP_STYLE__FONT_SIZE_EXPRESSION; + } + + if (eAttribute != null) { + return eAttribute; + } + } + return super.getAttribute(eClass, name, loadedVersion); + } + + @Override + public Object getValue(EObject object, EStructuralFeature feature, Object value, String loadedVersion) { + boolean isFontSizeFeature = false; + isFontSizeFeature = isFontSizeFeature || PropertiesPackage.Literals.WIDGET_STYLE__LABEL_FONT_SIZE_EXPRESSION.equals(feature); + isFontSizeFeature = isFontSizeFeature || PropertiesPackage.Literals.TEXT_WIDGET_STYLE__FONT_SIZE_EXPRESSION.equals(feature); + isFontSizeFeature = isFontSizeFeature || PropertiesPackage.Literals.LABEL_WIDGET_STYLE__FONT_SIZE_EXPRESSION.equals(feature); + isFontSizeFeature = isFontSizeFeature || PropertiesPackage.Literals.HYPERLINK_WIDGET_STYLE__FONT_SIZE_EXPRESSION.equals(feature); + isFontSizeFeature = isFontSizeFeature || PropertiesPackage.Literals.GROUP_STYLE__FONT_SIZE_EXPRESSION.equals(feature); + + if (isFontSizeFeature && value != null) { + return value.toString(); + } + return super.getValue(object, feature, value, loadedVersion); + } +} diff --git a/plugins/org.eclipse.sirius.ui.properties/src/org/eclipse/sirius/ui/properties/internal/tabprovider/GroupStyleDescriptionConverter.java b/plugins/org.eclipse.sirius.ui.properties/src/org/eclipse/sirius/ui/properties/internal/tabprovider/GroupStyleDescriptionConverter.java index d7ac3a3abe..de1585c998 100644 --- a/plugins/org.eclipse.sirius.ui.properties/src/org/eclipse/sirius/ui/properties/internal/tabprovider/GroupStyleDescriptionConverter.java +++ b/plugins/org.eclipse.sirius.ui.properties/src/org/eclipse/sirius/ui/properties/internal/tabprovider/GroupStyleDescriptionConverter.java @@ -56,7 +56,7 @@ public class GroupStyleDescriptionConverter extends AbstractDescriptionConverter } } eefGroupStyle.setFontNameExpression(groupStyle.getFontNameExpression()); - eefGroupStyle.setFontSizeExpression(Integer.toString(groupStyle.getFontSize())); + eefGroupStyle.setFontSizeExpression(groupStyle.getFontSizeExpression()); eefGroupStyle.setBarStyle(EEF_TITLE_BAR_STYLE.get(groupStyle.getBarStyle().getValue())); eefGroupStyle.setToggleStyle(EEF_TOGGLE_STYLE.get(groupStyle.getToggleStyle().getValue())); eefGroupStyle.setExpandedByDefault(groupStyle.isExpandedByDefault()); |
