Basic Reafctoring functionality adapted from Leif Frenzels sources in eclipse-magazin...
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / ltk / core / RenamePropertyInfo.java
1 // Copyright (c) 2005 by Leif Frenzel. All rights reserved.
2 // See http://leiffrenzel.de
3 package net.sourceforge.phpdt.ltk.core;
4
5 import org.eclipse.core.resources.IFile;
6
7
8 /** <p>an info object that holds the information that is passed from
9   * the user to the refactoring.</p>
10   *
11   * @author Leif Frenzel
12   */
13 public class RenamePropertyInfo {
14
15   // the offset of the property to be renamed in the file
16   private int offset;
17   // the new name for the property
18   private String newName;
19   // the old name of the property (as selected by the user)
20   private String oldName;
21   // the file that contains the property to be renamed
22   private IFile sourceFile;
23   // whether the refactoring should also change the name of the property
24   // in corresponding properties files in the same bundle (i.e. which start
25   // with the same name)
26   private boolean updateBundle;
27   // whether the refactoring should also update properties files in other
28   // projects than the current one
29   private boolean allProjects;
30   
31   
32   // interface methods of IRenamePropertyInfo
33   ///////////////////////////////////////////
34   
35   public int getOffset() {
36     return offset;
37   }
38   
39   public void setOffset( final int offset ) {
40     this.offset = offset;
41   }
42
43   public String getNewName() {
44     return newName;
45   }
46
47   public void setNewName( final String newName ) {
48     this.newName = newName;
49   }
50
51   public String getOldName() {
52     return oldName;
53   }
54
55   public void setOldName( final String oldName ) {
56     this.oldName = oldName;
57   }
58
59   public IFile getSourceFile() {
60     return sourceFile;
61   }
62
63   public void setSourceFile( final IFile sourceFile ) {
64     this.sourceFile = sourceFile;
65   }
66
67   public boolean isAllProjects() {
68     return allProjects;
69   }
70
71   public void setAllProjects( final boolean allProjects ) {
72     this.allProjects = allProjects;
73   }
74
75   public boolean isUpdateBundle() {
76     return updateBundle;
77   }
78
79   public void setUpdateBundle( final boolean updateBundle ) {
80     this.updateBundle = updateBundle;
81   }
82 }