Bug 92260 - Opening an editor when "link with editor" is selected takes more time than when its not selected
Summary: Opening an editor when "link with editor" is selected takes more time than wh...
Status: RESOLVED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on: 92274
Blocks:
  Show dependency tree
 
Reported: 2005-04-21 13:37 EDT by Pascal Rapicault CLA
Modified: 2009-08-30 02:07 EDT (History)
3 users (show)

See Also:


Attachments
Patch against PackageExplorerPart (2.41 KB, patch)
2005-04-21 14:57 EDT, Kim Horne CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pascal Rapicault CLA 2005-04-21 13:37:42 EDT
How to see it
- Close all editors
- Load org.eclipse.osgi in the workspace
- Open the "Package Explorer" view. Make sure all projects are collapsed.
- In the "package explorer", make sure the "link with editor" is selected
- Ctrl+Shift+T, open the type "DefaultClassLoader"
- Select the class and open it.

You will notice that the tree is first expanded then the editor is opened (or at
least its the impression I got).
Note that it only do it the first time you are going to the type, to reproduce
you have to change type.

If the "link with editor" option is off, there is no problem.
Comment 1 Kim Horne CLA 2005-04-21 14:10:47 EDT
Without delving too deep into the PackageExplorer, here's my guess as to what's
happening based on an examination of the workbench code...

From the dialog you tell the file to open.
Workbench page is told to open the file. 
The editor part is created.
The part open event is fired.
The package explorer reacts to the event, selecting the file in the package
explorer.
The page then activates the editor and brings it to the front of the stack.

We can't go changing event orderings now, but the JDT guys might want to select
the active file in a background UI job or something... Tod, can you please punt
this somewhere based on your thoughts?
Comment 2 Kim Horne CLA 2005-04-21 14:37:23 EDT
Unfortunately, Navigator and PackageExplorer do not share an implementation of
Link To Editor.
Comment 3 Kim Horne CLA 2005-04-21 14:57:23 EDT
I have a patch to PackageExplorerPart that will fix this.  A similar patch
should be applied to the Navigator and any other view that has Link To Editor
functionality.  Passing to JDT to consider.  Will open a new bug for the
Navigator case.
Comment 4 Kim Horne CLA 2005-04-21 14:57:55 EDT
Created attachment 20198 [details]
Patch against PackageExplorerPart
Comment 5 Kim Horne CLA 2005-04-21 15:02:25 EDT
Incidentally, this is quite noticable in the Java Browsing perspective... every
view can be linked to editor.
Comment 6 Nick Edgar CLA 2005-04-21 16:21:08 EDT
The job should check that the view's Tree has not been disposed in the interim.
Comment 7 Dirk Baeumer CLA 2005-04-22 04:57:52 EDT
I have a couple of concerns here:

- executing this in a Job might cause some flashing since the revealing will
  not take place inside of the natice event loop.

- adding all these jobs to the views some strange as well. Why don't we add
  a postPartActive event as we have a postSelectionEvent. This would fit
  better into the current stroy we have then adding jobs in all views.

Nick, can you please comment.
Comment 8 Nick Edgar CLA 2005-04-22 11:14:12 EDT
Since this affects the Navigator too, let's move the discussion to bug 92274.
Please see my latest comments there.
Comment 9 Dirk Baeumer CLA 2005-05-09 11:26:22 EDT
No further action planned. For details look at bug 92274.
Comment 10 Martin Aeschlimann CLA 2006-06-16 02:29:47 EDT
setting to remind until status of bug 92274 changes
Comment 11 Denis Roy CLA 2009-08-30 02:07:42 EDT
As of now 'LATER' and 'REMIND' resolutions are no longer supported.
Please reopen this bug if it is still valid for you.