Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamille Letavernier2016-05-30 12:09:43 +0000
committerGerrit Code Review @ Eclipse.org2016-05-30 13:05:19 +0000
commitf8b6d5acedf3c00a8300c0cddbb67965c8505aea (patch)
treeb2be9603abba8133c6c66cd46e5980815096cc0f /plugins
parent58618d252701b2c250383fe095f666f62c7208bd (diff)
downloadorg.eclipse.papyrus-f8b6d5acedf3c00a8300c0cddbb67965c8505aea.tar.gz
org.eclipse.papyrus-f8b6d5acedf3c00a8300c0cddbb67965c8505aea.tar.xz
org.eclipse.papyrus-f8b6d5acedf3c00a8300c0cddbb67965c8505aea.zip
Bug 494892: [Project Explorer] Incomplete menu when right-clicking di,
notation, uml https://bugs.eclipse.org/bugs/show_bug.cgi?id=494892 - Restore the IResource adapter for Papyrus SubResources Change-Id: I909994a0d4a270da13734373ec7716824fa75e7d Signed-off-by: Camille Letavernier <camille.letavernier@cea.fr>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/infra/onefile/org.eclipse.papyrus.infra.onefile/src/org/eclipse/papyrus/infra/onefile/model/adapters/SubResourceAdapterFactory.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/infra/onefile/org.eclipse.papyrus.infra.onefile/src/org/eclipse/papyrus/infra/onefile/model/adapters/SubResourceAdapterFactory.java b/plugins/infra/onefile/org.eclipse.papyrus.infra.onefile/src/org/eclipse/papyrus/infra/onefile/model/adapters/SubResourceAdapterFactory.java
index 1ec5d8c5db9..1d4c0af6702 100644
--- a/plugins/infra/onefile/org.eclipse.papyrus.infra.onefile/src/org/eclipse/papyrus/infra/onefile/model/adapters/SubResourceAdapterFactory.java
+++ b/plugins/infra/onefile/org.eclipse.papyrus.infra.onefile/src/org/eclipse/papyrus/infra/onefile/model/adapters/SubResourceAdapterFactory.java
@@ -9,11 +9,12 @@
* Contributors:
* Tristan Faure (Atos Origin Integration) tristan.faure@atosorigin.com - Initial API and implementation
* Christian W. Damus - bug 485220
- *
+ *
*****************************************************************************/
package org.eclipse.papyrus.infra.onefile.model.adapters;
import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.mapping.ResourceMapping;
import org.eclipse.core.runtime.IAdapterFactory;
import org.eclipse.papyrus.infra.onefile.model.ISubResourceFile;
@@ -33,7 +34,7 @@ public class SubResourceAdapterFactory implements IAdapterFactory {
if (adaptableObject instanceof ISubResourceFile) {
return adapterType.cast(new SubResourceMapping((ISubResourceFile) adaptableObject));
}
- } else if (IFile.class.equals(adapterType)) {
+ } else if (IFile.class.equals(adapterType) || IResource.class.equals(adapterType)) {
if (adaptableObject instanceof ISubResourceFile) {
return adapterType.cast(((ISubResourceFile) adaptableObject).getFile());
}
@@ -42,7 +43,7 @@ public class SubResourceAdapterFactory implements IAdapterFactory {
}
public Class<?>[] getAdapterList() {
- return new Class[] { ResourceMapping.class, IFile.class };
+ return new Class[] { ResourceMapping.class, IFile.class, IResource.class };
}
}

Back to the top