java.lang.Object
org.eclipse.core.runtime.Plugin
org.eclipse.ui.plugin.AbstractUIPlugin
com.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.
|
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 |
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
JdtPlugin
public JdtPlugin(org.eclipse.core.runtime.IPluginDescriptor descriptor)
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)