org.eclipse.m2m.atl.adt.ui
Class AtlUIPlugin

java.lang.Object
  extended by org.eclipse.core.runtime.Plugin
      extended by org.eclipse.ui.plugin.AbstractUIPlugin
          extended by org.eclipse.m2m.atl.adt.ui.AtlUIPlugin
All Implemented Interfaces:
org.osgi.framework.BundleActivator

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

The main plugin class to be used in the desktop. This class is necessary for every plug-in because it used by Eclipse to dialog with it and its extensions.


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
AtlUIPlugin()
          Deprecated.  
 
Method Summary
static org.eclipse.ui.IWorkbenchPage getActivePage()
           
static AtlUIPlugin getDefault()
          Returns the shared instance of the plug-in.
 org.eclipse.swt.graphics.Image getImage(java.lang.String path)
          Returns the Image at the given path.
static org.eclipse.jface.resource.ImageDescriptor getImageDescriptor(java.lang.String name)
          Returns the image descriptor with the given relative path.
static java.lang.String getPluginId()
           
 ProblemMarkerManager getProblemMarkerManager()
          Returns the problem markers manager.
 java.util.ResourceBundle getResourceBundle()
          Returns the plugin's resource bundle.
static java.lang.String getResourceString(java.lang.String key)
          Returns the string from the plugin's resource bundle, or 'key' if not found.
 AtlTextTools getTextTools()
          Gets the ATL text tools used by the plug-in.
protected  void initializeDefaultPreferences(org.eclipse.jface.preference.IPreferenceStore store)
          
 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, 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

AtlUIPlugin

public AtlUIPlugin()
Deprecated. 

Creates a new instance of the ATL plug-in. Use the AbstractUIPlugin constructor to define it, and try to get the resource bundle.

Method Detail

getProblemMarkerManager

public ProblemMarkerManager getProblemMarkerManager()
Returns the problem markers manager.

Returns:
the problem markers manager

getResourceBundle

public java.util.ResourceBundle getResourceBundle()
Returns the plugin's resource bundle.

Returns:
the plugin's resource bundle

getTextTools

public AtlTextTools getTextTools()
Gets the ATL text tools used by the plug-in. If it doesn't exists, create a new one with the default preference fPreferenceeStore.

Returns:
the text tools.

initializeDefaultPreferences

protected void initializeDefaultPreferences(org.eclipse.jface.preference.IPreferenceStore store)

Overrides:
initializeDefaultPreferences in class org.eclipse.ui.plugin.AbstractUIPlugin
See Also:
AbstractUIPlugin.initializeDefaultPreferences(org.eclipse.jface.preference.IPreferenceStore)

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
See Also:
AbstractUIPlugin.stop(org.osgi.framework.BundleContext)

getImage

public org.eclipse.swt.graphics.Image getImage(java.lang.String path)
Returns the Image at the given path.

Parameters:
path - the image path
Returns:
the Image

getActivePage

public static org.eclipse.ui.IWorkbenchPage getActivePage()

getDefault

public static AtlUIPlugin getDefault()
Returns the shared instance of the plug-in.

Returns:
the shared instance of the plug-in

getImageDescriptor

public static org.eclipse.jface.resource.ImageDescriptor getImageDescriptor(java.lang.String name)
Returns the image descriptor with the given relative path.

Parameters:
name - the image name
Returns:
the image descriptor with the given relative path

getPluginId

public static java.lang.String getPluginId()

getResourceString

public static java.lang.String getResourceString(java.lang.String key)
Returns the string from the plugin's resource bundle, or 'key' if not found.

Parameters:
key - the default value
Returns:
the string from the plugin's resource bundle, or 'key' if not found

Copyright 2007 IBM Corporation and others.
All Rights Reserved.