// the program contains the module but the workspace doesn't, so we cannot process it
continue;
}
ModuleNameResolver moduleNameResolver = workspaceManager.getModuleTypeInfo(moduleName).getModuleNameResolver();
GemDesignManager designManager = (GemDesignManager)workspace.getResourceManager(moduleName, WorkspaceResource.GEM_DESIGN_RESOURCE_TYPE);
// loop through the resources for this module
for (Iterator<WorkspaceResource> it = ((GemDesignStore)designManager.getResourceStore()).getResourceIterator(moduleName); it.hasNext(); ) {
WorkspaceResource designResource = it.next();
GemDesign gemDesign = GemDesign.loadGemDesign(designResource, new Status("Load Design Status"));
Document designDoc = gemDesign.getDesignDocument();
Document oldDesignDoc = (Document)designDoc.cloneNode(true);
boolean changesMade = updateDesignDocument(designDoc, gemDesign.getDesignName(), moduleNameResolver);
if (changesMade) {
if (!designManager.getResourceStore().isWriteable(new ResourceName(CALFeatureName.getFunctionFeatureName(gemDesign.getDesignName())))) {
throw new RenamingException("Can not update the design for " + gemDesign.getDesignName().getQualifiedName() + " because it is not writeable.");
}
Status saveGemStatus = new Status("Save gem design status");