Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Set "Build configuration for the indexer" in workspace programmatically

I believe it's because of full index rebuild every time you change the active configuration. See
https://bugs.eclipse.org/bugs/show_bug.cgi?id=183781

Marc-Andre


From: cdt-dev-bounces@xxxxxxxxxxx [cdt-dev-bounces@xxxxxxxxxxx] on behalf of Alena Laskavaia [elaskavaia.cdt@xxxxxxxxx]
Sent: Thursday, 25 February 2016 8:30 AM
To: Brunauer, Walter
Cc: CDT General developers list.
Subject: Re: [cdt-dev] Set "Build configuration for the indexer" in workspace programmatically

Is there any reason it is not default in cdt (question to other committers)? I think its reasonable choice for being default setting.

On Thu, Feb 25, 2016 at 1:52 AM, Brunauer, Walter <Walter.Brunauer@xxxxxxxxxxxxx> wrote:

I guess we faced the same issue.

 

ICProjectDescriptionManager prjDescMgr= CCorePlugin.getDefault().getProjectDescriptionManager();

ICProjectDescriptionWorkspacePreferences prefs= prjDescMgr.getProjectDescriptionWorkspacePreferences(true);

prefs.setConfigurationRelations(ICProjectDescriptionPreferences.CONFIGS_LINK_SETTINGS_AND_ACTIVE);

prjDescMgr.setProjectDescriptionWorkspacePreferences(prefs, false, new NullProgressMonitor());

 

The snippet above should set the desired property.

 

And, FWIW, the plugin_customizeation.ini does not allow to set this. Its one of the rare properties which do not consider this file.

 

HTH,

 

Walter

 

From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Alena Laskavaia
Sent: Donnerstag, 25. Februar 2016 00:41
To: CDT General developers list.
Subject: Re: [cdt-dev] Set "Build configuration for the indexer" in workspace programmatically

 

I don't know how to do but I teach you how to fish.

You need eclipse plugin spy installed, this allow you to know what kinds of class contributing for an UI widget,
(see more http://www.vogella.com/tutorials/EclipseCodeAccess/article.html#pluginspy)

Press Alt+Shift+F1 

and see what kinds of class contributes a preference page.
Then jump to the class and find text corresponding the label (the text itself would be in localization bundle but you can find similar worlds),
you will probably find an ui component that passes constant for the property responsible for keeping this value.

You also need to find a what properties object (usually "store") contains this property and you can set it programmatically

Note that its probably not a good idea to override this programmatically, and better just to set it in plugin_customization.ini in your product

(Alternative you can do it without a spy by just searching the text of ui element in workspace with ALL cdt code checked out)

 

On Wed, Feb 24, 2016 at 5:35 PM, Rainer Poisel <rainer.poisel@xxxxxxxxx> wrote:

Hi,

can anyone please give me a hint how to set the value of "Build
configuration for the indexer" to "Use active build configuration" for
the current workspace in use programmatically?

Alternatively it would also be ok to adjust this setting for the
current project to the aforementioned value.

Thanks for your help in advance,
  Rainer
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/cdt-dev

 



Back to the top