Source:
<code>public void execute() throws MetaClassNotFoundException, FeatureNotFoundException { DialogModelOperationPreprocessor preprocessor = new DialogModelOperationPreprocessor(this.dialogModelOperation); Optional<DialogModelOperation> optionalDialogModelOperation = preprocessor.convert(); optionalDialogModelOperation.ifPresent(convertedDialogModelOperation -> { PageDescription pageDescription = convertedDialogModelOperation.getPage(); List<PageDescription> pageDescriptions = new ArrayList<>(); pageDescriptions.add(pageDescription); SiriusInputDescriptor input = new SiriusInputDescriptor(this.context.getCurrentTarget()); ViewDescriptionConverter viewDescriptionConverter = new ViewDescriptionConverter(pageDescriptions); EEFViewDescription eefViewDescription = viewDescriptionConverter.convert(input); IVariableManager variableManager = new VariableManagerFactory().createVariableManager(); variableManager.put(EEFExpressionUtils.SELF, input.getSemanticElement()); variableManager.put(EEFExpressionUtils.INPUT, input); EditingContextAdapter editingContextAdapter = SiriusUIPropertiesPlugin.getPlugin().getEditingContextAdapter(session); SiriusInterpreter siriusInterpreter = new SiriusInterpreter(this.session); EEFViewFactory eefViewFactory = new EEFViewFactory(); EEFView eefView = eefViewFactory.createEEFView(eefViewDescription, variableManager, siriusInterpreter, editingContextAdapter, new SiriusDomainClassTester(session), input); if (eefView.getPages().size() == 1) { EEFPage eefPage = eefView.getPages().get(0); Shell shell = Display.getCurrent().getActiveShell(); FormDialog formDialog = new PropertiesFormDialog(shell, this.extPackage, this.context, this.session, siriusInterpreter, variableManager, convertedDialogModelOperation, eefPage); formDialog.create(); formDialog.getShell().setMinimumSize(600, 200); int returnCode = formDialog.open(); if (returnCode == <START> 1) { <END> throw new OperationCanceledException(); } } }); }</code><technical_language>Window.CANCEL explicitly</technical_language>

Target:
public void execute() throws MetaClassNotFoundException, FeatureNotFoundException { DialogModelOperationPreprocessor preprocessor = new DialogModelOperationPreprocessor(this.dialogModelOperation); Optional<DialogModelOperation> optionalDialogModelOperation = preprocessor.convert(); optionalDialogModelOperation.ifPresent(convertedDialogModelOperation -> { PageDescription pageDescription = convertedDialogModelOperation.getPage(); List<PageDescription> pageDescriptions = new ArrayList<>(); pageDescriptions.add(pageDescription); SiriusInputDescriptor input = new SiriusInputDescriptor(this.context.getCurrentTarget()); ViewDescriptionConverter viewDescriptionConverter = new ViewDescriptionConverter(pageDescriptions); EEFViewDescription eefViewDescription = viewDescriptionConverter.convert(input); IVariableManager variableManager = new VariableManagerFactory().createVariableManager(); variableManager.put(EEFExpressionUtils.SELF, input.getSemanticElement()); variableManager.put(EEFExpressionUtils.INPUT, input); EditingContextAdapter editingContextAdapter = SiriusUIPropertiesPlugin.getPlugin().getEditingContextAdapter(session); SiriusInterpreter siriusInterpreter = new SiriusInterpreter(this.session); EEFViewFactory eefViewFactory = new EEFViewFactory(); EEFView eefView = eefViewFactory.createEEFView(eefViewDescription, variableManager, siriusInterpreter, editingContextAdapter, new SiriusDomainClassTester(session), input); if (eefView.getPages().size() == 1) { EEFPage eefPage = eefView.getPages().get(0); Shell shell = Display.getCurrent().getActiveShell(); FormDialog formDialog = new PropertiesFormDialog(shell, this.extPackage, this.context, this.session, siriusInterpreter, variableManager, convertedDialogModelOperation, eefPage); formDialog.create(); formDialog.getShell().setMinimumSize(600, 200); int returnCode = formDialog.open(); if (Window.CANCEL == returnCode) { throw new OperationCanceledException(); } } }); }