Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » org.eclipse.ui.intro runAction
org.eclipse.ui.intro runAction [message #230153] Fri, 16 April 2004 15:33 Go to next message
Eclipse UserFriend
Originally posted by: stealth02r1.NO.SPAM.yahoo.com

I am attempting to use the Introduction framework for my own primary
feature plugin. I want to enable the clicking on a Sample Program to open
either a text file or a Java source file and then show the file in the
Package Explorer. I don't need to install or unzip anything like the
current sample URL's do. The Any tips on how to do this? I assume I should
be able to use the url="http://org.eclipse.ui.intro/runAction?" command
but I have yet to figure out the proper syntax for dislpaying a simple
jave file.

Thanks!
David
Re: org.eclipse.ui.intro runAction [message #231314 is a reply to message #230153] Mon, 19 April 2004 16:29 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: xxx.ca.ibm.com

This is a multi-part message in MIME format.

------=_NextPart_000_0015_01C4262B.70CFEAE0
Content-Type: multipart/alternative;
boundary="----=_NextPart_001_0016_01C4262B.70CFEAE0"


------=_NextPart_001_0016_01C4262B.70CFEAE0
Content-Type: text/plain;
charset="ISO-8859-15"
Content-Transfer-Encoding: quoted-printable

David,
you are correct in that you have to use the =
url=3D"http://org.eclipse.ui.intro/runAction?" intro action, but there =
is no "proper syntax for dislpaying a simple
jave file".=20
There is a prefabricated list of supported intro actions. The attached =
file lists them all. Look at the syntax for the runAction one and let me =
know if you need help. The idea is that you pass the url the name of the =
action class to run, and the plugin id from which to load it. If your =
action subclasses the jface IAction class, then the run method of your =
action class will be called. If you subclass IIntroAction (look at the =
org.eclipse.ui.internal.intro.impl.model.IIntroAction class), then the =
following method is called:

/**
* Called right before the run method of the action. The properties
* represents the key=3Dvalue pairs extracted from the intro URL query.
*=20
* @param site
* @param params
*/
void initialize(IIntroSite site, Properties params);

=20
In your case, you have to write your own action to open a java file =
(search Eclipse code base for samples). Now since you most probably want =
to point to any file (and hence re-use the same action class) subclass =
IIntroAction to be able to get the name of the class to load, and pass =
it as a property to your action class. =20

PLEASE note the following:
1) intro url action can only be used if you are re-using the supplied =
customizable intro part (search this new group for more info on this =
part).=20
2) DISCLAIMER: the intro url actions are still not finalized, so please =
keep in mind that the stuff Im writting here is for >=3DM8 build. Also =
note that IIntroAction class is internal. But we are in the process of =
opening apis a bit.


Attached are the supported actions, and a sample IIntroAction that opens =
up a perspective. The perspective id is retrieved from the url action =
properties passed in like this:
http://org.eclipse.ui.intro/runAction?pluginId=3Dorg.eclipse .ui.intro.exa=
mples&class=3Dorg.eclipse.ui.intro.examples.parts.OpenPe rspectiveAction&p=
erspectiveId=3Dorg.eclipse.jdt.ui.JavaPerspective">



Hope this helps...
Mazen...








