Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 132889 - [Browser] DefaultBrowserSupport.createBrowser() creates a new one even a browser with the same browserID is already open
Summary: [Browser] DefaultBrowserSupport.createBrowser() creates a new one even a brow...
Status: RESOLVED FIXED
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: 3.3 M2   Edit
Assignee: platform-ua-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 154826 157918 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-03-22 15:09 EST by Bianca Jiang CLA
Modified: 2006-11-02 14:29 EST (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 Bianca Jiang CLA 2006-03-22 15:09:52 EST
Looks like the cache for browser instances is cleared right after the browser opens.  The clearance is in the Observer:
public DefaultBrowserSupport() {
  // do nothing
  instance = this;
  BrowserManager.getInstance().addObserver(new Observer() {
	public void update(Observable o, Object arg) {
	  // 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();
	}
  });
}

Call stack when clear() is called:
Thread [main] (Suspended (breakpoint at line 43 in DefaultBrowserSupport$1))
	DefaultBrowserSupport$1.update(Observable, Object) line: 43
	BrowserManager(Observable).notifyObservers(Object) line: not available
	BrowserManager(Observable).notifyObservers() line: not available
	BrowserManager$1.propertyChange(Preferences$PropertyChangeEvent) line: 51
	Preferences$1.run() line: 505
	SafeRunner.run(ISafeRunnable) line: 37
	PreferenceForwarder(Preferences).firePropertyChangeEvent(String, Object, Object) line: 508
	PreferenceForwarder.preferenceChange(IEclipsePreferences$PreferenceChangeEvent) line: 119
	EclipsePreferences$2.run() line: 746
	SafeRunner.run(ISafeRunnable) line: 37
	InstancePreferences(EclipsePreferences).firePreferenceEvent(String, Object, Object) line: 749
	InstancePreferences(EclipsePreferences).put(String, String) line: 762
	ScopedPreferenceStore.setValue(String, String) line: 748
	WebBrowserPreference.setInternalWebBrowserHistory(List) line: 90
	BrowserViewer.addToHistory(String) line: 687
	BrowserViewer.setURL(String, boolean) line: 662
	BrowserViewer.setURL(String) line: 287
	WebBrowserEditor.createPartControl(Composite) line: 80
	EditorReference.createPartHelper() line: 591
	EditorReference.createPart() line: 367
	EditorReference(WorkbenchPartReference).getPart(boolean) line: 555
	EditorReference.getEditor(boolean) line: 212
	WorkbenchPage.busyOpenEditorBatched(IEditorInput, String, boolean, int) line: 2392
	WorkbenchPage.busyOpenEditor(IEditorInput, String, boolean, int) line: 2325
	WorkbenchPage.access$10(WorkbenchPage, IEditorInput, String, boolean, int) line: 2317
	WorkbenchPage$9.run() line: 2303
	BusyIndicator.showWhile(Display, Runnable) line: 69
Comment 1 Curtis d'Entremont CLA 2006-09-19 19:04:52 EDT
Fixed.

This was causing problems in help - if you tell it to open in an editor, it will open one new editor per help document viewed.
Comment 2 Curtis d'Entremont CLA 2006-09-19 19:05:30 EDT
*** Bug 157918 has been marked as a duplicate of this bug. ***
Comment 3 Curtis d'Entremont CLA 2006-11-02 14:29:16 EST
*** Bug 154826 has been marked as a duplicate of this bug. ***