Java 类org.eclipse.ui.INewWizard 实例源码

项目:time4sys    文件:NewTime4SysModel.java   
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;
    }
项目:OpenSPIFe    文件:NewPlanResourceAction.java   
/**
 * Create the new-plan-resource wizard and open the dialog.
 * If the active part is an EnsembleCommonNavigator, get the StructuredSelection from it;
 * otherwise the selection is empty.
 * @param action ignored
 */
@Override
public void run(IAction action) {
    IStructuredSelection structuredSeleciton = StructuredSelection.EMPTY;
    IWorkbench workbench = PlatformUI.getWorkbench();
    INewWizard newResourceWizard = new NewPlanResourceWizard();
    IWorkbenchPart part = window.getPartService().getActivePart();
    if (part instanceof EnsembleCommonNavigator) {
        ISelection selection = ((EnsembleCommonNavigator) part).getCommonViewer().getSelection();
        if(selection instanceof IStructuredSelection) {
            structuredSeleciton = (IStructuredSelection)selection;
        }
    }
    newResourceWizard.init(workbench, structuredSeleciton);
    Shell parent = workbench.getActiveWorkbenchWindow().getShell();
    WizardDialog wizardDialog = new WizardDialog(parent, newResourceWizard);
    wizardDialog.create();
    wizardDialog.open();
}
项目:Eclipse-Postfix-Code-Completion    文件:AbstractOpenWizardAction.java   
@Override
public void run() {
    Shell shell= getShell();
    if (!doCreateProjectFirstOnEmptyWorkspace(shell)) {
        return;
    }
    try {
        INewWizard wizard= createWizard();
        wizard.init(PlatformUI.getWorkbench(), getSelection());

        WizardDialog dialog= new WizardDialog(shell, wizard);
        PixelConverter converter= new PixelConverter(JFaceResources.getDialogFont());
        dialog.setMinimumPageSize(converter.convertWidthInCharsToPixels(70), converter.convertHeightInCharsToPixels(20));
        dialog.create();
        int res= dialog.open();
        if (res == Window.OK && wizard instanceof NewElementWizard) {
            fCreatedElement= ((NewElementWizard)wizard).getCreatedElement();
        }

        notifyResult(res == Window.OK);
    } catch (CoreException e) {
        String title= NewWizardMessages.AbstractOpenWizardAction_createerror_title;
        String message= NewWizardMessages.AbstractOpenWizardAction_createerror_message;
        ExceptionHandler.handle(e, shell, title, message);
    }
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:AbstractOpenWizardAction.java   
@Override
public void run() {
    Shell shell= getShell();
    if (!doCreateProjectFirstOnEmptyWorkspace(shell)) {
        return;
    }
    try {
        INewWizard wizard= createWizard();
        wizard.init(PlatformUI.getWorkbench(), getSelection());

        WizardDialog dialog= new WizardDialog(shell, wizard);
        PixelConverter converter= new PixelConverter(JFaceResources.getDialogFont());
        dialog.setMinimumPageSize(converter.convertWidthInCharsToPixels(70), converter.convertHeightInCharsToPixels(20));
        dialog.create();
        int res= dialog.open();
        if (res == Window.OK && wizard instanceof NewElementWizard) {
            fCreatedElement= ((NewElementWizard)wizard).getCreatedElement();
        }

        notifyResult(res == Window.OK);
    } catch (CoreException e) {
        String title= NewWizardMessages.AbstractOpenWizardAction_createerror_title;
        String message= NewWizardMessages.AbstractOpenWizardAction_createerror_message;
        ExceptionHandler.handle(e, shell, title, message);
    }
}
项目:hadoop-2.6.0-cdh5.4.3    文件:OpenNewMRClassWizardAction.java   
public void run(String[] params, ICheatSheetManager manager) {

    if ((params != null) && (params.length > 0)) {
      IWorkbench workbench = PlatformUI.getWorkbench();
      INewWizard wizard = getWizard(params[0]);
      wizard.init(workbench, new StructuredSelection());
      WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench()
          .getActiveWorkbenchWindow().getShell(), wizard);
      dialog.create();
      dialog.open();

      // did the wizard succeed ?
      notifyResult(dialog.getReturnCode() == Window.OK);
    }
  }
项目:hadoop-2.6.0-cdh5.4.3    文件:OpenNewMRClassWizardAction.java   
private INewWizard getWizard(String typeName) {
  if (typeName.equals("Mapper")) {
    return new NewMapperWizard();
  } else if (typeName.equals("Reducer")) {
    return new NewReducerWizard();
  } else if (typeName.equals("Driver")) {
    return new NewDriverWizard();
  } else {
    log.severe("Invalid Wizard requested");
    return null;
  }
}
项目:hadoop-EAR    文件:OpenNewMRClassWizardAction.java   
public void run(String[] params, ICheatSheetManager manager) {

    if ((params != null) && (params.length > 0)) {
      IWorkbench workbench = PlatformUI.getWorkbench();
      INewWizard wizard = getWizard(params[0]);
      wizard.init(workbench, new StructuredSelection());
      WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench()
          .getActiveWorkbenchWindow().getShell(), wizard);
      dialog.create();
      dialog.open();

      // did the wizard succeed ?
      notifyResult(dialog.getReturnCode() == Window.OK);
    }
  }
