Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 322000 - [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.
Summary: [Browser] Creating an instance of the Internal Browser with the parameter of ...
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: User Assistance (show other bugs)
Version: 3.5.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.7 M3   Edit
Assignee: Chris Goldthorpe CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-06 11:08 EDT by Bob CLA
Modified: 2010-09-23 13:30 EDT (History)
2 users (show)

See Also:


Attachments
Patch (3.66 KB, patch)
2010-09-22 12:36 EDT, Chris Goldthorpe CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.