Bug 5517

Summary: templates: some code glitches
Product: [Eclipse Project] JDT Reporter: Adam Kiezun <akiezun>
Component: UIAssignee: Claude Knaus <Claude_Knaus>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

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