项目:hadoop-EAR    文件:OpenNewMRClassWizardAction.java   
private INewWizard getWizard(String typeName) {
  if (typeName.equals("Mapper")) {
    return new NewMapperWizard();
  } else if (typeName.equals("Reducer")) {
    return new NewReducerWizard();
  } else if (typeName.equals("Driver")) {
    return new NewDriverWizard();
  } else {
    log.severe("Invalid Wizard requested");
    return null;
  }
}
项目:gwt-eclipse-plugin    文件:AbstractOpenWizardAction.java   
@Override
public void run() {
  Shell localShell = getShell();
  if (!doCreateProjectFirstOnEmptyWorkspace(localShell)) {
    return;
  }

  try {
    INewWizard wizard = createWizard();
    wizard.init(PlatformUI.getWorkbench(), getSelection());

    WizardDialog dialog = new WizardDialog(localShell, wizard);
    IPixelConverter converter =
        PixelConverterFactory.createPixelConverter(JFaceResources.getDialogFont());
    dialog.setMinimumPageSize(converter.convertWidthInCharsToPixels(70),
        converter.convertHeightInCharsToPixels(20));
    dialog.create();
    int res = dialog.open();
    if (res == Window.OK && wizard instanceof NewElementWizard) {
      createdElement = ((NewElementWizard) wizard).getCreatedElement();
    }

    notifyResult(res == Window.OK);
  } catch (CoreException e) {
    String title = NewWizardMessages.AbstractOpenWizardAction_createerror_title;
    String message = NewWizardMessages.AbstractOpenWizardAction_createerror_message;
    ExceptionHandler.handle(e, localShell, title, message);
  }
}
项目:OpenSPIFe    文件:NewResourceAction.java   
@Override
public void run(IAction action) {
    IWorkbench workbench = PlatformUI.getWorkbench();
    INewWizard newResourceWizard = getNewResourceWizard();
    newResourceWizard.init(workbench, getCurrentSelection());
    Shell parent = workbench.getActiveWorkbenchWindow().getShell();
    WizardDialog wizardDialog = new WizardDialog(parent, newResourceWizard);
    wizardDialog.create();
    wizardDialog.open();
}
项目:OpenSPIFe    文件:NewSpifeProjectResourceAction.java   
@Override
protected INewWizard getNewResourceWizard() {
    try {
        return MissionExtender.construct(NewSpifeProjectResourceWizard.class);
    } catch (ConstructionException e) {
        LogUtil.error(e);
        return null;
    }
}
项目:hadoop-on-lustre    文件:OpenNewMRClassWizardAction.java   
public void run(String[] params, ICheatSheetManager manager) {

    if ((params != null) && (params.length > 0)) {
      IWorkbench workbench = PlatformUI.getWorkbench();
      INewWizard wizard = getWizard(params[0]);
      wizard.init(workbench, new StructuredSelection());
      WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench()
          .getActiveWorkbenchWindow().getShell(), wizard);
      dialog.create();
      dialog.open();

      // did the wizard succeed ?
      notifyResult(dialog.getReturnCode() == Window.OK);
    }
  }
项目:hadoop-on-lustre    文件:OpenNewMRClassWizardAction.java   
private INewWizard getWizard(String typeName) {
  if (typeName.equals("Mapper")) {
    return new NewMapperWizard();
  } else if (typeName.equals("Reducer")) {
    return new NewReducerWizard();
  } else if (typeName.equals("Driver")) {
    return new NewDriverWizard();
  } else {
    log.severe("Invalid Wizard requested");
    return null;
  }
}
项目:RDFS    文件:OpenNewMRClassWizardAction.java   
public void run(String[] params, ICheatSheetManager manager) {

    if ((params != null) && (params.length > 0)) {
      IWorkbench workbench = PlatformUI.getWorkbench();
      INewWizard wizard = getWizard(params[0]);
      wizard.init(workbench, new StructuredSelection());
      WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench()
          .getActiveWorkbenchWindow().getShell(), wizard);
      dialog.create();
      dialog.open();

      // did the wizard succeed ?
      notifyResult(dialog.getReturnCode() == Window.OK);
    }
  }
