Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-dev] Programatically getting settings from the current project

You can get the selection by doing something like CView.getViewer().getSelection(CView.getViewer().getControl()).

 

You will want to most likely respond to selection events so that you know when this selection changes.  Implement ISelectionListener in your class and register for event notifications…  getSite().getPage().addSelectionListener(“org.eclipse.cdt.ui.CView”, this)

 

Once you  have the selection you should be able to convert this to a resource that is selected in the tree.

 

As far as getting the build information, you can do ManagedBuildManager.getBuildInfo(resource.getProject()) and go from there to get all the info you need as to which toolchain and configuration are selected.

 

___________________________________________

 

Chris Recoskie

Software Designer

IDE Frameworks Group

Texas Instruments, Toronto

 

 


From: cdt-dev-admin@xxxxxxxxxxx [mailto:cdt-dev-admin@xxxxxxxxxxx] On Behalf Of Ploett Norbert
Sent: Wednesday, March 02, 2005 6:51 AM
To: cdt-dev@xxxxxxxxxxx
Subject: [cdt-dev] Programatically getting settings from the current project

 

Hello folks,

 

I want to write an external tool which will transfer the output of a selected managed make project to the target machine. So I need to find out

 

- which project is currently selected in the C/C++ projects navigator

- which configuration of this project is currently activated and

- what the name of output artifact is.

 

Can you give me any hints on how to gather this information?

 

Regards,

 

 

Norbert Plött

 


Back to the top