Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 267632 Details for
Bug 514719
[Browser][Webkit2] port Browser.getText() to webkit2
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
Browser Snippet
BrowserBugSnippet.java (text/x-java), 1.46 KB, created by
Simon Delisle
on 2017-04-04 11:21:41 EDT
(
hide
)
Description:
Browser Snippet
Filename:
MIME Type:
Creator:
Simon Delisle
Created:
2017-04-04 11:21:41 EDT
Size:
1.46 KB
patch
obsolete
>import org.eclipse.swt.SWT; >import org.eclipse.swt.browser.Browser; >import org.eclipse.swt.events.SelectionAdapter; >import org.eclipse.swt.events.SelectionEvent; >import org.eclipse.swt.layout.GridData; >import org.eclipse.swt.layout.GridLayout; >import org.eclipse.swt.widgets.Button; >import org.eclipse.swt.widgets.Display; >import org.eclipse.swt.widgets.Shell; >import org.eclipse.swt.widgets.Text; > >public class BrowserBugSnippet { > public static void main(String[] args) { > Display display = new Display(); > Shell shell = new Shell(display); > shell.setSize(400, 400); > shell.setLayout(new GridLayout(2, false)); > > Browser browser = new Browser(shell, SWT.BORDER); > browser.setUrl("https://www.google.ca"); > browser.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1)); > > Button getHTMLButton = new Button(shell, SWT.PUSH); > getHTMLButton.setText("Get HTML"); > > Text HTMLText = new Text(shell, SWT.NONE); > HTMLText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); > > getHTMLButton.addSelectionListener(new SelectionAdapter() { > @Override > public void widgetSelected(SelectionEvent e) { > HTMLText.setText(browser.getText()); > } > }); > > shell.open(); > while (!shell.isDisposed()) { > if (!display.readAndDispatch()) { > display.sleep(); > } > } > > display.dispose(); > } >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 514719
: 267632