Bug 324671 - [exceptions] IllegalArgumentException editing js file
Summary: [exceptions] IllegalArgumentException editing js file
Status: NEW
Alias: None
Product: JSDT
Classification: WebTools
Component: General (show other bugs)
Version: 3.2   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: Future   Edit
Assignee: Chris Jaun CLA
QA Contact: Chris Jaun CLA
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2010-09-07 12:42 EDT by Michael Rennie CLA
Modified: 2013-06-19 11:10 EDT (History)
1 user (show)

See Also:


Attachments
js file (118.98 KB, application/javascript)
2010-09-07 12:42 EDT, Michael Rennie CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Rennie CLA 2010-09-07 12:42:03 EDT
Created attachment 178340 [details]
js file

build id: 20100813105432

After making an edit in a JS file and then saving (after the NPE from the validator) I got the following exception in the log:

java.lang.IllegalArgumentException
	at org.eclipse.wst.jsdt.core.dom.ASTNode.setSourceRange(ASTNode.java:2490)
	at org.eclipse.wst.jsdt.core.dom.ASTConverter.convert(ASTConverter.java:1016)
	at org.eclipse.wst.jsdt.core.dom.ASTConverter.convert(ASTConverter.java:1480)
	at org.eclipse.wst.jsdt.core.dom.ASTConverter.convert(ASTConverter.java:734)
	at org.eclipse.wst.jsdt.core.dom.ASTConverter.convert(ASTConverter.java:1417)
	at org.eclipse.wst.jsdt.core.dom.ASTConverter.convertToVariableDeclarationFragment(ASTConverter.java:2637)
	at org.eclipse.wst.jsdt.core.dom.ASTConverter.convertToVariableDeclarationStatement(ASTConverter.java:2662)
	at org.eclipse.wst.jsdt.core.dom.ASTConverter.checkAndAddMultipleLocalDeclaration(ASTConverter.java:317)
	at org.eclipse.wst.jsdt.core.dom.ASTConverter.convert(ASTConverter.java:1142)
	at org.eclipse.wst.jsdt.core.dom.JavaScriptUnitResolver.convert(JavaScriptUnitResolver.java:262)
	at org.eclipse.wst.jsdt.core.dom.ASTParser.internalCreateAST(ASTParser.java:887)
	at org.eclipse.wst.jsdt.core.dom.ASTParser.createAST(ASTParser.java:647)
	at org.eclipse.wst.jsdt.internal.ui.javaeditor.ASTProvider$1.run(ASTProvider.java:581)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.wst.jsdt.internal.ui.javaeditor.ASTProvider.createAST(ASTProvider.java:574)
	at org.eclipse.wst.jsdt.internal.ui.javaeditor.ASTProvider.getAST(ASTProvider.java:509)
	at org.eclipse.wst.jsdt.internal.ui.viewsupport.SelectionListenerWithASTManager$PartListenerGroup.calculateASTandInform(SelectionListenerWithASTManager.java:150)
	at org.eclipse.wst.jsdt.internal.ui.viewsupport.SelectionListenerWithASTManager$3.run(SelectionListenerWithASTManager.java:135)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

The attached file is the one I was editing, as linked source from within a JS project.

Steps

1. create a js project (say P1)
2. have the attached source in another project (say P2) in a subfolder 
3. add P2 as an externally linked folder from the include path property page for P1.
4. open and edit the attached file, then save.
Comment 1 Chris Jaun CLA 2010-09-16 10:05:31 EDT
I could not reproduce this, though I'm not clear if I followed your steps correct.

As a externally linked source folder I added the entire project P2 to the include path of P1.

Then I opened the linked version of the JS file from P1 and, added some text, and saved.

Anything else I need to do? What was the NPE you spoke about?