Carbide.c++

com.nokia.carbide.cdt.builder
Class CarbideBuilderPlugin

java.lang.Object
  extended by AbstractUIPlugin
      extended by com.nokia.carbide.cdt.builder.CarbideBuilderPlugin

public class CarbideBuilderPlugin
extends AbstractUIPlugin

The activator class controls the plug-in life cycle


Field Summary
static java.lang.String CARBIDE_BUILDER_EXTENSION_ID
           
static java.lang.String CARBIDE_PROJECT_MARKER
           
static java.lang.String CARBIDE_PROJECT_NATURE_ID
          ID of the Carbide.c++ 1.2 project nature
static java.lang.String CARBIDE_SBSV2_PROJECT_NATURE_ID
          ID of the Carbide.c++ SBSv2 builder project nature
static java.lang.String CORONA_PROJECT_NATURE_ID
          ID of the Carbide.c++ 1.1/1.0 project nature
static QualifiedName LINKED_PROJECT_ROOT_DIRECTORY
           
static java.lang.String PLUGIN_ID
           
static QualifiedName SBSV2_PROJECT
          Qualified named for SBSv2 projects.
 
Constructor Summary
CarbideBuilderPlugin()
          The constructor
 
Method Summary
static void addBuildConfigChangedListener(ICarbideConfigurationChangedListener listener)
           
static void addBuildNature(IProject project)
           
static void addProjectPropertyChangedListener(ICarbideProjectPropertyChangedListener listener)
           
static IMakeBuilderInfo createBuildInfo(IProject project, java.lang.String builderID)
           
static IMakeBuilderInfo createBuildInfo(Preferences prefs, java.lang.String builderID, boolean useDefaults)
           
static void createCarbideProjectMarker(IProject project, int markerSeverity, java.lang.String message, int markerPriority)
           
static void fireBuildConfigChangedChanged(ICarbideBuildConfiguration config)
           
static void fireProjectPropertyChanged(ICarbideProjectInfo cpi)
           
static ICarbideBuildManager getBuildManager()
           
static java.lang.String getCarbideBuilderExtensionID()
           
static CarbideBuilderPlugin getDefault()
          Returns the shared instance
static java.util.List<com.nokia.carbide.cdt.builder.extension.IEnvironmentModifier> getEnvironmentModifierExtensions()
           
static ImageDescriptor getImageDescriptor(java.lang.String path)
          Returns an image descriptor for the image file at the given plug-in relative path.
static IProject getProjectInContext()
          A utility function.
static IPath getProjectRoot(IProject project)
           
static java.util.List<IProject> getProjectsFromSelection(ISelection selection)
          A utility function.
 void handleEvent(CProjectDescriptionEvent event)
           
static void log(IStatus status)
           
static void log(java.lang.Throwable thr, java.lang.String msg)
           
static void removeBuildConfigChangedListener(ICarbideConfigurationChangedListener listener)
           
static void removeProjectPropertyChangedListener(ICarbideProjectPropertyChangedListener listener)
           
 void start(BundleContext context)
           
 void stop(BundleContext context)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PLUGIN_ID

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

CARBIDE_BUILDER_EXTENSION_ID

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

CARBIDE_PROJECT_NATURE_ID

public static final java.lang.String CARBIDE_PROJECT_NATURE_ID
ID of the Carbide.c++ 1.2 project nature

See Also:
Constant Field Values

CORONA_PROJECT_NATURE_ID

public static final java.lang.String CORONA_PROJECT_NATURE_ID
ID of the Carbide.c++ 1.1/1.0 project nature

See Also:
Constant Field Values

CARBIDE_SBSV2_PROJECT_NATURE_ID

public static final java.lang.String CARBIDE_SBSV2_PROJECT_NATURE_ID
ID of the Carbide.c++ SBSv2 builder project nature

Since:
2.0
See Also:
Constant Field Values

LINKED_PROJECT_ROOT_DIRECTORY

public static final QualifiedName LINKED_PROJECT_ROOT_DIRECTORY

SBSV2_PROJECT

public static final QualifiedName SBSV2_PROJECT
Qualified named for SBSv2 projects. This is set as a project session property by project creation wizards for SBSv2 projects so the proper nature will get added.

Since:
2.0

CARBIDE_PROJECT_MARKER

public static final java.lang.String CARBIDE_PROJECT_MARKER
See Also:
Constant Field Values
Constructor Detail

CarbideBuilderPlugin

public CarbideBuilderPlugin()
The constructor

Method Detail

addBuildConfigChangedListener

public static void addBuildConfigChangedListener(ICarbideConfigurationChangedListener listener)

removeBuildConfigChangedListener

public static void removeBuildConfigChangedListener(ICarbideConfigurationChangedListener listener)

fireBuildConfigChangedChanged

public static void fireBuildConfigChangedChanged(ICarbideBuildConfiguration config)

addProjectPropertyChangedListener

public static void addProjectPropertyChangedListener(ICarbideProjectPropertyChangedListener listener)

removeProjectPropertyChangedListener

public static void removeProjectPropertyChangedListener(ICarbideProjectPropertyChangedListener listener)

fireProjectPropertyChanged

public static void fireProjectPropertyChanged(ICarbideProjectInfo cpi)

start

public void start(BundleContext context)
           throws java.lang.Exception
Throws:
java.lang.Exception

stop

public void stop(BundleContext context)
          throws java.lang.Exception
Throws:
java.lang.Exception

getProjectInContext

public static IProject getProjectInContext()
A utility function. Try getting an IProject from the current perspective. The logic used to determine what project to use is as follows: - get the current selection - it doesn't matter which view. if non-empty then try to get the owner project of the selected item - see if either the Project Explorer or the SPN view is open. get the selection from one of those views and get the owning project of the selected item. if both views are open then default to the Project Explorer view selection.

Returns:
the project for ths current context, or null

getProjectsFromSelection

public static java.util.List<IProject> getProjectsFromSelection(ISelection selection)
A utility function. Gets the owning project(s) of the selected object(s) if any

Parameters:
selection - the current selection
Returns:
a list of projects - may be empty

getDefault

public static CarbideBuilderPlugin getDefault()
Returns the shared instance

Returns:
the shared instance

getImageDescriptor

public static ImageDescriptor getImageDescriptor(java.lang.String path)
Returns an image descriptor for the image file at the given plug-in relative path.

Parameters:
path - the path
Returns:
the image descriptor

createBuildInfo

public static IMakeBuilderInfo createBuildInfo(Preferences prefs,
                                               java.lang.String builderID,
                                               boolean useDefaults)

createCarbideProjectMarker

public static void createCarbideProjectMarker(IProject project,
                                              int markerSeverity,
                                              java.lang.String message,
                                              int markerPriority)

createBuildInfo

public static IMakeBuilderInfo createBuildInfo(IProject project,
                                               java.lang.String builderID)
                                        throws CoreException
Throws:
CoreException

getCarbideBuilderExtensionID

public static java.lang.String getCarbideBuilderExtensionID()

addBuildNature

public static void addBuildNature(IProject project)
                           throws CoreException
Throws:
CoreException

getProjectRoot

public static IPath getProjectRoot(IProject project)

log

public static void log(IStatus status)

log

public static void log(java.lang.Throwable thr,
                       java.lang.String msg)

getBuildManager

public static ICarbideBuildManager getBuildManager()

handleEvent

public void handleEvent(CProjectDescriptionEvent event)

getEnvironmentModifierExtensions

public static java.util.List<com.nokia.carbide.cdt.builder.extension.IEnvironmentModifier> getEnvironmentModifierExtensions()

Carbide.c++