ceylon-ide-eclipse icon indicating copy to clipboard operation
ceylon-ide-eclipse copied to clipboard

Allow Java projects to click on Ceylon declarations

Open FroMage opened this issue 9 years ago • 13 comments

Figure out if we can make Java projects that depend on Ceylon projects navigate to Ceylon types by clicking on them. ATM you get to the bytecode, which is not useful.

FroMage avatar Apr 27 '16 09:04 FroMage

Eyeballing the code, it's not at all clear why this doesn't already work...

gavinking avatar Apr 27 '16 10:04 gavinking

yes, that's what I thought also. Probably something in JavaSearch. I'll have a look.

davidfestal avatar Apr 27 '16 10:04 davidfestal

In fact, it works for me. @FroMage you have to select Open Ceylon Declaration from the little drop down menu thingy, not just click.

gavinking avatar Apr 27 '16 10:04 gavinking

To be clear: it only works if the Ceylon project exports its classpath containers.

gavinking avatar Apr 27 '16 10:04 gavinking

OK, so I found that popup. For it to become visible I need to Ctrl-hover-move the mouse over the declaration for a second before it shows up. Just Ctrl-clicking it leads to the bytecode. That's not enough, guys, nobody can discover that.

FroMage avatar Apr 27 '16 13:04 FroMage

Note that the tooltips could be improved too:

Open Declarationcom.foo.bar.CeylonType

@Ceylon
@SharedAnnotation$annotation$
Note: This element neither has attached source nor attached Javadoc and hence no Javadoc could be found.

FroMage avatar Apr 27 '16 13:04 FroMage

For it to become visible I need to Ctrl-hover-move the mouse over the declaration for a second before it shows up. Just Ctrl-clicking it leads to the bytecode. That's not enough, guys, nobody can discover that.

Open an issue against Eclipse. On Mac the menu pops up immediately with no delay.

gavinking avatar Apr 27 '16 14:04 gavinking

Note that the tooltips could be improved too:

What tooltips are these? I've never seen a tooltip like that.

gavinking avatar Apr 27 '16 14:04 gavinking

@maxandersen Do you know how to make our hyperlink detector the first one in the Java editor?

gavinking avatar Apr 27 '16 15:04 gavinking

I do not think there are a way to sort/order hyperlink detectors.

But I also do not think this is the right way to solve this issue.

If you are ending up with bytecode in an editor it is because the source lookup mechanism is not right. As I recall it you can add custom source code lookup to projects which will be activated when eclipse can't locate it - @fbricon might know of the best place to add these.

maxandersen avatar May 01 '16 17:05 maxandersen

@maxandersen even if the source lookup was able to locate the Ceylon source code, that still wouldn't be good enough, since it would still not be enough to convince the Java editor to open the linked source code in the Ceylon editor instead of the Java editor.

gavinking avatar May 01 '16 18:05 gavinking

do you know of a bug already open against JDT to fix that ? If not, lets get one open with this imo very valid usecase.

maxandersen avatar May 03 '16 04:05 maxandersen

I do not, no.

gavinking avatar May 03 '16 23:05 gavinking