anyedittools
anyedittools copied to clipboard
Compare with Clipboard in XML Editor is not working with a leading whitespace on the line
Step to reproduce Create a simple XML file:
<?xml version="1.0" encoding="UTF-8"?>
<root>
<item>first</item>
<item>second</item>
</root>
Copy "test" into the clipboard
(1) Select "<item>first</item>"
(without any space) in the XML document, and select "Compare with > Clipboard". You get the expected result:
(2) Now select the complete line " <item>first</item>"
(with or without the line return character), select "Compare with > Clipboard" as in this screenshot:
Nothing happened. I do not see any Stacktrace or Error Log entry.
Tested with version 2.6.1.201602151951 of the AnyEdit Plugin. Eclipse buildId 4.6.0.I20160606-1100 (Eclipse Neon Release) win32 x86_64 JDK: jdk1.8.0_66
I can't reproduce. Does it happen with XML files only and with this specific editor only? Can you open this file in the default text editor and check if this works?
Of course only the XML Editor is broken… With the Text Editor, the same test:
produces the expected result:
Our main use case is to use the "Compare with Clipboard" feature in the Maven Editor ("pom.xml" Tab) which is also broken. I have retried it on a fresh "Eclipse IDE for Java Developers" installation.
I realize that the problem might not be in the AnyEdit plugin but in the XML Editor. I hope you can help with the analysis.
Please provide here exact editor ids which aren't OK for you. You can get them if you enter alt+shift+f1 being in the editor. Also please provide info from where one can install those editors.
Installation
I have installed "Eclipse IDE for Java Developers" with the Oomph installer. You can also get it: https://www.eclipse.org/downloads/packages/eclipse-ide-java-developers/neonr
I needed to additionally install the Plugin Selection Spy plugin (release train update site, org.eclipse.pde.source.feature.group
, "Eclipse PDE Plug-in Developer Resources").
Otherwise there is no Alt+Shift+F1 key binding installed in Neon.
First case: XML Editor
The active editor class: XMLMultiPageEditorPart
The contributing plug-in: org.eclipse.wst.xml.ui
(1.1.700.v201604272318
)
The active editor identifier: org.eclipse.wst.xml.ui.internal.tabletree.XMLMultiPageEditorPart
The active menu contribution identifiers: org.eclipse.wst.xml.ui.editor
Create a new file NewFile.xml
(open with "XML Editor", switch to the "source" Tab).
Second case: Maven POM Editor
The active editor class: MavenPomEditor
The contributing plug-in: org.eclipse.m2e.editor
(1.7.0.20160603-1933
)
The active editor identifier: org.eclipse.m2e.editor.MavenPomEditor
Create a new "Maven Project" open the pom.xml
file (open with "Maven POM Editor", switch to the "pom.xml" Tab).
Thank you in advance.
I have a problem which is probably related: Compare with Clipboard does not work in JSP Editor if I try to compare against selection. Comparing with entire file (no selection is made) works fine.
Also, the problem does not happen always. I don't know what makes the difference (it is not a matter of leading white space like in the original report).
This happened in Eclipse Kepler Service Release 2 and now in Neon.1:
Eclipse Java EE IDE for Web Developers.
Version: Neon.1 Release (4.6.1) Build id: 20160913-0900
with:
AnyEditTools 2.6.1.201602151951 AnyEditTools.feature.group Andrey Loskutov
Editor is "JSP Editor": The active editor class: StructuredTextEditor The contributing plug-in: org.eclipse.jst.jsp.ui (1.1.1100.v201605092203) The active editor identifier: org.eclipse.jst.jsp.core.jspsource.source The active menu contribution identifiers: org.eclipse.jst.jsp.core.jspsource.source.EditorContext #AbstractTextEditorContext #AbstractTextEditorRulerContext org.eclipse.jst.jsp.core.jspsource.source.RulerContext #OverviewRulerContext org.eclipse.wst.sse.ui.StructuredTextEditor.EditorContext org.eclipse.jst.jsp.core.jspsource.source.source.EditorContext org.eclipse.wst.sse.ui.StructuredTextEditor.RulerContext org.eclipse.jst.jsp.core.jspsource.source.source.RulerContext
Just for your interest: I can confirm that this is still true with XML editors using Oxygen.2 and AnyEditTools 2.7.1. As a workaround we open the files in plain text editors and compare from there.