This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 201028 - support task editor templates for creating new comments
Summary: support task editor templates for creating new comments
Status: RESOLVED WONTFIX
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC All
: P4 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Mik Kersten CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-24 01:14 EDT by Mik Kersten CLA
Modified: 2008-10-30 01:13 EDT (History)
3 users (show)

See Also:


Attachments
template support (14.21 KB, patch)
2007-10-23 20:31 EDT, Eugene Kuleshov CLA
no flags Details | Diff
mylyn/context/zip (16.67 KB, application/octet-stream)
2007-10-23 20:31 EDT, Eugene Kuleshov CLA
no flags Details
Minor update to Eugene's patch (26.16 KB, patch)
2007-10-25 17:20 EDT, Robert Elves CLA
no flags Details | Diff
mylyn/context/zip (20.05 KB, application/octet-stream)
2007-10-25 17:20 EDT, Robert Elves CLA
no flags Details
updated patch (16.63 KB, patch)
2007-11-02 15:44 EDT, Eugene Kuleshov CLA
no flags Details | Diff
mylyn/context/zip (22.19 KB, application/octet-stream)
2007-11-02 15:44 EDT, Eugene Kuleshov CLA
no flags Details
patch updated for latst TaskFormPage changes (11.62 KB, patch)
2008-02-17 12:51 EST, Eugene Kuleshov CLA
no flags Details | Diff
updated patch (17.66 KB, patch)
2008-02-18 00:55 EST, Eugene Kuleshov CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mik Kersten CLA 2007-08-24 01:14:04 EDT
A team often builds up a set of stock replies to some common problems, for example, pointers to the download page or to the FAQ.  Another example is Eugene's reply on bug 200348.  We could better support this via Ctrl+Space invoked templates.
Comment 1 Eugene Kuleshov CLA 2007-10-23 20:31:09 EDT
Created attachment 81014 [details]
template support

Added template preference page and hooked it with task editor's sources views
Comment 2 Eugene Kuleshov CLA 2007-10-23 20:31:12 EDT
Created attachment 81015 [details]
mylyn/context/zip
Comment 3 Eugene Kuleshov CLA 2007-10-23 20:32:29 EDT
Mik, Rob, please review if you'll have chance
Comment 4 Steffen Pingel CLA 2007-10-23 21:01:02 EDT
Sounds like a great feature for 2.2.

