[jbosstools-issues] [JBoss JIRA] (JBIDE-10601) Failures at processing compilation units excluded from class path

Viacheslav Kabanovich (Commented) (JIRA) jira-events at lists.jboss.org
Tue Jan 10 21:13:11 EST 2012


    [ https://issues.jboss.org/browse/JBIDE-10601?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12655036#comment-12655036 ] 

Viacheslav Kabanovich commented on JBIDE-10601:
-----------------------------------------------

We have to rebuild project when 'excluded' attribute for a class path entry is changed. The most safe solution is to clean/build the project, but since we try to reuse as much declarations as possible even at class path changes, I followed the same way. When a Java file is excluded, only event on class path change is sent, and build delta for the project does not mention that file as removed, which means that our validation cannot reevaluate dependent files; and probably after such modifications there is no way for user but to do clean/build manually. But at least we avoid failures.
                
> Failures at processing compilation units excluded from class path
> -----------------------------------------------------------------
>
>                 Key: JBIDE-10601
>                 URL: https://issues.jboss.org/browse/JBIDE-10601
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: CDI, common/jst/core
>    Affects Versions: 3.3.0.M5
>            Reporter: Viacheslav Kabanovich
>            Assignee: Viacheslav Kabanovich
>            Priority: Critical
>             Fix For: 3.3.0.Beta1
>
>         Attachments: Exception.txt
>
>
> 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
> {code}
> <classpathentry kind="src" path="src"/>
> {code}
> 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
> {code}
> <classpathentry excluding="**" kind="src" path="src"/>
> {code}
> 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:
> {code}
> String s = "#{abc.xyz}
> {code}
> 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
> {code}
> 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)
> {code}
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list