Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Eclipse Plug-in Developer Guide
Previous Page Home Next Page

Defining a custom IntroURL action

Using the org.eclipse.ui.intro.configExtension extension point, plug-ins can contribute their own custom actions that can be used as a url value for a link element in a page. For example, consider the following link:

https://org.eclipse.ui.intro/runAction?pluginId=org.eclipse.pde.ui&class=org.eclipse.pde.ui.internal.samples.ShowSampleAction&id=org.eclipse.sdk.samples.swt.examples

This IntroURL will run an action class called ShowSampleAction, which is in a package "org.eclipse.pde.ui.internal.samples" in the plug-in "org.eclipse.pde.ui". The id of the sample to run is "org.eclipse.sdk.samples.swt.examples".

To define a custom version of this intro URL, you can use the following markup:

   <extension point="org.eclipse.ui.intro.configExtension">
      <action
            name="myCommand"
            replaces="runAction?pluginId=org.eclipse.pde.ui&amp;class=org.eclipse.pde.ui.internal.samples.ShowSampleAction">
      </action>
   </extension>
With the above extension you can now use the following URL to run the same action:

https://org.eclipse.ui.intro/myCommand?id=org.eclipse.sdk.samples.swt.examples

The action "myCommand" will be replaced by the value of the replaces attribute and any remaining URL parameters will be appended to the end. Once the substitution is made, the resulting URL will be expanded back into:

https://org.eclipse.ui.intro/runAction?pluginId=org.eclipse.pde.ui&amp;class=org.eclipse.pde.ui.internal.samples.ShowSampleAction&amp;id=org.eclipse.sdk.samples.swt.examples


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire