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

Hello Sadik,

Every contribution is valuable! You can create a bugzilla ticket and describe the problem there. The additional arguments you are trying  to add may be interesting for others.

Regards,
AF

10.01.2020 17:58, Jonah Graham пишет:
Hello Sadik,

Don't underestimate the value to others :-) Even if not directly applicable, your ideas may inspire others.

If you export the feature (I would do it as a ZIP to make it easier to share) then your zip should have these contents:

├── artifacts.jar
├── content.jar
├── features
│   ├── org.eclipse.cdt.native_9.11.0.202001092216.jar
│   └── org.eclipse.cdt.platform_9.11.0.202001092216.jar
└── plugins
    ├── org.eclipse.cdt_9.11.0.202001092216.jar
    ├── org.eclipse.cdt.codan.checkers_3.3.400.202001092216.jar
    ├── org.eclipse.cdt.codan.checkers.ui_3.2.100.202001092216.jar
    ├── org.eclipse.cdt.codan.core_4.0.200.202001092216.jar
    ├── org.eclipse.cdt.codan.core.cxx_3.4.200.202001092216.jar
    ├── org.eclipse.cdt.codan.ui_3.3.400.202001092216.jar
    ├── org.eclipse.cdt.codan.ui.cxx_3.5.100.202001092216.jar
    ├── org.eclipse.cdt.core_6.10.100.202001092216.jar
    ├── org.eclipse.cdt.core.linux_5.3.1.202001092216.jar
    ├── org.eclipse.cdt.core.linux.x86_64_5.3.1.202001092216.jar
    ├── org.eclipse.cdt.core.native_5.10.300.202001092216.jar
    ├── org.eclipse.cdt.debug.core_8.4.0.202001092216.jar
    ├── org.eclipse.cdt.debug.ui_8.3.300.202001092216.jar
    ├── org.eclipse.cdt.doc.user_5.4.400.202001092216.jar
    ├── org.eclipse.cdt.dsf_2.8.200.202001092216.jar
    ├── org.eclipse.cdt.dsf.ui_2.5.300.202001092216.jar
    ├── org.eclipse.cdt.make.core_7.4.100.202001092216.jar
    ├── org.eclipse.cdt.make.ui_7.3.200.202001092216.jar
    ├── org.eclipse.cdt.managedbuilder.core_8.7.300.202001092216.jar
    ├── org.eclipse.cdt.managedbuilder.ui_9.1.500.202001092216.jar
    ├── org.eclipse.cdt.native.serial_1.1.300.202001092216.jar
    ├── org.eclipse.cdt.ui_6.7.0.202001092216.jar
    └── org.eclipse.tools.templates.freemarker.java11_1.1.2.201911192140.jar

No P2 directory, the P2 info is in artifacts and content.jar files.

Once you have the zip, in Eclipse do Help -> Install New Software -> Press Add button -> Press Archive -> Select the zip file -> Uncheck Group items by category -> Select C/C++ Development Platform and complete the wizard.*

After you close Eclipse you should be able to do command line from my previous email.

Let me know which (if any) step goes amiss.

Jonah



* This can be done at the command line too BTW if you need to automate in the future - http://help.eclipse.org/latest/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/p2_director.html


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


On Fri, 10 Jan 2020 at 09:42, Sadik Özoguz <soezoguz@xxxxxxxxxxx> wrote:

Hi Jonah,

Thanks for the explanation. I definitely intend to commit back in the future, but not for this one. I don't feel to be competent enough yet to contribute. In this case I think my modifications are 0% interesting for others.

It seems that there is a lot I'm missing for this Application stuff: When exporting the feature, no P2 repo is generated (although the option is checked). My expectation was that a directory p2 is created in location I specified. I only get a feature directory with the generated features in it. To be honest, I didn't understand the installation step you described.

>> 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].

Assuming I have that P2 repo, how can I install it?

On 10/01/2020 04.33, Jonah Graham wrote:
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

_______________________________________________
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
-- 
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

_______________________________________________
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