mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Cosmetics.
This commit is contained in:
parent
a3f2dca464
commit
f9be7ba9d5
1 changed files with 10 additions and 8 deletions
|
@ -244,7 +244,6 @@ public class PDOM extends PlatformObject implements IPDOM {
|
||||||
fFilesWritten.clear();
|
fFilesWritten.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public boolean isCleared() {
|
public boolean isCleared() {
|
||||||
return fCleared;
|
return fCleared;
|
||||||
}
|
}
|
||||||
|
@ -269,6 +268,7 @@ public class PDOM extends PlatformObject implements IPDOM {
|
||||||
return !fCleared && !fReloaded && !fNewFiles && fClearedFiles.isEmpty() && fFilesWritten.isEmpty();
|
return !fCleared && !fReloaded && !fNewFiles && fClearedFiles.isEmpty() && fFilesWritten.isEmpty();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static interface IListener {
|
public static interface IListener {
|
||||||
public void handleChange(PDOM pdom, ChangeEvent event);
|
public void handleChange(PDOM pdom, ChangeEvent event);
|
||||||
}
|
}
|
||||||
|
@ -516,7 +516,7 @@ public class PDOM extends PlatformObject implements IPDOM {
|
||||||
throw new CoreException(Status.OK_STATUS);
|
throw new CoreException(Status.OK_STATUS);
|
||||||
|
|
||||||
if (node instanceof PDOMNamedNode) {
|
if (node instanceof PDOMNamedNode) {
|
||||||
PDOMNamedNode nnode = (PDOMNamedNode)node;
|
PDOMNamedNode nnode = (PDOMNamedNode) node;
|
||||||
String name = new String(nnode.getNameCharArray());
|
String name = new String(nnode.getNameCharArray());
|
||||||
|
|
||||||
// check if we have a complete match.
|
// check if we have a complete match.
|
||||||
|
@ -1168,7 +1168,7 @@ public class PDOM extends PlatformObject implements IPDOM {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object getCachedResult(Object key) {
|
public Object getCachedResult(Object key) {
|
||||||
synchronized(fResultCache) {
|
synchronized (fResultCache) {
|
||||||
return fResultCache.get(key);
|
return fResultCache.get(key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1178,7 +1178,7 @@ public class PDOM extends PlatformObject implements IPDOM {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object putCachedResult(Object key, Object result, boolean replace) {
|
public Object putCachedResult(Object key, Object result, boolean replace) {
|
||||||
synchronized(fResultCache) {
|
synchronized (fResultCache) {
|
||||||
Object old= fResultCache.put(key, result);
|
Object old= fResultCache.put(key, result);
|
||||||
if (old != null && !replace) {
|
if (old != null && !replace) {
|
||||||
fResultCache.put(key, old);
|
fResultCache.put(key, old);
|
||||||
|
@ -1189,13 +1189,13 @@ public class PDOM extends PlatformObject implements IPDOM {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeCachedResult(Object key) {
|
public void removeCachedResult(Object key) {
|
||||||
synchronized(fResultCache) {
|
synchronized (fResultCache) {
|
||||||
fResultCache.remove(key);
|
fResultCache.remove(key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public String createKeyForCache(long record, char[] name) {
|
public String createKeyForCache(long record, char[] name) {
|
||||||
return new StringBuilder(name.length+2).append((char) (record >> 16)).append((char) record).append(name).toString();
|
return new StringBuilder(name.length + 2).append((char) (record >> 16)).append((char) record).append(name).toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
private PDOMBinding[] getCrossLanguageBindings(IBinding binding) throws CoreException {
|
private PDOMBinding[] getCrossLanguageBindings(IBinding binding) throws CoreException {
|
||||||
|
@ -1340,7 +1340,7 @@ public class PDOM extends PlatformObject implements IPDOM {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
} catch (DOMException e1) {
|
} catch (DOMException e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (filter != null) {
|
if (filter != null) {
|
||||||
|
@ -1360,6 +1360,7 @@ public class PDOM extends PlatformObject implements IPDOM {
|
||||||
int fReadLocks;
|
int fReadLocks;
|
||||||
int fWriteLocks;
|
int fWriteLocks;
|
||||||
List<StackTraceElement[]> fTraces= new ArrayList<StackTraceElement[]>();
|
List<StackTraceElement[]> fTraces= new ArrayList<StackTraceElement[]>();
|
||||||
|
|
||||||
public int addTrace() {
|
public int addTrace() {
|
||||||
fTraces.add(Thread.currentThread().getStackTrace());
|
fTraces.add(Thread.currentThread().getStackTrace());
|
||||||
return fTraces.size();
|
return fTraces.size();
|
||||||
|
@ -1380,6 +1381,7 @@ public class PDOM extends PlatformObject implements IPDOM {
|
||||||
fTraces.addAll(val.fTraces);
|
fTraces.addAll(val.fTraces);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// For debugging lock issues
|
// For debugging lock issues
|
||||||
private Map<Thread, DebugLockInfo> fLockDebugging;
|
private Map<Thread, DebugLockInfo> fLockDebugging;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue