mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
provide a sourcemapper per project
This commit is contained in:
parent
d0d01cd58e
commit
43fdcb2dc6
1 changed files with 16 additions and 0 deletions
|
@ -93,6 +93,11 @@ public class CModelManager implements IResourceChangeListener {
|
|||
* The list of started BinaryRunners on projects.
|
||||
*/
|
||||
private HashMap binaryRunners = new HashMap();
|
||||
|
||||
/**
|
||||
* The lis of the SourceMappers on projects.
|
||||
*/
|
||||
private HashMap sourceMappers = new HashMap();
|
||||
|
||||
public static final String [] sourceExtensions = {"c", "cxx", "cc", "C", "cpp"};
|
||||
|
||||
|
@ -498,6 +503,17 @@ public class CModelManager implements IResourceChangeListener {
|
|||
return runner;
|
||||
}
|
||||
|
||||
public SourceMapper getSourceMapper(ICProject cProject) {
|
||||
SourceMapper mapper = null;
|
||||
synchronized(sourceMappers) {
|
||||
mapper = (SourceMapper) sourceMappers.get(cProject);
|
||||
if (mapper == null) {
|
||||
mapper = new SourceMapper(cProject);
|
||||
sourceMappers.put(cProject, mapper);
|
||||
}
|
||||
}
|
||||
return mapper;
|
||||
}
|
||||
/**
|
||||
* addElementChangedListener method comment.
|
||||
*/
|
||||
|
|
Loading…
Add table
Reference in a new issue