/* CtagsSymbolOutline.c generated by valac 0.56.19, the Vala compiler
 * generated from CtagsSymbolOutline.vala, do not modify */

/*-
 * Copyright (c) 2017-2018 elementary LLC. (https://elementary.io)
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program 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 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 "codecore.h"
#include <gio/gio.h>
#include <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <stdlib.h>
#include <string.h>
#include <gee.h>
#include <glib/gi18n-lib.h>
#include <float.h>
#include <math.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

enum  {
	SCRATCH_SERVICES_CTAGS_SYMBOL_OUTLINE_0_PROPERTY,
	SCRATCH_SERVICES_CTAGS_SYMBOL_OUTLINE_NUM_PROPERTIES
};
static GParamSpec* scratch_services_ctags_symbol_outline_properties[SCRATCH_SERVICES_CTAGS_SYMBOL_OUTLINE_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _Block64Data Block64Data;
typedef struct _ScratchServicesCtagsSymbolOutlineParseOutputData ScratchServicesCtagsSymbolOutlineParseOutputData;

struct _ScratchServicesCtagsSymbolOutlinePrivate {
	GSubprocess* current_subprocess;
};

struct _Block64Data {
	int _ref_count_;
	ScratchServicesCtagsSymbolOutline* self;
	CodeWidgetsSourceListExpandableItem* new_root;
	gpointer _async_data_;
};

struct _ScratchServicesCtagsSymbolOutlineParseOutputData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ScratchServicesCtagsSymbolOutline* self;
	GSubprocess* subprocess;
	Block64Data* _data64_;
	GeeLinkedList* parent_dependent;
	GeeLinkedList* _tmp0_;
	CodeWidgetsSourceListExpandableItem* _tmp1_;
	GDataInputStream* datainput;
	GInputStream* _tmp2_;
	GDataInputStream* _tmp3_;
	gchar* symbol;
	gchar* _tmp4_;
	GDataInputStream* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	const gchar* _tmp8_;
	const gchar* _tmp9_;
	gchar** parts;
	const gchar* _tmp10_;
	gchar** _tmp11_;
	gchar** _tmp12_;
	gint parts_length1;
	gint _parts_size_;
	gchar** _tmp13_;
	gint _tmp13__length1;
	gchar* name;
	gchar** _tmp14_;
	gint _tmp14__length1;
	const gchar* _tmp15_;
	gchar* _tmp16_;
	gchar* type;
	gchar** _tmp17_;
	gint _tmp17__length1;
	const gchar* _tmp18_;
	gchar* _tmp19_;
	gint line;
	gchar** _tmp20_;
	gint _tmp20__length1;
	const gchar* _tmp21_;
	gint _tmp22_;
	gint _tmp23_;
	const gchar* _tmp24_;
	gchar* parent;
	GIcon* parent_icon;
	ScratchServicesSymbolType* parent_s_type;
	gboolean _tmp25_;
	gchar** _tmp26_;
	gint _tmp26__length1;
	gchar** _tmp27_;
	gint _tmp27__length1;
	const gchar* _tmp28_;
	gchar** _tmp29_;
	gint _tmp29__length1;
	const gchar* _tmp30_;
	gchar** _tmp31_;
	gint _tmp31__length1;
	const gchar* _tmp32_;
	gint _tmp33_;
	gint _tmp34_;
	const gchar* _tmp35_;
	gchar* _tmp36_;
	gchar** _tmp37_;
	gint _tmp37__length1;
	const gchar* _tmp38_;
	gchar** _tmp39_;
	gint _tmp39__length1;
	const gchar* _tmp40_;
	gint _tmp41_;
	gint _tmp42_;
	const gchar* _tmp43_;
	gchar* _tmp44_;
	GThemedIcon* _tmp45_;
	ScratchServicesSymbolType _tmp46_;
	ScratchServicesSymbolType* _tmp47_;
	gchar** _tmp48_;
	gint _tmp48__length1;
	const gchar* _tmp49_;
	gchar** _tmp50_;
	gint _tmp50__length1;
	const gchar* _tmp51_;
	gint _tmp52_;
	gint _tmp53_;
	const gchar* _tmp54_;
	gchar* _tmp55_;
	GThemedIcon* _tmp56_;
	ScratchServicesSymbolType _tmp57_;
	ScratchServicesSymbolType* _tmp58_;
	gchar** _tmp59_;
	gint _tmp59__length1;
	const gchar* _tmp60_;
	gchar** _tmp61_;
	gint _tmp61__length1;
	const gchar* _tmp62_;
	gint _tmp63_;
	gint _tmp64_;
	const gchar* _tmp65_;
	gchar* _tmp66_;
	GThemedIcon* _tmp67_;
	ScratchServicesSymbolType _tmp68_;
	ScratchServicesSymbolType* _tmp69_;
	GIcon* icon;
	ScratchServicesSymbolType* s_type;
	const gchar* _tmp70_;
	const gchar* _tmp71_;
	GQuark _tmp73_;
	GThemedIcon* _tmp74_;
	ScratchServicesSymbolType _tmp75_;
	ScratchServicesSymbolType* _tmp76_;
	GThemedIcon* _tmp77_;
	ScratchServicesSymbolType _tmp78_;
	ScratchServicesSymbolType* _tmp79_;
	GThemedIcon* _tmp80_;
	ScratchServicesSymbolType _tmp81_;
	ScratchServicesSymbolType* _tmp82_;
	GThemedIcon* _tmp83_;
	ScratchServicesSymbolType _tmp84_;
	ScratchServicesSymbolType* _tmp85_;
	GThemedIcon* _tmp86_;
	ScratchServicesSymbolType _tmp87_;
	ScratchServicesSymbolType* _tmp88_;
	GThemedIcon* _tmp89_;
	ScratchServicesSymbolType _tmp90_;
	ScratchServicesSymbolType* _tmp91_;
	GThemedIcon* _tmp92_;
	ScratchServicesSymbolType _tmp93_;
	ScratchServicesSymbolType* _tmp94_;
	GThemedIcon* _tmp95_;
	ScratchServicesSymbolType _tmp96_;
	ScratchServicesSymbolType* _tmp97_;
	GThemedIcon* _tmp98_;
	ScratchServicesSymbolType _tmp99_;
	ScratchServicesSymbolType* _tmp100_;
	const gchar* _tmp101_;
	ScratchServicesCtagsSymbol* s;
	ScratchServicesDocument* _tmp102_;
	ScratchServicesDocument* _tmp103_;
	const gchar* _tmp104_;
	GIcon* _tmp105_;
	ScratchServicesSymbolType* _tmp106_;
	ScratchServicesCtagsSymbol* _tmp107_;
	CodeWidgetsSourceListExpandableItem* _tmp108_;
	ScratchServicesCtagsSymbol* _tmp109_;
	GeeLinkedList* _tmp110_;
	const gchar* _tmp111_;
	const gchar* _tmp112_;
	GIcon* _tmp113_;
	ScratchServicesSymbolType* _tmp114_;
	ScratchServicesCtagsSymbolIter* _tmp115_;
	ScratchServicesCtagsSymbolIter* _tmp116_;
	GError* e;
	GError* _tmp117_;
	const gchar* _tmp118_;
	gboolean found_something;
	gboolean _tmp119_;
	GeeLinkedList* _tmp120_;
	gint _tmp121_;
	gint _tmp122_;
	GeeIterator* iter;
	GeeLinkedList* _tmp123_;
	GeeIterator* _tmp124_;
	GeeIterator* _tmp125_;
	GeeIterator* _tmp126_;
	ScratchServicesCtagsSymbolIter* i;
	GeeIterator* _tmp127_;
	gpointer _tmp128_;
	ScratchServicesCtagsSymbol* _vala1_parent;
	ScratchServicesCtagsSymbolIter* _tmp129_;
	const gchar* _tmp130_;
	const gchar* _tmp131_;
	CodeWidgetsSourceListExpandableItem* _tmp132_;
	ScratchServicesCtagsSymbol* _tmp133_;
	ScratchServicesCtagsSymbol* _tmp134_;
	ScratchServicesCtagsSymbol* _tmp135_;
	ScratchServicesDocument* _tmp136_;
	ScratchServicesDocument* _tmp137_;
	ScratchServicesCtagsSymbolIter* _tmp138_;
	const gchar* _tmp139_;
	const gchar* _tmp140_;
	ScratchServicesCtagsSymbolIter* _tmp141_;
	gint _tmp142_;
	gint _tmp143_;
	ScratchServicesCtagsSymbolIter* _tmp144_;
	GIcon* _tmp145_;
	GIcon* _tmp146_;
	ScratchServicesCtagsSymbolIter* _tmp147_;
	ScratchServicesSymbolType* _tmp148_;
	ScratchServicesCtagsSymbol* _tmp149_;
	ScratchServicesCtagsSymbol* _tmp150_;
	GeeIterator* _tmp151_;
	ScratchServicesCtagsSymbolIter* _tmp152_;
	const gchar* _tmp153_;
	const gchar* _tmp154_;
	gchar** parent_parts;
	ScratchServicesCtagsSymbolIter* _tmp155_;
	const gchar* _tmp156_;
	const gchar* _tmp157_;
	gchar** _tmp158_;
	gchar** _tmp159_;
	gint parent_parts_length1;
	gint _parent_parts_size_;
	gchar** _tmp160_;
	gint _tmp160__length1;
	const gchar* _tmp161_;
	CodeWidgetsSourceListExpandableItem* _tmp162_;
	ScratchServicesCtagsSymbol* _tmp163_;
	ScratchServicesCtagsSymbol* _tmp164_;
	ScratchServicesCtagsSymbol* _tmp165_;
	ScratchServicesCtagsSymbolIter* _tmp166_;
	const gchar* _tmp167_;
	const gchar* _tmp168_;
	gchar** _tmp169_;
	gint _tmp169__length1;
	const gchar* _tmp170_;
	const gchar* _tmp171_;
	GQuark _tmp173_;
	ScratchServicesCtagsSymbol* _tmp174_;
	GThemedIcon* _tmp175_;
	GThemedIcon* _tmp176_;
	ScratchServicesCtagsSymbol* _tmp177_;
	GThemedIcon* _tmp178_;
	GThemedIcon* _tmp179_;
	ScratchServicesCtagsSymbol* _tmp180_;
	GThemedIcon* _tmp181_;
	GThemedIcon* _tmp182_;
	GeeIterator* _tmp183_;
	ScratchServicesCtagsSymbolIter* _tmp184_;
	const gchar* _tmp185_;
	const gchar* _tmp186_;
	ScratchServicesCtagsSymbol* _vala1_e;
	ScratchServicesDocument* _tmp187_;
	ScratchServicesDocument* _tmp188_;
	ScratchServicesCtagsSymbolIter* _tmp189_;
	const gchar* _tmp190_;
	const gchar* _tmp191_;
	ScratchServicesCtagsSymbolIter* _tmp192_;
	gint _tmp193_;
	gint _tmp194_;
	GThemedIcon* _tmp195_;
	GThemedIcon* _tmp196_;
	ScratchServicesSymbolType _tmp197_;
	ScratchServicesCtagsSymbol* _tmp198_;
	ScratchServicesCtagsSymbol* _tmp199_;
	CodeWidgetsSourceListExpandableItem* _tmp200_;
	ScratchServicesCtagsSymbol* _tmp201_;
	ScratchServicesCtagsSymbol* _tmp202_;
	ScratchServicesDocument* _tmp203_;
	ScratchServicesDocument* _tmp204_;
	ScratchServicesCtagsSymbolIter* _tmp205_;
	const gchar* _tmp206_;
	const gchar* _tmp207_;
	ScratchServicesCtagsSymbolIter* _tmp208_;
	gint _tmp209_;
	gint _tmp210_;
	ScratchServicesCtagsSymbolIter* _tmp211_;
	GIcon* _tmp212_;
	GIcon* _tmp213_;
	ScratchServicesCtagsSymbolIter* _tmp214_;
	ScratchServicesSymbolType* _tmp215_;
	ScratchServicesCtagsSymbol* _tmp216_;
	ScratchServicesCtagsSymbol* _tmp217_;
	GeeIterator* _tmp218_;
	GeeLinkedList* _symbol_list;
	GeeLinkedList* _tmp219_;
	gint _symbol_size;
	GeeLinkedList* _tmp220_;
	gint _tmp221_;
	gint _tmp222_;
	gint _symbol_index;
	gint _tmp223_;
	gint _tmp224_;
	ScratchServicesCtagsSymbolIter* _vala1_symbol;
	GeeLinkedList* _tmp225_;
	gpointer _tmp226_;
	CodeWidgetsSourceListExpandableItem* _tmp227_;
	ScratchServicesDocument* _tmp228_;
	ScratchServicesDocument* _tmp229_;
	ScratchServicesCtagsSymbolIter* _tmp230_;
	const gchar* _tmp231_;
	const gchar* _tmp232_;
	ScratchServicesCtagsSymbolIter* _tmp233_;
	gint _tmp234_;
	gint _tmp235_;
	ScratchServicesCtagsSymbolIter* _tmp236_;
	GIcon* _tmp237_;
	GIcon* _tmp238_;
	ScratchServicesCtagsSymbolIter* _tmp239_;
	ScratchServicesSymbolType* _tmp240_;
	ScratchServicesCtagsSymbol* _tmp241_;
	ScratchServicesCtagsSymbol* _tmp242_;
	GError* _inner_error0_;
};

static gint ScratchServicesCtagsSymbolOutline_private_offset;
static gpointer scratch_services_ctags_symbol_outline_parent_class = NULL;

static void scratch_services_ctags_symbol_outline_real_parse_symbols (ScratchServicesSymbolOutline* base);
static void scratch_services_ctags_symbol_outline_parse_output (ScratchServicesCtagsSymbolOutline* self,
                                                         GSubprocess* subprocess,
                                                         GAsyncReadyCallback _callback_,
                                                         gpointer _user_data_);
static void scratch_services_ctags_symbol_outline_parse_output_finish (ScratchServicesCtagsSymbolOutline* self,
                                                                GAsyncResult* _res_);
static void ___lambda48_ (ScratchServicesCtagsSymbolOutline* self,
                   GObject* obj,
                   GAsyncResult* res);
static void ____lambda48__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
static void scratch_services_ctags_symbol_outline_parse_output_data_free (gpointer _data);
static gboolean scratch_services_ctags_symbol_outline_parse_output_co (ScratchServicesCtagsSymbolOutlineParseOutputData* _data_);
static Block64Data* block64_data_ref (Block64Data* _data64_);
static void block64_data_unref (void * _userdata_);
static void scratch_services_ctags_symbol_outline_parse_output_ready (GObject* source_object,
                                                               GAsyncResult* _res_,
                                                               gpointer _user_data_);
static ScratchServicesSymbolType* _scratch_services_symbol_type_dup (ScratchServicesSymbolType* self);
static ScratchServicesCtagsSymbol* scratch_services_ctags_symbol_outline_find_existing (ScratchServicesCtagsSymbolOutline* self,
                                                                                 const gchar* name,
                                                                                 CodeWidgetsSourceListExpandableItem* parent);
static gboolean __lambda47_ (Block64Data* _data64_);
static void scratch_services_ctags_symbol_outline_destroy_root (ScratchServicesCtagsSymbolOutline* self,
                                                         CodeWidgetsSourceListExpandableItem* to_destroy);
static gboolean ___lambda47__gsource_func (gpointer self);
static void scratch_services_ctags_symbol_outline_real_add_tooltips (ScratchServicesSymbolOutline* base,
                                                              CodeWidgetsSourceListExpandableItem* root);
static void scratch_services_ctags_symbol_outline_add_tooltip (ScratchServicesCtagsSymbolOutline* self,
                                                        CodeWidgetsSourceListExpandableItem* parent);
static GeeTreeSet* scratch_services_ctags_symbol_outline_iterate_children (ScratchServicesCtagsSymbolOutline* self,
                                                                    CodeWidgetsSourceListExpandableItem* parent);
static GObject * scratch_services_ctags_symbol_outline_constructor (GType type,
                                                             guint n_construct_properties,
                                                             GObjectConstructParam * construct_properties);
static void _scratch_services_ctags_symbol_outline___lambda49_ (ScratchServicesCtagsSymbolOutline* self,
                                                         CodeWidgetsSourceListItem* selected);
static void __scratch_services_ctags_symbol_outline___lambda49__code_widgets_source_list_item_selected (CodeWidgetsSourceList* _sender,
                                                                                                 CodeWidgetsSourceListItem* item,
                                                                                                 gpointer self);
static void scratch_services_ctags_symbol_outline_finalize (GObject * obj);
static GType scratch_services_ctags_symbol_outline_get_type_once (void);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);
static gssize _vala_array_length (gpointer array);

static inline gpointer
scratch_services_ctags_symbol_outline_get_instance_private (ScratchServicesCtagsSymbolOutline* self)
{
	return G_STRUCT_MEMBER_P (self, ScratchServicesCtagsSymbolOutline_private_offset);
}

ScratchServicesCtagsSymbolOutline*
scratch_services_ctags_symbol_outline_construct (GType object_type,
                                                 ScratchServicesDocument* _doc)
{
	ScratchServicesCtagsSymbolOutline * self = NULL;
	g_return_val_if_fail (_doc != NULL, NULL);
	self = (ScratchServicesCtagsSymbolOutline*) g_object_new (object_type, "orientation", GTK_ORIENTATION_VERTICAL, "hexpand", TRUE, "doc", _doc, NULL);
	return self;
}

ScratchServicesCtagsSymbolOutline*
scratch_services_ctags_symbol_outline_new (ScratchServicesDocument* _doc)
{
	return scratch_services_ctags_symbol_outline_construct (SCRATCH_SERVICES_TYPE_CTAGS_SYMBOL_OUTLINE, _doc);
}

static void
___lambda48_ (ScratchServicesCtagsSymbolOutline* self,
              GObject* obj,
              GAsyncResult* res)
{
	g_return_if_fail (res != NULL);
	scratch_services_symbol_outline_after_parse ((ScratchServicesSymbolOutline*) self);
}

static void
____lambda48__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	___lambda48_ ((ScratchServicesCtagsSymbolOutline*) self, source_object, res);
	g_object_unref (self);
}

static void
scratch_services_ctags_symbol_outline_real_parse_symbols (ScratchServicesSymbolOutline* base)
{
	ScratchServicesCtagsSymbolOutline * self;
	GSubprocess* _tmp0_;
	GError* _inner_error0_ = NULL;
	self = (ScratchServicesCtagsSymbolOutline*) base;
	scratch_services_symbol_outline_before_parse ((ScratchServicesSymbolOutline*) self);
	_tmp0_ = self->priv->current_subprocess;
	if (_tmp0_ != NULL) {
		GSubprocess* _tmp1_;
		_tmp1_ = self->priv->current_subprocess;
		g_subprocess_force_exit (_tmp1_);
	}
	{
		GSubprocess* _tmp2_ = NULL;
		ScratchServicesDocument* _tmp3_;
		ScratchServicesDocument* _tmp4_;
		GFile* _tmp5_;
		GFile* _tmp6_;
		gchar* _tmp7_;
		gchar* _tmp8_;
		GSubprocess* _tmp9_;
		GSubprocess* _tmp10_;
		GSubprocess* _tmp11_;
		GSubprocess* _tmp12_;
		_tmp3_ = scratch_services_symbol_outline_get_doc ((ScratchServicesSymbolOutline*) self);
		_tmp4_ = _tmp3_;
		_tmp5_ = scratch_services_document_get_file (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp7_ = g_file_get_path (_tmp6_);
		_tmp8_ = _tmp7_;
		_tmp9_ = g_subprocess_new (G_SUBPROCESS_FLAGS_STDOUT_PIPE | G_SUBPROCESS_FLAGS_STDERR_SILENCE, &_inner_error0_, "ctags", "-f", "-", "--format=2", "--excmd=n", "--fields=nstK", "--extra=", "--sort=no", _tmp8_, NULL);
		_tmp10_ = _tmp9_;
		_g_free0 (_tmp8_);
		_tmp2_ = _tmp10_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp11_ = _tmp2_;
		_tmp2_ = NULL;
		_g_object_unref0 (self->priv->current_subprocess);
		self->priv->current_subprocess = _tmp11_;
		_tmp12_ = self->priv->current_subprocess;
		scratch_services_ctags_symbol_outline_parse_output (self, _tmp12_, ____lambda48__gasync_ready_callback, g_object_ref (self));
		_g_object_unref0 (_tmp2_);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp13_;
		const gchar* _tmp14_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp13_ = e;
		_tmp14_ = _tmp13_->message;
		g_critical ("CtagsSymbolOutline.vala:72: %s", _tmp14_);
		scratch_services_symbol_outline_after_parse ((ScratchServicesSymbolOutline*) self);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
}

static void
scratch_services_ctags_symbol_outline_parse_output_data_free (gpointer _data)
{
	ScratchServicesCtagsSymbolOutlineParseOutputData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->subprocess);
	_g_object_unref0 (_data_->self);
	g_slice_free (ScratchServicesCtagsSymbolOutlineParseOutputData, _data_);
}

static gpointer
_g_object_ref0 (gpointer self)
{
	return self ? g_object_ref (self) : NULL;
}

static void
scratch_services_ctags_symbol_outline_parse_output (ScratchServicesCtagsSymbolOutline* self,
                                                    GSubprocess* subprocess,
                                                    GAsyncReadyCallback _callback_,
                                                    gpointer _user_data_)
{
	ScratchServicesCtagsSymbolOutlineParseOutputData* _data_;
	ScratchServicesCtagsSymbolOutline* _tmp0_;
	GSubprocess* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (subprocess != NULL);
	_data_ = g_slice_new0 (ScratchServicesCtagsSymbolOutlineParseOutputData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, scratch_services_ctags_symbol_outline_parse_output_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (subprocess);
	_g_object_unref0 (_data_->subprocess);
	_data_->subprocess = _tmp1_;
	scratch_services_ctags_symbol_outline_parse_output_co (_data_);
}

static void
scratch_services_ctags_symbol_outline_parse_output_finish (ScratchServicesCtagsSymbolOutline* self,
                                                           GAsyncResult* _res_)
{
	ScratchServicesCtagsSymbolOutlineParseOutputData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static Block64Data*
block64_data_ref (Block64Data* _data64_)
{
	g_atomic_int_inc (&_data64_->_ref_count_);
	return _data64_;
}

static void
block64_data_unref (void * _userdata_)
{
	Block64Data* _data64_;
	_data64_ = (Block64Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data64_->_ref_count_)) {
		ScratchServicesCtagsSymbolOutline* self;
		self = _data64_->self;
		_g_object_unref0 (_data64_->new_root);
		_g_object_unref0 (self);
		g_slice_free (Block64Data, _data64_);
	}
}

static void
scratch_services_ctags_symbol_outline_parse_output_ready (GObject* source_object,
                                                          GAsyncResult* _res_,
                                                          gpointer _user_data_)
{
	ScratchServicesCtagsSymbolOutlineParseOutputData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	scratch_services_ctags_symbol_outline_parse_output_co (_data_);
}

static const gchar*
string_offset (const gchar* self,
               glong offset)
{
	const gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	result = (const gchar*) (((gchar*) self) + offset);
	return result;
}

static gboolean
string_contains (const gchar* self,
                 const gchar* needle)
{
	gchar* _tmp0_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (needle != NULL, FALSE);
	_tmp0_ = strstr ((gchar*) self, (gchar*) needle);
	result = _tmp0_ != NULL;
	return result;
}

static ScratchServicesSymbolType*
_scratch_services_symbol_type_dup (ScratchServicesSymbolType* self)
{
	ScratchServicesSymbolType* dup;
	dup = g_new0 (ScratchServicesSymbolType, 1);
	memcpy (dup, self, sizeof (ScratchServicesSymbolType));
	return dup;
}

static gpointer
__scratch_services_symbol_type_dup0 (gpointer self)
{
	return self ? _scratch_services_symbol_type_dup (self) : NULL;
}

static gboolean
__lambda47_ (Block64Data* _data64_)
{
	ScratchServicesCtagsSymbolOutline* self;
	gdouble adjustment_value = 0.0;
	CodeWidgetsSourceList* _tmp0_;
	GtkAdjustment* _tmp1_;
	GtkAdjustment* _tmp2_;
	gdouble _tmp3_;
	gdouble _tmp4_;
	CodeWidgetsSourceList* _tmp5_;
	CodeWidgetsSourceListExpandableItem* _tmp6_;
	CodeWidgetsSourceListExpandableItem* _tmp7_;
	CodeWidgetsSourceList* _tmp8_;
	CodeWidgetsSourceListExpandableItem* _tmp9_;
	CodeWidgetsSourceListExpandableItem* _tmp10_;
	CodeWidgetsSourceListExpandableItem* _tmp11_;
	CodeWidgetsSourceList* _tmp12_;
	CodeWidgetsSourceListExpandableItem* _tmp13_;
	CodeWidgetsSourceListExpandableItem* _tmp14_;
	CodeWidgetsSourceList* _tmp15_;
	GtkAdjustment* _tmp16_;
	GtkAdjustment* _tmp17_;
	CodeWidgetsSourceListExpandableItem* _tmp18_;
	CodeWidgetsSourceListExpandableItem* _tmp19_;
	CodeWidgetsSourceListExpandableItem* _tmp20_;
	CodeWidgetsSourceList* _tmp21_;
	CodeWidgetsSourceListExpandableItem* _tmp22_;
	CodeWidgetsSourceListExpandableItem* _tmp23_;
	gboolean result;
	self = _data64_->self;
	_tmp0_ = ((ScratchServicesSymbolOutline*) self)->store;
	_tmp1_ = gtk_scrolled_window_get_vadjustment ((GtkScrolledWindow*) _tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = gtk_adjustment_get_value (_tmp2_);
	_tmp4_ = _tmp3_;
	adjustment_value = _tmp4_;
	_tmp5_ = ((ScratchServicesSymbolOutline*) self)->store;
	_tmp6_ = code_widgets_source_list_get_root (_tmp5_);
	_tmp7_ = _tmp6_;
	code_widgets_source_list_expandable_item_clear (_tmp7_);
	_tmp8_ = ((ScratchServicesSymbolOutline*) self)->store;
	_tmp9_ = code_widgets_source_list_get_root (_tmp8_);
	_tmp10_ = _tmp9_;
	_tmp11_ = _data64_->new_root;
	code_widgets_source_list_expandable_item_add (_tmp10_, (CodeWidgetsSourceListItem*) _tmp11_);
	_tmp12_ = ((ScratchServicesSymbolOutline*) self)->store;
	_tmp13_ = code_widgets_source_list_get_root (_tmp12_);
	_tmp14_ = _tmp13_;
	code_widgets_source_list_expandable_item_expand_all (_tmp14_, TRUE, TRUE);
	_tmp15_ = ((ScratchServicesSymbolOutline*) self)->store;
	_tmp16_ = gtk_scrolled_window_get_vadjustment ((GtkScrolledWindow*) _tmp15_);
	_tmp17_ = _tmp16_;
	gtk_adjustment_set_value (_tmp17_, adjustment_value);
	_tmp18_ = ((ScratchServicesSymbolOutline*) self)->root;
	scratch_services_ctags_symbol_outline_destroy_root (self, _tmp18_);
	_tmp19_ = _data64_->new_root;
	_tmp20_ = _g_object_ref0 (_tmp19_);
	_g_object_unref0 (((ScratchServicesSymbolOutline*) self)->root);
	((ScratchServicesSymbolOutline*) self)->root = _tmp20_;
	_tmp21_ = ((ScratchServicesSymbolOutline*) self)->store;
	_tmp22_ = code_widgets_source_list_get_root (_tmp21_);
	_tmp23_ = _tmp22_;
	scratch_services_symbol_outline_add_tooltips ((ScratchServicesSymbolOutline*) self, _tmp23_);
	result = FALSE;
	return result;
}

static gboolean
___lambda47__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda47_ (self);
	return result;
}

static gboolean
scratch_services_ctags_symbol_outline_parse_output_co (ScratchServicesCtagsSymbolOutlineParseOutputData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_data64_ = g_slice_new0 (Block64Data);
	_data_->_data64_->_ref_count_ = 1;
	_data_->_data64_->self = g_object_ref (_data_->self);
	_data_->_data64_->_async_data_ = _data_;
	_data_->_tmp0_ = gee_linked_list_new (SCRATCH_SERVICES_TYPE_CTAGS_SYMBOL_ITER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	_data_->parent_dependent = _data_->_tmp0_;
	_data_->_tmp1_ = code_widgets_source_list_expandable_item_new (_ ("Symbols"));
	_data_->_data64_->new_root = _data_->_tmp1_;
	_data_->_tmp2_ = g_subprocess_get_stdout_pipe (_data_->subprocess);
	_data_->_tmp3_ = g_data_input_stream_new (_data_->_tmp2_);
	_data_->datainput = _data_->_tmp3_;
	{
		while (TRUE) {
			static GQuark _tmp72_label0 = 0;
			static GQuark _tmp72_label1 = 0;
			static GQuark _tmp72_label2 = 0;
			static GQuark _tmp72_label3 = 0;
			static GQuark _tmp72_label4 = 0;
			static GQuark _tmp72_label5 = 0;
			static GQuark _tmp72_label6 = 0;
			static GQuark _tmp72_label7 = 0;
			static GQuark _tmp72_label8 = 0;
			static GQuark _tmp72_label9 = 0;
			static GQuark _tmp72_label10 = 0;
			static GQuark _tmp72_label11 = 0;
			static GQuark _tmp72_label12 = 0;
			static GQuark _tmp72_label13 = 0;
			static GQuark _tmp72_label14 = 0;
			static GQuark _tmp72_label15 = 0;
			static GQuark _tmp72_label16 = 0;
			_data_->_tmp5_ = _data_->datainput;
			_data_->_state_ = 1;
			g_data_input_stream_read_line_async (_data_->_tmp5_, G_PRIORITY_DEFAULT, NULL, scratch_services_ctags_symbol_outline_parse_output_ready, _data_);
			return FALSE;
			_state_1:
			_data_->_tmp6_ = g_data_input_stream_read_line_finish (_data_->_tmp5_, _data_->_res_, NULL, &_data_->_inner_error0_);
			_data_->_tmp4_ = _data_->_tmp6_;
			if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
				_g_free0 (_data_->symbol);
				goto __catch0_g_error;
			}
			_data_->_tmp7_ = _data_->_tmp4_;
			_data_->_tmp4_ = NULL;
			_g_free0 (_data_->symbol);
			_data_->symbol = _data_->_tmp7_;
			_data_->_tmp8_ = _data_->symbol;
			if (!(_data_->_tmp8_ != NULL)) {
				_g_free0 (_data_->_tmp4_);
				break;
			}
			_data_->_tmp9_ = _data_->symbol;
			if (g_strcmp0 (_data_->_tmp9_, "") == 0) {
				_g_free0 (_data_->_tmp4_);
				continue;
			}
			_data_->_tmp10_ = _data_->symbol;
			_data_->_tmp12_ = _data_->_tmp11_ = g_strsplit (_data_->_tmp10_, "\t", 0);
			_data_->parts = _data_->_tmp12_;
			_data_->parts_length1 = _vala_array_length (_data_->_tmp11_);
			_data_->_parts_size_ = _data_->parts_length1;
			_data_->_tmp13_ = _data_->parts;
			_data_->_tmp13__length1 = _data_->parts_length1;
			if (_data_->_tmp13__length1 < 5) {
				_data_->parts = (_vala_array_free (_data_->parts, _data_->parts_length1, (GDestroyNotify) g_free), NULL);
				_g_free0 (_data_->_tmp4_);
				continue;
			}
			_data_->_tmp14_ = _data_->parts;
			_data_->_tmp14__length1 = _data_->parts_length1;
			_data_->_tmp15_ = _data_->_tmp14_[0];
			_data_->_tmp16_ = g_strdup (_data_->_tmp15_);
			_data_->name = _data_->_tmp16_;
			_data_->_tmp17_ = _data_->parts;
			_data_->_tmp17__length1 = _data_->parts_length1;
			_data_->_tmp18_ = _data_->_tmp17_[3];
			_data_->_tmp19_ = g_strdup (_data_->_tmp18_);
			_data_->type = _data_->_tmp19_;
			_data_->_tmp20_ = _data_->parts;
			_data_->_tmp20__length1 = _data_->parts_length1;
			_data_->_tmp21_ = _data_->_tmp20_[4];
			_data_->_tmp22_ = strlen ("line:");
			_data_->_tmp23_ = _data_->_tmp22_;
			_data_->_tmp24_ = string_offset (_data_->_tmp21_, (glong) _data_->_tmp23_);
			_data_->line = atoi (_data_->_tmp24_);
			_data_->parent = NULL;
			_data_->parent_icon = NULL;
			_data_->parent_s_type = NULL;
			_data_->_tmp26_ = _data_->parts;
			_data_->_tmp26__length1 = _data_->parts_length1;
			if (_data_->_tmp26__length1 > 5) {
				_data_->_tmp27_ = _data_->parts;
				_data_->_tmp27__length1 = _data_->parts_length1;
				_data_->_tmp28_ = _data_->_tmp27_[5];
				_data_->_tmp25_ = _data_->_tmp28_ != NULL;
			} else {
				_data_->_tmp25_ = FALSE;
			}
			if (_data_->_tmp25_) {
				_data_->_tmp29_ = _data_->parts;
				_data_->_tmp29__length1 = _data_->parts_length1;
				_data_->_tmp30_ = _data_->_tmp29_[5];
				if (string_contains (_data_->_tmp30_, "typeref:")) {
					_data_->_tmp31_ = _data_->parts;
					_data_->_tmp31__length1 = _data_->parts_length1;
					_data_->_tmp32_ = _data_->_tmp31_[5];
					_data_->_tmp33_ = strlen ("typeref:");
					_data_->_tmp34_ = _data_->_tmp33_;
					_data_->_tmp35_ = string_offset (_data_->_tmp32_, (glong) _data_->_tmp34_);
					_data_->_tmp36_ = g_strdup (_data_->_tmp35_);
					_g_free0 (_data_->parent);
					_data_->parent = _data_->_tmp36_;
				} else {
					_data_->_tmp37_ = _data_->parts;
					_data_->_tmp37__length1 = _data_->parts_length1;
					_data_->_tmp38_ = _data_->_tmp37_[5];
					if (string_contains (_data_->_tmp38_, "class:")) {
						_data_->_tmp39_ = _data_->parts;
						_data_->_tmp39__length1 = _data_->parts_length1;
						_data_->_tmp40_ = _data_->_tmp39_[5];
						_data_->_tmp41_ = strlen ("class:");
						_data_->_tmp42_ = _data_->_tmp41_;
						_data_->_tmp43_ = string_offset (_data_->_tmp40_, (glong) _data_->_tmp42_);
						_data_->_tmp44_ = g_strdup (_data_->_tmp43_);
						_g_free0 (_data_->parent);
						_data_->parent = _data_->_tmp44_;
						_data_->_tmp45_ = (GThemedIcon*) g_themed_icon_new ("lang-class");
						_g_object_unref0 (_data_->parent_icon);
						_data_->parent_icon = (GIcon*) _data_->_tmp45_;
						_data_->_tmp46_ = SCRATCH_SERVICES_SYMBOL_TYPE_CLASS;
						_data_->_tmp47_ = __scratch_services_symbol_type_dup0 (&_data_->_tmp46_);
						_g_free0 (_data_->parent_s_type);
						_data_->parent_s_type = _data_->_tmp47_;
					} else {
						_data_->_tmp48_ = _data_->parts;
						_data_->_tmp48__length1 = _data_->parts_length1;
						_data_->_tmp49_ = _data_->_tmp48_[5];
						if (string_contains (_data_->_tmp49_, "struct:")) {
							_data_->_tmp50_ = _data_->parts;
							_data_->_tmp50__length1 = _data_->parts_length1;
							_data_->_tmp51_ = _data_->_tmp50_[5];
							_data_->_tmp52_ = strlen ("struct:");
							_data_->_tmp53_ = _data_->_tmp52_;
							_data_->_tmp54_ = string_offset (_data_->_tmp51_, (glong) _data_->_tmp53_);
							_data_->_tmp55_ = g_strdup (_data_->_tmp54_);
							_g_free0 (_data_->parent);
							_data_->parent = _data_->_tmp55_;
							_data_->_tmp56_ = (GThemedIcon*) g_themed_icon_new ("lang-struct");
							_g_object_unref0 (_data_->parent_icon);
							_data_->parent_icon = (GIcon*) _data_->_tmp56_;
							_data_->_tmp57_ = SCRATCH_SERVICES_SYMBOL_TYPE_STRUCT;
							_data_->_tmp58_ = __scratch_services_symbol_type_dup0 (&_data_->_tmp57_);
							_g_free0 (_data_->parent_s_type);
							_data_->parent_s_type = _data_->_tmp58_;
						} else {
							_data_->_tmp59_ = _data_->parts;
							_data_->_tmp59__length1 = _data_->parts_length1;
							_data_->_tmp60_ = _data_->_tmp59_[5];
							if (string_contains (_data_->_tmp60_, "enum:")) {
								_data_->_tmp61_ = _data_->parts;
								_data_->_tmp61__length1 = _data_->parts_length1;
								_data_->_tmp62_ = _data_->_tmp61_[5];
								_data_->_tmp63_ = strlen ("enum:");
								_data_->_tmp64_ = _data_->_tmp63_;
								_data_->_tmp65_ = string_offset (_data_->_tmp62_, (glong) _data_->_tmp64_);
								_data_->_tmp66_ = g_strdup (_data_->_tmp65_);
								_g_free0 (_data_->parent);
								_data_->parent = _data_->_tmp66_;
								_data_->_tmp67_ = (GThemedIcon*) g_themed_icon_new ("lang-enum");
								_g_object_unref0 (_data_->parent_icon);
								_data_->parent_icon = (GIcon*) _data_->_tmp67_;
								_data_->_tmp68_ = SCRATCH_SERVICES_SYMBOL_TYPE_ENUM;
								_data_->_tmp69_ = __scratch_services_symbol_type_dup0 (&_data_->_tmp68_);
								_g_free0 (_data_->parent_s_type);
								_data_->parent_s_type = _data_->_tmp69_;
							}
						}
					}
				}
			}
			_data_->icon = NULL;
			_data_->s_type = NULL;
			_data_->_tmp70_ = _data_->type;
			_data_->_tmp73_ = 0U;
			_data_->_tmp71_ = _data_->_tmp70_;
			_data_->_tmp73_ = (NULL == _data_->_tmp71_) ? 0 : g_quark_from_string (_data_->_tmp71_);
			if (_data_->_tmp73_ == ((0 != _tmp72_label0) ? _tmp72_label0 : (_tmp72_label0 = g_quark_from_static_string ("class")))) {
				switch (0) {
					default:
					{
						_data_->_tmp74_ = (GThemedIcon*) g_themed_icon_new ("lang-class");
						_g_object_unref0 (_data_->icon);
						_data_->icon = (GIcon*) _data_->_tmp74_;
						_data_->_tmp75_ = SCRATCH_SERVICES_SYMBOL_TYPE_CLASS;
						_data_->_tmp76_ = __scratch_services_symbol_type_dup0 (&_data_->_tmp75_);
						_g_free0 (_data_->s_type);
						_data_->s_type = _data_->_tmp76_;
						break;
					}
				}
			} else if (_data_->_tmp73_ == ((0 != _tmp72_label1) ? _tmp72_label1 : (_tmp72_label1 = g_quark_from_static_string ("struct")))) {
				switch (0) {
					default:
					{
						_data_->_tmp77_ = (GThemedIcon*) g_themed_icon_new ("lang-struct");
						_g_object_unref0 (_data_->icon);
						_data_->icon = (GIcon*) _data_->_tmp77_;
						_data_->_tmp78_ = SCRATCH_SERVICES_SYMBOL_TYPE_STRUCT;
						_data_->_tmp79_ = __scratch_services_symbol_type_dup0 (&_data_->_tmp78_);
						_g_free0 (_data_->s_type);
						_data_->s_type = _data_->_tmp79_;
						break;
					}
				}
			} else if (((_data_->_tmp73_ == ((0 != _tmp72_label2) ? _tmp72_label2 : (_tmp72_label2 = g_quark_from_static_string ("field")))) || (_data_->_tmp73_ == ((0 != _tmp72_label3) ? _tmp72_label3 : (_tmp72_label3 = g_quark_from_static_string ("member"))))) || (_data_->_tmp73_ == ((0 != _tmp72_label4) ? _tmp72_label4 : (_tmp72_label4 = g_quark_from_static_string ("variable"))))) {
				switch (0) {
					default:
					{
						_data_->_tmp80_ = (GThemedIcon*) g_themed_icon_new ("lang-property");
						_g_object_unref0 (_data_->icon);
						_data_->icon = (GIcon*) _data_->_tmp80_;
						_data_->_tmp81_ = SCRATCH_SERVICES_SYMBOL_TYPE_PROPERTY;
						_data_->_tmp82_ = __scratch_services_symbol_type_dup0 (&_data_->_tmp81_);
						_g_free0 (_data_->s_type);
						_data_->s_type = _data_->_tmp82_;
						break;
					}
				}
			} else if ((_data_->_tmp73_ == ((0 != _tmp72_label5) ? _tmp72_label5 : (_tmp72_label5 = g_quark_from_static_string ("enum")))) || (_data_->_tmp73_ == ((0 != _tmp72_label6) ? _tmp72_label6 : (_tmp72_label6 = g_quark_from_static_string ("enumerator"))))) {
				switch (0) {
					default:
					{
						_data_->_tmp83_ = (GThemedIcon*) g_themed_icon_new ("lang-enum");
						_g_object_unref0 (_data_->icon);
						_data_->icon = (GIcon*) _data_->_tmp83_;
						_data_->_tmp84_ = SCRATCH_SERVICES_SYMBOL_TYPE_ENUM;
						_data_->_tmp85_ = __scratch_services_symbol_type_dup0 (&_data_->_tmp84_);
						_g_free0 (_data_->s_type);
						_data_->s_type = _data_->_tmp85_;
						break;
					}
				}
			} else if (((_data_->_tmp73_ == ((0 != _tmp72_label7) ? _tmp72_label7 : (_tmp72_label7 = g_quark_from_static_string ("macro")))) || (_data_->_tmp73_ == ((0 != _tmp72_label8) ? _tmp72_label8 : (_tmp72_label8 = g_quark_from_static_string ("constant"))))) || (_data_->_tmp73_ == ((0 != _tmp72_label9) ? _tmp72_label9 : (_tmp72_label9 = g_quark_from_static_string ("typedef"))))) {
				switch (0) {
					default:
					{
						_data_->_tmp86_ = (GThemedIcon*) g_themed_icon_new ("lang-constant");
						_g_object_unref0 (_data_->icon);
						_data_->icon = (GIcon*) _data_->_tmp86_;
						_data_->_tmp87_ = SCRATCH_SERVICES_SYMBOL_TYPE_CONSTANT;
						_data_->_tmp88_ = __scratch_services_symbol_type_dup0 (&_data_->_tmp87_);
						_g_free0 (_data_->s_type);
						_data_->s_type = _data_->_tmp88_;
						break;
					}
				}
			} else if (_data_->_tmp73_ == ((0 != _tmp72_label10) ? _tmp72_label10 : (_tmp72_label10 = g_quark_from_static_string ("constructor")))) {
				switch (0) {
					default:
					{
						_data_->_tmp89_ = (GThemedIcon*) g_themed_icon_new ("lang-constructor");
						_g_object_unref0 (_data_->icon);
						_data_->icon = (GIcon*) _data_->_tmp89_;
						_data_->_tmp90_ = SCRATCH_SERVICES_SYMBOL_TYPE_CONSTRUCTOR;
						_data_->_tmp91_ = __scratch_services_symbol_type_dup0 (&_data_->_tmp90_);
						_g_free0 (_data_->s_type);
						_data_->s_type = _data_->_tmp91_;
						break;
					}
				}
			} else if (((_data_->_tmp73_ == ((0 != _tmp72_label11) ? _tmp72_label11 : (_tmp72_label11 = g_quark_from_static_string ("destructor")))) || (_data_->_tmp73_ == ((0 != _tmp72_label12) ? _tmp72_label12 : (_tmp72_label12 = g_quark_from_static_string ("method"))))) || (_data_->_tmp73_ == ((0 != _tmp72_label13) ? _tmp72_label13 : (_tmp72_label13 = g_quark_from_static_string ("function"))))) {
				switch (0) {
					default:
					{
						_data_->_tmp92_ = (GThemedIcon*) g_themed_icon_new ("lang-method");
						_g_object_unref0 (_data_->icon);
						_data_->icon = (GIcon*) _data_->_tmp92_;
						_data_->_tmp93_ = SCRATCH_SERVICES_SYMBOL_TYPE_METHOD;
						_data_->_tmp94_ = __scratch_services_symbol_type_dup0 (&_data_->_tmp93_);
						_g_free0 (_data_->s_type);
						_data_->s_type = _data_->_tmp94_;
						break;
					}
				}
			} else if (_data_->_tmp73_ == ((0 != _tmp72_label14) ? _tmp72_label14 : (_tmp72_label14 = g_quark_from_static_string ("namespace")))) {
				switch (0) {
					default:
					{
						_data_->_tmp95_ = (GThemedIcon*) g_themed_icon_new ("lang-namespace");
						_g_object_unref0 (_data_->icon);
						_data_->icon = (GIcon*) _data_->_tmp95_;
						_data_->_tmp96_ = SCRATCH_SERVICES_SYMBOL_TYPE_NAMESPACE;
						_data_->_tmp97_ = __scratch_services_symbol_type_dup0 (&_data_->_tmp96_);
						_g_free0 (_data_->s_type);
						_data_->s_type = _data_->_tmp97_;
						break;
					}
				}
			} else if (_data_->_tmp73_ == ((0 != _tmp72_label15) ? _tmp72_label15 : (_tmp72_label15 = g_quark_from_static_string ("package")))) {
				switch (0) {
					default:
					{
						break;
					}
				}
			} else if (_data_->_tmp73_ == ((0 != _tmp72_label16) ? _tmp72_label16 : (_tmp72_label16 = g_quark_from_static_string ("property")))) {
				switch (0) {
					default:
					{
						_data_->_tmp98_ = (GThemedIcon*) g_themed_icon_new ("lang-property");
						_g_object_unref0 (_data_->icon);
						_data_->icon = (GIcon*) _data_->_tmp98_;
						_data_->_tmp99_ = SCRATCH_SERVICES_SYMBOL_TYPE_PROPERTY;
						_data_->_tmp100_ = __scratch_services_symbol_type_dup0 (&_data_->_tmp99_);
						_g_free0 (_data_->s_type);
						_data_->s_type = _data_->_tmp100_;
						break;
					}
				}
			}
			_data_->_tmp101_ = _data_->parent;
			if (_data_->_tmp101_ == NULL) {
				_data_->_tmp102_ = scratch_services_symbol_outline_get_doc ((ScratchServicesSymbolOutline*) _data_->self);
				_data_->_tmp103_ = _data_->_tmp102_;
				_data_->_tmp104_ = _data_->name;
				_data_->_tmp105_ = _data_->icon;
				_data_->_tmp106_ = _data_->s_type;
				_data_->_tmp107_ = scratch_services_ctags_symbol_new (_data_->_tmp103_, _data_->_tmp104_, _data_->line, _data_->_tmp105_, _data_->_tmp106_);
				_data_->s = _data_->_tmp107_;
				_data_->_tmp108_ = _data_->_data64_->new_root;
				_data_->_tmp109_ = _data_->s;
				code_widgets_source_list_expandable_item_add (_data_->_tmp108_, (CodeWidgetsSourceListItem*) _data_->_tmp109_);
				_g_object_unref0 (_data_->s);
			} else {
				_data_->_tmp110_ = _data_->parent_dependent;
				_data_->_tmp111_ = _data_->name;
				_data_->_tmp112_ = _data_->parent;
				_data_->_tmp113_ = _data_->parent_icon;
				_data_->_tmp114_ = _data_->parent_s_type;
				_data_->_tmp115_ = scratch_services_ctags_symbol_iter_new (_data_->_tmp111_, _data_->_tmp112_, _data_->line, _data_->_tmp113_, _data_->_tmp114_);
				_data_->_tmp116_ = _data_->_tmp115_;
				gee_abstract_collection_add ((GeeAbstractCollection*) _data_->_tmp110_, _data_->_tmp116_);
				_g_object_unref0 (_data_->_tmp116_);
			}
			_g_free0 (_data_->s_type);
			_g_object_unref0 (_data_->icon);
			_g_free0 (_data_->parent_s_type);
			_g_object_unref0 (_data_->parent_icon);
			_g_free0 (_data_->parent);
			_g_free0 (_data_->type);
			_g_free0 (_data_->name);
			_data_->parts = (_vala_array_free (_data_->parts, _data_->parts_length1, (GDestroyNotify) g_free), NULL);
			_g_free0 (_data_->_tmp4_);
		}
		_g_free0 (_data_->symbol);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp117_ = _data_->e;
		_data_->_tmp118_ = _data_->_tmp117_->message;
		g_critical ("CtagsSymbolOutline.vala:189: %s", _data_->_tmp118_);
		_g_error_free0 (_data_->e);
		_g_object_unref0 (_data_->datainput);
		_g_object_unref0 (_data_->parent_dependent);
		block64_data_unref (_data_->_data64_);
		_data_->_data64_ = NULL;
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_g_object_unref0 (_data_->datainput);
		_g_object_unref0 (_data_->parent_dependent);
		block64_data_unref (_data_->_data64_);
		_data_->_data64_ = NULL;
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->found_something = TRUE;
	while (TRUE) {
		if (_data_->found_something) {
			_data_->_tmp120_ = _data_->parent_dependent;
			_data_->_tmp121_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _data_->_tmp120_);
			_data_->_tmp122_ = _data_->_tmp121_;
			_data_->_tmp119_ = _data_->_tmp122_ > 0;
		} else {
			_data_->_tmp119_ = FALSE;
		}
		if (!_data_->_tmp119_) {
			break;
		}
		_data_->found_something = FALSE;
		_data_->_tmp123_ = _data_->parent_dependent;
		_data_->_tmp124_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) _data_->_tmp123_);
		_data_->iter = _data_->_tmp124_;
		while (TRUE) {
			_data_->_tmp125_ = _data_->iter;
			if (!gee_iterator_has_next (_data_->_tmp125_)) {
				break;
			}
			_data_->_tmp126_ = _data_->iter;
			gee_iterator_next (_data_->_tmp126_);
			_data_->_tmp127_ = _data_->iter;
			_data_->_tmp128_ = gee_iterator_get (_data_->_tmp127_);
			_data_->i = (ScratchServicesCtagsSymbolIter*) _data_->_tmp128_;
			_data_->_tmp129_ = _data_->i;
			_data_->_tmp130_ = scratch_services_ctags_symbol_iter_get_parent (_data_->_tmp129_);
			_data_->_tmp131_ = _data_->_tmp130_;
			_data_->_tmp132_ = _data_->_data64_->new_root;
			_data_->_tmp133_ = scratch_services_ctags_symbol_outline_find_existing (_data_->self, _data_->_tmp131_, _data_->_tmp132_);
			_data_->_vala1_parent = _data_->_tmp133_;
			_data_->_tmp134_ = _data_->_vala1_parent;
			if (_data_->_tmp134_ != NULL) {
				_data_->found_something = TRUE;
				_data_->_tmp135_ = _data_->_vala1_parent;
				_data_->_tmp136_ = scratch_services_symbol_outline_get_doc ((ScratchServicesSymbolOutline*) _data_->self);
				_data_->_tmp137_ = _data_->_tmp136_;
				_data_->_tmp138_ = _data_->i;
				_data_->_tmp139_ = scratch_services_ctags_symbol_iter_get_name (_data_->_tmp138_);
				_data_->_tmp140_ = _data_->_tmp139_;
				_data_->_tmp141_ = _data_->i;
				_data_->_tmp142_ = scratch_services_ctags_symbol_iter_get_line (_data_->_tmp141_);
				_data_->_tmp143_ = _data_->_tmp142_;
				_data_->_tmp144_ = _data_->i;
				_data_->_tmp145_ = scratch_services_ctags_symbol_iter_get_icon (_data_->_tmp144_);
				_data_->_tmp146_ = _data_->_tmp145_;
				_data_->_tmp147_ = _data_->i;
				_data_->_tmp148_ = _data_->_tmp147_->symbol_type;
				_data_->_tmp149_ = scratch_services_ctags_symbol_new (_data_->_tmp137_, _data_->_tmp140_, _data_->_tmp143_, _data_->_tmp146_, _data_->_tmp148_);
				_data_->_tmp150_ = _data_->_tmp149_;
				code_widgets_source_list_expandable_item_add ((CodeWidgetsSourceListExpandableItem*) _data_->_tmp135_, (CodeWidgetsSourceListItem*) _data_->_tmp150_);
				_g_object_unref0 (_data_->_tmp150_);
				_data_->_tmp151_ = _data_->iter;
				gee_iterator_remove (_data_->_tmp151_);
			} else {
				_data_->_tmp152_ = _data_->i;
				_data_->_tmp153_ = scratch_services_ctags_symbol_iter_get_parent (_data_->_tmp152_);
				_data_->_tmp154_ = _data_->_tmp153_;
				if (string_contains (_data_->_tmp154_, ":")) {
					_data_->_tmp155_ = _data_->i;
					_data_->_tmp156_ = scratch_services_ctags_symbol_iter_get_parent (_data_->_tmp155_);
					_data_->_tmp157_ = _data_->_tmp156_;
					_data_->_tmp159_ = _data_->_tmp158_ = g_strsplit (_data_->_tmp157_, ":", 2);
					_data_->parent_parts = _data_->_tmp159_;
					_data_->parent_parts_length1 = _vala_array_length (_data_->_tmp158_);
					_data_->_parent_parts_size_ = _data_->parent_parts_length1;
					_data_->_tmp160_ = _data_->parent_parts;
					_data_->_tmp160__length1 = _data_->parent_parts_length1;
					_data_->_tmp161_ = _data_->_tmp160_[1];
					_data_->_tmp162_ = _data_->_data64_->new_root;
					_data_->_tmp163_ = scratch_services_ctags_symbol_outline_find_existing (_data_->self, _data_->_tmp161_, _data_->_tmp162_);
					_g_object_unref0 (_data_->_vala1_parent);
					_data_->_vala1_parent = _data_->_tmp163_;
					_data_->_tmp164_ = _data_->_vala1_parent;
					if (_data_->_tmp164_ != NULL) {
						static GQuark _tmp172_label0 = 0;
						static GQuark _tmp172_label1 = 0;
						static GQuark _tmp172_label2 = 0;
						_data_->_tmp165_ = _data_->_vala1_parent;
						_data_->_tmp166_ = _data_->i;
						_data_->_tmp167_ = scratch_services_ctags_symbol_iter_get_name (_data_->_tmp166_);
						_data_->_tmp168_ = _data_->_tmp167_;
						code_widgets_source_list_item_set_name ((CodeWidgetsSourceListItem*) _data_->_tmp165_, _data_->_tmp168_);
						_data_->_tmp169_ = _data_->parent_parts;
						_data_->_tmp169__length1 = _data_->parent_parts_length1;
						_data_->_tmp170_ = _data_->_tmp169_[0];
						_data_->_tmp173_ = 0U;
						_data_->_tmp171_ = _data_->_tmp170_;
						_data_->_tmp173_ = (NULL == _data_->_tmp171_) ? 0 : g_quark_from_string (_data_->_tmp171_);
						if (_data_->_tmp173_ == ((0 != _tmp172_label0) ? _tmp172_label0 : (_tmp172_label0 = g_quark_from_static_string ("class")))) {
							switch (0) {
								default:
								{
									_data_->_tmp174_ = _data_->_vala1_parent;
									_data_->_tmp175_ = (GThemedIcon*) g_themed_icon_new ("lang-class");
									_data_->_tmp176_ = _data_->_tmp175_;
									code_widgets_source_list_item_set_icon ((CodeWidgetsSourceListItem*) _data_->_tmp174_, (GIcon*) _data_->_tmp176_);
									_g_object_unref0 (_data_->_tmp176_);
									break;
								}
							}
						} else if (_data_->_tmp173_ == ((0 != _tmp172_label1) ? _tmp172_label1 : (_tmp172_label1 = g_quark_from_static_string ("struct")))) {
							switch (0) {
								default:
								{
									_data_->_tmp177_ = _data_->_vala1_parent;
									_data_->_tmp178_ = (GThemedIcon*) g_themed_icon_new ("lang-struct");
									_data_->_tmp179_ = _data_->_tmp178_;
									code_widgets_source_list_item_set_icon ((CodeWidgetsSourceListItem*) _data_->_tmp177_, (GIcon*) _data_->_tmp179_);
									_g_object_unref0 (_data_->_tmp179_);
									break;
								}
							}
						} else if (_data_->_tmp173_ == ((0 != _tmp172_label2) ? _tmp172_label2 : (_tmp172_label2 = g_quark_from_static_string ("enum")))) {
							switch (0) {
								default:
								{
									_data_->_tmp180_ = _data_->_vala1_parent;
									_data_->_tmp181_ = (GThemedIcon*) g_themed_icon_new ("lang-enum");
									_data_->_tmp182_ = _data_->_tmp181_;
									code_widgets_source_list_item_set_icon ((CodeWidgetsSourceListItem*) _data_->_tmp180_, (GIcon*) _data_->_tmp182_);
									_g_object_unref0 (_data_->_tmp182_);
									break;
								}
							}
						}
						_data_->_tmp183_ = _data_->iter;
						gee_iterator_remove (_data_->_tmp183_);
						_data_->parent_parts = (_vala_array_free (_data_->parent_parts, _data_->parent_parts_length1, (GDestroyNotify) g_free), NULL);
						_g_object_unref0 (_data_->_vala1_parent);
						_g_object_unref0 (_data_->i);
						continue;
					}
					_data_->parent_parts = (_vala_array_free (_data_->parent_parts, _data_->parent_parts_length1, (GDestroyNotify) g_free), NULL);
				}
				_data_->_tmp184_ = _data_->i;
				_data_->_tmp185_ = scratch_services_ctags_symbol_iter_get_parent (_data_->_tmp184_);
				_data_->_tmp186_ = _data_->_tmp185_;
				if (g_str_has_prefix (_data_->_tmp186_, "__anon")) {
					_data_->_tmp187_ = scratch_services_symbol_outline_get_doc ((ScratchServicesSymbolOutline*) _data_->self);
					_data_->_tmp188_ = _data_->_tmp187_;
					_data_->_tmp189_ = _data_->i;
					_data_->_tmp190_ = scratch_services_ctags_symbol_iter_get_parent (_data_->_tmp189_);
					_data_->_tmp191_ = _data_->_tmp190_;
					_data_->_tmp192_ = _data_->i;
					_data_->_tmp193_ = scratch_services_ctags_symbol_iter_get_line (_data_->_tmp192_);
					_data_->_tmp194_ = _data_->_tmp193_;
					_data_->_tmp195_ = (GThemedIcon*) g_themed_icon_new ("lang-enum");
					_data_->_tmp196_ = _data_->_tmp195_;
					_data_->_tmp197_ = SCRATCH_SERVICES_SYMBOL_TYPE_ENUM;
					_data_->_tmp198_ = scratch_services_ctags_symbol_new (_data_->_tmp188_, _data_->_tmp191_, _data_->_tmp194_ - 1, (GIcon*) _data_->_tmp196_, &_data_->_tmp197_);
					_data_->_tmp199_ = _data_->_tmp198_;
					_g_object_unref0 (_data_->_tmp196_);
					_data_->_vala1_e = _data_->_tmp199_;
					_data_->_tmp200_ = _data_->_data64_->new_root;
					_data_->_tmp201_ = _data_->_vala1_e;
					code_widgets_source_list_expandable_item_add (_data_->_tmp200_, (CodeWidgetsSourceListItem*) _data_->_tmp201_);
					_data_->_tmp202_ = _data_->_vala1_e;
					_data_->_tmp203_ = scratch_services_symbol_outline_get_doc ((ScratchServicesSymbolOutline*) _data_->self);
					_data_->_tmp204_ = _data_->_tmp203_;
					_data_->_tmp205_ = _data_->i;
					_data_->_tmp206_ = scratch_services_ctags_symbol_iter_get_name (_data_->_tmp205_);
					_data_->_tmp207_ = _data_->_tmp206_;
					_data_->_tmp208_ = _data_->i;
					_data_->_tmp209_ = scratch_services_ctags_symbol_iter_get_line (_data_->_tmp208_);
					_data_->_tmp210_ = _data_->_tmp209_;
					_data_->_tmp211_ = _data_->i;
					_data_->_tmp212_ = scratch_services_ctags_symbol_iter_get_icon (_data_->_tmp211_);
					_data_->_tmp213_ = _data_->_tmp212_;
					_data_->_tmp214_ = _data_->i;
					_data_->_tmp215_ = _data_->_tmp214_->symbol_type;
					_data_->_tmp216_ = scratch_services_ctags_symbol_new (_data_->_tmp204_, _data_->_tmp207_, _data_->_tmp210_, _data_->_tmp213_, _data_->_tmp215_);
					_data_->_tmp217_ = _data_->_tmp216_;
					code_widgets_source_list_expandable_item_add ((CodeWidgetsSourceListExpandableItem*) _data_->_tmp202_, (CodeWidgetsSourceListItem*) _data_->_tmp217_);
					_g_object_unref0 (_data_->_tmp217_);
					_data_->_tmp218_ = _data_->iter;
					gee_iterator_remove (_data_->_tmp218_);
					_g_object_unref0 (_data_->_vala1_e);
				}
			}
			_g_object_unref0 (_data_->_vala1_parent);
			_g_object_unref0 (_data_->i);
		}
		_g_object_unref0 (_data_->iter);
	}
	{
		_data_->_tmp219_ = _data_->parent_dependent;
		_data_->_symbol_list = _data_->_tmp219_;
		_data_->_tmp220_ = _data_->_symbol_list;
		_data_->_tmp221_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _data_->_tmp220_);
		_data_->_tmp222_ = _data_->_tmp221_;
		_data_->_symbol_size = _data_->_tmp222_;
		_data_->_symbol_index = -1;
		while (TRUE) {
			_data_->_symbol_index = _data_->_symbol_index + 1;
			_data_->_tmp223_ = _data_->_symbol_index;
			_data_->_tmp224_ = _data_->_symbol_size;
			if (!(_data_->_tmp223_ < _data_->_tmp224_)) {
				break;
			}
			_data_->_tmp225_ = _data_->_symbol_list;
			_data_->_tmp226_ = gee_abstract_list_get ((GeeAbstractList*) _data_->_tmp225_, _data_->_symbol_index);
			_data_->_vala1_symbol = (ScratchServicesCtagsSymbolIter*) _data_->_tmp226_;
			_data_->_tmp227_ = _data_->_data64_->new_root;
			_data_->_tmp228_ = scratch_services_symbol_outline_get_doc ((ScratchServicesSymbolOutline*) _data_->self);
			_data_->_tmp229_ = _data_->_tmp228_;
			_data_->_tmp230_ = _data_->_vala1_symbol;
			_data_->_tmp231_ = scratch_services_ctags_symbol_iter_get_name (_data_->_tmp230_);
			_data_->_tmp232_ = _data_->_tmp231_;
			_data_->_tmp233_ = _data_->_vala1_symbol;
			_data_->_tmp234_ = scratch_services_ctags_symbol_iter_get_line (_data_->_tmp233_);
			_data_->_tmp235_ = _data_->_tmp234_;
			_data_->_tmp236_ = _data_->_vala1_symbol;
			_data_->_tmp237_ = scratch_services_ctags_symbol_iter_get_icon (_data_->_tmp236_);
			_data_->_tmp238_ = _data_->_tmp237_;
			_data_->_tmp239_ = _data_->_vala1_symbol;
			_data_->_tmp240_ = _data_->_tmp239_->symbol_type;
			_data_->_tmp241_ = scratch_services_ctags_symbol_new (_data_->_tmp229_, _data_->_tmp232_, _data_->_tmp235_, _data_->_tmp238_, _data_->_tmp240_);
			_data_->_tmp242_ = _data_->_tmp241_;
			code_widgets_source_list_expandable_item_add (_data_->_tmp227_, (CodeWidgetsSourceListItem*) _data_->_tmp242_);
			_g_object_unref0 (_data_->_tmp242_);
			_g_object_unref0 (_data_->_vala1_symbol);
		}
	}
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ___lambda47__gsource_func, block64_data_ref (_data_->_data64_), block64_data_unref);
	_g_object_unref0 (_data_->datainput);
	_g_object_unref0 (_data_->parent_dependent);
	block64_data_unref (_data_->_data64_);
	_data_->_data64_ = NULL;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
scratch_services_ctags_symbol_outline_real_add_tooltips (ScratchServicesSymbolOutline* base,
                                                         CodeWidgetsSourceListExpandableItem* root)
{
	ScratchServicesCtagsSymbolOutline * self;
	self = (ScratchServicesCtagsSymbolOutline*) base;
	g_return_if_fail (root != NULL);
	{
		GeeIterator* _parent_it = NULL;
		GeeCollection* _tmp0_;
		GeeCollection* _tmp1_;
		GeeCollection* _tmp2_;
		GeeIterator* _tmp3_;
		GeeIterator* _tmp4_;
		_tmp0_ = code_widgets_source_list_expandable_item_get_children (root);
		_tmp1_ = _tmp0_;
		_tmp2_ = _tmp1_;
		_tmp3_ = gee_iterable_iterator ((GeeIterable*) _tmp2_);
		_tmp4_ = _tmp3_;
		_g_object_unref0 (_tmp2_);
		_parent_it = _tmp4_;
		while (TRUE) {
			GeeIterator* _tmp5_;
			CodeWidgetsSourceListItem* parent = NULL;
			GeeIterator* _tmp6_;
			gpointer _tmp7_;
			CodeWidgetsSourceListItem* _tmp8_;
			_tmp5_ = _parent_it;
			if (!gee_iterator_next (_tmp5_)) {
				break;
			}
			_tmp6_ = _parent_it;
			_tmp7_ = gee_iterator_get (_tmp6_);
			parent = (CodeWidgetsSourceListItem*) _tmp7_;
			_tmp8_ = parent;
			if (CODE_WIDGETS_SOURCE_LIST_IS_EXPANDABLE_ITEM (_tmp8_)) {
				CodeWidgetsSourceListItem* _tmp9_;
				_tmp9_ = parent;
				scratch_services_ctags_symbol_outline_add_tooltip (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, CODE_WIDGETS_SOURCE_LIST_TYPE_EXPANDABLE_ITEM, CodeWidgetsSourceListExpandableItem));
			}
			_g_object_unref0 (parent);
		}
		_g_object_unref0 (_parent_it);
	}
}

static void
scratch_services_ctags_symbol_outline_add_tooltip (ScratchServicesCtagsSymbolOutline* self,
                                                   CodeWidgetsSourceListExpandableItem* parent)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (parent != NULL);
	if (SCRATCH_SERVICES_IS_CTAGS_SYMBOL (parent)) {
		ScratchServicesCtagsSymbol* item = NULL;
		ScratchServicesCtagsSymbol* _tmp0_;
		gint start = 0;
		ScratchServicesCtagsSymbol* _tmp1_;
		gint _tmp2_;
		gint _tmp3_;
		gint end = 0;
		ScratchServicesCtagsSymbol* _tmp4_;
		gint _tmp5_;
		gint _tmp6_;
		ScratchServicesCtagsSymbol* _tmp7_;
		ScratchServicesSymbolType _tmp8_;
		ScratchServicesSymbolType _tmp9_;
		ScratchServicesCtagsSymbol* _tmp11_;
		ScratchServicesDocument* _tmp12_;
		ScratchServicesDocument* _tmp13_;
		gchar* _tmp14_;
		gchar* _tmp15_;
		gchar* _tmp16_;
		gchar* _tmp17_;
		gchar* _tmp18_;
		gchar* _tmp19_;
		_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (parent, SCRATCH_SERVICES_TYPE_CTAGS_SYMBOL, ScratchServicesCtagsSymbol));
		item = _tmp0_;
		_tmp1_ = item;
		_tmp2_ = scratch_services_ctags_symbol_get_line (_tmp1_);
		_tmp3_ = _tmp2_;
		start = _tmp3_;
		_tmp4_ = item;
		_tmp5_ = scratch_services_ctags_symbol_get_line (_tmp4_);
		_tmp6_ = _tmp5_;
		end = _tmp6_;
		_tmp7_ = item;
		_tmp8_ = scratch_services_symbol_item_get_symbol_type ((ScratchServicesSymbolItem*) _tmp7_);
		_tmp9_ = _tmp8_;
		if (_tmp9_ == SCRATCH_SERVICES_SYMBOL_TYPE_METHOD) {
			gint _tmp10_ = 0;
			if (start > 0) {
				_tmp10_ = start - 1;
			} else {
				_tmp10_ = start;
			}
			start = _tmp10_;
		}
		_tmp11_ = item;
		_tmp12_ = scratch_services_symbol_outline_get_doc ((ScratchServicesSymbolOutline*) self);
		_tmp13_ = _tmp12_;
		_tmp14_ = scratch_services_document_get_slice (_tmp13_, start, 0, end, 0);
		_tmp15_ = _tmp14_;
		_tmp16_ = g_strdup_printf ("%s", _tmp15_);
		_tmp17_ = _tmp16_;
		_tmp18_ = g_markup_escape_text (_tmp17_, (gssize) -1);
		_tmp19_ = _tmp18_;
		code_widgets_source_list_item_set_tooltip ((CodeWidgetsSourceListItem*) _tmp11_, _tmp19_);
		_g_free0 (_tmp19_);
		_g_free0 (_tmp17_);
		_g_free0 (_tmp15_);
		_g_object_unref0 (item);
	}
	scratch_services_symbol_outline_add_tooltips ((ScratchServicesSymbolOutline*) self, parent);
}

static void
scratch_services_ctags_symbol_outline_destroy_root (ScratchServicesCtagsSymbolOutline* self,
                                                    CodeWidgetsSourceListExpandableItem* to_destroy)
{
	GeeTreeSet* children = NULL;
	GeeTreeSet* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (to_destroy != NULL);
	_tmp0_ = scratch_services_ctags_symbol_outline_iterate_children (self, to_destroy);
	children = _tmp0_;
	code_widgets_source_list_expandable_item_clear (to_destroy);
	{
		GeeIterator* _item_it = NULL;
		GeeTreeSet* _tmp1_;
		GeeIterator* _tmp2_;
		_tmp1_ = children;
		_tmp2_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) _tmp1_);
		_item_it = _tmp2_;
		while (TRUE) {
			GeeIterator* _tmp3_;
			ScratchServicesCtagsSymbol* item = NULL;
			GeeIterator* _tmp4_;
			gpointer _tmp5_;
			ScratchServicesCtagsSymbol* _tmp6_;
			CodeWidgetsSourceListExpandableItem* parent = NULL;
			ScratchServicesCtagsSymbol* _tmp7_;
			CodeWidgetsSourceListExpandableItem* _tmp8_;
			CodeWidgetsSourceListExpandableItem* _tmp9_;
			CodeWidgetsSourceListExpandableItem* _tmp10_;
			CodeWidgetsSourceListExpandableItem* _tmp11_;
			_tmp3_ = _item_it;
			if (!gee_iterator_next (_tmp3_)) {
				break;
			}
			_tmp4_ = _item_it;
			_tmp5_ = gee_iterator_get (_tmp4_);
			item = (ScratchServicesCtagsSymbol*) _tmp5_;
			_tmp6_ = item;
			code_widgets_source_list_expandable_item_clear ((CodeWidgetsSourceListExpandableItem*) _tmp6_);
			_tmp7_ = item;
			_tmp8_ = code_widgets_source_list_item_get_parent ((CodeWidgetsSourceListItem*) _tmp7_);
			_tmp9_ = _tmp8_;
			_tmp10_ = _g_object_ref0 (_tmp9_);
			parent = _tmp10_;
			_tmp11_ = parent;
			if (_tmp11_ != NULL) {
				CodeWidgetsSourceListExpandableItem* _tmp12_;
				ScratchServicesCtagsSymbol* _tmp13_;
				_tmp12_ = parent;
				_tmp13_ = item;
				code_widgets_source_list_expandable_item_remove (_tmp12_, (CodeWidgetsSourceListItem*) _tmp13_);
			}
			_g_object_unref0 (parent);
			_g_object_unref0 (item);
		}
		_g_object_unref0 (_item_it);
	}
	_g_object_unref0 (children);
}

static GeeTreeSet*
scratch_services_ctags_symbol_outline_iterate_children (ScratchServicesCtagsSymbolOutline* self,
                                                        CodeWidgetsSourceListExpandableItem* parent)
{
	GeeTreeSet* _result_ = NULL;
	GeeTreeSet* _tmp0_;
	GeeTreeSet* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (parent != NULL, NULL);
	_tmp0_ = gee_tree_set_new (SCRATCH_SERVICES_TYPE_CTAGS_SYMBOL, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	_result_ = _tmp0_;
	{
		GeeIterator* _child_it = NULL;
		GeeCollection* _tmp1_;
		GeeCollection* _tmp2_;
		GeeCollection* _tmp3_;
		GeeIterator* _tmp4_;
		GeeIterator* _tmp5_;
		_tmp1_ = code_widgets_source_list_expandable_item_get_children (parent);
		_tmp2_ = _tmp1_;
		_tmp3_ = _tmp2_;
		_tmp4_ = gee_iterable_iterator ((GeeIterable*) _tmp3_);
		_tmp5_ = _tmp4_;
		_g_object_unref0 (_tmp3_);
		_child_it = _tmp5_;
		while (TRUE) {
			GeeIterator* _tmp6_;
			CodeWidgetsSourceListItem* child = NULL;
			GeeIterator* _tmp7_;
			gpointer _tmp8_;
			GeeTreeSet* _tmp9_;
			CodeWidgetsSourceListItem* _tmp10_;
			GeeTreeSet* _tmp11_;
			GeeTreeSet* _tmp12_;
			_tmp6_ = _child_it;
			if (!gee_iterator_next (_tmp6_)) {
				break;
			}
			_tmp7_ = _child_it;
			_tmp8_ = gee_iterator_get (_tmp7_);
			child = (CodeWidgetsSourceListItem*) _tmp8_;
			_tmp9_ = _result_;
			_tmp10_ = child;
			_tmp11_ = scratch_services_ctags_symbol_outline_iterate_children (self, (CodeWidgetsSourceListExpandableItem*) G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, SCRATCH_SERVICES_TYPE_CTAGS_SYMBOL, ScratchServicesCtagsSymbol));
			_tmp12_ = _tmp11_;
			gee_collection_add_all ((GeeCollection*) _tmp9_, (GeeCollection*) _tmp12_);
			_g_object_unref0 (_tmp12_);
			_g_object_unref0 (child);
		}
		_g_object_unref0 (_child_it);
	}
	result = _result_;
	return result;
}

static ScratchServicesCtagsSymbol*
scratch_services_ctags_symbol_outline_find_existing (ScratchServicesCtagsSymbolOutline* self,
                                                     const gchar* name,
                                                     CodeWidgetsSourceListExpandableItem* parent)
{
	ScratchServicesCtagsSymbol* match = NULL;
	ScratchServicesCtagsSymbol* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (name != NULL, NULL);
	g_return_val_if_fail (parent != NULL, NULL);
	match = NULL;
	{
		GeeIterator* _child_it = NULL;
		GeeCollection* _tmp0_;
		GeeCollection* _tmp1_;
		GeeCollection* _tmp2_;
		GeeIterator* _tmp3_;
		GeeIterator* _tmp4_;
		_tmp0_ = code_widgets_source_list_expandable_item_get_children (parent);
		_tmp1_ = _tmp0_;
		_tmp2_ = _tmp1_;
		_tmp3_ = gee_iterable_iterator ((GeeIterable*) _tmp2_);
		_tmp4_ = _tmp3_;
		_g_object_unref0 (_tmp2_);
		_child_it = _tmp4_;
		while (TRUE) {
			GeeIterator* _tmp5_;
			CodeWidgetsSourceListItem* child = NULL;
			GeeIterator* _tmp6_;
			gpointer _tmp7_;
			ScratchServicesCtagsSymbol* child_symbol = NULL;
			CodeWidgetsSourceListItem* _tmp8_;
			ScratchServicesCtagsSymbol* _tmp9_;
			ScratchServicesCtagsSymbol* _tmp10_;
			const gchar* _tmp11_;
			const gchar* _tmp12_;
			_tmp5_ = _child_it;
			if (!gee_iterator_next (_tmp5_)) {
				break;
			}
			_tmp6_ = _child_it;
			_tmp7_ = gee_iterator_get (_tmp6_);
			child = (CodeWidgetsSourceListItem*) _tmp7_;
			_tmp8_ = child;
			_tmp9_ = _g_object_ref0 (SCRATCH_SERVICES_IS_CTAGS_SYMBOL (_tmp8_) ? ((ScratchServicesCtagsSymbol*) _tmp8_) : NULL);
			child_symbol = _tmp9_;
			_tmp10_ = child_symbol;
			_tmp11_ = code_widgets_source_list_item_get_name ((CodeWidgetsSourceListItem*) _tmp10_);
			_tmp12_ = _tmp11_;
			if (g_strcmp0 (_tmp12_, name) == 0) {
				ScratchServicesCtagsSymbol* _tmp13_;
				ScratchServicesCtagsSymbol* _tmp14_;
				_tmp13_ = child_symbol;
				_tmp14_ = _g_object_ref0 (_tmp13_);
				_g_object_unref0 (match);
				match = _tmp14_;
				_g_object_unref0 (child_symbol);
				_g_object_unref0 (child);
				break;
			} else {
				ScratchServicesCtagsSymbol* res = NULL;
				ScratchServicesCtagsSymbol* _tmp15_;
				ScratchServicesCtagsSymbol* _tmp16_;
				ScratchServicesCtagsSymbol* _tmp17_;
				_tmp15_ = child_symbol;
				_tmp16_ = scratch_services_ctags_symbol_outline_find_existing (self, name, (CodeWidgetsSourceListExpandableItem*) _tmp15_);
				res = _tmp16_;
				_tmp17_ = res;
				if (_tmp17_ != NULL) {
					result = res;
					_g_object_unref0 (child_symbol);
					_g_object_unref0 (child);
					_g_object_unref0 (_child_it);
					_g_object_unref0 (match);
					return result;
				}
				_g_object_unref0 (res);
			}
			_g_object_unref0 (child_symbol);
			_g_object_unref0 (child);
		}
		_g_object_unref0 (_child_it);
	}
	result = match;
	return result;
}

static void
_scratch_services_ctags_symbol_outline___lambda49_ (ScratchServicesCtagsSymbolOutline* self,
                                                    CodeWidgetsSourceListItem* selected)
{
	ScratchServicesDocument* _tmp0_;
	ScratchServicesDocument* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	CodeWidgetsSourceList* _tmp4_;
	if (selected == NULL) {
		return;
	}
	_tmp0_ = scratch_services_symbol_outline_get_doc ((ScratchServicesSymbolOutline*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = scratch_services_ctags_symbol_get_line (G_TYPE_CHECK_INSTANCE_CAST (selected, SCRATCH_SERVICES_TYPE_CTAGS_SYMBOL, ScratchServicesCtagsSymbol));
	_tmp3_ = _tmp2_;
	scratch_services_document_goto (_tmp1_, _tmp3_);
	_tmp4_ = ((ScratchServicesSymbolOutline*) self)->store;
	code_widgets_source_list_set_selected (_tmp4_, NULL);
}

static void
__scratch_services_ctags_symbol_outline___lambda49__code_widgets_source_list_item_selected (CodeWidgetsSourceList* _sender,
                                                                                            CodeWidgetsSourceListItem* item,
                                                                                            gpointer self)
{
	_scratch_services_ctags_symbol_outline___lambda49_ ((ScratchServicesCtagsSymbolOutline*) self, item);
}

static GObject *
scratch_services_ctags_symbol_outline_constructor (GType type,
                                                   guint n_construct_properties,
                                                   GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	ScratchServicesCtagsSymbolOutline * self;
	CodeWidgetsSourceList* _tmp0_;
	parent_class = G_OBJECT_CLASS (scratch_services_ctags_symbol_outline_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SCRATCH_SERVICES_TYPE_CTAGS_SYMBOL_OUTLINE, ScratchServicesCtagsSymbolOutline);
	_tmp0_ = ((ScratchServicesSymbolOutline*) self)->store;
	g_signal_connect_object (_tmp0_, "item-selected", (GCallback) __scratch_services_ctags_symbol_outline___lambda49__code_widgets_source_list_item_selected, self, 0);
	return obj;
}

static void
scratch_services_ctags_symbol_outline_class_init (ScratchServicesCtagsSymbolOutlineClass * klass,
                                                  gpointer klass_data)
{
	ScratchServicesSymbolType* _tmp0_;
	scratch_services_ctags_symbol_outline_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ScratchServicesCtagsSymbolOutline_private_offset);
	((ScratchServicesSymbolOutlineClass *) klass)->parse_symbols = (void (*) (ScratchServicesSymbolOutline*)) scratch_services_ctags_symbol_outline_real_parse_symbols;
	((ScratchServicesSymbolOutlineClass *) klass)->add_tooltips = (void (*) (ScratchServicesSymbolOutline*, CodeWidgetsSourceListExpandableItem*)) scratch_services_ctags_symbol_outline_real_add_tooltips;
	G_OBJECT_CLASS (klass)->constructor = scratch_services_ctags_symbol_outline_constructor;
	G_OBJECT_CLASS (klass)->finalize = scratch_services_ctags_symbol_outline_finalize;
	_tmp0_ = g_new0 (ScratchServicesSymbolType, 7);
	_tmp0_[0] = SCRATCH_SERVICES_SYMBOL_TYPE_CLASS;
	_tmp0_[1] = SCRATCH_SERVICES_SYMBOL_TYPE_CONSTRUCTOR;
	_tmp0_[2] = SCRATCH_SERVICES_SYMBOL_TYPE_PROPERTY;
	_tmp0_[3] = SCRATCH_SERVICES_SYMBOL_TYPE_METHOD;
	_tmp0_[4] = SCRATCH_SERVICES_SYMBOL_TYPE_STRUCT;
	_tmp0_[5] = SCRATCH_SERVICES_SYMBOL_TYPE_ENUM;
	_tmp0_[6] = SCRATCH_SERVICES_SYMBOL_TYPE_CONSTANT;
	scratch_services_symbol_outline_filters = (g_free (scratch_services_symbol_outline_filters), NULL);
	scratch_services_symbol_outline_filters = _tmp0_;
	scratch_services_symbol_outline_filters_length1 = 7;
}

static void
scratch_services_ctags_symbol_outline_instance_init (ScratchServicesCtagsSymbolOutline * self,
                                                     gpointer klass)
{
	self->priv = scratch_services_ctags_symbol_outline_get_instance_private (self);
}

static void
scratch_services_ctags_symbol_outline_finalize (GObject * obj)
{
	ScratchServicesCtagsSymbolOutline * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SCRATCH_SERVICES_TYPE_CTAGS_SYMBOL_OUTLINE, ScratchServicesCtagsSymbolOutline);
	g_debug ("CtagsSymbolOutline.vala:54: Destroy Ctags outline");
	_g_object_unref0 (self->priv->current_subprocess);
	G_OBJECT_CLASS (scratch_services_ctags_symbol_outline_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
scratch_services_ctags_symbol_outline_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ScratchServicesCtagsSymbolOutlineClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) scratch_services_ctags_symbol_outline_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ScratchServicesCtagsSymbolOutline), 0, (GInstanceInitFunc) scratch_services_ctags_symbol_outline_instance_init, NULL };
	GType scratch_services_ctags_symbol_outline_type_id;
	scratch_services_ctags_symbol_outline_type_id = g_type_register_static (SCRATCH_SERVICES_TYPE_SYMBOL_OUTLINE, "ScratchServicesCtagsSymbolOutline", &g_define_type_info, G_TYPE_FLAG_NONE);
	ScratchServicesCtagsSymbolOutline_private_offset = g_type_add_instance_private (scratch_services_ctags_symbol_outline_type_id, sizeof (ScratchServicesCtagsSymbolOutlinePrivate));
	return scratch_services_ctags_symbol_outline_type_id;
}

GType
scratch_services_ctags_symbol_outline_get_type (void)
{
	static gsize scratch_services_ctags_symbol_outline_type_id__once = 0;
	if (g_once_init_enter (&scratch_services_ctags_symbol_outline_type_id__once)) {
		GType scratch_services_ctags_symbol_outline_type_id;
		scratch_services_ctags_symbol_outline_type_id = scratch_services_ctags_symbol_outline_get_type_once ();
		g_once_init_leave (&scratch_services_ctags_symbol_outline_type_id__once, scratch_services_ctags_symbol_outline_type_id);
	}
	return scratch_services_ctags_symbol_outline_type_id__once;
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}

static void
_vala_array_free (gpointer array,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

static gssize
_vala_array_length (gpointer array)
{
	gssize length;
	length = 0;
	if (array) {
		while (((gpointer*) array)[length]) {
			length++;
		}
	}
	return length;
}

