use of com.archimatetool.editor.ui.components.StyledTextControl in project archi by archimatetool.
the class ArchimateModelSection method createPurposeControl.
private void createPurposeControl(Composite parent) {
// Label
createLabel(parent, Messages.ArchimateModelSection_2, STANDARD_LABEL_WIDTH, SWT.NONE);
// Text
StyledTextControl styledTextControl = createStyledTextControl(parent, SWT.NONE);
fTextPurpose = new PropertySectionTextControl(styledTextControl.getControl(), IArchimatePackage.Literals.ARCHIMATE_MODEL__PURPOSE) {
@Override
protected void textChanged(String oldText, String newText) {
EObject model = getFirstSelectedObject();
if (isAlive(model)) {
Command cmd = new EObjectFeatureCommand(Messages.ArchimateModelSection_3, getFirstSelectedObject(), IArchimatePackage.Literals.ARCHIMATE_MODEL__PURPOSE, newText);
if (cmd.canExecute()) {
executeCommand(cmd);
}
}
}
};
fTextPurpose.setHint(Messages.ArchimateModelSection_4);
}
Aggregations