facebook

Editing .tld requires closing MyEclipse

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #225198 Reply

    wseubert
    Member

    MyEclipse 3.8.4

    I am in the process of creating a custom tag library. Everything works great except I have to close and restart Eclipse after editing the .tld for the changes to take effect.

    If I try to use the newly added tags I get a compile error. Nothing seems to help. I tried cleaning the project and refreshing the project.

    It would be really nice not to have to restart Eclipse.

    If you need any more info, just let me know…

    #225208 Reply

    Riyad Kalla
    Member

    We are aware of the issue (I ran into it a while ago) and it just seems to be some aggressive caching down in the depths of MyEclipse w.r.t. to the taglibs that isn’t getting cleaned out. We are looking into improving that in a future release, sorry for the inconvenience.

    #225213 Reply

    wseubert
    Member

    No problem, just try to make a good product better…

    #225867 Reply

    amesdk
    Member

    MyEclipse 3.8.4

    I, too, am developing a custom tag library. I’ve found that most of my update issues are addressed when I close, then open the project. I can live with this. What’s driving me nuts, though, is the indication that a setter can’t be detected for a given attribute. It doesn’t indicate all attributes, and I can’t seem to determine a pattern:

    <diw:text labelText="Test1" uniqueName="datest" otherValidation="whynot" dumb="why" rqfield="true"/>

    ‘uniqueName’, ‘labelText’, and ‘otherValidation’ do not get flagged by the editor. But, ‘dumb’ and ‘rqfield’ are flagged, indicating that no ‘setter’ may be found. The only required attribute of the bunch is ‘labelText’. In any case, Tomcat seems to be able to find the appropriate accessor methods. Help!

    Taghandler:

    
     /*
     * Created on Feb 25, 2005
     *
     * To change the template for this generated file go to
     * Window>Preferences>Java>Code Generation>Code and Comments
     */
    package com.ibm.diw.tags;
    
    import javax.servlet.jsp.tagext.*;
    import java.io.*;
    import javax.servlet.jsp.*;
    
    /**
     * @author darin2
     *
     * To change the template for this generated type comment go to
     * Window>Preferences>Java>Code Generation>Code and Comments
     */
    public class HTMLInputText extends TagSupport
    {
        private String uniqueName = "";
        private String rqfield = "";
        private String labelText = "";
        private String otherValidation = "";
        private String dumb = "";
        
        public int doStartTag()
        {
            try
            {
                JspWriter out = pageContext.getOut();
                out.print("<td>");
                if(this.getRqfield().equals("true"))
                {
                    out.print("*");
                }
                out.print("</td>");
                out.print("<td>");
                out.print(getLabelText());
                out.print("</td>");
                out.print("<td>");
                out.print("<input type=\"text\" name=\""+getUniqueName()+"\" />");
                out.print("</td>");            
            }
            catch(IOException ioe)
            {
                System.out.println("Error in ExampleTag: " + ioe);
            }
            return(SKIP_BODY);
        }
        
        public void setUniqueName(String s)
        {
             this.uniqueName = s;
        }
    
    //    public void setRqfield(String s)
    //    {
    //        if(s.equalsIgnoreCase("true")||s.equalsIgnoreCase("yes")||s.equals("1"))
    //        {
    //            this.rqfield = "true";
    //        }
    //    }
        public String getLabelText()
        {
            return this.labelText;
        }
        public void setLabelText(String labelText)
        {
            this.labelText = labelText;
        }
        public String getOtherValidation()
        {
            return this.otherValidation;
        }
        public void setOtherValidation(String otherValidation)
        {
            this.otherValidation = otherValidation;
        }
    //    public String getRqfield()
    //    {    
    //        return this.rqfield;
    //    }
        public String getUniqueName()
        {
            return this.uniqueName;
        }
        public String getDumb()
        {
            return this.dumb;
        }
        public void setDumb(String dumbfield)
        {
            this.dumb = dumbfield;
        }
        public String getRqfield()
        {
            return this.rqfield;
        }
        public void setRqfield(String rqfield)
        {
            this.rqfield = rqfield;
        }
    }
    
    #225872 Reply

    amesdk
    Member

    Well…. appears that a close and open of the ide has cured my problem. Still, the close and open of the project appears to pick up any tld changes. Again, I can live with this. Thanks.

    #225874 Reply

    Riyad Kalla
    Member

    Have you tried closing your project, restarting MyEclipse and rebuilding the project? I have found that while closing/reopening a project does help sometimes with cached TLD values, it doesn’t help all the time and still leaves me with errors, so I have to restart and rebuild to get it to stop.

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: Editing .tld requires closing MyEclipse

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