Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing incoming/outgoing decorations in Synchronize View for Groovy files #388

Closed
mauromol opened this issue Nov 16, 2017 · 13 comments
Closed
Labels

Comments

@mauromol
Copy link

This is a long standing issue, originally reported as GRECLIPSE-1691 and also tracked in the Eclipse Bugzilla at: https://bugs.eclipse.org/bugs/show_bug.cgi?id=397118

Since this happens specifically with Groovy files, I suspect it's somewhat a Greclipse fault. I reproduce this with a Subversion repository (using Subeversive), I don't know if this happens with eGit too.

If you change a shared Groovy file and then right click on the project => Team => Synchronize with Repository, the Synchronize View of the of Team Synchronizing perspective opens: changed .groovy files do not show incoming/outgoing decorations, in contrast to what happens with other files like .java or .xml. I see this happending with .gradle files too, which are handled by the Groovy editor in my system, as well.

@eric-milles
Copy link
Member

Can you provide a screenshot here that contrasts Java files with the decorations and Groovy files missing them? I know where in the code all this is done, I just need to be able to see what success looks like.

And if you could provide a reliable link to a current Subersive install, that might help. Or do you know if the decorations are missing in Synchronize view for other source control systems?

@mauromol
Copy link
Author

Subversive can be installed from the Oxygen or Neon Update sites. If you have troubles with the connectors installation, let me know (there's an open issue with Oxygen).

I don't know if decorations are missing in the Synchronize View for other source control systems.

A screenshot to compare the behaviour for Java and Groovy files is here:
https://bugs.eclipse.org/bugs/attachment.cgi?id=225015

You'll find just outgoing changes, let me know if you need me to build a screenshot with incoming changes as well. However, the concept is that the "arrow" is towards the left instead of towards the right.

@eric-milles
Copy link
Member

Interesting that for Git, the same issue can be seen in the upper tree, but the lower Git Commits tree shows the arrows.

synchronize-view

@eric-milles
Copy link
Member

For this to work, Groovy files that are outside of source folders had to be sacrificed. In the Package Explorer and Project Explorer, they will show the external Java resource icon. They are not easily distinguished from Groovy sources that are properly located within a source folder when viewed in the Navigator, Synchronize and other content-type config based views.

@eric-milles
Copy link
Member

Also, Gradle files will still suffer from this issue. Precedence had to be given to a correct file icon ahead of the image overlays.

@mauromol
Copy link
Author

I think it's a good compromise. Groovy files inside source folders are the most important ones. Also, I think I've read Buildship guys are working on a dedicated editor for Gradle files, so I don't think Greclipse will still be of much use there.

@eric-milles
Copy link
Member

eric-milles commented Nov 21, 2017 via email

@mauromol
Copy link
Author

mauromol commented Nov 23, 2017

Hi Eric,
I tested this with 2.9.2.xx-201711221437-e47, but I still see no overlays.
See here:

immagine

Here I should see the decoration for an outgoing change.

@eric-milles
Copy link
Member

Can you uncheck Preferences > General > Appearance > Label Decorations > Groovy Source File and reopen the sync view?

@eric-milles eric-milles reopened this Nov 28, 2017
@mauromol
Copy link
Author

If I uncheck that option, I do have incoming/outgoing decorations, but Groovy files have then the same icon of Java files.

@eric-milles
Copy link
Member

Okay, that means the files are seen as compilation units. This is different from how the Git integration saw the files. A little background: Navigator and other like views deal with Resources (aka Files) only. Therefore the Content Type config XML works as defined and the icons show up properly without the Label Decorator enabled. Java-based views like Package Explorer and Project Explorer see another type of abstraction: Compilation Units. Because Groovy content type is a child of the Java content type, the Java views try to apply Java handling to the Groovy Compilation Units. That is why you would see J file icons instead of G ones in the Project Explorer -- and as it turns out Subversive/Synchronize view.

The label decorator tries to tread as lightly as possible, however it must replace the base image for Compilation Units to overwrite the J icon. My recent change was to leave the base image alone for Resources. Synchronize view for Git used Resources and so the incoming/outgoing decorations would remain.

@eric-milles
Copy link
Member

ready to test

@mauromol
Copy link
Author

mauromol commented Dec 4, 2017

I tested this with Greclipse 2.9.2.xx-201712032337-e47.
As you explained my in Slack, now you're disabling icons in the Synchronize View, so that decorations for incoming/outgoing changes are now shown correctly, although as overlays to the standard Java icons.

I think it's a good compromise, at least it's better than the previous behaviour. Thank you!

eric-milles added a commit that referenced this issue Jul 9, 2018
GroovyImageDecorator moves image selection into GroovyImageProvider (for
PackageExplorer) and GroovyNavigatorLabelProvider (for ProjectExplorer).

See #388
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants