FRBDK/Glue/Glue/Plugins/PluginManager.cs
/// <summary>
/// Raised when the user clicks the menu item to open a project.  This allows plugins to handle opening projects in other
/// IDEs (like Eclipse).
/// </summary>
/// <param name="projectName">The name of the project being opened.</param>
/// <returns>Whether any plugin handled the opening of the project.</returns>
Raised when the user clicks the menu item to open a project.  This allows plugins to handle opening projects in other
IDEs (like Eclipse).
Raised when the user clicks the menu item to open a project . This allows plugins to handle opening projects in other IDEs ( like Eclipse ) .
internal static bool OpenProject(string projectName)
        {
            foreach (PluginManager pluginManager in mInstances)
            {
                foreach (var openVisualStudio in pluginManager.OpenVisualStudioPlugins)
                {
                    PluginContainer container = pluginManager.mPluginContainers[openVisualStudio];
                    if (container.IsEnabled)
                    {
                        IOpenVisualStudio studio = openVisualStudio;
                        bool shouldReturnTrue = false;
                        PluginCommandWithThrow(() =>
                            {
                                if (studio.OpenProject(projectName))
                                {
                                    shouldReturnTrue = true;
                                }
                            },container, "Failed to Open Project.");
                        if (shouldReturnTrue) return true;
                    }
                }
                var plugins = pluginManager.ImportedPlugins.Where(x => x.OpenProjectHandler != null);
                foreach (var plugin in plugins)
                {
                    var container = pluginManager.mPluginContainers[plugin];
                    if (container.IsEnabled)
                    {
                        PluginBase plugin1 = plugin;
                        bool shouldReturnTrue = false;
                        PluginCommand(() =>
                            {
                                if (plugin1.OpenProjectHandler(projectName))
                                {
                                    shouldReturnTrue = true;
                                }
                            },container, "Failed to Open Project");
                        if (shouldReturnTrue) return true;
                    }
                }
            }
            return false;
        }
internal static bool OpenProject ( string projectName ) { foreach ( PluginManager pluginManager in mInstances ) { foreach ( var openVisualStudio in pluginManager . OpenVisualStudioPlugins ) { PluginContainer container = pluginManager . mPluginContainers [ openVisualStudio ] ; if ( container . IsEnabled ) { IOpenVisualStudio studio = openVisualStudio ; bool shouldReturnTrue = false ; PluginCommandWithThrow ( ( ) => { if ( studio . OpenProject ( projectName ) ) { shouldReturnTrue = true ; } } , container , " " ) ; if ( shouldReturnTrue ) return true ; } } var plugins = pluginManager . ImportedPlugins . Where ( x => x . OpenProjectHandler != null ) ; foreach ( var plugin in plugins ) { var container = pluginManager . mPluginContainers [ plugin ] ; if ( container . IsEnabled ) { PluginBase plugin1 = plugin ; bool shouldReturnTrue = false ; PluginCommand ( ( ) => { if ( plugin1 . OpenProjectHandler ( projectName ) ) { shouldReturnTrue = true ; } } , container , " " ) ; if ( shouldReturnTrue ) return true ; } } } return false ; }
Raised when the user clicks the menu item to open a project.
Raised when the user clicks the menu item to open a project .
// Execute the new style plugins
Whether any plugin handled the opening of the project.
Whether any plugin handled the opening of the project .
projectName
string
The name of the project being opened.
The name of the project being opened .