Пример #1
0
    public JavaScriptSupportGroup(Composite composite, WizardPage projectWizardFirstPage) {
      final int numColumns = 3;
      fGroup = new Group(composite, SWT.NONE);
      fGroup.setFont(composite.getFont());

      fGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
      fGroup.setLayout(initGridLayout(new GridLayout(numColumns, false), true));
      fGroup.setText(PHPUIMessages.JavaScriptSupportGroup_OptionBlockTitle); // $NON-NLS-1$

      fEnableJavaScriptSupport = new Button(fGroup, SWT.CHECK | SWT.RIGHT);
      fEnableJavaScriptSupport.setText(
          PHPUIMessages.JavaScriptSupportGroup_EnableSupport); // $NON-NLS-1$
      fEnableJavaScriptSupport.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
      fEnableJavaScriptSupport.addSelectionListener(this);
      fEnableJavaScriptSupport.setSelection(
          PHPUiPlugin.getDefault()
              .getPreferenceStore()
              .getBoolean((PreferenceConstants.JavaScriptSupportEnable)));
    }
Пример #2
0
    private void updateEnableState() {
      if (fDetectGroup == null) return;

      final boolean detect = fDetectGroup.mustDetect();
      fStdRadio.setEnabled(!detect);
      fSrcBinRadio.setEnabled(!detect);

      if (fGroup != null) {
        fGroup.setEnabled(!detect);
      }
    }
Пример #3
0
    public VersionGroup(Composite composite) {
      final int numColumns = 3;
      final Group group = new Group(composite, SWT.NONE);
      group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
      group.setLayout(initGridLayout(new GridLayout(numColumns, false), true));
      group.setText(PHPUIMessages.VersionGroup_OptionBlock_Title); // $NON-NLS-1$
      fDefaultValues = new SelectionButtonDialogField(SWT.RADIO);
      fDefaultValues.setDialogFieldListener(this);
      fDefaultValues.setLabelText(
          PHPUIMessages.VersionGroup_OptionBlock_fDefaultValues); // $NON-NLS-1$
      fCustomValues = new SelectionButtonDialogField(SWT.RADIO);
      fCustomValues.setDialogFieldListener(this);
      fCustomValues.setLabelText(
          PHPUIMessages.VersionGroup_OptionBlock_fCustomValues); // $NON-NLS-1$

      fDefaultValues.setSelection(true);
      fCustomValues.setSelection(false);

      fDefaultValues.doFillIntoGrid(group, numColumns);
      fCustomValues.doFillIntoGrid(group, 2);

      fConfigurationBlock =
          createConfigurationBlock(
              new IStatusChangeListener() {
                public void statusChanged(IStatus status) {}
              },
              (IProject) null,
              null);
      fConfigurationBlock.createContents(group);
      fConfigurationBlock.setEnabled(false);
      // fPreferenceLink = new Link(fGroup, SWT.NONE);
      // fPreferenceLink.setText(PHPUIMessages.getString("ToggleLinkingAction_link_description"));
      // //fPreferenceLink.setLayoutData(new GridData(GridData.END,
      // GridData.END, false, false));
      // fPreferenceLink.setLayoutData(new GridData(SWT.END,
      // SWT.BEGINNING, true, false));
      // fPreferenceLink.addSelectionListener(this);
      // fPreferenceLink.setEnabled(true);

    }
Пример #4
0
    public LayoutGroup(Composite composite) {
      final int numColumns = 3;

      fStdRadio = new SelectionButtonDialogField(SWT.RADIO);
      fStdRadio.setLabelText(PHPUIMessages.LayoutGroup_OptionBlock_ProjectSrc); // $NON-NLS-1$
      fStdRadio.setDialogFieldListener(this);

      fSrcBinRadio = new SelectionButtonDialogField(SWT.RADIO);
      fSrcBinRadio.setLabelText(PHPUIMessages.LayoutGroup_OptionBlock_SrcResources); // $NON-NLS-1$
      fSrcBinRadio.setDialogFieldListener(this);

      // getting Preferences default choice
      boolean useSrcBin =
          PreferenceConstants.getPreferenceStore()
              .getBoolean(PreferenceConstants.SRCBIN_FOLDERS_IN_NEWPROJ);

      fSrcBinRadio.setSelection(useSrcBin);
      fStdRadio.setSelection(!useSrcBin);

      // createContent
      fGroup = new Group(composite, SWT.NONE);
      fGroup.setFont(composite.getFont());
      fGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
      fGroup.setLayout(initGridLayout(new GridLayout(numColumns, false), true));
      fGroup.setText(PHPUIMessages.LayoutGroup_OptionBlock_Title); // $NON-NLS-1$

      fStdRadio.doFillIntoGrid(fGroup, 3);
      LayoutUtil.setHorizontalGrabbing(fStdRadio.getSelectionButton(null));

      fSrcBinRadio.doFillIntoGrid(fGroup, 2);

      fPreferenceLink = new Link(fGroup, SWT.NONE);
      fPreferenceLink.setText(PHPUIMessages.ToggleLinkingAction_link_description); // $NON-NLS-1$
      fPreferenceLink.setLayoutData(new GridData(SWT.END, SWT.BEGINNING, true, false));
      fPreferenceLink.addSelectionListener(this);
      fPreferenceLink.setEnabled(true);

      updateEnableState();
    }