Esempio n. 1
0
File: Jiffa.cs Progetto: mo5h/omeo
        ///<summary>
        ///
        ///            Registers the plugin resource types, actions and other services.
        ///
        ///</summary>
        ///
        ///<remarks>
        ///
        ///<para>
        ///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.
        ///</para>
        ///
        ///<para>
        ///To access the services provided by the core, methods of the static class
        ///            <see cref="T:JetBrains.Omea.OpenAPI.Core" /> can be used. All core services are already available when this
        ///            method is called.
        ///</para>
        ///
        ///</remarks>
        ///
        public void Register()
        {
            try
            {
                Core.PluginLoader.RegisterPluginService(this);

                RegisterActions();

                JiraServer.Register(this);
                SubmitterOptionsPane.Register(this);

                Core.TabManager.RegisterResourceTypeTab(Name, Stringtable.Jira, new string[] { Types.JiraServer, Types.JiraProject, Types.JiraComponent, Types.JiraIssueType, Types.JiraPriority, Types.JiraStatus, Types.JiraCustomField, Types.JiraUser }, Core.Props.Parent, 10);
                IResourceTreePane pane = Core.LeftSidebar.RegisterResourceStructureTreePane(Name, Name, Stringtable.Jira, null, JiraServer.Type);
                pane.ParentProperty       = Core.Props.Parent;
                pane.WorkspaceFilterTypes = new string[] { Types.JiraServer, Types.JiraProject, Types.JiraComponent, Types.JiraIssueType, Types.JiraPriority, Types.JiraStatus, Types.JiraCustomField, Types.JiraUser };
                pane.AddNodeFilter(new ResourceTreePaneNodeFilter());
            }
            catch (Exception ex)
            {
                Core.ReportException(ex, false);
            }
        }