Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian W. Damus2014-02-25 14:24:34 +0000
committerChristian W. Damus2014-02-25 14:24:34 +0000
commitfc47d25bd01993b1fda17c0c2cf862181ac96b92 (patch)
tree0c73810d529b99d614457eaf8e5078a4e9fad116 /plugins
parent6e908943c24e39dc3440998b0014704d1f49ae9e (diff)
downloadorg.eclipse.papyrus-fc47d25bd01993b1fda17c0c2cf862181ac96b92.tar.gz
org.eclipse.papyrus-fc47d25bd01993b1fda17c0c2cf862181ac96b92.tar.xz
org.eclipse.papyrus-fc47d25bd01993b1fda17c0c2cf862181ac96b92.zip
323802: [General] Papyrus shall provide a read only mode
https://bugs.eclipse.org/bugs/show_bug.cgi?id=323802 Make stereotype decorator properties sensitive to read-only state of the notation view.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/modelelement/DecoratedModelElement.java12
1 files changed, 5 insertions, 7 deletions
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/modelelement/DecoratedModelElement.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/modelelement/DecoratedModelElement.java
index 5e3ed3f7cb9..4792204ad56 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/modelelement/DecoratedModelElement.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/modelelement/DecoratedModelElement.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2011 CEA LIST.
+ * Copyright (c) 2011, 2014 CEA LIST and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -9,6 +9,7 @@
* Contributors:
*
* CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 323802
*
*****************************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.properties.modelelement;
@@ -21,6 +22,7 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.edit.domain.EditingDomain;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
import org.eclipse.papyrus.infra.gmfdiag.common.databinding.custom.CustomBooleanStyleObservableValue;
import org.eclipse.papyrus.infra.gmfdiag.common.databinding.custom.CustomIntStyleObservableValue;
import org.eclipse.papyrus.infra.gmfdiag.common.providers.ShapeDecorator;
@@ -114,12 +116,8 @@ public class DecoratedModelElement extends AbstractModelElement {
*/
@Override
public boolean isEditable(String propertyPath) {
- if(ShapeDecorator.SHAPE_DECORATOR_DIRECTION.equals(propertyPath)) {
- return true;
- }
-
- if(ShapeDecorator.SHAPE_DECORATOR_VISIBILITY.equals(propertyPath)) {
- return true;
+ if(ShapeDecorator.SHAPE_DECORATOR_DIRECTION.equals(propertyPath) || ShapeDecorator.SHAPE_DECORATOR_VISIBILITY.equals(propertyPath)) {
+ return !EMFHelper.isReadOnly(source);
}
return super.isEditable(propertyPath);

Back to the top