Ejemplo n.º 1
0
 @Override
 protected void performOK() {
   ICConfigurationDescription[] cfgs = page.getCfgsEditable();
   AutotoolsConfigurePropertyPage ap = (AutotoolsConfigurePropertyPage) page;
   Map<String, IAConfiguration> cfgList = new HashMap<>();
   for (int i = 0; i < cfgs.length; ++i) {
     ICConfigurationDescription cd = cfgs[i];
     IAConfiguration acfg = ap.getConfiguration(cd);
     cfgList.put(cd.getId(), acfg);
   }
   IProject project = page.getProject();
   AutotoolsConfigurationManager.getInstance()
       .replaceProjectConfigurations(project, cfgList, cfgs);
   AutotoolsConfigurationManager.getInstance().clearTmpConfigurations(project);
 }
Ejemplo n.º 2
0
  @Override
  public void createControls(Composite parent) {
    AutotoolsConfigurationManager.getInstance().clearTmpConfigurations(page.getProject());
    syncClones();

    super.createControls(parent);
    Composite composite = usercomp;

    settingsStore = AutotoolsConfigurePrefStore.getInstance();
    configToPageListMap = new HashMap<>();

    // assume parent page uses griddata
    GridData gd =
        new GridData(
            GridData.HORIZONTAL_ALIGN_CENTER
                | GridData.VERTICAL_ALIGN_FILL
                | GridData.FILL_HORIZONTAL
                | GridData.FILL_VERTICAL);
    composite.setLayoutData(gd);
    GridLayout layout = new GridLayout();
    composite.setLayout(layout);

    // Create the sash form
    sashForm = new SashForm(usercomp, SWT.NONE);
    sashForm.setOrientation(SWT.HORIZONTAL);
    sashForm.setLayoutData(new GridData(GridData.FILL_BOTH));

    layout = new GridLayout(2, true);
    layout.marginHeight = 5;
    sashForm.setLayout(layout);
    createSelectionArea(sashForm);
    createEditArea(sashForm);
  }
Ejemplo n.º 3
0
 @Override
 protected void performApply(ICResourceDescription src, ICResourceDescription dst) {
   IProject project = page.getProject();
   ICConfigurationDescription[] cfgs = page.getCfgsEditable();
   // Apply all changes to existing saved configurations and new configurations, but do not perform
   // deletions.
   AutotoolsConfigurationManager.getInstance().applyConfigs(project.getName(), cfgs);
 }
Ejemplo n.º 4
0
 private void createSelectionArea(Composite parent) {
   fTree = new TreeViewer(parent, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
   fTree.addSelectionChangedListener(event -> handleOptionSelection());
   fTree.getControl().setLayoutData(new GridData(GridData.FILL_BOTH));
   // Create a temporary default AutotoolsConfiguration to use for label info
   IAConfiguration tmp =
       AutotoolsConfigurationManager.getInstance()
           .createDefaultConfiguration(page.getProject(), "");
   fTree.setLabelProvider(new ToolListLabelProvider(tmp));
 }
  @Override
  public void createControls(Composite parent) {
    AutotoolsConfigurationManager.getInstance().clearTmpConfigurations(getProject());
    syncClones();

    super.createControls(parent);
    Composite composite = usercomp;

    settingsStore = AutotoolsConfigurePrefStore.getInstance();
    configToPageListMap = new HashMap<>();

    // assume parent page uses griddata
    GridData gd =
        new GridData(
            GridData.HORIZONTAL_ALIGN_CENTER
                | GridData.VERTICAL_ALIGN_FILL
                | GridData.FILL_HORIZONTAL
                | GridData.FILL_VERTICAL);
    composite.setLayoutData(gd);
    GridLayout layout = new GridLayout();
    //		layout.numColumns= 2;
    // PixelConverter pc= new PixelConverter(composite);
    // layout.verticalSpacing= pc.convertHeightInCharsToPixels(1) / 2;
    composite.setLayout(layout);

    // Create the sash form
    sashForm = new SashForm(usercomp, SWT.NONE);
    sashForm.setOrientation(SWT.HORIZONTAL);
    sashForm.setLayoutData(new GridData(GridData.FILL_BOTH));

    layout = new GridLayout(2, true);
    layout.marginHeight = 5;
    sashForm.setLayout(layout);
    createSelectionArea(sashForm);
    createEditArea(sashForm);

    //		usercomp.addControlListener(new ControlAdapter() {
    //			@Override
    //			public void controlResized(ControlEvent e) {
    //				specificResize();
    //			}});

  }
Ejemplo n.º 6
0
 @Override
 protected void performCancel() {
   AutotoolsConfigurationManager.getInstance().clearTmpConfigurations(page.getProject());
 }