facebook

JSP warning / reconciler question

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #213086 Reply

    Neissware
    Member

    Hi,

    I just updated to 3.8.1 and rebuild one of the JSP projects. I started to modify a JSP-file but the code completion did not work. It did not matter if I changed an import or a piece of code. Bug or feature? Setup – issue?

    The last milestone release showed the Warning icon at JSP-files in the Package Explorer View if there were unused imports. 3.8.0 worked well, 3.8.1 does not – bug or feature? JSP validation is switched on … anything else?

    As I noticed yesterday (3.8.0) the message reporting an unused import within my JSP was wrong – in 3.8.1 it’s better but still wrong.

    3.8.0 always reported that the _FIRST_ import is not used and the file this happened was the class which was included by the import-statement (should have been the JSP-File). The causing import was later in the import list.

    3.8.1 fixed the issue but the reported file is still incorrect. The first imported class is reported as the bad guy.

    Any help is welcome … or do you need more info 😉 ?

    Regards
    #arald

    #213098

    Riyad Kalla
    Member

    Arald,
    Can you provide a small sample page or pages that exhibit this behavior? Are your imports from the same page you are editing or from an included page?

    #213152

    Neissware
    Member

    Good morning ..

    I started a full rebuild of all projects and guess what … code completion is working (as far as I was able to check it until now). Strange!

    But the warning icons and the strange behaviour with the imports is still there.

    I made a very simple example for you:

    <%--
     $Id$
    --%>
    <%@ page  language    = "java"
              contentType = "text/html"
              errorPage   = "ErrorPage.jsp"
              session     = "true"
              import      = "java.util.Vector"
              import      = "java.util.ResourceBundle"
    %><%
    System.out.println("TEST");
    %>
    <html>
        <head>
            <title>TEST</title>
        </head>
        <body>
            <pre>TEST</pre>
        </body>
    </html>
    <%!
        public    void    test()
        {
            System.out.println("TEST");
        }
    %>
    

    That’s the jsp. The file is not marked with a warning and if you open it, the following hints are shown if you move the mouse over the marker on the right side:

    Multiple annotations found at this line:
    – The import java.util.ResourceBundle is never used (in file: “java.util.Vector”)
    – The import java.util.Vector is never used (in file: “java.util.Vector”)

    If you like I can sent a screenshot …

    CU
    harald

    #213214

    Scott Anderson
    Participant

    Harald,

    The file is not marked with a warning and if you open it, the following hints are shown if you move the mouse over the marker on the right side:

    Multiple annotations found at this line:
    – The import java.util.ResourceBundle is never used (in file: “java.util.Vector”)
    – The import java.util.Vector is never used (in file: “java.util.Vector”)

    This is actually the designed functionality at this point. We don’t permanently mark warning messages on the file on purpose, just errors so it’s obvious what really needs your attention. However, the warnings are provided by the editor’s reconciler as a convenience while you’re editing the file, just in case you want to address the issue at that point. Or not.

    #213226

    Neissware
    Member

    Hmmm … so it’s by design. I liked it – is there a way to switch it on again?

    Right. The code completion issue is back again – I’m sorry. As far as we worked it out you have to rebuild to project to make it work – but one problem remains. It does not work while defining an import. Design as well ??

    Regards
    Harald

    #213230

    Scott Anderson
    Participant

    Hmmm … so it’s by design. I liked it – is there a way to switch it on again?

    I filed an enhancement request to make it optional.

    It does not work while defining an import. Design as well ??

    Code completion on imports is a known problem when nothing has been typed and will be addressed in a subsequent release or quick fix. The current workaround to get code assist in this instance is to type the first letter of the attribute you want, that is:

    
    <%@ p|   <-- ctrl+space shows page
    

    Likewise, typing the ‘i’ and asking for assist will display “import”.

    #213233

    Neissware
    Member

    Ups – little misunderstanding! Sorry, I think I was not very precise about the remaining code completion issue.

    <%@ page language="java"
               :
               import = "java.util.  <- here I'd like to have the lists of available classes
               :
    %>
    

    Better ???

    Regards
    Harald

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: JSP warning / reconciler question

You must be logged in to post in the forum log in