Just a minor remark: There are bits from the label decoration patch in the plugin.xml and the formatting is not consistent. 
Comment 5 Eugene Kuleshov CLA 2007-10-23 22:25:14 EDT
(In reply to comment #4)
> Sounds like a great feature for 2.2.

Out of curiosity, what the other 12 patches awaiting review sounds like? Well, 4 of them submitted by me sounds like not good enough, but what is up with other 8?

> Just a minor remark: There are bits from the label decoration patch in the
> plugin.xml and the formatting is not consistent.

I couldn't resist to stab you for your continuous complains about formatting. To be fair, I did miss extension point from the label decoration patch, but the good news is that you could create template for complain about formatting once this patch is applied. :-)
Comment 6 Mik Kersten CLA 2007-10-25 00:51:19 EDT
Eugene: please be patient while we prioritize important defects and performance problems over enhancements.  We should be able to incorporate this for 2.2 if you provide test coverage.  
Comment 7 Eugene Kuleshov CLA 2007-10-25 00:57:02 EDT
The patch I submitted is 99% the UI boilerplate code based on platform template support. I honestly don't see what to cover there.
Comment 8 Robert Elves CLA 2007-10-25 17:20:00 EDT
Created attachment 81202 [details]
Minor update to Eugene's patch

Looks good Eugene. This will be handy.  Just updated the patch so it is current and reverted the change to the Task List preference page id.  If we do change it, be sure to update the constant in the preference page class.
Comment 9 Robert Elves CLA 2007-10-25 17:20:12 EDT
Created attachment 81203 [details]
mylyn/context/zip
Comment 10 Eugene Kuleshov CLA 2007-10-25 18:04:22 EDT
(In reply to comment #8)
> Just updated the patch so it is current
> and reverted the change to the Task List preference page id.  If we do change
> it, be sure to update the constant in the preference page class.

Thanks Rob. I didn't know about constant, but noticed that Task List preference page id duplicate id for its parent page.
Comment 11 Mik Kersten CLA 2007-10-26 03:14:22 EDT
TaskTemplateAccess should have some test coverage.  Does it need to be API at this point?  Also, should this come with some default templates as examples, e.g. from the ..mylyn.bugzilla.ide plug-in (I may have answered my previous question there).
Comment 12 Eugene Kuleshov CLA 2007-10-26 04:25:02 EDT
(In reply to comment #11)
> TaskTemplateAccess should have some test coverage.  

The trouble is that all data from TaskTemplateAccess is consumed by the Platform code. I actually used code from the Ant plugin and I simple have no clue what to assert on.

> Does it need to be API at this point?  

I suppose custom editors may want to access those templates. 
Another use case would be an action to create new template from selected text.

> Also, should this come with some default templates as examples,
> e.g. from the ..mylyn.bugzilla.ide plug-in (I may have answered my previous
> question there).

I suppose that can be added later. There maybe be even some extension points for that already, but I haven't looked at it.
Comment 13 Mik Kersten CLA 2007-10-26 13:11:39 EDT
Looks like we're close.  

Rob: next week let's take a quick look at what our test coverage on stuff like this should be and then apply.  I'm happy coming up with a template (probably specific to the bugs.eclipse.org plug-in) so that there is some UI driver for this.

Eugene: are the templates being stored in the workspace prefs?
Comment 14 Eugene Kuleshov CLA 2007-10-26 13:58:02 EDT
(In reply to comment #13)
> Eugene: are the templates being stored in the workspace prefs?

More specifically - to whatever is returned by TasksUiPlugin.getDefault().getPreferenceStore()
Comment 15 Eugene Kuleshov CLA 2007-11-02 15:44:44 EDT
Created attachment 81994 [details]
updated patch

Here is the same patch with a test case included. Please let me know what else stops you from taking this in.
Comment 16 Eugene Kuleshov CLA 2007-11-02 15:44:49 EDT
Created attachment 81995 [details]
mylyn/context/zip
Comment 17 Mik Kersten CLA 2007-11-15 17:07:22 EST
Was the following intended to be a joke?  It is completely inappropriate.  It is either derogatory to the company that currently provides the main support for Mylyn, or it is just totally unprofessional in the way it flippantly mentioning a company as the data for a test case.

	Template template1 = new Template("boo", "boo tasktop", TasksTemplateAccess.TASK_COMMENT_CONTEXT_TYPE,
		"Mik and Rob founded Tasktop", true);

Rob, Steffen: please review Eugene's patches *very* carefully from now on.  This was something of a shock to me, and we cannot let anything of this sort slip into the Mylyn source code, no matter what company is mentioned.  What's worst about this particular case is that Rob or me having applied the patch could have made it look like we were 'advertising' Tasktop within the Mylyn source code.

Eugene: please explain why you did this, and whether you expected us to apply the patch as is, or whether you were trying to get our attention or something of that sort.
Comment 18 Eugene Kuleshov CLA 2007-11-15 17:38:06 EST
Mik, it indeed was a joke for the most part and it nowhere meant to be derogatory to neither of you or company (why would you think that?). It is sad that we have different view on many things and apparently different sense of humor. My patches already reviewed *very* carefully then anyone's else (or at least it seems like it). There isn't much else to explain if you didn't get it by looking at the test itself (not sure if you did or not). Anyways, I leave it up to you to make changes to the patch that you feel appropriate or throw it away.
Comment 19 Mik Kersten CLA 2007-11-16 12:10:00 EST
Bjorn: I'm not sure if you're the right person to ask, but I'm at a loss on how to proceed here (see comment#17).  While there are useful contents in parts of it, should a patch like this be dismissed on principle?  I'm concerned that our working from such a patch could condone this kind of inappropriate contributor behavior.  
Comment 20 Eugene Kuleshov CLA 2007-11-16 13:19:00 EST
Comment on attachment 81994 [details]
updated patch

Revoking IP for this contribution due to the project lead's lack of sense of humor.
Comment 21 Mik Kersten CLA 2007-11-20 03:39:11 EST
(In reply to comment #20)
> (From update of attachment 81994 [details])
> Revoking IP for this contribution due to the project lead's lack of sense of humor.

Eugene: my sense of humor is not the issue here.  You are either failing or refusing to understand how inappropriate what you did here is, whether or not you did in jest.  Your being dismisses about my concerns is also worrying.  Your unprofessional communication on bugs and elsewhere has been problematic as I have pointed out, but please seriously consider that such a lack of discretion moving to source code is much worse.  Also, note that I'm not sure if it's possible to revoke your IP for a contribution, but Bjorn can let you know more about that.  To be on the safe side we will disregard the patches on this bug.

Rob, Steffen: until we better understand the severity of this situation, I will need to take responsibility for all of Eugene's patches and be solely responsible for their review.  
Comment 22 Eugene Kuleshov CLA 2007-11-20 13:03:33 EST
Mik, what made you thinking that I dismissed your concerns? Anyways, I don't think this bug should be a place for such discussion. 
Also note that I only revoked patch you found problematic, so there is still clean first patch.
Comment 23 Robert Elves CLA 2007-11-27 14:22:03 EST
Reassigning to you Mik as per comment#21.
Comment 24 Bjorn Freeman-Benson CLA 2007-11-29 19:57:48 EST
(In reply to comment #20)
> Revoking IP for this contribution 

I'm sorry, but the EPL carefully and deliberately does not allow people to un-contribute something. This is for the protection of the projects in that we wouldn't want large company M to contribute something to Eclipse and then, once it becomes popular and in wide use, un-contribute it and force everyone to buy the code.  So, no, the EPL does not allow un-contribution. And under the terms of use of the eclipse.org websites, you contributed your patches under the EPL.
Comment 25 Eugene Kuleshov CLA 2007-11-29 20:35:26 EST
(In reply to comment #24)
> I'm sorry, but the EPL carefully and deliberately does not allow people to
> un-contribute something.

Bjorn, I am not a lawyer, but my understanding that contribution need to be accepted before it became part of Eclipse. Either way my contribution hasn't been accepted because Mik had issues with it, so I took it off to clean that. Think about it as webmaster deleted attachment as he do to clean up  things someone submitted by mistake (like I did).
Comment 26 Bjorn Freeman-Benson CLA 2007-11-29 21:38:40 EST
(In reply to comment #25)
> my understanding that contribution need to be
> accepted before it became part of Eclipse

You are correct that the contribution needs to be integrated into the source code repository in order to be part of the Eclipse distribution that is built from the source code repository. I guess that's obvious :-)  

However, once you post something to an eclipse.org website, whether it is the wiki, an email list, a newsgroup, or bugzilla, that posting automatically becomes EPLed. Whether the project accepts the patch or not, the code in the patch is now under the EPL and thus can never be "un-EPLed".

Perhaps I'm arguing a moot point here, but I'm just trying to alert you (and others who may read this) to be careful about what you post: once it's posted, it's EPL.

Regards.
Comment 27 Eugene Kuleshov CLA 2008-02-17 12:51:30 EST
Created attachment 89943 [details]
patch updated for latst TaskFormPage changes

Mik, can you please tell what is preventing you from taking this patch? Is there anything I can do to help you with that?
Comment 28 Eugene Kuleshov CLA 2008-02-18 00:55:56 EST
Created attachment 89954 [details]
updated patch

I missed few things in the last patch. Here is version that works. Also added sample template, to initial template list won't be empty.
Comment 29 Mik Kersten CLA 2008-02-19 01:19:22 EST
Eugene: as per comment#17, 19 and 21, the patch on this bug broke the trust that is key to our accepting contributions.  Since this bug represents a break in trust, and the incident was not isolated, while the patch provides some value I think that principle is more important in this case.  So I will not apply it because I see my applying it as a way of condoning such behavior and taking an "end justifies the means" approach.

I hope that we can put this behind us, because it saddens me to see bug reports degrade in this way.  Fyi, Bjorn's blog has some good pointers on trust and how it pertains to the Eclipse Development Process: http://eclipse-projects.blogspot.com/2006/11/edp-project-teams-11-of-17.html

If someone else is interested in providing this functionality they can consider using the patch code and technical parts of comments above as reference.
Comment 30 Eugene Kuleshov CLA 2008-02-19 03:05:26 EST
Mik, I gave an explanation of my action on comment #18 and later cleaned the patch from any content you've considered inappropriate. Basically there is no technical issue left with the patch, nor there could be issue with trust as anyone can verify that contributed patch is actually appropriate now and I believe you have cleared all administrative things with the PMO at this point.

To anyone who want to consider using my patch, from this bug report, please note that you can't actually use my patch for your own contribution since you don't own the IP on this code and that will be violation of the Eclipse contribution guidelines (Mik probably suggested that by an accident as he couldn't possible want you to violate those guidelines), or else will have to give the attribution of the original author of the code, but then it will be in violation of Mik's principles on this matter.
Comment 31 Mik Kersten CLA 2008-02-19 12:29:40 EST
All: since Eugene is malcontent, please do ignore his patch just to be on the safe side.  If someone does provide this, note that the patch copies code from AntTemplateAccess which can be used as an example instead of the patch.  

Eugene: see Bjorn's comment#24 and comment#28 about the implications of submitting IP under the EPL and feel free to complain to the Eclipse Foundation about those guidelines, the question of trust, or my handling of either in this problematic scenario.
Comment 32 Eugene Kuleshov CLA 2008-02-19 14:14:15 EST
(In reply to comment #31)
> Eugene: see Bjorn's comment#24 and comment#28 about the implications of
> submitting IP under the EPL and feel free to complain to the Eclipse Foundation
> about those guidelines, the question of trust, or my handling of either in this
> problematic scenario.

To clarify, I wasn't referring to revocation. The EPL has a section that "each Contributor must identify itself as the originator of its Contribution..." etc. If someone copied my code she can't claim that she is originator (and there is enough to copy besides the one class you're referring to). Anyways, I am not a lawyer and the whole situation is rather silly. Technically API is there to be used by anyone, it was just matter of figuring out how to make it work for Mylyn. I was the first one who managed that and you can't take that pride from me, even if you won't apply my patch.