Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 234212

Summary: [wikitext] Mylyn should have an extension point for contributing viewers and editors for lightweight markup (eg: Textile)
Product: z_Archived Reporter: David Green <greensopinion>
Component: MylynAssignee: David Green <greensopinion>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: jingweno, jtk499, steffen.pingel
Version: unspecified   
Target Milestone: 3.0   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 234210    
Attachments:
Description Flags
patch from bug 234210 none

Description David Green CLA 2008-05-27 14:14:09 EDT
Mylyn should provide two extension points for contributing lightweight markup viewers and editors.  The extension points might look something like this:

<!-- a way of declaring an editor kit -->
<issueEditorKit name="Textile" id="org.example.textileKit">
	<viewer class="org.example.textile.TextileViewer"  <--  a class that can display lightweight markup, possibly an ISourceViewer although could be something more generic in order to support browser control, etc
	
	<editor
			class="org.example.textile.editor.TextileSourceViewer" <-- a class that implements ISourceViewer
			configuration="org.example.textile.editor.TextileSourceViewerConfiguration" <-- a SourceViewerConfiguration
			contextId="org.eclipse.textile.editor" <-- a context id that is activated with the IContextService when the editor is active
</issueEditorKit>

<!-- a way of making an editor kit the default for a specific repository -->
<repositoryEditorConfiguration
	repositoryId="org.eclipse.mylyn.bugzilla.repository"
	issueEditorKitId="org.example.textileKit"/>
Comment 1 Steffen Pingel CLA 2008-06-06 02:23:58 EDT
Created attachment 103890 [details]
patch from bug 234210
Comment 2 Steffen Pingel CLA 2008-06-06 02:28:34 EDT
David, I have taken your patch from bug 234210 and moved the extension point to the sandbox. I have only made minor modifications:

- renamed repositoryKind to connectorKind
- renamed TaskEditorExtension to AbstractTaskEditorExtension

Can you take a quick look at the patch? If it you are okay with the changes I'll apply the patch and Owen can start working on the editor integration. 
Comment 3 David Green CLA 2008-06-06 09:15:08 EDT
(In reply to comment #2)
> David, I have taken your patch from bug 234210 and moved the extension point to
> the sandbox. I have only made minor modifications:

The patch looks great!

> 
> - renamed repositoryKind to connectorKind
> - renamed TaskEditorExtension to AbstractTaskEditorExtension
> 
> Can you take a quick look at the patch? If it you are okay with the changes
> I'll apply the patch and Owen can start working on the editor integration. 
> 

Sounds good.

Will it be possible to have the sandbox replace the AttributeEditorFactory of a repository's editor?  The AttributeEditorFactory appears to be the best integration point right now, except for setting the context id.


Comment 4 David Green CLA 2008-06-07 00:15:27 EDT
Steffen: anything left for me to do here?
Comment 5 Steffen Pingel CLA 2008-06-07 01:14:25 EDT
> Will it be possible to have the sandbox replace the AttributeEditorFactory of a
> repository's editor?  The AttributeEditorFactory appears to be the best
> integration point right now, except for setting the context id.

Yes, that could be a good way for embedding a wikitext editor. AttributeEditorFactory is currently intended to be extended by connectors only but we can consider making that more extensible and provide a mechanism to contirubte alternative editors for certain attribute types.

Marking resolved and reassigning to you David. We use bug assignment to recognize who has done the work. Resolving Mylyn bugs is the way to build up merit in the project :).
Comment 6 David Green CLA 2008-06-07 22:54:53 EDT
(In reply to comment #5)
> Marking resolved and reassigning to you David. We use bug assignment to
> recognize who has done the work. Resolving Mylyn bugs is the way to build up
> merit in the project :).

Great, thanks!