org.eclipse.jpt.jaxb.core
Class JptJaxbCorePlugin

java.lang.Object
  extended by org.eclipse.core.runtime.Plugin
      extended by org.eclipse.jpt.jaxb.core.JptJaxbCorePlugin
All Implemented Interfaces:
org.osgi.framework.BundleActivator

public class JptJaxbCorePlugin
extends org.eclipse.core.runtime.Plugin

The Dali JAXB core plug-in lifecycle implementation. A number of globally-available constants and methods.

Provisional API: This class is part of an interim API that is still under development and expected to change significantly before reaching stability. It is available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.

Since:
3.0
Version:
3.0

Field Summary
static java.lang.String CONTENT_PREFIX
           
static java.lang.String CONTENT_PREFIX_
           
static java.lang.String DEFAULT_JAXB_PLATFORM_2_1_PREF_KEY
          The key for storing the default JAXB platform ID for JAXB 2.1 in the workspace preferences.
static java.lang.String DEFAULT_JAXB_PLATFORM_2_2_PREF_KEY
          The key for storing the default JAXB platform ID for JAXB 2.2 in the workspace preferences.
static org.eclipse.core.runtime.content.IContentType JAXB_INDEX_CONTENT_TYPE
          The content type for jaxb.index files
static JptResourceType JAXB_INDEX_RESOURCE_TYPE
          The resource type for jaxb.index files
static org.eclipse.core.runtime.content.IContentType JAXB_PROPERTIES_CONTENT_TYPE
          The content type for jaxb.properties files
static JptResourceType JAXB_PROPERTIES_RESOURCE_TYPE
          The resource type for jaxb.properties files
static java.lang.String PLATFORM_ID_PREF_KEY
          The key for storing the platform id
static java.lang.String PLATFORM_PREF_NODE
          The node for storing a JAXB project's platform in the project's preferences.
static java.lang.String PLUGIN_ID
          The plug-in identifier of Dali JAXB core (value "org.eclipse.jpt.jaxb.core").
static java.lang.String PLUGIN_ID_
           
static java.lang.String SCHEMA_LOCATION_PREF_KEY
          The key for storing a schema location (such as a uri or catalog key) in the project's preferences
static java.lang.String SCHEMA_NAMESPACE_PREF_KEY
          The key for storing a schema namespace in the project's preferences
static java.lang.String SCHEMA_PREF_NODE_PREFIX
          The node prefix for storing a particular JAXB project schema in the project's preferences.
static java.lang.String SCHEMAS_PREF_NODE
          The node for storing a JAXB project's schemas in the project's preferences.
static java.lang.String VALIDATION_MARKER_ID
          The identifier for the JAXB validation marker (value "org.eclipse.jpt.jaxb.core.jaxbProblemMarker").
 
Fields inherited from class org.eclipse.core.runtime.Plugin
PLUGIN_PREFERENCE_SCOPE, PREFERENCES_DEFAULT_OVERRIDE_BASE_NAME, PREFERENCES_DEFAULT_OVERRIDE_FILE_NAME
 
Constructor Summary
JptJaxbCorePlugin()
           
 
Method Summary
static JaxbPlatformDescription getDefaultPlatform(org.eclipse.wst.common.project.facet.core.IProjectFacetVersion jaxbFacetVersion)
          Return the default JaxbPlatformDescription for new JAXB projects with the given JAXB facet version.
static org.eclipse.core.runtime.preferences.IEclipsePreferences getDefaultPreferences()
          Return the default Dali preferences
static JaxbPlatformDescription getJaxbPlatformDescription(org.eclipse.core.resources.IProject project)
          Return the JaxbPlatformDescription associated with the specified Eclipse project.
static java.lang.String getJaxbPlatformId(org.eclipse.core.resources.IProject project)
          Return the JAXB platform ID associated with the specified Eclipse project.
static JaxbPlatformManager getJaxbPlatformManager()
           
static JaxbProject getJaxbProject(org.eclipse.core.resources.IProject project)
          Return the JAXB project corresponding to the specified Eclipse project, or null if unable to associate the specified project with a JAXB project.
