eclipse-jdt / eclipse-jdt/eclipse.jdt.core

Create Change implementations to add or update an Annotation on a package/class/method/field ...

Open
#1,628 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
237
Forks
195
Avg merge
1d 10h
Merged PRs (30d)
49

Description

I'm currently working on PDE to convert a project with a refactoring from "old" style MANIFEST-First to using bnd instructions/ OSGi annotations here:
- https://github.com/eclipse-pde/eclipse.pde/pull/934

I now came across the need to modify a CU by adding an annotation to package/class/method/field but it seems there is no method for that currently, for example I found this post on stackoverflow:

- https://stackoverflow.com/questions/12748308/attach-annotation-to-class-with-jdt

also this example of course does not cover the case that the annotation is already there an needs to be updated.

As it seems to be a non trivial case, I wonder if it would be possible to add some predefined `Change` implementations to JDT from the JDT experts so they can be reused by other implementations. For my purpose even something in the internal refactoring packages would be sufficient.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.