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

Hi Walter,

thank you very much! This is _exactly_ what I have been looking for.

Many regards,
  Rainer

On Thu, Feb 25, 2016 at 6: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
>
>
>
>
> _______________________________________________
> 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