"David Hanses" <stealth02r1@NO.SPAM.yahoo.com> wrote in message =
news:c5pcf3$6fu$1@eclipse.org...
> I am attempting to use the Introduction framework for my own primary
> feature plugin. I want to enable the clicking on a Sample Program to =
open
> either a text file or a Java source file and then show the file in the
> Package Explorer. I don't need to install or unzip anything like the
> current sample URL's do. The Any tips on how to do this? I assume I =
should
> be able to use the url=3D"http://org.eclipse.ui.intro/runAction?" =
command
> but I have yet to figure out the proper syntax for dislpaying a simple
> jave file.
>=20
> Thanks!
> David
>
------=_NextPart_001_0016_01C4262B.70CFEAE0
Content-Type: text/html;
charset="ISO-8859-15"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-15">
<META content=3D"MSHTML 6.00.2800.1400" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff background=3D"">
<DIV><FONT face=3DArial><FONT size=3D2>David,<BR>you are correct in that =
you have to=20
use the url=3D"http://org.eclipse.ui.intro/runAction?" intro action, but =
there is=20
no "proper syntax for dislpaying a simple<BR>jave file". <BR>There is a=20
prefabricated list of supported intro actions. The attached file lists =
them all.=20
Look at the syntax for the runAction one and let me know if you need =
help. The=20
idea is that you pass the url the name of the action class to run, and =
the=20
plugin id from which to load it. If your action subclasses the jface =
IAction=20
class, then the run method of your action class will be called. If you =
subclass=20
IIntroAction (look at the =
org.eclipse.ui.internal.intro.impl.model.IIntroAction=20
class), then the following method is called:<BR><BR></FONT><FONT =
size=3D2><FONT=20
face=3D"Courier New">/**<BR>* Called right before the run method of the =
action.=20
The properties<BR>* represents the key=3Dvalue pairs extracted from the =
intro URL=20
query.<BR>* <BR>* @param site<BR>* @param params<BR>*/<BR>void=20
initialize(IIntroSite site, Properties =
params);<BR></FONT><BR>&nbsp;&nbsp;&nbsp;=20
<BR>In your case, you have to&nbsp;write your own action to open a java =
file=20
(search Eclipse code base for samples). Now&nbsp;since you most probably =
want to=20
point to any file (and hence re-use the same&nbsp;action class) subclass =

IIntroAction&nbsp;to be able to get the name of the class to load, and =
pass it=20
as a property to your action&nbsp;class. &nbsp;<BR><BR>PLEASE note the=20
following:<BR>1) intro url action can only be used if you are re-using =
the=20
supplied customizable intro part (search this new group for more info on =
this=20
part). </FONT></FONT></DIV>
<DIV><FONT face=3DArial><FONT size=3D2>2) DISCLAIMER: the intro url =
actions are=20
still not finalized, so please keep in mind that the stuff Im writting =
here is=20
for &gt;=3DM8 build. Also note that IIntroAction class is internal. But =
we are in=20
the process of opening apis a bit.</FONT></FONT></DIV>
<DIV><FONT face=3DArial><FONT size=3D2></FONT></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial><FONT size=3D2></FONT></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Attached are the supported actions, and =
a sample=20
IIntroAction that opens up a perspective. The perspective id is =
retrieved from=20
the url action properties passed in like this:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><FONT size=3D2>
<P> http://org.eclipse.ui.intro/runAction?pluginId=3Dorg.eclipse .ui.intro.=
examples&amp;class=3Dorg.eclipse.ui.intro.examples.parts .OpenPerspectiveA=
ction&amp;perspectiveId=3Dorg.eclipse.jdt.ui.JavaPerspec tive "&gt;</P></FO=
NT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial><FONT size=3D2>Hope this =
helps...</FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Mazen...</FONT></DIV>
<DIV><FONT face=3DArial><FONT size=3D2>&nbsp;</DIV>
<DIV><BR><BR><BR><BR><BR><BR><BR>"David Hanses"=20
&lt;stealth02r1@NO.SPAM.yahoo.com&gt; wrote in message=20
news:c5pcf3$6fu$1@eclipse.org...<BR>&gt; I am attempting to use the =
Introduction=20
framework for my own primary<BR>&gt; feature plugin. I want to enable =
the=20
clicking on a Sample Program to open<BR>&gt; either a text file or a =
Java source=20
file and then show the file in the<BR>&gt; Package Explorer. I don't =
need to=20
install or unzip anything like the<BR>&gt; current sample URL's do. The =
Any tips=20
on how to do this? I assume I should<BR>&gt; be able to use the&nbsp;=20
url=3D"http://org.eclipse.ui.intro/runAction?" command<BR>&gt; but I =
have yet to=20
figure out the proper syntax for dislpaying a simple<BR>&gt; jave =
file.<BR>&gt;=20
<BR>&gt; Thanks!<BR>&gt; David<BR>&gt; =
</FONT></FONT></DIV></BODY></HTML>

