Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[pde-dev] Obtaining extensions information for target image

Hi Wassim.  A while back, you asked somebody on pde-dev:

On 2007.01.17 01:33:00 -0500, Wassim Melhem wrote:
> What are you doing with these models anyway?
> 
> I am currently working on exposing API to help access plug-in models.

I'm trying to walk the PDE plug-in models to perform some checks
for the target image, some of which include examining the contents
of any declared extensions.  Unfortunately the PDE models rarely
have the content of any extensions.  My code is roughly:

    IPluginModelBase pluginModels[] =
	PDECore.getDefault().getModelManager().getActiveModels();
    for (IPluginModelBase pluginModel : pluginModels) {
	IExtensions pluginExtensions = pluginModel.getExtensions();
	for(IPluginExtension ext : pluginExtensions.getExtensions()) {
	    for(IPluginObject child : ext.getChildren()) {
		// do something
	    }
	}
    }

But there are the `ext.getChildren()' returns an empty array except
for extensions to one of four special extension points.  I've tried
creating my own PDEState, as well as explicit instances of
WorkspacePluginModel, to no avail.

How should I be doing this?  Should I be creating my own instance
of WorkspacePluginModel?  PluginModel?

Thanks for your help.

(I'm not the only one stumbling into this:
    http://dev.eclipse.org/newslists/news.eclipse.platform.rcp/msg15818.html
    http://eclipsezone.com/forums/thread.jspa?messageID=91985188
    http://dev.eclipse.org/newslists/news.eclipse.tools.jdt/msg20275.html
    http://www.eclipsezone.com/eclipse/forums/m92138744.html
)

Brian.

-- 
  Brian de Alwis | Software Practices Lab | UBC | http://www.cs.ubc.ca/~bsd/
      "Amusement to an observing mind is study." - Benjamin Disraeli


Back to the top