Refactoringaction: 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 boolean renameDQString;
40
41         private boolean renamePHPdoc;
42
43         private boolean renameOtherComments;
44
45         private SourceMethod method;
46
47         public int getOffset() {
48                 return offset;
49         }
50
51         public void setOffset(final int offset) {
52                 this.offset = offset;
53         }
54
55         public String getNewName() {
56                 return newName;
57         }
58
59         public void setNewName(final String newName) {
60                 this.newName = newName;
61         }
62
63         public String getOldName() {
64                 return oldName;
65         }
66
67         public void setOldName(final String oldName) {
68                 this.oldName = oldName;
69         }
70
71         public IFile getSourceFile() {
72                 return sourceFile;
73         }
74
75         public void setSourceFile(final IFile sourceFile) {
76                 this.sourceFile = sourceFile;
77         }
78
79         public boolean isAllProjects() {
80                 return allProjects;
81         }
82
83         public void setAllProjects(final boolean allProjects) {
84                 this.allProjects = allProjects;
85         }
86
87         public boolean isUpdateProject() {
88                 return updateProject;
89         }
90
91         public void setUpdateProject(final boolean updateBundle) {
92                 this.updateProject = updateBundle;
93         }
94
95         public SourceMethod getMethod() {
96                 return method;
97         }
98
99         public void setMethod(SourceMethod method) {
100                 this.method = method;
101         }
102
103         public boolean isRenameDQString() {
104                 return renameDQString;
105         }
106
107         public void setRenameDQString(boolean renameDQString) {
108                 this.renameDQString = renameDQString;
109         }
110
111         public boolean isRenameOtherComments() {
112                 return renameOtherComments;
113         }
114
115         public void setRenameOtherComments(boolean renameOtherComments) {
116                 this.renameOtherComments = renameOtherComments;
117         }
118
119         public boolean isRenamePHPdoc() {
120                 return renamePHPdoc;
121         }
122
123         public void setRenamePHPdoc(boolean renamePHPdoc) {
124                 this.renamePHPdoc = renamePHPdoc;
125         }
126 }