Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2022-07-08 04:57:18 +0000
committerEike Stepper2022-07-08 04:57:18 +0000
commit6b620429041a4a231b6c9174b8d397ecbb7044c7 (patch)
tree608fbe446f565f2c24cbe805796133edd0315319 /plugins/org.eclipse.emf.cdo.ui/src/org
parent3027d6d6efc1939a65e0f9fa3bdae7bad6debf74 (diff)
downloadcdo-6b620429041a4a231b6c9174b8d397ecbb7044c7.tar.gz
cdo-6b620429041a4a231b6c9174b8d397ecbb7044c7.tar.xz
cdo-6b620429041a4a231b6c9174b8d397ecbb7044c7.zip
[580343] Support customizable structure providers for Net4j Introspector view
https://bugs.eclipse.org/bugs/show_bug.cgi?id=580343
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.ui/src/org')
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/EMFIntrospectionProvider.java37
1 files changed, 25 insertions, 12 deletions
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/EMFIntrospectionProvider.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/EMFIntrospectionProvider.java
index 47b3fce1ac..40f99a69ab 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/EMFIntrospectionProvider.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/EMFIntrospectionProvider.java
@@ -42,9 +42,11 @@ public class EMFIntrospectionProvider extends RowIntrospectionProvider
private static final String E_DELIVER = "eDeliver";
- private static final String RESOURCE = "resource";
+ private static final String E_ADAPTERS = "eAdapters";
- private static final String URI = "uri";
+ private static final String E_RESOURCE = "eResource";
+
+ private static final String E_URI = "eURI";
private final Color foreground = Display.getDefault().getSystemColor(SWT.COLOR_DARK_BLUE);
@@ -78,11 +80,12 @@ public class EMFIntrospectionProvider extends RowIntrospectionProvider
EObject eObject = (EObject)parent;
rows.add(createEContainerRow(eObject));
- rows.add(createURIRow(eObject));
- rows.add(createResourceRow(eObject));
+ rows.add(createEURIRow(eObject));
+ rows.add(createEResourceRow(eObject));
rows.add(createEClassRow(eObject));
rows.add(createEIsProxyRow(eObject));
rows.add(createEDeliverRow(eObject));
+ rows.add(createEAdaptersRow(eObject));
for (EStructuralFeature feature : eObject.eClass().getEAllStructuralFeatures())
{
@@ -118,14 +121,19 @@ public class EMFIntrospectionProvider extends RowIntrospectionProvider
return createEDeliverRow(eObject);
}
- if (RESOURCE.equals(name))
+ if (E_ADAPTERS.equals(name))
+ {
+ return createEAdaptersRow(eObject);
+ }
+
+ if (E_RESOURCE.equals(name))
{
- return createResourceRow(eObject);
+ return createEResourceRow(eObject);
}
- if (URI.equals(name))
+ if (E_URI.equals(name))
{
- return createURIRow(eObject);
+ return createEURIRow(eObject);
}
EStructuralFeature feature = eObject.eClass().getEStructuralFeature(name);
@@ -143,14 +151,14 @@ public class EMFIntrospectionProvider extends RowIntrospectionProvider
return createRow(E_CONTAINER, eObject.eContainer(), EObject.class.getName(), CATEGORY, foreground);
}
- private Row createURIRow(EObject eObject)
+ private Row createEURIRow(EObject eObject)
{
- return createRow(URI, EcoreUtil.getURI(eObject), URI.class.getName(), CATEGORY, foreground);
+ return createRow(E_URI, EcoreUtil.getURI(eObject), URI.class.getName(), CATEGORY, foreground);
}
- private Row createResourceRow(EObject eObject)
+ private Row createEResourceRow(EObject eObject)
{
- return createRow(RESOURCE, eObject.eResource(), Resource.class.getName(), CATEGORY, foreground);
+ return createRow(E_RESOURCE, eObject.eResource(), Resource.class.getName(), CATEGORY, foreground);
}
private Row createEClassRow(EObject eObject)
@@ -168,6 +176,11 @@ public class EMFIntrospectionProvider extends RowIntrospectionProvider
return createRow(E_DELIVER, eObject.eDeliver(), boolean.class.getName(), CATEGORY, foreground);
}
+ private Row createEAdaptersRow(EObject eObject)
+ {
+ return createRow(E_ADAPTERS, eObject.eAdapters(), "EList<Adapter>", CATEGORY, foreground);
+ }
+
private static Row createRow(EObject eObject, EStructuralFeature feature)
{
Object value = eObject.eGet(feature);

Back to the top