Summary: | [api] enable document setup participants to customize behaviour based on resource being opened | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] Platform | Reporter: | Andrew Ferguson <andrew.ferguson> | ||||||||
Component: | Text | Assignee: | Platform-Text-Inbox <platform-text-inbox> | ||||||||
Status: | RESOLVED FIXED | QA Contact: | |||||||||
Severity: | enhancement | ||||||||||
Priority: | P2 | CC: | aleherb+eclipse, daniel_megert, marc.tolentino, thatnitind | ||||||||
Version: | 3.4 | Keywords: | contributed, helpwanted | ||||||||
Target Milestone: | 3.4 M5 | ||||||||||
Hardware: | PC | ||||||||||
OS: | Windows XP | ||||||||||
Whiteboard: | |||||||||||
Bug Depends on: | |||||||||||
Bug Blocks: | 178386 | ||||||||||
Attachments: |
|
Description
Andrew Ferguson
2007-11-06 08:40:38 EST
Fair request but no time to work on this. Good quality patch would be accepted. Keep in mind that file buffers and its documents can be created in non-UI threads. Created attachment 84301 [details]
proposed patch
thanks!
The attached patch adds support for an extension interface
org.eclipse.core.filebuffers.IDocumentSetupParticipantExtension
which document-setup-participants can additionally implement to receive the additional information (or null should it be unavailable). The patch also includes unit tests, and I've been using succesfully it as part of development work on 178386.
Will take a look during M5. just to check if this will make M5? I'm just about ready to go on the CDT side so would like a chance to respond in case the patch above needs re-work. Will look at it this week. Hi Andrew, thanks for the patch. General direction looks good (especially having tests with it). A few comments: - don't introduce DocumentSetupParticipantHint, use setup(IDocument document,IPath location, LocationKind locationKind) - describe more explicit that implementors of the extension will not be called on the original setup callback. - update IDocumentSetupParticipant with a link to the new extension, (see IDocument and IDocumentExtension for the pattern how we document an extension) - never make tests your friend ;-) - make sure copyright date to 2008 Looking forward to new version of the patch. Created attachment 87647 [details]
reworked patch
thanks for the review - I've made these changes in the above patch :)
Created attachment 87659 [details]
catches up with HEAD
Comment on attachment 87659 [details]
catches up with HEAD
sorry - attached to the incorrect bugzilla
Committed the patch to HEAD with some minor modifications: - changed API to not allow 'null' as argument - formatting Thanks again Andrew! Available in builds > N20080125-0010. thanks very much :) |