Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » Getting errormarkers of xtext editor(Getting error markers of xtext editor)
Getting errormarkers of xtext editor [message #1792945] Thu, 26 July 2018 08:46 Go to next message
Missing name Mising name is currently offline Missing name Mising nameFriend
Messages: 2
Registered: July 2018
Junior Member
Hi anybode,

I want to implement a test, which checks if there are bullets available in the editor. I have done it this way:
SWTBotEclipseEditor textEditor = swtBot.activeEditor().toTextEditor();
for (int currentLine = 0; currentLine < textEditor.getLineCount(); currentLine++) {

if (textEditor.hasBulletOnLine(currentLine))
errorMarkers.add("Line " + currentLine + ":" + textEditor.getBulletOnLine(currentLine).text);
}

But although I see error markers in different lines in real, swtbot does not detect them. So my question:
- Are the bullets really the error markers you see in the editor?
- Did I implement something incorrectly or do I have another option to get to this information?

Thanks in advance
Cheers
Markus
Re: Getting errormarkers of xtext editor [message #1792964 is a reply to message #1792945] Thu, 26 July 2018 15:29 Go to previous messageGo to next message
Patrick Tasse is currently offline Patrick TasseFriend
Messages: 56
Registered: July 2009
Member
Hi Markus,

For SWTBot to find the bullets with the code above, the active editor must be implemented with a workbench part that contains a StyledText widget, and this widget must be decorated (by the application) using the API StyledText.setLineBullet().

I'm not too familiar with the implementation, but it seems to me that an AbstractDecoratedTextEditor is created with a VerticalRuler on the left and an OverviewRuler on the right. Both of those use a Canvas widget and probably do their own drawing, not using the line bullet API.

Patrick
Re: Getting errormarkers of xtext editor [message #1793262 is a reply to message #1792964] Thu, 02 August 2018 10:50 Go to previous message
Missing name Mising name is currently offline Missing name Mising nameFriend
Messages: 2
Registered: July 2018
Junior Member
Hi Patrick,

looks so.. but the Rulers are protected :-(

[Updated on: Thu, 02 August 2018 11:00]

Report message to a moderator

Previous Topic:How to get progress bar shell in swtbot?
Next Topic:SWTBotProgressBar is supported
Goto Forum:
  


Current Time: Thu Nov 15 20:38:48 GMT 2018

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

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

Back to the top