Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 546230 - [12] Enable Preview Project Properties are required to be set even if they are enabled in workspace preference
Summary: [12] Enable Preview Project Properties are required to be set even if they ar...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.12   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 4.13 M3   Edit
Assignee: Kalyan Prasad Tatavarthi CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 531927 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-04-09 05:42 EDT by Sarika Sinha CLA
Modified: 2020-07-26 07:37 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sarika Sinha CLA 2019-04-09 05:42:58 EDT
Steps to reproduce -
1. Launch a new workspace
2. Add 12 JRE as default JRE
3. Set the Workspace compliance to 12 and Enable Preview feature with Ignore option
4. Create a Java 12 project
5. I get option to enable preview for project property on this code -
switch (day) {
		case SATURDAY, SUNDAY -> System.out.println("Weekend");
		case MONDAY, TUESDAY, WEDNESDAY -> System.out.println("Weekday");
		}

I thought If we have enabled at workspace level, it is not required for each project.
Comment 1 Noopur Gupta CLA 2019-04-09 06:08:25 EDT
Kalyan, please check.
Comment 2 Sarika Sinha CLA 2019-04-10 00:22:33 EDT
I got the input form Kalyan that If "Defualt JRE" option is used while creating the java project, Project Specific setting will not be created and hence this will work. 
So 2 things -
1. How a user is supposed to know that selecting default JRE will have this impact?
2. When user does not select "Default JRE" the newly created Project properties should not use workspace specific settings as default values ?
Comment 3 Kalyan Prasad Tatavarthi CLA 2019-04-10 02:14:59 EDT
(In reply to Sarika Sinha from comment #2)
> I got the input form Kalyan that If "Defualt JRE" option is used while
> creating the java project, Project Specific setting will not be created and
> hence this will work. 
> So 2 things -
> 1. How a user is supposed to know that selecting default JRE will have this
> impact?

The JavaDoc associated with the New Java Project Creation Wizard specifies the impact of selecting default JRE

> 2. When user does not select "Default JRE" the newly created Project
> properties should not use workspace specific settings as default values ?

We will need to figure out a way for giving user the preference to inherit or not, based on EE or selected JRE matching the Default JRE. This could be a new workspace preference.  This could be turned off by default and only turned on for people who need it.

Please provide your inputs too.
Comment 4 Dani Megert CLA 2019-05-30 11:12:56 EDT
Is this planned for 4.13?
Comment 5 Eclipse Genie CLA 2019-08-07 06:34:42 EDT
New Gerrit change created: https://git.eclipse.org/r/147177
Comment 6 Kalyan Prasad Tatavarthi CLA 2019-08-07 06:37:14 EDT
(In reply to Eclipse Genie from comment #5)
> New Gerrit change created: https://git.eclipse.org/r/147177

After discussion with Sarika, it was decided that fixing Point 1 of Comment 2 would be sufficient as pint 2 would be very complicated to implement. So the above fix addresses Point 1 of Comment 2.
Comment 8 Kalyan Prasad Tatavarthi CLA 2019-08-20 06:43:39 EDT
Verified in the build I20190819-2355
Comment 9 Kalyan Prasad Tatavarthi CLA 2020-07-26 07:37:47 EDT
*** Bug 531927 has been marked as a duplicate of this bug. ***