Skip to main content

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


The problem you are referring to with the extension points is a known bug (169907).  What PDE is doing is caching only certain extension points.

To get this to work, check out the function org.eclipse.pde.internal.core.plugin.PluginHandler.isInterestingExtension(Element extension).  This is the code that is parsing the XML which determines if PDE should parse an elements children and cache the extension point.

Brian Bauman
    IBM Software Group - Austin, TX
    Eclipse Committer
    baumanbr@xxxxxxxxxx
    (512) 838 -2938 (T/L 678-2938)



Brian de Alwis <bsd@xxxxxxxxx>
Sent by: pde-dev-bounces@xxxxxxxxxxx

05/07/2007 01:24 AM

Please respond to
"Eclipse PDE general developers list." <pde-dev@xxxxxxxxxxx>

To
Wassim Melhem <wassimm@xxxxxxxxxx>
cc
"Eclipse PDE general developers list." <pde-dev@xxxxxxxxxxx>
Subject
[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
_______________________________________________
pde-dev mailing list
pde-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/pde-dev


Back to the top