test_class.declarator: PERSPECTIVE_ID = "Persp1"
test_class.modifier: private static final
test_class.original_string: private static final String PERSPECTIVE_ID = "Persp1";
test_class.type: String
test_class.var_name: PERSPECTIVE_ID
test_class.declarator: TEST_NAV_TREE = new NavTreeBuilder()
              .item(PERSPECTIVE_ID, "name1", "description1", true, perspective(PERSPECTIVE_ID))
              .build()
test_class.modifier: private static final
test_class.original_string: private static final NavTree TEST_NAV_TREE = new NavTreeBuilder()
              .item(PERSPECTIVE_ID, "name1", "description1", true, perspective(PERSPECTIVE_ID))
              .build();
test_class.type: NavTree
test_class.var_name: TEST_NAV_TREE
test_class.declarator: navigationManager
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private NavigationManager navigationManager;
test_class.type: NavigationManager
test_class.var_name: navigationManager
test_class.declarator: clientTypeRegistry
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private ClientTypeRegistry clientTypeRegistry;
test_class.type: ClientTypeRegistry
test_class.var_name: clientTypeRegistry
test_class.declarator: pluginServices
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private PerspectivePluginServices pluginServices;
test_class.type: PerspectivePluginServices
test_class.var_name: pluginServices
test_class.declarator: perspectiveChangedEvent
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private Event<PerspectivePluginsChangedEvent> perspectiveChangedEvent;
test_class.type: Event<PerspectivePluginsChangedEvent>
test_class.var_name: perspectiveChangedEvent
test_class.declarator: pluginAddedEvent
test_class.modifier: private
test_class.original_string: private PluginAdded pluginAddedEvent;
test_class.type: PluginAdded
test_class.var_name: pluginAddedEvent
test_class.declarator: pluginSavedEvent
test_class.modifier: private
test_class.original_string: private PluginSaved pluginSavedEvent;
test_class.type: PluginSaved
test_class.var_name: pluginSavedEvent
test_class.declarator: pluginRenamedEvent
test_class.modifier: private
test_class.original_string: private PluginRenamed pluginRenamedEvent;
test_class.type: PluginRenamed
test_class.var_name: pluginRenamedEvent
test_class.declarator: pluginDeletedEvent
test_class.modifier: private
test_class.original_string: private PluginDeleted pluginDeletedEvent;
test_class.type: PluginDeleted
test_class.var_name: pluginDeletedEvent
test_class.declarator: perspectivePlugin
test_class.modifier: private
test_class.original_string: private Plugin perspectivePlugin;
test_class.type: Plugin
test_class.var_name: perspectivePlugin
test_class.declarator: perspectiveRenamedPlugin
test_class.modifier: private
test_class.original_string: private Plugin perspectiveRenamedPlugin;
test_class.type: Plugin
test_class.var_name: perspectiveRenamedPlugin
test_class.declarator: testedPluginManager
test_class.modifier: private
test_class.original_string: private PerspectivePluginManager testedPluginManager;
test_class.type: PerspectivePluginManager
test_class.var_name: testedPluginManager
test_class.file: dashbuilder-client/dashbuilder-navigation-client/src/test/java/org/dashbuilder/client/navigation/plugin/PerspectivePluginManagerTest.java
test_class.identifier: PerspectivePluginManagerTest
test_case.body: @Test
      public void testPluginDeleted() {
          NavTree testTree = TEST_NAV_TREE.cloneTree();
  
          assertThat(testTree.getItemById(PERSPECTIVE_ID)).isNotNull();
  
          when(navigationManager.getNavTree()).thenReturn(testTree);
          testedPluginManager.onPlugInDeleted(pluginDeletedEvent);
  
          assertThat(testTree.getItemById(PERSPECTIVE_ID)).isNull();
          verify(navigationManager).saveNavTree(anyObject(), eq(null));
          verify(perspectiveChangedEvent).fire(anyObject());
      }
