@Test public void testPerspectiveName() { when(perspectivePluginManager.isRuntimePerspective("A.1")).thenReturn(true); when(perspectiveTreeProvider.getPerspectiveName("B.1")).thenReturn("Pretty"); assertEquals(presenter.getPerspectiveName("A.1"), "A.1"); assertEquals(presenter.getPerspectiveName("B.1"), "Pretty"); }
@Override public String getPerspectiveName(String perspectiveId) { if (perspectivePluginManager.isRuntimePerspective(perspectiveId)) { return perspectiveId; } return perspectiveTreeProvider.getPerspectiveName(perspectiveId); }
TargetPerspectiveEditor implements IsElement, PerspectiveNameProvider { @Override public String getPerspectiveName(String perspectiveId) { if (perspectivePluginManager.isRuntimePerspective(perspectiveId)) { return perspectiveId; } return perspectiveTreeProvider.getPerspectiveName(perspectiveId); } }
TargetPerspectiveEditor implements IsElement, PerspectiveNameProvider { @Override public String getPerspectiveName(String perspectiveId) { if (perspectivePluginManager.isRuntimePerspective(perspectiveId)) { return perspectiveId; } return perspectiveTreeProvider.getPerspectiveName(perspectiveId); } @Inject  TargetPerspectiveEditor(View view,
                                   PerspectiveDropDown perspectiveDropDown,
                                   PerspectivePluginManager perspectivePluginManager,
                                   PerspectiveTreeProvider perspectiveTreeProvider); }
TargetPerspectiveEditor implements IsElement, PerspectiveNameProvider { @Override public String getPerspectiveName(String perspectiveId) { if (perspectivePluginManager.isRuntimePerspective(perspectiveId)) { return perspectiveId; } return perspectiveTreeProvider.getPerspectiveName(perspectiveId); } @Inject  TargetPerspectiveEditor(View view,
                                   PerspectiveDropDown perspectiveDropDown,
                                   PerspectivePluginManager perspectivePluginManager,
                                   PerspectiveTreeProvider perspectiveTreeProvider); @Override HTMLElement getElement(); void setNavItemList(List<NavItem> navItemList); void setOnUpdateCommand(Command onUpdateCommand); void setPerspectiveIdsExcluded(Set<String> perspectiveIdsExcluded); void setPerspectiveId(String perspectiveId); String getPerspectiveId(); @Override String getPerspectiveName(String perspectiveId); void setNavGroupEnabled(boolean enabled); void setNavGroupId(String navGroupId); String getNavGroupId(); void show(); void clear(); void onGroupSelected(String id); void onPerspectiveChanged(); }
TargetPerspectiveEditor implements IsElement, PerspectiveNameProvider { @Override public String getPerspectiveName(String perspectiveId) { if (perspectivePluginManager.isRuntimePerspective(perspectiveId)) { return perspectiveId; } return perspectiveTreeProvider.getPerspectiveName(perspectiveId); } @Inject  TargetPerspectiveEditor(View view,
                                   PerspectiveDropDown perspectiveDropDown,
                                   PerspectivePluginManager perspectivePluginManager,
                                   PerspectiveTreeProvider perspectiveTreeProvider); @Override HTMLElement getElement(); void setNavItemList(List<NavItem> navItemList); void setOnUpdateCommand(Command onUpdateCommand); void setPerspectiveIdsExcluded(Set<String> perspectiveIdsExcluded); void setPerspectiveId(String perspectiveId); String getPerspectiveId(); @Override String getPerspectiveName(String perspectiveId); void setNavGroupEnabled(boolean enabled); void setNavGroupId(String navGroupId); String getNavGroupId(); void show(); void clear(); void onGroupSelected(String id); void onPerspectiveChanged();  }