Bug 165753 - Enhancement for "Contributing Actions to the Eclipse Workbench"
Summary: Enhancement for "Contributing Actions to the Eclipse Workbench"
Status: RESOLVED FIXED
Alias: None
Product: Community
Classification: Eclipse Foundation
Component: Articles (show other bugs)
Version: unspecified   Edit
Hardware: PC All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: community.articles-inbox CLA
QA Contact:
URL: http://www.eclipse.org/articles/Artic...
Whiteboard:
Keywords: plan
Depends on:
Blocks:
 
Reported: 2006-11-24 02:17 EST by Ketan Padegaonkar CLA
Modified: 2007-02-22 12:34 EST (History)
7 users (show)

See Also:


Attachments
A draft of an updated article for contributing to custom editors. (469.46 KB, application/x-zip-compressed)
2007-01-03 07:24 EST, Ketan Padegaonkar CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ketan Padegaonkar CLA 2006-11-24 02:17:03 EST
The "Contributing actions..." article talks about contributing actions to various parts of the workbench.

Specifically, there's a section on adding actions to popupMenus inside editors. It would be nice if the article talks about adding popupMenus for custom editors.
Comment 1 Ketan Padegaonkar CLA 2006-11-24 02:24:14 EST
here's how I had to add the popupMenu:

/**
 * This is my editor for which I've to add a popupMenu
 */
public class MyEditor extends TextEditor {
  public static final String ID	= "org.eclipse.sample.myeditor.MyEditor";
  public static final String EDITOR_CONTEXT = ID;
  public static final String RULER_CONTEXT = EDITOR_CONTEXT + ".ruler";
  ...
  ...
  protected void initializeEditor() {
    super.initializeEditor();
    setEditorContextMenuId(ID);
    setRulerContextMenuId(RULER_CONTEXT);
  }
  ...
  ...
}


My plugin.xml reads:

<!-- contribution to the popup menu in myeditor -->
   <extension
         point="org.eclipse.ui.popupMenus">
      <viewerContribution
            id="org.eclipse.sample.myeditor.popupContribution"
            targetID="org.eclipse.sample.myeditor.MyEditor"> <!-- see MyEditor#initialize() -->
         <action
               class="org.eclipse.sample.myeditor.MyAction"
               id="org.eclipse.sample.myeditor.popupAction"
               label="&amp;Popup Action"
               ... />
               ...
      </viewerContribution>
   </extension>
Comment 2 Wayne Beaton CLA 2006-11-24 11:29:58 EST
Simon: Is it time for an update to this article?

Are you able to spend some time working on it, or should we find another author?

Ketan: Are you interested in collaborating on an update?
Comment 3 Ketan Padegaonkar CLA 2006-11-26 23:28:40 EST
(In reply to comment #2)
<snipped />
> Ketan: Are you interested in collaborating on an update?

I would be interested in collaborating on an update.

Comment 4 Wayne Beaton CLA 2006-11-28 15:02:41 EST
Simon: do you think that the article should be updated, or should we consider a companion piece? Are you able/willing to collaborate with Ketan?
Comment 5 Ketan Padegaonkar CLA 2006-12-12 03:27:18 EST
I would really like to push this out. There's a lot of people on the newsgroup who're looking for this update in the "Contributing Actions..." article.
Comment 6 Wayne Beaton CLA 2006-12-12 21:44:44 EST
In private correspondence, Simon has told me that he is not able to work on an update. Are you willing/able to manage the update yourself? If so, go for it. If not, we'll need to find a collaborator...
Comment 7 Ketan Padegaonkar CLA 2006-12-12 23:41:56 EST
(In reply to comment #6)
> Are you willing/able to manage the update yourself? If so, go for it.

Sure I'll update the article myself.




Comment 8 Wayne Beaton CLA 2006-12-13 10:15:16 EST
Cool. I'm looking forward to your first draft.
Comment 9 Ketan Padegaonkar CLA 2007-01-03 07:24:22 EST
Created attachment 56325 [details]
A draft of an updated article for contributing to custom editors.
Comment 10 Ketan Padegaonkar CLA 2007-01-08 00:05:10 EST
> Cool. I'm looking forward to your first draft.

Hi Wayne,
What's the latest on this ?

Comment 11 Wayne Beaton CLA 2007-01-17 13:51:28 EST
Sorry backlogged. It looks good to me. I've made a request to the platform ui team to get somebody to review it and sign off on the content.
Comment 12 Boris Bokowski CLA 2007-01-17 15:21:30 EST
Note that the story for how to make commands show up in the UI (as menu items, toolbar items, ...) is going to be different starting with Eclipse 3.3.
Comment 13 Wayne Beaton CLA 2007-01-17 15:34:19 EST
Is this article salvageable in consideration of the changes, or does it become obsolete?
Comment 14 Paul Webster CLA 2007-01-17 21:03:44 EST
This article is still valid in the context of 3.2.2, although all of the extensions will become deprecated in 3.3.

I think it's still worth either

1) publishing Ketan's update as is, or
2) publish Ketan's update with another small addition, about calling a command from the IActionDelegate like mentioned on the wiki.

http://wiki.eclipse.org/index.php/Platform_Command_Framework#Using_an_IActionDelegate_to_execute_a_command

As we finish 3.3 we'll be building up a set of examples and a migration guide on the wiki, which could be used as the basis for a new article (but that won't be until after Jun 2007 :-)

PW
Comment 15 Ketan Padegaonkar CLA 2007-01-18 00:25:58 EST
I do understand that actionSets, editorActions, viewActions and popupMenus will be replaced by the command framework (http://dev.eclipse.org/newslists/news.eclipse.platform/msg60006.html)

This was an update for folks (like me) who still continue to use eclipse 3.2.x (and perhaps 3.1.x) for development.

I'll investigate into the command framework in 3.3-M4, and update the article in time for the 3.3 release.

Is this OK for everyone ? Is there any "recommended reading" for me while I'm doing this ?
Comment 16 Wayne Beaton CLA 2007-01-18 10:10:18 EST
If the article is up-to-date and correct for 3.2.1, I recommend we release now and that we deal with the 3.3 release in the coming months.

Seconds?
Comment 17 Ketan Padegaonkar CLA 2007-01-18 10:12:31 EST
(In reply to comment #16)
> If the article is up-to-date and correct for 3.2.1, I recommend we release now
> and that we deal with the 3.3 release in the coming months.
> 
> Seconds?

+1.



Comment 18 Paul Webster CLA 2007-01-18 10:15:37 EST
+1
PW
Comment 19 Sriram Narayanan CLA 2007-01-19 00:23:11 EST
(In reply to comment #16)
> If the article is up-to-date and correct for 3.2.1, I recommend we release now
> and that we deal with the 3.3 release in the coming months.
> 
> Seconds?
> 

+1. It's more helpful to have content relevant to what we have already, and to add/modify content as required.
Comment 20 Wayne Beaton CLA 2007-01-19 09:03:12 EST
+1

I'll push it out next week.
Comment 21 Wayne Beaton CLA 2007-01-19 09:03:55 EST
Changing status to ASSIGNED. Publishing is pending.
Comment 22 Wayne Beaton CLA 2007-02-22 12:30:33 EST
Updates have been published. I updated the format of the document to better match the new template. Please pull the latest version off CVS if you intend to do additional updates.

http://www.eclipse.org/articles/article.php?file=Article-action-contribution/index.html
Comment 23 Wayne Beaton CLA 2007-02-22 12:34:53 EST
Ketan, can you contact me via email (wayne@eclipse.org) and give me your shirt size, mailing address, and phone number? I'll see if I can find some nice Eclipse Swag for you.