facebook

Unable to use Autocomplete in JSPs [Closed]

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #210416 Reply

    OS : W2K
    Eclipse : 3.0RC2
    Eclipse Fresh Installed for MyEclipse : Yes
    External Plugins : No
    MyEclipse Version : 3.7.101
    JDK : 1.4

    Hello,

    I had this problem before, in previous versions of MyEclipse, And I was hoping that in later versions (like this one) would be fixed.

    The problem is in the JSPs. Im unable to use the Autocomplete Feature; The Steps are the folowing:

      1) Create a new Web-Module Project [File -> NewProject -> J2EE -> WebModuleProject]
      2) Below WebRoot Create a new JSP [Default JSP Template]
      3) Insert a Line in the first Scriptlet [Before String path = request.getContextPath();]
      4) In that line write java. (with the dot) then hit CTRL-SPACE
      5) Nothing Happens!!

    Thanks your your Help.

    Alejandro

    #210419 Reply

    Riyad Kalla
    Member

    Alejandro,
    I agree that this action should allow completion, I will file a bug with this. However, what are you trying to complete? Instead of fully qualifying the class name (which it looked like you were trying to do) using the class name itself, for example “ArrayList” will offer autocomplete and auto-importing just fine. I think the reason that we never noticed this is because its outside the bounds of typical usage (which is what usually uncovers the bugs so quickly when we release).

    I can’t promise this will make it into 3.8 GA, but I hope the workaround I provided will help you continue using our tool.

    #210458 Reply

    What I was trying to do was to use a class that is in the project library; I mean that the project in its configuration (Java Build Path -> Libraries) have a custom Library; and I wanted to use the autocompletion for that Library.

    First Try: I used the plain myclass. and nothing happens.

    Second try: I tried ArrayList. CTRL-SPACE and it worked.

    Third Try: I tried mypackage. CTRL-SPACE and nothing happens.

    Fourth Try: I tryed mypackage.myclass ob = new mypackage. CTRL-SPACE and nothing Happens.

    Fifth Try: I tried mypackage.myclass ob = new mypackage.myclass() ; ob. and it Worked!

    Sixth Try:
    Added <@ page import=”mypackage.*”> to the Header of the JSP.
    Tried: mypackage. CTRL-SPACE and Nothing Happens.

    Seventh Try:
    Added <@ page import=”mypackage.*”> to the Header of the JSP.
    Tried: myclass CTRL-SPACE and it Works as Spected!!. It shows a List with the posibilities of myclass. Allowing me to select mypackage.myclass. Then the IDE adds a new Header to the page to include mypackage.myclasss class.

    Conclusion:
    I was able to work arround the Autocomplete 😀

    I hope this post helps identifying the fix.

    Saludos

    Alejandro

    #210472 Reply

    Riyad Kalla
    Member

    Alejandro,
    Actually if you had just used “MyClass” from the beginning… not only would autocomplete work, it would have added the import for your automatically 😉

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Unable to use Autocomplete in JSPs [Closed]

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