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

Bug 123921

Summary: document list of commands for use from UA document contexts
Product: [Eclipse Project] Platform Reporter: Christopher Daly <cjdaly>
Component: User AssistanceAssignee: platform-ua-inbox <platform-ua-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: enhancement    
Priority: P3 CC: isafer, janek.lb, wassim.melhem
Version: 3.2   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
catalog of commands for embedding in UA documents (first draft)
none
document update
none
update to draft document (ver 0.3)
none
update to draft document (ver 0.4)
none
update to draft document (ver 0.5)
none
update to draft document (ver 0.6)
none
authoring tool for command embedding
none
authoring tool for command embedding (ver 0,2) none

Description Christopher Daly CLA 2006-01-16 00:38:33 EST
I've been working on the general problem of representing commands and their parameters in a way that allows them to be embedded inside UA documents like Help, Cheatsheets and Intro such that they can be executed by user actions (like clicking a link).  (See bug #120523 and bug #121709 for details on the underlying support.)

At this point we need to pin down the list of commands that will be available for Eclipse 3.2 and document them.  To do that, we need to figure out which will be the most useful and implement them.

There are currently commands to:
- show a view (by view id)
- show a perspective (by perspective id)
- display a help topic (by href)

Additional commands have been proposed to:
- open resource (by IPath or URI)
- show resource in Navigator (by IPath or URI)

- open a cheatsheet
- open intro content

- open a Java element
- show Java element in package explorer
- show Java element in type hierarchy

- add CVS repository
- checkout project from CVS

- add update site
- install feature from update site

- open URL in browser


This bug is a good place for discussion about the importance of implementing commands in the list (and proposing commands not in the list).

I'm going to attach an HTML doc that gives additional detail about this effort.
Comment 1 Christopher Daly CLA 2006-01-16 00:39:31 EST
Created attachment 33044 [details]
catalog of commands for embedding in UA documents (first draft)
Comment 2 Christopher Daly CLA 2006-01-17 01:46:18 EST
Created attachment 33132 [details]
document update

added text describing how to execute commands from Cheatsheets and Intro content
Comment 3 Dejan Glozic CLA 2006-01-17 07:59:03 EST
A number of commands normally accessible through the menu bar are also needed. I presume they are already defined for the menu bar (e.g. opening various dialogs and wizards such as 'switch workspace', 'Preferences', 'Run', 'Debug' etc.
Comment 4 Christopher Daly CLA 2006-01-26 20:45:20 EST
Created attachment 33685 [details]
update to draft document (ver 0.3)
Comment 5 Christopher Daly CLA 2006-01-31 15:01:19 EST
Created attachment 33881 [details]
update to draft document (ver 0.4)
Comment 6 Christopher Daly CLA 2006-02-09 02:52:51 EST
Created attachment 34409 [details]
update to draft document (ver 0.5)
Comment 7 Dejan Glozic CLA 2006-02-09 13:33:37 EST
Chris, we also need to indicate command return values when they are not null.
Comment 8 Christopher Daly CLA 2006-02-09 15:15:26 EST
Created attachment 34444 [details]
update to draft document (ver 0.6)

only 2 commands currently return values, but those are now indicated in the document.  I also made a few other minor corrections.
Comment 9 Christopher Daly CLA 2006-02-19 20:57:43 EST
Created attachment 34981 [details]
authoring tool for command embedding

This is a tool I've been working on to help authors of Help/Cheatsheets/Intro embed commands in their content.

The tool helps:
- find commands that might be useful for embedding
- parameterize the commands that use parameters
- test execute commands
- copy command text to the clipboard so it can be pasted into the document

The attached zipped plugin contains the first cut of the tool.  Look for the view called "Command Conquerer".
Comment 10 Christopher Daly CLA 2006-02-23 03:46:23 EST
Created attachment 35216 [details]
authoring tool for command embedding (ver 0,2)

This version of the authoring tool has a few minor improvements.
Comment 11 Christopher Daly CLA 2006-04-18 14:39:33 EDT
one thing that should be worked into the authoring tool and the catalog of commands is the recent changes we've made to the format used for commands embedded in help described in bug 130834 and bug 130244.

The summary is that commands in help should look like this:

<a class="command-link"
href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.jdt.ui.preferences.ClasspathVariablesPreferencePage)")'>
<img src="PLUGINS_ROOT/PRODUCT_PLUGIN/command_link.png">
<b>Java &gt; Build Path &gt; Classpath Variables</b></a>
preference page.

The class="command-link" and <img...> help to distinguish the command link from ordinary HTML links.
Comment 12 Lee Anne Kowalski CLA 2006-07-27 17:15:33 EDT
Hi, I was reading the Eclipse 3.2 online docs re Active Help, and have a question.

Is the anchor format in Chris's last append supported for use in the main help topics? I mean, for the set of commands in the list, can I use this format in place of having to create my own ILiveHelpAction?

Thanks!
--Lee Anne
Comment 13 Curtis d'Entremont CLA 2006-07-27 17:30:37 EDT
Yes, all the command links you see in the SDK docs are done this way. In fact I encourage you to use commands instead custom live actions and I would like to eventually deprecate the live help actions in favor of commands. It's a great way to state your intent without binding yourself to a particular implementation.
Comment 14 Lee Anne Kowalski CLA 2006-07-28 16:02:22 EDT
Fabulous! Great to hear this!

--Lee Anne
Comment 15 Chris Goldthorpe CLA 2007-04-09 13:37:41 EDT
The command authoring is now a part of the cheat sheet editor so I'm going to close out this bug. I'm not sure what the most appropriate resolution is so I'll set this as a duplicate of one of the cheat sheet editor bugs that relates to the command composer.

*** This bug has been marked as a duplicate of bug 157737 ***