Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » combining "SWT stuff" with "view/perspective stuff"
combining "SWT stuff" with "view/perspective stuff" [message #489381] Fri, 02 October 2009 17:13 Go to next message
Dave Combs is currently offline Dave CombsFriend
Messages: 21
Registered: July 2009
Junior Member
I'm working on an RCP app where the majority of the page can work just fine as a set of perspectives and their views. However, the app designers have specified the layout such that the top of the window (where a coolbar would normally go) is really a set of stylized tabs and section headers buttons and search box and such (what I might say looks fairly "web-like".)
This top area of the screen isn't something that should ever wrap, and it does not contain just a set of homogenous toolbar items.

I was trying to figure out how to do this with a coolbar, and couldn't come up with anything that works, because of the different item types and coolbars tendency to wrap. I was then trying to figure out if I could just have a view that all perspectives would share, but it can't be resizable while the rest of the views can, so I can't declare a fixed perspective layout. Then I wondered if it was possible to just try to bypass some of the Application window setup logic (the stuff that's creating the coolbar and such and placing everything) so that I basically build what's really a straight SWT app, but also contains views and perspectives.

None of these seem like particularly good solutions to this problem, so I was wondering what others would suggest--are any of the above reasonably possible to implement cleanly, or do I really have to pick either "build with views and editors and only put stuff inside them" or "build with SWT widgets entirely, and ignore views and editors and perspectives". I *really* would like to use views/perspectives, though--a lot of our functionality is precisely the sort of things they do well, and I don't want to reinvent the wheel unless I have to.

Dave
Re: combining "SWT stuff" with "view/perspective stuff" [message #489633 is a reply to message #489381] Mon, 05 October 2009 12:46 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

You probably won't have much luck trying to use SWT to display widgets at the top while having and RCP app with perspectives and views ... the RCP app will take over things like commands and handlers and make it very difficult for you. Options that I can see in ever increasing complexity and control:

1) use a view, but make it standalone (no tab/title), non-closable and non-moveable. This has the advantage that it is part of the workbench activation lifecycle and has full access to workbench services.

2) use org.eclipse.ui.menus to place a trim element at the top ... and make it the full size of the window. You'll have to fill in the contols yourself, and you will also have to somehow manage the interaction with any workbench services (like getting copy/paste to work, or anything with selection).

3) create your own presentation. Basically you are taking responsibility for laying out the stacks of views and the editor area. This is complicated, although there is an example project with slides Smile

If you can meet your requirements with option 1, it really is your best bet.

Later,
PW


Re: combining "SWT stuff" with "view/perspective stuff" [message #489741 is a reply to message #489633] Mon, 05 October 2009 18:01 Go to previous message
Dave Combs is currently offline Dave CombsFriend
Messages: 21
Registered: July 2009
Junior Member
Thanks, Paul. Option 1 was my choice, too. Of course, given that one of the requirements that our product-marketing department has is that the app does not look overly "Eclipse-like" (it's going to be a commercial enterprise client for fairly non-technical users, so "Eclipse-like" isn't a good thing for them, whereas for me as a developer it's just fine), I'm also going to have to do some stuff with a custom presentation. I've tried working my way through various presentation examples I've run across online (documentation is a bit lacking for those, so we'll see what finally comes out.

Thanks!
Dave
Previous Topic:Handler expression evaluation time
Next Topic:How to run code in a contributing plugin after a view has been created?
Goto Forum:
  


Current Time: Fri Dec 19 06:46:02 GMT 2014

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

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