Bug 160478 - Go to Type blocks EQ
Go to Type blocks EQ
Status: RESOLVED FIXED
Product: java
Classification: Unclassified
Component: Source
6.x
All All
: P3 (vote)
: 6.x
Assigned To: Rastislav Komara
issues@java
: PERFORMANCE, THREAD
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-03-17 16:56 UTC by Jesse Glick
Modified: 2009-10-09 13:04 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments
Thread dump (28.70 KB, text/plain)
2009-03-17 16:57 UTC, Jesse Glick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2009-03-17 16:56:22 UTC
090313. Open a module group, press C-O right away during scanning, pick a class, and hit Enter. The editor tab opens
blank and the IDE freezes for quite a while.

Looks like JavaTypeDescription.open should be made to run asynch?
Comment 1 Jesse Glick 2009-03-17 16:57:02 UTC
Created attachment 78313 [details]
Thread dump
Comment 2 Rastislav Komara 2009-03-25 16:17:48 UTC
In this case we have only one reasonable option. Open file on 0 offset. Then schedule task which locates correct offset
of element and after this task is finished the cursor will be moved appropriately based on condition (e.g. the caret has
not been moved since opening the file...). This will not affect opening file when scan is not running.
Comment 3 Jesse Glick 2009-03-25 17:08:25 UTC
Even just opening at offset 0 and not scheduling any further correction would be better than the current state. Most of
the time I am opening a top-level type and do not really care what caret position you initially open the editor to; if I
want to see something else I will use Page Down.
Comment 4 Rastislav Komara 2009-03-30 14:46:03 UTC
Fixed. If there is indexing in progress the editor is opened on 0 offset in document.
Comment 5 Jesse Glick 2009-03-30 16:51:47 UTC
Excellent!

BTW it is normal to include changeset information in comment, in this case probably

jet-main #0871113eeaa3

A note on impl: ErrorManager should not be used in new code. Anyway
ErrorManager.getDefault().log(ErrorManager.INFORMATIONAL, "...") will by default not be displayed anywhere, which may or
may not be what you want. Use e.g.

Logger.getLogger(ElementOpen.class.getName()).log(Level.FINE, "Opening {0} at offset 0", fileName);

or whatever you need. INFO displayed by default (probably undesirable in this case), FINE not unless you pass
-J-Dorg.netbeans.api.java.source.level=FINE or similar.
Comment 6 Rastislav Komara 2009-03-31 08:10:36 UTC
@jglick: The ErrorManager was removed in jet-main #0871113eeaa3


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo