[gnome-builder] libide: add stub implementations
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] libide: add stub implementations
- Date: Mon, 23 Mar 2015 23:26:48 +0000 (UTC)
commit a17134923d6b5d71367c9acfa8bfc16bbe15e481
Author: Christian Hergert <christian hergert me>
Date: Wed Feb 11 21:28:55 2015 -0800
libide: add stub implementations
libide/Makefile.am | 2 +
libide/c/ide-c-indenter.c | 89 +++++++++++++++++++++++
libide/clang/ide-clang-diagnostic-provider.c | 98 ++++++++++++++++++++++++++
libide/clang/ide-clang-highlighter.c | 96 +++++++++++++++++++++++++
libide/clang/ide-clang-symbol-resolver.c | 94 ++++++++++++++++++++++++
libide/ide-refactory.c | 75 ++++----------------
6 files changed, 392 insertions(+), 62 deletions(-)
---
diff --git a/libide/Makefile.am b/libide/Makefile.am
index 10e9997..70551c5 100644
--- a/libide/Makefile.am
+++ b/libide/Makefile.am
@@ -13,6 +13,8 @@ libide_la_SOURCES = \
libide/c/ide-c-language.h \
libide/clang/ide-clang-diagnostic-provider.c \
libide/clang/ide-clang-diagnostic-provider.h \
+ libide/clang/ide-clang-highlighter.c \
+ libide/clang/ide-clang-highlighter.h \
libide/clang/ide-clang-private.h \
libide/clang/ide-clang-service.c \
libide/clang/ide-clang-service.h \
diff --git a/libide/c/ide-c-indenter.c b/libide/c/ide-c-indenter.c
index e69de29..926dd2d 100644
--- a/libide/c/ide-c-indenter.c
+++ b/libide/c/ide-c-indenter.c
@@ -0,0 +1,89 @@
+/* ide-c-indenter.c
+ *
+ * Copyright (C) 2015 Christian Hergert <christian hergert me>
+ *
+ * This file is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This file is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <glib/gi18n.h>
+
+#include "ide-c-indenter.h"
+
+typedef struct
+{
+ void *foo;
+} IdeCIndenterPrivate;
+
+G_DEFINE_TYPE_WITH_PRIVATE (IdeCIndenter, ide_c_indenter, IDE_TYPE_INDENTER)
+
+enum {
+ PROP_0,
+ LAST_PROP
+};
+
+static GParamSpec *gParamSpecs [LAST_PROP];
+
+static void
+ide_c_indenter_finalize (GObject *object)
+{
+ IdeCIndenter *self = (IdeCIndenter *)object;
+ IdeCIndenterPrivate *priv = ide_c_indenter_get_instance_private (self);
+
+ G_OBJECT_CLASS (ide_c_indenter_parent_class)->finalize (object);
+}
+
+static void
+ide_c_indenter_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ IdeCIndenter *self = IDE_C_INDENTER (object);
+
+ switch (prop_id)
+ {
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ }
+}
+
+static void
+ide_c_indenter_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ IdeCIndenter *self = IDE_C_INDENTER (object);
+
+ switch (prop_id)
+ {
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ }
+}
+
+static void
+ide_c_indenter_class_init (IdeCIndenterClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ object_class->finalize = ide_c_indenter_finalize;
+ object_class->get_property = ide_c_indenter_get_property;
+ object_class->set_property = ide_c_indenter_set_property;
+}
+
+static void
+ide_c_indenter_init (IdeCIndenter *self)
+{
+}
diff --git a/libide/clang/ide-clang-diagnostic-provider.c b/libide/clang/ide-clang-diagnostic-provider.c
index e69de29..24af295 100644
--- a/libide/clang/ide-clang-diagnostic-provider.c
+++ b/libide/clang/ide-clang-diagnostic-provider.c
@@ -0,0 +1,98 @@
+/* ide-clang-diagnostic-provider.c
+ *
+ * Copyright (C) 2015 Christian Hergert <christian hergert me>
+ *
+ * This file is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This file is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <glib/gi18n.h>
+
+#include "ide-clang-diagnostic-provider.h"
+#include "ide-clang-service.h"
+
+typedef struct
+{
+ void *foo;
+} IdeClangDiagnosticProviderPrivate;
+
+G_DEFINE_TYPE_WITH_PRIVATE (IdeClangDiagnosticProvider,
+ ide_clang_diagnostic_provider,
+ IDE_TYPE_DIAGNOSTIC_PROVIDER)
+
+enum {
+ PROP_0,
+ LAST_PROP
+};
+
+static GParamSpec *gParamSpecs [LAST_PROP];
+
+IdeClangDiagnosticProvider *
+ide_clang_diagnostic_provider_new (void)
+{
+ return g_object_new (IDE_TYPE_CLANG_DIAGNOSTIC_PROVIDER, NULL);
+}
+
+static void
+ide_clang_diagnostic_provider_finalize (GObject *object)
+{
+ IdeClangDiagnosticProvider *self = (IdeClangDiagnosticProvider *)object;
+ IdeClangDiagnosticProviderPrivate *priv = ide_clang_diagnostic_provider_get_instance_private (self);
+
+ G_OBJECT_CLASS (ide_clang_diagnostic_provider_parent_class)->finalize (object);
+}
+
+static void
+ide_clang_diagnostic_provider_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ IdeClangDiagnosticProvider *self = IDE_CLANG_DIAGNOSTIC_PROVIDER (object);
+
+ switch (prop_id)
+ {
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ }
+}
+
+static void
+ide_clang_diagnostic_provider_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ IdeClangDiagnosticProvider *self = IDE_CLANG_DIAGNOSTIC_PROVIDER (object);
+
+ switch (prop_id)
+ {
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ }
+}
+
+static void
+ide_clang_diagnostic_provider_class_init (IdeClangDiagnosticProviderClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ object_class->finalize = ide_clang_diagnostic_provider_finalize;
+ object_class->get_property = ide_clang_diagnostic_provider_get_property;
+ object_class->set_property = ide_clang_diagnostic_provider_set_property;
+}
+
+static void
+ide_clang_diagnostic_provider_init (IdeClangDiagnosticProvider *self)
+{
+}
diff --git a/libide/clang/ide-clang-highlighter.c b/libide/clang/ide-clang-highlighter.c
index e69de29..f63e949 100644
--- a/libide/clang/ide-clang-highlighter.c
+++ b/libide/clang/ide-clang-highlighter.c
@@ -0,0 +1,96 @@
+/* ide-clang-highlighter.c
+ *
+ * Copyright (C) 2015 Christian Hergert <christian hergert me>
+ *
+ * This file is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This file is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <glib/gi18n.h>
+
+#include "ide-clang-highlighter.h"
+
+typedef struct
+{
+ void *foo;
+} IdeClangHighlighterPrivate;
+
+G_DEFINE_TYPE_WITH_PRIVATE (IdeClangHighlighter, ide_clang_highlighter,
+ IDE_TYPE_HIGHLIGHTER)
+
+enum {
+ PROP_0,
+ LAST_PROP
+};
+
+static GParamSpec *gParamSpecs [LAST_PROP];
+
+IdeClangHighlighter *
+ide_clang_highlighter_new (void)
+{
+ return g_object_new (IDE_TYPE_CLANG_HIGHLIGHTER, NULL);
+}
+
+static void
+ide_clang_highlighter_finalize (GObject *object)
+{
+ IdeClangHighlighter *self = (IdeClangHighlighter *)object;
+ IdeClangHighlighterPrivate *priv = ide_clang_highlighter_get_instance_private (self);
+
+ G_OBJECT_CLASS (ide_clang_highlighter_parent_class)->finalize (object);
+}
+
+static void
+ide_clang_highlighter_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ IdeClangHighlighter *self = IDE_CLANG_HIGHLIGHTER (object);
+
+ switch (prop_id)
+ {
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ }
+}
+
+static void
+ide_clang_highlighter_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ IdeClangHighlighter *self = IDE_CLANG_HIGHLIGHTER (object);
+
+ switch (prop_id)
+ {
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ }
+}
+
+static void
+ide_clang_highlighter_class_init (IdeClangHighlighterClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ object_class->finalize = ide_clang_highlighter_finalize;
+ object_class->get_property = ide_clang_highlighter_get_property;
+ object_class->set_property = ide_clang_highlighter_set_property;
+}
+
+static void
+ide_clang_highlighter_init (IdeClangHighlighter *self)
+{
+}
diff --git a/libide/clang/ide-clang-symbol-resolver.c b/libide/clang/ide-clang-symbol-resolver.c
index e69de29..5bd49bd 100644
--- a/libide/clang/ide-clang-symbol-resolver.c
+++ b/libide/clang/ide-clang-symbol-resolver.c
@@ -0,0 +1,94 @@
+/* ide-clang-symbol-resolver.c
+ *
+ * Copyright (C) 2015 Christian Hergert <christian hergert me>
+ *
+ * This file is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This file is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ide-clang-symbol-resolver.h"
+
+typedef struct
+{
+ void *foo;
+} IdeClangSymbolResolverPrivate;
+
+G_DEFINE_TYPE_WITH_PRIVATE (IdeClangSymbolResolver, ide_clang_symbol_resolver,
+ IDE_TYPE_SYMBOL_RESOLVER)
+
+enum {
+ PROP_0,
+ LAST_PROP
+};
+
+static GParamSpec *gParamSpecs [LAST_PROP];
+
+IdeClangSymbolResolver *
+ide_clang_symbol_resolver_new (void)
+{
+ return g_object_new (IDE_TYPE_CLANG_SYMBOL_RESOLVER, NULL);
+}
+
+static void
+ide_clang_symbol_resolver_finalize (GObject *object)
+{
+ IdeClangSymbolResolver *self = (IdeClangSymbolResolver *)object;
+ IdeClangSymbolResolverPrivate *priv = ide_clang_symbol_resolver_get_instance_private (self);
+
+ G_OBJECT_CLASS (ide_clang_symbol_resolver_parent_class)->finalize (object);
+}
+
+static void
+ide_clang_symbol_resolver_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ IdeClangSymbolResolver *self = IDE_CLANG_SYMBOL_RESOLVER (object);
+
+ switch (prop_id)
+ {
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ }
+}
+
+static void
+ide_clang_symbol_resolver_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ IdeClangSymbolResolver *self = IDE_CLANG_SYMBOL_RESOLVER (object);
+
+ switch (prop_id)
+ {
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ }
+}
+
+static void
+ide_clang_symbol_resolver_class_init (IdeClangSymbolResolverClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ object_class->finalize = ide_clang_symbol_resolver_finalize;
+ object_class->get_property = ide_clang_symbol_resolver_get_property;
+ object_class->set_property = ide_clang_symbol_resolver_set_property;
+}
+
+static void
+ide_clang_symbol_resolver_init (IdeClangSymbolResolver *self)
+{
+}
diff --git a/libide/ide-refactory.c b/libide/ide-refactory.c
index 7717515..a5133bb 100644
--- a/libide/ide-refactory.c
+++ b/libide/ide-refactory.c
@@ -18,73 +18,24 @@
#include "ide-refactory.h"
-typedef struct
-{
-
-} IdeRefactoryPrivate;
-
-G_DEFINE_TYPE_WITH_PRIVATE (IdeRefactory, ide_refactory, G_TYPE_OBJECT)
-
-enum {
- PROP_0,
- LAST_PROP
-};
-
-static GParamSpec *gParamSpecs [LAST_PROP];
-
-IdeRefactory *
-ide_refactory_new (void)
-{
- return g_object_new (IDE_TYPE_REFACTORY, NULL);
-}
-
-static void
-ide_refactory_finalize (GObject *object)
-{
- IdeRefactory *self = (IdeRefactory *)object;
- IdeRefactoryPrivate *priv = ide_refactory_get_instance_private (self);
-
- G_OBJECT_CLASS (ide_refactory_parent_class)->finalize (object);
-}
-
-static void
-ide_refactory_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
-{
- IdeRefactory *self = IDE_REFACTORY (object);
-
- switch (prop_id)
- {
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- }
-}
-
-static void
-ide_refactory_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
-{
- IdeRefactory *self = IDE_REFACTORY (object);
+G_DEFINE_ABSTRACT_TYPE (IdeRefactory, ide_refactory, G_TYPE_OBJECT)
- switch (prop_id)
- {
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- }
-}
+/*
+ * TODO:
+ *
+ * If you'd like to work on the refactory engine, ping me.
+ *
+ * Examples would include:
+ *
+ * - Rename method, local, etc
+ * - Extract into method
+ * - Rename GObject
+ * - Whatever else you like.
+ */
static void
ide_refactory_class_init (IdeRefactoryClass *klass)
{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
- object_class->finalize = ide_refactory_finalize;
- object_class->get_property = ide_refactory_get_property;
- object_class->set_property = ide_refactory_set_property;
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]