[gnome-builder] libide: stub out various type implementations



commit f62413324654c5be5fedfb3d10b216d7747a1ebc
Author: Christian Hergert <christian hergert me>
Date:   Wed Feb 11 18:22:36 2015 -0800

    libide: stub out various type implementations

 libide/Makefile.am               |   11 +++++
 libide/ide-diagnostic-provider.c |   33 +++++++++++++
 libide/ide-diagnostician.c       |   75 ++++++++++++++++++++++++++++++
 libide/ide-highlighter.c         |   31 +++++++++++++
 libide/ide-indenter.c            |   31 +++++++++++++
 libide/ide-refactory.c           |   93 ++++++++++++++++++++++++++++++++++++++
 libide/ide-refactory.h           |   13 ++---
 libide/ide-symbol-resolver.c     |   31 +++++++++++++
 8 files changed, 310 insertions(+), 8 deletions(-)
---
diff --git a/libide/Makefile.am b/libide/Makefile.am
index 7ce5e50..24cd827 100644
--- a/libide/Makefile.am
+++ b/libide/Makefile.am
@@ -51,13 +51,22 @@ libide_la_SOURCES = \
        libide/ide-device-provider.h \
        libide/ide-device.c \
        libide/ide-device.h \
+       libide/ide-diagnostic-provider.c \
        libide/ide-diagnostic-provider.h \
        libide/ide-diagnostic.h \
+       libide/ide-diagnostician.c \
+       libide/ide-diagnostician.h \
+       libide/ide-diagnostics.c \
+       libide/ide-diagnostics.h \
        libide/ide-executable.h \
        libide/ide-executer.h \
        libide/ide-file.c \
        libide/ide-file.h \
        libide/ide-global.h \
+       libide/ide-highlighter.c \
+       libide/ide-highlighter.h \
+       libide/ide-indenter.c \
+       libide/ide-indenter.h \
        libide/ide-indenter.h \
        libide/ide-language.c \
        libide/ide-language.h \
@@ -73,6 +82,7 @@ libide_la_SOURCES = \
        libide/ide-project-item.h \
        libide/ide-project.c \
        libide/ide-project.h \
+       libide/ide-refactory.c \
        libide/ide-refactory.h \
        libide/ide-script.c \
        libide/ide-script.h \
@@ -83,6 +93,7 @@ libide_la_SOURCES = \
        libide/ide-service.h \
        libide/ide-source-location.c \
        libide/ide-source-location.h \
+       libide/ide-symbol-resolver.c \
        libide/ide-symbol-resolver.h \
        libide/ide-symbol.h \
        libide/ide-target.h \
diff --git a/libide/ide-diagnostic-provider.c b/libide/ide-diagnostic-provider.c
new file mode 100644
index 0000000..391b71c
--- /dev/null
+++ b/libide/ide-diagnostic-provider.c
@@ -0,0 +1,33 @@
+/* ide-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 "ide-diagnostic-provider.h"
+
+G_DEFINE_ABSTRACT_TYPE (IdeDiagnosticProvider,
+                        ide_diagnostic_provider,
+                        IDE_TYPE_OBJECT)
+
+static void
+ide_diagnostic_provider_class_init (IdeDiagnosticProviderClass *klass)
+{
+}
+
+static void
+ide_diagnostic_provider_init (IdeDiagnosticProvider *self)
+{
+}
diff --git a/libide/ide-diagnostician.c b/libide/ide-diagnostician.c
new file mode 100644
index 0000000..1da9474
--- /dev/null
+++ b/libide/ide-diagnostician.c
@@ -0,0 +1,75 @@
+/* ide-diagnostician.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-diagnostician.h"
+
+typedef struct
+{
+  GPtrArray *providers;
+} IdeDiagnosticianPrivate;
+
+G_DEFINE_TYPE_WITH_PRIVATE (IdeDiagnostician, ide_diagnostician,
+                            IDE_TYPE_OBJECT)
+
+enum {
+  PROP_0,
+  LAST_PROP
+};
+
+static GParamSpec *gParamSpecs [LAST_PROP];
+
+void
+_ide_diagnostician_add_provider (IdeDiagnostician      *diagnostician,
+                                 IdeDiagnosticProvider *provider)
+{
+
+}
+
+void
+_ide_diagnostician_remove_provider (IdeDiagnostician      *diagnostician,
+                                    IdeDiagnosticProvider *provider)
+{
+
+}
+
+static void
+ide_diagnostician_dispose (GObject *object)
+{
+  IdeDiagnostician *self = (IdeDiagnostician *)object;
+  IdeDiagnosticianPrivate *priv = ide_diagnostician_get_instance_private (self);
+
+  g_clear_pointer (&priv->providers, g_ptr_array_unref);
+
+  G_OBJECT_CLASS (ide_diagnostician_parent_class)->dispose (object);
+}
+
+static void
+ide_diagnostician_class_init (IdeDiagnosticianClass *klass)
+{
+  GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+  object_class->dispose = ide_diagnostician_dispose;
+}
+
+static void
+ide_diagnostician_init (IdeDiagnostician *self)
+{
+  IdeDiagnosticianPrivate *priv = ide_diagnostician_get_instance_private (self);
+
+  priv->providers = g_ptr_array_new_with_free_func (g_object_unref);
+}
diff --git a/libide/ide-highlighter.c b/libide/ide-highlighter.c
new file mode 100644
index 0000000..aa8fa9d
--- /dev/null
+++ b/libide/ide-highlighter.c
@@ -0,0 +1,31 @@
+/* ide-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 "ide-highlighter.h"
+
+G_DEFINE_ABSTRACT_TYPE (IdeHighlighter, ide_highlighter, IDE_TYPE_OBJECT)
+
+static void
+ide_highlighter_class_init (IdeHighlighterClass *klass)
+{
+}
+
+static void
+ide_highlighter_init (IdeHighlighter *self)
+{
+}
diff --git a/libide/ide-indenter.c b/libide/ide-indenter.c
new file mode 100644
index 0000000..6499de3
--- /dev/null
+++ b/libide/ide-indenter.c
@@ -0,0 +1,31 @@
+/* ide-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 "ide-indenter.h"
+
+G_DEFINE_ABSTRACT_TYPE (IdeIndenter, ide_indenter, G_TYPE_OBJECT)
+
+static void
+ide_indenter_class_init (IdeIndenterClass *klass)
+{
+}
+
+static void
+ide_indenter_init (IdeIndenter *self)
+{
+}
diff --git a/libide/ide-refactory.c b/libide/ide-refactory.c
new file mode 100644
index 0000000..7717515
--- /dev/null
+++ b/libide/ide-refactory.c
@@ -0,0 +1,93 @@
+/* ide-refactory.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-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);
+
+  switch (prop_id)
+    {
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+    }
+}
+
+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
+ide_refactory_init (IdeRefactory *self)
+{
+}
diff --git a/libide/ide-refactory.h b/libide/ide-refactory.h
index e6bc25c..e8165c2 100644
--- a/libide/ide-refactory.h
+++ b/libide/ide-refactory.h
@@ -23,18 +23,15 @@
 
 G_BEGIN_DECLS
 
-#define IDE_TYPE_REFACTORY               (ide_refactory_get_type ())
-#define IDE_REFACTORY(obj)               (G_TYPE_CHECK_INSTANCE_CAST ((obj), IDE_TYPE_REFACTORY, 
IdeRefactory))
-#define IDE_IS_REFACTORY(obj)            (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IDE_TYPE_REFACTORY))
-#define IDE_REFACTORY_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), IDE_TYPE_REFACTORY, 
IdeRefactoryInterface))
+#define IDE_TYPE_REFACTORY (ide_refactory_get_type())
 
-struct _IdeRefactoryInterface
+G_DECLARE_DERIVABLE_TYPE (IdeRefactory, ide_refactory, IDE, REFACTORY, IdeObject)
+
+struct _IdeRefactoryClass
 {
-  GTypeInterface parent;
+  IdeObjectClass parent;
 };
 
-GType ide_refactory_get_type (void);
-
 G_END_DECLS
 
 #endif /* IDE_REFACTORY_H */
diff --git a/libide/ide-symbol-resolver.c b/libide/ide-symbol-resolver.c
new file mode 100644
index 0000000..c0f1c73
--- /dev/null
+++ b/libide/ide-symbol-resolver.c
@@ -0,0 +1,31 @@
+/* ide-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-symbol-resolver.h"
+
+G_DEFINE_ABSTRACT_TYPE (IdeSymbolResolver, ide_symbol_resolver, IDE_TYPE_OBJECT)
+
+static void
+ide_symbol_resolver_class_init (IdeSymbolResolverClass *klass)
+{
+}
+
+static void
+ide_symbol_resolver_init (IdeSymbolResolver *self)
+{
+}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]