Commit 08fd559b 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 20ae5ddc
......@@ -109,7 +109,7 @@ class ChangeCreator {
final MultiTextEdit rootEdit = new MultiTextEdit();
tfc.setEdit(rootEdit);
for (Location l: locations) {
for (final Location l: locations) {
rootEdit.addChild(new InsertEdit(l.getOffset(), "@lazy "));
}
return tfc;
......
......@@ -89,16 +89,16 @@ public class LazyficationRefactoring extends Refactoring {
}
pm.worked(1);
// check that there are no ttcnpp files in the project
for (IProject project : projects) {
for (final IProject project : projects) {
if (hasTtcnppFiles(project)) {//FIXME actually all referencing and referenced projects need to be checked too !
result.addError(MessageFormat.format(PROJECTCONTAINSTTCNPPFILES, project));
}
}
pm.worked(1);
// check that there are no error markers in the project
for (IProject project : projects) {
for (final IProject project : projects) {
final IMarker[] markers = project.findMarkers(null, true, IResource.DEPTH_INFINITE);
for (IMarker marker : markers) {
for (final IMarker marker : markers) {
if (IMarker.SEVERITY_ERROR == marker.getAttribute(IMarker.SEVERITY, IMarker.SEVERITY_ERROR)) {
result.addError(MessageFormat.format(PROJECTCONTAINSERRORS, project));
break;
......@@ -148,7 +148,7 @@ public class LazyficationRefactoring extends Refactoring {
public static boolean hasTtcnppFiles(final IResource resource) throws CoreException {
if (resource instanceof IProject || resource instanceof IFolder) {
final IResource[] children = resource instanceof IFolder ? ((IFolder) resource).members() : ((IProject) resource).members();
for (IResource res : children) {
for (final IResource res : children) {
if (hasTtcnppFiles(res)) {
return true;
}
......
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