Created
February 13, 2012 20:52
-
-
Save kthoms/1820295 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DmodelCustomOpenModelElementFeature extends DmodelCustomOpenModelElementFeatureBase { | |
@Inject IURIEditorOpener opener; | |
public DmodelCustomOpenModelElementFeature(IFeatureProvider fp) { | |
super(fp); | |
opener = Activator.get(IURIEditorOpener.class); | |
} | |
@Override | |
public boolean canExecute(ICustomContext context) { | |
return getBusinessObjectForPictogramElement(context.getInnerPictogramElement()) != null; | |
} | |
@Override | |
public String getName() { | |
return "Element öffnen"; | |
} | |
@Override | |
public void execute(ICustomContext context, EObject object) { | |
opener.open(EcoreUtil.getURI(object), true); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment