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

Failures at processing compilation units excluded from class path

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 3.3.0.Beta1
    • 3.3.0.M5
    • cdi, common
    • None

      1. Build
      EXECUTE: Create a CDI (can be JSF2 or Seam project as well).
      EXECUTE: Create a bean class in Java Source folder 'src'.
      ASSERT: File .classpath has entry

      <classpathentry kind="src" path="src"/>
      

      EXECUTE: Rebuild the project and make sure that everything is alright yet.
      EXECUTE: Open project properties -> Java Build Path -> Source, select and expand Java Source folder in question, navigate to the node 'Excluded (None)', run 'Edit...' and add exclusion pattern "**".
      ASSERT: File .classpath has entry

      <classpathentry excluding="**" kind="src" path="src"/>
      

      EXECUTE: Run Clean/Build of the project.
      FAILURE: Java Model Exception (attached).

      2. Validation
      EXECUTE: Create a CDI project.
      EXECUTE: Create a named bean 'abc' in class Test1 and reference it in EL in class Test2:

      String s = "#{abc.xyz}
      

      where 'xyz' is missing in properties/members of the bean.
      ASSERT: On build and and validation, 'xyz' is marked as an error.
      EXECUTE: Add class Test2 to patterns excluded from the class path of the project.
      ASSERT: Marker is removed from the Test2 file without any failures.
      FAILURE: Java Model Exception.

      3. Hyperlinks
      EXECUTE: Repeat steps of item 2.Validation.
      EXECUTE: Try open-on at 'xyz'.
      ASSERT: No option is found. No failures.
      FAILURE: Java Model Exception.

      4. Hover
      EXECUTE: Repeat steps of item 2.Validation.
      EXECUTE: Put mouse over 'abc' and wait for hover.
      ASSERT: Hover text about bean 'abc' should appear
      FAILURE: NullPointerException

      java.lang.NullPointerException
      	at org.jboss.tools.jst.jsp.jspeditor.info.JavaStringELInfoHover.getHoverInfo2(JavaStringELInfoHover.java:253)
      	at org.eclipse.jdt.internal.ui.text.java.hover.BestMatchHover.getHoverInfo2(BestMatchHover.java:142)
      	at org.eclipse.jdt.internal.ui.text.java.hover.JavaEditorTextHoverProxy.getHoverInfo2(JavaEditorTextHoverProxy.java:85)
      	at org.eclipse.jface.text.TextViewerHoverManager$4.run(TextViewerHoverManager.java:166)
      

      Note: Hyperlinks and Hover work in JDT for excluded files as for regular files; we should provide the same when existing model element is referenced from an excluded file.

        1. Exception.txt
          3 kB
          Viacheslav Kabanovich

            scabanovich Viacheslav Kabanovich (Inactive)
            scabanovich Viacheslav Kabanovich (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: