Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Parameterized view or editor
Parameterized view or editor [message #459730] Wed, 06 December 2006 22:07
Eclipse UserFriend
Is it possible to create a parameterized view or editor? I want to define a view that extends ViewPart that has a setter method on it that takes in a factory like so:

public class MyView extends ViewPart
{

public void setPartFactory(PartFactory factory)
{
this.factory = factory;
}

private void doSomething()
{
Parts parts = factory.createParts();
...

}


The idea is that I want to use the default version of the PartFactory internally (if not provided by the extension), but if the extension wants, it can provide an alternate PartFactory.

I have been using spring, and in spring it is really very simple to define multiple beans (in our case that implement PartFactory) and plug them into generic parameterized classes to get different behavior.

Whats the easiest way the same "pluggable bean mechanism" that Spring uses going in the Eclipse platform?

Thanks,
Nik
Previous Topic:A Simple Question
Next Topic:How can I both update a control and do other works ?
Goto Forum:
  


Current Time: Fri Mar 28 06:23:27 EDT 2025

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

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

Back to the top