use of org.eclipse.winery.repository.datatypes.ids.elements.VisualAppearanceId in project winery by eclipse.
the class ToscaExportUtil method addVisualAppearanceToCSAR.
private void addVisualAppearanceToCSAR(IRepository repository, TopologyGraphElementEntityTypeId id) {
VisualAppearanceId visId = new VisualAppearanceId(id);
if (repository.exists(visId)) {
// we do NOT check for the id, but simply check for bigIcon.png (only exists in NodeType) and smallIcon.png (exists in NodeType and RelationshipType)
RepositoryFileReference ref = new RepositoryFileReference(visId, Filename.FILENAME_BIG_ICON);
if (repository.exists(ref)) {
this.referencesToPathInCSARMap.put(ref, BackendUtils.getPathInsideRepo(ref));
}
ref = new RepositoryFileReference(visId, Filename.FILENAME_SMALL_ICON);
if (repository.exists(ref)) {
this.referencesToPathInCSARMap.put(ref, BackendUtils.getPathInsideRepo(ref));
}
}
}
use of org.eclipse.winery.repository.datatypes.ids.elements.VisualAppearanceId in project winery by eclipse.
the class CsarImporter method adjustRelationshipType.
/**
* Adds a color to the given relationship type
*/
private void adjustRelationshipType(Path rootPath, TRelationshipType ci, RelationshipTypeId wid, TOSCAMetaFile tmf, final List<String> errors) {
VisualAppearanceId visId = new VisualAppearanceId(wid);
this.importIcons(rootPath, visId, tmf, errors);
}
use of org.eclipse.winery.repository.datatypes.ids.elements.VisualAppearanceId in project winery by eclipse.
the class CsarImporter method adjustNodeType.
private void adjustNodeType(Path rootPath, TNodeType ci, NodeTypeId wid, TOSCAMetaFile tmf, final List<String> errors) {
VisualAppearanceId visId = new VisualAppearanceId(wid);
this.importIcons(rootPath, visId, tmf, errors);
}
Aggregations