Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.port80.eclipse.jdt
Class JdtPlugin  view JdtPlugin download JdtPlugin.java

java.lang.Object
  extended byorg.eclipse.core.runtime.Plugin
      extended byorg.eclipse.ui.plugin.AbstractUIPlugin
          extended bycom.port80.eclipse.jdt.JdtPlugin
All Implemented Interfaces:
org.osgi.framework.BundleActivator

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

The main plugin class to be used in the desktop.


Nested Class Summary
 
Nested classes inherited from class org.eclipse.ui.plugin.AbstractUIPlugin
 
Field Summary
private static boolean DEBUG
           
private  com.port80.eclipse.jdt.annotation.AnnotationManager fAnnotationManager
           
private  org.eclipse.jface.action.IAction fBackwardAction
           
private  org.eclipse.swt.dnd.Clipboard fClipboard
           
private  com.port80.eclipse.jdt.history.EditorHistory fEditorHistory
           
private  org.eclipse.jface.action.IAction fForwardAction
           
private  org.eclipse.ui.IPartListener fPartListener
           
private  java.lang.String fPluginPath
           
private  ThemeManager fThemeManager
           
private static java.lang.String ID
           
private static java.lang.String NAME
           
private static JdtPlugin plugin
           
private  java.util.ResourceBundle resourceBundle
           
static int RET_CANCEL
           
static int RET_FAIL
           
static int RET_OK
           
static int RET_RESET
           
private static java.lang.String TAG_ROOT
           
private static java.lang.String TAG_VERSION
           
private static boolean TRACE
           
private static boolean VERBOSE
           
private static java.lang.String[] VERSIONS
           
 
Fields inherited from class org.eclipse.ui.plugin.AbstractUIPlugin
 
Fields inherited from class org.eclipse.core.runtime.Plugin
PLUGIN_PREFERENCE_SCOPE, PREFERENCES_DEFAULT_OVERRIDE_BASE_NAME, PREFERENCES_DEFAULT_OVERRIDE_FILE_NAME
 
Constructor Summary
JdtPlugin(org.eclipse.core.runtime.IPluginDescriptor descriptor)
           
 
Method Summary
 void enableEditorHistory()
           
static org.eclipse.swt.widgets.Shell getActiveWorkbenchShell()
           
static org.eclipse.ui.IWorkbenchWindow getActiveWorkbenchWindow()
           
static com.port80.eclipse.jdt.annotation.AnnotationManager getAnnotationManager()
           
static org.eclipse.swt.dnd.Clipboard getClipboard()
           
static org.eclipse.swt.graphics.Color getColor(java.lang.String name)
           
static org.eclipse.swt.graphics.Cursor getCursor(java.lang.String name)
           
static JdtPlugin getDefault()
          Returns the shared instance.
static com.port80.eclipse.jdt.history.EditorHistory getEditorHistory()
           
static org.eclipse.swt.graphics.Font getFont(java.lang.String name)
           
static int getIntDef(org.eclipse.ui.IMemento m, java.lang.String key, int def)
           
static java.lang.String getPluginId()
           
 java.lang.String getPluginPath()
           
 java.util.ResourceBundle getResourceBundle()
          Returns the plugin's resource bundle,
static java.lang.String getString(java.lang.String key)
          Returns the string from the plugin's resource bundle, or 'key' if not found.
static java.lang.String getString(java.lang.String classname, java.lang.String method, java.lang.String key)
           
static ThemeManager getThemeManager()
           
static org.eclipse.core.resources.IWorkspace getWorkspace()
          Returns the workspace instance.
protected  void initializeDefaultPreferences(org.eclipse.jface.preference.IPreferenceStore store)
          Initializes a preference store with default preference values for this plug-in.
static void log(org.eclipse.core.runtime.IStatus status)
           
static void log(java.lang.String message)
           
static void log(java.lang.String message, java.lang.Exception e)
           
static void log(java.lang.String prefix, org.eclipse.jdt.core.IJavaElement element, java.lang.Exception e)
           
static java.lang.String msg(java.lang.String prefix, org.eclipse.jdt.core.IJavaElement e)
           
private  boolean restoreState(org.eclipse.ui.IMemento memento)
           
 boolean restoreXMLState()
          Restore state from state file in metadata area.
private  void saveState(org.eclipse.ui.IMemento memento)
           
 boolean saveXMLState()
          Save Plugin state to state file in metadata area.
 void shutdown()
          The AbstractUIPlugin implementation of this Plugin method does nothing.
 void startup()
          The AbstractUIPlugin implementation of this Plugin method does nothing.
(package private)  boolean validVersion(org.eclipse.ui.IMemento memento)
          Validate Memento is in valid version format.
 
Methods inherited from class org.eclipse.ui.plugin.AbstractUIPlugin
createImageRegistry, getDialogSettings, getImageRegistry, getPreferenceStore, getWorkbench, imageDescriptorFromPlugin, initializeDefaultPluginPreferences, initializeImageRegistry, loadDialogSettings, loadPreferenceStore, refreshPluginActions, saveDialogSettings, savePreferenceStore, start, stop
 
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

NAME

private static final java.lang.String NAME
See Also:
Constant Field Values

ID

private static final java.lang.String ID
See Also:
Constant Field Values

TAG_ROOT

private static final java.lang.String TAG_ROOT
See Also:
Constant Field Values

