diff options
Diffstat (limited to 'plugins/haskell/haskellplugin.cpp')
-rw-r--r-- | plugins/haskell/haskellplugin.cpp | 43 |
1 files changed, 11 insertions, 32 deletions
diff --git a/plugins/haskell/haskellplugin.cpp b/plugins/haskell/haskellplugin.cpp index c5386a4..d92c4f8 100644 --- a/plugins/haskell/haskellplugin.cpp +++ b/plugins/haskell/haskellplugin.cpp @@ -42,34 +42,28 @@ namespace Haskell { namespace Internal { -HaskellPlugin::HaskellPlugin() +class HaskellPluginPrivate { - // Create your members -} +public: + HaskellEditorFactory editorFactory; + OptionsPage optionsPage; + HaskellBuildConfigurationFactory buildConfigFactory; + StackBuildStepFactory stackBuildStepFactory; + HaskellRunConfigurationFactory runConfigFactory; +}; HaskellPlugin::~HaskellPlugin() { - // Unregister objects from the plugin manager's object pool - // Delete members + delete d; } bool HaskellPlugin::initialize(const QStringList &arguments, QString *errorString) { - // Register objects in the plugin manager's object pool - // Load settings - // Add actions to menus - // Connect to other plugins' signals - // In the initialize function, a plugin can be sure that the plugins it - // depends on have initialized their members. - Q_UNUSED(arguments) Q_UNUSED(errorString) - addAutoReleasedObject(new HaskellEditorFactory); - addAutoReleasedObject(new OptionsPage); - addAutoReleasedObject(new HaskellBuildConfigurationFactory); - addAutoReleasedObject(new StackBuildStepFactory); - addAutoReleasedObject(new HaskellRunConfigurationFactory); + d = new HaskellPluginPrivate; + ProjectExplorer::ProjectManager::registerProjectType<HaskellProject>( Constants::C_HASKELL_PROJECT_MIMETYPE); TextEditor::SnippetProvider::registerGroup(Constants::C_HASKELLSNIPPETSGROUP_ID, @@ -85,20 +79,5 @@ bool HaskellPlugin::initialize(const QStringList &arguments, QString *errorStrin return true; } -void HaskellPlugin::extensionsInitialized() -{ - // Retrieve objects from the plugin manager's object pool - // In the extensionsInitialized function, a plugin can be sure that all - // plugins that depend on it are completely initialized. -} - -ExtensionSystem::IPlugin::ShutdownFlag HaskellPlugin::aboutToShutdown() -{ - // Save settings - // Disconnect from signals that are not needed during shutdown - // Hide UI (if you add UI that is not in the main window directly) - return SynchronousShutdown; -} - } // namespace Internal } // namespace Haskell |