Community
Participate
Working Groups
Object-based menu contribution for comments in the task editor would allow to add actions for copying link to the comment or for sending im message to the commenter.
We've been talking about improving the representation of people for 3.0 (new bug 204068). Do you have use cases for taking object contributions for comments that don't operate on people? Copying the comment URL is a good use case for some connectors, but it would be good to know of others before deciding on UI.
Mik, this request is unrelated to the people section. Though besides comment url, it would be also handy to be able to copy user id while standing on particular comment (particularly interesting if commenter isn't in cc list). One more use case is to create new bug from comment, or im comment text or link to it to someone else. As for UI, it seem natural to use a popup menu and standard platform menu contributions (one of the advantages is that it would also work from the keyboard). BTW, the second use case from original description actually came from Chris.
(In reply to comment #2) > Mik, this request is unrelated to the people section. It's related because the first 'object' in a comment is the user, the next is the date, and the last is the body of the comment. So I'd like to understand what operations are reasonable to consider for each. Sending an IM message should operate on the user, and I've also wanted the same thing, so please feel free to add that use case to bug 204068. To better understand what to do with contributions themselves we need an outline of the use cases and to identify which operate on comment text/contents and which on the comment as an entity. The URL is the latter, but most I can think of are the former.
(In reply to comment #3) > It's related because the first 'object' in a comment is the user, the next is > the date, and the last is the body of the comment. Hmm. I was referring to comment as a whole block starting from comment number text and ending at the last word of the comment text. Once object contribution is enabled for that, it should be easy to add various adaptable or property checker. > Sending an IM message should operate on the user Not necessarily. One may want to send a comment text to completely different user. Few more actions from the top of my head: - search for duplicates using comment text - send selected comment text to http://rafb.net/paste - add commenter to the address book (create mapping to im identity)
Eugene: all of your actions operate either on user or on the comment text (see comment#3), which we will have separate mechanisms/contributions for. So the only use case for the "comment as a whole" that I'm current aware of is "view/copy/open URL". If there are others, please post, otherwise I'm not sure there's more value in taking object contributions on that line than there is in having a discoverable "open with Browser" or "copy URL" style button.
Mik, I not quite understand why object contribution would be bad. To me, using standard Eclipse mechanisms would improve task implementation. I also hope that we will eventually have keyboard navigation, i.e. cursor trough comments text like cursoring trough plain text editor. In that case action buttons won't be at any help, because they would require mouse and they will also visually clutter comment headers.
Object contributions would be a more elegant way to support repository operations, e.g. deletion of comments which is currently implemented using inheritance. I am not sure if it is possible to address this in the 3.0 time frame. Are there any existing connectors that would benefit from object contributions for comments?
FYI, IEditorSite.registerContextMenu() seems to be the right API for getting object contributions into the task editor context menu. It would be nice if the task editor would have extensibility for the tool bars in the section headers as well. So far I've only been able to find internal classes (e.g. WorkbenchMenuService) though for doing that and I am not aware of other places in Eclipse that allow tool bar contributions (besides views).
Comments are now represented as objects that have typed accessors for the various properties, e.g. task, author and creation date. Contributions made for the ITaskComment class will show up in the popup menu of the task editor if a comment is selected when the menu is shown. The tasks framework does not have any default object contributions for comments or people at this point. The author of a comment is of type IRepositoryPerson and accessible by invoking ITaskComment.getAuthor() so it should be straight forward to provide an adapter and contributions if needed.