01: /*******************************************************************************
02: * Copyright (c) 2000, 2005 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.jdt.ui.tests.refactoring;
11:
12: import org.eclipse.core.runtime.CoreException;
13: import org.eclipse.core.runtime.IProgressMonitor;
14:
15: import org.eclipse.ltk.core.refactoring.Change;
16: import org.eclipse.ltk.core.refactoring.NullChange;
17: import org.eclipse.ltk.core.refactoring.Refactoring;
18: import org.eclipse.ltk.core.refactoring.RefactoringStatus;
19:
20: /**
21: * useful for tests
22: */
23: public class NullRefactoring extends Refactoring {
24:
25: public Change createChange(IProgressMonitor pm)
26: throws CoreException {
27: pm.beginTask("", 1);
28: pm.worked(1);
29: pm.done();
30: return new NullChange("NullRefactoring");
31: }
32:
33: public RefactoringStatus checkInitialConditions(IProgressMonitor pm)
34: throws CoreException {
35: pm.beginTask("", 1);
36: pm.worked(1);
37: pm.done();
38: return new RefactoringStatus();
39: }
40:
41: public RefactoringStatus checkFinalConditions(IProgressMonitor pm)
42: throws CoreException {
43: pm.beginTask("", 1);
44: pm.worked(1);
45: pm.done();
46: return new RefactoringStatus();
47: }
48:
49: public String getName() {
50: return "Null Refactoring";
51: }
52: }
|