Search in sources :

Example 1 with MyExtensionLocationListener

use of org.talend.designer.components.exchange.ui.htmlcontent.MyExtensionLocationListener in project tdi-studio-se by Talend.

the class ExchangeView method createPartControl.

/*
     * (non-Javadoc)
     * 
     * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
     */
@Override
public void createPartControl(Composite parent) {
    try {
        browser = new Browser(parent, SWT.NONE);
        manager.setBrowser(browser);
        browser.addLocationListener(new MyExtensionLocationListener());
        browser.setLayoutData(new GridData(GridData.FILL_BOTH));
        if (manager.getDocument() != null) {
            RefreshComponenentsAction action = new RefreshComponenentsAction();
            action.run(new String[] { RefreshComponenentsAction.REFRESH_ALL });
        }
    } catch (Throwable t) {
        Exception ex = new Exception("The internal web browser can not be access,the exchange view won't be displayed");
        ExceptionHandler.process(ex);
    }
}
Also used : RefreshComponenentsAction(org.talend.designer.components.exchange.ui.actions.RefreshComponenentsAction) GridData(org.eclipse.swt.layout.GridData) MyExtensionLocationListener(org.talend.designer.components.exchange.ui.htmlcontent.MyExtensionLocationListener) PartInitException(org.eclipse.ui.PartInitException) Browser(org.eclipse.swt.browser.Browser)

Aggregations

Browser (org.eclipse.swt.browser.Browser)1 GridData (org.eclipse.swt.layout.GridData)1 PartInitException (org.eclipse.ui.PartInitException)1 RefreshComponenentsAction (org.talend.designer.components.exchange.ui.actions.RefreshComponenentsAction)1 MyExtensionLocationListener (org.talend.designer.components.exchange.ui.htmlcontent.MyExtensionLocationListener)1