Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » How to use content-assist using inferred type arguments in Java 7?(how to change content assist setting)
How to use content-assist using inferred type arguments in Java 7? [message #805669] Thu, 23 February 2012 21:14 Go to next message
Eclipse UserFriend
Hi.

I'm using Eclipse 3.7 under Java 7, so I want to keep my complier compilance level in 1.7.

By the way, I'm working togehter who use Eclipse 3.6 (which one does not support compilance level 1.7). So although JRE is JavaSE-1.7, it compiles codes with 1.6 compilance level.

The problem is, because compiler under 1.7 does not support implicit type arguments (diamond) it marks error.
for example:
List<String> list1 = new ArrayList<>(); // It marked as error in eclipse 3.6


So I hope to set content assist to insert explicit type arguments (old style) rather than implicit type arguments (current style).


There is a way to change how the content assist works?
Re: How to use content-assist using inferred type arguments in Java 7? [message #805863 is a reply to message #805669] Fri, 24 February 2012 03:22 Go to previous message
Eclipse UserFriend
On 24.02.2012 03:14, a bc wrote:
> Hi.
>
> I'm using Eclipse 3.7 under Java 7, so I want to keep my complier
> compilance level in 1.7.
>
> By the way, I'm working togehter who use Eclipse 3.6 (which one does
> not support compilance level 1.7). So although JRE is JavaSE-1.7, it
> compiles codes with 1.6 compilance level.
>
> The problem is, because compiler under 1.7 does not support implicit
> type arguments (diamond) it marks error.
> for example:
> List<String> list1 = new ArrayList<>(); // It marked as error in
> eclipse 3.6
>
> So I hope to set content assist to insert explicit type arguments (old
> style) rather than implicit type arguments (current style).
>
>
> There is a way to change how the content assist works?
Yes, set the compliance to 1.6 on the projects which are shared with
co-workers using Eclipse 3.6. Content assist is not the only thing: if
you continue to use 1.7, then you might introduce/use APIs from the JRE
which won't be able for your co-workers.

Dani
Previous Topic:Adding jar in Deployment Assembly
Next Topic:How do I find out if current Eclipse installation is 432bit or 64bit WITHOUT starting it?
Goto Forum:
  


Current Time: Thu May 22 19:33:38 EDT 2025

Powered by FUDForum. Page generated in 0.02829 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top