Menu

#89 NPE thrown when using content assist on non-built files

closed
None
7
2007-11-21
2007-11-17
No

1. File > New > File
2. Select a .NET project as the container.
3. Create a .cs file like Test.cs.
4. Make sure that it's not on the build file being used for that project.
5. Add code into the file...

public class Test {

}

6. Put the cursor on the second line, type 'this.'.
7. An NPE will be thrown.

Caused by: java.lang.NullPointerException
at org.emonic.base.FileManipulators.NAntBuildfileManipulator.getTarget(NAntBuildfileManipulator.java:279)
at org.emonic.base.InfoStructure.CodeInformator.getTargetFiles(CodeInformator.java:647)
at org.emonic.base.InfoStructure.CodeInformator.getAllRelevantRoots(CodeInformator.java:186)
at org.emonic.base.InfoStructure.CodeInformator.getElementsCompletionForKeywordThis(CodeInformator.java:466)
at org.emonic.base.editors.CSharpCompletionProcessor.thisCompletion(CSharpCompletionProcessor.java:258)
at org.emonic.base.editors.CSharpCompletionProcessor.computeCompletionProposals(CSharpCompletionProcessor.java:96)
at org.eclipse.jface.text.contentassist.ContentAssistant.computeCompletionProposals(ContentAssistant.java:1612)

Discussion

  • Bernhard Brem

    Bernhard Brem - 2007-11-18

    Logged In: YES
    user_id=1245734
    Originator: NO

    Tried to fix in CVS. Can You approve the problem is solved?

     
  • Bernhard Brem

    Bernhard Brem - 2007-11-18
    • assigned_to: nobody --> bernhardbrem
     
  • Bernhard Brem

    Bernhard Brem - 2007-11-21

    Logged In: YES
    user_id=1245734
    Originator: NO

    Should be fixed

     
  • Bernhard Brem

    Bernhard Brem - 2007-11-21
    • status: open --> closed
     
  • Remy Chi Jian Suen

    Logged In: YES
    user_id=1299552
    Originator: YES

    > Tried to fix in CVS. Can You approve the problem is solved?

    This is fixed for the NAnt case but not the Ant case.

    Caused by: java.lang.NullPointerException
    at org.emonic.base.FileManipulators.AntBuildfileManipulator.getTarget(AntBuildfileManipulator.java:392)
    at org.emonic.base.InfoStructure.CodeInformator.getTargetFiles(CodeInformator.java:647)
    at org.emonic.base.InfoStructure.CodeInformator.getAllRelevantRoots(CodeInformator.java:186)
    at org.emonic.base.InfoStructure.CodeInformator.getElementsCompletionForKeywordThis(CodeInformator.java:466)
    at org.emonic.base.editors.CSharpCompletionProcessor.thisCompletion(CSharpCompletionProcessor.java:258)
    at org.emonic.base.editors.CSharpCompletionProcessor.computeCompletionProposals(CSharpCompletionProcessor.java:96)

     
  • Remy Chi Jian Suen

    • status: closed --> open
     
  • Bernhard Brem

    Bernhard Brem - 2007-11-21
    • status: open --> closed
     
  • Bernhard Brem

    Bernhard Brem - 2007-11-21

    Logged In: YES
    user_id=1245734
    Originator: NO

    OK. Fixed for ant, too.

     

Log in to post a comment.

MongoDB Logo MongoDB