Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Project conversion, indexer and include path settings programmatically

Hi list,

beginning from an IProject I would like to convert this project to a
CDT-project (1), defer the indexing of C-Sources (2) and set a few
include paths (3) programmatically.

===== Goal 1 =====

So far I have found out that there seem to be two potential ways to
achieve goal (1):
  * "convertProjectToC()"-method of CCorePlugin or
  * "convertProjectToNewC()"-method of CCorePlugin

I am able to call these methods, however, the only thing that happens
is that a new nature is added to the .project file. The added
.cproject file is pretty empty when compared to a .cproject file of a
C-project created using the CDT wizards.

Regarding (1): What is the preferred way to convert a standard
IProject to a CDT-project?

===== Goal 2 =====

>From the following link I have learned that it should be possible to
defer the indexing of C-Sources:
  * http://dev.eclipse.org/mhonarc/lists/cdt-dev/msg13072.html

However, I would need an ICProject in order to invoke
"notifyIndexerSetup()" from IndexerSetupParticipant.

Regarding (2): What is the preferred way to obtain an ICProject from
an IProject? Or what should be done to invoke "notifyIndexerSetup()"
properly?

===== Goal 3 =====

In order to achieve goal (3) we found the following resources:
  * https://www.eclipse.org/forums/index.php/t/310469/ and
  * https://wiki.eclipse.org/CDT/Developer/FAQ#How_do_I_contribute_Include.2FLibrary_paths_or_Macros_to_a_project_configuration_using_externalSettingsProvider_extension_point.3F

The procedure mentioned in the CDT-wiki (extension point solution)
looks appealing to us, however, we managed to add the include paths as
external settings, however, they were not considered by the CDT. We
guess, that this issue has to do with problem (1) mentioned above.

Regards and thanks a million for your help,
  Rainer


Back to the top