Skip to content

Commit

Permalink
Fix the ampersand of validation messages on the dataset editor (#1935)
Browse files Browse the repository at this point in the history
  • Loading branch information
speckyspooky authored Oct 9, 2024
1 parent fef7ed0 commit ad265e1
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ dataset.editor.dataSource=Data Source
dataset.editor.error.columnOrAliasNameAlreadyUsed=The new column name or alias ({0}) is already used by the column at index {1}.
dataset.editor.error.computedColumnNameAlreadyUsed=The new computed column name ({0}) is already used as column alias of column ({1}) in Output Columns.
dataset.editor.error.duplicateParameterName=Duplicate parameter name.
dataset.editor.error.nonemptyDefaultvalue=Default value can not be none.
dataset.editor.error.nonemptyDefaultvalue=Default value cannot be none.
dataset.editor.error.emptyName=Name cannot be blank.
dataset.editor.error.missingComputedColumnExpression=The expression of computed column {0} cannot be null or blank.
dataset.editor.error.missingComputedColumnName=Computed column name cannot be null or blank.
Expand Down Expand Up @@ -664,7 +664,7 @@ DerivedDataSet.action.error.message.InvalidNumber.DataSet=The number of the avai
DataSetComputedColumnsPage.ComputedColumns.Tooltip=Define computed columns.
DataSetComputedColumnsPage.description=Define computed columns:
DataSetComputedColumnsPage.duplicatedName=Duplicated Column Name.
DataSetComputedColumnsPage.numberName=Column Name can not be a number.
DataSetComputedColumnsPage.numberName=Column Name cannot be a number.
DataSetComputedColumnsPage.toolTipText.Down=Move Computed Column Down.
DataSetComputedColumnsPage.toolTipText.Up=Move Computed Column Up.
DataSetComputedColumnsPage.toolTipText.Remove=Remove Computed Column.
Expand Down Expand Up @@ -1484,9 +1484,9 @@ EmptyEditPart.Msg.NonVisual=Non-visual element selected
#error properties

error.duplicateName=The new name duplicates an existing name in the same name space.
error.DataSource.emptyName=Data source name can not be empty.
error.DataSet.emptyName=Data set name can not be empty.
error.OutputColumn.emptyName=Output column name can not be empty.
error.DataSource.emptyName=Data source name cannot be empty.
error.DataSet.emptyName=Data set name cannot be empty.
error.OutputColumn.emptyName=Output column name cannot be empty.
error.invalidName=The name "{0}" is invalid for it contains character ".", "/", "\\", "!", ";", "," .

###########################################################
Expand Down Expand Up @@ -1989,7 +1989,7 @@ HightlightRuleBuilder.button.edit.tooltip=Edit the selected one in value list
HightlightRuleBuilder.label.value=&Value:
HightlightRuleBuilder.list.item1=Value
HightlightRuleBuilder.MsgDlg.Msg=Warning
HightlightRuleBuilder.MsgDlg.Title=The value can not be empty.
HightlightRuleBuilder.MsgDlg.Title=The value cannot be empty.
HightlightRuleBuilder.text.AND=AND

HighlightRuleBuilderDialog.choice.ValueOfThisDataItem=Value of this data item
Expand Down Expand Up @@ -2592,7 +2592,7 @@ MapRuleBuilder.Button.Browse.Tooltip=Browse and select a key
MapRuleBuilder.label.value=&Value:
MapRuleBuilder.list.item1=Value
MapRuleBuilder.MsgDlg.Msg=Warning
MapRuleBuilder.MsgDlg.Title=The value can not be empty.
MapRuleBuilder.MsgDlg.Title=The value cannot be empty.
MapRuleBuilder.text.AND=AND

MapRuleBuilderDialog.text.Between=is between
Expand All @@ -2610,7 +2610,7 @@ MapRuleBuilderDialog.text.NotNull=is not null
MapRuleBuilderDialog.text.Null=is null
MapRuleBuilderDialog.text.Title=Map
MapRuleBuilderDialog.MsgDlg.Title=Warning
MapRuleBuilderDialog.MsgDlg.Msg=The value can not be empty.
MapRuleBuilderDialog.MsgDlg.Msg=The value cannot be empty.

###########################################################
#SortkeyBuilder dialog properties
Expand Down Expand Up @@ -3701,7 +3701,7 @@ SelectValueDialog.errorRetrievinglist=Error retrieving list
SelectValueDialog.messages.info.selectVauleUnavailable=Value list is not available.
SelectValueDialog.messages.info.invalidSelectVauleExpression="Select Value" function only accepts a simple column expression. A complicated expression is rejected.
SelectValueDialog.messages.warning.BlobColumn.unsupported=Cannot retrieve the value list of the expression referenced to the Blob type column/binding.
SelectValueDialog.messages.error.selectVauleUnavailable=The expression's value can not be retrieved.
SelectValueDialog.messages.error.selectVauleUnavailable=The expression's value cannot be retrieved.
SelectValueDialog.messages.error.selectValueNotSupported=Do not support this kind of value selection.
SelectValueDialog.noExpressionSet=An expression has not been set
SelectValueDialog.retrieving=Retrieving list...
Expand Down Expand Up @@ -4168,7 +4168,7 @@ WizardSelectCssStylePage.button.label.browse=&Browse...
WizardSelectCssStylePage.button.label.deselectAll=&Deselect All
WizardSelectCssStylePage.button.label.selectAll=&Select All
WizardSelectCssStylePage.errorMsg.FileNotExist=File does not exist.
WizardSelectCssStylePage.info.canNotImport=\ \ (Can not import)
WizardSelectCssStylePage.info.canNotImport=\ \ (Cannot import)
WizardSelectCssStylePage.label.fileName=File &Name:
WizardSelectCssStylePage.label.importToReportDesign=\ to import to the report design.
WizardSelectCssStylePage.label.notifications=Notifications:
Expand Down Expand Up @@ -4264,7 +4264,7 @@ WizardSaveAsPage.ContainerGroup=\ &Enter or select the parent folder:
Library.DND.messages.outofsync = The lib used in the report might have been changed, please close and reopen this report to use the updated lib.
NamedExpressionsHandleProvier.Column.Name=Name
NamedExpressionsHandleProvier.Column.DefaultValue=Default Value
Library.DND.messages.cannotApplyTheme=The theme can not be applied.
Library.DND.messages.cannotApplyTheme=The theme cannot be applied.

JarFileFormProvider.Column.Name=Name
JsFileFormProvider.Column.Name=Name
Expand Down Expand Up @@ -4816,8 +4816,8 @@ InputParameterDialog.msg.requiredParam=Parameters marked with * are required.
InputParameterDialog.err.requiredParam=Value of required parameter [{0}] is not specified.
InputParameterDialog.err.invalidValueTitle=Invalid Value
InputParameterDialog.err.invalidValue=The value "{0}" is invalid with type {1}.
InputParameterDialog.err.emptyValue=Input value for {0} can not be empty.
InputParameterDialog.err.emptyValue2=Second input value for {0} can not be empty.
InputParameterDialog.err.emptyValue=Input value for {0} cannot be empty.
InputParameterDialog.err.emptyValue2=Second input value for {0} cannot be empty.

###########################################################
#Crosstab drag tracker
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2004, 2005 Actuate Corporation.
* Copyright (c) 2004, 2005, 2024 Actuate Corporation and others
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
Expand Down Expand Up @@ -31,9 +31,9 @@
import org.eclipse.ui.PlatformUI;

/**
* Utility class to handle properties
*
*/

abstract class PropertyHandleInputDialog extends StatusDialog {

private Object structureOrHandle = null;
Expand Down Expand Up @@ -121,7 +121,7 @@ protected void validateSyntax() {
* Syntax check which determines whether to enable the Ok button
*
* @param structureOrHandle
* @return
* @return the validation status
*/
protected abstract IStatus validateSyntax(Object structureOrHandle);

Expand Down Expand Up @@ -163,7 +163,7 @@ protected boolean validateSemantics() {
* Semantics check which determines whether to close the window
*
* @param structureOrHandle
* @return
* @return the validation status
*/
protected abstract IStatus validateSemantics(Object structureOrHandle);

Expand All @@ -190,49 +190,54 @@ protected Object getStructureOrHandle() {
}

/**
* Is property blank
*
* @param value
* @return
* @param value property value
* @return true, if the property is blank
*/
protected boolean isBlankProperty(String value) {
return Utility.getNonNullString(value).trim().length() == 0;
}

/**
* Get the property status for blank value
*
* @param cellLabel
* @return
* @param cellLabel cell label
* @return the property status for blank value
*/
protected Status getBlankPropertyStatus(String cellLabel) {
return getMiscStatus(IStatus.ERROR,
Messages.getFormattedString("PropertyHandleInputDialog.messages.error.blankProperty", //$NON-NLS-1$
new String[] { cellLabel }));
new String[] { cellLabel.replace("&", "") }));
}

/**
* Get the ok status
*
* @return
* @return the ok status
*/
protected Status getOKStatus() {
return getMiscStatus(IStatus.OK, ""); //$NON-NLS-1$
}

/**
* Get miscellaneous status
*
* @param severity
* @param message
* @return
* @param severity status level
* @param message status message
* @return miscellaneous status
*/
protected Status getMiscStatus(int severity, String message) {
return new Status(severity, PlatformUI.PLUGIN_ID, IStatus.OK, message, null);
}

/**
* Set property value
*
* @param obj
* @param propertyName
* @param value
* @return
* @param obj object
* @param propertyName property name
* @param value property value
* @return the ok status after property set
*/
protected Status setProperty(Object obj, String propertyName, Object value) {
try {
Expand All @@ -245,10 +250,11 @@ protected Status setProperty(Object obj, String propertyName, Object value) {
}

/**
* Get the property
*
* @param obj
* @param propertyName
* @return
* @param obj object
* @param propertyName property name
* @return the property
*/
protected Object getProperty(Object obj, String propertyName) {
try {
Expand Down

0 comments on commit ad265e1

Please sign in to comment.