Commit a33af5c7 authored by Kristof Szabados's avatar Kristof Szabados
Browse files

immutable fields.


Signed-off-by: Kristof Szabados's avatarKristof Szabados <Kristof.Szabados@ericsson.com>
parent 17917a84
......@@ -48,7 +48,7 @@ class ChangeCreator {
// in
private final IFile selectedFile;
private final MoveFunctionSettings settings;
private List<FunctionData> functions;
private final List<FunctionData> functions;
private final IProject project;
private static Map<Module, List<Module>> moduleImports = new HashMap<Module, List<Module>>();
// out
......@@ -220,7 +220,7 @@ class ChangeCreator {
private static class ModuleVisitor extends ASTVisitor {
private Def_Function function;
private final Def_Function function;
private boolean isUsed;
public ModuleVisitor(final Def_Function function) {
......
......@@ -17,15 +17,15 @@ import org.eclipse.titan.designer.AST.TTCN3.definitions.Def_Function;
* @author Bianka Bekefi
* */
public class FunctionData implements Comparable<FunctionData> {
private Def_Function definiton;
private final Def_Function definiton;
private Module module;
private String functionBody;
private final String functionBody;
private boolean toBeMoved;
private List<Destination> destinations;
private final List<Destination> destinations;
private List<Module> usedModules;
private Destination finalDestination;
private MoveFunctionMethod method;
private List<Module> usedBy;
private final List<Module> usedBy;
public FunctionData(final Def_Function definiton, final String functionBody) {
this.definiton = definiton;
......
......@@ -70,9 +70,9 @@ public class MoveFunctionRefactoring extends Refactoring {
public static final String PROJECTCONTAINSTTCNPPFILES = "The project `{0}'' contains .ttcnpp files, which might corrupt the result of the refactoring";
private static final String ONTHEFLYANALAYSISDISABLED = "The on-the-fly analysis is disabled, there is semantic information present to work on";
private Set<IProject> projects = new HashSet<IProject>();
private final Set<IProject> projects = new HashSet<IProject>();
private Module destinationModule;
private List<Module> selectedModules = new ArrayList<Module>();
private final List<Module> selectedModules = new ArrayList<Module>();
private final IStructuredSelection structSelection;
private final MoveFunctionSettings settings;
private Map<Module, List<FunctionData> > functions;
......@@ -562,7 +562,7 @@ public class MoveFunctionRefactoring extends Refactoring {
private class SelectedModulesVisitor implements IResourceVisitor {
private List<Module> selectedModules = new ArrayList<Module>();
private final List<Module> selectedModules = new ArrayList<Module>();
public SelectedModulesVisitor() {
}
......@@ -590,8 +590,8 @@ public class MoveFunctionRefactoring extends Refactoring {
private static class ModuleVisitor extends ASTVisitor {
private int counter;
private Component_Type comp;
private List<Component_Type> components;
private final Component_Type comp;
private final List<Component_Type> components;
public ModuleVisitor(final Component_Type comp, final List<Component_Type> components) {
this.comp = comp;
......
......@@ -25,7 +25,7 @@ public class MoveFunctionWizard extends RefactoringWizard implements
private static final String WIZ_WINDOWTITLE2 = "Slicing - function selection";
private static final String WIZ_WINDOWTITLE3 = "Slicing - destination options";
private MoveFunctionRefactoring refactoring;
private final MoveFunctionRefactoring refactoring;
MoveFunctionWizard(final Refactoring refactoring) {
super(refactoring, DIALOG_BASED_USER_INTERFACE);
......
......@@ -41,7 +41,7 @@ import org.eclipse.titan.designer.AST.Module;
* */
public class MoveFunctionWizardDestinationsPage extends UserInputWizardPage {
private MoveFunctionRefactoring refactoring;
private final MoveFunctionRefactoring refactoring;
private CheckboxTreeViewer tree;
protected static boolean displayZeros;
private Button displayZerosCheckBox;
......
......@@ -44,7 +44,7 @@ import org.eclipse.titan.designer.AST.TTCN3.definitions.TTCN3Module;
* */
public class MoveFunctionWizardFunctionsPage extends UserInputWizardPage {
private MoveFunctionRefactoring refactoring;
private final MoveFunctionRefactoring refactoring;
private StyledText functionBody;
private CheckboxTreeViewer tree;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment