Hello,
I am trying to select model element in Capella Project Explorere using CapellaCommonNavigator Class with below code:
CapellaCommonNavigator naviagtor = null;
IWorkbench workbench = PlatformUI.getWorkbench();
IWorkbenchWindow activeWindow = workbench.getActiveWorkbenchWindow();
if (activeWindow != null) {
final IWorkbenchPage activePage = activeWindow.getActivePage();
if (activePage != null) {
naviagtor = (CapellaCommonNavigator) activePage.findView("capella.project.explorer");
}
}
if (naviagtor != null) {
naviagtor.setFocus();
naviagtor.selectReveal(new StructuredSelection(elementToSelectInTree));
}
I am getting NULL value for “navigator”.
I have seen strange behavior with this navigator. On another machine, the value is not null.
For your information, my Capella details are as below:
Version: 5.0.0
Build id: 202012021234
OS: Windows10
And the configuration is the same for another machine.
Could you please tell me why this strange behavior happens?