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

could be final.


Signed-off-by: Kristof Szabados's avatarKristof Szabados <Kristof.Szabados@ericsson.com>
parent 2536761e
......@@ -96,7 +96,7 @@ class ChangeCreator {
module.accept(vis);
final Map<Log_Statement, Context> res = vis.getResult();
final MultiTextEdit rootEdit = new MultiTextEdit();
for (Map.Entry<Log_Statement, Context> e: res.entrySet()) {
for (final Map.Entry<Log_Statement, Context> e: res.entrySet()) {
final TextEdit edit = createTextEdit(e.getKey(), e.getValue());
if (edit != null) {
rootEdit.addChild(edit);
......@@ -115,7 +115,7 @@ class ChangeCreator {
module.accept(vis);
final Map<Log_Statement, Context> res = vis.getResult();
final MultiTextEdit rootEdit = new MultiTextEdit();
for (Map.Entry<Log_Statement, Context> e: res.entrySet()) {
for (final Map.Entry<Log_Statement, Context> e: res.entrySet()) {
final TextEdit edit = createTextEdit(e.getKey(), e.getValue());
if (edit != null) {
rootEdit.addChild(edit);
......@@ -215,7 +215,7 @@ class ChangeCreator {
private int calculateEndOffset() {
int endOffset = -1;
for (LogArgument la: args) {
for (final LogArgument la: args) {
if (la.getLocation().getEndOffset() > endOffset) {
endOffset = la.getLocation().getEndOffset();
}
......
......@@ -35,7 +35,7 @@ import org.eclipse.ui.PlatformUI;
*
* @author Viktor Varga
*/
public class ContextLoggingActionFromEditor extends AbstractHandler {
public final class ContextLoggingActionFromEditor extends AbstractHandler {
private static final String ERR_MSG_NO_SELECTION = "Empty selection! ";
private TextSelection selection;
......
......@@ -49,7 +49,7 @@ class ForContext extends Context {
if (initialAssignmentIds == null) {
return ret;
}
for (Identifier id: initialAssignmentIds) {
for (final Identifier id: initialAssignmentIds) {
final String idS = id.toString();
if (idsAlreadyHandled.contains(idS)) {
continue;
......
......@@ -53,7 +53,7 @@ class FunctionContext extends Context {
if (paramIds == null) {
return ret;
}
for (Identifier id: paramIds) {
for (final Identifier id: paramIds) {
final String idS = id.toString();
if (idsAlreadyHandled.contains(idS)) {
continue;
......
......@@ -55,14 +55,14 @@ class IfContext extends Context {
final ClauseVisitor vis = new ClauseVisitor();
ic.accept(vis);
final List<Reference> refs = vis.getResult();
for (Reference ref: refs) {
for (final Reference ref: refs) {
varNamesInConditions.add(ref.getDisplayName());
}
}
} else {
//the log statement is in the else block
final List<Reference> refs = extractAllIdsFromClauses(ics);
for (Reference ref: refs) {
for (final Reference ref: refs) {
varNamesInConditions.add(ref.getDisplayName());
}
}
......@@ -71,7 +71,7 @@ class IfContext extends Context {
private static List<Reference> extractAllIdsFromClauses(final If_Clauses ics) {
final List<If_Clause> icl = ics.getClauses();
final List<Reference> ret = new ArrayList<Reference>();
for (If_Clause ic: icl) {
for (final If_Clause ic: icl) {
final ClauseVisitor vis = new ClauseVisitor();
ic.accept(vis);
ret.addAll(vis.getResult());
......@@ -85,7 +85,7 @@ class IfContext extends Context {
if (varNamesInConditions == null) {
return ret;
}
for (String s: varNamesInConditions) {
for (final String s: varNamesInConditions) {
if (idsAlreadyHandled.contains(s)) {
continue;
}
......
......@@ -65,7 +65,7 @@ public class StatementBlockContext extends Context {
if (localVarIds == null) {
return ret;
}
for (Identifier id: localVarIds) {
for (final Identifier id: localVarIds) {
final String idS = id.toString();
if (idsAlreadyHandled.contains(idS)) {
continue;
......
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