facebook

Ctrl clicking on a custom tag with an include

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

    minhur
    Member

    I’m having trouble landing on the correct file when I do a Ctrl+click on a tag name.

    I’m basically trying to have two custom .tag files share the same taglib declaration.

    meaning, I have a taglib.jsp:

    <%@ taglib prefix="mytag" tagdir="/WEB-INF/tags/mytag"%>
    <%@ taglib prefix="mytag2" tagdir="/WEB-INF/tags/mytag2"%>
    <%@ taglib prefix="mytag3" tagdir="/WEB-INF/tags/mytag3"%>
    

    with this, the parent file ( parent.tag ) includes it so it doesn’t have to do 3 declarations.

    <%@ include file="/WEB-INF/pages/includes/taglib.jsp"%>
    <div>Parent</div>
    <mytag:child/>
    <mytag2:child2/>
    <mytag3:child2/>
    

    then the child tag file ( child.tag ) also includes the same jsp file, so it doesn’t have to do 3 declarations either

    <%@ include file="/WEB-INF/pages/includes/taglib.jsp"%>
    <div>Child</div>
    <mytag:child/>
    <mytag2:child2/>
    <mytag3:child2/>
    

    This works great and I end up with shared set of taglibs, which makes it easier when i need another custom tags.

    However, the Ctrl+click (open file under cursor) doesn’t seem to play nicely and when I try to jump to the child.tag from parent.tag, the editor opens taglib.jsp instead.

    In other words, when i’m under parent.tag, and I hold ctrl and hover over the child, trying to open child.tag, the editor opens up taglib.jsp because it picks up the include file.
    <mytag:child/> (Ctrl+Clicking while hover “child” opens taglib.jsp)
    The behavior I want is to open child.tag

    Is there a way to avoid this behavior?
    I’d like to keep the current standard of having variety of tag file share the same taglibs so I have the ability to add a taglib to all those tag files if i need to in the future.
    [/b]

    Maybe there’s an alternative to achieve the same effect?
    I’m open to suggestions.

    Thanks

    #310230 Reply

    minhur
    Member

    as an added note, ctrl+clicking works correctly when child.tag doesn’t have any includes.

    <div>Child</div>
    <mytag:child/>
    <mytag2:child2/>
    <mytag3:child2/> 

    which makes me wonder if this is a general bug, where ctrl+clicking any custom tag files with an <%@ include %> makes it open the included filed instead of the custom tag

    #310297 Reply

    minhur
    Member

    any thoughts?

    #310302 Reply

    minhur,
    Sorry for the delayed response. I could not replicate this at my end using ME8.6. Even with the <%@ include %> directive, ctrl+click on the <mytag:child> opens the appropriate .tag file.
    What is the version of MyEclipse that you are using?

    #310376 Reply

    minhur
    Member

    are you sure?
    i’ve tried this on a fresh project and I’m experiencing the same issue.

    on a fresh web project
    try creating a /WEB-INF/pages/include.jsp file:

    
    <div>include.jsp</div>
    

    then create a /WEB-INF/tags/foo.tag file:

    
    <%@ include file="/WEB-INF/pages/include.jsp"%>
    <div>Foo.tag</div>
    

    modify index.jsp to this:

    
    <%@ taglib prefix="tags" tagdir="/WEB-INF/tags"%>
    <html>
      <head></head>
      <body>
        <tags:foo></tags:foo>
      </body>
    </html>
    

    try ctrl+clicking on tags:foo, myeclipse will open include.jsp, not foo.tag

    now try removing the <%@ include file=”/WEB-INF/pages/include.jsp”%> from foo.tag.
    you’ll land on foo.tag.

    #310377 Reply

    minhur
    Member

    i’m using 8.6 btw

    #310413 Reply

    minhur,
    Thank you for the steps.
    I have raised a PR for this issue with the dev team.

    #310518 Reply

    minhur
    Member

    Thanks Shalini, does this mean it’s being considered as a bug?
    perhaps address in a future update?

    #313289 Reply

    minhur
    Member

    I was hoping this is fixed on beta 9 but it looks like it’s still happening.
    Any word on if and when this will get addressed?

    #316252 Reply

    minhur
    Member

    I’ve upgraded to the latest myeclipse 9 but the issue is still happening.
    Is it in the roadmap to fix this at all?
    Are there any workaround I can do to jump to the correct file as needed?

    #316275 Reply

    Brian Fernandes
    Moderator

    minhur,

    We do have this issue filed as a bug and it is being investigated right now. If possible it will be fixed in an upcoming maintenance release against MyEclipse 9.

    Sorry for the inconvenience caused, I will let you know when we have an update on this.

    #322811 Reply

    minhur
    Member

    a similar issue to this was fixed recently.
    https://www.genuitec.com/forums/topic/ctrl-clicking-on-custom-tag-is-not-working-with-latest-me9/#post-322810

    Are there any plans to fix this any time soon?

    #322951 Reply

    minhur
    Member

    was it reproducible? It’d be great if this gets fixed at some point as well.

Viewing 13 posts - 1 through 13 (of 13 total)
Reply To: Ctrl clicking on a custom tag with an include

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