History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEADEV-8425
Type: Usability Problem Usability Problem
Status: Open Open
Priority: Normal Normal
Assignee: Nikolay Chashnikov
Reporter: Sascha Weinreuter
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
IDEA: Development

Extract Include File in JSPX should add required imports

Created: 17 Aug 06 18:29   Updated: 15 Oct 08 10:31
Component/s: J2EE.JSP, Refactoring
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown

Build: 5,622
Severity: Medium


 Description  « Hide
Though technically not required for a statically imported file, it screws up the editing for include files that are otherwise self-contained (i.e. which don't depend on the context from where they're included).
Before
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
          xmlns="http://www.w3.org/1999/xhtml"
          version="2.0">

<jsp:directive.page import="java.text.SimpleDateFormat"/>
<jsp:directive.page import="java.util.Date"/>

<jsp:scriptlet>
    String s = SimpleDateFormat.getDateInstance().format(new Date());
</jsp:scriptlet>
</jsp:root>
After
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
          xmlns="http://www.w3.org/1999/xhtml"
          version="2.0">

<jsp:directive.page import="java.text.SimpleDateFormat"/>
<jsp:directive.page import="java.util.Date"/>

<jsp:directive.include file="/include.jspx"/>

</jsp:root>
Included File
<jsp:root version="2.0" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:="http://www.w3.org/1999/xhtml">
<jsp:scriptlet>
    String s = SimpleDateFormat.getDateInstance().format(new Date());
</jsp:scriptlet>
</jsp:root>


 All   Comments   Work Log   Change History      Sort Order:
Sascha Weinreuter - 17 Aug 06 18:30
Not really a bug...

Eugene Vigdorchik - 17 Aug 06 18:32
While I agree this should be done, technically we can't do it now.