Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » raw container warnings
raw container warnings [message #428205] Fri, 13 March 2009 16:43 Go to next message
Michael Spertus is currently offline Michael SpertusFriend
Messages: 78
Registered: July 2009
Member
Sorry if this is a dumb question because I'm new to EMF, but when I try
running the EMF tutorial, I get many warning in the generated code like:

Collection is a raw type. References to generic type Collection<E> should
be
parameterized LibraryImpl.java library/src/org/eclipse/example/library/impl line
193 Java Problem

Is this serious? How should I proceed without sorting through dozens of
warnings every build?

Thanks,

Mike
Re: raw container warnings [message #428209 is a reply to message #428205] Fri, 13 March 2009 18:17 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33218
Registered: July 2009
Senior Member
Michael,

Comments below.


Michael Spertus wrote:
> Sorry if this is a dumb question because I'm new to EMF, but when I
> try running the EMF tutorial, I get many warning in the generated code
> like:
>
> Collection is a raw type. References to generic type Collection<E>
> should be parameterized LibraryImpl.java
> library/src/org/eclipse/example/library/impl line 193 Java Problem
>
> Is this serious? How should I proceed without sorting through dozens
> of warnings every build?
It sounds like you need to set the GenModel Compliance Level property to
5.0. Normally that would be the default for a new GenModel if you have
a 5.0 or higher JRE, but I seem to recall some issue where if you've
never created a Java project, the JDT default preferences aren't
properly available.

Definitely EMF should generate warning free Java 5.0 code, aat least
with regard to default JDT warnings.
>
> Thanks,
>
> Mike
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: raw container warnings [message #428217 is a reply to message #428209] Sat, 14 March 2009 04:00 Go to previous messageGo to next message
Michael Spertus is currently offline Michael SpertusFriend
Messages: 78
Registered: July 2009
Member
Ed Merks wrote:

> Michael,

> Comments below.


> Michael Spertus wrote:
>> Sorry if this is a dumb question because I'm new to EMF, but when I
>> try running the EMF tutorial, I get many warning in the generated code
>> like:
>>
>> Collection is a raw type. References to generic type Collection<E>
>> should be parameterized LibraryImpl.java
>> library/src/org/eclipse/example/library/impl line 193 Java Problem
>>
>> Is this serious? How should I proceed without sorting through dozens
>> of warnings every build?
> It sounds like you need to set the GenModel Compliance Level property to
> 5.0. Normally that would be the default for a new GenModel if you have
> a 5.0 or higher JRE, but I seem to recall some issue where if you've
> never created a Java project, the JDT default preferences aren't
> properly available.

> Definitely EMF should generate warning free Java 5.0 code, aat least
> with regard to default JDT warnings.
Thanks, that made the vast majority of the warnings go away. However, the
generated LibraryValidator.java and WriterValidator.java both still have
some of the same errors. However, they have a comment that they are not
real EMF artifacts, so maybe I can ignore.
>>
>> Thanks,
>>
>> Mike
>>
Re: raw container warnings [message #428219 is a reply to message #428217] Sat, 14 March 2009 11:17 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33218
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------050802060708000306010203
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Michael,

It sounds like you have the generator example actually installed in your
environment, and it generates additional example artifacts. I use this
JVM flag to disable it

-Dorg.eclipse.emf.examples.generator.validator=false

But generally you shouldn't have the examples installed in the IDE itself...


Michael Spertus wrote:
> Ed Merks wrote:
>
>> Michael,
>
>> Comments below.
>
>
>> Michael Spertus wrote:
>>> Sorry if this is a dumb question because I'm new to EMF, but when I
>>> try running the EMF tutorial, I get many warning in the generated
>>> code like:
>>>
>>> Collection is a raw type. References to generic type Collection<E>
>>> should be parameterized LibraryImpl.java
>>> library/src/org/eclipse/example/library/impl line 193 Java
>>> Problem
>>>
>>> Is this serious? How should I proceed without sorting through dozens
>>> of warnings every build?
>> It sounds like you need to set the GenModel Compliance Level property
>> to 5.0. Normally that would be the default for a new GenModel if you
>> have a 5.0 or higher JRE, but I seem to recall some issue where if
>> you've never created a Java project, the JDT default preferences
>> aren't properly available.
>
>> Definitely EMF should generate warning free Java 5.0 code, aat least
>> with regard to default JDT warnings.
> Thanks, that made the vast majority of the warnings go away. However,
> the generated LibraryValidator.java and WriterValidator.java both
> still have some of the same errors. However, they have a comment that
> they are not real EMF artifacts, so maybe I can ignore.
>>>
>>> Thanks,
>>>
>>> Mike
>>>
>
>

--------------050802060708000306010203
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Michael,<br>
<br>
It sounds like you have the generator example actually installed in
your environment, and it generates additional example artifacts.


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Problem with cross-document serialization
Next Topic:Removing generated icons from the ctool16 folder
Goto Forum:
  


Current Time: Tue Sep 24 14:50:51 GMT 2024

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

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

Back to the top