Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 522599 - [9] Error not present on empty Contents tab on opening
Summary: [9] Error not present on empty Contents tab on opening
Status: CLOSED DUPLICATE of bug 525213
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.7   Edit
Hardware: All All
: P3 minor (vote)
Target Milestone: 4.7.1a   Edit
Assignee: Stephan Herrmann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 521666
Blocks:
  Show dependency tree
 
Reported: 2017-09-21 12:42 EDT by Noopur Gupta CLA
Modified: 2017-09-26 17:10 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Noopur Gupta CLA 2017-09-21 12:42:13 EDT
- Create two Java 9 projects P1 and P2.
- In P1, add project dependency to P2 in Modulepath node.
- Expand P2, double-click on "Is modular" to open Module properties.
=> All sections are empty, but there is no error on the dialog.
- Click on Details tab. We see an error that "Error exists on Contents tab".
- Switch to Contents tab. We can see the error "Must include at least one module" now.
Comment 1 Stephan Herrmann CLA 2017-09-22 12:02:20 EDT
IIRC I intentionally suppress the initial error, to follow the UI guideline that dialogs should never open with an error.

If the error is justified, which behavior would you expect?

Maybe we have to disable opening the dialog in some situations?

Or, is the actual bug that P2 should be considered as an automatic module and thus its module name should be shown in the "Included ... " section?
Comment 2 Stephan Herrmann CLA 2017-09-26 17:10:22 EDT
This exact scenario is fixed via bug 525213, viz. we now understand P2 as an automatic module, and hence no error is raised.

This is specific to project dependencies.

When adding a non-modular jar, we only understand the automatic module after "Apply". In that case the new validation rules from bug 522286 comment 55 help: no modules in Contents is no longer an error (the existing error is only raised if modules are known but none is "included").

*** This bug has been marked as a duplicate of bug 525213 ***