Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [pde-ui-dev] Extracting information from plugin.xml


Hi Dejan,

I tried a couple of appraches using some functionality (internal) in PDE core:

Approach 1:
===========
I got all the models (plugin.xmls in the workspace) and then got a pointer (IPluginExtension) to the particular extension that I am interested in. However, I cannot find any functionality to get information from inside the <extension ... </extension> tag.

Approach 2
===========
I got the  WorkspacePluginModel corresponding to the plugin.xml. There is a function - getContents() on WorkspacePluginModel that I thought I would return me the full plugin.xml in String format from which I could extract info that I needed using String manipulation functions. But getContents() returned "".

Could you give me any pointers as to how to go about from this point to get  information about the class.

Thanks
Rajeev


Dejan Glozic <dejan@xxxxxxxxxx>
Sent by: pde-ui-dev-admin@xxxxxxxxxxx

03/02/2004 04:25 PM
Please respond to pde-ui-dev

       
        To:        pde-ui-dev@xxxxxxxxxxx
        cc:        
        Subject:        Re: [pde-ui-dev] Extracting information from plugin.xml







Rajeev,

PDE does have a model of the world in the workspace, but it is not public
(note that 'internal API' do not exist in Eclipse - things are either API
or internal :-).

Regards,

Dejan Glozic, Ph.D.
Manager, Eclipse Development 1A
D2/R0Q/8200/MKM
IBM Canada Ltd.
Tel. 905 413-2745  T/L 969-2745
Fax. 905 413-4854



                                                                         
            Rajeev Sikka                                                  
            <sikkar@xxxxxxxxx                                            
            m>                                                         To
            Sent by:                  pde-ui-dev@xxxxxxxxxxx              
            pde-ui-dev-admin@                                          cc
            eclipse.org                                                  
                                                                  Subject
                                      [pde-ui-dev] Extracting information
            03/02/2004 02:50          from plugin.xml                    
            PM                                                            
                                                                         
                                                                         
            Please respond to                                            
               pde-ui-dev                                                
                                                                         
                                                                         





Hi,

I have a requirement where I need to extract information from thr
plugin.xml corresponding to a plugin project thats still being developed
i.e. a plugin thats in the workspace and has NOT been deployed yet.

The situation is similar to the Hello World plugin. When you create the
HelloWorld plugin the user provides the name and location of the action
class. Here is a snippet of the plugin.xml:

<action
  label="&amp;Sample Action"
  icon="icons/sample.gif"
  class="hello.actions.SampleAction"
  tooltip="Hello, Eclipse world"
  menubarPath="sampleMenu/sampleGroup"
  toolbarPath="sampleGroup"
  id="hello.actions.SampleAction">
</action>

I want to extract the string corresponding to the class tag i.e.
"hello.actions.SampleAction" in this case.

Are there any public (or internal) APIs in the PDE that can be used to do
this (or is there any alternate way to do this) ?

Thanks,
Rajeev

_______________________________________________
pde-ui-dev mailing list
pde-ui-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/pde-ui-dev


Back to the top