From 12d5105085dda22ee36c1017c3307265a7c88e54 Mon Sep 17 00:00:00 2001 From: Sergey Prigogin Date: Sun, 22 Aug 2010 20:54:51 +0000 Subject: [PATCH] Cosmetics. --- .../cdt/internal/core/model/CModelOperation.java | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelOperation.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelOperation.java index 84e16130974..c7ffa670830 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelOperation.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelOperation.java @@ -100,14 +100,15 @@ public abstract class CModelOperation implements IWorkspaceRunnable, IProgressMo /* * Whether the operation has modified resources, and thus whether resource - * delta notifcation will happen. + * delta notification will happen. */ protected boolean hasModifiedResource = false; /* * A per thread stack of java model operations (PerThreadObject of ArrayList). */ - protected final static ThreadLocal> operationStacks = new ThreadLocal>(); + protected final static ThreadLocal> operationStacks = + new ThreadLocal>(); protected CModelOperation() { } @@ -582,9 +583,7 @@ public abstract class CModelOperation implements IWorkspaceRunnable, IProgressMo */ protected boolean isTopLevelOperation() { ArrayList stack; - return - (stack = this.getCurrentOperationStack()).size() > 0 - && stack.get(0) == this; + return (stack = this.getCurrentOperationStack()).size() > 0 && stack.get(0) == this; } /** @@ -604,7 +603,7 @@ public abstract class CModelOperation implements IWorkspaceRunnable, IProgressMo } finally { try { registerDeltas(); - // Fire if we change somethings + // Fire if we change something if (isTopLevelOperation()) { if ((manager.fCModelDeltas.size() > previousDeltaCount || !manager.reconcileDeltas.isEmpty()) && !this.hasModifiedResource()) { @@ -630,7 +629,7 @@ public abstract class CModelOperation implements IWorkspaceRunnable, IProgressMo if (isReadOnly()) { run(monitor); } else { - // use IWorkspace.run(...) to ensure that a build will be done in autobuild mode + // use IWorkspace.run(...) to ensure that a build will be done in autobuild mode getCModel().getUnderlyingResource().getWorkspace() .run(this, getSchedulingRule(), IWorkspace.AVOID_UPDATE, monitor); } @@ -647,7 +646,6 @@ public abstract class CModelOperation implements IWorkspaceRunnable, IProgressMo } } - /** * @see IProgressMonitor */