Package org.pdtextensions.core.ui.dialog

Examples of org.pdtextensions.core.ui.dialog.GetterSetterDialog


      initialize(event, element);
     
      Map fields = getFields();     
      final Shell p = DLTKUIPlugin.getActiveWorkbenchShell();
      GetterSetterContentProvider cp = new GetterSetterContentProvider(fields);
      GetterSetterDialog dialog = new GetterSetterDialog(p, new GetterSetterLabelProvider(), cp, type);
     
      dialog.setContainerMode(true);
      dialog.setInput(type);
      dialog.setTitle("Generate Getters and Setters");
     
      if (fields.size() == 0) {
          return exitMessage();
      }
     
      if (dialog.open() == Window.OK) {
       
        List<GetterSetterEntry> entries = new ArrayList<GetterSetterEntry>();       
        Object[] dialogResult = dialog.getResult();
       
        for (Object o : dialogResult) {         
          if (o instanceof GetterSetterEntry) {       
            entries.add((GetterSetterEntry) o);           
          }
        }
       
        insertFirst = false;
        insertAfter = null;
       
        if (dialog.insertAsFirstMember())
          insertFirst = true;
        else if (dialog.insertAsLastMember()) {
        } else insertAfter = dialog.getInsertionPoint();
       
        generate(entries, dialog.getModifier(), dialog.doGenerateComments(), dialog.hasFluentInterface());
       
      }
     
     
    } catch (Exception e) {
View Full Code Here

TOP

Related Classes of org.pdtextensions.core.ui.dialog.GetterSetterDialog

Copyright © 2018 www.massapicom. 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.