@Test public void getDocks() { DefaultStunnerDockSupplierImpl defaultStunnerDockSupplier = new DefaultStunnerDockSupplierImpl(); Collection<UberfireDock> docks = defaultStunnerDockSupplier.getDocks(PERSPECTIVE_IDENTIFIER); assertEquals(2, docks.size(), 0); Optional<UberfireDock> propertiesDock = docks.stream() .filter(dock -> dock.getPlaceRequest().getIdentifier().compareTo(PROPERTIES_DOCK_SCREEN_ID) == 0) .findFirst(); assertDock(propertiesDock.get(), DOCK_POSITION, PROPERTIES_ICON_TYPE, PROPERTIES_DOCK_SCREEN_ID, PERSPECTIVE_IDENTIFIER, SIZE, PROPERTIES_LABEL, null); Optional<UberfireDock> explorerDock = docks.stream() .filter(dock -> dock.getPlaceRequest().getIdentifier().compareTo(DefaultStunnerDockSupplierImpl.EXPLORER_DOCK_SCREEN_ID) == 0) .findFirst(); assertDock(explorerDock.get(), DOCK_POSITION, EXPLORER_ICON_TYPE, EXPLORER_DOCK_SCREEN_ID, PERSPECTIVE_IDENTIFIER, SIZE, EXPLORER_LABEL, null); }
@Override public Collection<UberfireDock> getDocks(String perspectiveIdentifier) { List<UberfireDock> result = new ArrayList<>(); final UberfireDock propertiesDock = new UberfireDock(DOCK_POSITION, PROPERTIES_ICON_TYPE, new DefaultPlaceRequest(PROPERTIES_DOCK_SCREEN_ID), perspectiveIdentifier) .withSize(SIZE) .withLabel(PROPERTIES_LABEL); final UberfireDock explorerDock = new UberfireDock(DOCK_POSITION, EXPLORER_ICON_TYPE, new DefaultPlaceRequest(EXPLORER_DOCK_SCREEN_ID), perspectiveIdentifier) .withSize(SIZE) .withLabel(EXPLORER_LABEL); result.add(propertiesDock); result.add(explorerDock); return result; }
DefaultStunnerDockSupplierImpl implements StunnerDockSupplier { @Override public Collection<UberfireDock> getDocks(String perspectiveIdentifier) { List<UberfireDock> result = new ArrayList<>(); final UberfireDock propertiesDock = new UberfireDock(DOCK_POSITION, PROPERTIES_ICON_TYPE, new DefaultPlaceRequest(PROPERTIES_DOCK_SCREEN_ID), perspectiveIdentifier) .withSize(SIZE) .withLabel(PROPERTIES_LABEL); final UberfireDock explorerDock = new UberfireDock(DOCK_POSITION, EXPLORER_ICON_TYPE, new DefaultPlaceRequest(EXPLORER_DOCK_SCREEN_ID), perspectiveIdentifier) .withSize(SIZE) .withLabel(EXPLORER_LABEL); result.add(propertiesDock); result.add(explorerDock); return result; } }
DefaultStunnerDockSupplierImpl implements StunnerDockSupplier { @Override public Collection<UberfireDock> getDocks(String perspectiveIdentifier) { List<UberfireDock> result = new ArrayList<>(); final UberfireDock propertiesDock = new UberfireDock(DOCK_POSITION, PROPERTIES_ICON_TYPE, new DefaultPlaceRequest(PROPERTIES_DOCK_SCREEN_ID), perspectiveIdentifier) .withSize(SIZE) .withLabel(PROPERTIES_LABEL); final UberfireDock explorerDock = new UberfireDock(DOCK_POSITION, EXPLORER_ICON_TYPE, new DefaultPlaceRequest(EXPLORER_DOCK_SCREEN_ID), perspectiveIdentifier) .withSize(SIZE) .withLabel(EXPLORER_LABEL); result.add(propertiesDock); result.add(explorerDock); return result; }  }
DefaultStunnerDockSupplierImpl implements StunnerDockSupplier { @Override public Collection<UberfireDock> getDocks(String perspectiveIdentifier) { List<UberfireDock> result = new ArrayList<>(); final UberfireDock propertiesDock = new UberfireDock(DOCK_POSITION, PROPERTIES_ICON_TYPE, new DefaultPlaceRequest(PROPERTIES_DOCK_SCREEN_ID), perspectiveIdentifier) .withSize(SIZE) .withLabel(PROPERTIES_LABEL); final UberfireDock explorerDock = new UberfireDock(DOCK_POSITION, EXPLORER_ICON_TYPE, new DefaultPlaceRequest(EXPLORER_DOCK_SCREEN_ID), perspectiveIdentifier) .withSize(SIZE) .withLabel(EXPLORER_LABEL); result.add(propertiesDock); result.add(explorerDock); return result; }  @Override Collection<UberfireDock> getDocks(String perspectiveIdentifier); }
DefaultStunnerDockSupplierImpl implements StunnerDockSupplier { @Override public Collection<UberfireDock> getDocks(String perspectiveIdentifier) { List<UberfireDock> result = new ArrayList<>(); final UberfireDock propertiesDock = new UberfireDock(DOCK_POSITION, PROPERTIES_ICON_TYPE, new DefaultPlaceRequest(PROPERTIES_DOCK_SCREEN_ID), perspectiveIdentifier) .withSize(SIZE) .withLabel(PROPERTIES_LABEL); final UberfireDock explorerDock = new UberfireDock(DOCK_POSITION, EXPLORER_ICON_TYPE, new DefaultPlaceRequest(EXPLORER_DOCK_SCREEN_ID), perspectiveIdentifier) .withSize(SIZE) .withLabel(EXPLORER_LABEL); result.add(propertiesDock); result.add(explorerDock); return result; }  @Override Collection<UberfireDock> getDocks(String perspectiveIdentifier);  }