Examples of NewClassWizard


Examples of org.apache.click.eclipse.ui.wizard.NewClassWizard

                }
                WizardDialog dialog = new WizardDialog(text.getShell(), wizard);
                dialog.open();
              } else {
                // Opens the new java class creation wizard
                NewClassWizard wizard = new NewClassWizard();
                wizard.init(PlatformUI.getWorkbench(), new StructuredSelection(project));
                if(superClass!=null){
                  if(superClass == ClickPlugin.CLICK_CONTROL_IF || superClass.endsWith("Service")){
                    wizard.addInterface(superClass);
                  } else {
                    wizard.setSuperClass(superClass);
                  }
                }
                wizard.setClassName(className);
                WizardDialog dialog = new WizardDialog(text.getShell(), wizard);
                dialog.open();
              }
            }
          }
View Full Code Here

Examples of org.apache.click.eclipse.ui.wizard.NewClassWizard

                }
                WizardDialog dialog = new WizardDialog(text.getShell(), wizard);
                dialog.open();
              } else {
                // Opens the new java class creation wizard
                NewClassWizard wizard = new NewClassWizard();
                wizard.init(PlatformUI.getWorkbench(), new StructuredSelection(project));
                if(superClass != null){
                  if(superClass == ClickPlugin.CLICK_CONTROL_IF
                      || superClass == ClickPlugin.CLICK_PAGE_INTERCEPTOR_IF
                      || superClass.endsWith("Service")){
                    wizard.addInterface(superClass);
                  } else {
                    wizard.setSuperClass(superClass);
                  }
                }
                wizard.setClassName(className);
                WizardDialog dialog = new WizardDialog(text.getShell(), wizard);
                dialog.open();
              }
            }
          }
View Full Code Here

Examples of org.jbehave.plugin.eclipse.wizards.NewClassWizard

        MessageDialog dialog=new MessageDialog(null,"Type "+storyLine.asClassName()+" not found",null,"Do you want to create it?",
                                                MessageDialog.QUESTION,
                                                new String[]{"Yes","Yes, using Minimock","No"},0);
        int ret=dialog.open();
        if ((ret==0)||(ret==1)){
            NewClassWizard wizard=new NewClassWizard(storyLine,ret==1);
            wizard.init(PlatformUI.getWorkbench(), null);
            WizardDialog wd=new WizardDialog(shell,wizard);

            wd.open();
        }
    }
View Full Code Here

Examples of org.pdtextensions.core.ui.wizards.NewClassWizard

public class CreateNewClassHandler extends AbstractWizardHandler {

  @Override
  public Object execute(ExecutionEvent event) throws ExecutionException {

    openWizard(event, new NewClassWizard());
    return null;
  }
View Full Code Here

Examples of org.pdtextensions.core.ui.wizards.NewClassWizard

    {
        Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
        ISelectionService selectionService = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService();
        ISelection selection = selectionService.getSelection();

        NewClassWizard wizard = new NewClassWizard();
        String serviceClass = "";
        String className = "";
        IScriptFolder folder = null;

        try {
            serviceClass = (String) marker.getAttribute(SymfonyMarker.SERVICE_CLASS);
        } catch (CoreException e) {
            Logger.logException(e);
        }
       
        if (serviceClass == null) {
          Logger.log(Logger.ERROR, "Could not retrieve service class to open class dialog");
          return;
        }

        ModelAccess composer = ModelAccess.getInstance();
        IResource resource = marker.getResource();
        className  = serviceClass.substring(serviceClass.lastIndexOf("\\"), serviceClass.length());
        String ns = serviceClass.replace(className, "");
    IPath folderPath = composer.reverseResolve(resource.getProject(), ns);
     
        if (folderPath == null) {
          MessageDialog.openError(Display.getCurrent().getActiveShell(), "Error opening class wizard", "Could not open the New Class wizard. See the workspace log for details");
          Logger.log(Logger.ERROR, "Unable to retrieve target folder from composer information");
          return;
        }
       
        IFolder targetFolder = resource.getProject().getFolder(folderPath);
        if (targetFolder.exists() == false) {
          try {
        targetFolder.create(true, true, new NullProgressMonitor());
      } catch (CoreException e) {
        e.printStackTrace();
      }
        }
       
      folder = (IScriptFolder) DLTKCore.create(targetFolder);
       
        wizard.setClassName(className.replace("\\", ""));
        wizard.setNamespace(ns);
        wizard.setScriptFolder(folder);

        if (selection instanceof IStructuredSelection) {
            wizard.init(PlatformUI.getWorkbench(), (IStructuredSelection) selectionService.getSelection());
        }

        WizardDialog dialog = new WizardDialog(shell, wizard);
        dialog.create();
        dialog.open();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.