Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 11:37 Go to next message
Stefan Snooc is currently offline Stefan SnoocFriend
Messages: 12
Registered: January 2013
Junior Member
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 11:39]

Report message to a moderator

Re: Plugin-dev:Change build/compiler settings [message #1072727 is a reply to message #1072726] Tue, 23 July 2013 11:37 Go to previous messageGo to next message
Stefan Snooc is currently offline Stefan SnoocFriend
Messages: 12
Registered: January 2013
Junior Member
This is my 5th post (so I can add links and pictures to my top post here..)

[Updated on: Tue, 23 July 2013 11:40]

Report message to a moderator

Re: Plugin-dev:Change build/compiler settings [message #1073238 is a reply to message #1072727] Wed, 24 July 2013 11:20 Go to previous messageGo to next message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
It is better to ask this question on the CDT dev mailing list.

Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: Plugin-dev:Change build/compiler settings [message #1080027 is a reply to message #1072726] Mon, 05 August 2013 11:33 Go to previous message
Stefan Snooc is currently offline Stefan SnoocFriend
Messages: 12
Registered: January 2013
Junior Member
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 11:33]

Report message to a moderator

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


Current Time: Thu Apr 25 20:19:00 GMT 2024

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

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

Back to the top