Questions about the usage of module with JDT 3.13.50

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Questions about the usage of module with JDT 3.13.50

Simon Urli
Hello,

I'm using the JDT core library for an open-source projet which analyzes
and transform java source code (for more information:
https://github.com/INRIA/spoon/)

I'm trying to put in our library the concept of java modules introduced
by JDK9. I saw that with the release of JDT 3.13.50, this concept is
available in JDT through ModuleDeclaration.

But I have some issues when using JDT with modules.
So first of all: is there any documentation about the usage of JDT core
which documents module, module declaration and anything related to those
concepts? It could help me a lot for the future :)

Secondly: I saw that there is new arguments "-module-source-path" and
"-module-path" in JDT. What are the differences between them? And are
they useful when building a project with a unique module?

Apparently in https://bugs.eclipse.org/bugs/show_bug.cgi?id=487421#c2 
Jay Arthanareeswaran said that module-source-path should not be used for
single module: should this comment be taken as a documentation?

For information, I tried to use JDT on a simple projet with one module
and I have errors like "The package XXX does not exist or is empty".
I spotted that a bug
(https://bugs.eclipse.org/bugs/show_bug.cgi?id=525603) like this has
been fixed recently, so I imagine my error will be fixed to the next
release... which led me to the next question:

is there already a planned date for the next maven release of JDT?

Finally, in my library I'm trying to assign to each type the module it
belongs to: is there a way to know from a TypeDeclaration or its
CompilationUnit scope in which module the type is declared?

Thanks for your clarification,

Simon.


_______________________________________________
jdt-core-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jdt-core-dev
Reply | Threaded
Open this post in threaded view
|

Re: Questions about the usage of module with JDT 3.13.50

Jayaprakash Arthanareeswaran
Hi Simon,
 
The Java model elements such as ModuleDeclaration have some documentation in form of Javadoc. Do let us know if you would like to see specific details.
 
The compiler arguments such as --module-source-path etc. are specified by JEP 261, which is implemented by JDT compiler.
 
Regards,
Jay
 
----- Original message -----
From: Simon Urli <[hidden email]>
Sent by: [hidden email]
To: [hidden email]
Cc:
Subject: [jdt-core-dev] Questions about the usage of module with JDT 3.13.50
Date: Fri, Dec 1, 2017 7:28 PM
 
Hello,

I'm using the JDT core library for an open-source projet which analyzes
and transform java source code (for more information:
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_INRIA_spoon_&d=DwICAg&c=jf_iaSHvJObTbx-siA1ZOg&r=LuMqcl3PU0i2olgTvkVvFthzqyc_3wGfGooplpAvFsc&m=Gl_FXaBCJSXf-rdftSgWuMKs33e0kY5ZS1eK2UCKCfI&s=byG3ERisF-ThmDKjUWjXT3WkjH37IuJ4ZoH14aTuAhQ&e=)

I'm trying to put in our library the concept of java modules introduced
by JDK9. I saw that with the release of JDT 3.13.50, this concept is
available in JDT through ModuleDeclaration.

But I have some issues when using JDT with modules.
So first of all: is there any documentation about the usage of JDT core
which documents module, module declaration and anything related to those
concepts? It could help me a lot for the future :)

Secondly: I saw that there is new arguments "-module-source-path" and
"-module-path" in JDT. What are the differences between them? And are
they useful when building a project with a unique module?

Apparently in https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.eclipse.org_bugs_show-5Fbug.cgi-3Fid-3D487421-23c2&d=DwICAg&c=jf_iaSHvJObTbx-siA1ZOg&r=LuMqcl3PU0i2olgTvkVvFthzqyc_3wGfGooplpAvFsc&m=Gl_FXaBCJSXf-rdftSgWuMKs33e0kY5ZS1eK2UCKCfI&s=ghi186tKEs7pbbfGqtFc0g-u0Ah3qrClEie0gWg47ls&e= 
Jay Arthanareeswaran said that module-source-path should not be used for
single module: should this comment be taken as a documentation?

For information, I tried to use JDT on a simple projet with one module
and I have errors like "The package XXX does not exist or is empty".
I spotted that a bug
(https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.eclipse.org_bugs_show-5Fbug.cgi-3Fid-3D525603&d=DwICAg&c=jf_iaSHvJObTbx-siA1ZOg&r=LuMqcl3PU0i2olgTvkVvFthzqyc_3wGfGooplpAvFsc&m=Gl_FXaBCJSXf-rdftSgWuMKs33e0kY5ZS1eK2UCKCfI&s=-pXuZgCnGQvaYRHxb6rsxT_TT3NNLFYcYZf6AHsE4sc&e=) like this has
been fixed recently, so I imagine my error will be fixed to the next
release... which led me to the next question:

is there already a planned date for the next maven release of JDT?

Finally, in my library I'm trying to assign to each type the module it
belongs to: is there a way to know from a TypeDeclaration or its
CompilationUnit scope in which module the type is declared?

Thanks for your clarification,

Simon.


_______________________________________________
jdt-core-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://urldefense.proofpoint.com/v2/url?u=https-3A__dev.eclipse.org_mailman_listinfo_jdt-2Dcore-2Ddev&d=DwICAg&c=jf_iaSHvJObTbx-siA1ZOg&r=LuMqcl3PU0i2olgTvkVvFthzqyc_3wGfGooplpAvFsc&m=Gl_FXaBCJSXf-rdftSgWuMKs33e0kY5ZS1eK2UCKCfI&s=bfR79VyPypmn4U7U-Mi8hef03PRjA7HXLHvVfYST6UQ&e=

 
 


_______________________________________________
jdt-core-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jdt-core-dev