1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-28 19:35:36 +02:00

Cosmetics.

This commit is contained in:
Sergey Prigogin 2010-01-04 04:15:56 +00:00
parent 6b3cb99622
commit ced5f1b42c
2 changed files with 9 additions and 10 deletions

View file

@ -51,9 +51,9 @@ public class PDOMProxy implements IPDOM {
} }
} }
public synchronized void acquireReadLock() throws InterruptedException { public synchronized void acquireReadLock() throws InterruptedException {
if (fDelegate != null) if (fDelegate != null) {
fDelegate.acquireReadLock(); fDelegate.acquireReadLock();
else { } else {
fReadLockCount++; fReadLockCount++;
if (PDOM.sDEBUG_LOCKS) { if (PDOM.sDEBUG_LOCKS) {
PDOM.incReadLock(fLockDebugging); PDOM.incReadLock(fLockDebugging);
@ -201,9 +201,9 @@ public class PDOMProxy implements IPDOM {
} }
public synchronized void addListener(IListener listener) { public synchronized void addListener(IListener listener) {
if (fDelegate != null) if (fDelegate != null) {
fDelegate.addListener(listener); fDelegate.addListener(listener);
else { } else {
fListeners.add(listener); fListeners.add(listener);
} }
} }
@ -216,9 +216,9 @@ public class PDOMProxy implements IPDOM {
} }
public synchronized void removeListener(IListener listener) { public synchronized void removeListener(IListener listener) {
if (fDelegate != null) if (fDelegate != null) {
fDelegate.removeListener(listener); fDelegate.removeListener(listener);
else { } else {
fListeners.remove(listener); fListeners.remove(listener);
} }
} }

View file

@ -170,8 +170,7 @@ abstract public class PDOMWriter {
String path= null; String path= null;
if (ifls.length > 0) { if (ifls.length > 0) {
path= ifls[ifls.length-1].getURI().getPath(); path= ifls[ifls.length-1].getURI().getPath();
} } else {
else {
path= ast.getFilePath().toString(); path= ast.getFilePath().toString();
} }
String msg= NLS.bind(Messages.PDOMWriter_errorWhileParsing, path); String msg= NLS.bind(Messages.PDOMWriter_errorWhileParsing, path);
@ -501,7 +500,7 @@ abstract public class PDOMWriter {
* Updates current progress information with the provided delta. * Updates current progress information with the provided delta.
*/ */
protected final void updateFileCount(int sources, int primaryHeader, int header) { protected final void updateFileCount(int sources, int primaryHeader, int header) {
synchronized(fInfo) { synchronized (fInfo) {
fInfo.fCompletedSources += sources; fInfo.fCompletedSources += sources;
fInfo.fPrimaryHeaderCount += primaryHeader; fInfo.fPrimaryHeaderCount += primaryHeader;
fInfo.fCompletedHeaders += header; fInfo.fCompletedHeaders += header;
@ -512,7 +511,7 @@ abstract public class PDOMWriter {
* Updates current progress information with the provided delta. * Updates current progress information with the provided delta.
*/ */
protected final void updateRequestedFiles(int delta) { protected final void updateRequestedFiles(int delta) {
synchronized(fInfo) { synchronized (fInfo) {
fInfo.fRequestedFilesCount+= delta; fInfo.fRequestedFilesCount+= delta;
} }
} }