facebook

vars defined by tags not recognized [Closed]

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 12 posts - 16 through 27 (of 27 total)
  • Author
    Posts
  • #213406 Reply

    rshan
    Member

    No effect.

    #213427 Reply

    Riyad Kalla
    Member

    rshan I appologize, when I originally tried your test case I didn’t create it correctly, I created a new sample test project and was able to reproduec the problem you are seeing. I will report it with a high priority and see if we can get it fixed by the next quickfix release.

    #214172 Reply

    Olov_Felton
    Member

    Could you give us an estimate of how long it will be before you have been able to correct this bug?
    I have a common start tag on all my jsp pages that sets some initial variables, and this error gives me a LOT of “errors”, so many that myEclipse uses my entire processor just to track them. Therefor I would love an estimate on how long I must wait before I can use your wonderful program to its fullest again.

    #214179 Reply

    Robert Varga
    Participant

    @support-rkalla wrote:

    bort,
    I was able to duplicate this but the odd part is that I didn’t see any validation warnings until I enabled the HTML validator. But after disabling it I was still getting the warnings… it seems that we aren’t turning off the validator correctly.

    I’ve added your comments to the bug that will hopefully make it into a service release ASAP.

    I guess it might not necessarily be the turning off of the validator, but rather removing the error messages from the errors list, which is having a bug. This was occuring also in relation with jsp compilation, with jsp errors not being cleared from the errors list when they should have been.

    Regards,

    Robert

    #214186 Reply

    Riyad Kalla
    Member

    Olov,
    I checked on this bug and we are hoping to get it into 3.8.2 that should be out in a couple of weeks *however*, the bug I have filed is related to the JSP reconciler (error markers on RIGHT margin) being incorrect… I am not aware of compiler errors (LEFT margin)… and the compiler errors are what is displayed in your problem view, not the reconciler errors.

    Are these all RIGHT or LEFT hand errors? We use Jasper2 (Tomcat’s JSP compiler) to compile the JSP pages, so if you are seeing full on compile errors (LEFT margin) then you really do have errors in your pages… if they are just RIGHT margin errors from the reconciler then it should be harmless but slightly annoying.

    Which one are you seeing?

    #214212 Reply

    Olov_Felton
    Member

    MyEclipse 3.8.1+QF20040825
    I have no left margin markers at all on JSP files, this as I understand it a known bug.

    I have markers on the right side, and a red line under the “problematic code”, and if I hover over the place where the markers would have been on the LEFT side, I get a tooltip stating: “xxx cannot be resolved”, the same as I get from the right side where I do have the marks.

    I do not get ANY problems displayed in the Problems view, no matter what the problem is on JSP files, problems in java files are reported correctly.

    I run these pages on Tomcat 5.0.12 without any problems at all.

    My problem is that as the variables declared in my jsp tags are used a lot on the page as son as I change anything, MyEclipse uses all processor power and becomes unusable, for about 20s.

    /Olov

    #214215 Reply

    Riyad Kalla
    Member

    I have no left margin markers at all on JSP files, this as I understand it a known bug.

    Its only a bug if you actually have errors in your JSP pages and they aren’t showing up? If you do then the way to fix that is to add a -vm argument to your Eclipse short cut and point it at a JDK install, NOT a JRE install… so something like:

    
    eclipse.exe -vm c:\j2sdk1.4.2_04\bin\javaw.exe -vmargs -Xmx256m
    

    The reason for this is that since we use Jasper2 now as our compiler, we actually need access to a JDK to run the “validator” which compiles the JSP page. Without access to that compiler, the validation just dies and shows nothing. We are going to make this more user friendly here soon.

    I have markers on the right side, and a red line under the “problematic code”, and if I hover over the place where the markers would have been on the LEFT side, I get a tooltip stating: “xxx cannot be resolved”, the same as I get from the right side where I do have the marks.

    The ghost-errors on the left side is a known problem, we will fix that.

    I do not get ANY problems displayed in the Problems view, no matter what the problem is on JSP files, problems in java files are reported correctly.

    Try that fix I talked about that the top, this should take care of it.

    My problem is that as the variables declared in my jsp tags are used a lot on the page as son as I change anything, MyEclipse uses all processor power and becomes unusable, for about 20s.

    This is certainly not acceptable… when you say “change anything” what do you mean? You edit the JSP? You refactor a class? etc…

    #214320 Reply

    Olov_Felton
    Member

    after adding a -vm argument to my eclipse startup i now get errors in JSP files reported in my problem view, and i get markers on the LEFT side aswell as RIGHT side. (warnings for JSP files still do not show up in problems view)

    The “errors” I still have are variables declared in jsp tags does not seem to be recognised by the editor indicated by four things
    1. On the RIGHT side, I have a small red bar (hovering gives me “xxx cannnot be resolved”)
    2. A red underlining of “probematic” variable (hovering gives nothing)
    3. An invisiable error marking on the LEFT side (hovering gives me “xxx cannot be resolved”)
    4. Code completion does not work on the “problematic” variable (do not get class functions etc)
    No error is reported in the Problems view for these unrecognised variables.
    The JSP runs without anny problem on Tomcat 5.0.12
    Is this a correct description of “the reconciler errors” that you talked about in an earlier post?

    As I have a number of common variables declared in a common jsp tag, as soon as I change any java code in the JSP page MyEclipse seems to reevaluate the “errors” I described in point 1-4, wich uses all avaliable processor power and makes the program slugish to unusable, for about 20s. The problem with slughishness is in JSP pages with about 1500 lines of code with a few hundred occurences of the variables declared in the JSP tag. I am redoing the entire page design moving most code out to external classes and tags which will reduce my problem to a sligt annoyance as decsribed above in 1-4.

    #214339 Reply

    Riyad Kalla
    Member

    Olov,
    The problems in the LEFT side are actually from the Jasper2 compiler, so if you are seeing errors there, that means you have legit errors… BUT as you mentioned it runs fine in Tomcat, which hsa me stumped.

    Can you give me an example of an error, where the var is defined and how the page uses it? I want to try and reproduce it locally.

    The reconciler (RIGHT margin) errors are just annoying, but we aren’t aware of any full-on incorect LEFT errors in ME since this just uses Jasper2 to generate them.

    #214375 Reply

    Olov_Felton
    Member

    Ok, this is a small example:
    In my tld file:
    <tag>
    <name>testtag</name>
    <tagclass>xx.xxx.tag.TestTag</tagclass>
    <teiclass>xx.xxx.tag.TestTagExtraInfo</teiclass>
    </tag>
    code for TestTag:
    package xx.xxx.tag;
    import javax.servlet.jsp.tagext.TagSupport;
    public class TestTag extends TagSupport {
    StringBuffer testString = new StringBuffer();
    public int doStartTag() {
    testString.append(“This is a test message from TestTag”);
    pageContext.setAttribute(“testString”, testString);
    if(true) {
    return SKIP_BODY;
    }else {
    return EVAL_BODY_INCLUDE;
    }
    }
    }

    Code for TestTagExtraInfo:
    package xx.xxx.tag;
    public class TestTagExtraInfo extends TagExtraInfo {
    public VariableInfo[] getVariableInfo(TagData data) {
    return new VariableInfo[] {
    new VariableInfo(“testString”, “java.lang.StringBuffer”, true, VariableInfo.AT_BEGIN)
    };
    }
    }

    JSP page:
    <%@ page language=”java” import=”java.util.*” %>
    <%@ taglib uri=”/WEB-INF/xxx.tld” prefix=”xx” %>
    <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”>
    <html>
    <head>
    </head>
    <body>
    <xx:testtag>
    test body
    </xx:testtag>
    <%
    testString.append(“<br> new testline”);
    out.print(testString.toString());
    %>
    </body>
    </html>

    running this example gives me “errors” descibed in point 1-4 in earlier post, please note that in point 3 it is an INVISIABLE error on the LEFT side but that I get a tooltip when hoovering the mouse pointer where the error mark would have been. Also codecompletion does not work on “problematic” variable.

    #214442 Reply

    Riyad Kalla
    Member

    Olov,
    I noticed the line

    <%@ taglib uri=”/WEB-INF/xxx.tld” prefix=”xx” %>

    What URI do you have setup for this TLD in the web.xml file? Keep in mind that the URI is not a URL (locator) it is an identifier. Unless you are using the default URI defined in the taglib file (<uri> tags at the top) then you need to have a valid mapping for your TLD in your web.xml file.

    I just opened up a project that has A LOT of custom taglibs in it and had autocomplete, compilation and validation work fine, but the key is valid web.xml taglib mappings.

    #216439 Reply

    Riyad Kalla
    Member

    Fixed in 3.8.2.

Viewing 12 posts - 16 through 27 (of 27 total)
Reply To: vars defined by tags not recognized [Closed]

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