/** * Checks whether the method has possible targets to be moved to * * @param monitor * the progress monitor to display progress * @param declaration * the method declaration to check * @param status * the status of the condition checking */ protected void checkPossibleTargets(final IProgressMonitor monitor, final MethodDeclaration declaration, final RefactoringStatus status) { Assert.isNotNull(monitor); Assert.isNotNull(declaration); Assert.isNotNull(status); try { monitor.beginTask("", 1); //$NON-NLS-1$ monitor.setTaskName(RefactoringCoreMessages.MoveInstanceMethodProcessor_checking); if (computeTargetCategories(declaration).length < 1) status.merge(RefactoringStatus.createFatalErrorStatus(RefactoringCoreMessages.MoveInstanceMethodProcessor_cannot_be_moved, JavaStatusContext.create(fMethod))); } finally { monitor.done(); } }
/** * Checks whether the method has possible targets to be moved to * * @param monitor * the progress monitor to display progress * @param declaration * the method declaration to check * @param status * the status of the condition checking */ protected void checkPossibleTargets(final IProgressMonitor monitor, final MethodDeclaration declaration, final RefactoringStatus status) { Assert.isNotNull(monitor); Assert.isNotNull(declaration); Assert.isNotNull(status); try { monitor.beginTask("", 1); //$NON-NLS-1$ monitor.setTaskName(RefactoringCoreMessages.MoveInstanceMethodProcessor_checking); if (computeTargetCategories(declaration).length < 1) status.merge(RefactoringStatus.createFatalErrorStatus(RefactoringCoreMessages.MoveInstanceMethodProcessor_cannot_be_moved, JavaStatusContext.create(fMethod))); } finally { monitor.done(); } }
/** * Checks whether the method has possible targets to be moved to * * @param monitor * the progress monitor to display progress * @param declaration * the method declaration to check * @param status * the status of the condition checking */ protected void checkPossibleTargets(final IProgressMonitor monitor, final MethodDeclaration declaration, final RefactoringStatus status) { Assert.isNotNull(monitor); Assert.isNotNull(declaration); Assert.isNotNull(status); try { monitor.beginTask("", 1); //$NON-NLS-1$ monitor.setTaskName(RefactoringCoreMessages.MoveInstanceMethodProcessor_checking); if (computeTargetCategories(declaration).length < 1) status.merge(RefactoringStatus.createFatalErrorStatus(RefactoringCoreMessages.MoveInstanceMethodProcessor_cannot_be_moved, JavaStatusContext.create(fMethod))); } finally { monitor.done(); } }
final MethodDeclaration declaration= ASTNodeSearchUtil.getMethodDeclarationNode(fMethod, fSourceRewrite.getRoot()); if (declaration != null) { final IVariableBinding[] bindings= computeTargetCategories(declaration); if (bindings != null && index < bindings.length) setTarget(bindings[index]);
final MethodDeclaration declaration= ASTNodeSearchUtil.getMethodDeclarationNode(fMethod, fSourceRewrite.getRoot()); if (declaration != null) { final IVariableBinding[] bindings= computeTargetCategories(declaration); if (bindings != null && index < bindings.length) setTarget(bindings[index]);
final MethodDeclaration declaration= ASTNodeSearchUtil.getMethodDeclarationNode(fMethod, fSourceRewrite.getRoot()); if (declaration != null) { final IVariableBinding[] bindings= computeTargetCategories(declaration); if (bindings != null && index < bindings.length) setTarget(bindings[index]);