static JaxbProjectManager getProjectManager()
          Return the singular JAXB project manager corresponding to the current workspace.
static org.osgi.service.prefs.Preferences getProjectPreferences(org.eclipse.core.resources.IProject project)
           
static java.util.Map<java.lang.String,java.lang.String> getSchemaLocationMap(org.eclipse.core.resources.IProject project)
           
static org.eclipse.core.runtime.preferences.IEclipsePreferences getWorkspacePreferences()
          Return the Dali preferences for the current workspace instance.
static JptJaxbCorePlugin instance()
          Return the singleton plug-in
static void log(org.eclipse.core.runtime.IStatus status)
          Log the specified status.
static void log(java.lang.String msg)
          Log the specified message.
static void log(java.lang.Throwable throwable)
          Log the specified exception or error.
static void setDefaultJaxbPlatform(org.eclipse.wst.common.project.facet.core.IProjectFacetVersion jaxbFacetVersion, JaxbPlatformDescription platform)
          Set the default JaxbPlatformDescription for new JAXB projects with the given JAXB facet version.
static void setJaxbPlatform(org.eclipse.core.resources.IProject project, JaxbPlatformDescription platform)
          Set the JaxbPlatformDescription associated with the specified Eclipse project.
static void setSchemaLocationMap(org.eclipse.core.resources.IProject project, java.util.Map<java.lang.String,java.lang.String> schemaLocationMap)
           
static void setWorkspacePreference(java.lang.String preferenceKey, java.lang.String preferenceValue)
          Set the workspace preference.
 void start(org.osgi.framework.BundleContext context)
           
 void stop(org.osgi.framework.BundleContext context)
           
 
Methods inherited from class org.eclipse.core.runtime.Plugin
find, find, getBundle, getDescriptor, getLog, getPluginPreferences, getStateLocation, internalInitializeDefaultPluginPreferences, isDebugging, openStream, openStream, savePluginPreferences, setDebugging, shutdown, startup, 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
The plug-in identifier of Dali JAXB core (value "org.eclipse.jpt.jaxb.core").

See Also:
Constant Field Values

PLUGIN_ID_

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

PLATFORM_PREF_NODE

public static final java.lang.String PLATFORM_PREF_NODE
The node for storing a JAXB project's platform in the project's preferences.

See Also:
Constant Field Values

PLATFORM_ID_PREF_KEY

public static final java.lang.String PLATFORM_ID_PREF_KEY
The key for storing the platform id

See Also:
Constant Field Values

SCHEMAS_PREF_NODE

public static final java.lang.String SCHEMAS_PREF_NODE
The node for storing a JAXB project's schemas in the project's preferences.

See Also:
Constant Field Values

SCHEMA_PREF_NODE_PREFIX

public static final java.lang.String SCHEMA_PREF_NODE_PREFIX
The node prefix for storing a particular JAXB project schema in the project's preferences. Specific schema nodes are followed by integers ("schema-1", "schema-2", etc.)

See Also:
Constant Field Values

SCHEMA_NAMESPACE_PREF_KEY

public static final java.lang.String SCHEMA_NAMESPACE_PREF_KEY
The key for storing a schema namespace in the project's preferences

See Also:
Constant Field Values

SCHEMA_LOCATION_PREF_KEY

public static final java.lang.String SCHEMA_LOCATION_PREF_KEY
The key for storing a schema location (such as a uri or catalog key) in the project's preferences

See Also:
Constant Field Values

DEFAULT_JAXB_PLATFORM_2_1_PREF_KEY

public static final java.lang.String DEFAULT_JAXB_PLATFORM_2_1_PREF_KEY
The key for storing the default JAXB platform ID for JAXB 2.1 in the workspace preferences.


DEFAULT_JAXB_PLATFORM_2_2_PREF_KEY

public static final java.lang.String DEFAULT_JAXB_PLATFORM_2_2_PREF_KEY
The key for storing the default JAXB platform ID for JAXB 2.2 in the workspace preferences.


VALIDATION_MARKER_ID

