Bug 20757 - PDE should expose library type = code/resource
Summary: PDE should expose library type = code/resource
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Wassim Melhem CLA
QA Contact:
URL:
Whiteboard:
Keywords: readme
Depends on:
Blocks:
 
Reported: 2002-06-20 16:03 EDT by Debbie Wilson CLA
Modified: 2003-01-06 18:31 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Debbie Wilson CLA 2002-06-20 16:03:53 EDT
In a plugin.xml file we can have the following syntax for the runtime section:

<!ELEMENT runtime (library+)> 
<!ELEMENT library (export*)>
<!ATTLIST library 
  name               CDATA #REQUIRED 
  type               (code | resource) "code"
>
<!ELEMENT export EMPTY> 
<!ATTLIST export
  name               CDATA #REQUIRED 
>

The attribute 'type' is not exposed in the PDE.  It should be exposed and 
relevant documentation added to the PDE Guide:

type – specifies whether this library contains executable code (‘code’) or just 
resources.  If the library is of type ‘code’ accessing anything in this library 
will cause activation of the plug-in.  Accessing a ‘resource’ will not cause 
plug-in activation (a potential for significant performance improvement). It 
should be noted that specifying a library of type 'code' allows it to contain 
both code and resources.  But specifying a library of type 'resource' assumes 
the library will only be used for resources.
Comment 1 Dejan Glozic CLA 2002-06-20 17:11:06 EDT
Last time when I checked with the core team, I was told that the importance of 
the type attribute has diminished and that it is rarely used. Same 
for 'optional' import element. By checking the manifest parser code, I found 
couple more 'hidden' attribute that we do not use and was told by the core team 
that they will not be documented and recommended for use.
Comment 2 Jim des Rivieres CLA 2002-06-20 17:25:27 EDT
The library "type" attribute has one important use: libraries that hold 
translated NL strings. These should always be marked "resource" so that they 
do not slow down the speed of loading code from plug-ins.

As for unspecified attributes, these should be rooted out and either removed 
or spec'd. Please bring anything like this to our attention.
Comment 3 Dejan Glozic CLA 2002-06-21 12:58:02 EDT
Do we have any plug-ins or fragments with 'type' attribute used? I checked PDE 
model and it has the slot for 'type', is capable of saving it back into XML but 
interestingly does not load it from XML :-). 

Is this a stop-ship?
Comment 4 Jim des Rivieres CLA 2002-06-21 13:21:10 EDT
The Eclipse project does not have any plug-ins or fragments that use
the "type" attribute. It is the IBM group doing the translations that 
will (or rather, should) end up with some. Both problems at the core 
and UI needed to be fixed. 

Workaround: edit plugin.xml/fragment.xml in the source pane of the PDE
editor (or use a different editor entirely) if you need to edit a manifest
that uses the 'type' attribute of the <library> element.

Not a stop-ship for 2.0; but deserves a readme.
Comment 5 Wassim Melhem CLA 2003-01-06 18:31:22 EST
Fixed.