Community
Participate
Working Groups
I've marked as "blocking" since this prevents implementing document setup participants based on contentType and I don't know of a good work around. [Note: I believe the "ant based document setup" works simply because it also uses extensions.] I've tried to create a simple setup participant as follows (note: no extensions used deliberately): <extension point="org.eclipse.core.filebuffers.documentSetup" id="com.ibm.sse.model.xml.XMLDocumentSetup.xml.xmlsource" name="Structured XML Document Setup"> <participant contentTypeId="com.ibm.sse.model.xml.xmlsource" class="com.ibm.sse.model.xml.internal.filebuffers. SetupParticipantForXML"> </participant> </extension> I've encountered several bugs in doing so, but the first one was that it seemed not to be getting detected/registered correctly. If I understand this code right, there seems to be a copy/paste error in getDocumentSetupParticipants(contentType), as fixed by following simply patch Index: ExtensionsRegistry.java =================================================================== RCS file: /home/eclipse/org.eclipse.core. filebuffers/src/org/eclipse/core/internal/filebuffers/ExtensionsRegistry.java,v retrieving revision 1.8 diff -u -r1.8 ExtensionsRegistry.java --- ExtensionsRegistry.java 6 May 2004 17:52:58 -0000 1.8 +++ ExtensionsRegistry.java 29 May 2004 21:56:16 -0000 @@ -334,7 +334,7 @@ Set resultSet= new HashSet(); int i= 0; while (i < contentTypes.length) { - Set set= (Set) fFactoryDescriptors.get(new ContentTypeAdapter(contentTypes[i++])); + Set set= (Set) fSetupParticipantDescriptors.get(new ContentTypeAdapter(contentTypes[i++])); if (set != null) resultSet.addAll(set); }
Just corrected abstract to say 'extensions' instead of 'classes'
Created attachment 11308 [details] patch wihout end-of-line mis-wrapping Just realized the intended "patch" above (in text) is probably not usabile since web interface wraps text and changes "new lines", so appending as attachment.
Confirmed access to invalid descriptor set. Fixed in build I200406040800.
verified by code inspection in I20040611