test_case.class_method_signature: PerspectivePluginManagerTest.testPluginDeleted()
test_case.full_signature: @Test public void testPluginDeleted()
test_case.identifier: testPluginDeleted
test_case.invocations: cloneTree isNotNull assertThat getItemById thenReturn when getNavTree onPlugInDeleted isNull assertThat getItemById saveNavTree verify anyObject eq fire verify anyObject
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testPluginDeleted()
focal_class.declarator: clientTypeRegistry
focal_class.modifier: private
focal_class.original_string: private ClientTypeRegistry clientTypeRegistry;
focal_class.type: ClientTypeRegistry
focal_class.var_name: clientTypeRegistry
focal_class.declarator: layoutGenerator
focal_class.modifier: private
focal_class.original_string: private LayoutGenerator layoutGenerator;
focal_class.type: LayoutGenerator
focal_class.var_name: layoutGenerator
focal_class.declarator: navigationManager
focal_class.modifier: private
focal_class.original_string: private NavigationManager navigationManager;
focal_class.type: NavigationManager
focal_class.var_name: navigationManager
focal_class.declarator: pluginServices
focal_class.modifier: private
focal_class.original_string: private Caller<PerspectivePluginServices> pluginServices;
focal_class.type: Caller<PerspectivePluginServices>
focal_class.var_name: pluginServices
focal_class.declarator: perspectivesChangedEvent
focal_class.modifier: private
focal_class.original_string: private Event<PerspectivePluginsChangedEvent> perspectivesChangedEvent;
focal_class.type: Event<PerspectivePluginsChangedEvent>
focal_class.var_name: perspectivesChangedEvent
focal_class.declarator: pluginMap = new HashMap<>()
focal_class.modifier: private
focal_class.original_string: private Map<String, Plugin> pluginMap = new HashMap<>();
focal_class.type: Map<String, Plugin>
focal_class.var_name: pluginMap
focal_class.declarator: pluginsLoaded = false
focal_class.modifier: private
focal_class.original_string: private boolean pluginsLoaded = false;
focal_class.type: boolean
focal_class.var_name: pluginsLoaded
focal_class.declarator: navGroupStack = new Stack<>()
focal_class.modifier: private
focal_class.original_string: private Stack<NavGroup> navGroupStack = new Stack<>();
focal_class.type: Stack<NavGroup>
focal_class.var_name: navGroupStack
focal_class.file: dashbuilder-client/dashbuilder-navigation-client/src/main/java/org/dashbuilder/client/navigation/plugin/PerspectivePluginManager.java
focal_class.identifier: PerspectivePluginManager
focal_class.class_method_signature: PerspectivePluginManager.PerspectivePluginManager(ClientTypeRegistry clientTypeRegistry,
                                      LayoutGenerator layoutGenerator,
                                      NavigationManager navigationManager,
                                      Caller<PerspectivePluginServices> pluginServices,
                                      Event<PerspectivePluginsChangedEvent> perspectivesChangedEvent)
focal_class.full_signature: @Inject public  PerspectivePluginManager(ClientTypeRegistry clientTypeRegistry,
                                      LayoutGenerator layoutGenerator,
                                      NavigationManager navigationManager,
                                      Caller<PerspectivePluginServices> pluginServices,
                                      Event<PerspectivePluginsChangedEvent> perspectivesChangedEvent)
focal_class.identifier: PerspectivePluginManager
focal_class.modifiers: @Inject public
focal_class.parameters: (ClientTypeRegistry clientTypeRegistry,
                                      LayoutGenerator layoutGenerator,
                                      NavigationManager navigationManager,
                                      Caller<PerspectivePluginServices> pluginServices,
                                      Event<PerspectivePluginsChangedEvent> perspectivesChangedEvent)
focal_class.signature:  PerspectivePluginManager(ClientTypeRegistry clientTypeRegistry,
                                      LayoutGenerator layoutGenerator,
                                      NavigationManager navigationManager,
                                      Caller<PerspectivePluginServices> pluginServices,
                                      Event<PerspectivePluginsChangedEvent> perspectivesChangedEvent)
