Commit 3c9f5335 authored by Adrien's avatar Adrien Committed by GitHub

feat(BDM) update query return type hint (#2144)

* Warning -> Info, and message is displayed in clear, not in a tooltip.

[STUDIO-3421](https://bonitasoft.atlassian.net/browse/STUDIO-3421)
parent e6674ac6
......@@ -151,7 +151,7 @@ defaultValueBusinessDataTooltip=Business data can be initialized with existing B
cleaningBusinessObjects=Cleaning Business data model...
countQueryInfo=To get paged results from a REST API query on this business object you must create a related count query. For a query named "queryName", create a query named "countForQueryName" that counts the total number of results.
missingCountQuery=You can define a count query {0} to enable paged results from this REST API query.
queryReturnTypeWarning=Only below return types are supported.\nIt is currently not possible to use multiple SELECT expressions like 'SELECT e.name,e.id FROM...'.
queryReturnTypeWarning=Only above return types are supported. It is currently not possible to use multiple SELECT expressions like 'SELECT e.name,e.id FROM...'.
modelValidationFailedMsg=Business Data Model validation has failed with following issues. Depending on the severity, you might need to fix those issues to be able to save your model.
bdmDeployedTitle=Business Data Model deployed
bdmDeployedMessage=The Business Data Model has been deployed successfully.\n\u26A0 Open sessions have been closed (portal,applications...). You need to log back in.
......
......@@ -196,10 +196,6 @@ public class QueryDetailsControl extends Composite {
Label queryResultTypeLabel = formPage.getToolkit().createLabel(returnTypeComposite, Messages.queryResultType);
queryResultTypeLabel.setLayoutData(GridDataFactory.fillDefaults().align(SWT.LEFT, SWT.CENTER).create());
ControlDecoration typeWarning = new ControlDecoration(queryResultTypeLabel, SWT.RIGHT);
typeWarning.setImage(JFaceResources.getImage(Dialog.DLG_IMG_MESSAGE_WARNING));
typeWarning.setDescriptionText(Messages.queryReturnTypeWarning);
typeWarning.setMarginWidth(5);
returnTypeComboViewer = new ComboViewer(returnTypeComposite, SWT.BORDER | SWT.READ_ONLY);
returnTypeComboViewer.getControl()
......@@ -208,12 +204,19 @@ public class QueryDetailsControl extends Composite {
returnTypeComboViewer.setLabelProvider(new QueryResultTypeLabelProvider(boSelectedObservable));
updateReturnTypeViewerInput();
Label queryResultTypeInfoLabel = formPage.getToolkit().createLabel(returnTypeComposite,
Messages.queryReturnTypeWarning);
queryResultTypeInfoLabel
.setLayoutData(GridDataFactory.fillDefaults().align(SWT.LEFT, SWT.CENTER).indent(20, 0).create());
ControlDecoration typeinfo = new ControlDecoration(queryResultTypeInfoLabel, SWT.LEFT);
typeinfo.setImage(JFaceResources.getImage(Dialog.DLG_IMG_MESSAGE_INFO));
typeinfo.setMarginWidth(5);
querySelectedObservable.addValueChangeListener(e -> {
if (isDefault()) {
typeWarning.hide();
returnTypeComboViewer.getControl().setEnabled(false);
} else {
typeWarning.show();
returnTypeComboViewer.getControl().setEnabled(true);
}
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment