private void firePageChanged(final PageChangedEvent event) { for (final IPageChangedListener l : pageChangeListeners) { SafeRunnable.run(new SafeRunnable() { @Override public void run() { l.pageChanged(event); } }); } } }
@Override public void handleException(Throwable ex) { super.handleException(ex); exception[0]= ex; }
/** * Runs the given safe runnable using the safe runnable runner. This is a * convenience method, equivalent to: * <code>SafeRunnable.getRunner().run(runnable)</code>. * * @param runnable * the runnable to run * @since 3.1 */ public static void run(ISafeRunnable runnable) { getRunner().run(runnable); }
/** * Returns the safe runnable runner. * * @return the safe runnable runner * * @since 3.1 */ public static ISafeRunnableRunner getRunner() { if (runner == null) { runner = createDefaultRunner(); } return runner; }
/** * Returns the safe runnable runner. * * @return the safe runnable runner * * @since 3.1 */ public static ISafeRunnableRunner getRunner() { if (runner == null) { runner = createDefaultRunner(); } return runner; }
public void getToolTipText( final Item item, final int columnIndex ) { SafeRunnable.run( new SafeRunnable() { public void run() { Object element = item.getData(); ViewerColumn column = viewer.getViewerColumn( columnIndex ); CellLabelProvider labelProvider = column.getLabelProvider(); if( labelProvider != null ) { String text = labelProvider.getToolTipText( element ); ICellToolTipAdapter adapter = getAdapter( viewer ); adapter.setCellToolTipText( text ); } } } ); }
@Override public void handleException(Throwable ex) { super.handleException(ex); exception[0]= ex; }
/** * Runs the given safe runnable using the safe runnable runner. This is a * convenience method, equivalent to: * <code>SafeRunnable.getRunner().run(runnable)</code>. * * @param runnable * the runnable to run * @since 3.1 */ public static void run(ISafeRunnable runnable) { getRunner().run(runnable); }
/** * Returns the safe runnable runner. * * @return the safe runnable runner * * @since 1.0 */ public static ISafeRunnableRunner getRunner() { if (runner == null) { runner = createDefaultRunner(); } return runner; }
/** * Sends the lifecycle event to the page's sections. */ public void aboutToBeShown() { for (final ISection section : sections) { ISafeRunnable runnable = new SafeRunnable() { @Override public void run() throws Exception { section.aboutToBeShown(); } }; SafeRunnable.run(runnable); } }
@Override public void handleException(Throwable ex) { super.handleException(ex); exception[0]= ex; }
/** * Runs the given safe runnable using the safe runnable runner. This is a * convenience method, equivalent to: * <code>SafeRunnable.getRunner().run(runnable)</code>. * * @param runnable * the runnable to run * @since 1.0 */ public static void run(ISafeRunnable runnable) { getRunner().run(runnable); }
/** * Sends the lifecycle event to the page's sections. */ public void aboutToBeHidden() { for (final ISection section : sections) { ISafeRunnable runnable = new SafeRunnable() { @Override public void run() throws Exception { section.aboutToBeHidden(); } }; SafeRunnable.run(runnable); } }
public void handleException(Throwable ex) { super.handleException(ex); exception[0]= ex; }
public void dispose () { checkWidget (); if ( this.disposed ) { return; } this.disposed = true; for ( final DisposeListener listener : this.disposeListeners ) { SafeRunnable.getRunner ().run ( new SafeRunnable () { @Override public void run () throws Exception { listener.onDispose (); }; } ); } this.resourceManager.dispose (); }
/** * Fire workbench postShutdown event. * * @since 3.2 */ void firePostShutdown() { for (final IWorkbenchListener l : workbenchListeners) { SafeRunnable.run(new SafeRunnable() { @Override public void run() { l.postShutdown(Workbench.this); } }); } }
public void handleException(Throwable e) { super.handleException(e); clearSelectedNode();//Do not cache a node with problems } };
public void dispose () { checkWidget (); if ( this.disposed ) { return; } this.disposed = true; for ( final DisposeListener listener : this.disposeListeners ) { SafeRunnable.getRunner ().run ( new SafeRunnable () { @Override public void run () throws Exception { listener.onDispose (); }; } ); } this.resourceManager.dispose (); }
/** * Notifies any check state listeners that the check state of an element has changed. * Only listeners registered at the time this method is called are notified. * * @param event a check state changed event * * @see ICheckStateListener#checkStateChanged */ protected void fireCheckStateChanged(final CheckStateChangedEvent event) { for (ICheckStateListener l : checkStateListeners) { SafeRunnable.run(new SafeRunnable() { @Override public void run() { l.checkStateChanged(event); } }); } }
@Override public void handleException(Throwable e) { super.handleException(e); clearSelectedNode();//Do not cache a node with problems } };