Bug 197243 - Make content assist templates a view
Summary: Make content assist templates a view
Status: RESOLVED DUPLICATE of bug 69581
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.3   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-20 02:06 EDT by dakshinamurthy.karra CLA
Modified: 2007-07-24 04:35 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 dakshinamurthy.karra CLA 2007-07-20 02:06:26 EDT
Currently the content assist templates are buried within the preferences. Adding to the templates is hard because of this reason.

I am suggesting the following improvements:

1. Make it a view with facilities for adding/removing templates.
2. User should be able to cut and paste code from the editor into a template.
3. It will be nice if eclipse can suggest the variable place holders while the code is being added, like the editor does when we use content assist/quick fix.

-- KD
Comment 1 Benno Baumgartner CLA 2007-07-23 03:51:21 EDT
We could also allow to drag and drop text from the editor to the view and back. The view would then act like a clipboard containing multiple text fragments. But question is if this would be a platform feature or a JDT feature?

See platform bug 69581
Comment 2 Dani Megert CLA 2007-07-23 04:09:35 EDT

*** This bug has been marked as a duplicate of bug 69581 ***
Comment 3 dakshinamurthy.karra CLA 2007-07-23 13:02:39 EDT
(In reply to comment #2)
> 
> *** This bug has been marked as a duplicate of bug 69581 ***

I am not sure whether this is a duplicate of that bug. With whatever little I could see from screenshots from the sharpdevelop, eclipse code completion seems superior to me.

There are two parts to this request. The first part of changing the preference pane to a view should be trivial. I actually wrote a small plugin that converts the preference pane to a view and using it now.

The second part is to cut&paste from the editor. I am envisaging a view toolbar command - paste from clipboard. If the code is pasted from the editor, eclipse can provide content assist to convert Java statements to variables.

-- KD
Comment 4 Dani Megert CLA 2007-07-24 01:57:17 EDT
Don't worry. Bug 69581 goes into the same direction.
Comment 5 Benno Baumgartner CLA 2007-07-24 04:16:07 EDT
(In reply to comment #3)
> The first part of changing the preference pane to a view should be trivial. 
> I actually wrote a small plugin that converts the preference pane 
> to a view and using it now.

Does that mean, that you now have a view that shows the exact same content as the preference page? Which context types do you show in the view, how did you connect them to the active editor?
We envision a view showing a tree/table with the templates and a part which allows to edit the selected template. We also need an import/export wizard and maybe a new template wizard. The view should only show the templates which make sense in the context of the active editor.
This is all possible but not trivial.

> The second part is to cut&paste from the editor. 
> I am envisaging a view toolbar command - paste from clipboard. 
> If the code is pasted from the editor, eclipse
> can provide content assist to convert Java statements to variables.

This again, must work for all editors with template capabilities, not only the Java editor.
Comment 6 dakshinamurthy.karra CLA 2007-07-24 04:35:25 EDT
(In reply to comment #5)
I am posting my reply to bug no. 69581.

-- KD