Bug 5517 - templates: some code glitches
Summary: templates: some code glitches
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Claude Knaus CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-11-05 04:32 EST by Adam Kiezun CLA
Modified: 2001-11-06 06:29 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Kiezun CLA 2001-11-05 04:32:24 EST
some stuff i noticed:

1. Template should not have getImage method - label provider responsibility
Template is a model entity - not visual

2. Template implements equals without implementing hashCode

3. TemplateContentProvider - should use the protocol used by other content 
providers:
	- constructor does nothing
	- input is set in inputChnaged
4. TemplateContentProvider - fViewer unused

5. TemplateEngine - unneceserily uses new String(s)
line 30 sould be: 
	fContextType= contextType;
instead of: 
	fContextType= new String(contextType);

line 60: assertion not needed - viewer is used afterwards

6. TemplateEvaluator: methods format2 and format3 should be renamed, commented 
or removed

7. TemplateSet - should not be a half-singleton
  (either make it one - by removing the public constructor 
   or remove the static pointer to an instance)
the latter is preferable

8. TemplateSet - leaves streams open (close() *must* be put in 'finally' blocks 
- see how it is done in other places in our code)
Comment 1 Claude Knaus CLA 2001-11-06 06:29:36 EST
fixed > 208