------=_NextPart_001_0016_01C4262B.70CFEAE0--

------=_NextPart_000_0015_01C4262B.70CFEAE0
Content-Type: text/html;
name="IntroActions.html"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="IntroActions.html"

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; =
charset=3Diso-8859-1">
<meta name=3D"GENERATOR" content=3D"Mozilla/4.75 [en] (Windows NT =
5.0; U) [Netscape]">
<title>Untitled Document</title>
</head>
<body>
&nbsp;
<table CELLSPACING=3D0 CELLPADDING=3D0 WIDTH=3D"100%" >
<tr>
<td WIDTH=3D"53%"><b><font size=3D+1>Eclipse platform supported Intro =
actions</font></b></td>

<td WIDTH=3D"47%">
<div align=3Dright><img SRC=3D"welcome_banner.gif" height=3D20 =
width=3D140></div>
</td>
</tr>
</table>

<hr align=3D"left" size=3D"1" color=3D"#666666">
<blockquote><font size=3D-1>This page lists all the supported Intro =
Actions.</font></blockquote>

<table BORDER=3D0 WIDTH=3D"88%" >
<tr>
<td VALIGN=3DTOP WIDTH=3D"7%">
<div align=3Dright><img SRC=3D"welcome_item.gif" height=3D16 =
width=3D16></div>
</td>

<td WIDTH=3D"93%"><b>setStandbyMode</b>
<br><font size=3D-1><a =
href=3D"http://org.eclipse.ui.intro/setStandbyMode?standby=3Dtrue">http:/=
/org.eclipse.ui.intro/setStandbyMode?standby=3Dtrue</a></font ></td>
</tr>

<tr>
<td></td>

<td>&nbsp;</td>
</tr>

<tr>
<td ALIGN=3DRIGHT VALIGN=3DTOP><img SRC=3D"welcome_item.gif" height=3D16 =
width=3D16></td>

<td><b>close</b>
<br><font size=3D-1><a =
href=3D"http://org.eclipse.ui.intro/close">http://org.eclipse.ui.intro/cl=
ose</a></font></td>
</tr>

<tr>
<td></td>

<td>&nbsp;</td>
</tr>

<tr>
<td ALIGN=3DRIGHT VALIGN=3DTOP><img SRC=3D"welcome_item.gif" height=3D16 =
width=3D16></td>

<td><b>showHelp</b>
<br><font size=3D-1><a =
href=3D"http://org.eclipse.ui.intro/showHelp">http://org.eclipse.ui.intro=
/showHelp</a></font></td>
</tr>

<tr>
<td></td>

<td>&nbsp;</td>
</tr>

<tr>
<td ALIGN=3DRIGHT VALIGN=3DTOP><img SRC=3D"welcome_item.gif" height=3D16 =
width=3D16></td>

<td><b>showHelpTopic</b>
<br><font size=3D-1><a =
href=3D" http://org.eclipse.ui.intro/showHelpTopic?id=3D/org.eclipse. platf=
orm.doc.isv/porting/eclipse_3_0_porting_guide.html">http://org.eclipse.ui=
..intro/showHelpTopic?id=3D/org.eclipse.platform.doc.isv/por ting/eclipse_3=
_0_porting_guide.html</a></font></td>
</tr>

<tr>
<td></td>

<td>&nbsp;</td>
</tr>

<tr>
<td ALIGN=3DRIGHT VALIGN=3DTOP><img SRC=3D"welcome_item.gif" height=3D16 =
width=3D16></td>

<td><b>openBrowser</b>
<br><font size=3D-1><a =
href=3D" http://org.eclipse.ui.intro/openBrowser?url=3Dhttp://eclipse .org"=
> http://org.eclipse.ui.intro/openBrowser?url=3Dhttp://eclipse .org</a></fo=
nt>
<br><font size=3D-1><a =
href=3D" http://org.eclipse.ui.intro/openBrowser?url=3Dfile://D:/Back up/Te=
st =
HTMLs/flash_demo.htm">http://org.eclipse.ui.intro/openBrowser?url=3Dfile:=
//D:/Backup/TestHTMLs/flash_demo.htm</a></font>
<br><font size=3D-1><a =
href=3D" http://org.eclipse.ui.intro/openBrowser?url=3Dhtml/demo/welc omeEd=
itor.html&pluginId=3Dorg.eclipse.ui.intro.examples">http://org.eclipse.ui=
..intro/openBrowser?url=3Dhtml/demo/welcomeEditor.html&a mp;pluginId=3Dorg.=
eclipse.ui.intro.examples</a></font></td>
</tr>

<tr>
<td ALIGN=3DRIGHT VALIGN=3DTOP>&nbsp;</td>

<td>&nbsp;</td>
</tr>

<tr>
<td ALIGN=3DRIGHT VALIGN=3DTOP><img SRC=3D"welcome_item.gif" height=3D16 =
width=3D16></td>

<td><b>runAction</b>
<br><font size=3D-1><a =
href=3D" http://org.eclipse.ui.intro/runAction?pluginId=3Dorg.eclipse .ui.i=
de&class=3Dorg.eclipse.ui.actions.QuickStartAction&s tandby=3Dfalse ">http:=
//org.eclipse.ui.intro/runAction?pluginId=3Dorg.eclipse.ui.i de&amp;class=3D=
org.eclipse.ui.actions.QuickStartAction&amp;standby=3Dfa lse </a></font></t=
d>
</tr>

<tr>
<td ALIGN=3DRIGHT VALIGN=3DTOP>&nbsp;</td>

<td>&nbsp;</td>
</tr>

<tr>
<td ALIGN=3DRIGHT VALIGN=3DTOP><img SRC=3D"welcome_item.gif" height=3D16 =
width=3D16></td>

<td><b>Learn more&nbsp;</b>
<br><font size=3D-1>To learn more.....</font></td>
</tr>
</table>

</body>
</html>

------=_NextPart_000_0015_01C4262B.70CFEAE0
Content-Type: application/octet-stream;
name="OpenPerspectiveAction.java"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="OpenPerspectiveAction.java"

/*********************************************************** *************=
*******
* Copyright (c) 2000, 2003 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials=20
* are made available under the terms of the Common Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v10.html
*=20
* Contributors:
* IBM Corporation - initial API and implementation
=
************************************************************ *************=
******/

package org.eclipse.ui.intro.examples.parts;

import java.util.*;

import org.eclipse.jface.action.*;
import org.eclipse.ui.*;
import org.eclipse.ui.internal.intro.impl.model.*;
import org.eclipse.ui.intro.*;

/**
* A default Intro Action that opens a perspective given an id.
*/
public class OpenPerspectiveAction extends Action implements =
IIntroAction {

Properties params =3D null;

public void initialize(IIntroSite site, Properties params) {
this.params =3D params;
}

public void run() {
try {
// get the id of the perspective to open.
String id =3D params.getProperty("perspectiveId", "");
if (id.equals(""))
// quick exit
return;

PlatformUI.getWorkbench().openWorkbenchWindow(id, null);
} catch (Exception ex) {
// REVISIT:
System.out.println("Could not run intro action.");
System.out.println(ex);
}
}

}

------=_NextPart_000_0015_01C4262B.70CFEAE0--
Re: org.eclipse.ui.intro runAction [message #232385 is a reply to message #231314] Wed, 21 April 2004 12:43 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: stealth02r1.NO.SPAM.yahoo.com

Thanks for the reply Mazen. One other question, is there a way to reuse
the intro framework while retaining access to the Eclipse Intro? I would
like to be able to have Help > Introduction launch the Eclipse Intro and
add a new option Help > MyPlugin Introduction launch my own intro. Is
there an easy way to accomplish this?

David

Mazen Faraj wrote:

> David,
> you are correct in that you have to use the
url="http://org.eclipse.ui.intro/runAction?" intro action, but there is no
"proper syntax for dislpaying a simple
> jave file".
> There is a prefabricated list of supported intro actions. The attached file
lists them all. Look at the syntax for the runAction one and let me know if
you need help. The idea is that you pass the url the name of the action class
to run, and the plugin id from which to load it. If your action subclasses the
jface IAction class, then the run method of your action class will be called.
If you subclass IIntroAction (look at the
org.eclipse.ui.internal.intro.impl.model.IIntroAction class), then the
following method is called:

> /**
> * Called right before the run method of the action. The properties
> * represents the key=value pairs extracted from the intro URL query.
> *
> * @param site
> * @param params
> */
> void initialize(IIntroSite site, Properties params);


> In your case, you have to write your own action to open a java file (search
Eclipse code base for samples). Now since you most probably want to point to
any file (and hence re-use the same action class) subclass IIntroAction to be
able to get the name of the class to load, and pass it as a property to your
action class.

> PLEASE note the following:
> 1) intro url action can only be used if you are re-using the supplied
customizable intro part (search this new group for more info on this part).
> 2) DISCLAIMER: the intro url actions are still not finalized, so please keep
in mind that the stuff Im writting here is for >=M8 build. Also note that
IIntroAction class is internal. But we are in the process of opening apis a
bit.


> Attached are the supported actions, and a sample IIntroAction that opens up
a perspective. The perspective id is retrieved from the url action properties
passed in like this:
>
http://org.eclipse.ui.intro/runAction?pluginId=org.eclipse.u i.intro.examples&class=org.eclipse.ui.intro.examples.par ts.OpenPerspectiveAction&perspectiveId=org.eclipse.jdt.u i.JavaPerspective">



> Hope this helps...
> Mazen...








> "David Hanses" <stealth02r1@NO.SPAM.yahoo.com> wrote in message
news:c5pcf3$6fu$1@eclipse.org...
> > I am attempting to use the Introduction framework for my own primary
> > feature plugin. I want to enable the clicking on a Sample Program to open
> > either a text file or a Java source file and then show the file in the
> > Package Explorer. I don't need to install or unzip anything like the
> > current sample URL's do. The Any tips on how to do this? I assume I should
> > be able to use the url="http://org.eclipse.ui.intro/runAction?" command
> > but I have yet to figure out the proper syntax for dislpaying a simple
> > jave file.
> >
> > Thanks!
> > David
> >
Re: org.eclipse.ui.intro runAction [message #232416 is a reply to message #232385] Wed, 21 April 2004 13:26 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: stealth02r1.NO.SPAM.yahoo.com

Just to clarify...As I have it now, Help > Introduction does call my
plugin's Intro. I want to also be able to access the default Eclipse
platform intro.

Thanks!

David Hanses wrote:

> Thanks for the reply Mazen. One other question, is there a way to reuse
> the intro framework while retaining access to the Eclipse Intro? I would
> like to be able to have Help > Introduction launch the Eclipse Intro and
> add a new option Help > MyPlugin Introduction launch my own intro. Is
> there an easy way to accomplish this?

> David

> Mazen Faraj wrote:

> > David,
> > you are correct in that you have to use the
> url="http://org.eclipse.ui.intro/runAction?" intro action, but there is no
> "proper syntax for dislpaying a simple
> > jave file".
> > There is a prefabricated list of supported intro actions. The attached file
> lists them all. Look at the syntax for the runAction one and let me know if
> you need help. The idea is that you pass the url the name of the action class
> to run, and the plugin id from which to load it. If your action subclasses
the
> jface IAction class, then the run method of your action class will be called.
> If you subclass IIntroAction (look at the
> org.eclipse.ui.internal.intro.impl.model.IIntroAction class), then the
> following method is called:

> > /**
> > * Called right before the run method of the action. The properties
> > * represents the key=value pairs extracted from the intro URL query.
> > *
> > * @param site
> > * @param params
> > */
> > void initialize(IIntroSite site, Properties params);


> > In your case, you have to write your own action to open a java file (search
> Eclipse code base for samples). Now since you most probably want to point to
> any file (and hence re-use the same action class) subclass IIntroAction to be
> able to get the name of the class to load, and pass it as a property to your
> action class.

> > PLEASE note the following:
> > 1) intro url action can only be used if you are re-using the supplied
> customizable intro part (search this new group for more info on this part).
> > 2) DISCLAIMER: the intro url actions are still not finalized, so please
keep
> in mind that the stuff Im writting here is for >=M8 build. Also note that
> IIntroAction class is internal. But we are in the process of opening apis a
> bit.