TAG_VERSION

private static final java.lang.String TAG_VERSION
See Also:
Constant Field Values

VERSIONS

private static final java.lang.String[] VERSIONS

DEBUG

private static final boolean DEBUG
See Also:
Constant Field Values

TRACE

private static final boolean TRACE
See Also:
Constant Field Values

VERBOSE

private static final boolean VERBOSE
See Also:
Constant Field Values

RET_FAIL

public static final int RET_FAIL
See Also:
Constant Field Values

RET_OK

public static final int RET_OK
See Also:
Constant Field Values

RET_CANCEL

public static final int RET_CANCEL
See Also:
Constant Field Values

RET_RESET

public static final int RET_RESET
See Also:
Constant Field Values

plugin

private static JdtPlugin plugin

resourceBundle

private java.util.ResourceBundle resourceBundle

fPluginPath

private java.lang.String fPluginPath

fClipboard

private org.eclipse.swt.dnd.Clipboard fClipboard

fThemeManager

private ThemeManager fThemeManager

fAnnotationManager

private com.port80.eclipse.jdt.annotation.AnnotationManager fAnnotationManager

fForwardAction

private org.eclipse.jface.action.IAction fForwardAction

fBackwardAction

private org.eclipse.jface.action.IAction fBackwardAction

fEditorHistory

private com.port80.eclipse.jdt.history.EditorHistory fEditorHistory

fPartListener

private org.eclipse.ui.IPartListener fPartListener
Constructor Detail

JdtPlugin

public JdtPlugin(org.eclipse.core.runtime.IPluginDescriptor descriptor)
Method Detail

initializeDefaultPreferences

protected void initializeDefaultPreferences(org.eclipse.jface.preference.IPreferenceStore store)
Description copied from class: org.eclipse.ui.plugin.AbstractUIPlugin
Initializes a preference store with default preference values for this plug-in.

This method is called after the preference store is initially loaded (default values are never stored in preference stores).

The default implementation of this method does nothing. Subclasses should reimplement this method if the plug-in has any preferences.

A subclass may reimplement this method to set default values for the preference store using JFace API. This is the older way of initializing default values. If this method is reimplemented, do not override initializeDefaultPluginPreferences().


startup

public void startup()
             throws org.eclipse.core.runtime.CoreException
Description copied from class: org.eclipse.ui.plugin.AbstractUIPlugin
The AbstractUIPlugin implementation of this Plugin method does nothing. Subclasses may extend this method, but must send super first.

WARNING: Plug-ins may not be started in the UI thread. The startup() method should not assume that its code runs in the UI thread, otherwise SWT thread exceptions may occur on startup.'


shutdown

public void shutdown()
              throws org.eclipse.core.runtime.CoreException
Description copied from class: org.eclipse.ui.plugin.AbstractUIPlugin
The AbstractUIPlugin implementation of this Plugin method does nothing. Subclasses may extend this method, but must send super first.


enableEditorHistory

public void enableEditorHistory()

restoreXMLState

public boolean restoreXMLState()
Restore state from state file in metadata area.


restoreState

private boolean restoreState(org.eclipse.ui.IMemento memento)

saveXMLState

public boolean saveXMLState()
Save Plugin state to state file in metadata area.


saveState

private void saveState(org.eclipse.ui.IMemento memento)

validVersion

boolean validVersion(org.eclipse.ui.IMemento memento)
Validate Memento is in valid version format.


getDefault

public static JdtPlugin getDefault()
Returns the shared instance.


getPluginPath

public java.lang.String getPluginPath()

getWorkspace

public static org.eclipse.core.resources.IWorkspace getWorkspace()
Returns the workspace instance.


getResourceBundle

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


getString

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


getPluginId

public static java.lang.String getPluginId()

getActiveWorkbenchWindow

public static org.eclipse.ui.IWorkbenchWindow getActiveWorkbenchWindow()

getActiveWorkbenchShell

public static org.eclipse.swt.widgets.Shell getActiveWorkbenchShell()

getEditorHistory

public static com.port80.eclipse.jdt.history.EditorHistory getEditorHistory()

getAnnotationManager

public static com.port80.eclipse.jdt.annotation.AnnotationManager getAnnotationManager()

getClipboard

public static org.eclipse.swt.dnd.Clipboard getClipboard()

getThemeManager

public static ThemeManager getThemeManager()

getColor

public static org.eclipse.swt.graphics.Color getColor(java.lang.String name)

getFont

public static org.eclipse.swt.graphics.Font getFont(java.lang.String name)

getCursor

public static org.eclipse.swt.graphics.Cursor getCursor(java.lang.String name)

log

public static void log(org.eclipse.core.runtime.IStatus status)

log

public static void log(java.lang.String message)

log

public static void log(java.lang.String message,
                       java.lang.Exception e)

log

public static void log(java.lang.String prefix,
                       org.eclipse.jdt.core.IJavaElement element,
                       java.lang.Exception e)

msg

public static java.lang.String msg(java.lang.String prefix,
                                   org.eclipse.jdt.core.IJavaElement e)

getString

public static final java.lang.String getString(java.lang.String classname,
                                               java.lang.String method,
                                               java.lang.String key)

getIntDef

public static int getIntDef(org.eclipse.ui.IMemento m,
                            java.lang.String key,
                            int def)