Project: JDT
Bug 8085 template pref page: exception while importing incorrect file
Reported: 2002-01-23 06:39:17 | Status: verified fixed

i tried to import this: <?xml version="1.0" encoding="UTF-8"?> <templatfes><template context="javadoc" description="author name" enabled="true" name="@author">@author ${user}</template></templates> which has an error i got an error dialog and this: 4 org.eclipse.jdt.ui 1 Internal Error org.eclipse.jdt.internal.ui.JavaUIException[2]: org.xml.sax.SAXParseException: The element type "templatfes" must be terminated by the matching end- tag "</templatfes>". at org.apache.xerces.framework.XMLParser.reportError (XMLParser.java:1196) at org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError (XMLDocumentScanner.java:579) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLDocumentScanner.parseSome (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081) at org.apache.xerces.jaxp.DocumentBuilderImpl.parse (DocumentBuilderImpl.java:195) at org.eclipse.jdt.internal.ui.text.template.TemplateSet.addFromStream (TemplateSet.java:103) at org.eclipse.jdt.internal.ui.text.template.TemplateSet.addFromFile (TemplateSet.java:83) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage.import_ (TemplatePreferencePage.java:389) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage.access$4 (TemplatePreferencePage.java:379) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage$8.handleEvent (TemplatePreferencePage.java:212) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:523) at org.eclipse.ui.internal.OpenPreferencesAction.run (OpenPreferencesAction.java:47) at org.eclipse.jface.action.Action.runWithEvent(Action.java:452) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:827) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:878) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:321) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:502) at org.eclipse.core.launcher.Main.main(Main.java:362)

Files changed in fix:
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/TemplatePreferencePage.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateSet.java