Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Re: Creating multiple Display objects
Re: Creating multiple Display objects [message #518622] Thu, 04 March 2010 16:17 Go to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

I've re-directed this to the SWT newsgroup.

Ricky Patel wrote:
> Hello everyone :)
>
> So I'm a few versions back on Eclipse (3.4) and am currently working on
> getting to 3.6 so if I'm a bit outdated, I'm very sorry but after doing
> research I'm sure these issues still come up.
>
> So before I get into the solution, it's best to know the problem. In my
> scenario I am creating an instant messenger type program where there is
> a buddy list window and multiple chat windows. Overall this is currently
> all written in one perspective mainly using views.
>
> The first issue is implementing the windows, mac and linux ability to
> notify a user when the window isn't in view. In OSX this would be the
> icon jumping up and down on the dock, windows a blinking icon and linux
> the same as windows. Overall I still have yet to figure out a solution
> for this. Shell.forceActive was a suggestion to solve this but overall
> didn't work because if you were typing to user1, and then user2 sent you
> a message, user2's window would steal focus.
>
> The second issue is dialogs. If I want to add a new user to my buddy
> list I've created a wizard to help the user do this. But since all the
> windows are on the same display, the wizard dialog restricts access to
> all chat windows until the dialog is disposed of.
>
> The solution I've thought up is creating multiple Display objects for a
> single Program. If each chat window was in its own Display then both my
> problems are mitigated since both act upon the current display.
>
> Does anyone know how to create multiple Displays for a single RCP app?
> Attempting to call Display d = new Display () will result in an
> org.eclipse.swt.SWTException: Invalid thread access. If not anyone have
> a solution for me that I maybe outdated on? This is an highly run
> use-case for me and I would love a solution...


--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Re: Creating multiple Display objects [message #518982 is a reply to message #518622] Fri, 05 March 2010 10:58 Go to previous messageGo to next message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
Hi,

Creating multiple Displays is not supported on Linux and OS X, so this is
probably not what you want to do.

Currently the only way to provide user notification in the task bar is the
approach that you've tried. If this does not work for your case then I
would suggest logging an enhancement request with swt for specific API to
provide task bar notification (
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Platform &component=SWT&bug_severity=enhancement )
.. I'm surprised that I couldn't find one already, because this has been
asked before. Actually, would it make any sense in your context to instead
put an icon in the system tray and have it give notification balloons (maybe
not)? To give this a try see
http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org. eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet225 .java .

Regarding your wizard, presumably it's like this because its Shell is
created as a child of the main Shell. If its Shell was instead created with
no parent then it should not block the main window like this. Are you
creating the wizard's Shell (or at least able to specify its parent Shell),
or is it completely done for you by the framework? If it's coming from the
framework then a wizard may not be the right thing to use here. Now that I
think of it, wizards are usually blocking by their nature. Could you just
create a Shell with your content instead?

Grant


"Paul Webster" <pwebster@ca.ibm.com> wrote in message
news:hmome0$17v$1@build.eclipse.org...
> I've re-directed this to the SWT newsgroup.
>
> Ricky Patel wrote:
> > Hello everyone :)
> >
> > So I'm a few versions back on Eclipse (3.4) and am currently working on
> > getting to 3.6 so if I'm a bit outdated, I'm very sorry but after doing
> > research I'm sure these issues still come up.
> >
> > So before I get into the solution, it's best to know the problem. In my
> > scenario I am creating an instant messenger type program where there is
> > a buddy list window and multiple chat windows. Overall this is currently
> > all written in one perspective mainly using views.
> >
> > The first issue is implementing the windows, mac and linux ability to
> > notify a user when the window isn't in view. In OSX this would be the
> > icon jumping up and down on the dock, windows a blinking icon and linux
> > the same as windows. Overall I still have yet to figure out a solution
> > for this. Shell.forceActive was a suggestion to solve this but overall
> > didn't work because if you were typing to user1, and then user2 sent you
> > a message, user2's window would steal focus.
> >
> > The second issue is dialogs. If I want to add a new user to my buddy
> > list I've created a wizard to help the user do this. But since all the
> > windows are on the same display, the wizard dialog restricts access to
> > all chat windows until the dialog is disposed of.
> >
> > The solution I've thought up is creating multiple Display objects for a
> > single Program. If each chat window was in its own Display then both my
> > problems are mitigated since both act upon the current display.
> >
> > Does anyone know how to create multiple Displays for a single RCP app?
> > Attempting to call Display d = new Display () will result in an
> > org.eclipse.swt.SWTException: Invalid thread access. If not anyone have
> > a solution for me that I maybe outdated on? This is an highly run
> > use-case for me and I would love a solution...
>
>
> --
> Paul Webster
> http://wiki.eclipse.org/Platform_Command_Framework
> http://wiki.eclipse.org/Command_Core_Expressions
> http://wiki.eclipse.org/Menu_Contributions
> http://wiki.eclipse.org/Menus_Extension_Mapping
>
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm
Re: Creating multiple Display objects [message #519121 is a reply to message #518982] Sat, 06 March 2010 19:45 Go to previous message
Ricky Patel is currently offline Ricky PatelFriend
Messages: 33
Registered: July 2009
Member
Hmm I think the balloons will be sufficient for now but I would really love the jumping of the icon for Mac which I will not get with these balloons. I have filed a bug report, thanks for the link on how to do that. It is below:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=304922

Regarding the shell situation, I am calling new Shell () with no parent for each of the Messaging windows... I'm going to continue to investigate and see if I can figure out why but from what you're telling me the dialog window should not have interfered with any of the messaging windows, only the main buddy list window. Thanks for verifying that for me.
Previous Topic:how do i set an orientation specifically to views and editors?
Next Topic:Custom GUI builder in my RCP application
Goto Forum:
  


Current Time: Fri Mar 29 01:13:26 GMT 2024

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

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

Back to the top