[RomaFramework-dev] R: R: Plugin-based development in ROMA?
Brought to you by:
lvca
|
From: Luca G. <luc...@as...> - 2006-09-22 13:19:28
|
Hi Ted!
I'm very glad to hear news from you. The View Aspect is the more complex
aspect between all others.
I'm excited to see the very first version of your Eclipse RCP Aspect!
Ciao, Luca
-----Messaggio originale-----
Da: rom...@li...
[mailto:rom...@li...] Per =
conto
di ted stockwell
Inviato: venerd=EC 22 settembre 2006 13.30
A: rom...@li...
Oggetto: Re: [RomaFramework-dev] R: Plugin-based development in ROMA?
ted stockwell wrote:
> I will try to implement my proposed extension to the menu example=20
> myself. That will be a good way for me to learn more about ROMA.
> =20
Hi All,
I have completed a simple extension to the ROMA menu demo that =
dynamically
extends a menu by adding actions to the menu class at run time.
This demonstrates that ROMA can indeed be extended by plugins.
It turned out that what I wanted to do is in fact amazingly easy. I =
just
created a new 'aspect' that added the new action to the menu.
The entire code for dynamically adding a menu item at runtime is shown
below.
The code adds a "help" menu item to the main menu of the menu demo.
I'm very impressed by ROMA.=20
For my next prototype I will attempt to create an Eclipse RCP view =
aspect
that is capable of running the BLOG demo.
Best Regards,
Ted Stockwell
---------------------------------------------------------
public class HelpUIAspect extends =
SelfRegistrantConfigurableAspect<String> {
public static final String ASPECT_NAME =3D "helpui";
public String aspectName() {
return ASPECT_NAME;
}
@Override
public void configClass(SchemaClassDefinition iClass, Annotation
iAnnotation, XmlConfigClassType iNode) {
try {
=20
if (iClass.getSchemaClass().getName().contains("MainMenu")) =
{
SchemaAction helpAction=3D new SchemaAction(iClass);
Method helpMethod=3D this.getClass().getMethod("help", =
null);
helpAction.configure(helpMethod);
iClass.setAction("this-name-is-ignored", helpAction); =
=20
} =20
=20
} catch (Exception e) {
e.printStackTrace();
}
}
=20
public void help() {
=20
}
}
-------------------------------------------------------------------------=
Take Surveys. Earn Cash. Influence the Future of IT Join =
SourceForge.net's
Techsay panel and you'll get the chance to share your opinions on IT &
business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D=
DEVDEV
_______________________________________________
RomaFramework-development mailing list
Rom...@li...
https://lists.sourceforge.net/lists/listinfo/romaframework-development
|