Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
ASSIGNED - bug 357759: [modeling] selecting elements in Ecore Tree
  • Loading branch information
MilesParker committed Sep 29, 2011
1 parent 5f6fcd7 commit 8d2abc6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 14 deletions.
Expand Up @@ -75,7 +75,7 @@ public String getHandleIdentifier(Object object) {
*/
@Override
public Object getObjectForHandle(String handle) {
if (handle == null) {
if (handle == null || handle.equals("")) { //$NON-NLS-1$
return null;
}
// We're simply calling this delegated method but renaming to clarify
Expand Down
Expand Up @@ -33,7 +33,8 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.mylyn.modeling.gmf.ui;bundle-version="0.9.0",
org.eclipse.emf.ecoretools.filters;bundle-version="1.0.0",
org.eclipse.emf.ecoretools.properties;bundle-version="1.0.0",
org.eclipse.emf.ecoretools.tabbedproperties;bundle-version="1.0.0"
org.eclipse.emf.ecoretools.tabbedproperties;bundle-version="1.0.0",
org.eclipse.emf.ecore.editor
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Export-Package: org.eclipse.mylyn.internal.modeling.ecoretools
Expand Down
Expand Up @@ -11,6 +11,7 @@

package org.eclipse.mylyn.internal.modeling.ecoretools;

import org.eclipse.emf.ecore.presentation.EcoreEditor;
import org.eclipse.mylyn.modeling.emf.ecore.EcoreDomainBridge;
import org.eclipse.mylyn.modeling.ui.DiagramUiBridge;
import org.eclipse.ui.IWorkbenchPart;
Expand All @@ -25,7 +26,7 @@ public class EcoreToolsNavigatorUiBridge extends DiagramUiBridge {

@Override
public boolean acceptsPart(IWorkbenchPart part) {
return part instanceof ProjectExplorer;
return part instanceof ProjectExplorer || part instanceof EcoreEditor;
}

@Override
Expand Down
Expand Up @@ -89,17 +89,7 @@ public String getHandleIdentifier(Object object) {
*/
@Override
public boolean acceptsObject(Object object) {
if (object instanceof IFile) {
IFile file = (IFile) object;
for (String ext : getFileExtensions()) {
if (ext.equals(file.getFileExtension())) {
return true;
}
}
} else {
return getDomainObject(object) != null;
}
return false;
return getDomainObject(object) != null;
}

@Override
Expand Down

0 comments on commit 8d2abc6

Please sign in to comment.