Search in sources :

Example 1 with AppCache

use of org.openlca.app.db.AppCache in project olca-app by GreenDelta.

the class MappingTool method open.

public static void open(FlowMap mapping) {
    if (mapping == null)
        return;
    String uid = mapping.refId;
    if (uid == null) {
        uid = UUID.randomUUID().toString();
        mapping.refId = uid;
    }
    AppCache cache = Cache.getAppCache();
    var cacheID = uid + " /mapping";
    cache.put(cacheID, mapping);
    Editors.open(new SimpleEditorInput(cacheID, "Flow mapping"), "MappingTool");
}
Also used : SimpleEditorInput(org.openlca.app.editors.SimpleEditorInput) AppCache(org.openlca.app.db.AppCache)

Aggregations

AppCache (org.openlca.app.db.AppCache)1 SimpleEditorInput (org.openlca.app.editors.SimpleEditorInput)1