private int handleValidateMove(Object target) throws JavaModelException { if (target == null) return DND.DROP_NONE; IMovePolicy policy= ReorgPolicyFactory.createMovePolicy(ReorgUtils.getResources(fElements), ReorgUtils.getJavaElements(fElements)); fMoveProcessor= (policy.canEnable()) ? new JavaMoveProcessor(policy) : null; if (!canMoveElements()) return DND.DROP_NONE; if (fMoveProcessor == null) return DND.DROP_NONE; if (!fMoveProcessor.setDestination(ReorgDestinationFactory.createDestination(target)).isOK()) return DND.DROP_NONE; return DND.DROP_MOVE; }
private int handleValidateMove(Object target) throws JavaModelException { if (target == null) return DND.DROP_NONE; IMovePolicy policy= ReorgPolicyFactory.createMovePolicy(ReorgUtils.getResources(fElements), ReorgUtils.getJavaElements(fElements)); fMoveProcessor= (policy.canEnable()) ? new JavaMoveProcessor(policy) : null; if (!canMoveElements()) return DND.DROP_NONE; if (fMoveProcessor == null) return DND.DROP_NONE; if (!fMoveProcessor.setDestination(ReorgDestinationFactory.createDestination(target)).isOK()) return DND.DROP_NONE; return DND.DROP_MOVE; }
private int handleValidateMove(Object target) throws JavaModelException { if (target == null) return DND.DROP_NONE; IMovePolicy policy= ReorgPolicyFactory.createMovePolicy(ReorgUtils.getResources(fElements), ReorgUtils.getJavaElements(fElements)); fMoveProcessor= (policy.canEnable()) ? new JavaMoveProcessor(policy) : null; if (!canMoveElements()) return DND.DROP_NONE; if (target instanceof IResource && fMoveProcessor != null && fMoveProcessor.setDestination((IResource)target).isOK()) return DND.DROP_MOVE; else if (target instanceof IJavaElement && fMoveProcessor != null && fMoveProcessor.setDestination((IJavaElement)target).isOK()) return DND.DROP_MOVE; else return DND.DROP_NONE; }