public static final java.lang.String VALIDATION_MARKER_ID
The identifier for the JAXB validation marker (value "org.eclipse.jpt.jaxb.core.jaxbProblemMarker").

See Also:
Constant Field Values

JAXB_INDEX_CONTENT_TYPE

public static final org.eclipse.core.runtime.content.IContentType JAXB_INDEX_CONTENT_TYPE
The content type for jaxb.index files


JAXB_INDEX_RESOURCE_TYPE

public static final JptResourceType JAXB_INDEX_RESOURCE_TYPE
The resource type for jaxb.index files


JAXB_PROPERTIES_CONTENT_TYPE

public static final org.eclipse.core.runtime.content.IContentType JAXB_PROPERTIES_CONTENT_TYPE
The content type for jaxb.properties files


JAXB_PROPERTIES_RESOURCE_TYPE

public static final JptResourceType JAXB_PROPERTIES_RESOURCE_TYPE
The resource type for jaxb.properties files


CONTENT_PREFIX

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

CONTENT_PREFIX_

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

JptJaxbCorePlugin

public JptJaxbCorePlugin()
Method Detail

instance

public static JptJaxbCorePlugin instance()
Return the singleton plug-in


getProjectManager

public static JaxbProjectManager getProjectManager()
Return the singular JAXB project manager corresponding to the current workspace.


getJaxbProject

public static JaxbProject getJaxbProject(org.eclipse.core.resources.IProject project)
Return the JAXB project corresponding to the specified Eclipse project, or null if unable to associate the specified project with a JAXB project.


getJaxbPlatformManager

public static JaxbPlatformManager getJaxbPlatformManager()

getDefaultPreferences

public static org.eclipse.core.runtime.preferences.IEclipsePreferences getDefaultPreferences()
Return the default Dali preferences

See Also:
JpaPreferenceInitializer

getWorkspacePreferences

public static org.eclipse.core.runtime.preferences.IEclipsePreferences getWorkspacePreferences()
Return the Dali preferences for the current workspace instance.


setWorkspacePreference

public static void setWorkspacePreference(java.lang.String preferenceKey,
                                          java.lang.String preferenceValue)
Set the workspace preference.


getProjectPreferences

public static org.osgi.service.prefs.Preferences getProjectPreferences(org.eclipse.core.resources.IProject project)

setDefaultJaxbPlatform

public static void setDefaultJaxbPlatform(org.eclipse.wst.common.project.facet.core.IProjectFacetVersion jaxbFacetVersion,
                                          JaxbPlatformDescription platform)
Set the default JaxbPlatformDescription for new JAXB projects with the given JAXB facet version.


getDefaultPlatform

public static JaxbPlatformDescription getDefaultPlatform(org.eclipse.wst.common.project.facet.core.IProjectFacetVersion jaxbFacetVersion)
Return the default JaxbPlatformDescription for new JAXB projects with the given JAXB facet version.


getJaxbPlatformId

public static java.lang.String getJaxbPlatformId(org.eclipse.core.resources.IProject project)
Return the JAXB platform ID associated with the specified Eclipse project.


getJaxbPlatformDescription

public static JaxbPlatformDescription getJaxbPlatformDescription(org.eclipse.core.resources.IProject project)
Return the JaxbPlatformDescription associated with the specified Eclipse project.


setJaxbPlatform

public static void setJaxbPlatform(org.eclipse.core.resources.IProject project,
                                   JaxbPlatformDescription platform)
Set the JaxbPlatformDescription associated with the specified Eclipse project.


getSchemaLocationMap

public static java.util.Map<java.lang.String,java.lang.String> getSchemaLocationMap(org.eclipse.core.resources.IProject project)

setSchemaLocationMap

public static void setSchemaLocationMap(org.eclipse.core.resources.IProject project,
                                        java.util.Map<java.lang.String,java.lang.String> schemaLocationMap)

log

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


log

public static void log(java.lang.String msg)
Log the specified message.


log

public static void log(java.lang.Throwable throwable)
Log the specified exception or error.


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.core.runtime.Plugin
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.core.runtime.Plugin
Throws:
java.lang.Exception