项目:RDFS    文件:OpenNewMRClassWizardAction.java   
private INewWizard getWizard(String typeName) {
  if (typeName.equals("Mapper")) {
    return new NewMapperWizard();
  } else if (typeName.equals("Reducer")) {
    return new NewReducerWizard();
  } else if (typeName.equals("Driver")) {
    return new NewDriverWizard();
  } else {
    log.severe("Invalid Wizard requested");
    return null;
  }
}
项目:hadoop-0.20    文件:OpenNewMRClassWizardAction.java   
public void run(String[] params, ICheatSheetManager manager) {

    if ((params != null) && (params.length > 0)) {
      IWorkbench workbench = PlatformUI.getWorkbench();
      INewWizard wizard = getWizard(params[0]);
      wizard.init(workbench, new StructuredSelection());
      WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench()
          .getActiveWorkbenchWindow().getShell(), wizard);
      dialog.create();
      dialog.open();

      // did the wizard succeed ?
      notifyResult(dialog.getReturnCode() == Window.OK);
    }
  }
项目:hadoop-0.20    文件:OpenNewMRClassWizardAction.java   
private INewWizard getWizard(String typeName) {
  if (typeName.equals("Mapper")) {
    return new NewMapperWizard();
  } else if (typeName.equals("Reducer")) {
    return new NewReducerWizard();
  } else if (typeName.equals("Driver")) {
    return new NewDriverWizard();
  } else {
    log.severe("Invalid Wizard requested");
    return null;
  }
}
项目:hanoi-hadoop-2.0.0-cdh    文件:OpenNewMRClassWizardAction.java   
public void run(String[] params, ICheatSheetManager manager) {

    if ((params != null) && (params.length > 0)) {
      IWorkbench workbench = PlatformUI.getWorkbench();
      INewWizard wizard = getWizard(params[0]);
      wizard.init(workbench, new StructuredSelection());
      WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench()
          .getActiveWorkbenchWindow().getShell(), wizard);
      dialog.create();
      dialog.open();

      // did the wizard succeed ?
      notifyResult(dialog.getReturnCode() == Window.OK);
    }
  }
项目:hanoi-hadoop-2.0.0-cdh    文件:OpenNewMRClassWizardAction.java   
private INewWizard getWizard(String typeName) {
  if (typeName.equals("Mapper")) {
    return new NewMapperWizard();
  } else if (typeName.equals("Reducer")) {
    return new NewReducerWizard();
  } else if (typeName.equals("Driver")) {
    return new NewDriverWizard();
  } else {
    log.severe("Invalid Wizard requested");
    return null;
  }
}
项目:mapreduce-fork    文件:OpenNewMRClassWizardAction.java   
public void run(String[] params, ICheatSheetManager manager) {

    if ((params != null) && (params.length > 0)) {
      IWorkbench workbench = PlatformUI.getWorkbench();
      INewWizard wizard = getWizard(params[0]);
      wizard.init(workbench, new StructuredSelection());
      WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench()
          .getActiveWorkbenchWindow().getShell(), wizard);
      dialog.create();
      dialog.open();

      // did the wizard succeed ?
      notifyResult(dialog.getReturnCode() == Window.OK);
    }
  }
项目:mapreduce-fork    文件:OpenNewMRClassWizardAction.java   
private INewWizard getWizard(String typeName) {
  if (typeName.equals("Mapper")) {
    return new NewMapperWizard();
  } else if (typeName.equals("Reducer")) {
    return new NewReducerWizard();
  } else if (typeName.equals("Driver")) {
    return new NewDriverWizard();
  } else {
    log.severe("Invalid Wizard requested");
    return null;
  }
}
项目:hortonworks-extension    文件:OpenNewMRClassWizardAction.java   
public void run(String[] params, ICheatSheetManager manager) {

    if ((params != null) && (params.length > 0)) {
      IWorkbench workbench = PlatformUI.getWorkbench();
      INewWizard wizard = getWizard(params[0]);
      wizard.init(workbench, new StructuredSelection());
      WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench()
          .getActiveWorkbenchWindow().getShell(), wizard);
      dialog.create();
      dialog.open();

      // did the wizard succeed ?
      notifyResult(dialog.getReturnCode() == Window.OK);
    }
  }
项目:hortonworks-extension    文件:OpenNewMRClassWizardAction.java   
private INewWizard getWizard(String typeName) {
  if (typeName.equals("Mapper")) {
    return new NewMapperWizard();
  } else if (typeName.equals("Reducer")) {
    return new NewReducerWizard();
  } else if (typeName.equals("Driver")) {
    return new NewDriverWizard();
  } else {
    log.severe("Invalid Wizard requested");
    return null;
  }
}
项目:hortonworks-extension    文件:OpenNewMRClassWizardAction.java   
public void run(String[] params, ICheatSheetManager manager) {

    if ((params != null) && (params.length > 0)) {
      IWorkbench workbench = PlatformUI.getWorkbench();
      INewWizard wizard = getWizard(params[0]);
      wizard.init(workbench, new StructuredSelection());
      WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench()
          .getActiveWorkbenchWindow().getShell(), wizard);
      dialog.create();
      dialog.open();

      // did the wizard succeed ?
      notifyResult(dialog.getReturnCode() == Window.OK);
    }
  }
