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

The real killer was the casual re-export of jdt.annotation 1.1.0 from org.eclipse.xtext.common.types, which with 2.0.0 available meant that 2.0.0 was available to all plugins that didn't explicitly import [1.1.0,2.0.0). See https://bugs.eclipse.org/bugs/show_bug.cgi?id=434404.

The bad Xtext re-export is fixed in recent N-builds, so a changed target platform is no longer required.

So install the Xtext N-build and replace all jdt.annotation additional classpath entries in build.properties by Manifest RequireBundle entries:

 org.eclipse.jdt.annotation;bundle-version="[1.1.0,2.0.0)";resolution:=optional,

wherever you use @NonNull/@Nullable.

Additionally in some releng plugin provide a non-optional RequireBundle to ensure Hudson or whatever fetches the support plugin.

    Regards

        Ed Willink

On 12/05/2014 20:41, Christian W. Damus wrote:
Right, so I said that the work-around worked for me, but I just updated my target platform to pick up the latest OCL nightly build, and it took me more than an hour, in part because of this work-around.

So, I'd say it's not much of a work-around.  And it doesn't really work for me, after all.

The problem is that the work-around requires excluding the 2.0.0 version of the org.eclipse.jdt.annotation bundles from your target definition.  This means switching to managing the target by plug-ins instead of features in the "Content" page of the Target Definition editor and unchecking those bundles (which occur several times because several different p2 sites include them).  The way this is actually implemented in the target editor is that *all* of the checked plug-ins are added to the *.target file, making for one very large XML document with a ridiculous amount of redundancy for all of the bundles that are included in multiple p2 sites.

A consequence of this if you just try to update some feature from some p2 site to a newer build, you get a raft of errors in the target editor complaining about missing versions of bundles that the target definition is looking for because it still lists them all explicitly from the previous configuration.  It can take quite a while to sort it all out, when all you wanted to do was update one feature while keeping these JDT bundles excluded.  Especially if you have as much of the Papyrus source in your workspace as I have.

So, this work-around makes a pretty terrible usability of the target definition editor that much worse.  I would definitely recommend discontinuing use of these annotations in Papyrus.  If nobody objects, I shall do so by end of the day, tomorrow.  See bug 434681 [1].

Thanks,

Christian


[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=434681



On May 12, 2014, at 8:48 AM, Christian W. Damus <give.a.damus@xxxxxxxxx> 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/7482 - Release Date: 05/12/14






Back to the top