Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 370813 - Features like IBMi need to be able to contribute their runtimes to the Java path
Summary: Features like IBMi need to be able to contribute their runtimes to the Java path
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P1 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Justin Spadea CLA
QA Contact:
URL:
Whiteboard: ibmi Extensibility_Runtime
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-07 07:25 EST by Joseph Vincens CLA
Modified: 2017-02-23 14:05 EST (History)
3 users (show)

See Also:


Attachments
Patch (11.54 KB, patch)
2012-02-26 05:47 EST, Yun Feng Ma CLA
lasher: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Vincens CLA 2012-02-07 07:25:43 EST
EDTRuntimeContainerInitializer.initialize adds the JavaRuntime to the project's classpath. This needs to be made extensible so feature plugs can contribute their runtime jars to the project's classpath.
Comment 1 Justin Spadea CLA 2012-02-07 07:52:45 EST
There is much less work here than you might think. What you need to do is allow for the contributions to a generator to also provide runtime containers. It would make sense to change AbstractGenerator.getRuntimeContainers() to return the generator's containers plus all the containers from its contributions. And then update the contributions to support the concept of runtime containers.

The rest should "just work". EDTRuntimeContainerInitializer will use this same method to find out all the containers it should initialize, same with the wizard that lets you manually add an EDT library to the Java build path of a project, as well as the Java generator which adds the containers to the build path if necessary.

To see how to define a new container, take a look at EDTCompilerIDEPlugin.JAVA_RUNTIME_CONTAINER.
Comment 2 Yun Feng Ma CLA 2012-02-26 05:47:48 EST
Created attachment 211631 [details]
Patch

Hi Justin, here is a patch, please review it. Thanks a lot.
Comment 3 Justin Spadea CLA 2012-02-28 11:13:58 EST
I've modified your original fix. The following were modified:

Context.java in edt.gen.java
FunctionTemplate.java in edt.java.templates.eglx.jtopen
EclipseEGL2Java.java and JavaGenerator.java in edt.ide.compiler
AbstractGenerator.java, EDTCoreIDEPlugin.java, and GenerationContributorEntry.java in edt.ide.core
plugin.properties and plugin.xml in edt.ide.jtopen

Now when you generate a part containing IBMi content, its contributed runtime is automatically added to the Java build path.
Comment 4 Joseph Vincens CLA 2012-03-08 12:51:47 EST
verified