Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-16135

EL Content Assist in Java Editor: Make Content Assistant Additional Info window support URLs.

XMLWordPrintable

      EL could be used in String values in Java classes, so the same Additional Info is to be shown for Content Assist in Java Editor as well as in Tooltips (Hovers).

      There are two kinds of links which we should support:
      1. External HTML links (<a href="http://..."> or <a href="https://...">). Such links are supposed to be opened in the default web browser:

      Note: we don't have such links in our content assist. This screenshot is just an example how it will look like if we add any <a> to a description message.

      2. Internal links to JavaElement (used in JSF EL). It works in the same way as Eclipse JDT content assist does. Such links are supposed to be opened in SWT web browser (in the same description window):

      3. Links and Java-like Additional Info in Java Editor (for ELs in Java Strings):

      4. Same look and functionality for Tooltips (Hovers) in Java and JBossTools Editors:

      Steps to test:

      1. Make sure JDK sources are available in Eclipse
      2. Create a JSF 2 KickStart project.
      3. Open greeting.xhtml
      4. Type #{user.name.l and press Ctrl+Space
      5. Select length
      6. There should be a description dialog with java element links to length() and CharSequence:

      EL Content Assist in Java Strings:

      7. Use the project created at steps 1-2.
      8. Open User.java.
      9. Reveal String getName() method and add the following line before the return statement:

      String x = "#{user.}";

      10. Set the text cursor after 'user.' and press Ctrl-Space
      11. Select 'name'
      12. There should be a description dialog with java element links to package 'demo', classes 'String' and 'User', and methods 'getName()' and 'setName()'

      Tooltips in Java Editor:

      13. Apply the 'name' proposal.
      14. Point the mouse cursor over 'name' in EL and wait for a second.
      15. There should be a hover dialog opened with java element links to package 'demo', classes 'String' and 'User', and methods 'getName()' and 'setName()'.

      Tooltips in JBoss Editors:

      16. Open inputname.xhtm
      17. Reveal '#{user.name}' EL in editor.
      14. Point the mouse cursor over 'name' in EL and wait for a second.
      15. There should be a hover dialog opened with java element links to package 'demo', classes 'String' and 'User', and methods 'getName()' and 'setName()'.

        1. el-ca-add-info-javaeditor.png
          149 kB
          Victor Rubezhny
        2. hover-javaeditor.png
          156 kB
          Victor Rubezhny
        3. hover-xhtmleditor.png
          186 kB
          Victor Rubezhny
        4. html.png
          69 kB
          Victor Rubezhny
        5. javadoc.png
          73 kB
          Victor Rubezhny

            vrubezhny Victor Rubezhny (Inactive)
            vrubezhny Victor Rubezhny (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: