Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Platform - User Assistance (UA) » Launching a project from universal welcome
Launching a project from universal welcome [message #475116] Fri, 20 February 2009 20:20 Go to next message
robert ly is currently offline robert ly
Messages: 16
Registered: July 2009
Junior Member
Is there a way to do this? I want to include some samples in the universal
welcome and when a user clicks on the sample, it will open up the
workbench, with the project loaded into the workspace.
Re: Launching a project from universal welcome [message #475117 is a reply to message #475116] Fri, 20 February 2009 22:10 Go to previous messageGo to next message
Chris Goldthorpe is currently offline Chris Goldthorpe
Messages: 815
Registered: July 2009
Senior Member
Yes, it is possible to do this, that is how the samples page of
universal intro works. If you use a url starting with
http://org.eclipse.ui.intro/runAction it will be special cased and
launch the Action class specified. Here's one of the hrefs used in the
samples page.

http://org.eclipse.ui.intro/runAction?pluginId=org.eclipse.p de.ui&class=org.eclipse.pde.internal.ui.samples.ShowSamp leAction&id=org.eclipse.sdk.samples.propertysheet


robert ly wrote:
> Is there a way to do this? I want to include some samples in the
> universal welcome and when a user clicks on the sample, it will open up
> the workbench, with the project loaded into the workspace.
>
Re: Launching a project from universal welcome [message #475120 is a reply to message #475117] Tue, 24 February 2009 01:04 Go to previous message
robert ly is currently offline robert ly
Messages: 16
Registered: July 2009
Junior Member
Thanks, I have hacking away as to how to do this, and got it to work by
modifying the plugin.xml file for org.eclipse.sdk.samples plugin and
adding my project to the list of available projects. I then add my
archived project to the samples folder of that plugin. My project shows up
in the list of available samples along with the default Eclipse ones when
using this link:

http://org.eclipse.ui.intro/runAction?pluginId=org.eclipse.p de.ui&amp ;class=org.eclipse.pde.internal.ui.samples.ShowSampleAction& amp;amp;id=org.eclipse.sdk.samples.InsuranceApp

My question is, how would I go about doing this without hacking the
default eclipse samples plugin? I know I need to write my own implementor,
but where would I start? Are there any samples floating around? I tried
just creating a new ShowSampleAction class, which was just a copy of the
original class but pointing to my samples plugin instead, but I get a lot
of "Discouraged Access" errors when try it this way. Any code samples out
there would be appreciated. I don't even need a complicated wizard. If a
user clicks on the link in the welcome screen, then all I need is it to
open in the workspace.
Chris Goldthorpe wrote:

> Yes, it is possible to do this, that is how the samples page of
> universal intro works. If you use a url starting with
> http://org.eclipse.ui.intro/runAction it will be special cased and
> launch the Action class specified. Here's one of the hrefs used in the
> samples page.

>
http://org.eclipse.ui.intro/runAction?pluginId=org.eclipse.p de.ui&class=org.eclipse.pde.internal.ui.samples.ShowSamp leAction&id=org.eclipse.sdk.samples.propertysheet


> robert ly wrote:
>> Is there a way to do this? I want to include some samples in the
>> universal welcome and when a user clicks on the sample, it will open up
>> the workbench, with the project loaded into the workspace.
>>
Re: Launching a project from universal welcome [message #623231 is a reply to message #475116] Fri, 20 February 2009 22:10 Go to previous message
Chris Goldthorpe is currently offline Chris Goldthorpe
Messages: 815
Registered: July 2009
Senior Member
Yes, it is possible to do this, that is how the samples page of
universal intro works. If you use a url starting with
http://org.eclipse.ui.intro/runAction it will be special cased and
launch the Action class specified. Here's one of the hrefs used in the
samples page.

http://org.eclipse.ui.intro/runAction?pluginId=org.eclipse.p de.ui&class=org.eclipse.pde.internal.ui.samples.ShowSamp leAction&id=org.eclipse.sdk.samples.propertysheet


robert ly wrote:
> Is there a way to do this? I want to include some samples in the
> universal welcome and when a user clicks on the sample, it will open up
> the workbench, with the project loaded into the workspace.
>
Re: Launching a project from universal welcome [message #623234 is a reply to message #475117] Tue, 24 February 2009 01:04 Go to previous message
robert ly is currently offline robert ly
Messages: 16
Registered: July 2009
Junior Member
Thanks, I have hacking away as to how to do this, and got it to work by
modifying the plugin.xml file for org.eclipse.sdk.samples plugin and
adding my project to the list of available projects. I then add my
archived project to the samples folder of that plugin. My project shows up
in the list of available samples along with the default Eclipse ones when
using this link:

http://org.eclipse.ui.intro/runAction?pluginId=org.eclipse.p de.ui&amp ;class=org.eclipse.pde.internal.ui.samples.ShowSampleAction& amp;amp;id=org.eclipse.sdk.samples.InsuranceApp

My question is, how would I go about doing this without hacking the
default eclipse samples plugin? I know I need to write my own implementor,
but where would I start? Are there any samples floating around? I tried
just creating a new ShowSampleAction class, which was just a copy of the
original class but pointing to my samples plugin instead, but I get a lot
of "Discouraged Access" errors when try it this way. Any code samples out
there would be appreciated. I don't even need a complicated wizard. If a
user clicks on the link in the welcome screen, then all I need is it to
open in the workspace.
Chris Goldthorpe wrote:

> Yes, it is possible to do this, that is how the samples page of
> universal intro works. If you use a url starting with
> http://org.eclipse.ui.intro/runAction it will be special cased and
> launch the Action class specified. Here's one of the hrefs used in the
> samples page.

>
http://org.eclipse.ui.intro/runAction?pluginId=org.eclipse.p de.ui&class=org.eclipse.pde.internal.ui.samples.ShowSamp leAction&id=org.eclipse.sdk.samples.propertysheet


> robert ly wrote:
>> Is there a way to do this? I want to include some samples in the
>> universal welcome and when a user clicks on the sample, it will open up
>> the workbench, with the project loaded into the workspace.
>>
Previous Topic:Context help included in search scope?
Next Topic:Specifying TOC order and "Show result categories"
Goto Forum:
  


Current Time: Fri Sep 19 14:05:25 GMT 2014

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

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