use of org.pentaho.di.ui.spoon.trans.StepMenuExtension in project pentaho-kettle by pentaho.
the class SparkTuningPopupMenuExtensionPoint method callExtensionPoint.
@Override
public void callExtensionPoint(LogChannelInterface log, Object object) throws KettleException {
StepMenuExtension extension = (StepMenuExtension) object;
StepMeta stepMeta = extension.getTransGraph().getCurrentStep();
XulMenupopup menu = extension.getMenu();
List<String> tunableProperties = SparkTunableProperties.getProperties(stepMeta.getStepID());
menu.getElementById("trans-graph-entry-spark-tuning").setDisabled(tunableProperties.isEmpty());
}
use of org.pentaho.di.ui.spoon.trans.StepMenuExtension in project pdi-dataservice-server-plugin by pentaho.
the class DataServiceStepMenuExtension method callExtensionPoint.
@Override
public void callExtensionPoint(LogChannelInterface log, Object object) throws KettleException {
StepMenuExtension extension = (StepMenuExtension) object;
TransMeta transMeta = extension.getTransGraph().getTransMeta();
StepMeta stepMeta = extension.getTransGraph().getCurrentStep();
XulMenupopup menu = extension.getMenu();
DataServiceMeta dataService = metaStoreUtil.getDataServiceByStepName(transMeta, stepMeta.getName());
Boolean hasDataService = dataService != null && dataService.isUserDefined();
menu.getElementById("dataservices-new").setDisabled(hasDataService);
menu.getElementById("dataservices-edit").setDisabled(!hasDataService);
menu.getElementById("dataservices-delete").setDisabled(!hasDataService);
menu.getElementById("dataservices-test").setDisabled(!hasDataService);
}
Aggregations