Skip to content

Allow customization of the browser style in the "BrowserViewer" class. #3035

Open
@lak-proddev

Description

@lak-proddev

I have a use case where I want to create a view with an embedded browser. I want to customize the browser style of SWT.EDGE in the BrowserViewer class. The current code does not allow changing it in the subclass.

org.eclipse.ui.internal.browser.BrowserViewer.BrowserViewer(Composite, int)

this.browser = new Browser(this, SWT.NONE);

My suggestion is

// Add a protected method to allow custom styles
protected int getBrowserStyle() {
    return SWT.NONE; // Default style
}

// Use the method to set the style for the Browser object
this.browser = new Browser(this, getBrowserStyle());

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions