Bug 490245 - Model Fragment Editor should display tooltips and enhance
compulsory fields
Change-Id: Ibb03394790948db113391d863a2e88976ae5a280
Signed-off-by: Olivier Prouvost <olivier.prouvost@opcoach.com>
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/Messages.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/Messages.java
index 178cbac..c874572 100644
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/Messages.java
+++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/Messages.java
@@ -391,7 +391,9 @@
public String StringModelFragment_Label;
public String StringModelFragment_Description;
public String StringModelFragment_Featurename;
+ public String StringModelFragment_FeaturenameTooltip;
public String StringModelFragment_ParentId;
+ public String StringModelFragment_ParentIdTooltip;
public String StringModelFragment_PositionInList;
public String StringModelFragment_Elements;
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/Messages.properties b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/Messages.properties
index 0b0bd77..e728f83 100644
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/Messages.properties
+++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/Messages.properties
@@ -64,7 +64,7 @@
AbstractCommandSelectionDialog_Label_CommandId=Command-ID
ApplicationEditor_Label=Application
-ApplicationEditor_Description=Application bla, bla, bla
+ApplicationEditor_Description=Application
ApplicationEditor_Handlers=Handlers
ApplicationEditor_PartDescriptors=Part Descriptors
ApplicationEditor_BindingTables=BindingTables
@@ -99,7 +99,7 @@
ApplicationEditor_Type=Type
BindingTableEditor_Label=BindingTable
-BindingTableEditor_Description=BindingTable bla bla bla
+BindingTableEditor_Description=BindingTable
BindingTableEditor_ContextId=Context ID
BindingTableEditor_Keybindings=Keybindings
BindingTableEditor_KeySequence=KeySequence
@@ -107,7 +107,7 @@
BindingTableEditor_AddKeyBinding=Keybinding
CommandEditor_Label=Command
-CommandEditor_Description=Command bla bla bla
+CommandEditor_Description=Command
CommandEditor_Name=Name
CommandEditor_LabelDescription=Description
CommandEditor_Parameters=Parameters
@@ -126,7 +126,7 @@
WizardDialogEditor_Label=Wizard
DirectMenuItemEditor_Label=Direct Menu Item
-DirectMenuItemEditor_Description=Direct Menu Item bla bla bla
+DirectMenuItemEditor_Description=Direct Menu Item
DirectMenuItemEditor_ClassURI=Class URI
ControlFactory_Key=Key
@@ -135,17 +135,17 @@
DirectToolItemEditor_ClassURI=Class URI
DirectToolItemEditor_Label=Direct Tool Item
-DirectToolItemEditor_Description=Direct Tool Item bla bla bla
+DirectToolItemEditor_Description=Direct Tool Item
HandledMenuItemEditor_Label=Handled Menu Item
-HandledMenuItemEditor_Description=Handled Menu Item bla bla bla
+HandledMenuItemEditor_Description=Handled Menu Item
HandledMenuItemEditor_Command=Command
HandledMenuItemEditor_Parameters=Parameters
HandledMenuItemEditor_Tag=Name
HandledMenuItemEditor_Value=Value
DynamicMenuContributionEditor_Label=Dynamic Menu Contribution
-DynamicMenuContributionEditor_Description=Dynamic Menu Contribution blablabla
+DynamicMenuContributionEditor_Description=Dynamic Menu Contribution
DynamicMenuContributionEditor_ClassURI=Class URI
DynamicMenuContributionEditor_LabelLabel=Label
@@ -155,10 +155,10 @@
HandledToolItemEditor_ParametersName=Name
HandledToolItemEditor_ParametersValue=Value
HandledToolItemEditor_Label=Handled Tool Item
-HandledToolItemEditor_Description=Handled Tool Item bla bla bla
+HandledToolItemEditor_Description=Handled Tool Item
HandlerEditor_Label=Handler
-HandlerEditor_Description=Handler bla bla bla
+HandlerEditor_Description=Handler
HandlerEditor_Command=Command
HandlerEditor_ClassURI=Class URI
@@ -166,7 +166,7 @@
InputPartEditor_InputURI=Input URI
KeyBindingEditor_Label=KeyBinding
-KeyBindingEditor_Description=Binding bla bla bla
+KeyBindingEditor_Description=Binding
KeyBindingEditor_Sequence=Sequence
KeyBindingEditor_Command=Command
KeyBindingEditor_Parameters=Parameters
@@ -176,7 +176,7 @@
MenuEditor_Label=Menu
MenuEditor_Label_ViewMenu=View Menu
-MenuEditor_Description=Menu bla bla bla
+MenuEditor_Description=Menu
MenuEditor_MenuItems=MenuItems
MenuEditor_MenuItemType=Type
MenuEditor_MenuItemItemType=Item Type
@@ -212,7 +212,7 @@
MenuSeparatorEditor_Label=Separator
PartDescriptorEditor_Label=Part Descriptor
-PartDescriptorEditor_Descriptor=Part Descriptor Bla Bla Bla Bla
+PartDescriptorEditor_Descriptor=Part Descriptor
PartDescriptorEditor_LabelLabel=Label
PartDescriptorEditor_Tooltip=Tooltip
PartDescriptorEditor_IconURI=Icon URI
@@ -230,7 +230,7 @@
PartDescriptorEditor_ContainerData=Container Data
PartEditor_Label=Part
-PartEditor_Description=Part Bla Bla Bla Bla
+PartEditor_Description=Part
PartEditor_LabelLabel=Label
PartEditor_Tooltip=Tooltip
PartEditor_IconURI=Icon URI
@@ -245,7 +245,7 @@
PartEditor_BindingContexts=Binding Contexts
PartSashContainerEditor_Label=Part Sash Container
-PartSashContainerEditor_Description=Sash bla bla bla
+PartSashContainerEditor_Description=Sash
PartSashContainerEditor_Orientation=Orientation
PartSashContainerEditor_Vertical=Vertical
PartSashContainerEditor_Horizontal=Horizontal
@@ -259,7 +259,7 @@
PartSashContainerEditor_AddPlaceholder=Placeholder
PartStackEditor_Label=Part Stack
-PartStackEditor_Description=Stack bla bla bla
+PartStackEditor_Description=Stack
PartStackEditor_SelectedElement=Selected Element
PartStackEditor_Parts=Parts
PartStackEditor_ContainerData=Container Data
@@ -273,7 +273,7 @@
PartStackEditor_Views=Views
PerspectiveEditor_Label=Perspective
-PerspectiveEditor_Description=Perspective Bla Bla Bla
+PerspectiveEditor_Description=Perspective
PerspectiveEditor_LabelLabel=Label
PerspectiveEditor_SelectedElement=Selected Element
PerspectiveEditor_Tooltip=Tooltip
@@ -288,19 +288,19 @@
PerspectiveStackEditor_Label=Perspective Stack
-PerspectiveStackEditor_Description=Perspective Stack Bla Bla Bla
+PerspectiveStackEditor_Description=Perspective Stack
PerspectiveStackEditor_SelectedElement=Selected Element
PerspectiveStackEditor_Perspectives=Perspectives
PerspectiveStackEditor_AddPerspective=Perspective
PlaceholderEditor_Label=Placeholder
-PlaceholderEditor_Descriptor=Placeholder Bla Bla Bla Bla
+PlaceholderEditor_Descriptor=Placeholder
PlaceholderEditor_Reference=Reference
PlaceholderEditor_Closeable=Closeable
PlaceholderEditor_ContainerData=Container Data
ToolBarEditor_Label=Toolbar
-ToolBarEditor_Description=Toolbar bla bla bla
+ToolBarEditor_Description=Toolbar
ToolBarEditor_ToolbarItems=Toolbar Items
ToolBarEditor_ToolbarItemsType=Type
ToolBarEditor_ToolbarItemsItemType=Item-Type
@@ -316,11 +316,11 @@
ToolBarSeparatorEditor_Label=Separator
ToolControlEditor_Label=Tool Control
-ToolControlEditor_Description=ToolControl bla bla bla
+ToolControlEditor_Description=ToolControl
ToolControlEditor_ClassURI=Class URI
VBindingTableEditor_Label=Binding Configuration
-VBindingTableEditor_Description=Binding Configuration Bla Bla Bla Bla
+VBindingTableEditor_Description=Binding Configuration
VBindingTableEditor_Contexts=Contexts
VBindingTableEditor_Name=Name
VBindingTableEditor_LabelDescription=Description
@@ -329,7 +329,7 @@
AddonsEditor_ClassURI=Class URI
AddonsEditor_TreeLabel=Add-on
-AddonsEditor_TreeLabelDescription=Add-on Bla Bla Bla
+AddonsEditor_TreeLabelDescription=Add-on
AddonsEditor_Tags=Tags
ContributionClassDialog_DialogMessage=Enter the name of the contributing class
@@ -352,7 +352,7 @@
MenuContributionEditor_ParentId=Parent-ID
MenuContributionEditor_Position=Position
MenuContributionEditor_TreeLabel=Menu Contribution
-MenuContributionEditor_TreeLabelDescription=Menu Contribution Bla Bla Bla Bla
+MenuContributionEditor_TreeLabelDescription=Menu Contribution
ModelFragmentsEditor_ModelFragments=Model Fragments
ModelFragmentsEditor_Label=Model Fragment Definition
@@ -360,9 +360,11 @@
ModelFragmentsEditor_Imports=Imports
StringModelFragment_Label=Model Fragment
-StringModelFragment_Description=Model Fragment Bla Bla Bla
-StringModelFragment_Featurename=Feature Name
-StringModelFragment_ParentId=Extended Element ID
+StringModelFragment_Description=Model Fragment
+StringModelFragment_Featurename=Feature Name *
+StringModelFragment_FeaturenameTooltip=Select a feature name to contribute to in the EClass describing the parent ID instance
+StringModelFragment_ParentId=Extended Element ID *
+StringModelFragment_ParentIdTooltip=Select here an element ID from your model, or you can enter 'xpath:/' to access to the application model.
StringModelFragment_PositionInList=Position in list
StringModelFragment_Elements=Elements
@@ -372,7 +374,7 @@
FeatureSelectionDialog_DialogMessage=Find the name of the feature you want to contribute to
CategoryEditor_TreeLabel=Command Category
-CategoryEditor_TreeLabelDescriptor=Command Category Bla Bla Bla
+CategoryEditor_TreeLabelDescriptor=Command Category
CategoryEditor_Name=Name
CategoryEditor_Description=Description
CategoryEditor_Tags=Tags
@@ -384,7 +386,7 @@
ComponentLabelProvider_notrendered=not rendered
BindingContextEditor_TreeLabel=Binding Context
-BindingContextEditor_TreeLabelDescription=Binding Context Bla Bla Bla
+BindingContextEditor_TreeLabelDescription=Binding Context
BindingContextEditor_Name=Name
BindingContextEditor_Description=Description
BindingContextEditor_Subcontexts=Subcontexts
@@ -392,13 +394,13 @@
BindingContextEditor_NameWarning=Binding Context name should not be empty
CommandParameterEditor_TreeLabel=Command Parameter
-CommandParameterEditor_TreeLabelDescritpion=Command Parameter Bla Bla Bla
+CommandParameterEditor_TreeLabelDescritpion=Command Parameter
CommandParameterEditor_Name=Name
CommandParameterEditor_TypeId=TypeID
CommandParameterEditor_Optional=Optional
ParameterEditor_TreeLabel=Parameter
-ParameterEditor_TreeLabelDescription=Parameter Bla Bla Bla Bla
+ParameterEditor_TreeLabelDescription=Parameter
ParameterEditor_Command_Parameter_ID=Command Parameter ID
ParameterEditor_Value=Value
@@ -408,17 +410,17 @@
ParameterIdSelectionDialog_LabelText=Command Parameter Id
PopupMenuEditor_TreeLabel=Popup Menu
-PopupMenuEditor_TreeLabelDescription=Popup Menu Bla Bla Bla Bla
+PopupMenuEditor_TreeLabelDescription=Popup Menu
RenderedMenuEditor_TreeLabel=Rendered Menu
RenderedMenuItem_TreeLabel=Rendered Menu Item
-RenderedMenuItem_TreeLabelDescription=Rendered Menu Item Bla Bla Bla Bla
+RenderedMenuItem_TreeLabelDescription=Rendered Menu Item
RenderedToolBarEditor_TreeLabel=Rendered ToolBar
ToolBarContributionEditor_TreeLabel=ToolBar Contribution
-ToolBarContributionEditor_TreeLabelDescription=ToolBar Contribution Bla Bla Bla Bla
+ToolBarContributionEditor_TreeLabelDescription=ToolBar Contribution
ToolItemEditor_Type=Type
ToolItemEditor_Label=Label
@@ -430,7 +432,7 @@
ToolItemEditor_Menu=Menu
TrimBarEditor_TreeLabel=Window Trim
-TrimBarEditor_TreeLabelDescription=Window Trim bla bla bla
+TrimBarEditor_TreeLabelDescription=Window Trim
TrimBarEditor_Side=Side
TrimBarEditor_Controls=Controls
TrimBarEditor_AddToolBar=Toolbar
@@ -438,7 +440,7 @@
TrimContributionEditor_TreeLabel=Trim Contribution
-TrimContributionEditor_TreeLabelDescription=Trim Contribution Bla Bla Bla Bla
+TrimContributionEditor_TreeLabelDescription=Trim Contribution
TrimContributionEditor_ParentId=Parent ID
TrimContributionEditor_Position=Position
TrimContributionEditor_Controls=Controls
@@ -448,7 +450,7 @@
WindowEditor_AddMainMenu=Main Menu
WindowEditor_TreeLabel=Window
-WindowEditor_TreeLabelDescription=Window bla bla bla
+WindowEditor_TreeLabelDescription=Window
WindowEditor_Bounds=Bounds(x,y,w,h)
WindowEditor_Label=Label
WindowEditor_Tooltip=Tooltip
@@ -464,63 +466,63 @@
VApplicationAddons_AddAddon=Add-on
VApplicationAddons_TreeLabel=Add-ons
-VApplicationAddons_TreeLabelDescription=Add-ons bla bla bla bla
+VApplicationAddons_TreeLabelDescription=Add-ons
VApplicationAddons_Commands=Commands
VApplicationCategoriesEditor_TreeLabel=Command Categories
-VApplicationCategoriesEditor_TreeLabelDescription=Command Categories bla bla bla bla
+VApplicationCategoriesEditor_TreeLabelDescription=Command Categories
VApplicationCategoriesEditor_Categories=Categories
VApplicationCategoriesEditor_AddCategory=Category
VCommandEditor_TreeLabel=Commands
-VCommandEditor_TreeLabelDescription=Commands Bla Bla Bla Bla Bla
+VCommandEditor_TreeLabelDescription=Commands
VCommandEditor_Commands=Commands
VCommandEditor_AddCommand=Command
VHandlerEditor_TreeLabel=Handlers
-VHandlerEditor_TreeLabelDescription=Handlers Bla Bla Bla Bla Bla
+VHandlerEditor_TreeLabelDescription=Handlers
VHandlerEditor_Handlers=Handlers
VHandlerEditor_AddHandler=Handler
VMenuContributionsEditor_TreeLabel=Menu Contributions
-VMenuContributionsEditor_TreeLabelDescription=Menu Contributions Bla Bla Bla Bla Bla
+VMenuContributionsEditor_TreeLabelDescription=Menu Contributions
VMenuContributionsEditor_MenuContributions=Menu Contributions
VMenuContributionsEditor_AddMenuContribution=Menu Contribution
VMenuEditor_TreeLabel=Menus
-VMenuEditor_TreeLabelDescription=Menus Bla Bla Bla Bla Bla
+VMenuEditor_TreeLabelDescription=Menus
VMenuEditor_Menus=Menus
VMenuEditor_AddMenuContribution=Menu
VMenuEditor_AddPopupMenuContribution=Popup Menu
VModelFragmentsEditor_TreeLabel=Fragments
-VModelFragmentsEditor_TreeLabelDescription=Fragments Bla Bla Bla Bla Bla
+VModelFragmentsEditor_TreeLabelDescription=Fragments
VModelFragmentsEditor_Fragments=Fragments
VModelFragmentsEditor_AddFragment=Model Fragment
VModelImportsEditor_TreeLabel=Imports
-VModelImportsEditor_TreeLabelDescription=Imports Bla Bla Bla Bla Bla
+VModelImportsEditor_TreeLabelDescription=Imports
VModelImportsEditor_Imports=Imports
VPartDescriptor_TreeLabel=Part Descriptors
-VPartDescriptor_TreeLabelDescription=Part Descriptors Bla Bla Bla Bla Bla
+VPartDescriptor_TreeLabelDescription=Part Descriptors
VPartDescriptor_Descriptors= Part Descriptors
VPartDescriptor_AddPartDescriptor=Part Descriptor
VSnippetsEditor_Snippets=Snippets;
VToolBarContributionsEditor_TreeLabel=ToolBar Contributions
-VToolBarContributionsEditor_TreeLabelDescription=ToolBar Contributions Bla Bla Bla Bla Bla
+VToolBarContributionsEditor_TreeLabelDescription=ToolBar Contributions
VToolBarContributionsEditor_Contributions=ToolBar Contributions
VToolBarContributionsEditor_AddToolBarContribution=ToolBar Contribution
VTrimContributionsEditor_TreeLabel=Trim Contributions
-VTrimContributionsEditor_TreeLabelDescription=Trim Contributions Bla Bla Bla Bla Bla
+VTrimContributionsEditor_TreeLabelDescription=Trim Contributions
VTrimContributionsEditor_Contributions=Trim Contributions
VTrimContributionsEditor_AddTrimContribution=Trim Contribution
VWindowControlEditor_TreeLabel=Controls
-VWindowControlEditor_TreeLabelDescription=Controls Bla Bla Bla Bla Bla
+VWindowControlEditor_TreeLabelDescription=Controls
VWindowControlEditor_Controls=Controls
VWindowControlEditor_AddPerspectiveStack=Perspective Stack
VWindowControlEditor_AddPartSashContainer=Part Sash Container
@@ -529,7 +531,7 @@
VWindowControlEditor_AddArea=Area
VWindowEditor_TreeLabel=Windows and Dialogs
-VWindowEditor_TreeLabelDescription=Windows Bla Bla Bla Bla Bla
+VWindowEditor_TreeLabelDescription=Windows
VWindowEditor_Windows=Windows
VWindowEditor_AddTrimmedWindow=Trimmed Window
VWindowEditor_AddWindow=Window
@@ -537,14 +539,14 @@
VWindowEditor_AddWizardDialog=Wizard
VWindowSharedElementsEditor_TreeLabel=Shared Elements
-VWindowSharedElementsEditor_TreeLabelDescription=Shared Elements Bla Bla Bla Bla
+VWindowSharedElementsEditor_TreeLabelDescription=Shared Elements
VWindowSharedElementsEditor_Controls=Controls
VWindowSharedElementsEditor_AddPartSashContainer=Part Sash Container
VWindowSharedElementsEditor_AddPart=Part
VWindowSharedElementsEditor_AddPartStack=Part Stack
VWindowTrimEditor_TreeLabel=Window Trims
-VWindowTrimEditor_TreeLabelDescription=Window Trims Bla Bla Bla Bla Bla
+VWindowTrimEditor_TreeLabelDescription=Window Trims
VWindowTrimEditor_Controls=Controls
VWindowTrimEditor_AddWindowTrim=Window Trim
@@ -671,12 +673,12 @@
ImageTooltip_FileSize=File-Size
VItemParametersEditor_TreeLabel=Parameters
-VItemParametersEditor_TreeLabelDescription=Parameters Bla Bla Bla
+VItemParametersEditor_TreeLabelDescription=Parameters
VItemParametersEditor_Parameters=Parameters
VItemParametersEditor_AddParameter=Parameter
CoreExpressionEditor_TreeLabel=Core Expression
-CoreExpressionEditor_TreeLabelDescription=Core Expression Bla Bla Bla
+CoreExpressionEditor_TreeLabelDescription=Core Expression
CoreExpressionEditor_ExpressionId=Expression ID
ExpressionIdDialog_ShellTitle=Find Expression ID
@@ -702,11 +704,11 @@
VRootBindingContexts_AddContext=Binding Context
VRootBindingContexts_TreeLabel=Binding Context
-VRootBindingContexts_TreeLabelDescription=Binding Context Bla Bla Bla
+VRootBindingContexts_TreeLabelDescription=Binding Context
VRootBindingContexts_Contexts=Binding Contexts
AreaEditor_Label=Area
-AreaEditor_Description=Area Bla Bla Bla
+AreaEditor_Description=Area
AreaEditor_Orientation=Orientation
AreaEditor_Horizontal=Horizontal
AreaEditor_SelectedElement=Selected Element
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/StringModelFragment.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/StringModelFragment.java
index 4c8c16c..104f807 100644
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/StringModelFragment.java
+++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/StringModelFragment.java
@@ -169,6 +169,7 @@
{
final Label l = new Label(parent, SWT.NONE);
l.setText(Messages.StringModelFragment_ParentId);
+ l.setToolTipText(Messages.StringModelFragment_ParentIdTooltip);
l.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
final Composite comp = new Composite(parent, SWT.NONE);
@@ -212,6 +213,7 @@
{
final Label l = new Label(parent, SWT.NONE);
l.setText(Messages.StringModelFragment_Featurename);
+ l.setToolTipText(Messages.StringModelFragment_FeaturenameTooltip);
l.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
final Composite comp = new Composite(parent, SWT.NONE);