org.eclipse.cdt.ui
Class CUIPlugin

java.lang.Object
  extended by org.eclipse.core.runtime.Plugin
      extended by org.eclipse.ui.plugin.AbstractUIPlugin
          extended by org.eclipse.cdt.ui.CUIPlugin
All Implemented Interfaces:
org.osgi.framework.BundleActivator

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


Field Summary
static java.lang.String BUILDER_ID
           
static java.lang.String C_PROBLEMMARKER
           
static java.lang.String C_PROJECT_WIZARD_ID
           
static java.lang.String CCWIZARD_CATEGORY_ID
           
static java.lang.String CPP_PROJECT_WIZARD_ID
           
static java.lang.String CVIEW_ID
           
static java.lang.String CVIEWS_SCOPE
          The id of the scope used by all the CDT views (value "org.eclipse.cdt.ui.scope").
static java.lang.String CWIZARD_CATEGORY_ID
           
static java.lang.String EDITOR_ID
           
static java.lang.String ID_CALL_HIERARCHY
           
static java.lang.String ID_CBROWSING_PERSPECTIVE
          The id of the C Browsing Perspective (value "org.eclipse.cdt.ui.CBrowsingPerspective").
static java.lang.String ID_CELEMENT_CREATION_ACTION_SET
          The id of the C Element Creation action set (value "org.eclipse.cdt.ui.CElementCreationActionSet").
static java.lang.String ID_CHIERARCHY_PERSPECTIVE
          The id of the C hierarchy perspective (value "org.eclipse.cdt.ui.CHierarchyPerspective").
static java.lang.String ID_CPERSPECTIVE
          The id of the C perspective (value "org.eclipse.cdt.ui.CPerspective").
static java.lang.String ID_INCLUDE_BROWSER
           
static java.lang.String ID_MEMBERS_VIEW
          The view part id of the C Browsing Members view (value "org.eclipse.cdt.ui.MembersView").
static java.lang.String ID_NAMESPACES_VIEW
          The view part id of the C Browsing Namespaces view (value "org.eclipse.cdt.ui.NamespacesView").
static java.lang.String ID_PROJECTS_VIEW
          The view part id of the C Browsing Projects view (value "org.eclipse.cdt.ui.ProjectsView").
static java.lang.String ID_TYPE_HIERARCHY
           
static java.lang.String ID_TYPES_VIEW
          The view part id of the C Browsing Types view (value "org.eclipse.cdt.ui.TypesView").
static java.lang.String PLUGIN_CORE_ID
           
static java.lang.String PLUGIN_ID
           
static java.lang.String SEARCH_ACTION_SET_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
CUIPlugin()
           
 
Method Summary
 void configurePluginDebugOptions()
           
static void createStandardGroups(org.eclipse.jface.action.IMenuManager menu)
          Creates the CUIplugin standard groups in a context menu.
static void errorDialog(org.eclipse.swt.widgets.Shell shell, java.lang.String title, java.lang.String message, org.eclipse.core.runtime.IStatus s, boolean logError)
          Utility method with conventions
static void errorDialog(org.eclipse.swt.widgets.Shell shell, java.lang.String title, java.lang.String message, java.lang.Throwable t, boolean logError)
          Utility method with conventions
static org.eclipse.ui.IWorkbenchPage getActivePage()
           
static org.eclipse.swt.widgets.Shell getActiveWorkbenchShell()
           
static org.eclipse.ui.IWorkbenchWindow getActiveWorkbenchWindow()
           
 AsmTextTools getAsmTextTools()
          Returns the shared assembly text tools
 ASTProvider getASTProvider()
          Returns the AST provider.
 org.eclipse.cdt.internal.core.model.IBufferFactory getBufferFactory()
           
 CEditorTextHoverDescriptor[] getCEditorTextHoverDescriptors()
          Returns all C editor text hovers contributed to the workbench.
 org.eclipse.jface.preference.IPreferenceStore getCombinedPreferenceStore()
          Returns a combined preference store, this store is read-only.
 IBuildConsoleManager getConsoleManager()
          Return the default console manager.
 IBuildConsoleManager getConsoleManager(java.lang.String name, java.lang.String id)
          Return a console manager specified by id.
 org.eclipse.cdt.core.model.CoreModel getCoreModel()
           
