本文整理汇总了Java中org.eclipse.jface.wizard.WizardDialog.open方法的典型用法代码示例。如果您正苦于以下问题:Java WizardDialog.open方法的具体用法?Java WizardDialog.open怎么用?Java WizardDialog.open使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.jface.wizard.WizardDialog
的用法示例。
在下文中一共展示了WizardDialog.open方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: openSubJobSaveDialog
import org.eclipse.jface.wizard.WizardDialog; //导入方法依赖的package包/类
/**
* Open sub graph save dialog.
*
* @return the i file
*/
public IFile openSubJobSaveDialog() {
IFile iFile = null;
IWizardDescriptor descriptor = PlatformUI.getWorkbench().getNewWizardRegistry().findWizard(Messages.JOB_WIZARD_ID);
if (descriptor != null) {
IWizard wizard = null;
try {
wizard = descriptor.createWizard();
} catch (CoreException coreException) {
logger.error("Error while opening create job wizard", coreException);
}
WizardDialog wizardDialog = new WizardDialog(Display.getDefault().getActiveShell(), wizard);
wizardDialog.setTitle(wizard.getWindowTitle());
wizardDialog.open();
JobCreationPage jobCreationPage = (JobCreationPage) wizardDialog.getSelectedPage();
iFile = jobCreationPage.getNewFile();
}
return iFile;
}
示例2: execute
import org.eclipse.jface.wizard.WizardDialog; //导入方法依赖的package包/类
public Object execute(ExecutionEvent event) throws ExecutionException {
ISelection sel = HandlerUtil.getCurrentSelection(event);
if (sel.isEmpty())
return null;
if (!(sel instanceof IStructuredSelection))
return null;
Object obj = ((IStructuredSelection) sel).getFirstElement();
if (!(obj instanceof IFile))
return null;
try {
ConvertToFileCreationWizard wizard = new ConvertToFileCreationWizard( );
wizard.init(PlatformUI.getWorkbench(), (IStructuredSelection)sel);
Shell activeShell = HandlerUtil.getActiveShell(event);
if (activeShell==null) return null;
WizardDialog dialog = new WizardDialog(activeShell,wizard);
dialog.open();
} catch (Exception e) {
ResourceManager.logException(e);
}
return null;
}
示例3: execute
import org.eclipse.jface.wizard.WizardDialog; //导入方法依赖的package包/类
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
IWizardDescriptor descriptor = PlatformUI.getWorkbench().getNewWizardRegistry().findWizard(ID);
if (descriptor == null) {
descriptor = PlatformUI.getWorkbench().getImportWizardRegistry().findWizard(ID);
}
if (descriptor == null) {
descriptor = PlatformUI.getWorkbench().getExportWizardRegistry().findWizard(ID);
}
try {
if (descriptor != null) {
IWizard wizard = descriptor.createWizard();
WizardDialog wd = new WizardDialog(Display.getDefault().getActiveShell(), wizard);
wd.setTitle(wizard.getWindowTitle());
wd.open();
}
} catch (CoreException e) {
e.printStackTrace();
}
return null;
}
示例4: runSetup
import org.eclipse.jface.wizard.WizardDialog; //导入方法依赖的package包/类
public static boolean runSetup() {
Display display = Display.getDefault();
WizardDialog wizardDialog = new WizardDialog(display.getActiveShell(), new SetupWizard()) {
@Override
protected void configureShell(Shell shell) {
super.configureShell(shell);
shell.setSize(730, 700);
setReturnCode(WizardDialog.CANCEL);
}
};
int ret = wizardDialog.open();
return ret == WizardDialog.OK;
}
示例5: createCriteriasFromSelection
import org.eclipse.jface.wizard.WizardDialog; //导入方法依赖的package包/类
public void createCriteriasFromSelection(Document dom) throws EngineException {
String className = "com.twinsoft.convertigo.beans.core.Criteria";
// Retrieve selected criterias xpath
String criteriaXpath = xpathEvaluator.getSelectionXpath();
// Retrieve parent ScreenClass
HtmlScreenClass parentObject = getParentHtmlScreenClass();
NewObjectWizard newObjectWizard = new NewObjectWizard(parentObject, className, criteriaXpath, dom);
WizardDialog wzdlg = new WizardDialog(Display.getCurrent().getActiveShell(), newObjectWizard);
wzdlg.setPageSize(850, 650);
wzdlg.open();
if (wzdlg.getReturnCode() != Window.CANCEL) {
Criteria criteria = (Criteria)newObjectWizard.newBean;
// Reload parent ScreenClass in Tree
fireObjectChanged(new CompositeEvent(parentObject));
// Set selection on last created criteria (will expand tree to new criteria)
if (criteria != null) fireObjectSelected(new CompositeEvent(criteria));
// Set back selection on parent ScreenClass
fireObjectSelected(new CompositeEvent(parentObject));
}
}
示例6: run
import org.eclipse.jface.wizard.WizardDialog; //导入方法依赖的package包/类
@Override
public IStatus run() {
final AddFilesWizard wizard = new AddFilesWizard(startingBrowseLocalPath, startingBrowseServerPath);
final WizardDialog dialog = new WizardDialog(getShell(), wizard);
if (dialog.open() != IDialogConstants.OK_ID) {
return Status.CANCEL_STATUS;
}
final String[] addPaths = wizard.getLocalPaths();
if (addPaths.length == 0) {
return Status.OK_STATUS;
}
final AddCommand command = new AddCommand(repository, addPaths);
return getCommandExecutor().execute(command);
}
示例7: connectToServer
import org.eclipse.jface.wizard.WizardDialog; //导入方法依赖的package包/类
public static void connectToServer(final Shell shell) {
final TFSProductPlugin plugin = TFSCommonUIClientPlugin.getDefault().getProductPlugin();
final ITeamProjectWizard wizard = plugin.getTeamProjectWizard();
final WizardDialog dialog = new WizardDialog(shell, wizard);
if (dialog.open() == IDialogConstants.OK_ID) {
final TFSServer defaultServer = plugin.getServerManager().getDefaultServer();
final TFSRepository[] repositories = plugin.getRepositoryManager().getRepositories();
if (defaultServer != null) {
defaultServer.refresh(true);
}
for (int i = 0; i < repositories.length; i++) {
repositories[i].getPendingChangeCache().refresh();
}
}
}
示例8: getCreateButtonSelectionListener
import org.eclipse.jface.wizard.WizardDialog; //导入方法依赖的package包/类
@Override
protected SelectionListener getCreateButtonSelectionListener(final Shell shell) {
return new SelectionAdapter() {
@Override
public void widgetSelected(final SelectionEvent e) {
final CreateBuildConfigurationWizard wizard = new CreateBuildConfigurationWizard();
// update the build definition to contain values as
// currently defined, that way
// information inside is available in the creation wizard.
updateAndVerifyBuildDefinition(true);
wizard.init(buildDefinition);
final WizardDialog dialog = new WizardDialog(getShell(), wizard);
final int rc = dialog.open();
if (rc == IDialogConstants.OK_ID) {
checkForBuildFileExistence(true);
validate();
}
}
};
}
示例9: 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.
}
}
示例10: doRun
import org.eclipse.jface.wizard.WizardDialog; //导入方法依赖的package包/类
@Override
public void doRun(final IAction action) {
if (items == null) {
return;
}
final TfsImportWizard importWizard = new TfsImportWizard();
// Add current selected folders as selection.
final String[] importFolders = new String[items.length];
for (int i = 0; i < importFolders.length; i++) {
importFolders[i] = items[i].getFullPath();
}
importWizard.setImportFolders(importFolders);
importWizard.init(getWorkbenchWindow().getWorkbench(), null);
final WizardDialog dialog = new WizardDialog(getShell(), importWizard);
dialog.open();
}
示例11: execute
import org.eclipse.jface.wizard.WizardDialog; //导入方法依赖的package包/类
@Override
public void execute() {
if (newChart == null) {
JRDesignComponentElement clone = (JRDesignComponentElement) oldChart
.clone();
SpiderChartComponent scc = (SpiderChartComponent) clone
.getComponent();
// TODO SHOULD TAKE THIS ONE FROM EDITOR
ChartWizard wizard = new ChartWizard(new MSpiderChart(null, clone,
-1), (JRDesignElementDataset) scc.getDataset());
wizard.init(jConfig);
wizard.setExpressionContext(ModelUtils.getElementExpressionContext(oldChart,originalNode));
WizardDialog dialog = new WizardDialog(Display.getDefault()
.getActiveShell(), wizard);
dialog.create();
if (dialog.open() == Dialog.OK) {
this.newChart = (JRDesignComponentElement) wizard.getChart()
.getValue();
} else
return;
}
switchCharts(oldChart, newChart);
}
示例12: execute
import org.eclipse.jface.wizard.WizardDialog; //导入方法依赖的package包/类
@Execute
public void execute(@Preference(nodePath = "org.bbaw.bts.app") IEclipsePreferences prefs, IEclipseContext context,
ApplicationStartupController startupController)
{
// PartHolderDialog dialog = ContextInjectionFactory.make(PartHolderDialog.class, context);
// // context.set(UserManagementDialog.class, dialog);
//
// if (dialog.open() == dialog.OK)
// {
// }
Wizard w = new InstallationWizard(context, startupController, null, null);
WizardDialog dialog = new WizardDialog(new Shell(), w);
if (dialog.open() == dialog.OK)
{
System.out.println("new project created.");
}
}
示例13: showDialog
import org.eclipse.jface.wizard.WizardDialog; //导入方法依赖的package包/类
public int showDialog() {
if(!ExpressionEditorSupportUtil.isExpressionEditorDialogOpen()) {
JRExpressionEditor wizard = new JRExpressionEditor();
wizard.setValue(JRCloneUtils.nullSafeClone(originalExpression));
ExpressionContext ec = ModelUtils.getElementExpressionContext((JRDesignTextField) textField.getValue(), textField);
wizard.setExpressionContext(ec);
WizardDialog dialog = ExpressionEditorSupportUtil.getExpressionEditorWizardDialog(UIUtils.getShell(), wizard);
if (dialog.open() == Dialog.OK) {
isExpressionChanged = true;
newExpression=wizard.getValue();
return Window.OK;
}
}
isExpressionChanged=false;
return Window.CANCEL;
}
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:18,代码来源:EditTextFieldExpressionCommand.java
示例14: run
import org.eclipse.jface.wizard.WizardDialog; //导入方法依赖的package包/类
@Override
public void run ( final IAction action )
{
if ( this.selection == null )
{
return;
}
final IWorkbenchWizard wiz = new WriteAttributesOperationWizard ();
wiz.init ( this.site.getWorkbenchWindow ().getWorkbench (), this.selection );
// Embed the wizard into a dialog
final WizardDialog dialog = new WizardDialog ( this.site.getShell (), wiz );
dialog.open ();
}
示例15: execute
import org.eclipse.jface.wizard.WizardDialog; //导入方法依赖的package包/类
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindow(event);
ISelection selection = HandlerUtil.getCurrentSelection(event);
POJO2DataTypeWizard wizard = new POJO2DataTypeWizard();
wizard.init(window.getWorkbench(),
selection instanceof IStructuredSelection
? (IStructuredSelection) selection : StructuredSelection.EMPTY);
WizardDialog dialog = new WizardDialog(window.getShell(), wizard);
dialog.open();
return null;
}