TPTP 4.5.0 Platform Project
Internal API Specification

org.eclipse.tptp.platform.common.ui.internal
Class CommonUIPlugin

java.lang.Object
  extended by org.eclipse.core.runtime.Plugin
      extended by org.eclipse.ui.plugin.AbstractUIPlugin
          extended by org.eclipse.tptp.platform.common.ui.internal.CommonUIPlugin
All Implemented Interfaces:
org.osgi.framework.BundleActivator

public class CommonUIPlugin
extends org.eclipse.ui.plugin.AbstractUIPlugin

The activator class controls the plug-in life cycle


Field Summary
static java.lang.String EP_NAVIGATOR_EXTENSIONS
          Extension point id used to register navigator extensions.
static java.lang.String EP_REPORT_EXTENSIONS
          Extension point id used to register the report extensions.
protected static java.lang.String KEYSTORE
           
protected static CommonUIPlugin plugin
          The only instance of this singleton class
static java.lang.String PLUGIN_ID
          The plug-in id
 
Fields inherited from class org.eclipse.core.runtime.Plugin
PLUGIN_PREFERENCE_SCOPE, PREFERENCES_DEFAULT_OVERRIDE_BASE_NAME, PREFERENCES_DEFAULT_OVERRIDE_FILE_NAME
 
Constructor Summary
CommonUIPlugin()
          The constructor
 
Method Summary
protected  boolean getContributions(java.lang.String perspectiveId)
          Check if required activities are enabled.
static CommonUIPlugin getDefault()
          Returns the shared instance
static java.lang.String getID()
           
static java.lang.String getKeyStoreLocation()
           
protected  java.lang.String getPerspectiveLabel(java.lang.String perspectiveId)
          Returns the label of the perspective with the given identifier or null if no such perspective exists.
 java.lang.String getWorkspaceName()
           
protected  void initializeDefaultPreferences(org.eclipse.jface.preference.IPreferenceStore store)
           
protected  boolean isCurrentPerspective(org.eclipse.ui.IWorkbenchWindow window, java.lang.String perspectiveId)
          Returns whether the given perspective identifier matches the identifier of the current perspective.
static void log(java.lang.Throwable e)
           
 boolean openPerspectiveSwitchDialog(org.eclipse.swt.widgets.Shell shell, java.lang.String perspectiveId, org.eclipse.jface.preference.IPreferenceStore preferenceStore, java.lang.String preferenceKey, java.lang.String message)
          Asks the user whether they want to switch to the given perspective.
 void start(org.osgi.framework.BundleContext context)
           
 void stop(org.osgi.framework.BundleContext context)
           
 
Methods inherited from class org.eclipse.ui.plugin.AbstractUIPlugin
createImageRegistry, getDialogSettings, getImageRegistry, getPreferenceStore, getWorkbench, imageDescriptorFromPlugin, initializeDefaultPluginPreferences, initializeImageRegistry, loadDialogSettings, loadPreferenceStore, refreshPluginActions, saveDialogSettings, savePreferenceStore, shutdown, startup
 
Methods inherited from class org.eclipse.core.runtime.Plugin
find, find, getBundle, getDescriptor, getLog, getPluginPreferences, getStateLocation, internalInitializeDefaultPluginPreferences, isDebugging, openStream, openStream, savePluginPreferences, setDebugging, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

KEYSTORE

protected static final java.lang.String KEYSTORE
See Also:
Constant Field Values

EP_NAVIGATOR_EXTENSIONS

public static final java.lang.String EP_NAVIGATOR_EXTENSIONS
Extension point id used to register navigator extensions.

See Also:
Constant Field Values

PLUGIN_ID

public static final java.lang.String PLUGIN_ID
The plug-in id

See Also:
Constant Field Values

EP_REPORT_EXTENSIONS

public static final java.lang.String EP_REPORT_EXTENSIONS
Extension point id used to register the report extensions.

See Also:
Constant Field Values

plugin

protected static CommonUIPlugin plugin
The only instance of this singleton class

Constructor Detail

CommonUIPlugin

public CommonUIPlugin()
The constructor

Method Detail

getID

public static java.lang.String getID()

start

public void start(org.osgi.framework.BundleContext context)
           throws java.lang.Exception
Specified by:
start in interface org.osgi.framework.BundleActivator
Overrides:
start in class org.eclipse.ui.plugin.AbstractUIPlugin
Throws:
java.lang.Exception

stop

public void stop(org.osgi.framework.BundleContext context)
          throws java.lang.Exception
Specified by:
stop in interface org.osgi.framework.BundleActivator
Overrides:
stop in class org.eclipse.ui.plugin.AbstractUIPlugin
Throws:
java.lang.Exception

getDefault

public static CommonUIPlugin getDefault()
Returns the shared instance

Returns:
the shared instance

openPerspectiveSwitchDialog

public boolean openPerspectiveSwitchDialog(org.eclipse.swt.widgets.Shell shell,
                                           java.lang.String perspectiveId,
                                           org.eclipse.jface.preference.IPreferenceStore preferenceStore,
                                           java.lang.String preferenceKey,
                                           java.lang.String message)
Asks the user whether they want to switch to the given perspective. Returns the user's response. If we are already in the given perspective, returns false. Must be called from the UI thread.


isCurrentPerspective

protected boolean isCurrentPerspective(org.eclipse.ui.IWorkbenchWindow window,
                                       java.lang.String perspectiveId)
Returns whether the given perspective identifier matches the identifier of the current perspective.

Parameters:
perspectiveId - the identifier
Returns:
whether the given perspective identifier matches the identifier of the current perspective

getContributions

protected boolean getContributions(java.lang.String perspectiveId)
Check if required activities are enabled.


getPerspectiveLabel

protected java.lang.String getPerspectiveLabel(java.lang.String perspectiveId)
Returns the label of the perspective with the given identifier or null if no such perspective exists.

Parameters:
perspectiveId - the identifier
Returns:
the label of the perspective with the given identifier or null if no such perspective exists

getWorkspaceName

public java.lang.String getWorkspaceName()

getKeyStoreLocation

public static java.lang.String getKeyStoreLocation()

initializeDefaultPreferences

protected void initializeDefaultPreferences(org.eclipse.jface.preference.IPreferenceStore store)
Overrides:
initializeDefaultPreferences in class org.eclipse.ui.plugin.AbstractUIPlugin

log

public static void log(java.lang.Throwable e)

TPTP 4.5.0 Platform Project
Internal API Specification