Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 320370 - Moving a JavaScript function in the HTML Outline View causes a null pointer exception.
Summary: Moving a JavaScript function in the HTML Outline View causes a null pointer e...
Status: RESOLVED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.sse (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2.2   Edit
Assignee: Rakesh CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-20 06:02 EDT by Johannes Schade CLA
Modified: 2010-08-24 16:49 EDT (History)
4 users (show)

See Also:
nsand.dev: review+


Attachments
patch (995 bytes, patch)
2010-07-22 11:36 EDT, Rakesh CLA
nsand.dev: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Schade CLA 2010-07-20 06:02:41 EDT
Build Identifier: 20100617-1415

The Outline accompanying the JSP Editor displays the functions inside the SCRIPT HTML element. When trying to move a function the insertion line appears as it does on the Outline of the Java EDitor but when the function is dropped an error message pop up reading "An error has occurred. See error log for more details. java.lang.NullPointerException".
I have tried this with several document types and seems to occur with any of them.

Reproducible: Always

Steps to Reproduce:
1.Select the WebContent node in the Project Explorer.
2.Right-click to display the context menu.
3.On the context menu select New. This displays a submenu.
4. On the submenu select HTML File. This displays the New HTML File dialogue.
5. On the dialogue enter a file name.
6. Click Finish. This opens an editor with the automatically created HTML file stub and a corresponding Outline View.
7. Add a SCRIPT HTML element inside the HEAD element.
8. Enter two JavaScript functions inside the SCRIPT element. Provide some content such as an alert statement.
9. Save the file and close the editor (otherwise the script element on nthe Outline does not show the functions).
10 Open the editor again.
11. On the Outline extend the HTML node, then the HEAD node and finally the SCRIPT node to show the nodes representing the two functions.
12. Select the first function and try to move it under the second function. The line indicating the insertion position appears but you will get a null pointer error when releasing the mous button.
Comment 1 Rakesh CLA 2010-07-22 11:36:26 EDT
Created attachment 174993 [details]
patch

I have added a null pointer check.But it will not move functions, this functionality is not supported yet.
Comment 2 Nick Sandonato CLA 2010-08-24 16:49:34 EDT
Looks good.