Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 322000

Summary: [Browser] Creating an instance of the Internal Browser with the parameter of AS_VIEW does not use the name or tooltip parameters. It work fine with AS_EDITOR.
Product: [Eclipse Project] Platform Reporter: Bob <adlerflug1841>
Component: User AssistanceAssignee: Chris Goldthorpe <cgold>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: cgold, remy.suen
Version: 3.5.1   
Target Milestone: 3.7 M3   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Patch none

Description Bob CLA 2010-08-06 11:08:00 EDT
Build Identifier: Version: 3.5.1 Build id: M20090917-0800

When opening an Internal Browser using the following parameters,

   support.createBrowser(IWorkbenchBrowserSupport.AS_VIEW,
       "testBrowser",
       "testBrowser",
       "").openURL(new URL(urlString.toString()));

The "testBrowser" string does not appear in the tab or as a tooltip as documented. Instead, "Internal Web Browser" is displayed. When AS_VIEW is changed to AS_EDITOR it works as documented.


Reproducible: Always

Steps to Reproduce:
1.
String urlString = "http://eclipse.org";
IWorkbenchBrowserSupport support = PlatformUI.getWorkbench().getBrowserSupport();
support.createBrowser(IWorkbenchBrowserSupport.AS_VIEW,
  "testBrowser",
  "testBrowser",
  "").openURL(new URL(urlString))
2. Run, tabs and tooltip will display "Internal Web Browser".
3. Change AS_VIEW to AS_EDITOR
4. Run, tabs and tooltip will display "testBrowser".
Comment 1 Chris Goldthorpe CLA 2010-08-31 14:53:38 EDT
I think that this is the intended behavior. Multiple Web Browser Editors can be instantiated each with their own name, there is only ever one Web Browser View and it always has the same name, which is the name you would see in the dialog that is launched by Window/Show View.
Comment 2 Bob CLA 2010-09-07 16:05:27 EDT
(In reply to comment #1)
> I think that this is the intended behavior. Multiple Web Browser Editors can be
> instantiated each with their own name, there is only ever one Web Browser View
> and it always has the same name, which is the name you would see in the dialog
> that is launched by Window/Show View.

I don't think this is correct. By providing a null for the browserId parameter, or by providing unique name, a new view instance is created each time.
Comment 3 Chris Goldthorpe CLA 2010-09-21 17:45:38 EDT
I see what you mean, I'll take a look at the bug.
Comment 4 Chris Goldthorpe CLA 2010-09-22 12:36:03 EDT
Created attachment 179392 [details]
Patch
Comment 5 Chris Goldthorpe CLA 2010-09-22 12:36:51 EDT
Patch applied to HEAD, Fixed
Comment 6 Bob CLA 2010-09-23 07:43:52 EDT
(In reply to comment #5)
> Patch applied to HEAD, Fixed

Thank you.