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 14:48  |
Eclipse User |
|
|
|
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 10:35   |
Eclipse User |
|
|
|
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 14:45   |
Eclipse User |
|
|
|
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 #257062 is a reply to message #256878] |
Wed, 30 June 2004 08:16   |
Eclipse User |
|
|
|
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 15:25   |
Eclipse User |
|
|
|
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 15:51   |
Eclipse User |
|
|
|
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 15:55   |
Eclipse User |
|
|
|
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 02:48   |
Eclipse User |
|
|
|
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 09:26  |
Eclipse User |
|
|
|
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.
|
|
|
Goto Forum:
Current Time: Fri May 09 08:42:45 EDT 2025
Powered by FUDForum. Page generated in 0.05796 seconds
|