Package org.testng.eclipse.ui.util.Utils

Examples of org.testng.eclipse.ui.util.Utils.Widgets


          String selectedDir= dlg.open();
          m_outputdir.setText(selectedDir != null ? selectedDir : "");
          m_absolutePath.setSelection(true);
        }
      };
      Widgets w = Utils.createTextBrowseControl(g, null,
          "TestNGPropertyPage.outputDir", buttonListener, null, null, true);
      m_outputdir = w.text;

      m_absolutePath = new Button(g, SWT.CHECK);
      m_absolutePath.setText("Absolute output path");
      m_absolutePath.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 3, 1));
      g.setLayoutData(SWTUtil.createGridData());
    }

    //
    // Watch testng-results.xml
    //
    {
//      Group g = new Group(parentComposite, SWT.SHADOW_ETCHED_IN);
//      m_watchResults = new Button(g, SWT.CHECK);
//      m_watchResults.setText("Watch testng-results.xml");

      SelectionAdapter listener = new SelectionAdapter() {
        public void widgetSelected(SelectionEvent evt) {
          DirectoryDialog dlg= new DirectoryDialog(m_xmlTemplateFile.getShell());
          dlg.setMessage("Select Template XML file");
          String selectedDir = dlg.open();
          if (new File(selectedDir).isDirectory()) {
            selectedDir = selectedDir + File.separator + XMLReporter.FILE_NAME;
          }
          m_watchResultText.setText(selectedDir != null ? selectedDir : "");
        }
      };

      Widgets w = Utils.createTextBrowseControl(parentComposite,
          "TestNGPropertyPage.watchResultXml",
          "TestNGPropertyPage.resultXmlDirectory",
          listener, null, null,
          true);
      m_watchResultText = w.text;
      m_watchResultRadio = w.radio;
    }

    //
    // XML template file
    //

    {
      SelectionAdapter buttonListener = new SelectionAdapter() {
        public void widgetSelected(SelectionEvent evt) {
          DirectoryDialog dlg= new DirectoryDialog(m_xmlTemplateFile.getShell());
          dlg.setMessage("Select Template XML file");
          String selectedDir= dlg.open();
          m_xmlTemplateFile.setText(selectedDir != null ? selectedDir : "");
        }
      };
      Widgets w = Utils.createTextBrowseControl(parentComposite, null,
          "TestNGPropertyPage.templateXml", buttonListener, null, null, true);
      m_xmlTemplateFile = w.text;

    }

    //
    // Disable default listeners
    //
    m_disabledDefaultListeners = new Button(parentComposite, SWT.CHECK);
    m_disabledDefaultListeners.setText("Disable default listeners");
//    m_disabledDefaultListeners.setLayoutData(SWTUtil.createGridData());//new GridData(SWT.FILL, SWT.NONE, true, false, 4, 1));
//    m_disabledDefaultListeners.setBackground(new Color(parent.getDisplay(), 0xcc, 0, 0));

   
    //
    // Project jar
    //
    m_projectJar= new Button(parentComposite, SWT.CHECK);
    m_projectJar.setText("Use project TestNG jar");
//    m_projectJar.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING, SWT.NONE,
//        false /* don't grab excess horizontal */,
//        false /* don't grab excess vertical */,
//        2, 1));
   
    //Create a string editor control: A label and a text area
    {
      Widgets w = Utils.createStringEditorControl(parentComposite, "TestNGPropertyPage.preDefinedListeners", null, true);
      m_preDefinedListeners = w.text;
      m_preDefinedListeners.setToolTipText("Split multi listener using ;");
    }
    loadDefaults();

View Full Code Here

TOP

Related Classes of org.testng.eclipse.ui.util.Utils.Widgets

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.