CPD Results

The following document contains the results of PMD's CPD 5.1.2.

Duplications

File Line
info/magnolia/ui/admincentral/shellapp/favorites/FavoritesEntry.java 287
info/magnolia/ui/admincentral/shellapp/favorites/FavoritesGroup.java 269
    }

    private class EnterKeyShortcutListener extends ShortcutListener {
        private FavoritesView.Listener listener;

        public EnterKeyShortcutListener(final FavoritesView.Listener listener) {
            super("", KeyCode.ENTER, null);
            this.listener = listener;
        }

        @Override
        public void handleAction(Object sender, Object target) {
            if (editable) {
                doEditTitle(listener);
            } else {
                setIconsVisibility(true);
            }
        }
    }

    private class EscapeKeyShortcutListener extends ShortcutListener {

        public EscapeKeyShortcutListener() {
            super("", KeyCode.ESCAPE, null);
        }

        @Override
        public void handleAction(Object sender, Object target) {
            setToNonEditableState();
        }
    }
File Line
info/magnolia/ui/admincentral/shellapp/favorites/EntryDragAndDropWrapper.java 60
info/magnolia/ui/admincentral/shellapp/favorites/GroupDragAndDropWrapper.java 82
                String sourcePath = ((FavoritesEntry) ((EntryDragAndDropWrapper) event.getTransferable().getSourceComponent()).getWrappedComponent()).getRelPath();
                WrapperTransferable transferable = (WrapperTransferable) event.getTransferable();
                WrapperTargetDetails details = (WrapperTargetDetails) event.getTargetDetails();
                String verticalDropLocation = (String) details.getData("verticalLocation");
                boolean isDragDown = (details.getMouseEvent().getClientY() - transferable.getMouseDownEvent().getClientY()) > 0;

                if (isDragDown && (verticalDropLocation.equals(VerticalDropLocation.BOTTOM.name()) || verticalDropLocation.equals(VerticalDropLocation.MIDDLE.name()))) {
                    getListener().orderFavoriteAfter(sourcePath, ((FavoritesEntry) getWrappedComponent()).getNodename());