Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Java9/Use cases

< Java9
Revision as of 02:35, 10 November 2016 by Jarthana.in.ibm.com (Talk | contribs)

We will write down user scenarios and use cases related to Java modules here that will eventually become part of existing features or new features.

Creation of module-info

  • User manually creates a module-info, similar to package-info.
    • The created module info has just the module name and an empty body.
  • A new wizard/dialogue to create a blank module-info or to create one from the existing project
    • Wizard pulls out all the packages in the project (sources only) across all source folders

and also picks up the modules used by project and populates the module-info

Completion

  • Completions offered on all keywords depending on context (for e.g. exports 'to', provides 'with')
  • Completions offered on all packages and types depending on the scope and context (scopes being discused in bug bug 507288)
  • Compiler allows/rejects packages and types depending on scope and context.

Quick assist

  • Fill in

Quick fix

  • Unresolved package in 'exports'
    • Offer to create the package?
  • Unresolved type in 'with' clause
    • Offer to create an empty type that implements the mentioned service.
  • Unresolved type in 'provides' clause
    • ?
  • 'with' does not implement 'provides'
    • Offer to make the implementation implement the interface

Hover

  • Hover on module names (the whole name, not just fragements) should display the module name
    • When and if the spec allows Javadoc, then the documenation should be displayed in the hover
  • Hover on all package and type names should work like everywhere else.

Code navigation

  • Action on module should open the module-info.java or module-info.class
  • Action on package names should open the package-info if present.
  • Action on any types, should open the type, even those in other modules than the current one.

Using legacy Jar files in a module project

  • Legacy Jar files or class folders continue to be supported by Java module projects. To be able to use them, the user

adds the path to the build path, as he normally would. In addition to that, he can choose to tell the compiler whether or not promote a Jar as automatic modules. The compiler seems an automatic module differently from an unnamed module. The IDE should allow the user to do this (bug 506878)

  • Similar support would be provided in command line compiler as well, but the distinction between automatic and unnamed modules is made based on where the Jar path is found, in the -modulepath or -classpath.

Outline View

  • Add more here

Back to the top