Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Dashed grid not working in GEF 3.11.0.201605020204
Dashed grid not working in GEF 3.11.0.201605020204 [message #1732503] Tue, 17 May 2016 18:38 Go to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1560
Registered: January 2014
Senior Member

Last week I updated 4DIAC-IDE to Eclipse Neo M7 from Luna. Since this update my dashed lines are all drawn solid. Here is for example me code for drawing a dashed grid:


       @Override
	protected GridLayer createGridLayer() {
		return new GridLayer(){

			@Override
			protected void paintGrid(final Graphics g) {
				int origLineStyle = g.getLineStyle();
				g.setLineStyle(Graphics.LINE_CUSTOM);
				g.setLineDash(GRID_DASHES_STYLE); 
				super.paintGrid(g);
				g.setLineStyle(origLineStyle);
			}
			
		};
	}


From the Google results this should be correct. Is this an issue in draw2d?

Thanks,
Alois
Re: Dashed grid not working in GEF 3.11.0.201605020204 [message #1732574 is a reply to message #1732503] Wed, 18 May 2016 10:47 Go to previous messageGo to next message
Alexander Nyssen is currently offline Alexander NyssenFriend
Messages: 244
Registered: July 2009
Location: Lünen
Senior Member
Have you tried it in an SWT standalone scenario? I would assume that its rather an SWT regression.
Re: Dashed grid not working in GEF 3.11.0.201605020204 [message #1732644 is a reply to message #1732574] Wed, 18 May 2016 12:05 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1560
Registered: January 2014
Senior Member

Thanks for the tip. I tried it in pure SWT code and there everything works as it should.

Therefore I spent more time on why it is not working in draw2d. I could trace it down to the fact that SWTGraphics.checkPaint() (invoked by drawLine the SWT's setLineAttributes is called. The problem now is that the code of setLineAttributes seams to be broken as it will not set all lineAttributes anymore. I'll file a bug for SWT.
Re: Dashed grid not working in GEF 3.11.0.201605020204 [message #1732646 is a reply to message #1732644] Wed, 18 May 2016 12:11 Go to previous message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1560
Registered: January 2014
Senior Member

Just noticed this is already fixed in https://bugs.eclipse.org/bugs/show_bug.cgi?id=493722
need to wait for updated SWT.
Previous Topic:Selection of elements in GEF
Next Topic:[GEF4] Menu bar on right click
Goto Forum:
  


Current Time: Thu Mar 28 11:32:57 GMT 2024

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

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

Back to the top