/// /// Copyright © 2003-2008 JetBrains s.r.o. /// You may distribute under the terms of the GNU General Public License, as published by the Free Software Foundation, version 2 (see License.txt in the repository root folder). /// using JetBrains.Omea.CoreServicesEx.ProgressManager; using JetBrains.Omea.OpenAPI; using JetBrains.Omea.OpenApiEx; namespace JetBrains.Omea.CoreServicesEx { /// /// Performs the self-registration of the Progress Manager. /// internal class SelfRegister : IPlugin { #region IPlugin Members /// /// /// Registers the plugin resource types, actions and other services. /// /// /// /// /// /// ///This is the first method called after the plugin is loaded. It should /// be used to register any resource types or services that could be used by other plugins. /// /// /// ///To access the services provided by the core, methods of the static class /// can be used. All core services are already available when this /// method is called. /// /// /// /// public void Register() { string sNameName = OpenAPI.Core.ResourceStore.PropTypes[OpenAPI.Core.Props.Name].Name; OpenAPI.Core.ResourceStore.ResourceTypes.Register(ProgressManagerData._sProgressItemResourceTypeName, ProgressManagerData._sProgressItemResourceTypeName, sNameName, ResourceTypeFlags.Normal, this); OpenAPI.Core.ResourceStore.ResourceTypes.Register(ProgressManagerData._sFolderResourceTypeName, ProgressManagerData._sFolderResourceTypeName, sNameName, ResourceTypeFlags.ResourceContainer); OpenAPI.Core.ResourceStore.PropTypes.Register(ProgressManagerData._sMultiParentLinkName, PropDataType.Link, PropTypeFlags.DirectedLink); OpenAPI.Core.PluginLoader.RegisterPluginService((IProgressManager)(ProgressManager.ProgressManager.Instance)); } /// /// /// Performs the longer initialization activities of the plugin and starts up /// background activities, if any are necessary. /// /// /// /// /// /// ///This is the second method called in the plugin startup sequence. /// It is called after the method has already been called for /// all plugins, so the code in this method can use the services provided by other /// plugins. /// /// /// ///To access the services provided by the core, methods of the static class /// can be used. All core services are already available when this /// method is called. /// /// /// /// public void Startup() { } /// /// /// Terminates the plugin. /// /// /// /// ///If the plugin needs any shutdown activities (like deleting temporary /// files), these should be performed in these method. All services /// are still available when the method is called. /// /// public void Shutdown() { } #endregion } }