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

hierarchical package presentation in Ceylon Explorer

Open gavinking opened this issue 10 years ago • 18 comments

The Ceylon Explorer does not currently support Package Presentation > Hierarchical. I quickly tried to make it work but failed. One for @davidfestal.

gavinking avatar Feb 03 '15 23:02 gavinking

Related #1210.

gavinking avatar Feb 03 '15 23:02 gavinking

I've had my package presentation set to hierarchical (it's my personal preference) for months and I've had no issues. Granted my Ceylon projects are relatively simple (no Maven, OSGi or Java).

lukedegruchy avatar Oct 09 '15 23:10 lukedegruchy

Yeah, um, that's weird. AFAICT, it seems to be working great for me now too. OK, good.

Perhaps I was thinking that modules should be displayed hierarchically just like packages? i.e. that all the SDK modules would appear beneath a ceylon node?

@lukedegruchy as a user of hierarchical presentation do you think that would be better or worse than the current behavior which is to display only packages hierarchically?

gavinking avatar Oct 10 '15 07:10 gavinking

I've thought about it for a bit and I decided that hierarchical module presentation would look better than flat. Looking at the ceylon-sdk project is what made up my mind. The ceylon.** modules didn't clearly break from the com.redhat.ceylon.* modules, which is what I'd prefer given my mental model. Also, it's probably better for the sake of consistency with how packages are currently displayed.

lukedegruchy avatar Oct 10 '15 11:10 lukedegruchy

So let's leave this issue open then.

gavinking avatar Oct 10 '15 12:10 gavinking

Actually, one thing I've just noticed (didn't notice this for months even though it was staring me in the face) is that while hierarchical packages do work, they don't work entirely as expected.

A Java project with hierarchical package display shows the parent package and child packages without the parent package.

A Java project would display packages this way:

parent

child1 child2 child3

In the Ceylon IDE, it displays like this:

parent

parent.child1 parent.child2 parent.child3

So ideally, Ceylon packages in a hierarchical view should be displayed as in they are in a Java project (the first example in my comment).

This is the case in my Ceylon 1.1 IDE, so nothing has changed.

lukedegruchy avatar Oct 10 '15 12:10 lukedegruchy

So ideally, Ceylon packages in a hierarchical view should be displayed as in they are in a Java project (the first example in my comment).

Ah, well I guess that should be pretty trivial to fix.

gavinking avatar Oct 10 '15 12:10 gavinking

@lukedegruchy do you prefer it like that?

gavinking avatar Oct 10 '15 23:10 gavinking

Yes, I do.

lukedegruchy avatar Oct 11 '15 00:10 lukedegruchy

I mean, I prefer:

parent

child1 child2 child3

lukedegruchy avatar Oct 11 '15 00:10 lukedegruchy

I see you already fixed the parent/child package presentation issue. Nice! :)

lukedegruchy avatar Oct 12 '15 01:10 lukedegruchy

There's one thing that I just noticed.

path.to.parent (module)

child1 (package)

grandchild1 (package)

child2 (package)

grandchild2 (package)

As opposed to:

path.to.parent (module)

path.to.parent.child1 (package)

grandchild1 (package)

path.to.parent.child2 (package)

grandchild2 (package)

I have a slight preference for the latter (fully qualified parent package) over the former, but I don't consider it to be a showstopper by any means.

lukedegruchy avatar Oct 12 '15 23:10 lukedegruchy

:+1: very nice!

One thing I noticed is that now in the Ceylon perspective src folders appear at the end of the list (alphabetical order, I guess). Switching to the Java perspective promotes/special cases source folders and puts them at the top, which is better.

jvasileff avatar Oct 13 '15 07:10 jvasileff

Here's something that's truly awful (but also a JDT bug). If the tree has focus, and you press a key, say r, to jump to a file like, run.ceylon, it works. Unless run.ceylon has > prefix indicating uncommitted changes. Then, r just does something crazy and you have to press the > key to navigate to the file.

jvasileff avatar Oct 13 '15 07:10 jvasileff

@jvasileff : this is a bug related to the way team-related text decorators are added to the node label in the Common Navigator Framework. This was also the root cause of #1454. However in this case I'm not sure it's fixable.

davidfestal avatar Oct 13 '15 07:10 davidfestal

Thanks @davidfestal. I'll just give "Team -> Disconnect" a try then, until the Eclipse folks can sort it out :smile:

jvasileff avatar Oct 13 '15 07:10 jvasileff

src folders appear at the end of the list

Well, after going to "Customize View" -> "Content" and toggled Resources off and on, the src folder has floated back up to the top?!

jvasileff avatar Oct 13 '15 08:10 jvasileff

@jvasileff : I'm looking into this right now. However could you open another issue for this ?

davidfestal avatar Oct 13 '15 08:10 davidfestal