Bug 101933 - [content assist] Content Assist doc needs to mention ContentAssistAction
Summary: [content assist] Content Assist doc needs to mention ContentAssistAction
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 trivial (vote)
Target Milestone: 3.2 RC2   Edit
Assignee: Dani Megert CLA
QA Contact:
URL:
Whiteboard:
Keywords: Documentation
Depends on:
Blocks:
 
Reported: 2005-06-27 16:50 EDT by Michael Valenta CLA
Modified: 2006-05-12 03:14 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Valenta CLA 2005-06-27 16:50:28 EDT
I tried to add content assist to an editor and failed miserably until I found 
an simple example of how to create and configure the ContentAssistAction. This 
seems to be an integral part of the process so it needs to be mentioned in the 
doc (obviously not for 3.1 though;-)
Comment 1 Dani Megert CLA 2005-06-28 03:09:47 EDT
which example was that?
Comment 2 Michael Valenta CLA 2005-06-28 08:54:50 EDT
I got the example code for the EclipseFAQ book fron John Arthorne. It was much 
easier to understand than the javaeditor example in dev.eclipse.org.
Comment 3 Dani Megert CLA 2005-06-28 08:58:34 EDT
John, would it be possible to contribute this example to eclipse?
Comment 4 Michael Valenta CLA 2005-06-28 09:22:34 EDT
This bug is not so much about improving the example. The problem is that I 
followed the steps in the ISV doc and didn't get what I expected (i.e. CTRL-
Space didn't work). The fact that the example was a bit involved didn't help 
but I wouldn't even have needed to look at the exampel had the ISV doc been 
complete.

John's example showed how the editor needs to define and register a 
ContentAssistAction in the createActions method. Perhaps he will give you 
permission to include the snipet from his example so it can be added to the 
doc (I think it is unreasonable to ask to include the complete example 
especially since it may have a copyright associated with the book).
Comment 5 John Arthorne CLA 2005-06-28 10:05:10 EDT
FAQ examples can be found here:

http://eclipsefaq.org/chris/faq/samples.html

Go to "FAQ recipe and other samples", and grab org.eclipse.faq.examples-src.zip.
 Unlike the book text, the examples are copyright Chris and I, and distributed
under the MIT license... i.e., do whatever you want with them.
Comment 6 Dani Megert CLA 2005-06-28 10:10:25 EDT
Thanks John. This once again confirms that asking a question is not unreasonable
most of the times ;-)
Comment 7 Michael Valenta CLA 2005-06-28 10:35:17 EDT
Sorry for being so negative. I guess I'm just a half-empty kind'a guy. I must 
say that I think the HTML editor example from the book is a really good 
example of how to use code assist. I think it would definitly be a good 
example to make available. I still think the doc needs to be updated though. 
It could even have a pointer to the example.
Comment 8 Dani Megert CLA 2006-02-22 03:08:50 EST
In fact we should make it much simpler and create the action on our side, so that the only thing a client needs to do is
- add it to the context menu if desired
- link it to the command and action bar if desired (editor action bar contributor)

And these two steps should be added to the doc.

Time permitting for 3.2.
Comment 9 Dani Megert CLA 2006-04-25 10:05:05 EDT
Fixed doc in HEAD. Filed bug 138370 requesting simpler setup of ContentAssistAction.

Available in builds > N20060425-0010.
Comment 10 Dani Megert CLA 2006-05-12 03:14:16 EDT
Verified in I20060512-0010.