extensions++;
if (editor == null)
editor = getEditor(item, true);
final IGameExtension gameEx = (IGameExtension) ex;
final GOIMGameItem game = gameEx.getGameItem();
final GameExtensionProxy proxy = gameEx.getGameExtension();
// final InetSocketAddress target = gameEx.getDestination();
Label label = new Label((Composite) editor.getEditor(),
SWT.NULL);
// Button label = new
// Button((Composite)editor.getEditor(),SWT.PUSH);
try {
label.setImage(proxy.getIcon().createImage());
} catch(SWTError error) {
error.printStackTrace();
// Since we still want the user to know about the error .. i throw an exception for now ..
throw new RuntimeException("An SWT Error occurred during setting game icon",error);
}
label.setToolTipText(proxy.getTooltipText(game, gameEx));
System.out.println("Addin label with image: " + proxy.icon
+ ": " + label.computeSize(-1, -1));
// label.setEnabled(true);
// label.setText("Muh");
label.setLayoutData(new RowData(16,16));
if (game != null) {
label.addListener(SWT.MouseUp, new Listener() {
public void handleEvent(Event event) {
//System.out.println("mouseup");
proxy.execute(game, gameEx);
}
});
label.setFocus();
} else {
label.setToolTipText("Game not installed: "