Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 431659

Summary: Change jface.text execution environment to JavaSE-1.7
Product: [Eclipse Project] Platform Reporter: John Glassmyer <eclipse>
Component: TextAssignee: John Glassmyer <eclipse>
Status: CLOSED DUPLICATE QA Contact:
Severity: enhancement    
Priority: P3 CC: akurtakov, daniel_megert, eclipse.sprigogin
Version: 4.4   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description John Glassmyer CLA 2014-03-31 13:25:31 EDT
Change the minimum execution environment for org.eclipse.jface.text from J2SE-1.4 to JavaSE-1.6.  This will allow the use of Java 1.5 and 1.6 language features in ongoing development of internal jface.text classes.

Note that this bug neither requires nor suggests any changes to public API classes of jface.text or to existing jface.text code; it is assumed that those things would be proposed and tracked separately if and when they were deemed appropriate.

This change simply allows the use of generics, enums, and other language features introduced since Java 1.4 to facilitate development and avoid the accumulation of technical debt within internal jface.text code.
Comment 1 John Glassmyer CLA 2014-03-31 14:25:45 EDT
I've uploaded a change for this at https://git.eclipse.org/r/24218 .

It includes Eclipse's automatic updates to jdt.core warning and error prefs, with the exception that I have changed "unchecked" and "raw type" warnings to "Ignore" to avoid creating lots of distracting warnings throughout the code.

I did address a couple of warnings that were newly applicable in 1.6:
- One instance where close() was not being called on a Closeable.
- Unnecessary array type-casts in two files.
Comment 2 John Glassmyer CLA 2014-05-14 10:19:14 EDT
Ping. Does my patch look good?
Comment 3 Dani Megert CLA 2014-05-14 10:25:59 EDT
We're at RC1 and won't make such changes at this point.

In Text and JDT we usually generify the project when switching to > 1.4.
Comment 4 Sergey Prigogin CLA 2015-07-23 19:10:27 EDT
(In reply to John Glassmyer from comment #1)

Changing "unchecked" and "raw type" warnings to "Ignore" is a bad idea. As Dani said, a real move to Java 1.6 should include generification of the code.
Comment 5 Dani Megert CLA 2015-07-24 02:50:08 EDT
(In reply to Sergey Prigogin from comment #4)
> (In reply to John Glassmyer from comment #1)
> 
> Changing "unchecked" and "raw type" warnings to "Ignore" is a bad idea. As
> Dani said, a real move to Java 1.6 should include generification of the code.

John, any plans to work on that for M1?
Comment 6 John Glassmyer CLA 2015-07-24 09:15:48 EDT
(In reply to Dani Megert from comment #3)
> In Text and JDT we usually generify the project when switching to > 1.4.

Sounds good to me. When I filed this bug last year, I had gotten the perhaps mistaken impression from discussion on bug 421017 that expected Eclipse practice was to temporarily ignore the warnings.

Does switching to 1.6 still make sense? It looks like some other projects are switching to 1.7.
Comment 7 Dani Megert CLA 2015-07-24 09:17:49 EDT
(In reply to John Glassmyer from comment #6)> Does switching to 1.6 still make sense? It looks like some other projects
> are switching to 1.7.

+1.
Comment 8 Dani Megert CLA 2015-07-30 11:08:41 EDT
(In reply to John Glassmyer from comment #6)
> (In reply to Dani Megert from comment #3)
> > In Text and JDT we usually generify the project when switching to > 1.4.
> 
> Sounds good to me.

John, FYI: M1 is next week, which means last chance to put the code in is next Monday. I suggest we move this to M2.
Comment 9 Alexander Kurtakov CLA 2017-06-27 11:07:05 EDT

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