Bug 294957 - [api] move support extension into API
Summary: [api] move support extension into API
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P1 enhancement (vote)
Target Milestone: 3.4   Edit
Assignee: Steffen Pingel CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy
Depends on: 286344 304171
Blocks: 229495
  Show dependency tree
 
Reported: 2009-11-12 04:59 EST by Igor Burilo CLA
Modified: 2011-09-26 12:34 EDT (History)
3 users (show)

See Also:


Attachments
patch (49.56 KB, patch)
2010-02-28 17:51 EST, Steffen Pingel CLA
no flags Details | Diff
mylyn/context/zip (1.98 KB, application/octet-stream)
2010-02-28 18:09 EST, Steffen Pingel CLA
no flags Details
documentation (14.34 KB, text/html)
2011-02-07 22:27 EST, Steffen Pingel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Igor Burilo CLA 2009-11-12 04:59:05 EST
I found out that you added org.eclipse.mylyn.tasks.bugs.support extension point which allows to integrate with bug reporting (bug 212209 comment 36); and it looks good. We (Subversive) also want to integrate with it, e.g. it already includes CVS etc., but this extension point is internal which means that its usage is discouraged.
When will this extension point become public? I didn't investigate too deep but does it allow to include run-time information in description?


-- Configuration Details --
Product: Eclipse 1.2.0.20090615-0858 (org.eclipse.epp.package.rcp.product)
Installed Features:
 org.eclipse.mylyn_feature 3.3.0.v20091013-0200-e3x
Comment 1 Steffen Pingel CLA 2009-11-12 15:03:51 EST
Let's review the current extension point and the existing implementations to validate if this is ready to be promoted to API. I have heard from multiple integrators that internals are a big hurdle to extending the support framework.
Comment 2 Mik Kersten CLA 2009-11-16 12:49:08 EST
+1 for review and consideration for API for next release
Comment 3 Steffen Pingel CLA 2010-02-28 17:51:41 EST
Created attachment 160437 [details]
patch
Comment 4 Steffen Pingel CLA 2010-02-28 18:09:48 EST
Created attachment 160439 [details]
mylyn/context/zip
Comment 5 Steffen Pingel CLA 2010-03-04 16:44:27 EST
I have committed the patch which renames org.eclipse.mylyn.internal.provisional.tasks.bugs to org.eclipse.mylyn.tasks.bugs. This has the following implications:

Clients that were previously extending org.eclipse.mylyn.internal.provisional.tasks.bugs.AbstractSupportHandler will need to be modified accordingly and recompiled to extend classes in the new namespace.

The change does not affect clients that were declaring support extensions through XML using the support extension point. The schema is unaltered but not marked internal any longer. 

The deprecated pluginRepositoryMappings and taskContributors extension points have been removed. The extensions were not actually used by the error reporting any longer.
Comment 6 Alexander Gurov CLA 2011-02-06 11:57:09 EST
Is there any documentation related to the extension point "org.eclipse.mylyn.tasks.bugs.support" available?
Actually, there is no schema file in the plug-in and even Google can't propose anything useful.
So, I don't know how much information I can provide using this extension point and how.
Could you please provide some information regarding this extension point?
Or is it possible that I haven't looked good enough? :)

P.S.
At the moment I've used this:

<extension point="org.eclipse.mylyn.tasks.bugs.support">
	<product featureId="org.eclipse.team.svn" id="org.eclipse.team.svn" providerId="org.eclipse"/>
	<mapping namespace="org.eclipse.team.svn" productId="org.eclipse.team.svn">
		<property name="product" value="Subversive"/>
	</mapping>
</extension>
Comment 7 Steffen Pingel CLA 2011-02-07 22:27:37 EST
Created attachment 188493 [details]
documentation
Comment 8 Steffen Pingel CLA 2011-02-07 22:27:46 EST
We added documentation in the 3.4 release but the schema is only included in the SDK feature (i.e. source bundle).

The extension definition looks good to me! Let me know when a new build is available and I am happy to test.
Comment 9 Alexander Gurov CLA 2011-02-08 01:08:26 EST
Thanks, I will check the provided documentation.
New Subversive build for the future Helios SR2 RC3 with the mentioned feature is available here:

http://download.eclipse.org/technology/subversive/0.7/helios-site/

Builds for Indigo and early access will be published later with more changes included.
Comment 10 Alexander Gurov CLA 2011-02-08 01:23:16 EST
Hmm, looks like ISupportRequest is exactly what I need in order to provide all required information, so there is a way to improve. :)
Comment 11 Alexander Gurov CLA 2011-02-08 01:48:39 EST
Oh, sorry, another question on my side.
I have checked interface ISupportRequest and found this:

Noimplement:
    This interface is not intended to be implemented by clients.

"No implement" is all right, but still is there any way to provide important information which cannot be specified through plugin.xml (in Subversive case it is Subversive Connectors version)?
Comment 12 Steffen Pingel CLA 2011-02-08 21:08:26 EST
The recommended way to provide custom information it is to extends AbstractSupportHandler and to override preProcess(). If you want to add text to the standard blurb provided by DefaultSupportHandler you can use something like this:

SupportHandler extends AbstractSupportHandler {

	@Override
	public void preProcess(ISupportRequest request) {
		ITaskContribution contribution = request.getDefaultContribution();
	    contribution.appendToDescription("My additional information");
	}

}

Otherwise you can implement process() and use contribution.setAttribute(IRepositoryConstants.DESCRIPTION, "My information") to force a description.
Comment 13 Alexander Gurov CLA 2011-02-09 05:28:43 EST
(In reply to comment #12)
> The recommended way to provide custom information it is to extends
> AbstractSupportHandler and to override preProcess(). If you want to add text to
> the standard blurb provided by DefaultSupportHandler you can use something like
> this:
> 
> SupportHandler extends AbstractSupportHandler {
> 
>     @Override
>     public void preProcess(ISupportRequest request) {
>         ITaskContribution contribution = request.getDefaultContribution();
>         contribution.appendToDescription("My additional information");
>     }
> 
> }
Unfortunately it does not work this way in some cases.

When it works:
1) Help->Report Bug or Enhancement
2) Error Log-> Right Mouse over log entry -> Report as Bug -> Select repository ->...

When it does not work:
1) Error Log-> Right Mouse over log entry -> Report as Bug -> Report to: Eclipse.org - Subversive SVN Team....
In last case everything set in preProcess() become completely ignored.

> Otherwise you can implement process() and use
> contribution.setAttribute(IRepositoryConstants.DESCRIPTION, "My information")
> to force a description.
This method is probably useless because there seems no way to obtain stack trace from the Mylyn status through the public API.
And even if I call contribution.appendToDescription("My additional information") in process() method context, I still get Mylyn's description overwritten which is slightly contradicting to the method name semantics.

Or maybe I'm missing something again?

P.S.
I have installed Mylyn version 3.4.2.v20100916-0100-e3x-7Z7f77FBBoPbPQeUoFeZXJ8
Comment 14 Steffen Pingel CLA 2011-09-26 12:34:19 EDT
I have opned bug 358927 to investigate the problem described in comment 13.