Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » RAP GEF endless redraw, no UI Access..
RAP GEF endless redraw, no UI Access.. [message #1766638] Fri, 23 June 2017 18:07 Go to next message
Mehmet Karaman is currently offline Mehmet KaramanFriend
Messages: 63
Registered: November 2012
Location: Berlin
Member
Hello,

i am working currently on a Diagram/Graph viewer on RAP with GEF and Draw2D. The same code works on RCP Application, it's just a port to be able to show up things in a Webbrowser.

In the RAP variant the Canvas is redrawing endless, so i have no UI Access and nothing is visible. The EditParts doesn't have any changes, so there shouldn't be a demand to redraw the whole graph again. Is there any interval or is it possible to trigger the redrawing manually? What's the cause for the redrawing of the canvas?

I'm using the following versions:
org.eclipse.rap.gef_01.0.20151228-339
org.eclipse.rap.draw2d_01.0.20151228-339

and RAP in version 3.1.2

Thanks in advance.

Best Regards
Mehmet Karaman

[Updated on: Fri, 23 June 2017 18:13]

Report message to a moderator

Re: RAP GEF endless redraw, no UI Access.. [message #1766699 is a reply to message #1766638] Mon, 26 June 2017 09:14 Go to previous messageGo to next message
Mehmet Karaman is currently offline Mehmet KaramanFriend
Messages: 63
Registered: November 2012
Location: Berlin
Member
During debugging i've found the trigger point of the whole redrawing.. It has something to do with the DeferredUpdateManager, i've changed the performUpdate() Method of this class
	public synchronized void performUpdate() {
		if (true)   // <--- this line was added
			return;  // <-- this line was added
....


Now the UI Freeze is gone, is this a bug in draw2d or am i using it in a wrong way?

Best regards
Mehmet Karaman

[Updated on: Mon, 26 June 2017 09:15]

Report message to a moderator

Re: RAP GEF endless redraw, no UI Access.. [message #1766772 is a reply to message #1766699] Tue, 27 June 2017 08:29 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi,
what you do is to eliminate the `performUpdate` code execution. I think that you have to find why `performUpdate` is executed so often, who is calling it... and so on.
Maybe someone with more knowledge about gef/draf2d can help here.
Regards,
Ivan
Re: RAP GEF endless redraw, no UI Access.. [message #1766850 is a reply to message #1766772] Wed, 28 June 2017 07:58 Go to previous messageGo to next message
Arnaud MERGEY is currently offline Arnaud MERGEYFriend
Messages: 243
Registered: March 2010
Location: France
Senior Member
Did you try with a more recent version of GEF/draw2d port ?
Re: RAP GEF endless redraw, no UI Access.. [message #1766882 is a reply to message #1766850] Wed, 28 June 2017 13:54 Go to previous messageGo to next message
Mehmet Karaman is currently offline Mehmet KaramanFriend
Messages: 63
Registered: November 2012
Location: Berlin
Member
Yes, i have checked out the latest sources from GIT, the same problem still remains. The workaround solves my origin problem, but the UI updates have to be triggered manually by resizing the browser window/sash form. When does the redrawing happen usually, what is the normal case?

[Updated on: Wed, 28 June 2017 14:13]

Report message to a moderator

Re: RAP GEF endless redraw, no UI Access.. [message #1767003 is a reply to message #1766882] Thu, 29 June 2017 12:58 Go to previous messageGo to next message
Arnaud MERGEY is currently offline Arnaud MERGEYFriend
Messages: 243
Registered: March 2010
Location: France
Senior Member
Could you provide sample code reproducing this issue ?
Re: RAP GEF endless redraw, no UI Access.. [message #1767004 is a reply to message #1766882] Thu, 29 June 2017 12:59 Go to previous messageGo to next message
Arnaud MERGEY is currently offline Arnaud MERGEYFriend
Messages: 243
Registered: March 2010
Location: France
Senior Member
Could you provide sample code reproducing this issue ?
Re: RAP GEF endless redraw, no UI Access.. [message #1769510 is a reply to message #1767004] Tue, 01 August 2017 09:07 Go to previous messageGo to next message
Mehmet Karaman is currently offline Mehmet KaramanFriend
Messages: 63
Registered: November 2012
Location: Berlin
Member
Sorry, i've forgotten to check the thread again. The problem wasn't in GEF, it was caused due to my code. During the paint()-Method i was setting foreground and background color, which was gathered by the parent. And this caused the repaint and while painting this object another repaint was started again. My test was actually in an eclipse view, but i will recheck it within the next week in RAP.
Re: RAP GEF endless redraw, no UI Access.. [message #1769511 is a reply to message #1769510] Tue, 01 August 2017 09:11 Go to previous messageGo to next message
Mehmet Karaman is currently offline Mehmet KaramanFriend
Messages: 63
Registered: November 2012
Location: Berlin
Member
Found the problem while checking the super class (Figure) of my custom figure:
	public void setForegroundColor(Color fg) {
		// Set foreground color to fg unless in high contrast mode.
		// In that case, get the color from system
		if (fgColor != null && fgColor.equals(fg))
			return;
		Display display = Display.getCurrent();
		if (display == null) {
			display = Display.getDefault();
		}
		Color highContrastClr = null;
		try {
			if (display.getHighContrast()) {
				highContrastClr = display
						.getSystemColor(SWT.COLOR_WIDGET_FOREGROUND);
			}
		} catch (SWTException e) {
			highContrastClr = null;
		}
		fgColor = highContrastClr == null ? fg : highContrastClr;
		repaint(); // <------- this starts a repaint.. my code doesn't need a repaint because im always painting it with it's parent.
	}

Re: RAP GEF endless redraw, no UI Access.. [message #1817024 is a reply to message #1766638] Thu, 14 November 2019 09:22 Go to previous messageGo to next message
antonio guillen is currently offline antonio guillenFriend
Messages: 60
Registered: January 2014
Member
Hi Mehmet

I want use GEF in RAP too, but I don't know where I can found the install for GEF in this case, can you teel me where you found these plugins?

Best regards

Antonio
Re: RAP GEF endless redraw, no UI Access.. [message #1818141 is a reply to message #1766638] Sun, 08 December 2019 00:14 Go to previous messageGo to next message
Michael Fritscher is currently offline Michael FritscherFriend
Messages: 43
Registered: September 2012
Member
I played with GEF (+even Nebula) some time ago: https://www.eclipse.org/forums/index.php/m/1721558/?srch=gef+rap+impressive#msg_1721558 .

You can find it at https://www.eclipse.org/rap/incubator/ ,the repo is at http://git.eclipse.org/c/rap/incubator/org.eclipse.rap.incubator.gef.git .

Re: RAP GEF endless redraw, no UI Access.. [message #1818334 is a reply to message #1818141] Thu, 12 December 2019 16:48 Go to previous message
antonio guillen is currently offline antonio guillenFriend
Messages: 60
Registered: January 2014
Member
Hi Michael,

Thanks a lot for your help. Now i can easly visualize a graph in my application.
But, i cannot create a GraphicalEditor in my application using the Part created from Application.e4xmi because the plugin or.eclipse.ui is missing!!!
Have you an idea how to do this.

Best regards

Antonio
Previous Topic:AWT setStroke
Next Topic:CTabFolder/CTabItem: Wrong font on CSS theme switch
Goto Forum:
  


Current Time: Fri Apr 19 15:16:14 GMT 2024

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

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

Back to the top