Commit 5292599e authored by Romain Bioteau's avatar Romain Bioteau

Merge remote-tracking branch 'origin/release-7.2.0'

Conflicts:
	translations/es/org.bonitasoft.studio.contract.nl_es/messages_es.properties
	translations/fr/org.bonitasoft.studio.designer.nl_fr/messages_fr.properties
parents 02e9d229 c5ac8760
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<overrideGtkButtonText>1</overrideGtkButtonText> <overrideGtkButtonText>1</overrideGtkButtonText>
<compressionAlgorithm>lzma-ultra</compressionAlgorithm> <compressionAlgorithm>lzma-ultra</compressionAlgorithm>
<lzmaUltraBlockSize>100</lzmaUltraBlockSize> <lzmaUltraBlockSize>100</lzmaUltraBlockSize>
<allowedLanguages>en es fr de it pt_BR ja ru</allowedLanguages> <allowedLanguages>en es fr ja</allowedLanguages>
<customLanguageFileList> <customLanguageFileList>
<language> <language>
<code>en</code> <code>en</code>
...@@ -44,42 +44,12 @@ ...@@ -44,42 +44,12 @@
<file>i18n/messages_fr.properties</file> <file>i18n/messages_fr.properties</file>
<encoding>utf-8</encoding> <encoding>utf-8</encoding>
<resolveUCN>1</resolveUCN> <resolveUCN>1</resolveUCN>
</language>
<language>
<code>de</code>
<file>i18n/messages_de.properties</file>
<encoding>utf-8</encoding>
<resolveUCN>1</resolveUCN>
</language> </language>
<language> <language>
<code>es</code> <code>es</code>
<file>i18n/messages_es.properties</file> <file>i18n/messages_es.properties</file>
<encoding>utf-8</encoding> <encoding>utf-8</encoding>
<resolveUCN>1</resolveUCN> <resolveUCN>1</resolveUCN>
</language>
<language>
<code>it</code>
<file>i18n/messages_it.properties</file>
<encoding>utf-8</encoding>
<resolveUCN>1</resolveUCN>
</language>
<language>
<code>pt_BR</code>
<file>i18n/messages_pt.properties</file>
<encoding>utf-8</encoding>
<resolveUCN>1</resolveUCN>
</language>
<language>
<code>pt</code>
<file>i18n/messages_pt.properties</file>
<encoding>utf-8</encoding>
<resolveUCN>1</resolveUCN>
</language>
<language>
<code>ru</code>
<file>i18n/messages_ru.properties</file>
<encoding>utf-8</encoding>
<resolveUCN>1</resolveUCN>
</language> </language>
<language> <language>
<code>ja</code> <code>ja</code>
......
...@@ -26,6 +26,7 @@ import org.bonitasoft.studio.businessobject.ui.wizard.editingsupport.QueryConten ...@@ -26,6 +26,7 @@ import org.bonitasoft.studio.businessobject.ui.wizard.editingsupport.QueryConten
import org.bonitasoft.studio.businessobject.ui.wizard.editingsupport.QueryNameEditingSupport; import org.bonitasoft.studio.businessobject.ui.wizard.editingsupport.QueryNameEditingSupport;
import org.bonitasoft.studio.businessobject.ui.wizard.editingsupport.ReadOnlyQueryContentEditingSupport; import org.bonitasoft.studio.businessobject.ui.wizard.editingsupport.ReadOnlyQueryContentEditingSupport;
import org.bonitasoft.studio.common.NamingUtils; import org.bonitasoft.studio.common.NamingUtils;
import org.bonitasoft.studio.common.properties.Well;
import org.bonitasoft.studio.pics.Pics; import org.bonitasoft.studio.pics.Pics;
import org.bonitasoft.studio.pics.PicsConstants; import org.bonitasoft.studio.pics.PicsConstants;
import org.eclipse.core.databinding.DataBindingContext; import org.eclipse.core.databinding.DataBindingContext;
...@@ -39,6 +40,7 @@ import org.eclipse.core.databinding.observable.list.WritableList; ...@@ -39,6 +40,7 @@ import org.eclipse.core.databinding.observable.list.WritableList;
import org.eclipse.core.databinding.observable.value.IValueChangeListener; import org.eclipse.core.databinding.observable.value.IValueChangeListener;
import org.eclipse.core.databinding.observable.value.SelectObservableValue; import org.eclipse.core.databinding.observable.value.SelectObservableValue;
import org.eclipse.core.databinding.observable.value.ValueChangeEvent; import org.eclipse.core.databinding.observable.value.ValueChangeEvent;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.databinding.swt.SWTObservables; import org.eclipse.jface.databinding.swt.SWTObservables;
import org.eclipse.jface.databinding.viewers.IViewerObservableValue; import org.eclipse.jface.databinding.viewers.IViewerObservableValue;
import org.eclipse.jface.databinding.viewers.ObservableListContentProvider; import org.eclipse.jface.databinding.viewers.ObservableListContentProvider;
...@@ -59,20 +61,20 @@ import org.eclipse.swt.events.SelectionAdapter; ...@@ -59,20 +61,20 @@ import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.TabFolder; import org.eclipse.swt.widgets.TabFolder;
import org.eclipse.swt.widgets.TabItem; import org.eclipse.swt.widgets.TabItem;
import org.eclipse.swt.widgets.TableColumn; import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.Widget; import org.eclipse.swt.widgets.Widget;
import org.eclipse.ui.forms.widgets.FormToolkit;
/** /**
* @author Romain Bioteau * @author Romain Bioteau
*/ */
public class QueriesTabItemControl extends AbstractTabItemControl { public class QueriesTabItemControl extends AbstractTabItemControl {
private IObservableList fieldsList; private final IObservableList fieldsList;
private WritableList defaultQueriesList; private final WritableList defaultQueriesList;
private static final String DEFAULT_QUERY_NAME = "query"; private static final String DEFAULT_QUERY_NAME = "query";
...@@ -89,7 +91,7 @@ public class QueriesTabItemControl extends AbstractTabItemControl { ...@@ -89,7 +91,7 @@ public class QueriesTabItemControl extends AbstractTabItemControl {
@Override @Override
public void handleValueChange(ValueChangeEvent event) { public void handleValueChange(ValueChangeEvent event) {
BusinessObject selectedBo = (BusinessObject) event.diff.getNewValue(); final BusinessObject selectedBo = (BusinessObject) event.diff.getNewValue();
updateDefaultQueries(selectedBo); updateDefaultQueries(selectedBo);
} }
...@@ -98,9 +100,9 @@ public class QueriesTabItemControl extends AbstractTabItemControl { ...@@ -98,9 +100,9 @@ public class QueriesTabItemControl extends AbstractTabItemControl {
@Override @Override
public void widgetSelected(SelectionEvent e) { public void widgetSelected(SelectionEvent e) {
Widget item = e.item; final Widget item = e.item;
if (item instanceof TabItem && Messages.queries.equals(((TabItem) item).getText())) { if (item instanceof TabItem && Messages.queries.equals(((TabItem) item).getText())) {
BusinessObject selectedBo = (BusinessObject) viewerObservableValue.getValue(); final BusinessObject selectedBo = (BusinessObject) viewerObservableValue.getValue();
updateDefaultQueries(selectedBo); updateDefaultQueries(selectedBo);
} }
} }
...@@ -115,17 +117,17 @@ public class QueriesTabItemControl extends AbstractTabItemControl { ...@@ -115,17 +117,17 @@ public class QueriesTabItemControl extends AbstractTabItemControl {
radioComposite.setLayoutData(GridDataFactory.fillDefaults().grab(false, false).span(2, 1).create()); radioComposite.setLayoutData(GridDataFactory.fillDefaults().grab(false, false).span(2, 1).create());
radioComposite.setLayout(GridLayoutFactory.fillDefaults().numColumns(2).extendedMargins(5, 5, 5, 0).spacing(20, 0).create()); radioComposite.setLayout(GridLayoutFactory.fillDefaults().numColumns(2).extendedMargins(5, 5, 5, 0).spacing(20, 0).create());
Button defaultQueriesRadioButton = new Button(radioComposite, SWT.RADIO); final Button defaultQueriesRadioButton = new Button(radioComposite, SWT.RADIO);
defaultQueriesRadioButton.setLayoutData(GridDataFactory.swtDefaults().create()); defaultQueriesRadioButton.setLayoutData(GridDataFactory.swtDefaults().create());
defaultQueriesRadioButton.setText(Messages.defaultQueriesOption); defaultQueriesRadioButton.setText(Messages.defaultQueriesOption);
ControlDecoration controlDecoration = new ControlDecoration(defaultQueriesRadioButton, SWT.RIGHT); final ControlDecoration controlDecoration = new ControlDecoration(defaultQueriesRadioButton, SWT.RIGHT);
controlDecoration.setDescriptionText(Messages.defaultQueriesHint); controlDecoration.setDescriptionText(Messages.defaultQueriesHint);
controlDecoration.setImage(Pics.getImage(PicsConstants.hint)); controlDecoration.setImage(Pics.getImage(PicsConstants.hint));
controlDecoration.setShowOnlyOnFocus(false); controlDecoration.setShowOnlyOnFocus(false);
controlDecoration.setMarginWidth(-5); controlDecoration.setMarginWidth(-5);
Button customQueriesRadioButton = new Button(radioComposite, SWT.RADIO); final Button customQueriesRadioButton = new Button(radioComposite, SWT.RADIO);
customQueriesRadioButton.setText(Messages.customQueriesOption); customQueriesRadioButton.setText(Messages.customQueriesOption);
final Composite stackComposite = new Composite(this, SWT.NONE); final Composite stackComposite = new Composite(this, SWT.NONE);
...@@ -136,14 +138,14 @@ public class QueriesTabItemControl extends AbstractTabItemControl { ...@@ -136,14 +138,14 @@ public class QueriesTabItemControl extends AbstractTabItemControl {
final Composite defaultComposite = createDefaultQueriesControl(ctx, viewerObservableValue, stackComposite); final Composite defaultComposite = createDefaultQueriesControl(ctx, viewerObservableValue, stackComposite);
final Composite customComposite = createCustomQueriesControl(ctx, viewerObservableValue, stackComposite); final Composite customComposite = createCustomQueriesControl(ctx, viewerObservableValue, stackComposite);
SelectObservableValue radioGroupObservable = new SelectObservableValue(String.class); final SelectObservableValue radioGroupObservable = new SelectObservableValue(String.class);
radioGroupObservable.addOption(DEFAULT, SWTObservables.observeSelection(defaultQueriesRadioButton)); radioGroupObservable.addOption(DEFAULT, SWTObservables.observeSelection(defaultQueriesRadioButton));
radioGroupObservable.addOption(CUSTOM, SWTObservables.observeSelection(customQueriesRadioButton)); radioGroupObservable.addOption(CUSTOM, SWTObservables.observeSelection(customQueriesRadioButton));
radioGroupObservable.addValueChangeListener(new IValueChangeListener() { radioGroupObservable.addValueChangeListener(new IValueChangeListener() {
@Override @Override
public void handleValueChange(ValueChangeEvent event) { public void handleValueChange(ValueChangeEvent event) {
Object newValue = event.diff.getNewValue(); final Object newValue = event.diff.getNewValue();
if (DEFAULT.equals(newValue)) { if (DEFAULT.equals(newValue)) {
stackLayout.topControl = defaultComposite; stackLayout.topControl = defaultComposite;
} else { } else {
...@@ -157,29 +159,29 @@ public class QueriesTabItemControl extends AbstractTabItemControl { ...@@ -157,29 +159,29 @@ public class QueriesTabItemControl extends AbstractTabItemControl {
} }
protected void deleteQuery(IObservableList queryObserveDetailList, TableViewer queriesTableViewer) { protected void deleteQuery(IObservableList queryObserveDetailList, TableViewer queriesTableViewer) {
IStructuredSelection selection = (IStructuredSelection) queriesTableViewer.getSelection(); final IStructuredSelection selection = (IStructuredSelection) queriesTableViewer.getSelection();
queryObserveDetailList.removeAll(selection.toList()); queryObserveDetailList.removeAll(selection.toList());
} }
protected void addQuery(IViewerObservableValue viewerObservableValue, IObservableList queryObserveDetailList, TableViewer queriesTableViewer) { protected void addQuery(IViewerObservableValue viewerObservableValue, IObservableList queryObserveDetailList, TableViewer queriesTableViewer) {
Query query = new Query(generateQueryName(viewerObservableValue), "", List.class.getName()); final Query query = new Query(generateQueryName(viewerObservableValue), "", List.class.getName());
queryObserveDetailList.add(query); queryObserveDetailList.add(query);
queriesTableViewer.editElement(query, 0); queriesTableViewer.editElement(query, 0);
} }
protected String generateQueryName(IViewerObservableValue viewerObservableValue) { protected String generateQueryName(IViewerObservableValue viewerObservableValue) {
Set<String> existingNames = new HashSet<String>(); final Set<String> existingNames = new HashSet<String>();
BusinessObject businessObject = (BusinessObject) viewerObservableValue.getValue(); final BusinessObject businessObject = (BusinessObject) viewerObservableValue.getValue();
List<Query> queries = businessObject.getQueries(); final List<Query> queries = businessObject.getQueries();
for (Query q : queries) { for (final Query q : queries) {
existingNames.add(q.getName()); existingNames.add(q.getName());
} }
return NamingUtils.generateNewName(existingNames, DEFAULT_QUERY_NAME, 1); return NamingUtils.generateNewName(existingNames, DEFAULT_QUERY_NAME, 1);
} }
protected TableViewerColumn createQueryContentColumn(DataBindingContext ctx, TableViewer queriesTableViewer) { protected TableViewerColumn createQueryContentColumn(DataBindingContext ctx, TableViewer queriesTableViewer) {
TableViewerColumn queryContentColumnViewer = new TableViewerColumn(queriesTableViewer, SWT.LEFT); final TableViewerColumn queryContentColumnViewer = new TableViewerColumn(queriesTableViewer, SWT.LEFT);
TableColumn column = queryContentColumnViewer.getColumn(); final TableColumn column = queryContentColumnViewer.getColumn();
column.setText(Messages.query); column.setText(Messages.query);
queryContentColumnViewer.setLabelProvider(new ColumnLabelProvider() { queryContentColumnViewer.setLabelProvider(new ColumnLabelProvider() {
...@@ -201,8 +203,8 @@ public class QueriesTabItemControl extends AbstractTabItemControl { ...@@ -201,8 +203,8 @@ public class QueriesTabItemControl extends AbstractTabItemControl {
} }
protected TableViewerColumn createQueryNameColumn(DataBindingContext ctx, TableViewer queriesTableViewer) { protected TableViewerColumn createQueryNameColumn(DataBindingContext ctx, TableViewer queriesTableViewer) {
TableViewerColumn nameColumnViewer = new TableViewerColumn(queriesTableViewer, SWT.LEFT); final TableViewerColumn nameColumnViewer = new TableViewerColumn(queriesTableViewer, SWT.LEFT);
TableColumn column = nameColumnViewer.getColumn(); final TableColumn column = nameColumnViewer.getColumn();
column.setText(Messages.name + " *"); column.setText(Messages.name + " *");
nameColumnViewer.setLabelProvider(new ColumnLabelProvider() { nameColumnViewer.setLabelProvider(new ColumnLabelProvider() {
...@@ -222,7 +224,7 @@ public class QueriesTabItemControl extends AbstractTabItemControl { ...@@ -222,7 +224,7 @@ public class QueriesTabItemControl extends AbstractTabItemControl {
} }
protected TableViewerColumn createStatusColumn(DataBindingContext ctx, IViewerObservableValue viewerObservableValue, TableViewer queriesTableViewer) { protected TableViewerColumn createStatusColumn(DataBindingContext ctx, IViewerObservableValue viewerObservableValue, TableViewer queriesTableViewer) {
TableViewerColumn statusColumn = new TableViewerColumn(queriesTableViewer, SWT.LEFT); final TableViewerColumn statusColumn = new TableViewerColumn(queriesTableViewer, SWT.LEFT);
statusColumn.setLabelProvider(new QueryStatusLabelProvider(viewerObservableValue)); statusColumn.setLabelProvider(new QueryStatusLabelProvider(viewerObservableValue));
return statusColumn; return statusColumn;
} }
...@@ -232,14 +234,8 @@ public class QueriesTabItemControl extends AbstractTabItemControl { ...@@ -232,14 +234,8 @@ public class QueriesTabItemControl extends AbstractTabItemControl {
composite.setLayoutData(GridDataFactory.fillDefaults().align(SWT.LEFT, SWT.TOP).create()); composite.setLayoutData(GridDataFactory.fillDefaults().align(SWT.LEFT, SWT.TOP).create());
composite.setLayout(GridLayoutFactory.fillDefaults().numColumns(2).margins(5, 5).create()); composite.setLayout(GridLayoutFactory.fillDefaults().numColumns(2).margins(5, 5).create());
Label countQueryInfoLabel = new Label(composite, SWT.WRAP); final Well well = new Well(composite, Messages.countQueryInfo, new FormToolkit(getDisplay()), IStatus.INFO);
countQueryInfoLabel.setLayoutData(GridDataFactory.fillDefaults().grab(true, false).span(2, 1).indent(50, 0).hint(450, SWT.DEFAULT).create()); well.setLayoutData(GridDataFactory.fillDefaults().grab(true, false).span(2, 1).hint(450, SWT.DEFAULT).create());
countQueryInfoLabel.setText(Messages.countQueryInfo);
ControlDecoration controlDecoration = new ControlDecoration(countQueryInfoLabel, SWT.LEFT);
controlDecoration.setImage(composite.getDisplay().getSystemImage(SWT.ICON_INFORMATION));
controlDecoration.setMarginWidth(5);
controlDecoration.show();
final Composite buttonsComposite = new Composite(composite, SWT.NONE); final Composite buttonsComposite = new Composite(composite, SWT.NONE);
buttonsComposite.setLayoutData(GridDataFactory.fillDefaults().grab(false, true).indent(0, 20).create()); buttonsComposite.setLayoutData(GridDataFactory.fillDefaults().grab(false, true).indent(0, 20).create());
...@@ -255,7 +251,7 @@ public class QueriesTabItemControl extends AbstractTabItemControl { ...@@ -255,7 +251,7 @@ public class QueriesTabItemControl extends AbstractTabItemControl {
queriesTableViewer.getTable().setHeaderVisible(true); queriesTableViewer.getTable().setHeaderVisible(true);
queriesTableViewer.setContentProvider(new ObservableListContentProvider()); queriesTableViewer.setContentProvider(new ObservableListContentProvider());
TableLayout tableLayout = new TableLayout(); final TableLayout tableLayout = new TableLayout();
tableLayout.addColumnData(new ColumnWeightData(1)); tableLayout.addColumnData(new ColumnWeightData(1));
tableLayout.addColumnData(new ColumnWeightData(3)); tableLayout.addColumnData(new ColumnWeightData(3));
tableLayout.addColumnData(new ColumnWeightData(9)); tableLayout.addColumnData(new ColumnWeightData(9));
...@@ -271,7 +267,7 @@ public class QueriesTabItemControl extends AbstractTabItemControl { ...@@ -271,7 +267,7 @@ public class QueriesTabItemControl extends AbstractTabItemControl {
}); });
ctx.bindValue(SWTObservables.observeEnabled(queriesTableViewer.getTable()), viewerObservableValue, null, enableStrategy); ctx.bindValue(SWTObservables.observeEnabled(queriesTableViewer.getTable()), viewerObservableValue, null, enableStrategy);
IViewerObservableValue constaintObserveSingleSelection = ViewersObservables.observeSingleSelection(queriesTableViewer); final IViewerObservableValue constaintObserveSingleSelection = ViewersObservables.observeSingleSelection(queriesTableViewer);
ctx.bindValue(SWTObservables.observeEnabled(deleteButton), constaintObserveSingleSelection, null, enableStrategy); ctx.bindValue(SWTObservables.observeEnabled(deleteButton), constaintObserveSingleSelection, null, enableStrategy);
enableStrategy = new UpdateValueStrategy(); enableStrategy = new UpdateValueStrategy();
...@@ -294,9 +290,9 @@ public class QueriesTabItemControl extends AbstractTabItemControl { ...@@ -294,9 +290,9 @@ public class QueriesTabItemControl extends AbstractTabItemControl {
ColumnViewerToolTipSupport.enableFor(queriesTableViewer); ColumnViewerToolTipSupport.enableFor(queriesTableViewer);
createStatusColumn(ctx, viewerObservableValue, queriesTableViewer); createStatusColumn(ctx, viewerObservableValue, queriesTableViewer);
TableViewerColumn nameColumnViewer = createQueryNameColumn(ctx, queriesTableViewer); final TableViewerColumn nameColumnViewer = createQueryNameColumn(ctx, queriesTableViewer);
nameColumnViewer.setEditingSupport(new QueryNameEditingSupport(viewerObservableValue, nameColumnViewer.getViewer(), ctx)); nameColumnViewer.setEditingSupport(new QueryNameEditingSupport(viewerObservableValue, nameColumnViewer.getViewer(), ctx));
TableViewerColumn queryContentColumnViewer = createQueryContentColumn(ctx, queriesTableViewer); final TableViewerColumn queryContentColumnViewer = createQueryContentColumn(ctx, queriesTableViewer);
queryContentColumnViewer.setEditingSupport(new QueryContentEditingSupport(queryContentColumnViewer.getViewer(), viewerObservableValue)); queryContentColumnViewer.setEditingSupport(new QueryContentEditingSupport(queryContentColumnViewer.getViewer(), viewerObservableValue));
final IObservableList queryObserveDetailList = PojoObservables.observeDetailList(viewerObservableValue, "queries", Query.class); final IObservableList queryObserveDetailList = PojoObservables.observeDetailList(viewerObservableValue, "queries", Query.class);
...@@ -340,13 +336,13 @@ public class QueriesTabItemControl extends AbstractTabItemControl { ...@@ -340,13 +336,13 @@ public class QueriesTabItemControl extends AbstractTabItemControl {
queriesTableViewer.getTable().setHeaderVisible(true); queriesTableViewer.getTable().setHeaderVisible(true);
queriesTableViewer.setContentProvider(new ObservableListContentProvider()); queriesTableViewer.setContentProvider(new ObservableListContentProvider());
TableLayout tableLayout = new TableLayout(); final TableLayout tableLayout = new TableLayout();
tableLayout.addColumnData(new ColumnWeightData(1)); tableLayout.addColumnData(new ColumnWeightData(1));
tableLayout.addColumnData(new ColumnWeightData(3)); tableLayout.addColumnData(new ColumnWeightData(3));
queriesTableViewer.getTable().setLayout(tableLayout); queriesTableViewer.getTable().setLayout(tableLayout);
createQueryNameColumn(ctx, queriesTableViewer); createQueryNameColumn(ctx, queriesTableViewer);
TableViewerColumn queryContentColumnViewer = createQueryContentColumn(ctx, queriesTableViewer); final TableViewerColumn queryContentColumnViewer = createQueryContentColumn(ctx, queriesTableViewer);
queryContentColumnViewer.setEditingSupport(new ReadOnlyQueryContentEditingSupport(queryContentColumnViewer.getViewer(), viewerObservableValue)); queryContentColumnViewer.setEditingSupport(new ReadOnlyQueryContentEditingSupport(queryContentColumnViewer.getViewer(), viewerObservableValue));
queriesTableViewer.setInput(defaultQueriesList); queriesTableViewer.setInput(defaultQueriesList);
......
...@@ -425,9 +425,7 @@ public class PageComponentSwitchBuilder { ...@@ -425,9 +425,7 @@ public class PageComponentSwitchBuilder {
} else { } else {
viewer.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create()); viewer.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create());
} }
for (int i = 0; i < array.getCols().intValue(); i++) { configureArrayColumnFilters(array, viewer);
viewer.addFilter(connectorExpressionContentTypeFilter);
}
if (input.isMandatory()) { if (input.isMandatory()) {
viewer.setMandatoryField(getLabel(array.getId()), context); viewer.setMandatoryField(getLabel(array.getId()), context);
} }
...@@ -465,6 +463,12 @@ public class PageComponentSwitchBuilder { ...@@ -465,6 +463,12 @@ public class PageComponentSwitchBuilder {
return null; return null;
} }
protected void configureArrayColumnFilters(final Array array, final ExpressionCollectionViewer viewer) {
for (int i = 0; i < array.getCols().intValue(); i++) {
viewer.addFilter(connectorExpressionContentTypeFilter);
}
}
public Section createGroupControl(final Composite composite, final Group object) { public Section createGroupControl(final Composite composite, final Group object) {
final String desc = getDescription(object.getId()); final String desc = getDescription(object.getId());
int style = Section.NO_TITLE_FOCUS_BOX | Section.TWISTIE | Section.CLIENT_INDENT; int style = Section.NO_TITLE_FOCUS_BOX | Section.TWISTIE | Section.CLIENT_INDENT;
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<bonita.home.dir>${basedir}/bonita-home</bonita.home.dir> <bonita.home.dir>${basedir}/bonita-home</bonita.home.dir>
<javadoc.dir>${basedir}/javadoc</javadoc.dir> <javadoc.dir>${basedir}/javadoc</javadoc.dir>
<lib.dir>lib</lib.dir> <lib.dir>lib</lib.dir>
<tomcat.version>7.0.55</tomcat.version> <tomcat.version>7.0.67</tomcat.version>
</properties> </properties>
<dependencies> <dependencies>
......
...@@ -75,7 +75,7 @@ autoGeneratedOperationStepButton=Auto-generate storage operations ...@@ -75,7 +75,7 @@ autoGeneratedOperationStepButton=Auto-generate storage operations
manuallyDefinedOperationStepButton=No, thanks. I'll manually define how to use the contract. manuallyDefinedOperationStepButton=No, thanks. I'll manually define how to use the contract.
autoGeneratedOperationProcessButton=Auto-generate the initialization script.Click on preview button to check its content. autoGeneratedOperationProcessButton=Auto-generate the initialization script.Click on preview button to check its content.
manuallyDefinedOperationProcessButton=No, thanks. I'll manually define how to use the contract. manuallyDefinedOperationProcessButton=No, thanks. I'll manually define how to use the contract.
contractStrictGenerationMsg=The contract inputs have been specified.\nA script that sets the default values of the business variable attributes with the contract input values will be generated. It can be viewed and edited in the Data tab. If the default value of a business variable already exists, this script will override it.\n\nContract inputs and the script can be edited manually.\nHowever, there is no refactoring (for example, updating the attribute name or a multiple property in a business object or contract element will break the script). contractStrictGenerationMsg=The contract inputs have been specified.\nA script that sets the default values of the business variable attributes with the contract input values will be generated. It can be viewed and edited in the Data tab. If the default value of a business variable already exists, this script will override it.\n\nThe contract inputs and the script can be edited manually.\nHowever, there is no refactoring (for example, updating the attribute name or a multiple property in a business object or contract element will break the script).
invalidBusinessDataSelected=Invalid business data selected. invalidBusinessDataSelected=Invalid business data selected.
setGeneratedScriptPreviewPageDescription=Preview of the generated script that initializes the default value of the data {0}. To edit this script, go to the Data declaration and edit the default value definition. setGeneratedScriptPreviewPageDescription=Preview of the generated script that initializes the default value of the data {0}. To edit this script, go to the Data declaration and edit the default value definition.
generatedScriptPreviewTitle=Generated script preview generatedScriptPreviewTitle=Generated script preview
......
...@@ -21,6 +21,7 @@ import java.util.List; ...@@ -21,6 +21,7 @@ import java.util.List;
import java.util.Set; import java.util.Set;
import org.bonitasoft.studio.common.ExpressionConstants; import org.bonitasoft.studio.common.ExpressionConstants;
import org.bonitasoft.studio.common.NamingUtils;
import org.bonitasoft.studio.common.jface.DataStyledTreeLabelProvider; import org.bonitasoft.studio.common.jface.DataStyledTreeLabelProvider;
import org.bonitasoft.studio.common.jface.TableColumnSorter; import org.bonitasoft.studio.common.jface.TableColumnSorter;
import org.bonitasoft.studio.common.log.BonitaStudioLog; import org.bonitasoft.studio.common.log.BonitaStudioLog;
...@@ -96,6 +97,10 @@ public class JavaExpressionEditor extends SelectionAwareExpressionEditor impleme ...@@ -96,6 +97,10 @@ public class JavaExpressionEditor extends SelectionAwareExpressionEditor impleme
private boolean isPageFlowContext = false; private boolean isPageFlowContext = false;
private MultiValidator validationStatusProvider;
private EMFDataBindingContext dataBindingContext;
@Override @Override
public Control createExpressionEditor(final Composite parent, final EMFDataBindingContext ctx) { public Control createExpressionEditor(final Composite parent, final EMFDataBindingContext ctx) {
mainComposite = new Composite(parent, SWT.NONE); mainComposite = new Composite(parent, SWT.NONE);
...@@ -245,7 +250,7 @@ public class JavaExpressionEditor extends SelectionAwareExpressionEditor impleme ...@@ -245,7 +250,7 @@ public class JavaExpressionEditor extends SelectionAwareExpressionEditor impleme
public void bindExpression(final EMFDataBindingContext dataBindingContext, final EObject context, final Expression inputExpression, public void bindExpression(final EMFDataBindingContext dataBindingContext, final EObject context, final Expression inputExpression,
final ViewerFilter[] filters, final ViewerFilter[] filters,
final ExpressionViewer expressionViewer) { final ExpressionViewer expressionViewer) {
this.dataBindingContext = dataBindingContext;
editorInputExpression = inputExpression; editorInputExpression = inputExpression;
setContentProvider(new PojoBrowserContentProvider()); setContentProvider(new PojoBrowserContentProvider());
javaTreeviewer.setContentProvider(getContentProvider()); javaTreeviewer.setContentProvider(getContentProvider());
...@@ -273,10 +278,11 @@ public class JavaExpressionEditor extends SelectionAwareExpressionEditor impleme ...@@ -273,10 +278,11 @@ public class JavaExpressionEditor extends SelectionAwareExpressionEditor impleme
@Override @Override
public Object convert(final Object data) { public Object convert(final Object data) {
if (data instanceof Data) { if (data instanceof Data) {
return ((Data) data).getName() + " - " + ((JavaObjectData) data).getClassName() + "#" + editorInputExpression.getContent(); return ((Data) data).getName() + " - " + NamingUtils.getSimpleName(((JavaObjectData) data).getClassName()) + "#"
+ editorInputExpression.getContent();
} else if (data instanceof IMethod) {