Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mdt-papyrus.dev] Use of org.eclipse.jdt.annotation in Papyrus

Hi

Since you do not yet use jdt.annotation you may want to bear in mind:

jdt.annotation for Java < 8 are limited by the absence of the concept of type annotations. Many annotations are carried by their parent object such as Operation.

jdt.annotation >= 8 are much better but incompatible.

Unfortunately until the BREE can be raised to 8, the better annotations cannot be used.

Papyrus might be able to specify a BREE 8 for Mars; however it is very unlikely that UML2 or OCL or EMF or Xtext can go that far. jdt.annotation is purely a source capability so once the JDT/PDE tyeamks sort out plugin imports, Papyrus using jdt.annotation 2.0 should be compatible with OCL using jdt.annotation 1.1.

So we are stuck with useful but limited jdt.annotation 1.1 functionality that is almost certainly going to be increasingly deprecated by the JDT team who look forward from Java 8 to 9 with limited regard to mundane Eclipse developers.

The next major jdt.annotation improvement supporting nullity profiles for otherwise unannotated profiles may not be available for BREE < 8 unless we start to pressure (? fund) the JDT team to make the Java 7 support as good as possible.

nullity profiles should be possible on Java 7.

List<@NonNull String> will unfortunately never be possible with Java 7.

    Regards

        Ed Willink

On 12/05/2014 13:48, Christian W. Damus wrote:
Hi, Camille,

The work-around worked for me.

I do think the team should agree on the external tooling dependencies (such as these annotations) that it will use in the sources.  We need to have consistent set-ups of our development environments so that we don't introduce problems in the builds or in other developers' workspaces, as has happened before with inconsistent Java source/binary compatibility compiler settings etc.  We should either encourage the use of these annotations in the API signatures across the Papyrus codebase or remove them from this project that uses them.

BTW, this reminds me that one task I would like to volunteer to undertake is to develop an Oomph model for Papyrus.  Does the team have any interest in this?  (I wouldn't want to expend the effort if it won't be used)

Thanks,

Christian


On May 12, 2014, at 7:07 AM, LETAVERNIER Camille <Camille.LETAVERNIER@xxxxxx> wrote:

Hi,

We've never used these annotations in Papyrus, and never made an actual choice on whether they should be used or not. I don't know why they've been used in this specific plug-in. If the workaround suggested by Ed works, then we can go for it. Otherwise, we can simply remove these annotations.

BTW, I only have org.eclipse.jdt.annotation 1.1 installed in my platform, and still have these compile errors.

Camille

-----Message d'origine-----
De : mdt-papyrus.dev-bounces@xxxxxxxxxxx [mailto:mdt-papyrus.dev-bounces@xxxxxxxxxxx] De la part de Ed Willink
Envoyé : vendredi 9 mai 2014 21:23
À : Papyrus Project list
Objet : Re: [mdt-papyrus.dev] Use of org.eclipse.jdt.annotation in Papyrus

Hi Christian

See

https://bugs.eclipse.org/bugs/show_bug.cgi?id=434307

and

https://bugs.eclipse.org/bugs/show_bug.cgi?id=434499

The workaround is to define a Target Platform that excludes jdt.annotation 2.0.0

Please add a me-too to this problem.

	Regards

		Ed Willink

On 09/05/2014 19:41, Christian W. Damus wrote:
Hi, Team,

I updated to Luna M7 today, and am now bitten by the problem in JDT's Java 8 support [1] that produces invalid compilation errors on usage of the @Nullable and @NonNull annotations from the org.eclipse.jdt.annotation package in projects configured for compliance level less than 1.8.

We have instances of these annotations in the org.eclipse.papyrus.uml.search.ui project.

I thought I had understood that Papyrus doesn't use these annotations.  Has that policy changed?  Or was it not a policy, and I was mistaken?

Thanks,

Christian

[1] http://bugs.eclipse.org/bugs/show_bug.cgi?id=426582
_______________________________________________
mdt-papyrus.dev mailing list
mdt-papyrus.dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/mdt-papyrus.dev


-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2014.0.4577 / Virus Database: 3931/7466 - Release Date: 05/09/14


_______________________________________________
mdt-papyrus.dev mailing list
mdt-papyrus.dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/mdt-papyrus.dev
_______________________________________________
mdt-papyrus.dev mailing list
mdt-papyrus.dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/mdt-papyrus.dev
_______________________________________________
mdt-papyrus.dev mailing list
mdt-papyrus.dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/mdt-papyrus.dev


-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2014.0.4577 / Virus Database: 3931/7478 - Release Date: 05/11/14






Back to the top