-
Notifications
You must be signed in to change notification settings - Fork 194
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
Comments
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? |
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: 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. |
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. |
Also, Gradle files will still suffer from this issue. Precedence had to be given to a correct file icon ahead of the image overlays. |
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. |
The conflict with Gradle is due to Greclipse defining a content type for Gradle files and so the JDT sees them as Java resources. If this definition were removed, there would be no more special case. I did not remove for backwards compatibility. But could do so in the next major release.
|
Can you uncheck Preferences > General > Appearance > Label Decorations > Groovy Source File and reopen the sync view? |
If I uncheck that option, I do have incoming/outgoing decorations, but Groovy files have then the same icon of Java files. |
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. |
ready to test |
I tested this with Greclipse 2.9.2.xx-201712032337-e47. I think it's a good compromise, at least it's better than the previous behaviour. Thank you! |
GroovyImageDecorator moves image selection into GroovyImageProvider (for PackageExplorer) and GroovyNavigatorLabelProvider (for ProjectExplorer). See #388
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.
The text was updated successfully, but these errors were encountered: