Skip to content

Commit

Permalink
Adapted the client to use new Browser API
Browse files Browse the repository at this point in the history
The contribution allows the client to utilize the new API from SWT
Browser to check if the url is the custom text url of the browser.

Contributes to #213
  • Loading branch information
amartya4256 committed Aug 21, 2024
1 parent 4fda918 commit 5285d11
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -641,10 +641,12 @@ protected void saveCurrentPage(IMemento memento) {
return;
// Handle the case where we are on a static page.
// browser.getURL() returns the empty string if there is no current URL
// and returns "about:blank" if we are on a dynamic page
// and returns Browser's BASE_URL if we are on a dynamic page
// Also Handles the case where we use browser's base
// HTML which we do not want to cache.
if (browser != null && browser.getUrl() != null
&& browser.getUrl().length() > 0
&& !(browser.getUrl().equals("about:blank")) //$NON-NLS-1$
&& !browser.isLocationForCustomText(browser.getUrl())
&& !(browser.getUrl().equals("file:///"))) { //$NON-NLS-1$

String currentURL = browser.getUrl();
Expand Down

0 comments on commit 5285d11

Please sign in to comment.