> > Attached are the supported actions, and a sample IIntroAction that opens up
> a perspective. The perspective id is retrieved from the url action properties
> passed in like this:
> >
>
http://org.eclipse.ui.intro/runAction?pluginId=org.eclipse.u i.intro.examples&class=org.eclipse.ui.intro.examples.par ts.OpenPerspectiveAction&perspectiveId=org.eclipse.jdt.u i.JavaPerspective">



> > Hope this helps...
> > Mazen...








> > "David Hanses" <stealth02r1@NO.SPAM.yahoo.com> wrote in message
> news:c5pcf3$6fu$1@eclipse.org...
> > > I am attempting to use the Introduction framework for my own primary
> > > feature plugin. I want to enable the clicking on a Sample Program to open
> > > either a text file or a Java source file and then show the file in the
> > > Package Explorer. I don't need to install or unzip anything like the
> > > current sample URL's do. The Any tips on how to do this? I assume I
should
> > > be able to use the url="http://org.eclipse.ui.intro/runAction?" command
> > > but I have yet to figure out the proper syntax for dislpaying a simple
> > > jave file.
> > >
> > > Thanks!
> > > David
> > >
Re: org.eclipse.ui.intro runAction [message #232423 is a reply to message #232385] Wed, 21 April 2004 13:43 Go to previous message
Eclipse UserFriend
Originally posted by: xxx.ca.ibm.com

Absolutely..
(but yes and no :) )

The yes is for "...One other question, is there a way to reuse the intro
framework while retaining access to the Eclipse Intro? I would like to be
able to have Help Introduction launch the Eclipse Intro..."

The no if for "....and add a new option Help > MyPlugin Introduction launch
my own intro".

I said "absolutely" because one of the main ideas behind introducing markup
to contribute intro content was to allow third party plugin contribution
intro existing content. ie" extensible/pluggable design. Products build on
top of products, or re-use compoenents of products. And so there was a
design rquirement to allow for re-use / extension of existing intros.

You can contribute to the existing Eclipse Intro in two ways.
1) You can contribute your own "extensions" to the intro. Loot at the
org.eclipse.jdt and org.eclipse.pde plugins. They both contribute Java and
PDE intro content to the existing base platform intro content. Look at the
markup in the *.xml intro files in those plugins for markup examples. The
idea is that there is an extension point
(org.eclipse.ui.intro.configExtension) to contribute your own intro content
to an existing intro config. In your case, you contribute to the Eclipse
platform intro configuration. Eg from JDT plugin:

<extension
point="org.eclipse.ui.intro.configExtension">
<configExtension
configId="org.eclipse.platform.introConfig"
content="overviewExtensionContent.xml"/>
<...>
</extension>
The above contribution takes all the intro content from
overviewExtensionContent.xml and merges it into an intro config with id=
org.eclipse.platform.introConfig, which happens to be the Eclipse platform
intro configuration.

2) you can "include" someone elses intro content in yours. You define the
main intro and re-use someone elses content, (no examples in platform yet).

