Esempio n. 1
0
 private void updateRunButton() {
   for (OptionWidget widget : widgets)
     if (!widget.isValid()) {
       runLink.setVisible(false);
       runLink.setEnabled(false);
       return;
     }
   runLink.setEnabled(true);
   runLink.setVisible(true);
 }
  /**
   * Creates the testing area.
   *
   * @param client the client
   * @param toolkit the toolkit
   * @param actionBars the action bars
   */
  private void createTestingArea(
      final Composite client, final FormToolkit toolkit, final IActionBars actionBars) {
    ImageHyperlink imageHyperlink = toolkit.createImageHyperlink(client, SWT.None);
    imageHyperlink.setText("Launch a local component");
    imageHyperlink.setHref(TestingSection.TESTING_HREF_LOCAL_LAUNCH);
    imageHyperlink.addHyperlinkListener(this.getPage());
    imageHyperlink.setImage(ComponentImages.getImage(ComponentImages.RUN_EXEC));

    //		imageHyperlink = toolkit.createImageHyperlink(client, SWT.None);
    //		imageHyperlink.setText("Launch a remote component");
    //		imageHyperlink.setHref(TestingSection.TESTING_HREF);
    //		imageHyperlink.addHyperlinkListener(this.getPage());

    imageHyperlink = toolkit.createImageHyperlink(client, SWT.None);
    imageHyperlink.setText("Launch a local component in debug mode");
    imageHyperlink.setHref(TestingSection.TESTING_HREF_LOCAL_DEBUG);
    imageHyperlink.addHyperlinkListener(this.getPage());
    imageHyperlink.setEnabled(getPage().getEditor().getMainResource().getURI().isPlatform());
    imageHyperlink.setImage(ComponentImages.getImage(ComponentImages.DEBUG_EXEC));

    //		imageHyperlink = toolkit.createImageHyperlink(client, SWT.None);
    //		imageHyperlink.setText("Launch a remote component in debug mode");
    //		imageHyperlink.setHref(TestingSection.TESTING_HREF);
    //		imageHyperlink.addHyperlinkListener(this.getPage());
  }