eclipse-wildwebdeveloper / eclipse-wildwebdeveloper/wildwebdeveloper
POM XML formatter sometimes gets confused with normal XML and hallucinates errors
Nessuno ha ancora preso questa issue.
- Lingua principale
- Java
- Stelle
- 201
- Fork
- 76
- Merge medio
- 4g 7h
- PR unite (30g)
- 21
Descrizione
I'm using Eclipse EE 2023-06 with Java 17 on Windows 10.
Sometimes when I'm editing a POM, the new XML editor will get confused and show an error. The error will look like this:
Multiple markers at this line
- Non-parseable POM …/pom.xml: expected START_TAG or END_TAG not TEXT (position: TEXT seen ...</dependency>\r\n\r\n\r\n:\r\n\r\n\t\t\t<d... @120:6)
- Element 'dependencies' cannot contain text content.
The content type is defined as element-only.
Code:
(That's all. Really. There is nothing after "Code:".)
However there is no problem in the XML file. It looks like this. (Note that I am indenting using tabs.)
<dependency>
<groupId>net.sf.saxon</groupId>
<artifactId>Saxon-HE</artifactId>
<version>12.2</version>
</dependency>
The error is shown on the first e of <dependency>.
This happens when I open an existing pom and do something like this:
- Paste some string, such as the artifact coordinates, on an empty line so I can use it later.
- Copy a
<dependency>section from above. - Edit the pasted section with the new coordinates.
- Delete the temporary line I added.
If I close the file and reopen it, the same error appears, but a different line is indicated; now it indicates the v of <version>.
If I delete the entire <dependency> section, then the error jumps to the section after that.
Arg, now I even did a Git "replace with HEAD" to remove all changes. When I close the file there is no error. When I open the file, it there's there is this imaginary error. Now even with the file I started with (which showed no errors) before making any changes!
Wow the only way I found around this was to exit Eclipse completely, come back in, and paste the entire section you see above. No typing allowed, because one never knows when it will start seeing imaginary errors again!
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia riproducendo il problema in Eclipse EE 2023-06 con Java 17 su Windows 10, usando un POM esistente e la sequenza di modifica descritta. Esamina il comportamento di formattazione e convalida del POM del nuovo editor XML; il lavoro è completato quando il POM invariato o modificato correttamente non mostra più gli errori spurii di analisi e contenuto degli elementi.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java
- Ambito
- tooling
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100