项目:hortonworks-extension    文件:OpenNewMRClassWizardAction.java   
private INewWizard getWizard(String typeName) {
  if (typeName.equals("Mapper")) {
    return new NewMapperWizard();
  } else if (typeName.equals("Reducer")) {
    return new NewReducerWizard();
  } else if (typeName.equals("Driver")) {
    return new NewDriverWizard();
  } else {
    log.severe("Invalid Wizard requested");
    return null;
  }
}
项目:hadoop-gpu    文件:OpenNewMRClassWizardAction.java   
public void run(String[] params, ICheatSheetManager manager) {

    if ((params != null) && (params.length > 0)) {
      IWorkbench workbench = PlatformUI.getWorkbench();
      INewWizard wizard = getWizard(params[0]);
      wizard.init(workbench, new StructuredSelection());
      WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench()
          .getActiveWorkbenchWindow().getShell(), wizard);
      dialog.create();
      dialog.open();

      // did the wizard succeed ?
      notifyResult(dialog.getReturnCode() == Window.OK);
    }
  }
项目:hadoop-gpu    文件:OpenNewMRClassWizardAction.java   
private INewWizard getWizard(String typeName) {
  if (typeName.equals("Mapper")) {
    return new NewMapperWizard();
  } else if (typeName.equals("Reducer")) {
    return new NewReducerWizard();
  } else if (typeName.equals("Driver")) {
    return new NewDriverWizard();
  } else {
    log.severe("Invalid Wizard requested");
    return null;
  }
}
项目:eclipse-extras    文件:DynamicWorkingSetWizardExtensionPDETest.java   
private static INewWizard getWizardClass( Extension extension ) {
  return extension.createExecutableExtension( "class", INewWizard.class );
}
项目:gwt-eclipse-plugin    文件:OpenNewWebApplicationWizardAction.java   
@Override
protected INewWizard createWizard() throws CoreException {
  return new NewWebAppProjectWizard();
}
项目:OpenSPIFe    文件:NewPlanResourceAction.java   
@Override
protected INewWizard getNewResourceWizard() {
    return new NewPlanResourceWizard();
}
项目:Eclipse-Postfix-Code-Completion    文件:OpenNewClassWizardAction.java   
@Override
protected final INewWizard createWizard() throws CoreException {
    return new NewClassCreationWizard(fPage, fOpenEditorOnFinish);
}
项目:Eclipse-Postfix-Code-Completion    文件:OpenNewEnumWizardAction.java   
@Override
protected final INewWizard createWizard() throws CoreException {
    return new NewEnumCreationWizard(fPage, fOpenEditorOnFinish);
}
项目:Eclipse-Postfix-Code-Completion    文件:OpenNewSourceFolderWizardAction.java   
@Override
protected final INewWizard createWizard() throws CoreException {
    return new NewSourceFolderCreationWizard();
}
项目:Eclipse-Postfix-Code-Completion    文件:OpenNewInterfaceWizardAction.java   
@Override
protected final INewWizard createWizard() throws CoreException {
    return new NewInterfaceCreationWizard(fPage, fOpenEditorOnFinish);
}
项目:Eclipse-Postfix-Code-Completion    文件:OpenNewAnnotationWizardAction.java   
@Override
protected final INewWizard createWizard() throws CoreException {
    return new NewAnnotationCreationWizard(fPage, fOpenEditorOnFinish);
}
项目:Eclipse-Postfix-Code-Completion    文件:OpenNewPackageWizardAction.java   
@Override
protected final INewWizard createWizard() throws CoreException {
    return new NewPackageCreationWizard(fPage);
}
项目:Eclipse-Postfix-Code-Completion    文件:OpenNewJavaProjectWizardAction.java   
@Override
protected final INewWizard createWizard() throws CoreException {
    return new JavaProjectWizard(fPageOne, fPageTwo);
}
项目:Eclipse-Postfix-Code-Completion    文件:NewTypeDropDownAction.java   
@Override
protected INewWizard createWizard() throws CoreException {
    return (INewWizard) CoreUtility.createExtension(fConfigurationElement, ATT_CLASS);
}
项目:Eclipse-Postfix-Code-Completion    文件:SourceContainerWorkbookPage.java   
/**
 * {@inheritDoc}
 */
@Override
protected INewWizard createWizard() throws CoreException {
    return fWizard;
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:OpenNewClassWizardAction.java   
@Override
protected final INewWizard createWizard() throws CoreException {
    return new NewClassCreationWizard(fPage, fOpenEditorOnFinish);
}