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

Bug 396292

Summary: Rename and extend BrowserHistory client service
Product: [RT] RAP Reporter: Tim Buschtoens <tbuschto>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3    
Version: 2.0   
Target Milestone: 2.0 M4   
Hardware: All   
OS: All   
Whiteboard:

Description Tim Buschtoens CLA 2012-12-11 11:03:41 EST
The BrowserHistory has an ill-chosen name, as discussed in Bug 394401. We should rename it "BrowserNavigation". The existing methods would also have to be renamed:

createEntry -> createHistoryEntry 
add/removeBrowserHistoryListener -> add/removeBrowserNavigationListener

Additional API could be provided:
getURL -> returns current (complete?) URL
setUrl (redirect?/goto?) -> navigates to another URL. Fires NavigationListener?
setTitle -> changes document title 
getTitle (?) -> perhaps not useful, value may be changed on client at any time

IBrowserHistory, which was already deprecated, will stay untouched. BrowserHistoryListener and BrowserHistoryEvent may have to be duplicated if they are renamed.
Comment 1 Ivan Furnadjiev CLA 2012-12-13 05:35:02 EST
The BrowserHistory has been renamed to BrowserNavigation both on client, server and protocol with commit 047115bc99c3290a8c8e0a1439ccede422fca1d2.
Also renamed:
- createEntry -> createHistoryEntry
- add/removeBrowserHistoryListener -> add/removeBrowserNavigationListener
- BrowserHistoryListener -> BrowserNavigationListener
- BrowserHistoryEvent -> BrowserNavigationEvent
- "add" method in the protocol to "addToHistory"
Removed IBrowserHistory deprecated interface.
Keep the deprecated RWT#getBrowserHistory, but changed the return type to BrowserNavigation. We use this pattern in RWT#getSessionStore for example.

Will not extend the functionality with these two new properties for now - "url" and "title".
Comment 2 Ralf Sternberg CLA 2012-12-21 04:54:29 EST
We agreed not to add get/setTitle to the BrowserNavigation as this is not directly related to "navigation". This issue is already covered by bug 343075.
A get/setUrl method doesn't seem to be needed at the moment.