use of org.springsource.ide.eclipse.commons.content.core.util.Descriptor in project eclipse-integration-commons by spring-projects.
the class ContentManager method read.
private void read(File file) throws CoreException {
DescriptorMatcher matcher = new DescriptorMatcher(this);
DescriptorReader reader = new DescriptorReader();
reader.read(file);
List<Descriptor> descriptors = reader.getDescriptors();
for (Descriptor descriptor : descriptors) {
if (!matcher.match(descriptor)) {
continue;
}
ContentItem item = itemById.get(descriptor.getId());
if (item == null) {
item = createItem(descriptor);
if (item != null) {
itemById.put(item.getId(), item);
}
}
if (item != null) {
if (descriptor.isLocal()) {
item.setLocalDescriptor(descriptor);
} else {
item.setRemoteDescriptor(descriptor);
}
}
}
}
use of org.springsource.ide.eclipse.commons.content.core.util.Descriptor in project eclipse-integration-commons by spring-projects.
the class DescriptorMatcherTest method setUp.
@Override
protected void setUp() throws Exception {
descriptor = new Descriptor();
System.setProperty("org.springsource.sts", "abc");
matcher = new DescriptorMatcher(new ContentManager());
matcher.setVersion(null);
}
Aggregations