blob: 5a3468a8032e136f4170a8c1b678a8a248a7e822 [file] [log] [blame]
package org.eclipse.libra.framework.equinox.ui;
/*******************************************************************************
* Copyright (c) 2010 Eteration A.S. and others.
* 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:
* Naci Dai and Murat Yener, Eteration A.S. - Initial API and implementation
*******************************************************************************/
import org.eclipse.core.runtime.IStatus;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.plugin.AbstractUIPlugin;
public class EquinoxUIPlugin extends AbstractUIPlugin {
protected static EquinoxUIPlugin singleton;
public static final String PLUGIN_ID = "org.eclipse.libra.framework.equinox.ui";
public EquinoxUIPlugin() {
super();
singleton = this;
}
/**
* Returns the singleton instance of this plugin.
* @return org.eclipse.jst.server.tomcat.internal.TomcatUIPlugin
*/
public static EquinoxUIPlugin getInstance() {
return singleton;
}
/**
* Convenience method for logging.
*
* @param status org.eclipse.core.runtime.IStatus
*/
public static void log(IStatus status) {
getInstance().getLog().log(status);
}
/**
* Convenience method to get a Display. The method first checks, if
* the thread calling this method has an associated display. If so, this
* display is returned. Otherwise the method returns the default display.
*
* @return the display
*/
public static Display getStandardDisplay() {
Display display = Display.getCurrent();
if (display == null)
display = Display.getDefault();
return display;
}
}