Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoratikhomirov2006-05-17 12:38:51 +0000
committeratikhomirov2006-05-17 12:38:51 +0000
commit6193b17441d17f335aafe12720c67598e7745500 (patch)
tree233f8123919ab762f7139ef37f8de2477735ff38 /plugins/org.eclipse.gmf.codegen.edit
parent934329839e9f2e8663ebce2fb48502caf27f2a4d (diff)
downloadorg.eclipse.gmf-tooling-6193b17441d17f335aafe12720c67598e7745500.tar.gz
org.eclipse.gmf-tooling-6193b17441d17f335aafe12720c67598e7745500.tar.xz
org.eclipse.gmf-tooling-6193b17441d17f335aafe12720c67598e7745500.zip
[mgolubev] #140186 XYLayoutEditPolicy should not be installed for editparts that have figure with non-XYLayout in the gmfgraph model
Diffstat (limited to 'plugins/org.eclipse.gmf.codegen.edit')
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/plugin.properties9
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenChildContainerItemProvider.java22
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenCompartmentItemProvider.java22
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/SnippetViewmapItemProvider.java5
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/ViewmapItemProvider.java30
5 files changed, 63 insertions, 25 deletions
diff --git a/plugins/org.eclipse.gmf.codegen.edit/plugin.properties b/plugins/org.eclipse.gmf.codegen.edit/plugin.properties
index c11e46d28..b18252afb 100644
--- a/plugins/org.eclipse.gmf.codegen.edit/plugin.properties
+++ b/plugins/org.eclipse.gmf.codegen.edit/plugin.properties
@@ -413,6 +413,13 @@ _UI_ToolGroup_stack_feature = Stack
_UI_ToolGroup_collapse_feature = Collapse
_UI_ToolGroup_entries_feature = Entries
_UI_ToolGroup_toolsOnly_feature = Tools Only
+
+_UI_GenCompartment_listLayout_feature = List Layout
+_UI_Viewmap_layoutType_feature = Layout Type
+_UI_ViewmapLayoutType_UNKNOWN_literal = UNKNOWN
+_UI_ViewmapLayoutType_XY_LAYOUT_literal = XY_LAYOUT
+_UI_ViewmapLayoutType_FLOW_LAYOUT_literal = FLOW_LAYOUT
+_UI_ViewmapLayoutType_TOOLBAR_LAYOUT_literal = TOOLBAR_LAYOUT
#
#Palette
##########
@@ -422,4 +429,4 @@ _UI_LabelOffsetAttributes_x_feature = X
_UI_LabelOffsetAttributes_y_feature = Y
_UI_GenDomainAttributeTarget_type = Gen Domain Attribute Target
_UI_GenDomainAttributeTarget_nullAsError_feature = Null As Error
-_UI_GenDomainAttributeTarget_attribute_feature = Attribute \ No newline at end of file
+_UI_GenDomainAttributeTarget_attribute_feature = Attribute
diff --git a/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenChildContainerItemProvider.java b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenChildContainerItemProvider.java
index 9da3d8f0d..1bf772fd6 100644
--- a/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenChildContainerItemProvider.java
+++ b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenChildContainerItemProvider.java
@@ -62,7 +62,6 @@ public class GenChildContainerItemProvider
addContainedNodesPropertyDescriptor(object);
addChildNodesPropertyDescriptor(object);
addCanonicalEditPolicyClassNamePropertyDescriptor(object);
- addListLayoutPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
@@ -128,26 +127,6 @@ public class GenChildContainerItemProvider
}
/**
- * This adds a property descriptor for the List Layout feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addListLayoutPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_GenChildContainer_listLayout_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_GenChildContainer_listLayout_feature", "_UI_GenChildContainer_type"),
- GMFGenPackage.eINSTANCE.getGenChildContainer_ListLayout(),
- true,
- ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -172,7 +151,6 @@ public class GenChildContainerItemProvider
switch (notification.getFeatureID(GenChildContainer.class)) {
case GMFGenPackage.GEN_CHILD_CONTAINER__CANONICAL_EDIT_POLICY_CLASS_NAME:
- case GMFGenPackage.GEN_CHILD_CONTAINER__LIST_LAYOUT:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
}
diff --git a/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenCompartmentItemProvider.java b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenCompartmentItemProvider.java
index d81b39b83..e384cdb50 100644
--- a/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenCompartmentItemProvider.java
+++ b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenCompartmentItemProvider.java
@@ -64,6 +64,7 @@ public class GenCompartmentItemProvider
addHideIfEmptyPropertyDescriptor(object);
addNeedsTitlePropertyDescriptor(object);
addNodePropertyDescriptor(object);
+ addListLayoutPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
@@ -169,6 +170,26 @@ public class GenCompartmentItemProvider
}
/**
+ * This adds a property descriptor for the List Layout feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addListLayoutPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenCompartment_listLayout_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GenCompartment_listLayout_feature", "_UI_GenCompartment_type"),
+ GMFGenPackage.eINSTANCE.getGenCompartment_ListLayout(),
+ true,
+ ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
* This returns GenCompartment.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -206,6 +227,7 @@ public class GenCompartmentItemProvider
case GMFGenPackage.GEN_COMPARTMENT__CAN_COLLAPSE:
case GMFGenPackage.GEN_COMPARTMENT__HIDE_IF_EMPTY:
case GMFGenPackage.GEN_COMPARTMENT__NEEDS_TITLE:
+ case GMFGenPackage.GEN_COMPARTMENT__LIST_LAYOUT:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
}
diff --git a/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/SnippetViewmapItemProvider.java b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/SnippetViewmapItemProvider.java
index 7b8f5f027..ef173811e 100644
--- a/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/SnippetViewmapItemProvider.java
+++ b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/SnippetViewmapItemProvider.java
@@ -27,6 +27,8 @@ import org.eclipse.emf.edit.provider.ViewerNotification;
import org.eclipse.gmf.codegen.gmfgen.GMFGenPackage;
import org.eclipse.gmf.codegen.gmfgen.SnippetViewmap;
+import org.eclipse.gmf.codegen.gmfgen.ViewmapLayoutType;
+
import org.eclipse.gmf.codegen.gmfgen.presentation.EditorPlugin;
/**
@@ -105,7 +107,8 @@ public class SnippetViewmapItemProvider
* @generated
*/
public String getText(Object object) {
- String label = ((SnippetViewmap)object).getBody();
+ ViewmapLayoutType labelValue = ((SnippetViewmap)object).getLayoutType();
+ String label = labelValue == null ? null : labelValue.toString();
return label == null || label.length() == 0 ?
getString("_UI_SnippetViewmap_type") :
getString("_UI_SnippetViewmap_type") + " " + label;
diff --git a/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/ViewmapItemProvider.java b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/ViewmapItemProvider.java
index dad72831e..425030eb8 100644
--- a/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/ViewmapItemProvider.java
+++ b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/ViewmapItemProvider.java
@@ -25,6 +25,8 @@ import org.eclipse.emf.edit.provider.ViewerNotification;
import org.eclipse.gmf.codegen.gmfgen.GMFGenFactory;
import org.eclipse.gmf.codegen.gmfgen.GMFGenPackage;
import org.eclipse.gmf.codegen.gmfgen.Viewmap;
+import org.eclipse.gmf.codegen.gmfgen.ViewmapLayoutType;
+
import org.eclipse.gmf.codegen.gmfgen.presentation.EditorPlugin;
/**
@@ -62,6 +64,7 @@ public class ViewmapItemProvider
super.getPropertyDescriptors(object);
addRequiredPluginIDsPropertyDescriptor(object);
+ addLayoutTypePropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
@@ -87,6 +90,26 @@ public class ViewmapItemProvider
}
/**
+ * This adds a property descriptor for the Layout Type feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addLayoutTypePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Viewmap_layoutType_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Viewmap_layoutType_feature", "_UI_Viewmap_type"),
+ GMFGenPackage.eINSTANCE.getViewmap_LayoutType(),
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
* This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
* {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
@@ -109,7 +132,11 @@ public class ViewmapItemProvider
* @generated
*/
public String getText(Object object) {
- return getString("_UI_Viewmap_type");
+ ViewmapLayoutType labelValue = ((Viewmap)object).getLayoutType();
+ String label = labelValue == null ? null : labelValue.toString();
+ return label == null || label.length() == 0 ?
+ getString("_UI_Viewmap_type") :
+ getString("_UI_Viewmap_type") + " " + label;
}
/**
@@ -124,6 +151,7 @@ public class ViewmapItemProvider
switch (notification.getFeatureID(Viewmap.class)) {
case GMFGenPackage.VIEWMAP__REQUIRED_PLUGIN_IDS:
+ case GMFGenPackage.VIEWMAP__LAYOUT_TYPE:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
case GMFGenPackage.VIEWMAP__ATTRIBUTES:

Back to the top