From c9db9aeb4029a715ea874bcdc82c24f9160ed4e5 Mon Sep 17 00:00:00 2001 From: Simon Barner <barner@fortiss.org> Date: Wed, 28 Nov 2018 13:50:45 +0100 Subject: [PATCH] Disable editing of IDs using setEditable() instead setEnabled() * setEnabled(false) in createControls() has no effect, i.e. the text can be edited, but the change is not saved in the model. In refresh(), it would have an effect, but would "gray out" the text control * setEditable(false) prevents the user from entering text in the first place. Issue-Ref: 3582 Issue-Url: https://af3-developer.fortiss.org/issues/3582 Signed-off-by: Simon Barner <barner@fortiss.org> --- .../org/fortiss/tooling/kernel/ui/internal/properties/.ratings | 2 +- .../kernel/ui/internal/properties/IdLabeledPropertySection.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/org.fortiss.tooling.kernel.ui/src/org/fortiss/tooling/kernel/ui/internal/properties/.ratings b/org.fortiss.tooling.kernel.ui/src/org/fortiss/tooling/kernel/ui/internal/properties/.ratings index 640663407..a132acc35 100644 --- a/org.fortiss.tooling.kernel.ui/src/org/fortiss/tooling/kernel/ui/internal/properties/.ratings +++ b/org.fortiss.tooling.kernel.ui/src/org/fortiss/tooling/kernel/ui/internal/properties/.ratings @@ -1,3 +1,3 @@ -IdLabeledPropertySection.java dcfb39d225391c87f47e29f6d1ba1cb22a3d3fe4 GREEN +IdLabeledPropertySection.java 8a360874918ca84a319ae7668011a19cea574148 YELLOW NamedCommentedPropertySection.java d15d490708e5c7362ebc4f30a04bccb0f6b64f39 GREEN PropertiesAdapterFactory.java edcf34766a60f21c9ba22a1ba73aa487c3d9a946 GREEN diff --git a/org.fortiss.tooling.kernel.ui/src/org/fortiss/tooling/kernel/ui/internal/properties/IdLabeledPropertySection.java b/org.fortiss.tooling.kernel.ui/src/org/fortiss/tooling/kernel/ui/internal/properties/IdLabeledPropertySection.java index dcfb39d22..8a3608749 100644 --- a/org.fortiss.tooling.kernel.ui/src/org/fortiss/tooling/kernel/ui/internal/properties/IdLabeledPropertySection.java +++ b/org.fortiss.tooling.kernel.ui/src/org/fortiss/tooling/kernel/ui/internal/properties/IdLabeledPropertySection.java @@ -46,7 +46,7 @@ public class IdLabeledPropertySection extends PropertySectionBase { super.createControls(parent, aTabbedPropertySheetPage); idText = createFormText("ID"); - idText.setEnabled(false); + idText.setEditable(false); } /** {@inheritDoc} */ -- GitLab