Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 327016

Summary: JSP Editor doesn't edit file with XML extension even when opened in JSP editor
Product: [WebTools] WTP Source Editing Reporter: nathan.good
Component: jst.jspAssignee: jst.jsp <jst.jsp-inbox>
Status: CLOSED DUPLICATE QA Contact: Nick Sandonato <nsand.dev>
Severity: normal    
Priority: P3 CC: thatnitind
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description nathan.good CLA 2010-10-05 10:52:42 EDT
Build Identifier: 20100917-0705

If I explicitly open a file in the JSP editor, I would expect the file to be treated as JSP contents no matter what the extension (seems to be a valid user case since I am explicitly invoking a chosen editor on the file).  In this case, I open a file with an XML extension (that is a valid JSP file) and the Java syntax highlighting, JSP syntax highlighting, and features such as code completion do not work.

Reproducible: Always

Steps to Reproduce:
1.  Take a JSP file and change .jsp extension to .xml
2.  Right-click on file in Eclipse and use Open With > JSP Editor
3.  File is not treated as JSP contents.
Comment 1 Nick Sandonato CLA 2011-10-11 17:32:34 EDT
I'm resolving this as a duplicate of Bug 320996 largely because the idea is the same. We're not opening a file with the explicitly chosen editor. It just happens to be the case here that XML has a defined content type. But, the end fix should result in the appropriate solution for this bug as well.

*** This bug has been marked as a duplicate of bug 320996 ***