Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamille Letavernier2014-11-12 10:05:27 +0000
committerCamille Letavernier2014-11-12 10:16:01 +0000
commit8f635d8762c24b5c1fe5f364c7d84d63b04af621 (patch)
treec9d4141332e27951812ae3ded78d93c8325121a7 /plugins/infra
parentd970535cbd44ed2e20c40a4d3ded54a79282af90 (diff)
downloadorg.eclipse.papyrus-8f635d8762c24b5c1fe5f364c7d84d63b04af621.tar.gz
org.eclipse.papyrus-8f635d8762c24b5c1fe5f364c7d84d63b04af621.tar.xz
org.eclipse.papyrus-8f635d8762c24b5c1fe5f364c7d84d63b04af621.zip
451105: [Table - ModelExplorer] Newly created tables are not visible in
the ModelExplorer https://bugs.eclipse.org/bugs/show_bug.cgi?id=451105
Diffstat (limited to 'plugins/infra')
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/src/org/eclipse/papyrus/infra/nattable/modelexplorer/queries/GetContainedTables.java3
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/src/org/eclipse/papyrus/infra/nattable/modelexplorer/queries/IsTableContainer.java4
2 files changed, 5 insertions, 2 deletions
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/src/org/eclipse/papyrus/infra/nattable/modelexplorer/queries/GetContainedTables.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/src/org/eclipse/papyrus/infra/nattable/modelexplorer/queries/GetContainedTables.java
index cf2e97b6b9c..208c947ddae 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/src/org/eclipse/papyrus/infra/nattable/modelexplorer/queries/GetContainedTables.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/src/org/eclipse/papyrus/infra/nattable/modelexplorer/queries/GetContainedTables.java
@@ -40,7 +40,8 @@ public class GetContainedTables extends AbstractEditorContainerQuery implements
EObject root = roots.next();
if (root instanceof Table) {
Table table = (Table) root;
- if (table.getOwner() == source) {
+ EObject parent = table.getOwner() == null ? table.getContext() : table.getOwner();
+ if (parent == source) {
result.add(table);
}
}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/src/org/eclipse/papyrus/infra/nattable/modelexplorer/queries/IsTableContainer.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/src/org/eclipse/papyrus/infra/nattable/modelexplorer/queries/IsTableContainer.java
index 964e95c914f..b59c3f76682 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/src/org/eclipse/papyrus/infra/nattable/modelexplorer/queries/IsTableContainer.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/src/org/eclipse/papyrus/infra/nattable/modelexplorer/queries/IsTableContainer.java
@@ -38,7 +38,9 @@ public class IsTableContainer extends AbstractEditorContainerQuery implements IJ
while (roots.hasNext()) {
EObject root = roots.next();
if (root instanceof Table) {
- if (((Table) root).getOwner() == source) {
+ Table table = (Table) root;
+ EObject parent = table.getOwner() == null ? table.getContext() : table.getOwner();
+ if (parent == source) {
return true;
}
}

Back to the top