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

Compare with Clipboard in XML Editor is not working with a leading whitespace on the line #122

Open
jmini opened this issue Sep 8, 2016 · 6 comments

Comments

@jmini
Copy link

jmini commented Sep 8, 2016

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:

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:

line

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

@iloveeclipse
Copy link
Owner

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?

@jmini
Copy link
Author

jmini commented Sep 9, 2016

Of course only the XML Editor is broken… With the Text Editor, the same test:

text_editor

produces the expected result:

compare_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.

@iloveeclipse
Copy link
Owner

iloveeclipse commented Sep 9, 2016

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.

@jmini
Copy link
Author

jmini commented Sep 9, 2016

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.

@xerces8
Copy link

xerces8 commented Sep 30, 2016

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

@Matze2
Copy link

Matze2 commented Mar 5, 2018

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.

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

No branches or pull requests

4 participants