Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Errors in Problems view does not get cleared after deleting error line in XML editor
Errors in Problems view does not get cleared after deleting error line in XML editor [message #1698997] Fri, 19 June 2015 11:50 Go to next message
Lokesh Barhate is currently offline Lokesh BarhateFriend
Messages: 1
Registered: June 2015
Junior Member
Eclipse version:
Version: 3.8.0
Build id: I20120608-1200

Steps to reproduce the problem:

1. Create new java project in eclipse (Test)
2. RMB on src and create new file named as test.xml
3. Open test.xml in xml editor (RMB on test.xml -> Open With -> XML Editor)
4. Add following content as it is (including line break characters) to the xml file

<!-- This is test xml file -->

<tag1>test</tag2>


5. Change XML editor validation preferences as shown in attached XML_Editor_Prefs.png

6. RMB on test.xml and select Validate option.
7. Open the problems view if it is not already open through "Window -> Show View -> Problems" menu.
8. 3 errors will be shown in problems view.

Now, let us refer the content of xml file by line numbers as bellow:

Line 1: <!-- This is test xml file -->
Line 2:
Line 3: <tag1>test</tag2>


Use case 1:
Delete only Line 3 from xml and save the file.
Observation:
All 3 errors are still shown in Problems view.

Use case 2:
Now delete Line 2 (Line 3 is already deleted)
Observation:
All 3 errors are still shown in xml file.

Use case 3:
1. Revert the xml file (Add Line2 and Line back to the xml file) and save it.
2. Selecte Line 2 and Line 3 together
3. Delete selected Line 2 and Line 3 together.
Observation:
All errors disappeared from problems view.


We are working on Eclipse based application and observing similar behavior there.
Is this a "As Designed" behavior?


Thanks in advance!
Re: Errors in Problems view does not get cleared after deleting error line in XML editor [message #1699044 is a reply to message #1698997] Fri, 19 June 2015 18:54 Go to previous message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4435
Registered: July 2009
Senior Member

It's as designed. Java Projects do not default to having the Validation Builder, which would automate XML file validation as part of the build (you can add it from the project's Properties dialog if you wish). Step 6 manually validated the file contents and updated the Problem markers for the file. You'd need to repeat that to see updates since the XML Editor is doing its job by preserving the original problem markers, and even moving them around if you insert new lines before line 2. When you remove the lines that have markers recorded on them, you're removing the corresponding text annotations, removing the underlying markers when the file is saved. Look into the org.eclipse.ui.texteditor.MarkerAnnotation and the associated MarkerAnnotationModel.

_
Nitin Dahyabhai
Eclipse Web Tools Platform
Previous Topic:Add .c / .h files to existing project?
Next Topic:Error initializing storage when launching Eclipse
Goto Forum:
  


Current Time: Thu Apr 25 11:06:14 GMT 2024

Powered by FUDForum. Page generated in 0.08551 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top