Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: for the plan.

Jump to: navigation, search

Eclipse and Jigsaw modules

See also: bug 479483 - [1.9] Define what is Module in Eclipse


  • A module (binary/source) in Eclipse is represented by an IPackageFragmentRoot. (Note: It will be represented by others too, for e.g. ClasspathEntry, ClasspathDirectory etc. depending on the context)
  • API: IPackageFragmentRoot#isModule. (Note: Clearly this API needs rethinking. Perhaps it should denote whether or not it is a named module)
  • Binary modules (as JARs): Above API returns true for ModulePackageFragmentRoot
  • Source modules (as source folders):

- What is the criterion for a source folder to be a module (for the API to return true)? - Presence of file in it?

- If some source folder in a project does not contain a file, is it considered as an "unnamed module"?

- In that case, will the API return true for all source folders? Then, how do we differentiate between named and unnamed modules via API, or we don't need to?

- Can we have multiple source folders in a project, each having its own file? Hence, having multiple modules in a project. file

  • How to create a file in a source folder?

1) File > New > File > Select the source folder and create file.

2) A new option on "New Source Folder" dialog to create it along with the source folder? (Similar to on "New Java Package" dialog.)

  • Place the file in the default package of that source folder.
  • The file will have the normal "J" icon of a .java file.

Functionality required in editor

  • Formatter
  • Content assist for keywords, modules, types etc.
  • Syntax coloring for keywords, modules, types etc.
  • Mark occurrences
  • Javadoc hover on type names
  • Navigation (Ctrl+click) to types
  • ...

Handling modulepath


Representing layers


Back to the top