Commit 1545aa3d authored by Alexander Diewald's avatar Alexander Diewald

Navigator: Small arch cleanup

Issue-Ref: 3922
Issue-Url: https://af3-developer.fortiss.org/issues/3922Signed-off-by: Alexander Diewald's avatarAlexander Diewald <diewald@fortiss.org>
parent 2075fb48
......@@ -5,6 +5,6 @@ EditPartFactoryService.java e9180c0020f1769d9e24ef3c08f9ca5599dbc5c3 GREEN
MarkerService.java 208f97f3ccabf0947702a17ddca23d8766a268f4 GREEN
ModelEditorBindingService.java 577f5db41abf240291434dbad6bc6b0fde1eeb2b GREEN
ModelElementHandlerService.java eeb07f6926012aa98256d452d1e554a5486dc657 GREEN
NavigatorService.java 8d21f09a2b5770424f8744721b9e467086d67cfa RED
NavigatorService.java 748c8b135031eadd3e58631ae04aa886f29d700a YELLOW
ToolingKernelUIInternal.java a70d19883dfb315d860233156d8524cf1ac2952f GREEN
TutorialUIService.java b1d632eca91b4feb583f3930cd6ee4722dd9bfed GREEN
......@@ -321,12 +321,6 @@ public class NavigatorService implements INavigatorService, IPersistencyServiceL
}
}
/** {@inheritDoc} */
@Override
public void revealModelElement(EObject modelElement) {
navigatorController.reveal(modelElement);
}
/**
* Notify {@link ISaveablesLifecycleListener} about saveable change of given
* top-level element.
......
LinkWithEditorPartListener.java 254ec772fdbc5eb513e54e1849303078efa85da0 YELLOW
LinkWithEditorPartListener.java 7ffa9dc9c26eca23ff85d6828ef693afe5c2367d YELLOW
NavigatorController.java 17128b9b981fbc7db49f426b612dfa6838c9cb3a RED
NavigatorDoubleClickHandler.java 0f04e10d9ba387195934d8510377053297c8f9cc RED
NavigatorTreeContentComparator.java 17c35d3a680214de66a4e6c21429a2d7a8a19aa4 RED
NavigatorTreeContentProvider.java f6d5105d2f08d89579cb720b3238dcbca4d28efb RED
NavigatorTreeUIProvider.java 5b696e995d6f892a70bdf3a0030c1c03d97996f7 RED
NavigatorViewPart.java a65715c9111387a046ba81d5569cf2dff13121cc RED
NavigatorViewPart.java 24068952db4182389e888e7b4b6123ee2ec4b675 YELLOW
......@@ -30,6 +30,13 @@ import org.fortiss.tooling.kernel.ui.service.INavigatorService;
*/
final class LinkWithEditorPartListener implements IPartListener2 {
/** References the controller of the model navigator view. */
private final NavigatorController controller;
/* package */ LinkWithEditorPartListener(NavigatorController controller) {
this.controller = controller;
}
/** {@inheritDoc} */
@Override
public void partActivated(IWorkbenchPartReference partRef) {
......@@ -49,7 +56,7 @@ final class LinkWithEditorPartListener implements IPartListener2 {
if(editor.getEditorInput() instanceof ModelElementEditorInput) {
EObject editorInput =
((ModelElementEditorInput)editor.getEditorInput()).getModelElement();
INavigatorService.getInstance().revealModelElement(editorInput);
controller.reveal(editorInput);
}
}
}
......
......@@ -52,10 +52,11 @@ import javafx.scene.Scene;
public class NavigatorViewPart extends AF3FXViewPart
implements ISaveablesSource, ISaveablePart, ITabbedPropertySheetPageContributor {
/** References the embedded controller of the model element's tree view. */
private final NavigatorController controller;
/** Stores the part listener for editor link support. */
private IPartListener2 editorListener = new LinkWithEditorPartListener();
private final IPartListener2 editorListener;
/** Dialog setting ID for the link with editor action flag. */
private static final String LINK_WITH_EDITOR_FLAG = "navigatorSettingLinkWithEditor";
......@@ -65,6 +66,8 @@ public class NavigatorViewPart extends AF3FXViewPart
super(new NavigatorController(), null);
controller = (NavigatorController)getController();
editorListener = new LinkWithEditorPartListener(controller);
refreshPartTitleAndImage();
}
......
......@@ -5,5 +5,5 @@ IEditPartFactoryService.java c448bff63fb81f57037c9f1dc5319859c12d0c4d GREEN
IMarkerService.java d433e838e387dd2fe61b8dea7395ebb7203ae39b GREEN
IModelEditorBindingService.java ce2ae1957e2232bb0fac1d1d262103f9adfc5266 GREEN
IModelElementHandlerService.java 1ff2bda9054f6bbd4017fc0ddc118b7702196815 GREEN
INavigatorService.java 8d2ffeb6f075d3abea904b84d8a40090d97837fd GREEN
INavigatorService.java 0addcb013babec70e039a0989f43dfbce114e227 YELLOW
ITutorialUIService.java 72707c60c3d23d8ffc5c579cb9b022bb614eb094 GREEN
......@@ -15,7 +15,6 @@
+--------------------------------------------------------------------------*/
package org.fortiss.tooling.kernel.ui.service;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.ui.Saveable;
import org.fortiss.tooling.kernel.ui.extension.IContextMenuContributor;
......@@ -68,9 +67,6 @@ public interface INavigatorService {
/** Returns the saveables of the current selection. */
Saveable[] getActiveSaveables();
/** Reveals the given model element. */
void revealModelElement(EObject modelElement);
/** Refreshes the navigator view part. */
void refresh();
......
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