Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 331285

Summary: Show Annotation from SVN Repositories opens two editors
Product: [Technology] Subversive Reporter: Stanimir Stamenkov <stanio>
Component: CoreAssignee: Igor Burilo <igor.burilo>
Status: CLOSED MOVED QA Contact:
Severity: normal    
Priority: P3 CC: a.gurov, janArbeit
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Stanimir Stamenkov CLA 2010-11-28 13:37:16 EST
Build Identifier: 0.7.9.I20101001-1700

Issuing "Show Annotation" from the context menu of an *.html file in the "SVN Repositories" view opens two editors:  a Web Browser and a Text Editor showing the annotations.

This appears related to <http://help.eclipse.org/helios/topic/org.eclipse.platform.doc.user/tasks/tasks-cvs-annotate.htm>:

> *Only works with text files*
>
> The annotate command will only work with files that are marked as 
> ASCII in the CVS repository. Also, the command will open a text 
> file to show the changes even if the associated editor in the 
> workbench is a non-text editor. For example, if you run annotate on 
> a plugin.xml file a simple text editor will be opened instead of 
> the full PDE editor.

This documentation appears bit out-of-date as I've found showing the CVS annotation for a locally checked out plugin.xml file uses just the full PDE editor (automatically opened at the source "plugin.xml" tab).

However showing the annotation through the CVS Repositories view always uses a text editor for plugin.xml, which doesn't appear the same when showing the annotation for plugin.xml through the SVN Repositories view (opens a PDE editor).

I don't know how this fits in, but showing the annotation for a *.java file through the CVS Repositories view uses a Java Editor.


Reproducible: Always
Comment 1 Alexander Gurov CLA 2010-12-03 12:16:14 EST
That's true. But there is a reason for it: it is always better to use "nature-related" editor to display annotations, for example Java editors for *.java files, PHP editors for *.php files etc. But some time "nature-related" editors are unable to work with Annotation View (like in yor case), in that case Subversive then opens second editor: plain text editor for the annotated file.
It's better if we could detect compatibility of the "nature-related" editor prior to it's opening but AFAIR there was no API to check it before instantiating editor.
So, for now I will leave this report until we check if required API is present now or not.
Comment 2 Stanimir Stamenkov CLA 2010-12-04 15:56:21 EST
The main reason I'm reporting this is because sometimes I don't get the annotation markers shown when the file opened is associated with a certain editor by default (the *.xhtml editor from JBoss Tools, for example), and when issuing Show Annotation for that file from the SVN Repositories view.  I guess if the file was forced to open with a Text Editor there wouldn't be such problem.

And of course if there's is better solution than forcing the files to open with a Text Editor - I'm just fine with it.
Comment 3 Jan W CLA 2013-05-24 03:55:49 EDT
Hi,

I have eclipse indigo and this issue with svn subversive and the java editor, i.e. show annotations opens a new text editor instead of using the open java editor. This is new and the only related change I can remember is to set *.parameters files to open with the java property editor by manual setting. But undoing this also doesn't change this again. Is this a different bug or could this be a configuration issue?

Kind regards.
Comment 4 Eclipse Webmaster CLA 2023-02-13 10:55:40 EST
This issue has been migrated to https://gitlab.eclipse.org/eclipse/subversive/subversive/-/issues/77.