focal_class.class_method_signature: PerspectivePluginManager.init()
focal_class.full_signature: @PostConstruct private void init()
focal_class.identifier: init
focal_class.modifiers: @PostConstruct private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void init()
focal_class.class_method_signature: PerspectivePluginManager.getPerspectivePlugins(ParameterizedCommand<Collection<Plugin>> callback)
focal_class.full_signature: public void getPerspectivePlugins(ParameterizedCommand<Collection<Plugin>> callback)
focal_class.identifier: getPerspectivePlugins
focal_class.modifiers: public
focal_class.parameters: (ParameterizedCommand<Collection<Plugin>> callback)
focal_class.return: void
focal_class.signature: void getPerspectivePlugins(ParameterizedCommand<Collection<Plugin>> callback)
focal_class.class_method_signature: PerspectivePluginManager.loadPlugins(ParameterizedCommand<Collection<Plugin>> callback)
focal_class.full_signature: private void loadPlugins(ParameterizedCommand<Collection<Plugin>> callback)
focal_class.identifier: loadPlugins
focal_class.modifiers: private
focal_class.parameters: (ParameterizedCommand<Collection<Plugin>> callback)
focal_class.return: void
focal_class.signature: void loadPlugins(ParameterizedCommand<Collection<Plugin>> callback)
focal_class.class_method_signature: PerspectivePluginManager.isRuntimePerspective(Plugin plugin)
focal_class.full_signature: public boolean isRuntimePerspective(Plugin plugin)
focal_class.identifier: isRuntimePerspective
focal_class.modifiers: public
focal_class.parameters: (Plugin plugin)
focal_class.return: boolean
focal_class.signature: boolean isRuntimePerspective(Plugin plugin)
focal_class.class_method_signature: PerspectivePluginManager.isRuntimePerspective(NavItem navItem)
focal_class.full_signature: public boolean isRuntimePerspective(NavItem navItem)
focal_class.identifier: isRuntimePerspective
focal_class.modifiers: public
focal_class.parameters: (NavItem navItem)
focal_class.return: boolean
focal_class.signature: boolean isRuntimePerspective(NavItem navItem)
focal_class.class_method_signature: PerspectivePluginManager.isRuntimePerspective(String perspectiveId)
focal_class.full_signature: public boolean isRuntimePerspective(String perspectiveId)
focal_class.identifier: isRuntimePerspective
focal_class.modifiers: public
focal_class.parameters: (String perspectiveId)
focal_class.return: boolean
focal_class.signature: boolean isRuntimePerspective(String perspectiveId)
focal_class.class_method_signature: PerspectivePluginManager.getRuntimePerspectiveId(NavItem navItem)
focal_class.full_signature: public String getRuntimePerspectiveId(NavItem navItem)
focal_class.identifier: getRuntimePerspectiveId
focal_class.modifiers: public
focal_class.parameters: (NavItem navItem)
focal_class.return: String
focal_class.signature: String getRuntimePerspectiveId(NavItem navItem)
focal_class.class_method_signature: PerspectivePluginManager.existsPerspectivePlugin(String perspectiveName)
focal_class.full_signature: public boolean existsPerspectivePlugin(String perspectiveName)
focal_class.identifier: existsPerspectivePlugin
focal_class.modifiers: public
focal_class.parameters: (String perspectiveName)
focal_class.return: boolean
focal_class.signature: boolean existsPerspectivePlugin(String perspectiveName)
focal_class.class_method_signature: PerspectivePluginManager.buildPerspectiveWidget(String perspectiveName, ParameterizedCommand<IsWidget> afterBuild, ParameterizedCommand<LayoutRecursionIssue> onInfiniteRecursion)
focal_class.full_signature: public void buildPerspectiveWidget(String perspectiveName, ParameterizedCommand<IsWidget> afterBuild, ParameterizedCommand<LayoutRecursionIssue> onInfiniteRecursion)
focal_class.identifier: buildPerspectiveWidget
focal_class.modifiers: public
focal_class.parameters: (String perspectiveName, ParameterizedCommand<IsWidget> afterBuild, ParameterizedCommand<LayoutRecursionIssue> onInfiniteRecursion)
focal_class.return: void
focal_class.signature: void buildPerspectiveWidget(String perspectiveName, ParameterizedCommand<IsWidget> afterBuild, ParameterizedCommand<LayoutRecursionIssue> onInfiniteRecursion)
focal_class.class_method_signature: PerspectivePluginManager.getLayoutTemplateInfo(String perspectiveName, ParameterizedCommand<LayoutTemplateInfo> callback)
focal_class.full_signature: public void getLayoutTemplateInfo(String perspectiveName, ParameterizedCommand<LayoutTemplateInfo> callback)
focal_class.identifier: getLayoutTemplateInfo
focal_class.modifiers: public
focal_class.parameters: (String perspectiveName, ParameterizedCommand<LayoutTemplateInfo> callback)
focal_class.return: void
focal_class.signature: void getLayoutTemplateInfo(String perspectiveName, ParameterizedCommand<LayoutTemplateInfo> callback)
focal_class.class_method_signature: PerspectivePluginManager.getLayoutTemplateInfo(LayoutTemplate layoutTemplate, ParameterizedCommand<LayoutTemplateInfo> callback)
focal_class.full_signature: public void getLayoutTemplateInfo(LayoutTemplate layoutTemplate, ParameterizedCommand<LayoutTemplateInfo> callback)
focal_class.identifier: getLayoutTemplateInfo
focal_class.modifiers: public
focal_class.parameters: (LayoutTemplate layoutTemplate, ParameterizedCommand<LayoutTemplateInfo> callback)
focal_class.return: void
focal_class.signature: void getLayoutTemplateInfo(LayoutTemplate layoutTemplate, ParameterizedCommand<LayoutTemplateInfo> callback)
focal_class.class_method_signature: PerspectivePluginManager.buildPerspectiveWidget(String perspectiveName, LayoutTemplateContext layoutCtx, ParameterizedCommand<IsWidget> afterBuild, ParameterizedCommand<LayoutRecursionIssue> onInfiniteRecursion)
focal_class.full_signature: public void buildPerspectiveWidget(String perspectiveName, LayoutTemplateContext layoutCtx, ParameterizedCommand<IsWidget> afterBuild, ParameterizedCommand<LayoutRecursionIssue> onInfiniteRecursion)
focal_class.identifier: buildPerspectiveWidget
focal_class.modifiers: public
focal_class.parameters: (String perspectiveName, LayoutTemplateContext layoutCtx, ParameterizedCommand<IsWidget> afterBuild, ParameterizedCommand<LayoutRecursionIssue> onInfiniteRecursion)
focal_class.return: void
focal_class.signature: void buildPerspectiveWidget(String perspectiveName, LayoutTemplateContext layoutCtx, ParameterizedCommand<IsWidget> afterBuild, ParameterizedCommand<LayoutRecursionIssue> onInfiniteRecursion)
focal_class.class_method_signature: PerspectivePluginManager.getLastBuildPerspectiveNavGroup()
focal_class.full_signature: public NavGroup getLastBuildPerspectiveNavGroup()
focal_class.identifier: getLastBuildPerspectiveNavGroup
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: NavGroup
focal_class.signature: NavGroup getLastBuildPerspectiveNavGroup()
focal_class.class_method_signature: PerspectivePluginManager.onPlugInAdded(@Observes final PluginAdded event)
focal_class.full_signature: public void onPlugInAdded(@Observes final PluginAdded event)
focal_class.identifier: onPlugInAdded
focal_class.modifiers: public
focal_class.parameters: (@Observes final PluginAdded event)
focal_class.return: void
focal_class.signature: void onPlugInAdded(@Observes final PluginAdded event)
focal_class.class_method_signature: PerspectivePluginManager.onPlugInSaved(@Observes final PluginSaved event)
focal_class.full_signature: public void onPlugInSaved(@Observes final PluginSaved event)
focal_class.identifier: onPlugInSaved
focal_class.modifiers: public
focal_class.parameters: (@Observes final PluginSaved event)
focal_class.return: void
focal_class.signature: void onPlugInSaved(@Observes final PluginSaved event)
focal_class.class_method_signature: PerspectivePluginManager.onPlugInRenamed(@Observes final PluginRenamed event)
focal_class.full_signature: public void onPlugInRenamed(@Observes final PluginRenamed event)
focal_class.identifier: onPlugInRenamed
focal_class.modifiers: public
focal_class.parameters: (@Observes final PluginRenamed event)
focal_class.return: void
focal_class.signature: void onPlugInRenamed(@Observes final PluginRenamed event)
focal_class.class_method_signature: PerspectivePluginManager.onPlugInDeleted(@Observes final PluginDeleted event)
focal_class.full_signature: public void onPlugInDeleted(@Observes final PluginDeleted event)
focal_class.identifier: onPlugInDeleted
focal_class.modifiers: public
focal_class.parameters: (@Observes final PluginDeleted event)
focal_class.return: void
focal_class.signature: void onPlugInDeleted(@Observes final PluginDeleted event)
focal_method.body: public void onPlugInDeleted(@Observes final PluginDeleted event) {
          String pluginName = event.getPluginName();
          pluginMap.remove(pluginName);
  
          NavWorkbenchCtx ctx = NavWorkbenchCtx.perspective(pluginName);
          NavTree navTree = navigationManager.getNavTree();
          List<NavItem> itemsToDelete = navTree.searchItems(ctx);
          for (NavItem item : itemsToDelete) {
              navTree.deleteItem(item.getId());
          }
          if (!itemsToDelete.isEmpty()) {
              navigationManager.saveNavTree(navTree, null);
          }
          perspectivesChangedEvent.fire(new PerspectivePluginsChangedEvent());
      }
focal_method.class_method_signature: PerspectivePluginManager.onPlugInDeleted(@Observes final PluginDeleted event)
focal_method.full_signature: public void onPlugInDeleted(@Observes final PluginDeleted event)
focal_method.identifier: onPlugInDeleted
focal_method.invocations: getPluginName remove perspective getNavTree searchItems deleteItem getId isEmpty saveNavTree fire
focal_method.modifiers: public
focal_method.parameters: (@Observes final PluginDeleted event)
focal_method.return: void
focal_method.signature: void onPlugInDeleted(@Observes final PluginDeleted event)