Skip to content

Commit

Permalink
Change checkboxes for E4 editor to have consistent placement and add …
Browse files Browse the repository at this point in the history
…colons in E4 editor menu items.

Fixes #1308

Co-authored-by: Jason Tang <[email protected]>
Co-authored-by: Emily Yuan <[email protected]>
  • Loading branch information
3 people authored and HannesWell committed Nov 27, 2024
1 parent 29ff363 commit 6c48bf9
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ ModelEditor_PasteObjects=Paste Objects
ModelTooling_Common_RuntimeContributionInstance=Contrib. Instance
ModelTooling_Common_RuntimeWidgetTree=&Widget Tree

ModelTooling_UIElement_ToBeRendered=&To Be Rendered
ModelTooling_UIElement_Visible=&Visible
ModelTooling_UIElement_ToBeRendered=&To Be Rendered\:
ModelTooling_UIElement_Visible=&Visible\:
ModelTooling_UIElement_VisibleWhen=&Visible-When Expression\:
ModelTooling_UIElement_AccessibilityPhrase=&Accessibility Phrase\:

Expand Down Expand Up @@ -157,7 +157,7 @@ DynamicMenuContributionEditor_Description=Dynamic Menu Contribution
DynamicMenuContributionEditor_ClassURI=Class &URI\:
DynamicMenuContributionEditor_LabelLabel=L&abel\:

HandledToolItemEditor_Command=Command
HandledToolItemEditor_Command=&Command\:
HandledToolItemEditor_Parameters=Parameters
HandledToolItemEditor_Label=Handled Tool Item
HandledToolItemEditor_Description=Handled Tool Item
Expand Down Expand Up @@ -204,8 +204,8 @@ MenuItemEditor_Type=&Type\:
MenuItemEditor_Label=L&abel\:
MenuItemEditor_Tooltip=T&ooltip\:
MenuItemEditor_IconURI=Icon &URI\:
MenuItemEditor_Enabled=Enabled
MenuItemEditor_Selected=Selected
MenuItemEditor_Enabled=&Enabled\:
MenuItemEditor_Selected=&Selected\:
MenuItemEditor_Mnemonics=&Mnemonics\:
MenuItemEditor_NoExpression=<None>
MenuItemEditor_AddCoreExpression=VisibleWhen Core Expression
Expand All @@ -218,8 +218,8 @@ PartDescriptorEditor_LabelLabel=L&abel\:
PartDescriptorEditor_Tooltip=T&ooltip\:
PartDescriptorEditor_IconURI=&Icon URI\:
PartDescriptorEditor_ClassURI=Class &URI\:
PartDescriptorEditor_Closeable=Closeable
PartDescriptorEditor_Multiple=Multiple
PartDescriptorEditor_Closeable=&Closeable\:
PartDescriptorEditor_Multiple=&Multiple\:
PartDescriptorEditor_Category=&Category\:
PartDescriptorEditor_Variables=Variables
PartDescriptorEditor_Properties=Properties
Expand All @@ -240,7 +240,7 @@ PartEditor_Closeable_Tooltip=If checked, the part can be closed by the user
PartEditor_Menus=Menus
PartEditor_Handlers=Handlers
PartEditor_ContainerData=Container &Data\:
PartEditor_ToolBar=ToolBar
PartEditor_ToolBar=&ToolBar\:
PartEditor_BindingContexts=Binding Contexts
PartEditor_Controls=Controls
PartEditor_TrimBars=Trim Bars
Expand Down Expand Up @@ -425,19 +425,19 @@ RenderedToolBarEditor_TreeLabel=Rendered ToolBar

ToolBarContributionEditor_TreeLabel=ToolBar Contribution
ToolBarContributionEditor_TreeLabelDescription=ToolBar Contribution
ToolBarContributionEditor_ParentId=Parent-ID
ToolBarContributionEditor_ParentId=&Parent-ID\:
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.
ToolBarContributionEditor_Position=Position
ToolBarContributionEditor_Position=&Position\:
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.

ToolItemEditor_Type=&Type\:
ToolItemEditor_Label=L&abel\:
ToolItemEditor_ToolTip=T&ooltip\:
ToolItemEditor_IconURI=&Icon URI\:
ToolItemEditor_Enabled=Enabled
ToolItemEditor_Selected=Selected
ToolItemEditor_Enabled=&Enabled\:
ToolItemEditor_Selected=&Selected\:
ToolItemEditor_NoExpression=<None>
ToolItemEditor_Menu=Menu
ToolItemEditor_Menu=&Menu\:

TrimBarEditor_TreeLabel=Trim Bar
TrimBarEditor_TreeLabelDescription=Trim Bar
Expand All @@ -462,7 +462,7 @@ WindowEditor_Bounds=&Bounds(x,y,w,h)\:
WindowEditor_Label=L&abel\:
WindowEditor_Tooltip=T&ooltip\:
WindowEditor_IconURI=&Icon URI\:
WindowEditor_MainMenu=Main Menu
WindowEditor_MainMenu=&Main Menu\:
WindowEditor_SelectedElement=&Selected Element\:
WindowEditor_BindingContexts=Binding Contexts
WindowEditor_Handlers=Handlers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -745,12 +745,14 @@ public static <M> void createCheckBox(Composite parent, String label, IObservabl
public static <M> void createCheckBox(Composite parent, String label, String tooltip, IObservableValue<M> master,
EMFDataBindingContext context, IWidgetValueProperty<Button, Boolean> selectionProp,
IValueProperty<? super M, Boolean> modelProp) {
final Label l = new Label(parent, SWT.NONE);
l.setText(label);
l.setLayoutData(new GridData());
final Button checkBox = new Button(parent, SWT.CHECK);
checkBox.setText(label);
if (tooltip != null) {
checkBox.setToolTipText(tooltip);
l.setToolTipText(tooltip);
}
checkBox.setLayoutData(new GridData(GridData.BEGINNING, GridData.CENTER, false, false, 3, 1));
checkBox.setLayoutData(new GridData(GridData.BEGINNING, GridData.CENTER, false, false, 2, 1));
context.bindValue(selectionProp.observe(checkBox), modelProp.observeDetail(master));
}

Expand Down Expand Up @@ -906,4 +908,4 @@ public static Button createFindButton(Composite parent, IResourcePool resourcePo
return b;
}

}
}

0 comments on commit 6c48bf9

Please sign in to comment.