Community
Participate
Working Groups
PDE project should be able to support existence of module-info file in the project. There should be a way to either work with PDE manifest file or module-info file via an option ( ? ).
One way could be show an error marker in module-info file in a PDE project. In quick-fix, there can be an option to remove module-info file from build path.
New Gerrit change created: https://git.eclipse.org/r/105658
The gerrit in previous comment removes "Create module-option.java" in PDE project.
New Gerrit change created: https://git.eclipse.org/r/105659
Created attachment 270328 [details] tentative quickfix
Gerrit change https://git.eclipse.org/r/105658 was merged to [R4_7_maintenance]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=f7c4a4ba416535d63d93974abf4d5f5aae9330fa
Till the time module-info.java is handled in pde project and module system of java9 and OSGI system can work together, removing the option is the best option it messes up the workspace. I will track if java9 modularity+ OSGI can work together via a separate bug.
I will abandon the rest of the changes on this bug for the time being.
Verified comment#3 in Version: Oxygen.1a (4.7.1a) Build id: M20170926-1700
*** Bug 525652 has been marked as a duplicate of this bug. ***
(In reply to Noopur Gupta from comment #10) > *** Bug 525652 has been marked as a duplicate of this bug. *** Should we reconsider the fix here? While I agree that in an ideal world you need EITHER a manifest OR module-info, but that world hasn't arrived, and thus I don't see a strong reason for hiding the wizard in PDE projects.
>>strong reason for hiding the wizard in PDE projects As of now, creating module-info.java messes up the plugin as a whole and create module info in plugin project creates module-info ( based on plugin project) that looks incorrect. There are alternate ways to add module-info. Once module-info doesn't mess up the plugin project ( and when there is more support for module-info), we can enable this. What do you think?
(In reply to Vikas Chandra from comment #12) > >>strong reason for hiding the wizard in PDE projects > > As of now, creating module-info.java messes up the plugin as a whole and > create module info in plugin project creates module-info ( based on plugin > project) that looks incorrect. Can you give an example? Perhaps, you mean problems relating to require plug-ins that don't yet have module-info? Makes me think: perhaps we should generally give a warning if the wizard finds required classes in an unnamed module? Those will no longer be accessible after adding module-info.java. Or is this handled already? > There are alternate ways to add module-info. Which? Noopur keeps pointing to "Create module-info.java" wizard as the preferred way of creating this files.
(In reply to Stephan Herrmann from comment #13) > Noopur keeps pointing to "Create module-info.java" wizard as the preferred > way of creating this files. (In reply to Vikas Chandra from comment #12) > There are alternate ways to add module-info. Are you talking about manually adding the module-info file? The wizard brings lot more than just creating the module-info. It finds and puts all the packages (in exports section) and required modules in the module-info. Probably we can further enhance the wizard to fill up other sections such as provides, uses etc. too. So, no question that the wizard is the preferred way.
Create module-info for Hello World plugin projects creates module P9 { exports p9.handlers;requires org.eclipse.core.commands.3.9.0.v20170530; requires org.eclipse.jface.3.13.1.v20170810; requires org.eclipse.swt.win32.win32.x86.64.3.106.1.v20170829; requires org.eclipse.ui.workbench.3.110.1.v20170704; } This module-info already has lot of syntax errors ( no quick-fixes for those errors) and it does no good and breaks the workspace. I see a lot of 'Syntax error on tokens, delete this token". Are you suggesting we should create an empty module-info file for PDE project? If we are to create a module info file, at least it shouldn't have syntax error or have a quickfix for them?
>>Can you give an example? Create a hello world command plugin project in PDE and then create a module-info ( you can use pre 25th sept java9 build or locally revert comment#6 and try in launched workspace).
(In reply to Vikas Chandra from comment #15) > Create module-info for Hello World plugin projects creates > module P9 { > exports p9.handlers;requires org.eclipse.core.commands.3.9.0.v20170530; > requires org.eclipse.jface.3.13.1.v20170810; > requires org.eclipse.swt.win32.win32.x86.64.3.106.1.v20170829; > requires org.eclipse.ui.workbench.3.110.1.v20170704; > } > > > This module-info already has lot of syntax errors ( no quick-fixes for those > errors) and it does no good and breaks the workspace. > > I see a lot of 'Syntax error on tokens, delete this token". All this should go away when bug 525660 is implemented and used :) For now I see your point.
>> bug 525660 is implemented and used This is one of the highest priority on my list now. And we will "surely" revisit this issue post that fix.