This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 37188 - NPE on activvating top component from JSP module
Summary: NPE on activvating top component from JSP module
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: PC Linux
: P1 blocker (vote)
Assignee: Peter Zavadsky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-13 09:36 UTC by pzajac
Modified: 2008-12-22 15:57 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
exception stacktrace (1.43 KB, text/plain)
2003-11-13 09:37 UTC, pzajac
Details

Note You need to log in before you can comment on or make changes to this bug.
Description pzajac 2003-11-13 09:36:18 UTC
[200311130740]
Steps to reproduction:
1) open a jsp file in editor 
2) restart ide.

The NPE was thrown and IDE wasn't started.
Comment 1 pzajac 2003-11-13 09:37:11 UTC
Created attachment 12135 [details]
exception stacktrace
Comment 2 Petr Pisl 2003-11-13 13:54:25 UTC

*** This issue has been marked as a duplicate of 37141 ***
Comment 3 Petr Pisl 2003-11-13 14:13:04 UTC
Sorry, this is not duplicate of 37142.
Comment 4 Petr Pisl 2003-11-13 14:19:19 UTC
The code in BaseJspEditor, which extends CloneableEditor, is:

getEditorPane().addCaretListener(caretListener);

The method getEditorPane returns pane from CloneableEditor, but the
pane is null.
Comment 5 _ tboudreau 2003-11-13 14:23:32 UTC
Giving it back to Peter, it looks like it's his problem 
Comment 6 Peter Zavadsky 2003-11-13 14:39:12 UTC
Fixed in [trunk]

just hot fix:
core/windows/../PersistenceHandler.java 1.3


Problem: There was fired from TC.Registry event about activated TC,
even there was not shown the winsys on the screen (thus the TC was not
inited yet). That event is there so the Registry get the activated
nodes after startup.

Solution: There needs to be considered when exactly the first
activation event should be fired. From this case it seem immediatelly
after the winsys is shown, but I guess it made another problems (like
after init of properties window content).
Comment 7 Petr Pisl 2003-11-13 16:42:18 UTC
I did small workaround in the jsp module:

protected void componentActivated() {
            // Workaround for bug #37188. If the pane is null, don't
activate the component.
            if (getEditorPane() != null){
                getEditorPane().addCaretListener(caretListener);
                super.componentActivated();
            }
        }
Comment 8 pzajac 2003-11-20 08:32:33 UTC
verified