Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Execute Eclipse Application with equinox launcher

Hi Sadik,

One option is to upstream your changes - i.e. provide a commit back to CDT. They you can just use release (or test out the pre-release CDT while you are waiting for the next release). The way the API designed is you extend org.eclipse.cdt.core.CIndex extentsion point with the ExportProjectProvider and pass the provider to the PDOMApplication. See https://help.eclipse.org/2019-12/topic/org.eclipse.cdt.doc.isv/reference/extension-points/org_eclipse_cdt_core_CIndex.html#e.ExportProjectProvider for details.

Of course you may know all the above already. If so, you need to build your fork of CDT. The full solution would be to setup your own build environment and use maven - but that may seem overkill.

What does not work, AFAIK, is exporting just the plug-in[0]. You need to export a feature and include a P2 repo. You can use org.eclipse.cdt.platform-feature, that is the smallest feature that includes org.eclipse.cdt.core [1]. When you export the feature, include a P2 repo:

image.png

Then you can install that P2 repo into an Eclipse installation. You should be able to install it into just the Eclipse Platform Binary (as labelled on https://download.eclipse.org/eclipse/downloads/drops4/R-4.14-201912100610/)[2]. Once installed you should be able to run PDOM like this:

eclipse -application "org.eclipse.cdt.core.GeneratePDOM" -data workspace -noSplash -consoleLog [... options ...]

I hope that this was helpful and you will consider contributing back your improvements to GeneratePDOM.

Jonah

[0] In theory this should work adding the jar to the dropins directory. That seems hit and miss as reported by others on this mailing list.
[1] You can try to write your own feature by using org.eclipse.cdt.platform-feature as a starting point and including only the minimum necessary, probably org.eclipse.cdt.core as a plug-in and the org.eclipse.cdt.native feature.
[2] You may have trouble installing this into an Eclipse installation that already has CDT in it due to version issues.







~~~
Jonah Graham
Kichwa Coders
www.kichwacoders.com


On Thu, 9 Jan 2020 at 17:57, Sadik Özoguz <soezoguz@xxxxxxxxxxx> wrote:
Hello everbody,

I'm struggling with the following problem. Maybe someone can point me in
the right direction.
There is this Application "GeneratePDOM" (in
core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/export/GeneratePDOM.java)
which can be used from the terminal. The following command can be
executed from inside the eclipse directory (where the subdirectory
"plugins" remains):

java -jar
plugins/org.eclipse.equinox.launcher_1.5.500.v20190715-1310.jar
-application "org.eclipse.cdt.core.GeneratePDOM" -source
/home/sadik/project-root/DemoProject -target
/home/sadik/project-root/DemoProject/Index.pdom -id test_index01 [ ...
maybe more options]

This works. I modified the application so that it suffices my needs,
like adding a few options. Now I want to use this modified Application
to be launched with the equinox launcher. What is the easiest way to do
this? Do I need to create a standalone eclipse?

I tried to simply export the org.eclipse.cdt.core plugin and replace the
jar file in plugins. My hope was that the equinox launcher will launch
GeneratePDOM from this jar file, but that's not what's happening.

Thank you in advance for any help!
Sadik

--
Sadik Özoguz
Verified Systems International GmbH
Geschäftsführerin Dr.-Ing. Cornelia Zahlten
HR B 18341 Amtsgericht Bremen
Am Fallturm 1
28359 Bremen, Germany
mail: soezoguz@xxxxxxxxxxx
tel:   +49 421 572 04-286
fax:   +49 421 572 04-22
http://www.verified.de

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

Back to the top