Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoratikhomirov2005-11-21 14:53:05 +0000
committeratikhomirov2005-11-21 14:53:05 +0000
commitedd9aa3a4a5200e97904ac0f12520f888b553030 (patch)
tree3064fa8a93cae50565b718c49cf0e63d85dcf9bd
parentcfec97be1f0513387dd9bc51fe13ffc168305bb8 (diff)
downloadorg.eclipse.gmf-tooling-edd9aa3a4a5200e97904ac0f12520f888b553030.tar.gz
org.eclipse.gmf-tooling-edd9aa3a4a5200e97904ac0f12520f888b553030.tar.xz
org.eclipse.gmf-tooling-edd9aa3a4a5200e97904ac0f12520f888b553030.zip
hardcode filtering of containment and edit metafeatures to reduce dropdown size
-rw-r--r--plugins/org.eclipse.gmf.map.edit/src/org/eclipse/gmf/mappings/provider/NodeMappingItemProvider.java35
1 files changed, 28 insertions, 7 deletions
diff --git a/plugins/org.eclipse.gmf.map.edit/src/org/eclipse/gmf/mappings/provider/NodeMappingItemProvider.java b/plugins/org.eclipse.gmf.map.edit/src/org/eclipse/gmf/mappings/provider/NodeMappingItemProvider.java
index 080139be0..14c53e703 100644
--- a/plugins/org.eclipse.gmf.map.edit/src/org/eclipse/gmf/mappings/provider/NodeMappingItemProvider.java
+++ b/plugins/org.eclipse.gmf.map.edit/src/org/eclipse/gmf/mappings/provider/NodeMappingItemProvider.java
@@ -8,19 +8,20 @@ package org.eclipse.gmf.mappings.provider;
import java.util.Collection;
+import java.util.Collections;
import java.util.List;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.util.ResourceLocator;
import org.eclipse.emf.ecore.EStructuralFeature;
-
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ViewerNotification;
import org.eclipse.gmf.mappings.GMFMapFactory;
import org.eclipse.gmf.mappings.GMFMapPackage;
@@ -112,11 +113,11 @@ public class NodeMappingItemProvider
* This adds a property descriptor for the Containment Feature feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @generated
+ * @generated NOT
*/
protected void addContainmentFeaturePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
- (createItemPropertyDescriptor
+ (new ItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_NodeMapping_containmentFeature_feature"),
@@ -125,18 +126,28 @@ public class NodeMappingItemProvider
true,
null,
null,
- null));
+ null) {
+ protected Collection getComboBoxObjects(Object object) {
+ if (object instanceof NodeMapping) {
+ NodeMapping nm = (NodeMapping) object;
+ if (nm.getDomainMetaElement() != null) {
+ return nm.getDomainMetaElement().getEAllContainments();
+ }
+ }
+ return Collections.EMPTY_LIST;
+ }
+ });
}
/**
* This adds a property descriptor for the Edit Feature feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @generated
+ * @generated NOT
*/
protected void addEditFeaturePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
- (createItemPropertyDescriptor
+ (new ItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_NodeMapping_editFeature_feature"),
@@ -145,7 +156,17 @@ public class NodeMappingItemProvider
true,
null,
null,
- null));
+ null) {
+ protected Collection getComboBoxObjects(Object object) {
+ if (object instanceof NodeMapping) {
+ NodeMapping nm = (NodeMapping) object;
+ if (nm.getDomainMetaElement() != null) {
+ return nm.getDomainMetaElement().getEAllAttributes();
+ }
+ }
+ return Collections.EMPTY_LIST;
+ }
+ });
}
/**

Back to the top