Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » RCP question: How to fill the PerspectiveBar with default Perspectives
RCP question: How to fill the PerspectiveBar with default Perspectives [message #256455] Mon, 28 June 2004 18:48 Go to next message
Eclipse UserFriend
Originally posted by: zaraza_NOSPAM.corridorofcells.com

When using the RCP, how to I have all the available Perspectives show up
by default in the PerspectiveBar? Right now only the default one shows
up, I have to press the "Other" button to have my other Perspective to
become available, which is very counter-intuitive.

None of the 3 RCP tutorials seem to cover this :-(

thanks in advance,
Jacek
Re: RCP question: How to fill the PerspectiveBar with default Perspectives [message #256680 is a reply to message #256455] Tue, 29 June 2004 14:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse.removeMe.guide.andRemoveMe.earthlink.andMeToo.com

Add it to your perspective factory, for example:

public class MyPerspectiveFactory implements IPerspectiveFactory {
public void createInitialLayout(IPageLayout layout) {
layout.addView("myView1", IPageLayout.TOP, 0.65f,
IPageLayout.ID_EDITOR_AREA);
layout.addView("myView2", IPageLayout.RIGHT, 0.75f,
IPageLayout.ID_EDITOR_AREA);
layout.setEditorAreaVisible(true);
// this adds it to the shortcut list of perspectives
layout.addPerspectiveShortcut("myPerspective1");
layout.addShowViewShortcut("myView1");
layout.addShowViewShortcut("myView2");
}
}

-- Dan
-----------------------------------------------
co-author, "The Java Developer's Guide to Eclipse"

"Jacek" <zaraza_NOSPAM@corridorofcells.com> wrote in message
news:cbpp3j$e6h$1@eclipse.org...
> When using the RCP, how to I have all the available Perspectives show up
> by default in the PerspectiveBar? Right now only the default one shows
> up, I have to press the "Other" button to have my other Perspective to
> become available, which is very counter-intuitive.
>
> None of the 3 RCP tutorials seem to cover this :-(
>
> thanks in advance,
> Jacek
Re: RCP question: How to fill the PerspectiveBar with default Perspectives [message #256798 is a reply to message #256680] Tue, 29 June 2004 18:45 Go to previous messageGo to next message
Ed Burnette is currently offline Ed BurnetteFriend
Messages: 279
Registered: July 2009
Senior Member
Does that affect the bar too or just the perspective shortcut menu (Window >
Open Perspective)?

--
Ed Burnette, co-author, Eclipse in Action
www.eclipsepowered.org

"Dan Kehn" <eclipse.removeMe.guide@andRemoveMe.earthlink.andMeToo.com> wrote
in message news:cbrun6$12h$1@eclipse.org...
> Add it to your perspective factory, for example:
>
> public class MyPerspectiveFactory implements IPerspectiveFactory {
> public void createInitialLayout(IPageLayout layout) {
> layout.addView("myView1", IPageLayout.TOP, 0.65f,
> IPageLayout.ID_EDITOR_AREA);
> layout.addView("myView2", IPageLayout.RIGHT, 0.75f,
> IPageLayout.ID_EDITOR_AREA);
> layout.setEditorAreaVisible(true);
> // this adds it to the shortcut list of perspectives
> layout.addPerspectiveShortcut("myPerspective1");
> layout.addShowViewShortcut("myView1");
> layout.addShowViewShortcut("myView2");
> }
> }
>
> -- Dan
> -----------------------------------------------
> co-author, "The Java Developer's Guide to Eclipse"
>
> "Jacek" <zaraza_NOSPAM@corridorofcells.com> wrote in message
> news:cbpp3j$e6h$1@eclipse.org...
> > When using the RCP, how to I have all the available Perspectives show up
> > by default in the PerspectiveBar? Right now only the default one shows
> > up, I have to press the "Other" button to have my other Perspective to
> > become available, which is very counter-intuitive.
> >
> > None of the 3 RCP tutorials seem to cover this :-(
> >
> > thanks in advance,
> > Jacek
>
>
Re: RCP question: How to fill the PerspectiveBar with default Perspectives [message #256863 is a reply to message #256798] Tue, 29 June 2004 20:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: zaraza_NOSPAM.corridorofcells.com

>>"Dan Kehn"
<eclipse.removeMe.guide@andRemoveMe.earthlink.andMeToo.com> >> wrote in
message news:cbrun6$12h$1@eclipse.org...
>> Add it to your perspective factory, for example:

How to I tell RCP to use my custom perspective factory instead of
whatever default one it is using? Is there someplace in the plugin.xml
that I have to define that?

thanks,
Jacek
Re: RCP question: How to fill the PerspectiveBar with default Perspectives [message #256867 is a reply to message #256798] Tue, 29 June 2004 20:50 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse.removeMe.guide.andRemoveMe.earthlink.andMeToo.com

I just tried it. Appears to affect both.

-- Dan
-----------------------------------------------
co-author, "The Java Developer's Guide to Eclipse"

"Ed Burnette" <ed.burnette@sas.com> wrote in message
news:cbsdbk$43s$1@eclipse.org...
> Does that affect the bar too or just the perspective shortcut menu (Window
>
> Open Perspective)?
>
> --
> Ed Burnette, co-author, Eclipse in Action
> www.eclipsepowered.org
>
> "Dan Kehn" <eclipse.removeMe.guide@andRemoveMe.earthlink.andMeToo.com>
wrote
> in message news:cbrun6$12h$1@eclipse.org...
> > Add it to your perspective factory, for example:
> > ..snip...
Re: RCP question: How to fill the PerspectiveBar with default Perspectives [message #256878 is a reply to message #256863] Tue, 29 June 2004 20:57 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse.removeMe.guide.andRemoveMe.earthlink.andMeToo.com

Your override of WorkbenchAdvisor.getInitialWindowPerspectiveId (and your
extension declaration <extension point="org.eclipse.ui.perspectives"> ...
</extension>). That's covered in the first tutorial, section "Workbench
Advisor", no?

-- Dan
-----------------------------------------------
co-author, "The Java Developer's Guide to Eclipse"

"Jacek" <zaraza_NOSPAM@corridorofcells.com> wrote in message
news:cbsjvq$idm$1@eclipse.org...
> >>"Dan Kehn"
> <eclipse.removeMe.guide@andRemoveMe.earthlink.andMeToo.com> >> wrote in
> message news:cbrun6$12h$1@eclipse.org...
> >> Add it to your perspective factory, for example:
>
> How to I tell RCP to use my custom perspective factory instead of
> whatever default one it is using? Is there someplace in the plugin.xml
> that I have to define that?
>
> thanks,
> Jacek
Re: RCP question: How to fill the PerspectiveBar with default Perspectives [message #256894 is a reply to message #256878] Tue, 29 June 2004 21:43 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: zaraza_NOSPAM.corridorofcells.com

Dan Kehn wrote:
> Your override of WorkbenchAdvisor.getInitialWindowPerspectiveId (and your
> extension declaration <extension point="org.eclipse.ui.perspectives"> ...
> </extension>). That's covered in the first tutorial, section "Workbench
> Advisor", no?
>

Must have missed it, will look into it. thanks!

Jacek
Re: RCP question: How to fill the PerspectiveBar with default Perspectives [message #257062 is a reply to message #256878] Wed, 30 June 2004 12:16 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: n.jouanin.regie-france.com

I followed this tutorial, made sure that the string returned by the
getInitialWindowPerspectiveId() was corresponding to the perspective ID
in plugin.xml, but it seems that my PerspectiveFactory is never called.
I've placed several breakpoints (in the constructor and in
createInitialLayout() ) , and it never breaks in .... but the workbench
is successuflly started, my view is displayed , but I think that a
coincidence , or something are don't understand yet .
Any idea ?


Dan Kehn wrote:
> Your override of WorkbenchAdvisor.getInitialWindowPerspectiveId (and your
> extension declaration <extension point="org.eclipse.ui.perspectives"> ...
> </extension>). That's covered in the first tutorial, section "Workbench
> Advisor", no?
>
> -- Dan
> -----------------------------------------------
> co-author, "The Java Developer's Guide to Eclipse"
>
> "Jacek" <zaraza_NOSPAM@corridorofcells.com> wrote in message
> news:cbsjvq$idm$1@eclipse.org...
>
>>>>"Dan Kehn"
>>
>><eclipse.removeMe.guide@andRemoveMe.earthlink.andMeToo.com> >> wrote in
>>message news:cbrun6$12h$1@eclipse.org...
>> >> Add it to your perspective factory, for example:
>>
>>How to I tell RCP to use my custom perspective factory instead of
>>whatever default one it is using? Is there someplace in the plugin.xml
>>that I have to define that?
>>
>>thanks,
>>Jacek
>
>
>
Re: RCP question: How to fill the PerspectiveBar with default Perspectives [message #257222 is a reply to message #257062] Wed, 30 June 2004 19:25 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse.removeMe.guide.andRemoveMe.earthlink.andMeToo.com

Probably a typo, I've done it several times myself. Check that the "id" in
the extension and returned by getInitialWindowPerspectiveId match. Also
check the Error Log, there may have been an exception when creating your
factory. Ed may have other ideas (sorry, I am not very familiar with his
tutorial).

-- Dan
-----------------------------------------------
co-author, "The Java Developer's Guide to Eclipse"

"Nicolas Jouanin" <n.jouanin@regie-france.com> wrote in message
news:cbuapl$mjh$1@eclipse.org...
> I followed this tutorial, made sure that the string returned by the
> getInitialWindowPerspectiveId() was corresponding to the perspective ID
> in plugin.xml, but it seems that my PerspectiveFactory is never called.
> I've placed several breakpoints (in the constructor and in
> createInitialLayout() ) , and it never breaks in .... but the workbench
> is successuflly started, my view is displayed , but I think that a
> coincidence , or something are don't understand yet .
> Any idea ?
>
>
> Dan Kehn wrote:
> > Your override of WorkbenchAdvisor.getInitialWindowPerspectiveId (and
your
> > extension declaration <extension point="org.eclipse.ui.perspectives">
....
> > </extension>). That's covered in the first tutorial, section "Workbench
> > Advisor", no?
> >
> > -- Dan
> > -----------------------------------------------
> > co-author, "The Java Developer's Guide to Eclipse"
Re: RCP question: How to fill the PerspectiveBar with default Perspectives [message #257233 is a reply to message #257062] Wed, 30 June 2004 19:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nick_edgar._no.spam.please_.ca.ibm.com

Are you including org.eclipse.platform in the set of plugins when launching
your RCP app (i.e. is it selected on the plugins tab of the launch
configuration)?
If so, then it sets the default preference setting for the initial
perspective in its plugin_customization.ini file. This will override the
advisor's getInitialWindowPerspectiveId() (as described in the Javadoc for
it).

Nick

"Nicolas Jouanin" <n.jouanin@regie-france.com> wrote in message
news:cbuapl$mjh$1@eclipse.org...
> I followed this tutorial, made sure that the string returned by the
> getInitialWindowPerspectiveId() was corresponding to the perspective ID
> in plugin.xml, but it seems that my PerspectiveFactory is never called.
> I've placed several breakpoints (in the constructor and in
> createInitialLayout() ) , and it never breaks in .... but the workbench
> is successuflly started, my view is displayed , but I think that a
> coincidence , or something are don't understand yet .
> Any idea ?
>
>
> Dan Kehn wrote:
> > Your override of WorkbenchAdvisor.getInitialWindowPerspectiveId (and
your
> > extension declaration <extension point="org.eclipse.ui.perspectives">
....
> > </extension>). That's covered in the first tutorial, section "Workbench
> > Advisor", no?
> >
> > -- Dan
> > -----------------------------------------------
> > co-author, "The Java Developer's Guide to Eclipse"
> >
> > "Jacek" <zaraza_NOSPAM@corridorofcells.com> wrote in message
> > news:cbsjvq$idm$1@eclipse.org...
> >
> >>>>"Dan Kehn"
> >>
> >><eclipse.removeMe.guide@andRemoveMe.earthlink.andMeToo.com> >> wrote in
> >>message news:cbrun6$12h$1@eclipse.org...
> >> >> Add it to your perspective factory, for example:
> >>
> >>How to I tell RCP to use my custom perspective factory instead of
> >>whatever default one it is using? Is there someplace in the plugin.xml
> >>that I have to define that?
> >>
> >>thanks,
> >>Jacek
> >
> >
> >
Re: RCP question: How to fill the PerspectiveBar with default Perspectives [message #257237 is a reply to message #256798] Wed, 30 June 2004 19:55 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nick_edgar._no.spam.please_.ca.ibm.com

IPageLayout.addPerspectiveShortcut just adds shortcuts from the perspective
(as shown in Window > Open Perspective in the IDE), it does not open them.

Try using IWorkbench.showPerspective(perspectiveId, window) from within the
advisor's postWindowOpen method.

Nick

"Ed Burnette" <ed.burnette@sas.com> wrote in message
news:cbsdbk$43s$1@eclipse.org...
> Does that affect the bar too or just the perspective shortcut menu (Window
>
> Open Perspective)?
>
> --
> Ed Burnette, co-author, Eclipse in Action
> www.eclipsepowered.org
>
> "Dan Kehn" <eclipse.removeMe.guide@andRemoveMe.earthlink.andMeToo.com>
wrote
> in message news:cbrun6$12h$1@eclipse.org...
> > Add it to your perspective factory, for example:
> >
> > public class MyPerspectiveFactory implements IPerspectiveFactory {
> > public void createInitialLayout(IPageLayout layout) {
> > layout.addView("myView1", IPageLayout.TOP, 0.65f,
> > IPageLayout.ID_EDITOR_AREA);
> > layout.addView("myView2", IPageLayout.RIGHT, 0.75f,
> > IPageLayout.ID_EDITOR_AREA);
> > layout.setEditorAreaVisible(true);
> > // this adds it to the shortcut list of perspectives
> > layout.addPerspectiveShortcut("myPerspective1");
> > layout.addShowViewShortcut("myView1");
> > layout.addShowViewShortcut("myView2");
> > }
> > }
> >
> > -- Dan
> > -----------------------------------------------
> > co-author, "The Java Developer's Guide to Eclipse"
> >
> > "Jacek" <zaraza_NOSPAM@corridorofcells.com> wrote in message
> > news:cbpp3j$e6h$1@eclipse.org...
> > > When using the RCP, how to I have all the available Perspectives show
up
> > > by default in the PerspectiveBar? Right now only the default one shows
> > > up, I have to press the "Other" button to have my other Perspective to
> > > become available, which is very counter-intuitive.
> > >
> > > None of the 3 RCP tutorials seem to cover this :-(
> > >
> > > thanks in advance,
> > > Jacek
> >
> >
>
>
Re: RCP question: How to fill the PerspectiveBar with default Perspectives [message #257346 is a reply to message #257062] Thu, 01 July 2004 06:48 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: n.jouanin.regie-france.com

I've checked the tipo times and times.
I've also checked that org.eclipse.platform was not included in my
plugin list.

Still the same .... until I decided to check "Clear workspace data
before launching" in the Runtime Workbench configuration : then it
worked ! may be a configuration problem since I upgraded from RC to 3.0
release ...

Thanks ,

Nicolas.


Nicolas Jouanin wrote:
> I followed this tutorial, made sure that the string returned by the
> getInitialWindowPerspectiveId() was corresponding to the perspective ID
> in plugin.xml, but it seems that my PerspectiveFactory is never called.
> I've placed several breakpoints (in the constructor and in
> createInitialLayout() ) , and it never breaks in .... but the workbench
> is successuflly started, my view is displayed , but I think that a
> coincidence , or something are don't understand yet .
> Any idea ?
>
>
> Dan Kehn wrote:
>
>> Your override of WorkbenchAdvisor.getInitialWindowPerspectiveId (and your
>> extension declaration <extension point="org.eclipse.ui.perspectives"> ...
>> </extension>). That's covered in the first tutorial, section "Workbench
>> Advisor", no?
>>
>> -- Dan
>> -----------------------------------------------
>> co-author, "The Java Developer's Guide to Eclipse"
>>
>> "Jacek" <zaraza_NOSPAM@corridorofcells.com> wrote in message
>> news:cbsjvq$idm$1@eclipse.org...
>>
>>>>> "Dan Kehn"
>>>
>>>
>>> <eclipse.removeMe.guide@andRemoveMe.earthlink.andMeToo.com> >> wrote in
>>> message news:cbrun6$12h$1@eclipse.org...
>>> >> Add it to your perspective factory, for example:
>>>
>>> How to I tell RCP to use my custom perspective factory instead of
>>> whatever default one it is using? Is there someplace in the plugin.xml
>>> that I have to define that?
>>>
>>> thanks,
>>> Jacek
>>
>>
>>
>>
Re: RCP question: How to fill the PerspectiveBar with default Perspectives [message #257472 is a reply to message #257346] Thu, 01 July 2004 13:26 Go to previous message
Eclipse UserFriend
Originally posted by: eclipse.removeMe.guide.andRemoveMe.earthlink.andMeToo.com

Ah sorry, I should have mentioned that one. A less dramatic approach is to
check the "clear configuration" choice on the third page of the launch
configuration. That tells the runtime to regenerate all the manifest.mf
files. It seems to cure a lot of "my plug-in isn't recognized" woes.
Similar hints for a deployed environment: (1) Specify -clean as a command
line option [one time only], or (2) more extreme, delete all the
subdirectories in the eclipse\configuration (leave the config.ini).

-- Dan
---------------------------------------------
co-author, "The Java Developer's Guide to Eclipse"

"Nicolas Jouanin" <n.jouanin@regie-france.com> wrote in message
news:cc0bt0$eg2$1@eclipse.org...
> I've checked the tipo times and times.
> I've also checked that org.eclipse.platform was not included in my
> plugin list.
>
> Still the same .... until I decided to check "Clear workspace data
> before launching" in the Runtime Workbench configuration : then it
> worked ! may be a configuration problem since I upgraded from RC to 3.0
> release ...
>
> Thanks ,
>
> Nicolas.
Previous Topic:Clearcase plugin for Eclipse
Next Topic:ToolItem does not listen to Listener
Goto Forum:
  


Current Time: Sun Jun 30 15:33:42 GMT 2024

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

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

Back to the top