static CUIPlugin getDefault()
           
static org.eclipse.ui.IEditorPart[] getDirtyEditors()
          Returns an array of all editors that have an unsaved content.
 CDocumentProvider getDocumentProvider()
          Returns the used document provider
 ExternalSearchDocumentProvider getExternalSearchDocumentProvider()
          Returns the used external search document provider
 CFoldingStructureProviderRegistry getFoldingStructureProviderRegistry()
          Returns the registry of the extensions to the org.eclipse.jdt.ui.javaFoldingStructureProvider extension point.
static java.lang.String getFormattedString(java.lang.String key, java.lang.String arg)
           
static java.lang.String getFormattedString(java.lang.String key, java.lang.String[] args)
           
static ImageDescriptorRegistry getImageDescriptorRegistry()
           
static org.eclipse.ui.IEditorPart[] getInstanciatedEditors()
          Returns an array of all instanciated editors.
static java.lang.String getPluginId()
           
 ProblemMarkerManager getProblemMarkerManager()
          Returns the problem marker manager
static java.util.ResourceBundle getResourceBundle()
           
static java.lang.String getResourceString(java.lang.String key)
           
 org.eclipse.jface.text.source.ISharedTextColors getSharedTextColors()
           
static org.eclipse.cdt.core.model.IWorkingCopy[] getSharedWorkingCopies()
           
 org.eclipse.swt.widgets.Shell getShell()
          Answers the Shell associated with the active workbench, or one of the windows associated with the workbench.
static org.eclipse.swt.widgets.Display getStandardDisplay()
          Returns the standard display to be used.
 org.eclipse.jface.text.templates.ContextTypeRegistry getTemplateContextRegistry()
          Returns the template context type registry for the C plugin.
 org.eclipse.jface.text.templates.persistence.TemplateStore getTemplateStore()
          Returns the template store for the C editor templates.
 CTextTools getTextTools()
          Returns the shared text tools
 IWorkingCopyManager getWorkingCopyManager()
          Returns the working copy manager
static org.eclipse.core.resources.IWorkspace getWorkspace()
           
 void log(org.eclipse.core.runtime.IStatus status)
           
 void log(java.lang.Throwable e)
           
 void logErrorMessage(java.lang.String message)
           
 void resetCEditorTextHoverDescriptors()
          Resets the C editor text hovers contributed to the workbench.
 void start(org.osgi.framework.BundleContext context)
           
 void stop(org.osgi.framework.BundleContext context)
           
 
Methods inherited from class org.eclipse.ui.plugin.AbstractUIPlugin
getDialogSettings, getImageRegistry, getPreferenceStore, getWorkbench, imageDescriptorFromPlugin, 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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PLUGIN_ID

public static final java.lang.String PLUGIN_ID
See Also:
Constant Field Values

PLUGIN_CORE_ID

public static final java.lang.String PLUGIN_CORE_ID
See Also:
Constant Field Values

EDITOR_ID

public static final java.lang.String EDITOR_ID
See Also:
Constant Field Values

CVIEW_ID

public static final java.lang.String CVIEW_ID
See Also:
Constant Field Values

C_PROBLEMMARKER

public static final java.lang.String C_PROBLEMMARKER
See Also:
Constant Field Values

ID_INCLUDE_BROWSER

public static final java.lang.String ID_INCLUDE_BROWSER
See Also:
Constant Field Values

ID_CALL_HIERARCHY

public static final java.lang.String ID_CALL_HIERARCHY
See Also:
Constant Field Values

ID_TYPE_HIERARCHY

public static final java.lang.String ID_TYPE_HIERARCHY
See Also:
Constant Field Values

C_PROJECT_WIZARD_ID

public static final java.lang.String C_PROJECT_WIZARD_ID
See Also:
Constant Field Values

CPP_PROJECT_WIZARD_ID

public static final java.lang.String CPP_PROJECT_WIZARD_ID
See Also:
Constant Field Values

CWIZARD_CATEGORY_ID

public static final java.lang.String CWIZARD_CATEGORY_ID
See Also:
Constant Field Values

CCWIZARD_CATEGORY_ID

public static final java.lang.String CCWIZARD_CATEGORY_ID
See Also:
Constant Field Values

SEARCH_ACTION_SET_ID

public static final java.lang.String SEARCH_ACTION_SET_ID
See Also:
Constant Field Values

BUILDER_ID

public static final java.lang.String BUILDER_ID
See Also:
Constant Field Values

ID_CPERSPECTIVE

public static final java.lang.String ID_CPERSPECTIVE
The id of the C perspective (value "org.eclipse.cdt.ui.CPerspective").

See Also:
Constant Field Values

ID_CHIERARCHY_PERSPECTIVE

public static final java.lang.String ID_CHIERARCHY_PERSPECTIVE
The id of the C hierarchy perspective (value "org.eclipse.cdt.ui.CHierarchyPerspective").

See Also:
Constant Field Values

ID_CBROWSING_PERSPECTIVE

public static final java.lang.String ID_CBROWSING_PERSPECTIVE
The id of the C Browsing Perspective (value "org.eclipse.cdt.ui.CBrowsingPerspective").

Since:
2.0
See Also:
Constant Field Values

ID_PROJECTS_VIEW

public static java.lang.String ID_PROJECTS_VIEW
The view part id of the C Browsing Projects view (value "org.eclipse.cdt.ui.ProjectsView").

Since:
2.0

ID_NAMESPACES_VIEW

public static java.lang.String ID_NAMESPACES_VIEW
The view part id of the C Browsing Namespaces view (value "org.eclipse.cdt.ui.NamespacesView").

Since:
2.0

ID_TYPES_VIEW

public static java.lang.String ID_TYPES_VIEW
The view part id of the C Browsing Types view (value "org.eclipse.cdt.ui.TypesView").

Since:
2.0

ID_MEMBERS_VIEW

public static java.lang.String ID_MEMBERS_VIEW
The view part id of the C Browsing Members view (value "org.eclipse.cdt.ui.MembersView").

Since:
2.0

ID_CELEMENT_CREATION_ACTION_SET

public static final java.lang.String ID_CELEMENT_CREATION_ACTION_SET
The id of the C Element Creation action set (value "org.eclipse.cdt.ui.CElementCreationActionSet").

Since:
2.0
See Also:
Constant Field Values

CVIEWS_SCOPE

public static final java.lang.String CVIEWS_SCOPE
The id of the scope used by all the CDT views (value "org.eclipse.cdt.ui.scope").

Since:
4.0
See Also:
Constant Field Values
Constructor Detail

CUIPlugin

public CUIPlugin()
Method Detail

getBufferFactory

public org.eclipse.cdt.internal.core.model.IBufferFactory getBufferFactory()

getSharedWorkingCopies

public static org.eclipse.cdt.core.model.IWorkingCopy[] getSharedWorkingCopies()

getResourceString

public static java.lang.String getResourceString(java.lang.String key)

getWorkspace

public static org.eclipse.core.resources.IWorkspace getWorkspace()

getFormattedString

public static java.lang.String getFormattedString(java.lang.String key,
                                                  java.lang.String arg)

getFormattedString

public static java.lang.String getFormattedString(java.lang.String key,
                                                  java.lang.String[] args)

getResourceBundle

public static java.util.ResourceBundle getResourceBundle()

getActiveWorkbenchWindow

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

getActivePage

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

getActiveWorkbenchShell

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

getDefault

public static CUIPlugin getDefault()

log

public void log(java.lang.Throwable e)

log

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

logErrorMessage

public void logErrorMessage(java.lang.String message)

errorDialog

public static void errorDialog(org.eclipse.swt.widgets.Shell shell,
                               java.lang.String title,
                               java.lang.String message,
                               org.eclipse.core.runtime.IStatus s,
                               boolean logError)
Utility method with conventions

Parameters:
logError - TODO

errorDialog

public static void errorDialog(org.eclipse.swt.widgets.Shell shell,
                               java.lang.String title,
                               java.lang.String message,
                               java.lang.Throwable t,
                               boolean logError)
