Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Perspective with tabs(Create an RCP app with a single perspective that allows for opening many tabs corresponding to an open file)
icon5.gif  Perspective with tabs [message #540598] Wed, 16 June 2010 15:49 Go to next message
Jits  is currently offline Jits Friend
Messages: 3
Registered: June 2010
Junior Member
Hi,

I'm trying to create an Eclipse RCP app with the following UI structure/layout:

Perspective A >>
View A (tabs container) >>
Instances of View B (multiple tabs which are separate instances of the same View class) >>
views/layout within the tab View B

(where the '>>' indicates that I want a hierarchical/containment relationship).

The idea is that a separate tab should be opened for each file being worked on, and each tab is an instance of the same View class but has it's own internal configuration and state.

I may also add a file explorer to the perspective, outside of the tabs container, in the future. But for now I need the perspective to just contain one view.

Any recommendations on how best to go about doing this?

Ideally I would like to do this declaratively as much as possible. I know you can declaratively set up the layout in a perspective, but can you do that in views too? To elaborate on this, it seems at the moment that I can use a perspectiveExtension to add View A to Perspective A, but then I am left to programmatically build the rest. Is this true?

Thanks in advance for any help.

Jits

[Updated on: Wed, 16 June 2010 15:51]

Report message to a moderator

Re: Perspective with tabs [message #541357 is a reply to message #540598] Sun, 20 June 2010 12:25 Go to previous messageGo to next message
Wim Jongman is currently offline Wim JongmanFriend
Messages: 423
Registered: July 2009
Senior Member
Hi Jits,

Why do you want to contain view B in View A. As you can see, views already
have tabs so you just want a bunch of view B's. If you do the action on the
File, just open a new instance of View B. The tab you get for free

--

Best Regards,
Wim Jongman
-- 2+2 = 5 for extremely large values of 2.
(Eclipse Old Skool Quote
Service)

> Hi,
>
> I'm trying to create an Eclipse RCP app with the following UI
structure/layout:
>
> Perspective A >> View A (tabs container) >> Instances of View B (multiple
tabs which are separate instances of the same View class) >> views/layout
within the tab View B
>
> (where the '>>' indicates that I want a hierarchical/containment
relationship).
>
> The idea is that a separate tab should be opened for each file being worked
on, and each tab is an instance of the same View class but has it's own
internal configuration and state.
>
> I may also add a file explorer to the perspective, outside of the tabs
container, in the future. But for now I need the perspective to just contain
one view.
>
> Any recommendations on how best to go about doing this?
>
> Ideally I would like to do this declaratively as much as possible. I know
you can declaratively set up the layout in a perspective, but can you do that
in views too? To elaborate on this, it seems at the moment that I can use a
perspectiveExtension to add View A to Perspective A, but then I am left to
programmatically build the rest. Is this true?
>
> Thanks in advance for any help.
>
> Jits
icon14.gif  Re: Perspective with tabs [message #541710 is a reply to message #541357] Tue, 22 June 2010 09:43 Go to previous messageGo to next message
Jits  is currently offline Jits Friend
Messages: 3
Registered: June 2010
Junior Member
Hi Wim,

Thanks for the response.

I have a better handle on the UI concepts of the Eclipse RCP platform and so we have changed our design to fit in better (i.e.: to do what you suggest)

For posterity, let me explain what we had initially planned (assume the below is now past tense)...

---

We're building an RCP app whereby a user can open and work with many files at once, but not in the same way users would do so right now in the Eclipse IDE (for example) we don't intend to show a file browser and we would like each open file to have one corresponding tab at the highest level possible in the UI (think Chrome/Chromium). This tab then has it's own things (views?) within it that presents a rich UI to work with the file (things like editors, palettes, consoles, etc). Each tab would maintain it's own instances of it's internal UI bits and it's own state, completely independent of the other tabs.

But now I think we may approaching this with the wrong concepts in mind; I didn't fully grasp that I couldn't add a view inside another view.

---

If anyone has been able to achieve the above with Eclipse RCP I'd be very grateful if they could share the details.

Thanks,
Jits
Re: Re: Perspective with tabs [message #541778 is a reply to message #541710] Tue, 22 June 2010 13:52 Go to previous messageGo to next message
Wim Jongman is currently offline Wim JongmanFriend
Messages: 423
Registered: July 2009
Senior Member
mmm. Interesting use case. The top level thing you describe is the Eclipse
perspective. I picture a small view all across the workbench with tabs
(chrome). Pressing a tab would trigger the opening of a perspective. The top
view with tabs is a so called sticky view (it will be seen across all
perspectives). The other views can then be positioned to your liking.

Are the "top level views" (perspectives) known beforehand?

I suggest you hire an Eclipse expert for one or two day to get you going.
This will be worth every penny. Did you attend the Eclipse RCP course?

--

Best Regards,
Wim Jongman
-- Computers are not intelligent. They only think they are.
(Eclipse Old
Skool Quote Service)

> Hi Wim,
>
> Thanks for the response.
>
> I have a better handle on the UI concepts of the Eclipse RCP platform and
so we have changed our design to fit in better (i.e.: to do what you suggest)
>
> For posterity, let me explain what we had initially planned (assume the
below is now past tense)...
>
> ---
>
> We're building an RCP app whereby a user can open and work with many files
at once, but not in the same way users would do so right now in the Eclipse
IDE (for example) we don't intend to show a file browser and we would like
each open file to have one corresponding tab at the highest level possible in
the UI (think Chrome/Chromium). This tab then has it's own things (views?)
within it that presents a rich UI to work with the file (things like editors,
palettes, consoles, etc). Each tab would maintain it's own instances of it's
internal UI bits and it's own state, completely independent of the other
tabs.
>
> But now I think we may approaching this with the wrong concepts in mind; I
didn't fully grasp that I couldn't add a view inside another view.
>
> ---
>
> If anyone has been able to achieve the above with Eclipse RCP I'd be very
grateful if they could share the details.
>
> Thanks,
> Jits
Re: Re: Perspective with tabs [message #544434 is a reply to message #541778] Fri, 02 July 2010 16:09 Go to previous messageGo to next message
Jits  is currently offline Jits Friend
Messages: 3
Registered: June 2010
Junior Member
Hi Wim,

Interesting suggestion. In our case we would need to instantiate the same perspective multiple times - one for each open file, which would be the dedicated "workspace" for that file. However, it doesn't sound like this is at all possible within the current framework. I guess the best thing is for us to "play nice" with the framework and do things the Perspectives/Views/Editors way Smile

As an aside, Sticky Views sound very handy. And I suspect we could make good use of them.

We haven't attended any courses nor hired any experts. Not certain if we're in a position to do so, as we are part of an academic/research team. So we are currently making do with the Eclipse RCP (2nd ed) book, online documentation and the advice/help from folks like yourself.

Thanks again,
Jits
icon5.gif  Re: Re: Perspective with tabs [message #553260 is a reply to message #544434] Mon, 16 August 2010 20:48 Go to previous message
eshvar60  is currently offline eshvar60 Friend
Messages: 51
Registered: March 2010
Member
Hey Jits,

I have an application that needs to be similar to yours. Essentially I will have high level tabs where each tab has its own perspective, views and editors. Each tab is a self contained mini application where the only thing common across all of them would be a log view(StickyView I guess) and the tab bar to switch between the different tabs.

Each of these high level tabs also needs to be able to detatch(like a View) from the main window.

So how would you guys solve this problem. Windows? Perspectives? Can a View contain other views and editors inside of it?

I am having a lot of trouble wrapping my head around this problem and I have no one to consult(I am alone on this project).

Will provide beer for help to those who are in the DC area Laughing
Previous Topic:SWT Sleak Problem
Next Topic:CLI for RCP application
Goto Forum:
  


Current Time: Thu Sep 19 00:47:17 GMT 2024

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

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

Back to the top