Commit f1de3f01 authored by azara's avatar azara
Browse files

BS-14273 improve generation guidance

improve message and the behavior of pop up when user click on finish (on
input generation wizard)
parent 4a01bc1d
......@@ -64,11 +64,12 @@ contractInputDescriptionTooltip=Used in the automatically generated forms as use
errorTitle=Error
contractFromDataCreationErrorMessage=An error occurred while generating the contract from a data.
contractGenerationTitle=Contract generation
contractGenerationMsg=Generated contract elements and operations can be edited manually.\nHowever, in many cases, no refactoring is performed (e.g.: Updating name or multiple attribute in a Business object or contract element may break a generated operation).
contractOperationGenerationMsg=The contract inputs have been specified.\n\nOperations to set the values of the business variable attributes with the contract inputs values will be generated.They can be viewed in the Operations pane.\n If operations have already been generated for these attributes, they will not be replaced. The new operations are added to the list.\n\nContract inputs and operations 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 operation).
doNotShowMeAgain=Do not show me this dialog again
notAllAttributesGeneratedTitle=incomplete initialization of the business variable
notAllAttributesGeneratedMsg=Some attributes of the business variable will not be initialized from the contract elements as they have been deselected.
autoGeneratedOperationStepButton=Auto-generate storage operations
manuallyDefinedOperationStepButton=No, thanks. I'll manually define how to use the contract.
autoGeneratedOperationProcessButton=Auto-generate the initialization script
manuallyDefinedOperationProcessButton=No, thanks. I'll manually define how to use the contract.
\ No newline at end of file
manuallyDefinedOperationProcessButton=No, thanks. I'll manually define how to use the contract.
contractStrictGenerationMsg=The contract inputs have been specified.\n A 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).
\ No newline at end of file
......@@ -71,6 +71,9 @@ public class ContractInputGenerationWizardTest {
@Mock
private FieldToContractInputMappingExpressionBuilder expressionBuilder;
@Mock
private ContractInputGenerationInfoDialog dialog;
@Test
public void should_first_wizard_page_be_selectBusinessDataWizardPage() {
final BusinessObjectData data = aBusinessData().build();
......@@ -78,7 +81,7 @@ public class ContractInputGenerationWizardTest {
process.getData().add(data);
final ContractInputGenerationWizard wizard = new ContractInputGenerationWizard(process, editingDomain(), repositoryAccessor, operationBuilder,
expressionBuilder, preferenceStore, sharedImages);
expressionBuilder, preferenceStore, sharedImages, dialog);
wizard.addPages();
assertThat(wizard.getPages()[0]).isInstanceOf(SelectBusinessDataWizardPage.class);
......@@ -91,7 +94,7 @@ public class ContractInputGenerationWizardTest {
process.getData().add(data);
final ContractInputGenerationWizard wizard = new ContractInputGenerationWizard(process, editingDomain(), repositoryAccessor, operationBuilder,
expressionBuilder, preferenceStore, sharedImages);
expressionBuilder, preferenceStore, sharedImages, dialog);
wizard.addPages();
assertThat(wizard.getPages()[0]).isInstanceOf(SelectBusinessDataWizardPage.class);
......@@ -107,11 +110,11 @@ public class ContractInputGenerationWizardTest {
when(store.getBusinessObjectByQualifiedName("org.company.Employee")).thenReturn(
BusinessObjectBuilder.aBO("org.company.Employee").withField(SimpleFieldBuilder.aStringField("firstName").build()).build());
when(repositoryAccessor.getRepositoryStore(BusinessObjectModelRepositoryStore.class)).thenReturn(store);
when(preferenceStore.getString(ContractInputGenerationWizard.HIDE_GENERATION_SUCCESS_DIALOG)).thenReturn("always");
when(preferenceStore.getString(ContractInputGenerationInfoDialog.HIDE_GENERATION_SUCCESS_DIALOG)).thenReturn("always");
final ContractInputGenerationWizard wizard = new ContractInputGenerationWizard(process, editingDomain(), repositoryAccessor, operationBuilder,
expressionBuilder,
preferenceStore, sharedImages);
preferenceStore, sharedImages, dialog);
wizard.addPages();
final IWizardContainer wizardContainer = Mockito.mock(IWizardContainer.class);
when(wizardContainer.getShell()).thenReturn(realmWithDisplay.getShell());
......@@ -133,10 +136,10 @@ public class ContractInputGenerationWizardTest {
when(store.getBusinessObjectByQualifiedName("org.company.Employee")).thenReturn(
BusinessObjectBuilder.aBO("org.company.Employee").withField(SimpleFieldBuilder.aStringField("firstName").build()).build());
when(repositoryAccessor.getRepositoryStore(BusinessObjectModelRepositoryStore.class)).thenReturn(store);
when(preferenceStore.getString(ContractInputGenerationWizard.HIDE_GENERATION_SUCCESS_DIALOG)).thenReturn("always");
when(preferenceStore.getString(ContractInputGenerationInfoDialog.HIDE_GENERATION_SUCCESS_DIALOG)).thenReturn("always");
final ContractInputGenerationWizard wizard = new ContractInputGenerationWizard(process, editingDomain(), repositoryAccessor, operationBuilder,
expressionBuilder,
preferenceStore, sharedImages);
preferenceStore, sharedImages, dialog);
wizard.addPages();
final IWizardContainer wizardContainer = Mockito.mock(IWizardContainer.class);
when(wizardContainer.getShell()).thenReturn(realmWithDisplay.getShell());
......@@ -158,12 +161,12 @@ public class ContractInputGenerationWizardTest {
when(store.getBusinessObjectByQualifiedName("org.company.Employee")).thenReturn(
BusinessObjectBuilder.aBO("org.company.Employee").withField(SimpleFieldBuilder.aStringField("firstName").build()).build());
when(repositoryAccessor.getRepositoryStore(BusinessObjectModelRepositoryStore.class)).thenReturn(store);
when(preferenceStore.getString(ContractInputGenerationWizard.HIDE_GENERATION_SUCCESS_DIALOG)).thenReturn("always");
when(preferenceStore.getString(ContractInputGenerationInfoDialog.HIDE_GENERATION_SUCCESS_DIALOG)).thenReturn("always");
when(expressionBuilder.toExpression(any(BusinessObjectData.class), any(FieldToContractInputMapping.class), anyBoolean())).thenReturn(
aGroovyScriptExpression().build());
final ContractInputGenerationWizard wizard = new ContractInputGenerationWizard(process, editingDomain(), repositoryAccessor, operationBuilder,
expressionBuilder,
preferenceStore, sharedImages);
preferenceStore, sharedImages, dialog);
wizard.addPages();
final IWizardContainer wizardContainer = Mockito.mock(IWizardContainer.class);
when(wizardContainer.getShell()).thenReturn(realmWithDisplay.getShell());
......@@ -187,10 +190,10 @@ public class ContractInputGenerationWizardTest {
when(store.getBusinessObjectByQualifiedName("org.company.Employee")).thenReturn(
BusinessObjectBuilder.aBO("org.company.Employee").withField(SimpleFieldBuilder.aStringField("firstName").build()).build());
when(repositoryAccessor.getRepositoryStore(BusinessObjectModelRepositoryStore.class)).thenReturn(store);
when(preferenceStore.getString(ContractInputGenerationWizard.HIDE_GENERATION_SUCCESS_DIALOG)).thenReturn("always");
when(preferenceStore.getString(ContractInputGenerationInfoDialog.HIDE_GENERATION_SUCCESS_DIALOG)).thenReturn("always");
final ContractInputGenerationWizard wizard = new ContractInputGenerationWizard(task, editingDomain(), repositoryAccessor, operationBuilder,
expressionBuilder,
preferenceStore, sharedImages);
preferenceStore, sharedImages, dialog);
wizard.addPages();
final IWizardContainer wizardContainer = Mockito.mock(IWizardContainer.class);
when(wizardContainer.getShell()).thenReturn(realmWithDisplay.getShell());
......@@ -214,12 +217,12 @@ public class ContractInputGenerationWizardTest {
when(store.getBusinessObjectByQualifiedName("org.company.Employee")).thenReturn(
BusinessObjectBuilder.aBO("org.company.Employee").withField(SimpleFieldBuilder.aStringField("firstName").build()).build());
when(repositoryAccessor.getRepositoryStore(BusinessObjectModelRepositoryStore.class)).thenReturn(store);
when(preferenceStore.getString(ContractInputGenerationWizard.HIDE_GENERATION_SUCCESS_DIALOG)).thenReturn("always");
when(preferenceStore.getString(ContractInputGenerationInfoDialog.HIDE_GENERATION_SUCCESS_DIALOG)).thenReturn("always");
when(operationBuilder.toOperation(any(BusinessObjectData.class), any(FieldToContractInputMapping.class))).thenReturn(
anOperation().build());
final ContractInputGenerationWizard wizard = new ContractInputGenerationWizard(task, editingDomain(), repositoryAccessor, operationBuilder,
expressionBuilder,
preferenceStore, sharedImages);
preferenceStore, sharedImages, dialog);
wizard.addPages();
final IWizardContainer wizardContainer = Mockito.mock(IWizardContainer.class);
when(wizardContainer.getShell()).thenReturn(realmWithDisplay.getShell());
......@@ -235,7 +238,7 @@ public class ContractInputGenerationWizardTest {
public void should_canFinish_return_false_when_no_data_is_defined() {
final Pool process = aPool().havingContract(aContract()).build();
final ContractInputGenerationWizard wizard = new ContractInputGenerationWizard(process, editingDomain(), repositoryAccessor, operationBuilder,
expressionBuilder, preferenceStore, sharedImages);
expressionBuilder, preferenceStore, sharedImages, dialog);
wizard.addPages();
final IWizardContainer wizardContainer = Mockito.mock(IWizardContainer.class);
when(wizardContainer.getShell()).thenReturn(realmWithDisplay.getShell());
......@@ -254,7 +257,7 @@ public class ContractInputGenerationWizardTest {
.getBusinessObjectByQualifiedName("com.company.Employee");
when(repositoryAccessor.getRepositoryStore(BusinessObjectModelRepositoryStore.class)).thenReturn(store);
final ContractInputGenerationWizard wizard = new ContractInputGenerationWizard(process, editingDomain(), repositoryAccessor, operationBuilder,
expressionBuilder, preferenceStore, sharedImages);
expressionBuilder, preferenceStore, sharedImages, dialog);
wizard.addPages();
final IWizardContainer wizardContainer = Mockito.mock(IWizardContainer.class);
when(wizardContainer.getShell()).thenReturn(realmWithDisplay.getShell());
......
......@@ -92,7 +92,7 @@ public class Messages extends NLS {
public static String errorTitle;
public static String contractFromDataCreationErrorMessage;
public static String contractGenerationTitle;
public static String contractGenerationMsg;
public static String contractOperationGenerationMsg;
public static String doNotShowMeAgain;
public static String notAllAttributesGeneratedTitle;
public static String notAllAttributesGeneratedMsg;
......@@ -100,4 +100,5 @@ public class Messages extends NLS {
public static String manuallyDefinedOperationStepButton;
public static String autoGeneratedOperationProcessButton;
public static String manuallyDefinedOperationProcessButton;
public static String contractStrictGenerationMsg;
}
......@@ -27,6 +27,7 @@ import org.bonitasoft.studio.contract.ui.property.constraint.ContractConstraints
import org.bonitasoft.studio.contract.ui.property.input.ContractInputController;
import org.bonitasoft.studio.contract.ui.property.input.ContractInputTreeViewer;
import org.bonitasoft.studio.contract.ui.wizard.AddInputContractFromDataWizardDialog;
import org.bonitasoft.studio.contract.ui.wizard.ContractInputGenerationInfoDialog;
import org.bonitasoft.studio.contract.ui.wizard.ContractInputGenerationWizard;
import org.bonitasoft.studio.designer.ui.contribution.CreateAndEditFormContributionItem;
import org.bonitasoft.studio.model.process.Contract;
......@@ -252,7 +253,7 @@ public class ContractPropertySection extends AbstractBonitaDescriptionSection {
fieldToContractInputMappingOperationBuilder,
fieldToContractInputMappingExpressionBuilder,
BonitaStudioPreferencesPlugin.getDefault().getPreferenceStore(),
sharedImages),
sharedImages, new ContractInputGenerationInfoDialog()),
this, true);
dialog.open();
}
......
/**
* Copyright (C) 2015 Bonitasoft S.A.
* Bonitasoft, 32 rue Gustave Eiffel - 38000 Grenoble
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2.0 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.bonitasoft.studio.contract.ui.wizard;
import static com.google.common.base.Strings.isNullOrEmpty;
import org.bonitasoft.studio.contract.i18n.Messages;
import org.bonitasoft.studio.model.process.ContractContainer;
import org.bonitasoft.studio.model.process.OperationContainer;
import org.eclipse.jface.dialogs.MessageDialogWithToggle;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.swt.widgets.Shell;
/**
* @author aurelie
*/
public class ContractInputGenerationInfoDialog {
public static final int NOT_OPENED = -2;
public static final String HIDE_GENERATION_SUCCESS_DIALOG = "SHOW_GENERATION_SUCCESS_DIALOG";
protected int openInfoDialog(final IPreferenceStore preferenceStore, final Shell shell, final ContractContainer contractContainer,
final boolean isAutoGeneratedOperation,
final boolean isAutogeneratedScript) {
if (isNullOrEmpty(preferenceStore.getString(HIDE_GENERATION_SUCCESS_DIALOG))
&& (isAutoGeneratedOperation || isAutogeneratedScript)) {
return MessageDialogWithToggle.openOkCancelConfirm(shell,
Messages.contractGenerationTitle,
getInfoMessage(contractContainer),
Messages.doNotShowMeAgain,
false,
preferenceStore,
HIDE_GENERATION_SUCCESS_DIALOG).getReturnCode();
}
return NOT_OPENED;
}
private String getInfoMessage(final ContractContainer contractContainer) {
if (contractContainer instanceof OperationContainer) {
return Messages.contractOperationGenerationMsg;
} else {
return Messages.contractStrictGenerationMsg;
}
}
}
......@@ -15,7 +15,6 @@
package org.bonitasoft.studio.contract.ui.wizard;
import static com.google.common.base.Predicates.instanceOf;
import static com.google.common.base.Strings.isNullOrEmpty;
import static com.google.common.collect.Iterables.filter;
import static com.google.common.collect.Lists.newArrayList;
......@@ -56,7 +55,6 @@ import org.eclipse.ui.ISharedImages;
*/
public class ContractInputGenerationWizard extends Wizard {
static final String HIDE_GENERATION_SUCCESS_DIALOG = "SHOW_GENERATION_SUCCESS_DIALOG";
private final EditingDomain editingDomain;
private final ContractContainer contractContainer;
private CreateContractInputFromBusinessObjectWizardPage contractInputFromBusinessObjectWizardPage;
......@@ -68,6 +66,7 @@ public class ContractInputGenerationWizard extends Wizard {
private final IPreferenceStore preferenceStore;
private final ISharedImages sharedImagesService;
private final FieldToContractInputMappingExpressionBuilder expressionBuilder;
private final ContractInputGenerationInfoDialog infoDialog;
public ContractInputGenerationWizard(final ContractContainer contractContainer,
final EditingDomain editingDomain,
......@@ -75,7 +74,8 @@ public class ContractInputGenerationWizard extends Wizard {
final FieldToContractInputMappingOperationBuilder operationBuilder,
final FieldToContractInputMappingExpressionBuilder expressionBuilder,
final IPreferenceStore preferenceStore,
final ISharedImages sharedImagesService) {
final ISharedImages sharedImagesService,
final ContractInputGenerationInfoDialog infoDialog) {
setWindowTitle(Messages.contractInputGenerationTitle);
setDefaultPageImageDescriptor(Pics.getWizban());
this.contractContainer = contractContainer;
......@@ -86,6 +86,7 @@ public class ContractInputGenerationWizard extends Wizard {
this.expressionBuilder = expressionBuilder;
this.preferenceStore = preferenceStore;
this.sharedImagesService = sharedImagesService;
this.infoDialog = infoDialog;
}
@Override
......@@ -130,28 +131,41 @@ public class ContractInputGenerationWizard extends Wizard {
final BusinessObjectData data = (BusinessObjectData) selectedDataObservable.getValue();
final RootContractInputGenerator contractInputGenerator = new RootContractInputGenerator(contractInputFromBusinessObjectWizardPage.getRootName(),
contractInputFromBusinessObjectWizardPage.getMappings(), repositoryAccessor, operationBuilder, expressionBuilder);
try {
if (contractContainer instanceof Pool) {
contractInputGenerator.buildForInstanciation(data);
} else {
contractInputGenerator.build(data);
final int returnCode = openInfoDialog();
if (returnCode == MessageDialogWithToggle.OK || returnCode == ContractInputGenerationInfoDialog.NOT_OPENED) {
try {
if (contractContainer instanceof Pool) {
contractInputGenerator.buildForInstanciation(data);
} else {
contractInputGenerator.build(data);
}
} catch (final OperationCreationException e) {
BonitaStudioLog.error("Failed to create Operations from contract", e);
new BonitaErrorDialog(getShell(), Messages.errorTitle, Messages.contractFromDataCreationErrorMessage, e).open();
return false;
}
} catch (final OperationCreationException e) {
BonitaStudioLog.error("Failed to create Operations from contract", e);
new BonitaErrorDialog(getShell(), Messages.errorTitle, Messages.contractFromDataCreationErrorMessage, e).open();
return false;
editingDomain.getCommandStack().execute(createCommand(contractInputGenerator, data));
openWarningDialog(contractInputGenerator.isAllAttributesGenerated());
return true;
}
editingDomain.getCommandStack().execute(createCommand(contractInputGenerator, data));
openWarningDialog(contractInputGenerator.isAllAttributesGenerated());
openInfoDialog();
return true;
contractInputFromBusinessObjectWizardPage.checkMannuallyDefinedOperationButton();
return false;
}
private int openInfoDialog() {
return infoDialog.openInfoDialog(preferenceStore, getShell(), contractContainer,
contractInputFromBusinessObjectWizardPage.getIsAutogeneratedOperation(),
contractInputFromBusinessObjectWizardPage.getIsAutogeneratedScript());
}
protected CompoundCommand createCommand(final RootContractInputGenerator contractInputGenerator, final BusinessObjectData data) {
protected CompoundCommand createCommand(final RootContractInputGenerator contractInputGenerator, final BusinessObjectData data
) {
final CompoundCommand cc = new CompoundCommand();
cc.append(AddCommand.create(editingDomain, contractContainer.getContract(), ProcessPackage.Literals.CONTRACT__INPUTS,
contractInputGenerator.getRootContractInput()));
if (contractContainer instanceof OperationContainer && contractInputFromBusinessObjectWizardPage.getIsAutogeneratedOperation()) {
if (contractContainer instanceof OperationContainer
&& contractInputFromBusinessObjectWizardPage.getIsAutogeneratedOperation()) {
cc.appendIfCanExecute(AddCommand.create(editingDomain, contractContainer, ProcessPackage.Literals.OPERATION_CONTAINER__OPERATIONS,
contractInputGenerator.getMappingOperations()));
}
......@@ -163,25 +177,13 @@ public class ContractInputGenerationWizard extends Wizard {
return cc;
}
protected void openInfoDialog() {
if (contractContainer instanceof OperationContainer && isNullOrEmpty(preferenceStore.getString(HIDE_GENERATION_SUCCESS_DIALOG))) {
MessageDialogWithToggle.openInformation(getShell(),
Messages.contractGenerationTitle,
Messages.contractGenerationMsg,
Messages.doNotShowMeAgain,
false,
preferenceStore,
HIDE_GENERATION_SUCCESS_DIALOG);
}
}
protected void openWarningDialog(final boolean allAttributesGenerated) {
if (!allAttributesGenerated) {
MessageDialog.openWarning(getShell(), Messages.notAllAttributesGeneratedTitle, Messages.notAllAttributesGeneratedMsg);
}
}
/**
/**
* @return
*/
public CreateContractInputFromBusinessObjectWizardPage getContractInputFromBusinessObjectWizardPage() {
......
......@@ -38,8 +38,11 @@ import org.bonitasoft.studio.model.process.BusinessObjectData;
import org.bonitasoft.studio.model.process.Contract;
import org.bonitasoft.studio.model.process.ContractInput;
import org.bonitasoft.studio.model.process.Element;
import org.bonitasoft.studio.model.process.OperationContainer;
import org.bonitasoft.studio.model.process.Pool;
import org.bonitasoft.studio.model.process.ProcessPackage;
import org.bonitasoft.studio.model.process.Task;
import org.eclipse.core.databinding.Binding;
import org.eclipse.core.databinding.beans.PojoObservables;
import org.eclipse.core.databinding.conversion.Converter;
import org.eclipse.core.databinding.conversion.IConverter;
......@@ -93,6 +96,10 @@ public class CreateContractInputFromBusinessObjectWizardPage extends WizardPage
private final ISharedImages sharedImagesService;
private boolean isAutogeneratedOperation = true;
private boolean isAutogeneratedScript = true;
private Button manuallyDefinedOperationButton;
private Button autoGeneratedOperationButton;
private EMFDataBindingContext dbc;
private Binding binding;
protected CreateContractInputFromBusinessObjectWizardPage(final Contract contract, final WritableValue selectedDataObservable,
final FieldToContractInputMappingFactory fieldToContractInputMappingFactory, final BusinessObjectModelRepositoryStore businessObjectStore,
......@@ -126,7 +133,7 @@ public class CreateContractInputFromBusinessObjectWizardPage extends WizardPage
*/
@Override
public void createControl(final Composite parent) {
final EMFDataBindingContext dbc = new EMFDataBindingContext();
dbc = new EMFDataBindingContext();
WizardPageSupport.create(this, dbc);
final Composite composite = new Composite(parent, SWT.NONE);
composite.setLayout(GridLayoutFactory.fillDefaults().numColumns(1).margins(10, 10).create());
......@@ -143,8 +150,8 @@ public class CreateContractInputFromBusinessObjectWizardPage extends WizardPage
final Image img = d.getSystemImage(SWT.ICON_WARNING);
reminder.setImage(img);
reminder.setLayoutData(GridDataFactory.fillDefaults().hint(600, SWT.DEFAULT).create());
final Button autoGeneratedOperationButton = new Button(composite, SWT.RADIO);
final Button manuallyDefinedOperationButton = new Button(composite, SWT.RADIO);
autoGeneratedOperationButton = new Button(composite, SWT.RADIO);
manuallyDefinedOperationButton = new Button(composite, SWT.RADIO);
final SelectObservableValue actionObservable = new SelectObservableValue(Boolean.class);
actionObservable.addOption(Boolean.TRUE, SWTObservables.observeSelection(autoGeneratedOperationButton));
actionObservable.addOption(Boolean.FALSE, SWTObservables.observeSelection(manuallyDefinedOperationButton));
......@@ -153,27 +160,44 @@ public class CreateContractInputFromBusinessObjectWizardPage extends WizardPage
reminder.setText(Messages.reminderForStepMessage);
autoGeneratedOperationButton.setText(Messages.autoGeneratedOperationStepButton);
manuallyDefinedOperationButton.setText(Messages.manuallyDefinedOperationStepButton);
dbc.bindValue(actionObservable, PojoObservables.observeValue(this, "isAutogeneratedOperation"));
binding = dbc.bindValue(actionObservable, PojoObservables.observeValue(this, "isAutogeneratedOperation"));
} else {
reminder.setText(Messages.reminderForProcessMessage);
autoGeneratedOperationButton.setText(Messages.autoGeneratedOperationProcessButton);
manuallyDefinedOperationButton.setText(Messages.manuallyDefinedOperationProcessButton);
dbc.bindValue(actionObservable, PojoObservables.observeValue(this, "isAutogeneratedScript"));
binding = dbc.bindValue(actionObservable, PojoObservables.observeValue(this, "isAutogeneratedScript"));
}
}
public void checkMannuallyDefinedOperationButton() {
if (contract.eContainer() instanceof Task) {
isAutogeneratedOperation = false;
} else {
isAutogeneratedScript = false;
}
binding.updateModelToTarget();
}
/**
* @return the isAutogeneratedOperation
*/
public boolean getIsAutogeneratedOperation() {
return isAutogeneratedOperation;
if (contract.eContainer() instanceof OperationContainer) {
return isAutogeneratedOperation;
} else {
return false;
}
}
/**
* @return the isAutogeneratedScript
*/
public boolean getIsAutogeneratedScript() {
return isAutogeneratedScript;
if (contract.eContainer() instanceof Pool) {
return isAutogeneratedScript;
} else {
return false;
}
}
/**
......
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