@Override protected void basicSetInput(EObject newInput) { if (newInput instanceof SampleStructuredActivity) { super.basicSetInput(newInput); updateVariableTypeSelector(); updateVariableName(); variableNamedElement = BPELUtil.adapt(getActivity().getVariable(), INamedElement.class); variableNameEditController.setInput(getActivity().getVariable()); } }
protected void createChangeTrackers() { variableNameEditController = new EditController(getCommandFramework()) { @Override public boolean checkNotification(Notification notification) { return variableNamedElement != null && variableNamedElement.isNameAffected( variableNameEditController.getInput(), notification); } @Override public Command createApplyCommand() { return wrapInShowContextCommand(createCommand(null)); } }; variableNameEditController.setLabel(BPELPackage.eINSTANCE.getActivity_Name().getName()); variableNameEditController.setViewIValue(new TextIValue(variableName)); variableNameEditController.setModeIValue( new IValue() { public Object get() { return variableNamedElement != null ? variableNamedElement.getName(variableNameEditController.getInput()) : null; } public void set(Object object) { if (variableNamedElement != null) { variableNamedElement.setName( variableNameEditController.getInput(), object.toString()); } } }); variableNameEditController.startListeningTo(variableName); }