本文整理汇总了Java中org.pentaho.di.core.database.DatabaseMeta.getExtraOptionsHelpText方法的典型用法代码示例。如果您正苦于以下问题:Java DatabaseMeta.getExtraOptionsHelpText方法的具体用法?Java DatabaseMeta.getExtraOptionsHelpText怎么用?Java DatabaseMeta.getExtraOptionsHelpText使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pentaho.di.core.database.DatabaseMeta
的用法示例。
在下文中一共展示了DatabaseMeta.getExtraOptionsHelpText方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getOptionHelp
import org.pentaho.di.core.database.DatabaseMeta; //导入方法依赖的package包/类
public void getOptionHelp() {
String message = null;
DatabaseMeta database = new DatabaseMeta();
getInfo(database);
String url = database.getExtraOptionsHelpText();
if ((url == null) || (url.trim().length() == 0)) {
message = Messages.getString("DataHandler.USER_NO_HELP_AVAILABLE"); //$NON-NLS-1$
showMessage(message, false);
return;
}
Status status = Launch.openURL(url);
if (status.equals(Status.Failed)) {
message = Messages.getString("DataHandler.USER_UNABLE_TO_LAUNCH_BROWSER", url); //$NON-NLS-1$
showMessage(message, false);
}
}
示例2: showOptionsHelpText
import org.pentaho.di.core.database.DatabaseMeta; //导入方法依赖的package包/类
private void showOptionsHelpText()
{
DatabaseMeta meta = new DatabaseMeta();
try
{
getInfo(meta);
String helpText = meta.getExtraOptionsHelpText();
if (Const.isEmpty(helpText)) return;
// Try to open a new tab in the Spoon editor.
// If spoon is not available, not in the classpath or can't open the tab, we show the URL in a dialog
//
boolean openedTab = false;
try
{
SpoonInterface spoon = SpoonFactory.getInstance();
if (spoon != null)
{
openedTab = spoon.addSpoonBrowser(Messages.getString("DatabaseDialog.JDBCOptions.Tab", meta.getDatabaseTypeDesc()), helpText);
}
}
catch (Throwable t)
{
}
if (!openedTab)
{
EnterTextDialog dialog = new EnterTextDialog(shell,
Messages.getString("DatabaseDialog.HelpText.title"), Messages.getString("DatabaseDialog.HelpText.description", meta.getDatabaseTypeDesc()), helpText, true); //$NON-NLS-1$ //$NON-NLS-2$
dialog.setReadOnly();
dialog.open();
}
}
catch (KettleException e)
{
new ErrorDialog(shell,
Messages.getString("DatabaseDialog.ErrorHelpText.title"), Messages.getString("DatabaseDialog.ErrorHelpText.description"), e); //$NON-NLS-1$ //$NON-NLS-2$
}
}