aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Ziller <git@eikeziller.de>2017-04-22 21:25:04 +0200
committerEike Ziller <git@eikeziller.de>2017-10-01 20:11:07 +0200
commit3fbbbd1e83b44e1a49a66245cd451b32a591b463 (patch)
treed832983d5320d4e6c0d41f74ec165cf8811a41fa
Start with dummy plugin
-rw-r--r--plugins/haskell/Haskell.json.in11
-rw-r--r--plugins/haskell/config.pri12
-rw-r--r--plugins/haskell/haskell.pro36
-rw-r--r--plugins/haskell/haskell_global.h34
-rw-r--r--plugins/haskell/haskellconstants.h32
-rw-r--r--plugins/haskell/haskellplugin.cpp74
-rw-r--r--plugins/haskell/haskellplugin.h50
7 files changed, 249 insertions, 0 deletions
diff --git a/plugins/haskell/Haskell.json.in b/plugins/haskell/Haskell.json.in
new file mode 100644
index 0000000..daecf89
--- /dev/null
+++ b/plugins/haskell/Haskell.json.in
@@ -0,0 +1,11 @@
+{
+ \"Name\" : \"Haskell\",
+ \"Version\" : \"$$QTCREATOR_VERSION\",
+ \"CompatVersion\" : \"$$QTCREATOR_COMPAT_VERSION\",
+ \"Vendor\" : \"Eike Ziller\",
+ \"Copyright\" : \"(C) Eike Ziller\",
+ \"License\" : \"MIT\",
+ \"Description\" : \"Haskell support\",
+ \"Url\" : \"https://haskell.org\",
+ $$dependencyList
+}
diff --git a/plugins/haskell/config.pri b/plugins/haskell/config.pri
new file mode 100644
index 0000000..0e52377
--- /dev/null
+++ b/plugins/haskell/config.pri
@@ -0,0 +1,12 @@
+# Qt Creator linking
+
+## Either set the IDE_SOURCE_TREE when running qmake,
+## or set the QTC_SOURCE environment variable, to override the default setting
+isEmpty(IDE_SOURCE_TREE): IDE_SOURCE_TREE = $$(QTC_SOURCE)
+isEmpty(IDE_SOURCE_TREE): IDE_SOURCE_TREE = "$$PWD/../../../qtcreator_src"
+
+## Either set the IDE_BUILD_TREE when running qmake,
+## or set the QTC_BUILD environment variable, to override the default setting
+isEmpty(IDE_BUILD_TREE): IDE_BUILD_TREE = $$(QTC_BUILD)
+isEmpty(IDE_BUILD_TREE): IDE_BUILD_TREE = "$$PWD/../../../qtcreator_build"
+
diff --git a/plugins/haskell/haskell.pro b/plugins/haskell/haskell.pro
new file mode 100644
index 0000000..1201d4e
--- /dev/null
+++ b/plugins/haskell/haskell.pro
@@ -0,0 +1,36 @@
+DEFINES += HASKELL_LIBRARY
+
+# Haskell files
+
+SOURCES += haskellplugin.cpp
+
+HEADERS += haskellplugin.h \
+ haskell_global.h \
+ haskellconstants.h
+
+## uncomment to build plugin into user config directory
+## <localappdata>/plugins/<ideversion>
+## where <localappdata> is e.g.
+## "%LOCALAPPDATA%\QtProject\qtcreator" on Windows Vista and later
+## "$XDG_DATA_HOME/data/QtProject/qtcreator" or "~/.local/share/data/QtProject/qtcreator" on Linux
+## "~/Library/Application Support/QtProject/Qt Creator" on OS X
+#USE_USER_DESTDIR = yes
+
+###### If the plugin can be depended upon by other plugins, this code needs to be outsourced to
+###### <dirname>_dependencies.pri, where <dirname> is the name of the directory containing the
+###### plugin's sources.
+
+QTC_PLUGIN_NAME = Haskell
+QTC_LIB_DEPENDS += \
+ # nothing here at this time
+
+QTC_PLUGIN_DEPENDS += \
+ coreplugin
+
+QTC_PLUGIN_RECOMMENDS += \
+ # optional plugin dependencies. nothing here at this time
+
+###### End _dependencies.pri contents ######
+
+include(config.pri)
+include($$IDE_SOURCE_TREE/src/qtcreatorplugin.pri)
diff --git a/plugins/haskell/haskell_global.h b/plugins/haskell/haskell_global.h
new file mode 100644
index 0000000..9452e44
--- /dev/null
+++ b/plugins/haskell/haskell_global.h
@@ -0,0 +1,34 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt Creator.
+**
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+****************************************************************************/
+
+#pragma once
+
+#include <QtGlobal>
+
+#if defined(HASKELL_LIBRARY)
+# define HASKELLSHARED_EXPORT Q_DECL_EXPORT
+#else
+# define HASKELLSHARED_EXPORT Q_DECL_IMPORT
+#endif
diff --git a/plugins/haskell/haskellconstants.h b/plugins/haskell/haskellconstants.h
new file mode 100644
index 0000000..05b5c91
--- /dev/null
+++ b/plugins/haskell/haskellconstants.h
@@ -0,0 +1,32 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt Creator.
+**
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+****************************************************************************/
+
+#pragma once
+
+namespace Haskell {
+namespace Constants {
+
+} // namespace Haskell
+} // namespace Constants
diff --git a/plugins/haskell/haskellplugin.cpp b/plugins/haskell/haskellplugin.cpp
new file mode 100644
index 0000000..1e0c4ab
--- /dev/null
+++ b/plugins/haskell/haskellplugin.cpp
@@ -0,0 +1,74 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt Creator.
+**
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+****************************************************************************/
+
+#include "haskellplugin.h"
+#include "haskellconstants.h"
+
+namespace Haskell {
+namespace Internal {
+
+HaskellPlugin::HaskellPlugin()
+{
+ // Create your members
+}
+
+HaskellPlugin::~HaskellPlugin()
+{
+ // Unregister objects from the plugin manager's object pool
+ // Delete members
+}
+
+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)
+
+ 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
diff --git a/plugins/haskell/haskellplugin.h b/plugins/haskell/haskellplugin.h
new file mode 100644
index 0000000..fd5180d
--- /dev/null
+++ b/plugins/haskell/haskellplugin.h
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt Creator.
+**
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+****************************************************************************/
+
+#pragma once
+
+#include "haskell_global.h"
+
+#include <extensionsystem/iplugin.h>
+
+namespace Haskell {
+namespace Internal {
+
+class HaskellPlugin : public ExtensionSystem::IPlugin
+{
+ Q_OBJECT
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "Haskell.json")
+
+public:
+ HaskellPlugin();
+ ~HaskellPlugin();
+
+ bool initialize(const QStringList &arguments, QString *errorString);
+ void extensionsInitialized();
+ ShutdownFlag aboutToShutdown();
+};
+
+} // namespace Internal
+} // namespace Haskell