}
}
private void loadUnresolvedDependencies() throws CoreException
{
ModelElementFactory factory = ModelElementFactory.getInstance();
IMarker[] markers = getProject().findMarkers(
SigilCore.MARKER_UNRESOLVED_DEPENDENCY, true, IResource.DEPTH_ONE);
unresolvedElements.clear();
for (IMarker marker : markers)
{
String elementName = (String) marker.getAttribute("element");
String versionRangeStr = (String) marker.getAttribute("versionRange");
if (elementName != null && versionRangeStr != null)
{
if (marker.getType().equals(SigilCore.MARKER_UNRESOLVED_IMPORT_PACKAGE))
{
IPackageImport pkgImport = factory.newModelElement(IPackageImport.class);
pkgImport.setPackageName(elementName);
pkgImport.setVersions(VersionRange.parseVersionRange(versionRangeStr));
unresolvedElements.add(pkgImport);
}
else if (marker.getType().equals(
SigilCore.MARKER_UNRESOLVED_REQUIRE_BUNDLE))
{
IRequiredBundle req = factory.newModelElement(IRequiredBundle.class);
req.setSymbolicName(elementName);
req.setVersions(VersionRange.parseVersionRange(versionRangeStr));
unresolvedElements.add(req);
}
}