1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Cosmetics.

This commit is contained in:
Sergey Prigogin 2010-08-22 20:54:51 +00:00
parent ad3552fcce
commit 12d5105085

View file

@ -100,14 +100,15 @@ public abstract class CModelOperation implements IWorkspaceRunnable, IProgressMo
/* /*
* Whether the operation has modified resources, and thus whether resource * Whether the operation has modified resources, and thus whether resource
* delta notifcation will happen. * delta notification will happen.
*/ */
protected boolean hasModifiedResource = false; protected boolean hasModifiedResource = false;
/* /*
* A per thread stack of java model operations (PerThreadObject of ArrayList). * A per thread stack of java model operations (PerThreadObject of ArrayList).
*/ */
protected final static ThreadLocal<ArrayList<CModelOperation>> operationStacks = new ThreadLocal<ArrayList<CModelOperation>>(); protected final static ThreadLocal<ArrayList<CModelOperation>> operationStacks =
new ThreadLocal<ArrayList<CModelOperation>>();
protected CModelOperation() { protected CModelOperation() {
} }
@ -582,9 +583,7 @@ public abstract class CModelOperation implements IWorkspaceRunnable, IProgressMo
*/ */
protected boolean isTopLevelOperation() { protected boolean isTopLevelOperation() {
ArrayList<CModelOperation> stack; ArrayList<CModelOperation> stack;
return return (stack = this.getCurrentOperationStack()).size() > 0 && stack.get(0) == this;
(stack = this.getCurrentOperationStack()).size() > 0
&& stack.get(0) == this;
} }
/** /**
@ -604,7 +603,7 @@ public abstract class CModelOperation implements IWorkspaceRunnable, IProgressMo
} finally { } finally {
try { try {
registerDeltas(); registerDeltas();
// Fire if we change somethings // Fire if we change something
if (isTopLevelOperation()) { if (isTopLevelOperation()) {
if ((manager.fCModelDeltas.size() > previousDeltaCount || !manager.reconcileDeltas.isEmpty()) if ((manager.fCModelDeltas.size() > previousDeltaCount || !manager.reconcileDeltas.isEmpty())
&& !this.hasModifiedResource()) { && !this.hasModifiedResource()) {
@ -630,7 +629,7 @@ public abstract class CModelOperation implements IWorkspaceRunnable, IProgressMo
if (isReadOnly()) { if (isReadOnly()) {
run(monitor); run(monitor);
} else { } 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() getCModel().getUnderlyingResource().getWorkspace()
.run(this, getSchedulingRule(), IWorkspace.AVOID_UPDATE, monitor); .run(this, getSchedulingRule(), IWorkspace.AVOID_UPDATE, monitor);
} }
@ -647,7 +646,6 @@ public abstract class CModelOperation implements IWorkspaceRunnable, IProgressMo
} }
} }
/** /**
* @see IProgressMonitor * @see IProgressMonitor
*/ */