Skip to main content



      Home
Home » Eclipse Projects » Platform - User Assistance (UA) » is there any standard action to display the Welcome page
is there any standard action to display the Welcome page [message #474896] Fri, 05 December 2008 12:30 Go to next message
Eclipse UserFriend
Originally posted by: c.dore.castsoftware.com

Hi

I'm developping my own RCP app. I've been able to show an (empty so far,
no matter) welcome page when starting on a new workspace.

My problem is: I'd like to add the same Welcome command in the help
menu, using extensions (should be easier than code, given my plugin
distribution)

I've been able to find the standard action for help and other standard
commands

<menu
id="help"
label="Help">
<command
commandId="org.eclipse.ui.help.helpContents"
id="helpContents"
style="push">
</command>
<command
commandId="org.eclipse.ui.help.helpSearch"
id="helpSearch"
style="push">
</command>
<command
commandId="org.eclipse.ui.help.aboutAction"
id="aboutAction"
style="push">
</command>
</menu>


is there anything similar for the Welcome page, that would allow me to
add it in my menu with just a <command ...> tag?

thanks for you help.

--
cd
Re: is there any standard action to display the Welcome page [message #474897 is a reply to message #474896] Fri, 05 December 2008 13:16 Go to previous messageGo to next message
Eclipse UserFriend
It looks as though there are a couple of ways of doing this:

There is a command org.eclipse.ui.help.quickStartAction which will open
Welcome. This is the easiest if you just want to open the start page.

If you need to open a specific page in Welcome you will need to write
some Java code:

Here is some code from the intro search participant which shows a
specific page

IIntroURL url = IntroURLFactory.createIntroURL
("http://org.eclipse.ui.intro/showPage?id=" + id); //$NON-NLS-1$
return url.execute();
Re: is there any standard action to display the Welcome page [message #474908 is a reply to message #474897] Mon, 15 December 2008 07:46 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: c.dore.castsoftware.com

Hi

thanks for the answer. It makes the Welcome menu item appear, but
strange enough, it is disabled....

Any idea why?

is it related to the fact that it has been obsoleted?
is there any up to date way to have the menu item using a simple extension ?


below the content of my plugin.xml. Thanks for your help.


<extension
point="org.eclipse.ui.intro">
<intro
class="org.eclipse.ui.intro.config.CustomizableIntroPart"
id="com.castsoftware.pmc.intro">
</intro>
<introProductBinding
introId="com.castsoftware.pmc.intro"
productId="com.castsoftware.pmc.console.CAST_PMC_Console">
</introProductBinding>
</extension>

<extension point="org.eclipse.ui.intro.config">
<config id = "template2_configId"
introId="com.castsoftware.pmc.intro"
content="introContent.xml">
<presentation home-page-id="root">
<implementation kind="html"/>
</presentation>
</config>
</extension>




<extension
point="org.eclipse.ui.menus">
<menuContribution
locationURI="menu:org.eclipse.ui.main.menu">
<menu
id="help"
label="Help">
<separator
name="com.castsoftware.intro.separator"
visible="true">
</separator>
<command
commandId="org.eclipse.ui.help.quickStartAction"
id="quickStartAction"
style="push">
</command>
</menu>
</menuContribution>
</extension>



Chris Goldthorpe a écrit :
> It looks as though there are a couple of ways of doing this:
>
> There is a command org.eclipse.ui.help.quickStartAction which will open
> Welcome. This is the easiest if you just want to open the start page.
>
> If you need to open a specific page in Welcome you will need to write
> some Java code:
>
> Here is some code from the intro search participant which shows a
> specific page
>
> IIntroURL url = IntroURLFactory.createIntroURL
> ("http://org.eclipse.ui.intro/showPage?id=" + id); //$NON-NLS-1$
> return url.execute();
>
Re: is there any standard action to display the Welcome page [message #474911 is a reply to message #474908] Mon, 15 December 2008 16:15 Go to previous messageGo to next message
Eclipse UserFriend
I took a look at how the SDK creates the Welcome menu item - the menu
item is created in WorkbenchActionBuilder.makeActions(). I must have
pointed you at the wrong place in my previous reply. For an RCP this
code would typically go in
ApplicationActionBarAdvisor.makeActions(IWorkbenchWindow)

The code is here:

if (window.getWorkbench().getIntroManager().hasIntro()) {
introAction = ActionFactory.INTRO.create(window);
register(introAction);
}

.....

protected void register(IAction action) {
Assert.isNotNull(action, "Action must not be null"); //$NON-NLS-1$
String id = action.getId();
Assert.isNotNull(id, "Action must not have null id"); //$NON-NLS-1$
getActionBarConfigurer().registerGlobalAction(action);
actions.put(id, action);
}
Re: is there any standard action to display the Welcome page [message #474917 is a reply to message #474911] Thu, 18 December 2008 11:32 Go to previous message
Eclipse UserFriend
Originally posted by: c.dore.castsoftware.com

THat's ok if you want to contribute there from the main plugin.

but what if you want to add a welcome page from an additional plugin?
You dont have any more access to the ApplicationActionBarAdvisor....



Chris Goldthorpe a écrit :
> I took a look at how the SDK creates the Welcome menu item - the menu
> item is created in WorkbenchActionBuilder.makeActions(). I must have
> pointed you at the wrong place in my previous reply. For an RCP this
> code would typically go in
> ApplicationActionBarAdvisor.makeActions(IWorkbenchWindow)
>
> The code is here:
>
> if (window.getWorkbench().getIntroManager().hasIntro()) {
> introAction = ActionFactory.INTRO.create(window);
> register(introAction);
> }
>
> ....
>
> protected void register(IAction action) {
> Assert.isNotNull(action, "Action must not be null"); //$NON-NLS-1$
> String id = action.getId();
> Assert.isNotNull(id, "Action must not have null id"); //$NON-NLS-1$
> getActionBarConfigurer().registerGlobalAction(action);
> actions.put(id, action);
> }
Re: is there any standard action to display the Welcome page [message #622628 is a reply to message #474896] Fri, 05 December 2008 13:16 Go to previous message
Eclipse UserFriend
It looks as though there are a couple of ways of doing this:

There is a command org.eclipse.ui.help.quickStartAction which will open
Welcome. This is the easiest if you just want to open the start page.

If you need to open a specific page in Welcome you will need to write
some Java code:

Here is some code from the intro search participant which shows a
specific page

IIntroURL url = IntroURLFactory.createIntroURL
("http://org.eclipse.ui.intro/showPage?id=" + id); //$NON-NLS-1$
return url.execute();
Re: is there any standard action to display the Welcome page [message #622690 is a reply to message #474897] Mon, 15 December 2008 07:46 Go to previous message
Eclipse UserFriend
Hi

thanks for the answer. It makes the Welcome menu item appear, but
strange enough, it is disabled....

Any idea why?

is it related to the fact that it has been obsoleted?
is there any up to date way to have the menu item using a simple extension ?


below the content of my plugin.xml. Thanks for your help.


<extension
point="org.eclipse.ui.intro">
<intro
class="org.eclipse.ui.intro.config.CustomizableIntroPart"
id="com.castsoftware.pmc.intro">
</intro>
<introProductBinding
introId="com.castsoftware.pmc.intro"
productId="com.castsoftware.pmc.console.CAST_PMC_Console">
</introProductBinding>
</extension>

<extension point="org.eclipse.ui.intro.config">
<config id = "template2_configId"
introId="com.castsoftware.pmc.intro"
content="introContent.xml">
<presentation home-page-id="root">
<implementation kind="html"/>
</presentation>
</config>
</extension>




<extension
point="org.eclipse.ui.menus">
<menuContribution
locationURI="menu:org.eclipse.ui.main.menu">
<menu
id="help"
label="Help">
<separator
name="com.castsoftware.intro.separator"
visible="true">
</separator>
<command
commandId="org.eclipse.ui.help.quickStartAction"
id="quickStartAction"
style="push">
</command>
</menu>
</menuContribution>
</extension>



Chris Goldthorpe a écrit :
> It looks as though there are a couple of ways of doing this:
>
> There is a command org.eclipse.ui.help.quickStartAction which will open
> Welcome. This is the easiest if you just want to open the start page.
>
> If you need to open a specific page in Welcome you will need to write
> some Java code:
>
> Here is some code from the intro search participant which shows a
> specific page
>
> IIntroURL url = IntroURLFactory.createIntroURL
> ("http://org.eclipse.ui.intro/showPage?id=" + id); //$NON-NLS-1$
> return url.execute();
>
Re: is there any standard action to display the Welcome page [message #622696 is a reply to message #474908] Mon, 15 December 2008 16:15 Go to previous message
Eclipse UserFriend
I took a look at how the SDK creates the Welcome menu item - the menu
item is created in WorkbenchActionBuilder.makeActions(). I must have
pointed you at the wrong place in my previous reply. For an RCP this
code would typically go in
ApplicationActionBarAdvisor.makeActions(IWorkbenchWindow)

The code is here:

if (window.getWorkbench().getIntroManager().hasIntro()) {
introAction = ActionFactory.INTRO.create(window);
register(introAction);
}

.....

protected void register(IAction action) {
Assert.isNotNull(action, "Action must not be null"); //$NON-NLS-1$
String id = action.getId();
Assert.isNotNull(id, "Action must not have null id"); //$NON-NLS-1$
getActionBarConfigurer().registerGlobalAction(action);
actions.put(id, action);
}
Re: is there any standard action to display the Welcome page [message #622706 is a reply to message #474911] Thu, 18 December 2008 11:32 Go to previous message
Eclipse UserFriend
THat's ok if you want to contribute there from the main plugin.

but what if you want to add a welcome page from an additional plugin?
You dont have any more access to the ApplicationActionBarAdvisor....



Chris Goldthorpe a écrit :
> I took a look at how the SDK creates the Welcome menu item - the menu
> item is created in WorkbenchActionBuilder.makeActions(). I must have
> pointed you at the wrong place in my previous reply. For an RCP this
> code would typically go in
> ApplicationActionBarAdvisor.makeActions(IWorkbenchWindow)
>
> The code is here:
>
> if (window.getWorkbench().getIntroManager().hasIntro()) {
> introAction = ActionFactory.INTRO.create(window);
> register(introAction);
> }
>
> ....
>
> protected void register(IAction action) {
> Assert.isNotNull(action, "Action must not be null"); //$NON-NLS-1$
> String id = action.getId();
> Assert.isNotNull(id, "Action must not have null id"); //$NON-NLS-1$
> getActionBarConfigurer().registerGlobalAction(action);
> actions.put(id, action);
> }
Previous Topic:.css is not making relative links to images
Next Topic:Dynamic Help not working
Goto Forum:
  


Current Time: Tue Jul 22 18:45:14 EDT 2025

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

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

Back to the top