KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > debug > core > refactoring > JavaBreakpointIJavaProjectRenameParticipant


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.jdt.internal.debug.core.refactoring;
12
13 import org.eclipse.core.runtime.CoreException;
14 import org.eclipse.core.runtime.IProgressMonitor;
15 import org.eclipse.core.runtime.OperationCanceledException;
16 import org.eclipse.jdt.core.IJavaProject;
17 import org.eclipse.ltk.core.refactoring.Change;
18 import org.eclipse.ltk.core.refactoring.RefactoringStatus;
19 import org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext;
20 import org.eclipse.ltk.core.refactoring.participants.RenameParticipant;
21
22
23 /**
24  * Participant for IJavaProject rename.
25  */

26 public class JavaBreakpointIJavaProjectRenameParticipant extends RenameParticipant {
27
28     private IJavaProject fProject;
29     
30     /* (non-Javadoc)
31      * @see org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant#initialize(java.lang.Object)
32      */

33     protected boolean initialize(Object JavaDoc element) {
34         fProject= (IJavaProject) element;
35         return true;
36     }
37
38     /* (non-Javadoc)
39      * @see org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant#getName()
40      */

41     public String JavaDoc getName() {
42         return RefactoringMessages.JavaBreakpointIJavaProjectRenameParticipant_0; //$NON-NLS-1$
43
}
44
45     /* (non-Javadoc)
46      * @see org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant#checkConditions(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext)
47      */

48     public RefactoringStatus checkConditions(IProgressMonitor pm, CheckConditionsContext context) throws OperationCanceledException {
49         return new RefactoringStatus();
50     }
51
52     /* (non-Javadoc)
53      * @see org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant#createChange(org.eclipse.core.runtime.IProgressMonitor)
54      */

55     public Change createChange(IProgressMonitor pm) throws CoreException, OperationCanceledException {
56         return JavaBreakpointTypeChange.createChangesForProjectRename(fProject, getArguments().getNewName());
57     }
58
59 }
60
Popular Tags