本文整理汇总了Java中org.eclipse.jface.wizard.WizardDialog.setHelpAvailable方法的典型用法代码示例。如果您正苦于以下问题:Java WizardDialog.setHelpAvailable方法的具体用法?Java WizardDialog.setHelpAvailable怎么用?Java WizardDialog.setHelpAvailable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.jface.wizard.WizardDialog
的用法示例。
在下文中一共展示了WizardDialog.setHelpAvailable方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doEditFormula
import org.eclipse.jface.wizard.WizardDialog; //导入方法依赖的package包/类
/**
* Opens a dialog for formula processing and returns the edited formula
* @param formula initial formula, can be <code>null</code>
* @return result of editing or <code>null</code>, if editing canceled
*/
protected Formula doEditFormula(Formula formula)
{
// Create the wizard
FormulaWizard wizard = new FormulaWizard(section.getText(), section.getDescription());
wizard.setFormula(formula);
// Create the wizard dialog
WizardDialog dialog = new WizardDialog(getTableViewer().getTable().getShell(), wizard);
dialog.setHelpAvailable(true);
// Open the wizard dialog
if (Window.OK == dialog.open())
{
return wizard.getFormula();
} else
{
return null;
}
}
示例2: doEditFormula
import org.eclipse.jface.wizard.WizardDialog; //导入方法依赖的package包/类
protected Assignment doEditFormula(Assignment formula) // gets called when editing a constant and ...
{
Assert.isNotNull(formula);
// Create the wizard
AssignmentWizard wizard = new AssignmentWizard(getSection().getText(), getSection().getDescription(),
(Assignment) formula, AssignmentWizard.SHOW_OPTION, AssignmentWizardPage.CONSTANT_WIZARD_ID);
// Create the wizard dialog
WizardDialog dialog = new WizardDialog(getTableViewer().getTable().getShell(), wizard);
wizard.setWizardDialog(dialog);
dialog.setHelpAvailable(true);
// Open the wizard dialog
if (Window.OK == dialog.open())
{
return wizard.getFormula();
} else
{
return null; // We get here if the user cancels.
}
}
示例3: doEditFormula
import org.eclipse.jface.wizard.WizardDialog; //导入方法依赖的package包/类
/**
* Opens a dialog for formula processing and returns the edited formula
* @param formula initial formula, can be <code>null</code>
* @return result of editing or <code>null</code>, if editing canceled
*/
protected Formula doEditFormula(Formula formula)
{
// Create the wizard
FormulaWizard wizard = new FormulaWizard(getSection().getText(), getSection().getDescription());
wizard.setFormula(formula);
// Create the wizard dialog
WizardDialog dialog = new WizardDialog(getTableViewer().getTable().getShell(), wizard);
dialog.setHelpAvailable(true);
// Open the wizard dialog
if (Window.OK == dialog.open())
{
return wizard.getFormula();
} else
{
return null;
}
}
示例4: doFindResource
import org.eclipse.jface.wizard.WizardDialog; //导入方法依赖的package包/类
public static void doFindResource(ServerProvider sp, TreeViewer treeViewer) {
TreeSelection ts = (TreeSelection) treeViewer.getSelection();
Object el = ts.getFirstElement();
MServerProfile msp = null;
if (el instanceof MServerProfile)
msp = (MServerProfile) el;
else if (el instanceof MResource) {
INode n = ((MResource) el).getRoot();
if (n != null && n instanceof MServerProfile)
msp = (MServerProfile) n;
}
if (msp != null) {
FindResourceWizard wizard = new FindResourceWizard(msp);
WizardDialog dialog = new FindWizardDialog(UIUtils.getShell(), wizard);
dialog.setHelpAvailable(false);
dialog.create();
if (dialog.open() == Dialog.OK) {
ResourceDescriptor rd = wizard.getValue();
if (rd != null)
selectResource(sp, msp, rd, treeViewer);
}
}
}
示例5: execute
import org.eclipse.jface.wizard.WizardDialog; //导入方法依赖的package包/类
/**
* @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
*/
public Object execute(ExecutionEvent event) throws ExecutionException
{
IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindowChecked(event);
// Create the wizard
NewSpecWizard wizard = new NewSpecWizard(event.getParameter(PARAM_PATH));
// we pass null for structured selection, cause we just not using it
wizard.init(window.getWorkbench(), null);
Shell parentShell = window.getShell();
// Create the wizard dialog
WizardDialog dialog = new WizardDialog(parentShell, wizard);
dialog.setHelpAvailable(true);
// Open the wizard dialog
if (Window.OK == dialog.open() && wizard.getRootFilename() != null)
{
// read UI values from the wizard page
final boolean importExisting = wizard.isImportExisting();
final String specName = wizard.getSpecName();
final String rootFilename = wizard.getRootFilename();
// the moment the user clicks finish on the wizard page does
// not correspond with the availability of the spec object
// it first has to be created/parsed fully before it can be shown in
// the editor. Thus, delay opening the editor until parsing is done.
createModuleAndSpecInNonUIThread(rootFilename, importExisting, specName);
}
return null;
}