TwitNotes - v. 1.0.2 released
TwitNotes v. 1.0.2 has been released to the update site. This release fixes the row height issue, some minor label provider stuff and adds the source of TwitNotes to posts so the source show up as "TwitNotes" instead of "web".
This release also adds a "Clear author cache" action to reset the cache of Twitter author details during runtime. I use this to clear the cache if Twitter for some reason sends me incorrect images or I'm simply want to refetch the images. TwitNotes will cache author info for the duration of your Notes session otherwise.
TwitNotes - deploying in Sametime
Deploying the TwitNotes shelfView (aka sidebar) component in Sametime 7.5.1/8.0 yields a nasty stacktrace from the underlying platform. I thought everything should work across both platforms with everything based on XPD. I haven taken care not to rely on Notes 8 API's such as the topology service but I guess that would yield a bundle dependency issue and not a stacktrace like this.
Anyone seen similar?
java.lang.NullPointerException: The active part must not be null
at org.eclipse.ui.internal.expressions.ActivePartExpression.(Unknown Source)
at org.eclipse.ui.internal.PartSite.initializeDefaultServices(Unknown Source)
at org.eclipse.ui.internal.PartSite.(Unknown Source)
at org.eclipse.ui.internal.ViewSite.(Unknown Source)
at com.ibm.rcp.ui.internal.shelf.ShelfViewReference.createPartHelper(Unknown Source)
at com.ibm.rcp.ui.internal.shelf.ShelfViewReference.createPart(Unknown Source)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(Unknown Source)
at com.ibm.rcp.ui.shelf.ShelfPage.activatePart(Unknown Source)
at com.ibm.rcp.ui.shelf.ShelfPage.access$10(Unknown Source)
at com.ibm.rcp.ui.shelf.ShelfPage$7.handleEvent(Unknown Source)
at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.notifyListeners(Unknown Source)
at com.ibm.rcp.swt.swidgets.SViewForm.internalSetMaximized(Unknown Source)
at com.ibm.rcp.swt.swidgets.SViewForm.setMaximized(Unknown Source)
at com.ibm.rcp.swt.swidgets.SViewForm.onMouseUpTitle(Unknown Source)
at com.ibm.rcp.swt.swidgets.SViewForm.onMouseUp(Unknown Source)
at com.ibm.rcp.swt.swidgets.SViewForm$4.handleEvent(Unknown Source)
at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
at org.eclipse.ui.internal.Workbench.runEventLoop(Unknown Source)
at org.eclipse.ui.internal.Workbench.runUI(Unknown Source)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Unknown Source)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(Unknown Source)
at com.ibm.rcp.personality.framework.internal.RCPApplication.run(Unknown Source)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(Unknown Source)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
at java.lang.reflect.AccessibleObject.invokeL(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at com.ibm.rcp.core.internal.launcher.Main.startLaunch(Main.java:895)
at com.ibm.rcp.core.internal.launcher.Main.main(Main.java:1313)
at java.lang.reflect.AccessibleObject.invokeV(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.ibm.oti.vm.JarRunner.main(Unknown Source)
TwitNotes - now an 'official' Twitter app
The Twitter team has approved TwitNotes as an "official" Twitter application so from v. 1.0.2 the source will show up as "from TwitNotes" as shown below.
Setting table row height in SWT
So it appears you can actually set the row height of a SWT table despite me previously saying you couldn't. The caveat is that it cannot be set on a per row basis. Row height is set using a Listener for SWT.MeasureItem and then setting the height property of the supplied event object as shown below.
// resize the row height using a MeasureItem listener
table.addListener(SWT.MeasureItem, new Listener() {
public void handleEvent(Event event) {
// height cannot be per row so simply set
event.height = 67;
}
});
If need be you could compute the actual height using the GC.stringExtent(String).y and simply set to the biggest value you encounter.
Information from Custom Drawing Table and Tree Items at Eclipse.org.




