use of org.eclipse.tycho.core.osgitools.targetplatform.ArtifactCollection in project tycho by eclipse.
the class DevWorkspaceResolver method initialize.
@Override
public void initialize() throws InitializationException {
Map<File, String> workspaceDeventries = new HashMap<>();
Map<File, File> workspaceBasedirs = new HashMap<>();
ArtifactCollection workspaceBundles = new ArtifactCollection();
String stateLocation = System.getProperty(SYSPROP_STATELOCATION);
if (stateLocation != null) {
Properties properties = loadWorkspaceState(new File(stateLocation, FILE_WORKSPACESTATE));
for (Object key : properties.keySet()) {
String stringKey = (String) key;
if (stringKey.endsWith(SUFFIX_LOCATION)) {
DefaultArtifactKey artifactKey = toArtifactKey(stringKey);
File location = toLocation(properties.getProperty(stringKey));
workspaceBundles.addArtifactFile(artifactKey, location, null);
// workspace projects
// normalize
stringKey = toStringKey(artifactKey);
String basedir = properties.getProperty(stringKey + SUFFIX_BASEDIR);
if (basedir != null) {
workspaceBasedirs.put(new File(basedir), location);
String deventries = properties.getProperty(stringKey + SUFFIX_ENTRIES);
if (deventries != null) {
workspaceDeventries.put(location, deventries);
}
}
}
}
this.stateLocation = new File(stateLocation);
}
this.workspaceBundles = workspaceBundles;
this.workspaceBasedirs = Collections.unmodifiableMap(workspaceBasedirs);
this.workspaceDeventries = Collections.unmodifiableMap(workspaceDeventries);
}
Aggregations