Search in sources :

Example 1 with ProjectResultData

use of org.openlca.app.editors.projects.ProjectResultData in project olca-app by GreenDelta.

the class ProjectResultEditor method init.

@Override
public void init(IEditorSite site, IEditorInput input) throws PartInitException {
    super.init(site, input);
    var simpleInput = (SimpleEditorInput) input;
    var obj = Cache.getAppCache().remove(simpleInput.id);
    if (!(obj instanceof ProjectResultData))
        throw new PartInitException("editor input must be a project result");
    data = (ProjectResultData) obj;
    setPartName("Result of: " + Labels.name(data.project()));
}
Also used : SimpleEditorInput(org.openlca.app.editors.SimpleEditorInput) PartInitException(org.eclipse.ui.PartInitException) ProjectResultData(org.openlca.app.editors.projects.ProjectResultData)

Aggregations

PartInitException (org.eclipse.ui.PartInitException)1 SimpleEditorInput (org.openlca.app.editors.SimpleEditorInput)1 ProjectResultData (org.openlca.app.editors.projects.ProjectResultData)1