本文整理汇总了Java中org.eclipse.jface.wizard.WizardDialog类的典型用法代码示例。如果您正苦于以下问题:Java WizardDialog类的具体用法?Java WizardDialog怎么用?Java WizardDialog使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
WizardDialog类属于org.eclipse.jface.wizard包,在下文中一共展示了WizardDialog类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: run
import org.eclipse.jface.wizard.WizardDialog; //导入依赖的package包/类
@Override
public void run() {
UIJob uiJob = new UIJob(Messages.MANAGE_SERVICES_TO_APPLICATIONS_TITLE) {
public IStatus runInUIThread(IProgressMonitor monitor) {
try {
if (serverBehaviour != null) {
ServiceToApplicationsBindingWizard wizard = new ServiceToApplicationsBindingWizard(
servicesHandler, serverBehaviour.getCloudFoundryServer(), editorPage);
WizardDialog dialog = new WizardDialog(editorPage.getSite().getShell(), wizard);
dialog.open();
}
}
catch (CoreException e) {
if (Logger.ERROR) {
Logger.println(Logger.ERROR_LEVEL, this, "runInUIThread", "Error launching wizard", e); //$NON-NLS-1$ //$NON-NLS-2$
}
}
return Status.OK_STATUS;
}
};
uiJob.setSystem(true);
uiJob.setPriority(Job.INTERACTIVE);
uiJob.schedule();
}
示例2: createWorkingSet
import org.eclipse.jface.wizard.WizardDialog; //导入依赖的package包/类
private void createWorkingSet() {
if (manager instanceof MutableWorkingSetManager) {
final WorkingSetNewWizard wizard = ((MutableWorkingSetManager) manager).createNewWizard();
// set allWorkingSets according to dialog to use it as a base for validation
wizard.setAllWorkingSets(allWorkingSets);
final WizardDialog dialog = new WizardDialog(getShell(), wizard);
if (dialog.open() == Window.OK) {
final WorkingSet workingSet = wizard.getWorkingSet().orNull();
if (workingSet != null) {
diffBuilder.add(workingSet);
getShell().getDisplay().asyncExec(new Runnable() {
@Override
public void run() {
allWorkingSets.add(workingSet);
tableViewer.add(workingSet);
tableViewer.setChecked(workingSet, true);
}
});
}
}
}
}
示例3: run
import org.eclipse.jface.wizard.WizardDialog; //导入依赖的package包/类
@Override
public void run(IAction action) {
Display display = Display.getDefault();
Cursor waitCursor = new Cursor(display, SWT.CURSOR_WAIT);
Shell shell = getParentShell();
shell.setCursor(waitCursor);
try {
ImportWizard importWizard = new ImportWizard();
importWizard.setWindowTitle("Convertigo project import Wizard");
WizardDialog wzdlg = new WizardDialog(shell, importWizard);
wzdlg.open();
}
catch (Throwable e) {
ConvertigoPlugin.logException(e, "Unable to import project!");
}
finally {
shell.setCursor(null);
waitCursor.dispose();
}
}
示例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: 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;
}
示例7: open
import org.eclipse.jface.wizard.WizardDialog; //导入依赖的package包/类
public static void open(String modelPath, ModelData[] additionalModels, String generatorstopcondition,
String startnode, boolean removeBlockedElements, boolean omitEgdeswithoutDescription) {
try {
Display.getDefault().asyncExec(() -> {
RunAsManualWizard wizard = new RunAsManualWizard(modelPath, additionalModels, generatorstopcondition,
startnode, removeBlockedElements, omitEgdeswithoutDescription);
wizard.init(PlatformUI.getWorkbench(), (IStructuredSelection) null);
Shell activeShell = Display.getDefault().getActiveShell();
if (activeShell == null)
return;
WizardDialog dialog = new WizardDialog(activeShell, wizard);
dialog.open();
});
} catch (Exception e) {
ResourceManager.logException(e);
}
}
示例8: 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;
}
示例9: 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;
}
示例10: execute
import org.eclipse.jface.wizard.WizardDialog; //导入依赖的package包/类
public Object execute(ExecutionEvent event) throws ExecutionException {
final INewWizard wizard = new NewModelWizard();
// Initialize the selection
final IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
final ISelectionService service = window.getSelectionService();
final IStructuredSelection selection = (IStructuredSelection)service
.getSelection("org.eclipse.sirius.ui.tools.views.model.explorer"); //$NON-NLS-1$
wizard.init(PlatformUI.getWorkbench(), selection);
// Open the new model wizard
final WizardDialog dialog = new WizardDialog(window.getShell(), wizard);
dialog.open();
return null;
}
示例11: execute
import org.eclipse.jface.wizard.WizardDialog; //导入依赖的package包/类
@Override
public Object execute(final ExecutionEvent event) throws ExecutionException {
final IEditorPart editorPart = HandlerUtil.getActiveEditor(event);
final ICompilationUnit icu = JavaUI.getWorkingCopyManager().getWorkingCopy(editorPart.getEditorInput());
try {
final IType type = icu.getTypes()[0];
final List<Field> fields = new ArrayList<>();
for (final IField field : type.getFields()) {
final String fieldName = field.getElementName();
final String fieldType = Signature.getSignatureSimpleName(field.getTypeSignature());
fields.add(new Field(fieldName, fieldType));
}
new WizardDialog(HandlerUtil.getActiveShell(event), new BuilderGeneratorWizard(icu, fields)).open();
}
catch (final JavaModelException e) {
e.printStackTrace();
}
return null;
}
示例12: 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);
}
示例13: 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();
}
}
}
示例14: 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();
}
}
};
}
示例15: run
import org.eclipse.jface.wizard.WizardDialog; //导入依赖的package包/类
@Override
public void run() {
try {
if (!GitHelpers.isEGitInstalled(true)) {
final String errorMessage =
Messages.getString("TeamExplorerGitWizardNavigationLink.EGitMissingErrorMessageText"); //$NON-NLS-1$
final String title =
Messages.getString("TeamExplorerGitWizardNavigationLink.EGitMissingErrorMessageTitle"); //$NON-NLS-1$
log.error("Cannot import from a Git Repository. EGit plugin is required for this action."); //$NON-NLS-1$
MessageDialog.openError(treeViewer.getControl().getShell(), title, errorMessage);
return;
}
// open Git import wizard
final GitImportWizard wizard = new GitImportWizard(serverItems);
wizard.init(PlatformUI.getWorkbench(), null);
final WizardDialog dialog = new WizardDialog(treeViewer.getControl().getShell(), wizard);
dialog.open();
} catch (final Exception e) {
log.error("", e); //$NON-NLS-1$
}
}