Added a new refactoring action: net.sourceforge.phpdt.ltk.ui.actions.RenameLocalVariable
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / ltk / core / RenameIdentifierInfo.java
1 // Copyright (c) 2005 by Leif Frenzel. All rights reserved.
2 // See http://leiffrenzel.de
3 // modified for phpeclipse.de project by axelcl
4 package net.sourceforge.phpdt.ltk.core;
5
6 import net.sourceforge.phpdt.internal.core.SourceMethod;
7
8 import org.eclipse.core.resources.IFile;
9
10 /**
11  * <p>
12  * an info object that holds the information that is passed from the user to the
13  * refactoring.
14  * </p>
15  *
16  */
17 public class RenameIdentifierInfo {
18
19         // the offset of the property to be renamed in the file
20         private int offset;
21
22         // the new name for the property
23         private String newName;
24
25         // the old name of the property (as selected by the user)
26         private String oldName;
27
28         // the file that contains the property to be renamed
29         private IFile sourceFile;
30
31         // whether the refactoring should also change the identifier
32         // in corresponding PHP files in the same project
33         private boolean updateProject;
34
35         // whether the refactoring should also update PHP files in other
36         // projects than the current one
37         private boolean allProjects;
38
39         private SourceMethod method;
40
41         public int getOffset() {
42                 return offset;
43         }
44
45         public void setOffset(final int offset) {
46                 this.offset = offset;
47         }
48
49         public String getNewName() {
50                 return newName;
51         }
52
53         public void setNewName(final String newName) {
54                 this.newName = newName;
55         }
56
57         public String getOldName() {
58                 return oldName;
59         }
60
61         public void setOldName(final String oldName) {
62                 this.oldName = oldName;
63         }
64
65         public IFile getSourceFile() {
66                 return sourceFile;
67         }
68
69         public void setSourceFile(final IFile sourceFile) {
70                 this.sourceFile = sourceFile;
71         }
72
73         public boolean isAllProjects() {
74                 return allProjects;
75         }
76
77         public void setAllProjects(final boolean allProjects) {
78                 this.allProjects = allProjects;
79         }
80
81         public boolean isUpdateProject() {
82                 return updateProject;
83         }
84
85         public void setUpdateProject(final boolean updateBundle) {
86                 this.updateProject = updateBundle;
87         }
88
89         public SourceMethod getMethod() {
90                 return method;
91         }
92
93         public void setMethod(SourceMethod method) {
94                 this.method = method;
95         }
96 }