本文整理匯總了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$
}
}