Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 55435 - Create template preference page
Summary: Create template preference page
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Ant (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 enhancement (vote)
Target Milestone: 3.0 M9   Edit
Assignee: John-Mason P. Shackelford CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-19 17:19 EST by Darin Swanson CLA
Modified: 2004-04-26 00:13 EDT (History)
1 user (show)

See Also:


Attachments
initial patch for templates prefrence page (9.37 KB, patch)
2004-04-25 00:03 EDT, John-Mason P. Shackelford CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Swanson CLA 2004-03-19 17:19:57 EST
Add an Ant preference page for defining templates.
Comment 1 John-Mason P. Shackelford CLA 2004-04-25 00:03:31 EDT
Created attachment 9924 [details]
initial patch for templates prefrence page

Initial work on the templates preference page. It isn't really ready for
release as the syntax highlighting doesn't work yet. I have written a little
code for the syntax highlighting, but it will be fairly obvious that I don't
really know what I am doing there. Plenty of garbage code.

We may want to refactor the AntEditorSourceViewerConfiguration so that it (or
probably a new superclass of it) can be used in contexts like this one.
Currently AntEditorSourceViewerConfiguration expects to have a reference to the
Editor--which won't work for us here.

Darin, if you'd give me a pointer or two here, I'll try to get it wrapped up.
Comment 2 Darin Swanson CLA 2004-04-25 12:34:52 EDT
syntax highlighting does not work for the Java editor either :-) so we might 
not sweat this fact.

As well it appears that the formatting is not hitched up for the Java 
templates either. 
I believe I could add this early this afternoon.
Comment 3 Darin Swanson CLA 2004-04-25 12:35:28 EDT
I have released the code in its current state.
I renamed the preference page.
Comment 4 Darin Swanson CLA 2004-04-25 12:43:29 EDT
I also moved the formatter and template pages under the editor page. Let me 
know what you think?
Comment 5 John-Mason P. Shackelford CLA 2004-04-25 22:17:24 EDT
Good call on the relocation of the preference pages under editor. 

As far as the syntax highlighting goes, the area I was speaking of is preview
pane on that displays the template one it is selected in the template. I did
just confirm that this works in JavaTemplatePreferencePage which subclasses
TemplatePreferencePage as we do. Try selecting the template for 'try'.

If you'd like to deal with the syntax highlighting issue in another bug, let me
know and I'll send you a fresh patch without the lame code which attempts to get
it working. I'd rather not be a contributor of dead code :).

Comment 6 Darin Swanson CLA 2004-04-25 22:37:25 EDT
The Java editor Templates do not seem to be doing syntax highlighting for me.
Workbench>Java>Editor>Templates>try

The preview is all in black and white...no syntax coloring.
Ok now I see, JDT UI has much more implemented in HEAD. I will take a look.

I have spent about 1 hour getting the formatting and trying to get the syntax 
highlighting. 

I will try to spend a bit more time tonight. No need for you to send a 
patch...I can cut out whatever does not look promising later tonight or 
tomorrow morning.
Comment 7 Darin Swanson CLA 2004-04-26 00:13:11 EDT
Created the AbstractAntSourceViewerConfiguration.
Made AntEditorSourceViewerConfiguration a subclass, created 
AntTemplateViewerConfiguration.

Created AntTemplateVariableTextHover.

Some changes to AntTemplatePreferencePage, XMLTextHover, 
AntEditorPreferenceConstants.

I also renamed the template contexts to Ant and Ant Task: changes to 
plugin.properties.

Other bugs we find in this area (such as the formatting is not quite correct 
etc) we should log as separate issues.
Comment 8 Darin Swanson CLA 2004-04-26 00:13:26 EDT
Please verify John-Mason.