<windowImages i16="/org.eclipse.tracecompass.rcp.branding/icons/png/tc_icon_16x16.png" i32="/org.eclipse.tracecompass.rcp.branding/icons/png/tc_icon_32x32.png" i48="/org.eclipse.tracecompass.rcp.branding/icons/png/tc_icon_48x48.png" i64="/org.eclipse.tracecompass.rcp.branding/icons/png/tc_icon_64x64.png" i128="/org.eclipse.tracecompass.rcp.branding/icons/png/tc_icon_128x128.png" i256="/org.eclipse.tracecompass.rcp.branding/icons/png/tc_icon_256x256.png"/>
<splash
- location="org.eclipse.tracecompass.rcp.branding"
- startupProgressRect="10,300,480,15"
- startupMessageRect="7,285,490,0"
- startupForegroundColor="FFFFFF" />
+ location="org.eclipse.tracecompass.rcp.branding" />
<launcher name="tracecompass">
<linux icon="../../../../org.eclipse.tracecompass.rcp.branding/icons/xpm/tc_icon_256x256.xpm"/>
<macosx icon="../../../../org.eclipse.tracecompass.rcp.branding/icons/icns/tc_icon.icns"/>
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2014 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+
+package org.eclipse.tracecompass.internal.tracing.rcp.ui;
+
+import org.eclipse.core.runtime.IProduct;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.resource.StringConverter;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.events.PaintEvent;
+import org.eclipse.swt.events.PaintListener;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.tracecompass.internal.tracing.rcp.ui.messages.Messages;
+import org.eclipse.ui.branding.IProductConstants;
+import org.eclipse.ui.splash.BasicSplashHandler;
+
+/**
+ * Custom splash handler
+ *
+ * @author Bernd Hufmann
+ */
+public class SplashHandler extends BasicSplashHandler {
+
+ private static final Point VERSION_LOCATION = new Point(10, 280);
+ private static final Rectangle PROCESS_BAR_RECTANGLE = new Rectangle(10, 300, 480, 15);
+ private static final RGB FOREGROUND_COLOR = new RGB(255, 255, 255);
+
+ @Override
+ public void init(Shell splash) {
+ super.init(splash);
+
+ String progressString = null;
+
+ // Try to get the progress bar and message updater.
+ IProduct product = Platform.getProduct();
+ if (product != null) {
+ progressString = product.getProperty(IProductConstants.STARTUP_PROGRESS_RECT);
+ }
+ Rectangle progressRect = StringConverter.asRectangle(progressString, PROCESS_BAR_RECTANGLE);
+ setProgressRect(progressRect);
+
+ // Set font color.
+ setForeground(FOREGROUND_COLOR);
+
+ // Set the software version.
+ getContent().addPaintListener(new PaintListener() {
+ @Override
+ public void paintControl(PaintEvent e) {
+ e.gc.setForeground(getForeground());
+ e.gc.drawText(
+ NLS.bind(Messages.SplahScreen_VersionString,
+ TracingRcpPlugin.getDefault().getBundle().getVersion().toString()),
+ VERSION_LOCATION.x, VERSION_LOCATION.y, true);
+ }
+ });
+ }
+}