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 58621 - Allow to get elements offsets even when they are not put into a Resource
Summary: Allow to get elements offsets even when they are not put into a Resource
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-05 13:44 UTC by Marek Fukala
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marek Fukala 2005-05-05 13:44:40 UTC
I need to get a source element offset for elements in a JavaClass which has not
any Resource (there isn't any physical file for it).

For example the following code throws a NPE when the jspMethod is in a JavaClass
without a Resource:

StatementBlock sb = jmp.getStatementBlock().createStatementBlock();
Statement s = jmp.getEmptyStatement().createEmptyStatement();
sb.getStatements().add(s);
jspMethod.setBody(sb);

s.getStartOffset(); //NPE here:

java.lang.NullPointerException
        at
org.netbeans.modules.javacore.jmiimpl.javamodel.MetadataElement.testResourceChange(MetadataElement.java:923)
        at
org.netbeans.modules.javacore.jmiimpl.javamodel.MetadataElement.getStartOffset(MetadataElement.java:935)
Comment 1 Jan Becicka 2006-10-26 16:26:32 UTC
Javacore module was replaced by Retouche infrastructure. This bug is not valid
in trunk any more.
Comment 2 Quality Engineering 2007-09-20 09:59:12 UTC
Reorganization of java component