Bug 254730 - XML file without <?xml version="1.0" encoding="UTF-8" standalone="no"?> can be imported in Templates
Summary: XML file without <?xml version="1.0" encoding="UTF-8" standalone="no"?> can b...
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Roy Ganor CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-10 07:36 EST by Kalin CLA
Modified: 2020-05-14 10:16 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kalin CLA 2008-11-10 07:36:56 EST
Go to PHP -> Templates preferences page.

Export e.g. next templates in a xml file:
eco
elif
els

Then remove mentioned templates pressing the button Remove in Templates page.

Open just created xml file and remove the next text:
<?xml version="1.0" encoding="UTF-8" standalone="no"?> 

Save changes.

The xml file has the next contents:

<templates><template autoinsert="true" context="php" deleted="false" description="echo a string" enabled="true" id="org.eclipse.php.ui.editor.templates.php.echo" name="eco">echo("${}");
${cursor}</template><template autoinsert="true" context="php" deleted="false" description="elseif statement" enabled="true" id="org.eclipse.php.ui.editor.templates.php.elif" name="elif">elseif (${condition}) {
	${cursor};
}
</template><template autoinsert="true" context="php" deleted="false" description="else statement" enabled="true" id="org.eclipse.php.ui.editor.templates.php.else" name="els">else {
	${cursor};
}
</template></templates>

Try to import the xml file.

Expected:
An appropriate error message.

Actual:
Templates eco, elif, els were imported sucessfully.



This behavior is related to each template and related xml file.
Found in N20081109
Comment 1 Nitin Dahyabhai CLA 2010-10-05 16:55:50 EDT
Looks to me like this is working as designed.