facebook

Warnings don’t always appear

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

    tbrantb
    Member

    I have a jsp file. The first 2 lines of the jsp file are uneccesary imports.
    Sometimes I get these as warnings. Sometimes i don’t. Usuaully I get the warning if there is some other error on the page, but not always. Any clues why it doesn’t always show me this warning.

    Also, shoul I have to save the file before errors/warnings go away. I have to on JSP files, but I do not have to on java files.

    Thanks

    #197705 Reply

    Scott Anderson
    Participant

    I have a jsp file. The first 2 lines of the jsp file are uneccesary imports. Sometimes I get these as warnings. Sometimes i don’t.

    That’s interesting. Can you replicate a small test case and a set of steps that always show the behavior?

    Also, shoul I have to save the file before errors/warnings go away.

    Yes, you have to save the file. This is because the JSP compiler must be invoked to determine what the errors are and it is automatically run with the file is saved. The Java compiler and editor work a little differently. The Java editor does a realtime syntax analysis while you type and then can perform incremental compilation on save.

    One other thing to watch out for is that if you change Java code upon which JSP’s depend, right now the JSP’s are not automatically recompiled. We’ll be updating our file dependency model in a subsequent release, but right now it’s safest to right-click on the project and select ‘Recompile All JSP’s’ as a final check before deployment if you’ve been doing any heavy modifications.

    –Scott
    MyEclipse Support

    #197727 Reply

    tbrantb
    Member

    Here is a jsp:

    <%@ page language=”java”%>
    <%@ page import = “java.util.*” %>

    <html>
    <head>
    <title>title</title>
    </head>

    <body>
    <%=”Hello World”%>
    </body>
    </html>

    Notice the java.util.* is unused.

    I do not get the warning that jata.util.* is unused unless some other error arises on the page.

    For instance:

    <%@ page language=”java”%>
    <%@ page import = “java.util.*” %>

    <html>
    <head>
    <title>title</title>
    </head>

    <body>
    <%=”Hello World”%>
    <%=foo%>
    </body>
    </html>

    foo is never defined, so I get the error “foo cannot be resolved” (As expected) and the warning “The import java.util is never used”. (As expected)

    Just stuck me as odd that I only get the warning if there is some other error in the code.

    #197732 Reply

    support-michael
    Keymaster

    Thanks for the report and example code. I can not think of a 1st principal explanation for this behavior. I have entered your report into our issues tracking system for further research. We’ll keep you posted on what we find out.

    Regards,

    Michael
    MyEclipse Support

    #197760 Reply

    No Operation
    Member

    if there are errors, you notice an additional message in the progress monitor – something with … AST …

    Perhaps coincidence with those warnings?

    NOP

    #209173 Reply

    Olov_Felton
    Member

    Did you ever find a solution to this problem, warnings only showing up in jsp when there are errors? I am wondering as I have this exact problem with Eclipse 3.0 and MyEclipse 3.8 Beta-1. And it gets booring to always have to add something like foo = bar; to see the warnings…

    /Olov

    #209175 Reply

    support-michael
    Keymaster

    I just confirmed that the fix for this problem is already in the beta-2 codestream and will be available in the next release.

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: Warnings don’t always appear

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