use of org.drools.workbench.screens.guided.scorecard.model.ScoreCardModelContent in project drools-wb by kiegroup.
the class GuidedScoreCardEditorPresenter method getModelSuccessCallback.
private RemoteCallback<ScoreCardModelContent> getModelSuccessCallback() {
return new RemoteCallback<ScoreCardModelContent>() {
@Override
public void callback(final ScoreCardModelContent content) {
// Path is set to null when the Editor is closed (which can happen before async calls complete).
if (versionRecordManager.getCurrentPath() == null) {
return;
}
model = content.getModel();
final PackageDataModelOracleBaselinePayload dataModel = content.getDataModel();
oracle = oracleFactory.makeAsyncPackageDataModelOracle(versionRecordManager.getCurrentPath(), model, dataModel);
resetEditorPages(content.getOverview());
addSourcePage();
addImportsTab(importsWidget);
view.setContent(model, oracle);
importsWidget.setContent(oracle, model.getImports(), isReadOnly);
createOriginalHash(model);
view.hideBusyIndicator();
}
};
}
use of org.drools.workbench.screens.guided.scorecard.model.ScoreCardModelContent in project drools-wb by kiegroup.
the class GuidedScoreCardEditorServiceImpl method constructContent.
@Override
protected ScoreCardModelContent constructContent(Path path, Overview overview) {
final ScoreCardModel model = load(path);
final PackageDataModelOracle oracle = dataModelService.getDataModel(path);
final PackageDataModelOracleBaselinePayload dataModel = new PackageDataModelOracleBaselinePayload();
final GuidedScoreCardModelVisitor visitor = new GuidedScoreCardModelVisitor(model);
DataModelOracleUtilities.populateDataModel(oracle, dataModel, visitor.getConsumedModelClasses());
// Signal opening to interested parties
resourceOpenedEvent.fire(new ResourceOpenedEvent(path, safeSessionInfo));
return new ScoreCardModelContent(model, overview, dataModel);
}
Aggregations