Package com._1c.g5.v8.dt.ui.dialog
Class LocalStringDialog
java.lang.Object
org.eclipse.jface.window.Window
org.eclipse.jface.dialogs.Dialog
org.eclipse.jface.dialogs.TrayDialog
org.eclipse.jface.dialogs.TitleAreaDialog
com._1c.g5.v8.dt.ui.dialog.LocalStringDialog
- All Implemented Interfaces:
org.eclipse.jface.window.IShellProvider
- Direct Known Subclasses:
LocalStringFormatDialog,LocalStringFormattedTextDialog
public class LocalStringDialog
extends org.eclipse.jface.dialogs.TitleAreaDialog
Dialog for entering string on multiple languages
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classShow warning indicator for ui editor items associated with unknown language codeNested classes/interfaces inherited from class org.eclipse.jface.window.Window
org.eclipse.jface.window.Window.IExceptionHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected static final Stringprotected static final StringFields inherited from class org.eclipse.jface.dialogs.TitleAreaDialog
DLG_IMG_TITLE_BANNER, DLG_IMG_TITLE_ERROR, INFO_MESSAGE, WARNING_MESSAGEFields inherited from class org.eclipse.jface.dialogs.Dialog
blockedHandler, buttonBar, DIALOG_DEFAULT_BOUNDS, DIALOG_PERSISTLOCATION, DIALOG_PERSISTSIZE, dialogArea, DLG_IMG_ERROR, DLG_IMG_HELP, DLG_IMG_INFO, DLG_IMG_MESSAGE_ERROR, DLG_IMG_MESSAGE_INFO, DLG_IMG_MESSAGE_WARNING, DLG_IMG_QUESTION, DLG_IMG_WARNING, ELLIPSISFields inherited from class org.eclipse.jface.window.Window
CANCEL, OK, resizeHasOccurred -
Constructor Summary
ConstructorsConstructorDescriptionLocalStringDialog(org.eclipse.swt.widgets.Shell parentShell, IV8Project v8project, Map<String, String> inputData, String currentEditingLanguageCode, boolean multiLine, boolean isReadOnly) Dialog for entering string on different languages. -
Method Summary
Modifier and TypeMethodDescriptionbooleanclose()protected voidconfigureShell(org.eclipse.swt.widgets.Shell newShell) convert(List<LocalString> localStrings) Converts given list ofLocalStringinto language code to text map.protected voidcreateButtonsForButtonBar(org.eclipse.swt.widgets.Composite parent) protected org.eclipse.swt.widgets.ControlcreateDialogArea(org.eclipse.swt.widgets.Composite parent) protected voidcreateMultilineEntry(org.eclipse.swt.widgets.Composite parent, org.eclipse.core.databinding.DataBindingContext dbc, LocalString localString, BiFunction<LocalString, Boolean, Boolean> updateTitleFunc) Create editor for multyline of local stringprotected voidcreateSingleEntry(org.eclipse.swt.widgets.Composite parent, org.eclipse.core.databinding.DataBindingContext dbc, LocalString localString) Create editor for single line of local stringprotected voidcreateTextEditingArea(org.eclipse.swt.widgets.Composite parent, org.eclipse.core.databinding.DataBindingContext dbc, BiFunction<LocalString, Boolean, Boolean> updateTitleFunc) Creates text area with controls to modify localized strings.protected voidcreateTextEditor(org.eclipse.swt.widgets.Composite parent, LocalString localString, org.eclipse.core.databinding.DataBindingContext dbc, BiFunction<LocalString, Boolean, Boolean> updateTitleFunc) Create editor for local stringprotected org.eclipse.jface.dialogs.IDialogSettingsReturns the language codeProvides local stringsReturns the map of key-value pairs ornullif canceledprotected voidMethods inherited from class org.eclipse.jface.dialogs.TitleAreaDialog
createContents, getErrorMessage, getInitialSize, getMessage, getTitleArea, getTitleImageLabel, setErrorMessage, setMessage, setMessage, setTitle, setTitleAreaColor, setTitleImageMethods inherited from class org.eclipse.jface.dialogs.TrayDialog
closeTray, createButtonBar, createHelpControl, getLayout, getTray, handleShellCloseEvent, isDialogHelpAvailable, isHelpAvailable, openTray, setDialogHelpAvailable, setHelpAvailableMethods inherited from class org.eclipse.jface.dialogs.Dialog
applyDialogFont, buttonPressed, cancelPressed, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, create, createButton, dialogFontIsDefault, getBlockedHandler, getButton, getButtonBar, getCancelButton, getDialogArea, getDialogBoundsStrategy, getImage, getInitialLocation, getOKButton, initializeBounds, initializeDialogUnits, isResizable, setBlockedHandler, setButtonLayoutData, setButtonLayoutFormData, shortenTextMethods inherited from class org.eclipse.jface.window.Window
canHandleShellCloseEvent, constrainShellSize, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getDefaultOrientation, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, open, setBlockOnOpen, setDefaultImage, setDefaultImages, setDefaultModalParent, setDefaultOrientation, setExceptionHandler, setParentShell, setReturnCode, setShellStyle, setWindowManager
-
Field Details
-
DIALOG_SETTINGS_SECTION_NAME
- See Also:
-
MULTILINE_SECTION_NAME
- See Also:
-
SINGLE_LINE_SECTION_NAME
- See Also:
-
-
Constructor Details
-
LocalStringDialog
public LocalStringDialog(org.eclipse.swt.widgets.Shell parentShell, IV8Project v8project, Map<String, String> inputData, String currentEditingLanguageCode, boolean multiLine, boolean isReadOnly) Dialog for entering string on different languages.- Parameters:
parentShell- the parent SWT shell, cannot benullv8project- the current V8 project, cannot benullinputData- a map of string key-values pairs where key is language code and value is the input string, cannot benullcurrentEditingLanguageCode- code of configuration editing language, cannot benullmultiLine- flag, indicating that input text boxes should be multilineisReadOnly- flag, indicating that dialog is in read-only mode
-
-
Method Details
-
getLocalStrings
Provides local strings- Returns:
- list of local strings, never
null
-
okPressed
protected void okPressed()- Overrides:
okPressedin classorg.eclipse.jface.dialogs.Dialog
-
getValues
Returns the map of key-value pairs ornullif canceled- Returns:
- map of
Map<String, String> type
-
getLanguageCode
Returns the language code- Returns:
- language code, can be
null
-
close
public boolean close()- Overrides:
closein classorg.eclipse.jface.dialogs.Dialog
-
convert
Converts given list ofLocalStringinto language code to text map.- Parameters:
localStrings- the list ofLocalString, cannot benull.- Returns:
- the map, cannot be
null.
-
createDialogArea
protected org.eclipse.swt.widgets.Control createDialogArea(org.eclipse.swt.widgets.Composite parent) - Overrides:
createDialogAreain classorg.eclipse.jface.dialogs.TitleAreaDialog
-
createButtonsForButtonBar
protected void createButtonsForButtonBar(org.eclipse.swt.widgets.Composite parent) - Overrides:
createButtonsForButtonBarin classorg.eclipse.jface.dialogs.Dialog
-
createSingleEntry
protected void createSingleEntry(org.eclipse.swt.widgets.Composite parent, org.eclipse.core.databinding.DataBindingContext dbc, LocalString localString) Create editor for single line of local string- Parameters:
parent- the parent container, cannot benulldbc- the data binding context, cannot benulllocalString- the editing local string item, cannot benull
-
createMultilineEntry
protected void createMultilineEntry(org.eclipse.swt.widgets.Composite parent, org.eclipse.core.databinding.DataBindingContext dbc, LocalString localString, BiFunction<LocalString, Boolean, Boolean> updateTitleFunc) Create editor for multyline of local string- Parameters:
parent- the parent container, cannot benulldbc- the data binding context, cannot benulllocalString- the editing local string item, cannot benullupdateTitleFunc- the updating function for title local strings, can benull
-
createTextEditingArea
protected void createTextEditingArea(org.eclipse.swt.widgets.Composite parent, org.eclipse.core.databinding.DataBindingContext dbc, BiFunction<LocalString, Boolean, Boolean> updateTitleFunc) Creates text area with controls to modify localized strings.- Parameters:
parent- base dialog composite, cannot benulldbc- dialog data binding context, cannot benullupdateTitleFunc- the updating function for title local strings, can benull
-
createTextEditor
protected void createTextEditor(org.eclipse.swt.widgets.Composite parent, LocalString localString, org.eclipse.core.databinding.DataBindingContext dbc, BiFunction<LocalString, Boolean, Boolean> updateTitleFunc) Create editor for local string- Parameters:
parent- the parent container, cannot benulllocalString- the editing local string item, cannot benulldbc- the data binding context, cannot benullupdateTitleFunc- the updating function for title local strings, can benull
-
configureShell
protected void configureShell(org.eclipse.swt.widgets.Shell newShell) - Overrides:
configureShellin classorg.eclipse.jface.window.Window
-
getDialogBoundsSettings
protected org.eclipse.jface.dialogs.IDialogSettings getDialogBoundsSettings()- Overrides:
getDialogBoundsSettingsin classorg.eclipse.jface.dialogs.Dialog
-