use of org.eclipse.scout.rt.client.ui.desktop.BrowserHistoryEntry in project scout.rt by eclipse.
the class OutlineDeepLinkHandlerTest method testCreateBrowserHistory.
@Test
public void testCreateBrowserHistory() {
OutlineDeepLinkHandler handler = new OutlineDeepLinkHandler();
IOutline outline = new P_OutlineFoo();
BrowserHistoryEntry entry = handler.createBrowserHistoryEntry(outline);
assertEquals("outline-04446", entry.getDeepLinkPath());
// title of outline is added to title of desktop (this string is used for the title in the browser-window)
assertEquals("Test Environment Application - Foo", entry.getTitle());
// title of outline is used to create the (i)nfo URL parameter
assertEquals("./?dl=outline-04446&i=foo", entry.getPath());
}
use of org.eclipse.scout.rt.client.ui.desktop.BrowserHistoryEntry in project scout.rt by eclipse.
the class DeepLinkUriBuilder method createBrowserHistoryEntry.
public BrowserHistoryEntry createBrowserHistoryEntry() {
if (m_path == null) {
throw new IllegalStateException("Cannot create BrowserHistoryEntry without deep-link path");
}
IDesktop desktop = ClientSessionProvider.currentSession().getDesktop();
StringBuilder title = new StringBuilder(desktop.getTitle());
if (StringUtility.hasText(m_info)) {
title.append(" - ").append(m_info);
}
return new BrowserHistoryEntry(m_builder.createURI(), title.toString(), m_path);
}
Aggregations