Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.ui.console
Class ConsolePlugin


java.lang.Object
  extended by 

org.eclipse.core.runtime.Plugin
      extended by 

org.eclipse.ui.plugin.AbstractUIPlugin
          extended by 
org.eclipse.ui.console.ConsolePlugin
All Implemented Interfaces:
BundleActivator

public class ConsolePlugin
extends AbstractUIPlugin

The console plug-in class.

Since:
3.0
Restriction:
This class is not intended to be subclassed by clients.
Restriction:
This class is not intended to be instantiated by clients.

Field Summary
 
Fields inherited from class org.eclipse.core.runtime. Plugin
PLUGIN_PREFERENCE_SCOPE, PREFERENCES_DEFAULT_OVERRIDE_BASE_NAME, PREFERENCES_DEFAULT_OVERRIDE_FILE_NAME
 
Constructor Summary
ConsolePlugin ()
           
 
Method Summary
static void errorDialog ( Shell shell, String title, String message, Throwable t)
          Utility method with conventions
  IConsoleManager getConsoleManager ()
          Returns the console manager.
static  ConsolePlugin getDefault ()
          Returns the singleton instance of the console plug-in.
static  Image getImage ( String key)
          Returns the Image identified by the given key, or null if it does not exist.
static  ImageDescriptor getImageDescriptor ( String key)
          Returns the ImageDescriptor identified by the given key, or null if it does not exist.
static  Display getStandardDisplay ()
          Returns the workbench display.
static  String getUniqueIdentifier ()
          Convenience method which returns the unique identifier of this plug-in.
static void log ( IStatus status)
          Logs the specified status with this plug-in's log.
static void log ( Throwable t)
          Logs the specified throwable with this plug-in's log.
static  IStatus newErrorStatus ( String message, Throwable exception)
          Returns a new error status for this plug-in with the given message
 void stop ( BundleContext context)
          The AbstractUIPlugin implementation of this Plugin method saves this plug-in's preference and dialog stores and shuts down its image registry (if they are in use).
 
Methods inherited from class org.eclipse.ui.plugin. AbstractUIPlugin
createImageRegistry, getDialogSettings, getImageRegistry, getPreferenceStore, getWorkbench, imageDescriptorFromPlugin, initializeDefaultPluginPreferences, initializeDefaultPreferences, initializeImageRegistry, loadDialogSettings, loadPreferenceStore, refreshPluginActions, saveDialogSettings, savePreferenceStore, shutdown, start, 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
 

Constructor Detail

ConsolePlugin

public ConsolePlugin()
Method Detail

getDefault

public static 
ConsolePlugin getDefault()
Returns the singleton instance of the console plug-in.


getUniqueIdentifier

public static 
String getUniqueIdentifier()
Convenience method which returns the unique identifier of this plug-in.


log

public static void log(
IStatus status)
Logs the specified status with this plug-in's log.

Parameters:
status - status to log

log

public static void log(
Throwable t)
Logs the specified throwable with this plug-in's log.

Parameters:
t - throwable to log

newErrorStatus

public static 
IStatus newErrorStatus(
String message,
                                     
Throwable exception)
Returns a new error status for this plug-in with the given message

Parameters:
message - the message to be included in the status
exception - the exception to be included in the status or null if none
Returns:
a new error status

getConsoleManager

public 
IConsoleManager getConsoleManager()
Returns the console manager. The manager will be created lazily on the first access.

Returns:
IConsoleManager

getStandardDisplay

public static 
Display getStandardDisplay()
Returns the workbench display.


errorDialog

public static void errorDialog(
Shell shell,
                               
String title,
                               
String message,
                               
Throwable t)
Utility method with conventions


getImage

public static 
Image getImage(
String key)
Returns the Image identified by the given key, or null if it does not exist.

Returns:
the Image identified by the given key, or null if it does not exist
Since:
3.1

getImageDescriptor

public static 
ImageDescriptor getImageDescriptor(
String key)
Returns the ImageDescriptor identified by the given key, or null if it does not exist.

Returns:
the ImageDescriptor identified by the given key, or null if it does not exist
Since:
3.1

stop

public void stop(
BundleContext context)
          throws 
Exception
Description copied from class: AbstractUIPlugin
The AbstractUIPlugin implementation of this Plugin method saves this plug-in's preference and dialog stores and shuts down its image registry (if they are in use). Subclasses may extend this method, but must send super last. A try-finally statement should be used where necessary to ensure that super.stop() is always done. Stops this plug-in.

This method should be re-implemented in subclasses that need to do something when the plug-in is shut down. Implementors should call the inherited method as late as possible to ensure that any system requirements can be met.

Plug-in shutdown code should be robust. In particular, this method should always make an effort to shut down the plug-in. Furthermore, the code should not assume that the plug-in was started successfully.

Note 1: If a plug-in has been automatically started, this method will be automatically invoked by the platform when the platform is shut down.

Note 2: This method is intended to perform simple termination of the plug-in environment. The platform may terminate invocations that do not complete in a timely fashion.

Note 3: The supplied bundle context represents the plug-in to the OSGi framework. For security reasons, it is strongly recommended that this object should not be divulged.

Note 4: This method and the Plugin.start(BundleContext) may be called from separate threads, but the OSGi framework ensures that both methods will not be called simultaneously.

Clients must never explicitly call this method.

Specified by:
stop in interface BundleActivator
Overrides:
stop in class AbstractUIPlugin
Parameters:
context - the bundle context for this plug-in
Throws:
Exception - if this method fails to shut down this plug-in

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire