Commit 9bb2afdb authored by Simon Barner's avatar Simon Barner
Browse files

openInEditor(): Remove unused depth parameter

Issue-Ref: 3048
Issue-Url: https://af3-developer.fortiss.org/issues/3048

Signed-off-by: Simon Barner's avatarSimon Barner <barner@fortiss.org>
parent 57362283
......@@ -5,7 +5,7 @@ ConstraintUIService.java 433e35bb1c9bbc628c6ee070ff45632400becf4a GREEN
ContextMenuService.java ca3c899293f25b70ce8e5f0d86ca2f9683329d81 GREEN
EditPartFactoryService.java e9180c0020f1769d9e24ef3c08f9ca5599dbc5c3 GREEN
MarkerService.java b01b7706034691683df7bbc2e7828c42574b3147 GREEN
ModelEditorBindingService.java 617e8e97705202f2e14521ad572da23beaf25c6c GREEN
ModelEditorBindingService.java 0239c01eef78854fa4abd2df90d93a2b06d60593 YELLOW
ModelElementHandlerService.java 07a30545ad687ff0fe13bf7a9348c41fb03e0b2c GREEN
NavigatorService.java 2b1361eac805996e22e5409dafff9707fbac3376 GREEN
ToolingKernelUIInternal.java 38903445a9084b7908716a00f41621dfb3126fca GREEN
......
......@@ -25,7 +25,6 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.eclipse.core.runtime.Assert;
import org.eclipse.emf.common.command.CommandStackListener;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.ui.IEditorPart;
......@@ -118,16 +117,7 @@ public class ModelEditorBindingService extends EObjectAwareServiceBase<IModelEdi
/** {@inheritDoc} */
@Override
public void openInEditor(EObject element) {
// TODO (SB,13): Where does the "2" come from? See #3048
openInEditor(element, 2);
}
/**
* Opens the editor or proceeds with parent element.
* Particular treatment for library references which open directly the library element.
*/
private void openInEditor(EObject element, int depth) {
Assert.isTrue(depth >= 0);
// Particular treatment for library references which open directly the library element.
ILibraryElementReference libRefParent =
getParentElement(element, ILibraryElementReference.class, true);
if(libRefParent != null) {
......@@ -152,8 +142,8 @@ public class ModelEditorBindingService extends EObjectAwareServiceBase<IModelEdi
// Recurse if there is an editor for one the model element's ancestors.
if(numBindings == 0) {
if(depth > 0 && element.eContainer() != null) {
openInEditor(element.eContainer(), depth - 1);
if(element.eContainer() != null) {
openInEditor(element.eContainer());
}
return;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment