Search in sources :

Example 1 with ParserMessagesPopup

use of org.drools.workbench.screens.guided.dtree.client.widget.popups.ParserMessagesPopup in project drools-wb by kiegroup.

the class GuidedDecisionTreeEditorPresenter method getModelSuccessCallback.

private RemoteCallback<GuidedDecisionTreeEditorContent> getModelSuccessCallback() {
    return new RemoteCallback<GuidedDecisionTreeEditorContent>() {

        @Override
        public void callback(final GuidedDecisionTreeEditorContent content) {
            // Path is set to null when the Editor is closed (which can happen before async calls complete).
            if (versionRecordManager.getCurrentPath() == null) {
                return;
            }
            GuidedDecisionTreeEditorPresenter.this.content = content;
            model = content.getModel();
            metadata = content.getOverview().getMetadata();
            final PackageDataModelOracleBaselinePayload dataModel = content.getDataModel();
            oracle = oracleFactory.makeAsyncPackageDataModelOracle(versionRecordManager.getCurrentPath(), model, dataModel);
            resetEditorPages(content.getOverview());
            addSourcePage();
            addImportsTab(importsWidget);
            importsWidget.setContent(oracle, model.getImports(), isReadOnly);
            view.setModel(model, isReadOnly);
            view.setDataModel(oracle, isReadOnly);
            view.hideBusyIndicator();
            // If there were any parsing errors give the User the option to remove the broken DRL or ignore it
            if (!model.getParserErrors().isEmpty()) {
                final ParserMessagesPopup popup = new ParserMessagesPopup(model);
                popup.show();
            }
            createOriginalHash(model);
        }
    };
}
Also used : PackageDataModelOracleBaselinePayload(org.kie.workbench.common.services.datamodel.model.PackageDataModelOracleBaselinePayload) ParserMessagesPopup(org.drools.workbench.screens.guided.dtree.client.widget.popups.ParserMessagesPopup) RemoteCallback(org.jboss.errai.common.client.api.RemoteCallback) GuidedDecisionTreeEditorContent(org.drools.workbench.screens.guided.dtree.model.GuidedDecisionTreeEditorContent)

Aggregations

ParserMessagesPopup (org.drools.workbench.screens.guided.dtree.client.widget.popups.ParserMessagesPopup)1 GuidedDecisionTreeEditorContent (org.drools.workbench.screens.guided.dtree.model.GuidedDecisionTreeEditorContent)1 RemoteCallback (org.jboss.errai.common.client.api.RemoteCallback)1 PackageDataModelOracleBaselinePayload (org.kie.workbench.common.services.datamodel.model.PackageDataModelOracleBaselinePayload)1