I responded with no above because I dont believe you would want your own
intro to show up AND have someone els's intro show up too. The current
design of intro is that there is a one to one mapping between a product and
an intro. Even though there could be more than one product defined in an
given pltform installl, only one product is really picked on Eclipse
startup. So you should decide what your "product" is and then choose one of
the options above. If your product is the Eclipse SDK itself, just
contribute like the JDT or PDE plugins. If you have your own product, you
would have to use option two above.

Hope this helps...
Mazen...




"David Hanses" <stealth02r1@NO.SPAM.yahoo.com> wrote in message
news:c668bs$8vd$1@eclipse.org...
> Thanks for the reply Mazen. One other question, is there a way to reuse
> the intro framework while retaining access to the Eclipse Intro? I would
> like to be able to have Help > Introduction launch the Eclipse Intro and
> add a new option Help > MyPlugin Introduction launch my own intro. Is
> there an easy way to accomplish this?
>
> David
>
> Mazen Faraj wrote:
>
> > David,
> > you are correct in that you have to use the
> url="http://org.eclipse.ui.intro/runAction?" intro action, but there is no
> "proper syntax for dislpaying a simple
> > jave file".
> > There is a prefabricated list of supported intro actions. The attached
file
> lists them all. Look at the syntax for the runAction one and let me know
if
> you need help. The idea is that you pass the url the name of the action
class
> to run, and the plugin id from which to load it. If your action subclasses
the
> jface IAction class, then the run method of your action class will be
called.
> If you subclass IIntroAction (look at the
> org.eclipse.ui.internal.intro.impl.model.IIntroAction class), then the
> following method is called:
>
> > /**
> > * Called right before the run method of the action. The properties
> > * represents the key=value pairs extracted from the intro URL query.
> > *
> > * @param site
> > * @param params
> > */
> > void initialize(IIntroSite site, Properties params);
>
>
> > In your case, you have to write your own action to open a java file
(search
> Eclipse code base for samples). Now since you most probably want to point
to
> any file (and hence re-use the same action class) subclass IIntroAction to
be
> able to get the name of the class to load, and pass it as a property to
your
> action class.
>
> > PLEASE note the following:
> > 1) intro url action can only be used if you are re-using the supplied
> customizable intro part (search this new group for more info on this
part).
> > 2) DISCLAIMER: the intro url actions are still not finalized, so please
keep
> in mind that the stuff Im writting here is for >=M8 build. Also note that
> IIntroAction class is internal. But we are in the process of opening apis
a
> bit.
>
>
> > Attached are the supported actions, and a sample IIntroAction that opens
up
> a perspective. The perspective id is retrieved from the url action
properties
> passed in like this:
> >
>
http://org.eclipse.ui.intro/runAction?pluginId=org.eclipse.u i.intro.examples&class=org.eclipse.ui.intro.examples.par ts.OpenPerspectiveAction&perspectiveId=org.eclipse.jdt.u i.JavaPerspective">
>
>
>
> > Hope this helps...
> > Mazen...
>
>
>
>
>
>
>
>
> > "David Hanses" <stealth02r1@NO.SPAM.yahoo.com> wrote in message
> news:c5pcf3$6fu$1@eclipse.org...
> > > I am attempting to use the Introduction framework for my own primary
> > > feature plugin. I want to enable the clicking on a Sample Program to
open
> > > either a text file or a Java source file and then show the file in the
> > > Package Explorer. I don't need to install or unzip anything like the
> > > current sample URL's do. The Any tips on how to do this? I assume I
should
> > > be able to use the url="http://org.eclipse.ui.intro/runAction?"
command
> > > but I have yet to figure out the proper syntax for dislpaying a simple
> > > jave file.
> > >
> > > Thanks!
> > > David
> > >
>
>
Previous Topic:How to show message in Console View??
Next Topic:[ANN] Javadoc builder plugin
Goto Forum:
  


Current Time: Fri Oct 31 04:14:25 EDT 2025

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

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

Back to the top