Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 321621 - NPE in LazyJavaTypeCompletionProposal when files outside workspace
Summary: NPE in LazyJavaTypeCompletionProposal when files outside workspace
Status: RESOLVED FIXED
Alias: None
Product: JSDT
Classification: WebTools
Component: General (show other bugs)
Version: 3.0.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0.5 P   Edit
Assignee: Chris Jaun CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard:
Keywords:
Depends on: 306986
Blocks:
  Show dependency tree
 
Reported: 2010-08-03 11:45 EDT by Chris Jaun CLA
Modified: 2010-08-24 14:37 EDT (History)
0 users

See Also:
thatnitind: review+


Attachments
patch (2.62 KB, patch)
2010-08-03 11:53 EDT, Chris Jaun CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Jaun CLA 2010-08-03 11:45:06 EDT
+++ This bug was initially created as a clone of Bug #306986 +++

Getting an NPE at getFilePackage.

if (fImportRewrite != null) {
			String packageName=null;
			try {
				IJavaScriptElement javaElement = this.getProposalInfo().getJavaElement();
				 packageName=JavaModelUtil.getFilePackage(javaElement);
			} catch (JavaScriptModelException e) {
				JavaScriptPlugin.log(e);
			}
			return fImportRewrite.addImport(qualifiedTypeName,packageName, fImportContext);
		}
Comment 1 Chris Jaun CLA 2010-08-03 11:45:35 EDT
Same problem exists in 3.0.5. Need to backport fix.
Comment 2 Chris Jaun CLA 2010-08-03 11:53:21 EDT
Created attachment 175794 [details]
patch
Comment 3 Chris Jaun CLA 2010-08-24 14:37:16 EDT
In patch build.