Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 154826 - [Browser] Open Internal bowser spawns a new window even when using the same browser ID
Summary: [Browser] Open Internal bowser spawns a new window even when using the same b...
Status: CLOSED DUPLICATE of bug 132889
Alias: None
Product: Platform
Classification: Eclipse Project
Component: User Assistance (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: platform-ua-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 146578 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-08-23 04:24 EDT by Eden Klein CLA
Modified: 2007-07-15 07:50 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eden Klein CLA 2006-08-23 04:24:13 EDT
There are 2 options of creating a new internal browser: using a new window every time or opening the URL in the same window, using the same browser ID.
In the class "DefaultBrowserSupport" there is a function called "getExistingWebBrowser". The function checks if the given ID exists in the hash "browserIdMap". If it doesn't it creates a new browser and it enters the ID in the hash. If the id exists it should open the URL in the same window, but it doesn't happen.
The reason is the following:
Every time a URL is sent to the browser, it is added to the browser history in the function "setURL" (there is a call to 'addToHistory')in class "BrowserViewer".
In 'addToHistory' there is a call to WebBrowserPreference.setInternalWebBrowserHistory.
This call triggers a call to "update" in the observer attached to DefaultBrowserSupport. (in the constructor).
In the update the hash  "browserIdMap" is cleared!!!! It means that it is impossible to use the "Existing browser" feature, since the browserIdMap is cleared on every call.
There is a TODO remark in the 'update' function saying:
"// TODO I am not sure what we should do here
// The preferences have changed so maybe we should
// close the opened browsers in addition to clearing
// the table "

browserIdMap.clear(); is clearly NOT what needs to be done here, at least not in every case.
Comment 1 Eden Klein CLA 2006-08-23 06:19:18 EDT
*** Bug 146578 has been marked as a duplicate of this bug. ***
Comment 2 Grant Gayed CLA 2006-11-02 14:22:13 EST
This looks like a duplicate of bug 132889 which is now fixed.  Moving to UA to confirm.
Comment 3 Curtis d'Entremont CLA 2006-11-02 14:29:16 EST
Correct.

*** This bug has been marked as a duplicate of 132889 ***
Comment 4 Gadi Goldbarg CLA 2007-07-15 07:50:07 EDT
closed