Replies: 1 comment 3 replies
-
This is wrong, Tycho is maven as you can execute the project with a vanilla The problem is (and m2eclipse also suffers from that) that tycho uses maven extensions, so if IDEA does not execute them in a suitable way and instead relies on the static maven model it won't see dependencies from the dynamic maven model. You can try that out by running So I think IDEA do not need to support specifically tycho, but some kind of importing the dynamic model (even though that might be slow. You could try the following, even though this is completely untested and unsupported:
that might gives you something idea could potentially understand... Disclaimer: The main problem will be, that most probably some or all dependencies are not available as maven dependencies but P2 dependencies and is is unlikely IDEA will understand them! There is a ticket for that #590 but that's more a long running idea (If this crucial to your business and likes to speed up the development in that area a sponsoring would allow me to assign more time-slots particular issue) and I don't know how good IDEA can handle custom repositories. |
Beta Was this translation helpful? Give feedback.
-
Situation
I want to refactor a few things in the Java code of a multi-module Tycho project, namely Eclipse AJDT. The thing is, I am feeling totally uncomfortable with Eclipse IDE and wish to do the refactoring in IntelliJ IDEA. Unfortunately, there is no good Tycho support in IDEA, which means that if I import the project, dependencies are not recognised correctly, not even the ones between modules in the same project. I.e. IDEA can neither compile nor help to refactor anything in that project, because dependencies expressed in OSGi manifests are futile. IDEA has otherwise great Maven support, but Tycho is not Maven, to over-simplify it for my use case.
Question
Is there any way to either make IDEA discover Tycho/OSGi dependencies or to somehow transform the information existing in OSGi manifests into an equivalent Maven POM in order to give IDEA a chance to discover the dependencies correctly, even at the possible expense of information loss with regard to what is allowed to be read in those dependencies from an OSGi perspective? I was thinking about then temporarily overwriting the original POMs while working on the Java code, simply not staging them for commit and reverting them when I am done. This would be an awful hack, but give me the chance to use an IDE other than Eclipse.
Of course, the real solution would be Tycho support for IDEA, see e.g. IDEA-186628. Being a total OSGi noob, it is beyond me to understand why the existing OSGi support in IDEA does not encompass Tycho, or if there is a way to import the project directly from the OSGi modules and ignore Maven. But then I would also lose information expressed only in Maven, such as AspectJ Maven Plugin settings giving me the necessary AspectJ facets (like natures in Eclipse) in some modules.
Epilogue
Sorry if this request seems naive and makes you think something like: "Why doesn't the guy simply learn how to use Eclipse, if he is working on an Eclipse project?" Well, I simply do not wish to be locked into an IDE I do not feel comfortable with. For most purposes, IntelliJ IDEA Ultimate is a very good choice, so I would like to stick to it. I keep using the wrong keyboard shortcuts in both IDEs after switching, just having totten used to the other one again after a while. There is no routine when working in both, I always have to focus and remember where I am at, which interrupts my flow. I want to focus on the task at hand rather than which IDE I happen to be using just in this moment. I am also working on other, non-Eclipse projects in parallel and want to avoid switching IDEs, just because I am switching projects.
Beta Was this translation helpful? Give feedback.
All reactions