Skip to content

Commit 6c48bf9

Browse files
stewedbeefbasonbangemyuans
authored andcommitted
Change checkboxes for E4 editor to have consistent placement and add colons in E4 editor menu items.
Fixes #1308 Co-authored-by: Jason Tang <[email protected]> Co-authored-by: Emily Yuan <[email protected]>
1 parent 29ff363 commit 6c48bf9

File tree

2 files changed

+20
-18
lines changed

2 files changed

+20
-18
lines changed

e4tools/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/Messages.properties

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ ModelEditor_PasteObjects=Paste Objects
6161
ModelTooling_Common_RuntimeContributionInstance=Contrib. Instance
6262
ModelTooling_Common_RuntimeWidgetTree=&Widget Tree
6363

64-
ModelTooling_UIElement_ToBeRendered=&To Be Rendered
65-
ModelTooling_UIElement_Visible=&Visible
64+
ModelTooling_UIElement_ToBeRendered=&To Be Rendered\:
65+
ModelTooling_UIElement_Visible=&Visible\:
6666
ModelTooling_UIElement_VisibleWhen=&Visible-When Expression\:
6767
ModelTooling_UIElement_AccessibilityPhrase=&Accessibility Phrase\:
6868

@@ -157,7 +157,7 @@ DynamicMenuContributionEditor_Description=Dynamic Menu Contribution
157157
DynamicMenuContributionEditor_ClassURI=Class &URI\:
158158
DynamicMenuContributionEditor_LabelLabel=L&abel\:
159159

160-
HandledToolItemEditor_Command=Command
160+
HandledToolItemEditor_Command=&Command\:
161161
HandledToolItemEditor_Parameters=Parameters
162162
HandledToolItemEditor_Label=Handled Tool Item
163163
HandledToolItemEditor_Description=Handled Tool Item
@@ -204,8 +204,8 @@ MenuItemEditor_Type=&Type\:
204204
MenuItemEditor_Label=L&abel\:
205205
MenuItemEditor_Tooltip=T&ooltip\:
206206
MenuItemEditor_IconURI=Icon &URI\:
207-
MenuItemEditor_Enabled=Enabled
208-
MenuItemEditor_Selected=Selected
207+
MenuItemEditor_Enabled=&Enabled\:
208+
MenuItemEditor_Selected=&Selected\:
209209
MenuItemEditor_Mnemonics=&Mnemonics\:
210210
MenuItemEditor_NoExpression=<None>
211211
MenuItemEditor_AddCoreExpression=VisibleWhen Core Expression
@@ -218,8 +218,8 @@ PartDescriptorEditor_LabelLabel=L&abel\:
218218
PartDescriptorEditor_Tooltip=T&ooltip\:
219219
PartDescriptorEditor_IconURI=&Icon URI\:
220220
PartDescriptorEditor_ClassURI=Class &URI\:
221-
PartDescriptorEditor_Closeable=Closeable
222-
PartDescriptorEditor_Multiple=Multiple
221+
PartDescriptorEditor_Closeable=&Closeable\:
222+
PartDescriptorEditor_Multiple=&Multiple\:
223223
PartDescriptorEditor_Category=&Category\:
224224
PartDescriptorEditor_Variables=Variables
225225
PartDescriptorEditor_Properties=Properties
@@ -240,7 +240,7 @@ PartEditor_Closeable_Tooltip=If checked, the part can be closed by the user
240240
PartEditor_Menus=Menus
241241
PartEditor_Handlers=Handlers
242242
PartEditor_ContainerData=Container &Data\:
243-
PartEditor_ToolBar=ToolBar
243+
PartEditor_ToolBar=&ToolBar\:
244244
PartEditor_BindingContexts=Binding Contexts
245245
PartEditor_Controls=Controls
246246
PartEditor_TrimBars=Trim Bars
@@ -425,19 +425,19 @@ RenderedToolBarEditor_TreeLabel=Rendered ToolBar
425425

426426
ToolBarContributionEditor_TreeLabel=ToolBar Contribution
427427
ToolBarContributionEditor_TreeLabelDescription=ToolBar Contribution
428-
ToolBarContributionEditor_ParentId=Parent-ID
428+
ToolBarContributionEditor_ParentId=&Parent-ID\:
429429
ToolBarContributionEditor_ParentIdTooltip=This is the id of the toolbar or the part into which the contributions should be added. Use 'org.eclipse.ui.main.toolbar' to contribute to the main toolbar.
430-
ToolBarContributionEditor_Position=Position
430+
ToolBarContributionEditor_Position=&Position\:
431431
ToolBarContributionEditor_PositionTooltip=This is the position of the contribution. It has the form "[placement]=[id]" where placement is one of "before", "after", or "endof" and the id is expected to be the id of something in the toolbar.
432432

433433
ToolItemEditor_Type=&Type\:
434434
ToolItemEditor_Label=L&abel\:
435435
ToolItemEditor_ToolTip=T&ooltip\:
436436
ToolItemEditor_IconURI=&Icon URI\:
437-
ToolItemEditor_Enabled=Enabled
438-
ToolItemEditor_Selected=Selected
437+
ToolItemEditor_Enabled=&Enabled\:
438+
ToolItemEditor_Selected=&Selected\:
439439
ToolItemEditor_NoExpression=<None>
440-
ToolItemEditor_Menu=Menu
440+
ToolItemEditor_Menu=&Menu\:
441441

442442
TrimBarEditor_TreeLabel=Trim Bar
443443
TrimBarEditor_TreeLabelDescription=Trim Bar
@@ -462,7 +462,7 @@ WindowEditor_Bounds=&Bounds(x,y,w,h)\:
462462
WindowEditor_Label=L&abel\:
463463
WindowEditor_Tooltip=T&ooltip\:
464464
WindowEditor_IconURI=&Icon URI\:
465-
WindowEditor_MainMenu=Main Menu
465+
WindowEditor_MainMenu=&Main Menu\:
466466
WindowEditor_SelectedElement=&Selected Element\:
467467
WindowEditor_BindingContexts=Binding Contexts
468468
WindowEditor_Handlers=Handlers

e4tools/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/ControlFactory.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -745,12 +745,14 @@ public static <M> void createCheckBox(Composite parent, String label, IObservabl
745745
public static <M> void createCheckBox(Composite parent, String label, String tooltip, IObservableValue<M> master,
746746
EMFDataBindingContext context, IWidgetValueProperty<Button, Boolean> selectionProp,
747747
IValueProperty<? super M, Boolean> modelProp) {
748+
final Label l = new Label(parent, SWT.NONE);
749+
l.setText(label);
750+
l.setLayoutData(new GridData());
748751
final Button checkBox = new Button(parent, SWT.CHECK);
749-
checkBox.setText(label);
750752
if (tooltip != null) {
751-
checkBox.setToolTipText(tooltip);
753+
l.setToolTipText(tooltip);
752754
}
753-
checkBox.setLayoutData(new GridData(GridData.BEGINNING, GridData.CENTER, false, false, 3, 1));
755+
checkBox.setLayoutData(new GridData(GridData.BEGINNING, GridData.CENTER, false, false, 2, 1));
754756
context.bindValue(selectionProp.observe(checkBox), modelProp.observeDetail(master));
755757
}
756758

@@ -906,4 +908,4 @@ public static Button createFindButton(Composite parent, IResourcePool resourcePo
906908
return b;
907909
}
908910

909-
}
911+
}

0 commit comments

Comments
 (0)