class CompassDropController implements DropController {

    @Override
    public void onDrop(DragContext context) {

        //If not dropTarget has been identified do nothing
        Position p = compass.getDropPosition();
        if (p == CompassPosition.NONE) {
            return;
        }

        compass.onDrop(context);

        //Move Part from source to target
        final WorkbenchDragContext workbenchContext = dndManager.getWorkbenchContext();
        final Menus menus = workbenchContext.getMenus();

        final PanelDefinition sourcePanel = workbenchContext.getSourcePanel();
        final PanelDefinition dropPanel = dropTarget.getPresenter().getDefinition();

        //If the Target Panel is the same as the Source we're trying to reposition the
        //Source's tab within itself. If the Source Panel has only one Tab there is no
        //net effect. If we're trying to drop as a new tab there is no net effect.
        if (sourcePanel.equals(dropPanel)) {
            if (sourcePanel.getParts() != null && sourcePanel.getParts().size() == 1) {
                return;
            }
            if (p == CompassPosition.SELF) {
                return;
            }
        }

        final PlaceRequest place = workbenchContext.getPlace();

        firePartDroppedEvent(place);

        final Integer height = null;
        final Integer width = null;
        final Integer minHeight = workbenchContext.getMinHeight();
        final Integer minWidth = workbenchContext.getMinWidth();

        final PanelDefinition targetPanel = panelManager.addWorkbenchPanel(dropPanel,
                                                                           p,
                                                                           height,
                                                                           width,
                                                                           minHeight,
                                                                           minWidth);
        final UIPart uiPart = workbenchContext.getUiPart();
        final PartDefinition sourcePart = workbenchContext.getSourcePart();

        panelManager.addWorkbenchPart(place,
                                      sourcePart,
                                      targetPanel,
                                      menus,
                                      uiPart,
                                      workbenchContext.getContextId(),
                                      null,
                                      null);
    }

}