@Override public boolean isEnabled() { return delegate.isEnabled(); }
int getDefaultChangeActive() { int result= fChange.isEnabled() ? ACTIVE : INACTIVE; if (fChildren != null) { for (int i= 0; i < fChildren.length; i++) { result= ACTIVATION_TABLE[fChildren[i].getActive()][result]; if (result == PARTLY_ACTIVE) break; } } return result; }
if (!fChange.isEnabled()) return; IWorkspaceRunnable runnable= new IWorkspaceRunnable() {
if (!fChange.isEnabled()) return; IWorkspaceRunnable runnable= new IWorkspaceRunnable() {
if (!fChange.isEnabled()) return; IWorkspaceRunnable runnable= new IWorkspaceRunnable() {
/** * {@inheritDoc} * <p> * The composite change sends <code>isValid</code> to all its children * until the first one returns a status with a severity of <code>FATAL * </code>. If one of the children throws an exception the remaining children * will not receive the <code>isValid</code> call. * </p> * <p> * Client are allowed to extend this method. * </p> */ public RefactoringStatus isValid(IProgressMonitor pm) throws CoreException { RefactoringStatus result= new RefactoringStatus(); pm.beginTask("", fChanges.size()); //$NON-NLS-1$ for (Iterator iter= fChanges.iterator(); iter.hasNext() && !result.hasFatalError();) { Change change= (Change)iter.next(); if (change.isEnabled()) result.merge(change.isValid(new SubProgressMonitor(pm, 1))); else pm.worked(1); if (pm.isCanceled()) throw new OperationCanceledException(); } pm.done(); return result; }
/** * {@inheritDoc} * <p> * The composite change sends <code>isValid</code> to all its children * until the first one returns a status with a severity of <code>FATAL * </code>. If one of the children throws an exception the remaining children * will not receive the <code>isValid</code> call. * </p> * <p> * Client are allowed to extend this method. * </p> */ @Override public RefactoringStatus isValid(IProgressMonitor pm) throws CoreException { RefactoringStatus result= new RefactoringStatus(); pm.beginTask("", fChanges.size()); //$NON-NLS-1$ for (Iterator<Change> iter= fChanges.iterator(); iter.hasNext() && !result.hasFatalError();) { Change change= iter.next(); if (change.isEnabled()) result.merge(change.isValid(new SubProgressMonitor(pm, 1))); else pm.worked(1); if (pm.isCanceled()) throw new OperationCanceledException(); } pm.done(); return result; }
/** * {@inheritDoc} * <p> * The composite change sends <code>isValid</code> to all its children * until the first one returns a status with a severity of <code>FATAL * </code>. If one of the children throws an exception the remaining children * will not receive the <code>isValid</code> call. * </p> * <p> * Client are allowed to extend this method. * </p> */ @Override public RefactoringStatus isValid(IProgressMonitor pm) throws CoreException { RefactoringStatus result= new RefactoringStatus(); pm.beginTask("", fChanges.size()); //$NON-NLS-1$ for (Iterator<Change> iter= fChanges.iterator(); iter.hasNext() && !result.hasFatalError();) { Change change= iter.next(); if (change.isEnabled()) result.merge(change.isValid(new SubProgressMonitor(pm, 1))); else pm.worked(1); if (pm.isCanceled()) throw new OperationCanceledException(); } pm.done(); return result; }
private ExecuteResult executeChange(final IValidationCheckResultQuery query, IProgressMonitor pm) throws CoreException { final ExecuteResult result= new ExecuteResult(); if (fActiveChange == null || !fActiveChange.isEnabled()) return result; IWorkspaceRunnable runnable= new IWorkspaceRunnable() {
private ExecuteResult executeChange(final IValidationCheckResultQuery query, IProgressMonitor pm) throws CoreException { final ExecuteResult result= new ExecuteResult(); if (fActiveChange == null || !fActiveChange.isEnabled()) return result; IWorkspaceRunnable runnable= new IWorkspaceRunnable() {
private ExecuteResult executeChange(final IValidationCheckResultQuery query, IProgressMonitor pm) throws CoreException { final ExecuteResult result= new ExecuteResult(); if (fActiveChange == null || !fActiveChange.isEnabled()) return result; IWorkspaceRunnable runnable= new IWorkspaceRunnable() {
continue; if (change.isEnabled()) { Change undoChange= null; try {
continue; if (change.isEnabled()) { Change undoChange= null; try {
continue; if (change.isEnabled()) { Change undoChange= null; try {