Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Plugin-dev:Change build/compiler settings
Plugin-dev:Change build/compiler settings [message #1072726] Tue, 23 July 2013 07:37 Go to next message
Eclipse UserFriend
I am not sure if this is the right place to post this.. I got a question on stackoverflow which I need an answer for..


I am using a plugin that just defines compiler settings for the CDT-Plugin in Eclipse.

http://i.stack.imgur.com/ddZsn.png

Now I want to write a plugin that, let's say, let me choose an arbitrary processor and sets specific compiler options automatically e.g. it sets the value for `--code-size`.

http://i.stack.imgur.com/UnidZ.png

And here is what I would like to do:

When the project is created, I would like to configure the compiler when the user clicks the finish button. The following code is just an example of what I'd like to achieve:


    public class SelectDeviceWizardPageRunner extends Wizard implements Runnable {
    
      public SelectDeviceWizardPageRunner() {
      }
    
      @Override
      public void run() {
        // Performed when user clicks finish
    
        /* Just ignore this .. */
        IWizardPage pages[] = MBSCustomPageManager.getPages();
        IWizardPage page = pages[pages.length - 1];
    
        if (page instanceof SelectDeviceWizardPage) {

          SelectDeviceWizardPage finalPage = (SelectDeviceWizardPage) page;
          System.out.println("You selected controller: " + finalPage.getSelectedItem());

          if(finalPage.getSelectedItem().equals("Intel XYZ") {
            Option opt = MagicHelper.getElementByID("sdcc.c.compiler.category.other.codesize");
            opt.setValue("12345"); // set value --code-size 
          }
      }
    }



So is there any way to access these predefined options so I can set their values?

[Updated on: Tue, 23 July 2013 07:39] by Moderator

Re: Plugin-dev:Change build/compiler settings [message #1072727 is a reply to message #1072726] Tue, 23 July 2013 07:37 Go to previous messageGo to next message
Eclipse UserFriend
This is my 5th post (so I can add links and pictures to my top post here..)

[Updated on: Tue, 23 July 2013 07:40] by Moderator

Re: Plugin-dev:Change build/compiler settings [message #1073238 is a reply to message #1072727] Wed, 24 July 2013 07:20 Go to previous messageGo to next message
Eclipse UserFriend
It is better to ask this question on the CDT dev mailing list.
Re: Plugin-dev:Change build/compiler settings [message #1080027 is a reply to message #1072726] Mon, 05 August 2013 07:33 Go to previous message
Eclipse UserFriend
Well thank you for that suggestion but after waiting for days I still got no answer to this question from the CDT developers...

[Updated on: Mon, 05 August 2013 07:33] by Moderator

Previous Topic:Makefile license
Next Topic:Creating project from existing folder or makefile
Goto Forum:
  


Current Time: Fri May 23 14:51:20 EDT 2025

Powered by FUDForum. Page generated in 0.03594 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top