Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » OCL GIT repository @NotNull annotations
OCL GIT repository @NotNull annotations [message #1445525] Wed, 15 October 2014 15:07 Go to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
I am getting compiler error for annotation

"type annotations are available only when source level is at least 1.8"

I want my application to be compatible to JRE 1.6 as well. Is there a good solution for that?

Cheers

Re: OCL GIT repository @NotNull annotations [message #1445529 is a reply to message #1445525] Wed, 15 October 2014 15:11 Go to previous messageGo to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 295
Registered: March 2012
Senior Member
On 15/10/2014 17:07, ModelGeek Mising name wrote:
> I am getting compiler error for annotation
> "type annotations are available only when source level is at least 1.8"
>
> I want my application to be compatible to JRE 1.6 as well. Is there a
> good solution for that?
>
> Cheers
>
>
I think this is a compile-time only problem, that I had previously
solved by importing the jdt.annotations bundle into the workspace.
Re: OCL GIT repository @NotNull annotations [message #1445530 is a reply to message #1445525] Wed, 15 October 2014 15:15 Go to previous messageGo to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
I have also fixed this by providing pluging (org.eclipse.jdt.annotations) range from 1.0.0 (inc) to 2.0.0(excl).

Re: OCL GIT repository @NotNull annotations [message #1445643 is a reply to message #1445530] Wed, 15 October 2014 18:41 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Yes unfortunately the jdt.annotation approach in 1.0 is significantly
different to 2.0 where better language support can be exploited.

I tried to persuade them to avoid this apparent breakage without
success. As you've noticed, you must choose explicitly 1.x or 2.x.

It is indeed a source only problem which is why previous approaches do
not extrapolate to a solution.

Regards

Ed Willink



On 15/10/2014 16:15, ModelGeek Mising name wrote:
> I have also fixed this by providing pluging
> (org.eclipse.jdt.annotations) range from 1.0.0 (inc) to 2.0.0(excl).
>
>
Re: OCL GIT repository @NotNull annotations [message #1446053 is a reply to message #1445643] Thu, 16 October 2014 09:41 Go to previous messageGo to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
There was another problem which i solved myself but just want to bring into your notice.

In class org.eclipse.ocl.examples.codegen.asm3.ASM3JavaAnnotationReader

org.objectweb.asm.ClassVisitor is used with empty constructor but there is no empty constructor is available. This cause a compilation error.. so i just changed it to "new ClassVisitor(Opcodes.ASM4)" similar to org.eclipse.ocl.examples.codegen.asm5.ASM5JavaAnnotationReader.... Now i do not know if this is the correct way of doing this or not...

thanks!


Re: OCL GIT repository @NotNull annotations [message #1446093 is a reply to message #1446053] Thu, 16 October 2014 10:51 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

This seems to be very unlikely.

The ASM3 plugin works fine for me with ASM3. Unfortunately the ASM API
changed incompatibly in ASM4 and so to provide compatibility we have
this unpleasant combination of an ASM3-specific and an ASM4/5-specific
plugin.

I strongly suspect that you have failed to install ASM3 correctly.

(You may find that the easiest solution is to close the ASM3 plugin and
eliminate the, probably only one, reference to it.)

Regards

Ed Willink

On 16/10/2014 10:41, ModelGeek Mising name wrote:
> There was another problem which i solved myself but just want to bring
> into your notice.
>
> In class org.eclipse.ocl.examples.codegen.asm3.ASM3JavaAnnotationReader
>
> org.objectweb.asm.ClassVisitor is used with empty constructor but there
> is no empty constructor is available. This cause a compilation error..
> so i just changed it to "new ClassVisitor(Opcodes.ASM4)" similar to
> org.eclipse.ocl.examples.codegen.asm5.ASM5JavaAnnotationReader.... Now i
> do not know if this is the correct way of doing this or not...
>
> thanks!
>
>
>
Previous Topic:org.eclipse.ocl.examples.feature Export : Unable to find feature: org.eclipse.license.
Next Topic:extension of OCL visitor: property vs operation
Goto Forum:
  


Current Time: Thu Mar 28 17:30:15 GMT 2024

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

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

Back to the top