Utility method with conventions

Parameters:
logError - TODO

getDocumentProvider

public CDocumentProvider getDocumentProvider()
Returns the used document provider


getExternalSearchDocumentProvider

public ExternalSearchDocumentProvider getExternalSearchDocumentProvider()
Returns the used external search document provider


getWorkingCopyManager

public IWorkingCopyManager getWorkingCopyManager()
Returns the working copy manager

Returns:
IWorkingCopyManager

getTextTools

public CTextTools getTextTools()
Returns the shared text tools


getAsmTextTools

public AsmTextTools getAsmTextTools()
Returns the shared assembly text tools


getConsoleManager

public IBuildConsoleManager getConsoleManager()
Return the default console manager.

Returns:
IBuildConsoleManager

getConsoleManager

public IBuildConsoleManager getConsoleManager(java.lang.String name,
                                              java.lang.String id)
Return a console manager specified by id.

Parameters:
name - console name
id - console id
Returns:
IBuildConsoleManager

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

getCoreModel

public org.eclipse.cdt.core.model.CoreModel getCoreModel()

getPluginId

public static java.lang.String getPluginId()

getImageDescriptorRegistry

public static ImageDescriptorRegistry getImageDescriptorRegistry()

getProblemMarkerManager

public ProblemMarkerManager getProblemMarkerManager()
Returns the problem marker manager


getSharedTextColors

public org.eclipse.jface.text.source.ISharedTextColors getSharedTextColors()

configurePluginDebugOptions

public void configurePluginDebugOptions()

getCombinedPreferenceStore

public org.eclipse.jface.preference.IPreferenceStore getCombinedPreferenceStore()
Returns a combined preference store, this store is read-only.

Returns:
the combined preference store
Since:
3.0

getDirtyEditors

public static org.eclipse.ui.IEditorPart[] getDirtyEditors()
Returns an array of all editors that have an unsaved content. If the identical content is presented in more than one editor, only one of those editor parts is part of the result.

Returns:
an array of all dirty editor parts.

getInstanciatedEditors

public static org.eclipse.ui.IEditorPart[] getInstanciatedEditors()
Returns an array of all instanciated editors.


getStandardDisplay

public static org.eclipse.swt.widgets.Display getStandardDisplay()
Returns the standard display to be used. The method first checks, if the thread calling this method has an associated display. If so, this display is returned. Otherwise the method returns the default display.


createStandardGroups

public static void createStandardGroups(org.eclipse.jface.action.IMenuManager menu)
Creates the CUIplugin standard groups in a context menu.


getCEditorTextHoverDescriptors

public CEditorTextHoverDescriptor[] getCEditorTextHoverDescriptors()
Returns all C editor text hovers contributed to the workbench.

Returns:
an array of CEditorTextHoverDescriptor

resetCEditorTextHoverDescriptors

public void resetCEditorTextHoverDescriptors()
Resets the C editor text hovers contributed to the workbench.

This will force a rebuild of the descriptors the next time a client asks for them.


getFoldingStructureProviderRegistry

public CFoldingStructureProviderRegistry getFoldingStructureProviderRegistry()
Returns the registry of the extensions to the org.eclipse.jdt.ui.javaFoldingStructureProvider extension point.

Returns:
the registry of contributed IJavaFoldingStructureProvider
Since:
3.0

getTemplateContextRegistry

public org.eclipse.jface.text.templates.ContextTypeRegistry getTemplateContextRegistry()
Returns the template context type registry for the C plugin.

Returns:
the template context type registry for the C plugin
Since:
3.0

getTemplateStore

public org.eclipse.jface.text.templates.persistence.TemplateStore getTemplateStore()
Returns the template store for the C editor templates.

Returns:
the template store for the C editor templates
Since:
3.0

getASTProvider

public ASTProvider getASTProvider()
Returns the AST provider.

Returns:
the AST provider
Since:
4.0

getShell

public org.eclipse.swt.widgets.Shell getShell()
Answers the Shell associated with the active workbench, or one of the windows associated with the workbench.