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

/*
 * Copyright (C) 2008-2010 Abderrahim Kitouni
 *
 * 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 2 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 <glib.h>
#include <glib-object.h>
#include <libanjuta/libanjuta.h>
#include <libanjuta/interfaces/libanjuta-interfaces.h>
#include <gio/gio.h>
#include <vala.h>
#include <valagee.h>
#include <stdlib.h>
#include <string.h>
#include "config.h"
#include <gtk/gtk.h>
#include <glib/gi18n-lib.h>


#define TYPE_VALA_PLUGIN (vala_plugin_get_type ())
#define VALA_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_PLUGIN, ValaPlugin))
#define VALA_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_PLUGIN, ValaPluginClass))
#define IS_VALA_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_PLUGIN))
#define IS_VALA_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_PLUGIN))
#define VALA_PLUGIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_PLUGIN, ValaPluginClass))

typedef struct _ValaPlugin ValaPlugin;
typedef struct _ValaPluginClass ValaPluginClass;
typedef struct _ValaPluginPrivate ValaPluginPrivate;

#define TYPE_BLOCK_LOCATOR (block_locator_get_type ())
#define BLOCK_LOCATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BLOCK_LOCATOR, BlockLocator))
#define BLOCK_LOCATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BLOCK_LOCATOR, BlockLocatorClass))
#define IS_BLOCK_LOCATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BLOCK_LOCATOR))
#define IS_BLOCK_LOCATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BLOCK_LOCATOR))
#define BLOCK_LOCATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BLOCK_LOCATOR, BlockLocatorClass))

typedef struct _BlockLocator BlockLocator;
typedef struct _BlockLocatorClass BlockLocatorClass;

#define TYPE_ANJUTA_REPORT (anjuta_report_get_type ())
#define ANJUTA_REPORT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ANJUTA_REPORT, AnjutaReport))
#define ANJUTA_REPORT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ANJUTA_REPORT, AnjutaReportClass))
#define IS_ANJUTA_REPORT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ANJUTA_REPORT))
#define IS_ANJUTA_REPORT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ANJUTA_REPORT))
#define ANJUTA_REPORT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ANJUTA_REPORT, AnjutaReportClass))

typedef struct _AnjutaReport AnjutaReport;
typedef struct _AnjutaReportClass AnjutaReportClass;

#define TYPE_VALA_PROVIDER (vala_provider_get_type ())
#define VALA_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_PROVIDER, ValaProvider))
#define VALA_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_PROVIDER, ValaProviderClass))
#define IS_VALA_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_PROVIDER))
#define IS_VALA_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_PROVIDER))
#define VALA_PROVIDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_PROVIDER, ValaProviderClass))

typedef struct _ValaProvider ValaProvider;
typedef struct _ValaProviderClass ValaProviderClass;
enum  {
	VALA_PLUGIN_0_PROPERTY,
	VALA_PLUGIN_NUM_PROPERTIES
};
static GParamSpec* vala_plugin_properties[VALA_PLUGIN_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _vala_code_context_unref0(var) ((var == NULL) ? NULL : (var = (vala_code_context_unref (var), NULL)))
#define _vala_code_visitor_unref0(var) ((var == NULL) ? NULL : (var = (vala_code_visitor_unref (var), NULL)))
#define _vala_report_unref0(var) ((var == NULL) ? NULL : (var = (vala_report_unref (var), NULL)))
#define _vala_iterable_unref0(var) ((var == NULL) ? NULL : (var = (vala_iterable_unref (var), NULL)))
#define _vala_source_file_unref0(var) ((var == NULL) ? NULL : (var = (vala_source_file_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))
#define _vala_code_node_unref0(var) ((var == NULL) ? NULL : (var = (vala_code_node_unref (var), NULL)))
#define __g_list_free__vala_code_node_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__vala_code_node_unref0_ (var), NULL)))
#define _g_string_free0(var) ((var == NULL) ? NULL : (var = (g_string_free (var, TRUE), NULL)))
#define _vala_iterator_unref0(var) ((var == NULL) ? NULL : (var = (vala_iterator_unref (var), NULL)))
#define _vala_map_unref0(var) ((var == NULL) ? NULL : (var = (vala_map_unref (var), NULL)))
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

struct _ValaPlugin {
	AnjutaPlugin parent_instance;
	ValaPluginPrivate * priv;
	IAnjutaEditor* current_editor;
	GSettings* settings;
};

struct _ValaPluginClass {
	AnjutaPluginClass parent_class;
};

struct _ValaPluginPrivate {
	guint editor_watch_id;
	gulong project_loaded_id;
	ValaCodeContext* context;
	GRecMutex __lock_context;
	GCancellable* cancel;
	BlockLocator* locator;
	AnjutaReport* report;
	ValaProvider* provider;
	ValaParser* parser;
	ValaGenieParser* genie_parser;
	ValaSet* current_sources;
};


static gpointer vala_plugin_parent_class = NULL;
extern gchar* vala_plugin_PREFS_BUILDER;
gchar* vala_plugin_PREFS_BUILDER = NULL;
extern GtkBuilder* vala_plugin_bxml;
GtkBuilder* vala_plugin_bxml = NULL;
static IAnjutaPreferencesIface * vala_plugin_ianjuta_preferences_parent_iface = NULL;
static GType vala_plugin_type_id = 0;

GType vala_plugin_get_type (void) G_GNUC_CONST;
GType block_locator_get_type (void) G_GNUC_CONST;
GType anjuta_report_get_type (void) G_GNUC_CONST;
GType vala_provider_get_type (void) G_GNUC_CONST;
#define VALA_PLUGIN_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_VALA_PLUGIN, ValaPluginPrivate))
BlockLocator* block_locator_new (void);
BlockLocator* block_locator_construct (GType object_type);
#define VALA_PLUGIN_PREF_WIDGET_SPACE "preferences:completion-space-after-func"
#define VALA_PLUGIN_PREF_WIDGET_BRACE "preferences:completion-brace-after-func"
#define VALA_PLUGIN_PREF_WIDGET_AUTO "preferences:completion-enable"
#define VALA_PLUGIN_ICON_FILE "anjuta-vala.png"
#define VALA_PLUGIN_DECL_MARK "/* ANJUTA: Widgets declaration for %s - DO NOT REMOVE */\n"
#define VALA_PLUGIN_INIT_MARK "/* ANJUTA: Widgets initialization for %s - DO NOT REMOVE */\n"
static ValaPlugin* vala_plugin_new (void);
static ValaPlugin* vala_plugin_construct (GType object_type);
static gboolean vala_plugin_real_activate (AnjutaPlugin* base);
AnjutaReport* anjuta_report_new (void);
AnjutaReport* anjuta_report_construct (GType object_type);
void anjuta_report_set_docman (AnjutaReport* self, IAnjutaDocumentManager* value);
static void vala_plugin_init_context (ValaPlugin* self);
ValaProvider* vala_provider_new (ValaPlugin* plugin);
ValaProvider* vala_provider_construct (GType object_type, ValaPlugin* plugin);
void vala_plugin_editor_value_added (ValaPlugin* self, AnjutaPlugin* plugin, const gchar* name, GValue* value);
static void _vala_plugin_editor_value_added_anjuta_plugin_value_added (AnjutaPlugin* plugin, const gchar* name, GValue* value, gpointer self);
void vala_plugin_editor_value_removed (ValaPlugin* self, AnjutaPlugin* plugin, const gchar* name);
static void _vala_plugin_editor_value_removed_anjuta_plugin_value_removed (AnjutaPlugin* plugin, const gchar* name, gpointer self);
static gboolean vala_plugin_real_deactivate (AnjutaPlugin* base);
void anjuta_report_clear_error_indicators (AnjutaReport* self, ValaSourceFile* file);
static void vala_plugin_parse (ValaPlugin* self);
static void ___lambda4_ (ValaPlugin* self);
static gpointer ____lambda4__gthread_func (gpointer self);
static void vala_plugin_add_project_files (ValaPlugin* self);
static void __lambda5_ (ValaPlugin* self, AnjutaProjectNode* node);
static void ___lambda5__anjuta_project_node_foreach_func (AnjutaProjectNode* node, gpointer self);
static void _vala_array_add1 (gchar** * array, int* length, int* size, gchar* value);
static void _vala_array_add2 (gchar** * array, int* length, int* size, gchar* value);
static void _vala_array_add3 (gchar** * array, int* length, int* size, gchar* value);
static void _vala_array_add4 (gchar** * array, int* length, int* size, gchar* value);
static gchar** _vala_array_dup1 (gchar** self, int length);
void vala_plugin_on_project_loaded (ValaPlugin* self, IAnjutaProjectManager* pm, GError* e);
static void _vala_plugin_on_project_loaded_ianjuta_project_manager_project_loaded (IAnjutaProjectManager* _sender, GError* _error_, gpointer self);
void vala_plugin_on_char_added (ValaPlugin* self, IAnjutaEditor* editor, IAnjutaIterable* position, gchar ch);
static void _vala_plugin_on_char_added_ianjuta_editor_char_added (IAnjutaEditor* _sender, IAnjutaIterable* position, gchar ch, gpointer self);
void vala_plugin_on_file_saved (ValaPlugin* self, IAnjutaFileSavable* savable, GFile* file);
static void _vala_plugin_on_file_saved_ianjuta_file_savable_saved (IAnjutaFileSavable* _sender, GFile* file, gpointer self);
gboolean vala_plugin_on_drop_possible (ValaPlugin* self, IAnjutaEditorGladeSignal* editor, IAnjutaIterable* position);
static gboolean _vala_plugin_on_drop_possible_ianjuta_editor_glade_signal_drop_possible (IAnjutaEditorGladeSignal* _sender, IAnjutaIterable* iterator, gpointer self);
void vala_plugin_on_drop (ValaPlugin* self, IAnjutaEditorGladeSignal* editor, IAnjutaIterable* position, const gchar* signal_data);
static void _vala_plugin_on_drop_ianjuta_editor_glade_signal_drop (IAnjutaEditorGladeSignal* _sender, IAnjutaIterable* iterator, const gchar* signal_data, gpointer self);
static void vala_plugin_insert_member_decl_and_init (ValaPlugin* self, IAnjutaEditor* editor, const gchar* widget_ctype, const gchar* widget_name, const gchar* filename);
static void _vala_plugin_insert_member_decl_and_init_ianjuta_editor_glade_member_add (IAnjutaEditor* _sender, const gchar* widget_typename, const gchar* widget_name, const gchar* filename, gpointer self);
void anjuta_report_update_errors (AnjutaReport* self, IAnjutaEditor* editor);
static void vala_plugin_update_file (ValaPlugin* self, ValaSourceFile* file);
#define VALA_PROVIDER_PREF_CALLTIP_ENABLE "calltip-enable"
void vala_provider_show_call_tip (ValaProvider* self, IAnjutaEditorTip* editor);
static ValaSymbol* vala_plugin_get_scope (ValaPlugin* self, IAnjutaEditor* editor, IAnjutaIterable* position);
ValaSymbol* vala_plugin_get_current_context (ValaPlugin* self, IAnjutaEditor* editor, IAnjutaIterable* position);
static ValaSymbol* vala_plugin_lookup_symbol_by_cname (ValaPlugin* self, const gchar* cname, ValaSymbol* parent);
static GList* vala_plugin_symbol_lookup_inherited (ValaPlugin* self, ValaSymbol* sym, const gchar* name, gboolean prefix_match, gboolean invocation);
static void _vala_code_node_unref0_ (gpointer var);
static inline void _g_list_free__vala_code_node_unref0_ (GList* self);
static gboolean vala_plugin_insert_after_mark (ValaPlugin* self, IAnjutaEditor* editor, const gchar* mark, const gchar* code_to_add);
ValaSymbol* block_locator_locate (BlockLocator* self, ValaSourceFile* file, gint line, gint column);
GList* vala_plugin_lookup_symbol (ValaPlugin* self, ValaExpression* inner, const gchar* name, gboolean prefix_match, ValaBlock* block);
static void vala_plugin_on_autocompletion_toggled (ValaPlugin* self, GtkToggleButton* button);
static void vala_plugin_real_merge (IAnjutaPreferences* base, AnjutaPreferences* prefs, GError** error);
static void _vala_plugin_on_autocompletion_toggled_gtk_toggle_button_toggled (GtkToggleButton* _sender, gpointer self);
static void vala_plugin_real_unmerge (IAnjutaPreferences* base, AnjutaPreferences* prefs, GError** error);
static void vala_plugin_finalize (GObject * obj);
GType anjuta_glue_register_components (GTypeModule* module);
GType block_locator_register_type (GTypeModule * module);
GType vala_plugin_register_type (GTypeModule * module);
GType vala_provider_register_type (GTypeModule * module);
GType anjuta_report_register_type (GTypeModule * module);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
static gint _vala_array_length (gpointer array);


static ValaPlugin* vala_plugin_construct (GType object_type) {
	ValaPlugin * self = NULL;
	self = (ValaPlugin*) g_object_new (object_type, NULL);
	return self;
}


static ValaPlugin* vala_plugin_new (void) {
	return vala_plugin_construct (TYPE_VALA_PLUGIN);
}


static void _vala_plugin_editor_value_added_anjuta_plugin_value_added (AnjutaPlugin* plugin, const gchar* name, GValue* value, gpointer self) {
	vala_plugin_editor_value_added ((ValaPlugin*) self, plugin, name, value);
}


static void _vala_plugin_editor_value_removed_anjuta_plugin_value_removed (AnjutaPlugin* plugin, const gchar* name, gpointer self) {
	vala_plugin_editor_value_removed ((ValaPlugin*) self, plugin, name);
}


static gboolean vala_plugin_real_activate (AnjutaPlugin* base) {
	ValaPlugin * self;
	gboolean result = FALSE;
	AnjutaReport* _tmp0_;
	GObject* _tmp1_ = NULL;
	AnjutaShell* _tmp2_;
	AnjutaShell* _tmp3_;
	AnjutaShell* _tmp4_;
	GObject* _tmp5_;
	GObject* _tmp6_;
	AnjutaReport* _tmp8_;
	ValaParser* _tmp9_;
	ValaGenieParser* _tmp10_;
	ValaProvider* _tmp11_;
	guint _tmp12_;
	GError * _inner_error_ = NULL;
	self = (ValaPlugin*) base;
	g_debug ("plugin.vala:51: Activating ValaPlugin");
	_tmp0_ = anjuta_report_new ();
	_vala_report_unref0 (self->priv->report);
	self->priv->report = _tmp0_;
	g_object_get ((AnjutaPlugin*) self, "shell", &_tmp2_, NULL);
	_tmp3_ = _tmp2_;
	_tmp4_ = _tmp3_;
	_tmp5_ = anjuta_shell_get_object (_tmp4_, "IAnjutaDocumentManager", &_inner_error_);
	_tmp6_ = _tmp5_;
	_g_object_unref0 (_tmp4_);
	_tmp1_ = _tmp6_;
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		gboolean _tmp7_ = FALSE;
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return _tmp7_;
	}
	_tmp8_ = self->priv->report;
	anjuta_report_set_docman (_tmp8_, G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, ianjuta_document_manager_get_type (), IAnjutaDocumentManager));
	_tmp9_ = vala_parser_new ();
	_vala_code_visitor_unref0 (self->priv->parser);
	self->priv->parser = _tmp9_;
	_tmp10_ = vala_genie_parser_new ();
	_vala_code_visitor_unref0 (self->priv->genie_parser);
	self->priv->genie_parser = _tmp10_;
	vala_plugin_init_context (self);
	_tmp11_ = vala_provider_new (self);
	_g_object_unref0 (self->priv->provider);
	self->priv->provider = _tmp11_;
	_tmp12_ = anjuta_plugin_add_watch ((AnjutaPlugin*) self, "document_manager_current_document", _vala_plugin_editor_value_added_anjuta_plugin_value_added, _vala_plugin_editor_value_removed_anjuta_plugin_value_removed, self);
	self->priv->editor_watch_id = _tmp12_;
	result = TRUE;
	return result;
}


static gboolean vala_plugin_real_deactivate (AnjutaPlugin* base) {
	ValaPlugin * self;
	gboolean result = FALSE;
	guint _tmp0_;
	GCancellable* _tmp1_;
	GError * _inner_error_ = NULL;
	self = (ValaPlugin*) base;
	g_debug ("plugin.vala:68: Deactivating ValaPlugin");
	_tmp0_ = self->priv->editor_watch_id;
	anjuta_plugin_remove_watch ((AnjutaPlugin*) self, _tmp0_, TRUE);
	_tmp1_ = self->priv->cancel;
	g_cancellable_cancel (_tmp1_);
	{
		ValaCodeContext* _tmp2_;
		_tmp2_ = self->priv->context;
		g_rec_mutex_lock (&self->priv->__lock_context);
		{
			_vala_code_context_unref0 (self->priv->context);
			self->priv->context = NULL;
		}
		__finally0:
		{
			ValaCodeContext* _tmp3_;
			_tmp3_ = self->priv->context;
			g_rec_mutex_unlock (&self->priv->__lock_context);
		}
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			gboolean _tmp4_ = FALSE;
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return _tmp4_;
		}
	}
	result = TRUE;
	return result;
}


static void vala_plugin_init_context (ValaPlugin* self) {
	ValaCodeContext* _tmp0_;
	ValaCodeContext* _tmp1_;
	ValaCodeContext* _tmp2_;
	AnjutaReport* _tmp3_;
	AnjutaReport* _tmp4_;
	GCancellable* _tmp5_;
	ValaParser* _tmp6_;
	ValaCodeContext* _tmp7_;
	ValaGenieParser* _tmp8_;
	ValaCodeContext* _tmp9_;
	GHashFunc _tmp10_;
	GEqualFunc _tmp11_;
	ValaHashSet* _tmp12_;
	g_return_if_fail (self != NULL);
	_tmp0_ = vala_code_context_new ();
	_vala_code_context_unref0 (self->priv->context);
	self->priv->context = _tmp0_;
	_tmp1_ = self->priv->context;
	vala_code_context_set_profile (_tmp1_, VALA_PROFILE_GOBJECT);
	_tmp2_ = self->priv->context;
	_tmp3_ = self->priv->report;
	vala_code_context_set_report (_tmp2_, (ValaReport*) _tmp3_);
	_tmp4_ = self->priv->report;
	anjuta_report_clear_error_indicators (_tmp4_, NULL);
	_tmp5_ = g_cancellable_new ();
	_g_object_unref0 (self->priv->cancel);
	self->priv->cancel = _tmp5_;
	_tmp6_ = self->priv->parser;
	_tmp7_ = self->priv->context;
	vala_parser_parse (_tmp6_, _tmp7_);
	_tmp8_ = self->priv->genie_parser;
	_tmp9_ = self->priv->context;
	vala_genie_parser_parse (_tmp8_, _tmp9_);
	_tmp10_ = g_str_hash;
	_tmp11_ = g_str_equal;
	_tmp12_ = vala_hash_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, _tmp10_, _tmp11_);
	_vala_iterable_unref0 (self->priv->current_sources);
	self->priv->current_sources = (ValaSet*) _tmp12_;
}


static gpointer _vala_report_ref0 (gpointer self) {
	return self ? vala_report_ref (self) : NULL;
}


static void ___lambda4_ (ValaPlugin* self) {
	GError * _inner_error_ = NULL;
	{
		ValaCodeContext* _tmp0_;
		_tmp0_ = self->priv->context;
		g_rec_mutex_lock (&self->priv->__lock_context);
		{
			ValaCodeContext* _tmp1_;
			AnjutaReport* report = NULL;
			ValaCodeContext* _tmp2_;
			ValaReport* _tmp3_;
			ValaReport* _tmp4_;
			AnjutaReport* _tmp5_;
			gboolean _tmp33_ = FALSE;
			AnjutaReport* _tmp34_;
			gint _tmp35_;
			ValaCodeContext* _tmp39_;
			_tmp1_ = self->priv->context;
			vala_code_context_push (_tmp1_);
			_tmp2_ = self->priv->context;
			_tmp3_ = vala_code_context_get_report (_tmp2_);
			_tmp4_ = _tmp3_;
			_tmp5_ = _vala_report_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp4_, TYPE_ANJUTA_REPORT) ? ((AnjutaReport*) _tmp4_) : NULL);
			report = _tmp5_;
			{
				ValaList* _src_list = NULL;
				ValaCodeContext* _tmp6_;
				ValaList* _tmp7_;
				gint _src_size = 0;
				ValaList* _tmp8_;
				gint _tmp9_;
				gint _tmp10_;
				gint _src_index = 0;
				_tmp6_ = self->priv->context;
				_tmp7_ = vala_code_context_get_source_files (_tmp6_);
				_src_list = _tmp7_;
				_tmp8_ = _src_list;
				_tmp9_ = vala_collection_get_size ((ValaCollection*) _tmp8_);
				_tmp10_ = _tmp9_;
				_src_size = _tmp10_;
				_src_index = -1;
				while (TRUE) {
					gint _tmp11_;
					gint _tmp12_;
					gint _tmp13_;
					ValaSourceFile* src = NULL;
					ValaList* _tmp14_;
					gint _tmp15_;
					gpointer _tmp16_;
					ValaSourceFile* _tmp17_;
					ValaList* _tmp18_;
					ValaList* _tmp19_;
					gint _tmp20_;
					gint _tmp21_;
					gboolean _tmp22_;
					GCancellable* _tmp30_;
					gboolean _tmp31_;
					_tmp11_ = _src_index;
					_src_index = _tmp11_ + 1;
					_tmp12_ = _src_index;
					_tmp13_ = _src_size;
					if (!(_tmp12_ < _tmp13_)) {
						break;
					}
					_tmp14_ = _src_list;
					_tmp15_ = _src_index;
					_tmp16_ = vala_list_get (_tmp14_, _tmp15_);
					src = (ValaSourceFile*) _tmp16_;
					_tmp17_ = src;
					_tmp18_ = vala_source_file_get_nodes (_tmp17_);
					_tmp19_ = _tmp18_;
					_tmp20_ = vala_collection_get_size ((ValaCollection*) _tmp19_);
					_tmp21_ = _tmp20_;
					_tmp22_ = _tmp21_ == 0;
					_vala_iterable_unref0 (_tmp19_);
					if (_tmp22_) {
						ValaSourceFile* _tmp23_;
						const gchar* _tmp24_;
						const gchar* _tmp25_;
						ValaGenieParser* _tmp26_;
						ValaSourceFile* _tmp27_;
						ValaParser* _tmp28_;
						ValaSourceFile* _tmp29_;
						_tmp23_ = src;
						_tmp24_ = vala_source_file_get_filename (_tmp23_);
						_tmp25_ = _tmp24_;
						g_debug ("plugin.vala:105: parsing file %s", _tmp25_);
						_tmp26_ = self->priv->genie_parser;
						_tmp27_ = src;
						vala_code_visitor_visit_source_file ((ValaCodeVisitor*) _tmp26_, _tmp27_);
						_tmp28_ = self->priv->parser;
						_tmp29_ = src;
						vala_code_visitor_visit_source_file ((ValaCodeVisitor*) _tmp28_, _tmp29_);
					}
					_tmp30_ = self->priv->cancel;
					_tmp31_ = g_cancellable_is_cancelled (_tmp30_);
					if (_tmp31_) {
						vala_code_context_pop ();
						_vala_source_file_unref0 (src);
						_vala_iterable_unref0 (_src_list);
						_vala_report_unref0 (report);
						{
							ValaCodeContext* _tmp32_;
							_tmp32_ = self->priv->context;
							g_rec_mutex_unlock (&self->priv->__lock_context);
						}
						return;
					}
					_vala_source_file_unref0 (src);
				}
				_vala_iterable_unref0 (_src_list);
			}
			_tmp34_ = report;
			_tmp35_ = vala_report_get_errors ((ValaReport*) _tmp34_);
			if (_tmp35_ > 0) {
				_tmp33_ = TRUE;
			} else {
				GCancellable* _tmp36_;
				gboolean _tmp37_;
				_tmp36_ = self->priv->cancel;
				_tmp37_ = g_cancellable_is_cancelled (_tmp36_);
				_tmp33_ = _tmp37_;
			}
			if (_tmp33_) {
				vala_code_context_pop ();
				_vala_report_unref0 (report);
				{
					ValaCodeContext* _tmp38_;
					_tmp38_ = self->priv->context;
					g_rec_mutex_unlock (&self->priv->__lock_context);
				}
				return;
			}
			_tmp39_ = self->priv->context;
			vala_code_context_check (_tmp39_);
			vala_code_context_pop ();
			_vala_report_unref0 (report);
		}
		__finally2:
		{
			ValaCodeContext* _tmp40_;
			_tmp40_ = self->priv->context;
			g_rec_mutex_unlock (&self->priv->__lock_context);
		}
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return;
		}
	}
}


static gpointer ____lambda4__gthread_func (gpointer self) {
	gpointer result;
	___lambda4_ ((ValaPlugin*) self);
	result = NULL;
	g_object_unref (self);
	return result;
}


static void vala_plugin_parse (ValaPlugin* self) {
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	{
		g_thread_create (____lambda4__gthread_func, g_object_ref (self), FALSE, &_inner_error_);
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			if (_inner_error_->domain == G_THREAD_ERROR) {
				goto __catch1_g_thread_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return;
		}
	}
	goto __finally1;
	__catch1_g_thread_error:
	{
		GError* err = NULL;
		GError* _tmp0_;
		const gchar* _tmp1_;
		err = _inner_error_;
		_inner_error_ = NULL;
		_tmp0_ = err;
		_tmp1_ = _tmp0_->message;
		g_warning ("plugin.vala:126: cannot create thread : %s", _tmp1_);
		_g_error_free0 (err);
	}
	__finally1:
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
}


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


static void __lambda5_ (ValaPlugin* self, AnjutaProjectNode* node) {
	AnjutaProjectNode* _tmp0_;
	AnjutaProjectNodeType _tmp1_;
	AnjutaProjectNode* _tmp2_;
	GFile* _tmp3_;
	gchar* path = NULL;
	AnjutaProjectNode* _tmp4_;
	GFile* _tmp5_;
	gchar* _tmp6_;
	const gchar* _tmp7_;
	gboolean _tmp8_ = FALSE;
	gboolean _tmp9_ = FALSE;
	const gchar* _tmp10_;
	gboolean _tmp11_;
	g_return_if_fail (node != NULL);
	_tmp0_ = node;
	_tmp1_ = anjuta_project_node_get_node_type (_tmp0_);
	if (!((_tmp1_ & ANJUTA_PROJECT_SOURCE) == ANJUTA_PROJECT_SOURCE)) {
		return;
	}
	_tmp2_ = node;
	_tmp3_ = anjuta_project_node_get_file (_tmp2_);
	if (_tmp3_ == NULL) {
		return;
	}
	_tmp4_ = node;
	_tmp5_ = anjuta_project_node_get_file (_tmp4_);
	_tmp6_ = g_file_get_path (_tmp5_);
	path = _tmp6_;
	_tmp7_ = path;
	if (_tmp7_ == NULL) {
		_g_free0 (path);
		return;
	}
	_tmp10_ = path;
	_tmp11_ = g_str_has_suffix (_tmp10_, ".vala");
	if (_tmp11_) {
		_tmp9_ = TRUE;
	} else {
		const gchar* _tmp12_;
		gboolean _tmp13_;
		_tmp12_ = path;
		_tmp13_ = g_str_has_suffix (_tmp12_, ".vapi");
		_tmp9_ = _tmp13_;
	}
	if (_tmp9_) {
		_tmp8_ = TRUE;
	} else {
		const gchar* _tmp14_;
		gboolean _tmp15_;
		_tmp14_ = path;
		_tmp15_ = g_str_has_suffix (_tmp14_, ".gs");
		_tmp8_ = _tmp15_;
	}
	if (_tmp8_) {
		ValaSet* _tmp16_;
		const gchar* _tmp17_;
		gboolean _tmp18_;
		_tmp16_ = self->priv->current_sources;
		_tmp17_ = path;
		_tmp18_ = vala_collection_contains ((ValaCollection*) _tmp16_, _tmp17_);
		if (_tmp18_) {
			const gchar* _tmp19_;
			_tmp19_ = path;
			g_debug ("plugin.vala:160: file %s already added", _tmp19_);
		} else {
			ValaCodeContext* _tmp20_;
			const gchar* _tmp21_;
			ValaSet* _tmp22_;
			const gchar* _tmp23_;
			const gchar* _tmp24_;
			_tmp20_ = self->priv->context;
			_tmp21_ = path;
			vala_code_context_add_source_filename (_tmp20_, _tmp21_, FALSE, FALSE);
			_tmp22_ = self->priv->current_sources;
			_tmp23_ = path;
			vala_collection_add ((ValaCollection*) _tmp22_, _tmp23_);
			_tmp24_ = path;
			g_debug ("plugin.vala:164: file %s added", _tmp24_);
		}
	} else {
		const gchar* _tmp25_;
		_tmp25_ = path;
		g_debug ("plugin.vala:167: file %s skipped", _tmp25_);
	}
	_g_free0 (path);
}


static void ___lambda5__anjuta_project_node_foreach_func (AnjutaProjectNode* node, gpointer self) {
	__lambda5_ ((ValaPlugin*) self, node);
}


static void _vala_array_add1 (gchar** * array, int* length, int* size, gchar* value) {
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gchar*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}


static glong string_strnlen (gchar* str, glong maxlen) {
	glong result = 0L;
	gchar* end = NULL;
	gchar* _tmp0_;
	glong _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	_tmp0_ = str;
	_tmp1_ = maxlen;
	_tmp2_ = memchr (_tmp0_, 0, (gsize) _tmp1_);
	end = _tmp2_;
	_tmp3_ = end;
	if (_tmp3_ == NULL) {
		glong _tmp4_;
		_tmp4_ = maxlen;
		result = _tmp4_;
		return result;
	} else {
		gchar* _tmp5_;
		gchar* _tmp6_;
		_tmp5_ = end;
		_tmp6_ = str;
		result = (glong) (_tmp5_ - _tmp6_);
		return result;
	}
}


static gchar* string_substring (const gchar* self, glong offset, glong len) {
	gchar* result = NULL;
	glong string_length = 0L;
	gboolean _tmp0_ = FALSE;
	glong _tmp1_;
	glong _tmp8_;
	glong _tmp14_;
	glong _tmp17_;
	glong _tmp18_;
	glong _tmp19_;
	glong _tmp20_;
	glong _tmp21_;
	gchar* _tmp22_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp1_ = offset;
	if (_tmp1_ >= ((glong) 0)) {
		glong _tmp2_;
		_tmp2_ = len;
		_tmp0_ = _tmp2_ >= ((glong) 0);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		glong _tmp3_;
		glong _tmp4_;
		glong _tmp5_;
		_tmp3_ = offset;
		_tmp4_ = len;
		_tmp5_ = string_strnlen ((gchar*) self, _tmp3_ + _tmp4_);
		string_length = _tmp5_;
	} else {
		gint _tmp6_;
		gint _tmp7_;
		_tmp6_ = strlen (self);
		_tmp7_ = _tmp6_;
		string_length = (glong) _tmp7_;
	}
	_tmp8_ = offset;
	if (_tmp8_ < ((glong) 0)) {
		glong _tmp9_;
		glong _tmp10_;
		glong _tmp11_;
		_tmp9_ = string_length;
		_tmp10_ = offset;
		offset = _tmp9_ + _tmp10_;
		_tmp11_ = offset;
		g_return_val_if_fail (_tmp11_ >= ((glong) 0), NULL);
	} else {
		glong _tmp12_;
		glong _tmp13_;
		_tmp12_ = offset;
		_tmp13_ = string_length;
		g_return_val_if_fail (_tmp12_ <= _tmp13_, NULL);
	}
	_tmp14_ = len;
	if (_tmp14_ < ((glong) 0)) {
		glong _tmp15_;
		glong _tmp16_;
		_tmp15_ = string_length;
		_tmp16_ = offset;
		len = _tmp15_ - _tmp16_;
	}
	_tmp17_ = offset;
	_tmp18_ = len;
	_tmp19_ = string_length;
	g_return_val_if_fail ((_tmp17_ + _tmp18_) <= _tmp19_, NULL);
	_tmp20_ = offset;
	_tmp21_ = len;
	_tmp22_ = g_strndup (((gchar*) self) + _tmp20_, (gsize) _tmp21_);
	result = _tmp22_;
	return result;
}


static void _vala_array_add2 (gchar** * array, int* length, int* size, gchar* value) {
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gchar*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}


static void _vala_array_add3 (gchar** * array, int* length, int* size, gchar* value) {
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gchar*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}


static void _vala_array_add4 (gchar** * array, int* length, int* size, gchar* value) {
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gchar*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}


static gchar* string_replace (const gchar* self, const gchar* old, const gchar* replacement) {
	gchar* result = NULL;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (old != NULL, NULL);
	g_return_val_if_fail (replacement != NULL, NULL);
	if ((*((gchar*) self)) == '\0') {
		_tmp1_ = TRUE;
	} else {
		const gchar* _tmp2_;
		_tmp2_ = old;
		_tmp1_ = (*((gchar*) _tmp2_)) == '\0';
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		const gchar* _tmp3_;
		const gchar* _tmp4_;
		_tmp3_ = old;
		_tmp4_ = replacement;
		_tmp0_ = g_strcmp0 (_tmp3_, _tmp4_) == 0;
	}
	if (_tmp0_) {
		gchar* _tmp5_;
		_tmp5_ = g_strdup (self);
		result = _tmp5_;
		return result;
	}
	{
		GRegex* regex = NULL;
		const gchar* _tmp6_;
		gchar* _tmp7_;
		gchar* _tmp8_;
		GRegex* _tmp9_;
		GRegex* _tmp10_;
		gchar* _tmp11_ = NULL;
		GRegex* _tmp12_;
		const gchar* _tmp13_;
		gchar* _tmp14_;
		gchar* _tmp15_;
		_tmp6_ = old;
		_tmp7_ = g_regex_escape_string (_tmp6_, -1);
		_tmp8_ = _tmp7_;
		_tmp9_ = g_regex_new (_tmp8_, 0, 0, &_inner_error_);
		_tmp10_ = _tmp9_;
		_g_free0 (_tmp8_);
		regex = _tmp10_;
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			if (_inner_error_->domain == G_REGEX_ERROR) {
				goto __catch3_g_regex_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return NULL;
		}
		_tmp12_ = regex;
		_tmp13_ = replacement;
		_tmp14_ = g_regex_replace_literal (_tmp12_, self, (gssize) -1, 0, _tmp13_, 0, &_inner_error_);
		_tmp11_ = _tmp14_;
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			_g_regex_unref0 (regex);
			if (_inner_error_->domain == G_REGEX_ERROR) {
				goto __catch3_g_regex_error;
			}
			_g_regex_unref0 (regex);
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return NULL;
		}
		_tmp15_ = _tmp11_;
		_tmp11_ = NULL;
		result = _tmp15_;
		_g_free0 (_tmp11_);
		_g_regex_unref0 (regex);
		return result;
	}
	goto __finally3;
	__catch3_g_regex_error:
	{
		GError* e = NULL;
		e = _inner_error_;
		_inner_error_ = NULL;
		g_assert_not_reached ();
		_g_error_free0 (e);
	}
	__finally3:
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return NULL;
	}
}


static gchar** _vala_array_dup1 (gchar** self, int length) {
	gchar** result;
	int i;
	result = g_new0 (gchar*, length + 1);
	for (i = 0; i < length; i++) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (self[i]);
		result[i] = _tmp0_;
	}
	return result;
}


static void vala_plugin_add_project_files (ValaPlugin* self) {
	GObject* _tmp0_ = NULL;
	AnjutaShell* _tmp1_;
	AnjutaShell* _tmp2_;
	AnjutaShell* _tmp3_;
	GObject* _tmp4_;
	GObject* _tmp5_;
	IAnjutaProjectManager* pm = NULL;
	IAnjutaProjectManager* _tmp6_;
	IAnjutaProject* project = NULL;
	IAnjutaProjectManager* _tmp7_;
	IAnjutaProject* _tmp8_;
	IAnjutaProject* _tmp9_;
	GFile* current_file = NULL;
	IAnjutaEditor* _tmp10_;
	GFile* _tmp11_;
	IAnjutaProject* _tmp12_;
	ValaCodeContext* _tmp13_;
	AnjutaProjectNode* _tmp14_ = NULL;
	IAnjutaProject* _tmp15_;
	AnjutaProjectNode* _tmp16_;
	AnjutaProjectNode* current_src = NULL;
	GFile* _tmp17_;
	AnjutaProjectNode* _tmp18_;
	AnjutaProjectNode* _tmp19_;
	AnjutaProjectNode* _tmp20_;
	AnjutaProjectNode* current_target = NULL;
	AnjutaProjectNode* _tmp21_;
	AnjutaProjectNode* _tmp22_;
	AnjutaProjectNode* _tmp23_;
	AnjutaProjectNode* _tmp24_;
	AnjutaProjectNode* _tmp25_;
	ValaCodeContext* _tmp26_;
	gboolean _tmp27_;
	gchar** flags = NULL;
	gchar** _tmp30_;
	gint flags_length1;
	gint _flags_size_;
	AnjutaProjectProperty* prop = NULL;
	AnjutaProjectNode* _tmp31_;
	AnjutaProjectProperty* _tmp32_;
	gboolean _tmp33_ = FALSE;
	AnjutaProjectProperty* _tmp34_;
	gchar** packages = NULL;
	gchar** _tmp58_;
	gint packages_length1;
	gint _packages_size_;
	gchar** vapidirs = NULL;
	gchar** _tmp59_;
	gint vapidirs_length1;
	gint _vapidirs_size_;
	gchar* srcdir = NULL;
	AnjutaProjectNode* _tmp107_;
	AnjutaProjectNode* _tmp108_;
	GFile* _tmp109_;
	gchar* _tmp110_;
	AnjutaProjectNode* _tmp111_ = NULL;
	IAnjutaProject* _tmp112_;
	AnjutaProjectNode* _tmp113_;
	gchar* top_srcdir = NULL;
	GFile* _tmp114_;
	gchar* _tmp115_;
	ValaCodeContext* _tmp131_;
	gchar** _tmp132_;
	gint _tmp132__length1;
	gchar** _tmp133_;
	gint _tmp133__length1;
	gchar** _tmp134_;
	gint _tmp134__length1;
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	g_object_get ((AnjutaPlugin*) self, "shell", &_tmp1_, NULL);
	_tmp2_ = _tmp1_;
	_tmp3_ = _tmp2_;
	_tmp4_ = anjuta_shell_get_object (_tmp3_, "IAnjutaProjectManager", &_inner_error_);
	_tmp5_ = _tmp4_;
	_g_object_unref0 (_tmp3_);
	_tmp0_ = _tmp5_;
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
	_tmp6_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, ianjuta_project_manager_get_type (), IAnjutaProjectManager));
	pm = _tmp6_;
	_tmp7_ = pm;
	_tmp8_ = ianjuta_project_manager_get_current_project (_tmp7_, &_inner_error_);
	_tmp9_ = _g_object_ref0 (_tmp8_);
	project = _tmp9_;
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		_g_object_unref0 (pm);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
	_tmp10_ = self->current_editor;
	_tmp11_ = ianjuta_file_get_file (G_TYPE_CHECK_INSTANCE_TYPE (_tmp10_, ianjuta_file_get_type ()) ? ((IAnjutaFile*) _tmp10_) : NULL, &_inner_error_);
	current_file = _tmp11_;
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		_g_object_unref0 (project);
		_g_object_unref0 (pm);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
	_tmp12_ = project;
	if (_tmp12_ == NULL) {
		_g_object_unref0 (current_file);
		_g_object_unref0 (project);
		_g_object_unref0 (pm);
		return;
	}
	_tmp13_ = self->priv->context;
	vala_code_context_push (_tmp13_);
	_tmp15_ = project;
	_tmp16_ = ianjuta_project_get_root (_tmp15_, &_inner_error_);
	_tmp14_ = _tmp16_;
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		_g_object_unref0 (current_file);
		_g_object_unref0 (project);
		_g_object_unref0 (pm);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
	_tmp17_ = current_file;
	_tmp18_ = anjuta_project_node_get_source_from_file (_tmp14_, _tmp17_);
	_tmp19_ = _g_object_ref0 (_tmp18_);
	current_src = _tmp19_;
	_tmp20_ = current_src;
	if (_tmp20_ == NULL) {
		_g_object_unref0 (current_src);
		_g_object_unref0 (current_file);
		_g_object_unref0 (project);
		_g_object_unref0 (pm);
		return;
	}
	_tmp21_ = current_src;
	_tmp22_ = anjuta_project_node_parent_type (_tmp21_, ANJUTA_PROJECT_TARGET);
	_tmp23_ = _g_object_ref0 (_tmp22_);
	current_target = _tmp23_;
	_tmp24_ = current_target;
	if (_tmp24_ == NULL) {
		_g_object_unref0 (current_target);
		_g_object_unref0 (current_src);
		_g_object_unref0 (current_file);
		_g_object_unref0 (project);
		_g_object_unref0 (pm);
		return;
	}
	_tmp25_ = current_target;
	anjuta_project_node_foreach (_tmp25_, G_PRE_ORDER, ___lambda5__anjuta_project_node_foreach_func, self);
	_tmp26_ = self->priv->context;
	_tmp27_ = vala_code_context_has_package (_tmp26_, "gobject-2.0");
	if (!_tmp27_) {
		ValaCodeContext* _tmp28_;
		ValaCodeContext* _tmp29_;
		_tmp28_ = self->priv->context;
		vala_code_context_add_external_package (_tmp28_, "glib-2.0");
		_tmp29_ = self->priv->context;
		vala_code_context_add_external_package (_tmp29_, "gobject-2.0");
		g_debug ("plugin.vala:174: standard packages added");
	} else {
		g_debug ("plugin.vala:176: standard packages already added");
	}
	_tmp30_ = g_new0 (gchar*, 0 + 1);
	flags = _tmp30_;
	flags_length1 = 0;
	_flags_size_ = flags_length1;
	_tmp31_ = current_target;
	_tmp32_ = anjuta_project_node_get_property (_tmp31_, "VALAFLAGS");
	prop = _tmp32_;
	_tmp34_ = prop;
	if (_tmp34_ != NULL) {
		AnjutaProjectProperty* _tmp35_;
		AnjutaProjectProperty* _tmp36_;
		AnjutaProjectPropertyInfo* _tmp37_;
		AnjutaProjectProperty* _tmp38_;
		_tmp35_ = prop;
		_tmp36_ = prop;
		_tmp37_ = _tmp36_->info;
		_tmp38_ = _tmp37_->default_value;
		_tmp33_ = _tmp35_ != _tmp38_;
	} else {
		_tmp33_ = FALSE;
	}
	if (_tmp33_) {
		AnjutaProjectProperty* _tmp39_;
		const gchar* _tmp40_;
		gchar** _tmp41_ = NULL;
		gint _tmp42_;
		_tmp39_ = prop;
		_tmp40_ = _tmp39_->value;
		g_shell_parse_argv (_tmp40_, &_tmp42_, &_tmp41_, &_inner_error_);
		flags = (_vala_array_free (flags, flags_length1, (GDestroyNotify) g_free), NULL);
		flags = _tmp41_;
		flags_length1 = _tmp42_;
		_flags_size_ = flags_length1;
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			flags = (_vala_array_free (flags, flags_length1, (GDestroyNotify) g_free), NULL);
			_g_object_unref0 (current_target);
			_g_object_unref0 (current_src);
			_g_object_unref0 (current_file);
			_g_object_unref0 (project);
			_g_object_unref0 (pm);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return;
		}
	} else {
		AnjutaProjectNode* current_group = NULL;
		AnjutaProjectNode* _tmp43_;
		AnjutaProjectNode* _tmp44_;
		AnjutaProjectNode* _tmp45_;
		AnjutaProjectNode* _tmp46_;
		AnjutaProjectProperty* _tmp47_;
		gboolean _tmp48_ = FALSE;
		AnjutaProjectProperty* _tmp49_;
		_tmp43_ = current_target;
		_tmp44_ = anjuta_project_node_parent_type (_tmp43_, ANJUTA_PROJECT_GROUP);
		_tmp45_ = _g_object_ref0 (_tmp44_);
		current_group = _tmp45_;
		_tmp46_ = current_group;
		_tmp47_ = anjuta_project_node_get_property (_tmp46_, "VALAFLAGS");
		prop = _tmp47_;
		_tmp49_ = prop;
		if (_tmp49_ != NULL) {
			AnjutaProjectProperty* _tmp50_;
			AnjutaProjectProperty* _tmp51_;
			AnjutaProjectPropertyInfo* _tmp52_;
			AnjutaProjectProperty* _tmp53_;
			_tmp50_ = prop;
			_tmp51_ = prop;
			_tmp52_ = _tmp51_->info;
			_tmp53_ = _tmp52_->default_value;
			_tmp48_ = _tmp50_ != _tmp53_;
		} else {
			_tmp48_ = FALSE;
		}
		if (_tmp48_) {
			AnjutaProjectProperty* _tmp54_;
			const gchar* _tmp55_;
			gchar** _tmp56_ = NULL;
			gint _tmp57_;
			_tmp54_ = prop;
			_tmp55_ = _tmp54_->value;
			g_shell_parse_argv (_tmp55_, &_tmp57_, &_tmp56_, &_inner_error_);
			flags = (_vala_array_free (flags, flags_length1, (GDestroyNotify) g_free), NULL);
			flags = _tmp56_;
			flags_length1 = _tmp57_;
			_flags_size_ = flags_length1;
			if (G_UNLIKELY (_inner_error_ != NULL)) {
				_g_object_unref0 (current_group);
				flags = (_vala_array_free (flags, flags_length1, (GDestroyNotify) g_free), NULL);
				_g_object_unref0 (current_target);
				_g_object_unref0 (current_src);
				_g_object_unref0 (current_file);
				_g_object_unref0 (project);
				_g_object_unref0 (pm);
				g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
				g_clear_error (&_inner_error_);
				return;
			}
		}
		_g_object_unref0 (current_group);
	}
	_tmp58_ = g_new0 (gchar*, 0 + 1);
	packages = _tmp58_;
	packages_length1 = 0;
	_packages_size_ = packages_length1;
	_tmp59_ = g_new0 (gchar*, 0 + 1);
	vapidirs = _tmp59_;
	vapidirs_length1 = 0;
	_vapidirs_size_ = vapidirs_length1;
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp60_ = FALSE;
			_tmp60_ = TRUE;
			while (TRUE) {
				gint _tmp62_;
				gchar** _tmp63_;
				gint _tmp63__length1;
				gchar** _tmp64_;
				gint _tmp64__length1;
				gint _tmp65_;
				const gchar* _tmp66_;
				if (!_tmp60_) {
					gint _tmp61_;
					_tmp61_ = i;
					i = _tmp61_ + 1;
				}
				_tmp60_ = FALSE;
				_tmp62_ = i;
				_tmp63_ = flags;
				_tmp63__length1 = flags_length1;
				if (!(_tmp62_ < _tmp63__length1)) {
					break;
				}
				_tmp64_ = flags;
				_tmp64__length1 = flags_length1;
				_tmp65_ = i;
				_tmp66_ = _tmp64_[_tmp65_];
				if (g_strcmp0 (_tmp66_, "--vapidir") == 0) {
					gchar** _tmp67_;
					gint _tmp67__length1;
					gchar** _tmp68_;
					gint _tmp68__length1;
					gint _tmp69_;
					gint _tmp70_;
					const gchar* _tmp71_;
					gchar* _tmp72_;
					_tmp67_ = vapidirs;
					_tmp67__length1 = vapidirs_length1;
					_tmp68_ = flags;
					_tmp68__length1 = flags_length1;
					_tmp69_ = i;
					i = _tmp69_ + 1;
					_tmp70_ = i;
					_tmp71_ = _tmp68_[_tmp70_];
					_tmp72_ = g_strdup (_tmp71_);
					_vala_array_add1 (&vapidirs, &vapidirs_length1, &_vapidirs_size_, _tmp72_);
				} else {
					gchar** _tmp73_;
					gint _tmp73__length1;
					gint _tmp74_;
					const gchar* _tmp75_;
					gboolean _tmp76_;
					_tmp73_ = flags;
					_tmp73__length1 = flags_length1;
					_tmp74_ = i;
					_tmp75_ = _tmp73_[_tmp74_];
					_tmp76_ = g_str_has_prefix (_tmp75_, "--vapidir=");
					if (_tmp76_) {
						gchar** _tmp77_;
						gint _tmp77__length1;
						gchar** _tmp78_;
						gint _tmp78__length1;
						gint _tmp79_;
						const gchar* _tmp80_;
						gint _tmp81_;
						gint _tmp82_;
						gchar* _tmp83_;
						_tmp77_ = vapidirs;
						_tmp77__length1 = vapidirs_length1;
						_tmp78_ = flags;
						_tmp78__length1 = flags_length1;
						_tmp79_ = i;
						_tmp80_ = _tmp78_[_tmp79_];
						_tmp81_ = strlen ("--vapidir=");
						_tmp82_ = _tmp81_;
						_tmp83_ = string_substring (_tmp80_, (glong) _tmp82_, (glong) -1);
						_vala_array_add2 (&vapidirs, &vapidirs_length1, &_vapidirs_size_, _tmp83_);
					} else {
						gchar** _tmp84_;
						gint _tmp84__length1;
						gint _tmp85_;
						const gchar* _tmp86_;
						_tmp84_ = flags;
						_tmp84__length1 = flags_length1;
						_tmp85_ = i;
						_tmp86_ = _tmp84_[_tmp85_];
						if (g_strcmp0 (_tmp86_, "--pkg") == 0) {
							gchar** _tmp87_;
							gint _tmp87__length1;
							gchar** _tmp88_;
							gint _tmp88__length1;
							gint _tmp89_;
							gint _tmp90_;
							const gchar* _tmp91_;
							gchar* _tmp92_;
							_tmp87_ = packages;
							_tmp87__length1 = packages_length1;
							_tmp88_ = flags;
							_tmp88__length1 = flags_length1;
							_tmp89_ = i;
							i = _tmp89_ + 1;
							_tmp90_ = i;
							_tmp91_ = _tmp88_[_tmp90_];
							_tmp92_ = g_strdup (_tmp91_);
							_vala_array_add3 (&packages, &packages_length1, &_packages_size_, _tmp92_);
						} else {
							gchar** _tmp93_;
							gint _tmp93__length1;
							gint _tmp94_;
							const gchar* _tmp95_;
							gboolean _tmp96_;
							_tmp93_ = flags;
							_tmp93__length1 = flags_length1;
							_tmp94_ = i;
							_tmp95_ = _tmp93_[_tmp94_];
							_tmp96_ = g_str_has_prefix (_tmp95_, "--pkg=");
							if (_tmp96_) {
								gchar** _tmp97_;
								gint _tmp97__length1;
								gchar** _tmp98_;
								gint _tmp98__length1;
								gint _tmp99_;
								const gchar* _tmp100_;
								gint _tmp101_;
								gint _tmp102_;
								gchar* _tmp103_;
								_tmp97_ = packages;
								_tmp97__length1 = packages_length1;
								_tmp98_ = flags;
								_tmp98__length1 = flags_length1;
								_tmp99_ = i;
								_tmp100_ = _tmp98_[_tmp99_];
								_tmp101_ = strlen ("--pkg=");
								_tmp102_ = _tmp101_;
								_tmp103_ = string_substring (_tmp100_, (glong) _tmp102_, (glong) -1);
								_vala_array_add4 (&packages, &packages_length1, &_packages_size_, _tmp103_);
							} else {
								gchar** _tmp104_;
								gint _tmp104__length1;
								gint _tmp105_;
								const gchar* _tmp106_;
								_tmp104_ = flags;
								_tmp104__length1 = flags_length1;
								_tmp105_ = i;
								_tmp106_ = _tmp104_[_tmp105_];
								g_debug ("plugin.vala:204: Unknown valac flag %s", _tmp106_);
							}
						}
					}
				}
			}
		}
	}
	_tmp107_ = current_target;
	_tmp108_ = anjuta_project_node_parent_type (_tmp107_, ANJUTA_PROJECT_GROUP);
	_tmp109_ = anjuta_project_node_get_file (_tmp108_);
	_tmp110_ = g_file_get_path (_tmp109_);
	srcdir = _tmp110_;
	_tmp112_ = project;
	_tmp113_ = ianjuta_project_get_root (_tmp112_, &_inner_error_);
	_tmp111_ = _tmp113_;
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		_g_free0 (srcdir);
		vapidirs = (_vala_array_free (vapidirs, vapidirs_length1, (GDestroyNotify) g_free), NULL);
		packages = (_vala_array_free (packages, packages_length1, (GDestroyNotify) g_free), NULL);
		flags = (_vala_array_free (flags, flags_length1, (GDestroyNotify) g_free), NULL);
		_g_object_unref0 (current_target);
		_g_object_unref0 (current_src);
		_g_object_unref0 (current_file);
		_g_object_unref0 (project);
		_g_object_unref0 (pm);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
	_tmp114_ = anjuta_project_node_get_file (_tmp111_);
	_tmp115_ = g_file_get_path (_tmp114_);
	top_srcdir = _tmp115_;
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp116_ = FALSE;
			_tmp116_ = TRUE;
			while (TRUE) {
				gint _tmp118_;
				gchar** _tmp119_;
				gint _tmp119__length1;
				gchar** _tmp120_;
				gint _tmp120__length1;
				gint _tmp121_;
				gchar** _tmp122_;
				gint _tmp122__length1;
				gint _tmp123_;
				const gchar* _tmp124_;
				const gchar* _tmp125_;
				gchar* _tmp126_;
				gchar* _tmp127_;
				const gchar* _tmp128_;
				gchar* _tmp129_;
				gchar* _tmp130_;
				if (!_tmp116_) {
					gint _tmp117_;
					_tmp117_ = i;
					i = _tmp117_ + 1;
				}
				_tmp116_ = FALSE;
				_tmp118_ = i;
				_tmp119_ = vapidirs;
				_tmp119__length1 = vapidirs_length1;
				if (!(_tmp118_ < _tmp119__length1)) {
					break;
				}
				_tmp120_ = vapidirs;
				_tmp120__length1 = vapidirs_length1;
				_tmp121_ = i;
				_tmp122_ = vapidirs;
				_tmp122__length1 = vapidirs_length1;
				_tmp123_ = i;
				_tmp124_ = _tmp122_[_tmp123_];
				_tmp125_ = srcdir;
				_tmp126_ = string_replace (_tmp124_, "$(srcdir)", _tmp125_);
				_tmp127_ = _tmp126_;
				_tmp128_ = top_srcdir;
				_tmp129_ = string_replace (_tmp127_, "$(top_srcdir)", _tmp128_);
				_g_free0 (_tmp120_[_tmp121_]);
				_tmp120_[_tmp121_] = _tmp129_;
				_tmp130_ = _tmp120_[_tmp121_];
				_g_free0 (_tmp127_);
			}
		}
	}
	_tmp131_ = self->priv->context;
	_tmp132_ = vapidirs;
	_tmp132__length1 = vapidirs_length1;
	_tmp133_ = (_tmp132_ != NULL) ? _vala_array_dup1 (_tmp132_, _tmp132__length1) : ((gpointer) _tmp132_);
	_tmp133__length1 = _tmp132__length1;
	_tmp131_->vapi_directories = (_vala_array_free (_tmp131_->vapi_directories, _tmp131_->vapi_directories_length1, (GDestroyNotify) g_free), NULL);
	_tmp131_->vapi_directories = _tmp133_;
	_tmp131_->vapi_directories_length1 = _tmp133__length1;
	_tmp134_ = packages;
	_tmp134__length1 = packages_length1;
	{
		gchar** pkg_collection = NULL;
		gint pkg_collection_length1 = 0;
		gint _pkg_collection_size_ = 0;
		gint pkg_it = 0;
		pkg_collection = _tmp134_;
		pkg_collection_length1 = _tmp134__length1;
		for (pkg_it = 0; pkg_it < _tmp134__length1; pkg_it = pkg_it + 1) {
			gchar* _tmp135_;
			gchar* pkg = NULL;
			_tmp135_ = g_strdup (pkg_collection[pkg_it]);
			pkg = _tmp135_;
			{
				ValaCodeContext* _tmp136_;
				const gchar* _tmp137_;
				gboolean _tmp138_;
				_tmp136_ = self->priv->context;
				_tmp137_ = pkg;
				_tmp138_ = vala_code_context_has_package (_tmp136_, _tmp137_);
				if (_tmp138_) {
					const gchar* _tmp139_;
					_tmp139_ = pkg;
					g_debug ("plugin.vala:217: package %s skipped", _tmp139_);
				} else {
					ValaCodeContext* _tmp140_;
					const gchar* _tmp141_;
					gboolean _tmp142_;
					_tmp140_ = self->priv->context;
					_tmp141_ = pkg;
					_tmp142_ = vala_code_context_add_external_package (_tmp140_, _tmp141_);
					if (_tmp142_) {
						const gchar* _tmp143_;
						_tmp143_ = pkg;
						g_debug ("plugin.vala:219: package %s added", _tmp143_);
					} else {
						const gchar* _tmp144_;
						_tmp144_ = pkg;
						g_debug ("plugin.vala:221: package %s not found", _tmp144_);
					}
				}
				_g_free0 (pkg);
			}
		}
	}
	vala_code_context_pop ();
	_g_free0 (top_srcdir);
	_g_free0 (srcdir);
	vapidirs = (_vala_array_free (vapidirs, vapidirs_length1, (GDestroyNotify) g_free), NULL);
	packages = (_vala_array_free (packages, packages_length1, (GDestroyNotify) g_free), NULL);
	flags = (_vala_array_free (flags, flags_length1, (GDestroyNotify) g_free), NULL);
	_g_object_unref0 (current_target);
	_g_object_unref0 (current_src);
	_g_object_unref0 (current_file);
	_g_object_unref0 (project);
	_g_object_unref0 (pm);
}


void vala_plugin_on_project_loaded (ValaPlugin* self, IAnjutaProjectManager* pm, GError* e) {
	ValaCodeContext* _tmp0_;
	IAnjutaProjectManager* _tmp1_;
	gulong _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (pm != NULL);
	_tmp0_ = self->priv->context;
	if (_tmp0_ == NULL) {
		return;
	}
	vala_plugin_add_project_files (self);
	vala_plugin_parse (self);
	_tmp1_ = pm;
	_tmp2_ = self->priv->project_loaded_id;
	g_signal_handler_disconnect ((GObject*) _tmp1_, _tmp2_);
	self->priv->project_loaded_id = (gulong) 0;
}


static void _vala_plugin_on_project_loaded_ianjuta_project_manager_project_loaded (IAnjutaProjectManager* _sender, GError* _error_, gpointer self) {
	vala_plugin_on_project_loaded ((ValaPlugin*) self, _sender, _error_);
}


static void _vala_plugin_on_char_added_ianjuta_editor_char_added (IAnjutaEditor* _sender, IAnjutaIterable* position, gchar ch, gpointer self) {
	vala_plugin_on_char_added ((ValaPlugin*) self, _sender, position, ch);
}


static void _vala_plugin_on_file_saved_ianjuta_file_savable_saved (IAnjutaFileSavable* _sender, GFile* file, gpointer self) {
	vala_plugin_on_file_saved ((ValaPlugin*) self, _sender, file);
}


static gboolean _vala_plugin_on_drop_possible_ianjuta_editor_glade_signal_drop_possible (IAnjutaEditorGladeSignal* _sender, IAnjutaIterable* iterator, gpointer self) {
	gboolean result;
	result = vala_plugin_on_drop_possible ((ValaPlugin*) self, _sender, iterator);
	return result;
}


static void _vala_plugin_on_drop_ianjuta_editor_glade_signal_drop (IAnjutaEditorGladeSignal* _sender, IAnjutaIterable* iterator, const gchar* signal_data, gpointer self) {
	vala_plugin_on_drop ((ValaPlugin*) self, _sender, iterator, signal_data);
}


static void _vala_plugin_insert_member_decl_and_init_ianjuta_editor_glade_member_add (IAnjutaEditor* _sender, const gchar* widget_typename, const gchar* widget_name, const gchar* filename, gpointer self) {
	vala_plugin_insert_member_decl_and_init ((ValaPlugin*) self, _sender, widget_typename, widget_name, filename);
}


void vala_plugin_editor_value_added (ValaPlugin* self, AnjutaPlugin* plugin, const gchar* name, GValue* value) {
	IAnjutaEditor* _tmp0_;
	GObject* _tmp1_;
	GObject* _tmp2_;
	IAnjutaFile* current_file = NULL;
	GObject* _tmp3_;
	IAnjutaFile* _tmp4_;
	GObject* _tmp5_ = NULL;
	AnjutaShell* _tmp6_;
	AnjutaShell* _tmp7_;
	AnjutaShell* _tmp8_;
	GObject* _tmp9_;
	GObject* _tmp10_;
	IAnjutaProjectManager* pm = NULL;
	IAnjutaProjectManager* _tmp11_;
	IAnjutaProject* project = NULL;
	IAnjutaProjectManager* _tmp12_;
	IAnjutaProject* _tmp13_;
	IAnjutaProject* _tmp14_;
	gboolean _tmp15_ = FALSE;
	IAnjutaProject* _tmp16_;
	gboolean _tmp17_;
	IAnjutaEditor* _tmp33_;
	AnjutaReport* _tmp49_;
	IAnjutaEditor* _tmp50_;
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (plugin != NULL);
	g_return_if_fail (name != NULL);
	g_return_if_fail (value != NULL);
	g_debug ("plugin.vala:238: editor value added");
	_tmp0_ = self->current_editor;
	_vala_assert (_tmp0_ == NULL, "current_editor == null");
	_tmp1_ = g_value_get_object (value);
	if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, ianjuta_editor_get_type ())) {
		return;
	}
	_tmp2_ = g_value_get_object (value);
	self->current_editor = G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, ianjuta_editor_get_type ()) ? ((IAnjutaEditor*) _tmp2_) : NULL;
	_tmp3_ = g_value_get_object (value);
	_tmp4_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, ianjuta_file_get_type ()) ? ((IAnjutaFile*) _tmp3_) : NULL);
	current_file = _tmp4_;
	g_object_get ((AnjutaPlugin*) self, "shell", &_tmp6_, NULL);
	_tmp7_ = _tmp6_;
	_tmp8_ = _tmp7_;
	_tmp9_ = anjuta_shell_get_object (_tmp8_, "IAnjutaProjectManager", &_inner_error_);
	_tmp10_ = _tmp9_;
	_g_object_unref0 (_tmp8_);
	_tmp5_ = _tmp10_;
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		_g_object_unref0 (current_file);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
	_tmp11_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, ianjuta_project_manager_get_type (), IAnjutaProjectManager));
	pm = _tmp11_;
	_tmp12_ = pm;
	_tmp13_ = ianjuta_project_manager_get_current_project (_tmp12_, &_inner_error_);
	_tmp14_ = _g_object_ref0 (_tmp13_);
	project = _tmp14_;
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		_g_object_unref0 (pm);
		_g_object_unref0 (current_file);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
	_tmp16_ = project;
	_tmp17_ = ianjuta_project_is_loaded (_tmp16_, &_inner_error_);
	_tmp15_ = _tmp17_;
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		_g_object_unref0 (project);
		_g_object_unref0 (pm);
		_g_object_unref0 (current_file);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
	if (!_tmp15_) {
		gulong _tmp18_;
		_tmp18_ = self->priv->project_loaded_id;
		if (_tmp18_ == ((gulong) 0)) {
			IAnjutaProjectManager* _tmp19_;
			gulong _tmp20_;
			_tmp19_ = pm;
			_tmp20_ = g_signal_connect_object (_tmp19_, "project-loaded", (GCallback) _vala_plugin_on_project_loaded_ianjuta_project_manager_project_loaded, self, 0);
			self->priv->project_loaded_id = _tmp20_;
		}
	} else {
		GFile* cur_gfile = NULL;
		IAnjutaFile* _tmp21_;
		GFile* _tmp22_;
		GFile* _tmp23_;
		ValaSet* _tmp24_;
		GFile* _tmp25_;
		gchar* _tmp26_;
		gchar* _tmp27_;
		gboolean _tmp28_;
		gboolean _tmp29_;
		_tmp21_ = current_file;
		_tmp22_ = ianjuta_file_get_file (_tmp21_, &_inner_error_);
		cur_gfile = _tmp22_;
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			_g_object_unref0 (project);
			_g_object_unref0 (pm);
			_g_object_unref0 (current_file);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return;
		}
		_tmp23_ = cur_gfile;
		if (_tmp23_ == NULL) {
			_g_object_unref0 (cur_gfile);
			_g_object_unref0 (project);
			_g_object_unref0 (pm);
			_g_object_unref0 (current_file);
			return;
		}
		_tmp24_ = self->priv->current_sources;
		_tmp25_ = cur_gfile;
		_tmp26_ = g_file_get_path (_tmp25_);
		_tmp27_ = _tmp26_;
		_tmp28_ = vala_collection_contains ((ValaCollection*) _tmp24_, _tmp27_);
		_tmp29_ = !_tmp28_;
		_g_free0 (_tmp27_);
		if (_tmp29_) {
			GCancellable* _tmp30_;
			_tmp30_ = self->priv->cancel;
			g_cancellable_cancel (_tmp30_);
			{
				ValaCodeContext* _tmp31_;
				_tmp31_ = self->priv->context;
				g_rec_mutex_lock (&self->priv->__lock_context);
				{
					vala_plugin_init_context (self);
					vala_plugin_add_project_files (self);
				}
				__finally4:
				{
					ValaCodeContext* _tmp32_;
					_tmp32_ = self->priv->context;
					g_rec_mutex_unlock (&self->priv->__lock_context);
				}
				if (G_UNLIKELY (_inner_error_ != NULL)) {
					_g_object_unref0 (cur_gfile);
					_g_object_unref0 (project);
					_g_object_unref0 (pm);
					_g_object_unref0 (current_file);
					g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
					g_clear_error (&_inner_error_);
					return;
				}
			}
			vala_plugin_parse (self);
		}
		_g_object_unref0 (cur_gfile);
	}
	_tmp33_ = self->current_editor;
	if (_tmp33_ != NULL) {
		IAnjutaEditor* _tmp34_;
		IAnjutaEditor* _tmp37_;
		IAnjutaEditor* _tmp39_;
		IAnjutaEditor* _tmp43_;
		IAnjutaEditor* _tmp48_;
		_tmp34_ = self->current_editor;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp34_, ianjuta_editor_assist_get_type ())) {
			IAnjutaEditor* _tmp35_;
			ValaProvider* _tmp36_;
			_tmp35_ = self->current_editor;
			_tmp36_ = self->priv->provider;
			ianjuta_editor_assist_add (G_TYPE_CHECK_INSTANCE_TYPE (_tmp35_, ianjuta_editor_assist_get_type ()) ? ((IAnjutaEditorAssist*) _tmp35_) : NULL, (IAnjutaProvider*) _tmp36_, &_inner_error_);
			if (G_UNLIKELY (_inner_error_ != NULL)) {
				_g_object_unref0 (project);
				_g_object_unref0 (pm);
				_g_object_unref0 (current_file);
				g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
				g_clear_error (&_inner_error_);
				return;
			}
		}
		_tmp37_ = self->current_editor;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp37_, ianjuta_editor_tip_get_type ())) {
			IAnjutaEditor* _tmp38_;
			_tmp38_ = self->current_editor;
			g_signal_connect_object (_tmp38_, "char-added", (GCallback) _vala_plugin_on_char_added_ianjuta_editor_char_added, self, 0);
		}
		_tmp39_ = self->current_editor;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp39_, ianjuta_file_savable_get_type ())) {
			IAnjutaFileSavable* file_savable = NULL;
			IAnjutaEditor* _tmp40_;
			IAnjutaFileSavable* _tmp41_;
			IAnjutaFileSavable* _tmp42_;
			_tmp40_ = self->current_editor;
			_tmp41_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp40_, ianjuta_file_savable_get_type (), IAnjutaFileSavable));
			file_savable = _tmp41_;
			_tmp42_ = file_savable;
			g_signal_connect_object (_tmp42_, "saved", (GCallback) _vala_plugin_on_file_saved_ianjuta_file_savable_saved, self, 0);
			_g_object_unref0 (file_savable);
		}
		_tmp43_ = self->current_editor;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp43_, ianjuta_editor_glade_signal_get_type ())) {
			IAnjutaEditorGladeSignal* gladesig = NULL;
			IAnjutaEditor* _tmp44_;
			IAnjutaEditorGladeSignal* _tmp45_;
			IAnjutaEditorGladeSignal* _tmp46_;
			IAnjutaEditorGladeSignal* _tmp47_;
			_tmp44_ = self->current_editor;
			_tmp45_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp44_, ianjuta_editor_glade_signal_get_type ()) ? ((IAnjutaEditorGladeSignal*) _tmp44_) : NULL);
			gladesig = _tmp45_;
			_tmp46_ = gladesig;
			g_signal_connect_object (_tmp46_, "drop-possible", (GCallback) _vala_plugin_on_drop_possible_ianjuta_editor_glade_signal_drop_possible, self, 0);
			_tmp47_ = gladesig;
			g_signal_connect_object (_tmp47_, "drop", (GCallback) _vala_plugin_on_drop_ianjuta_editor_glade_signal_drop, self, 0);
			_g_object_unref0 (gladesig);
		}
		_tmp48_ = self->current_editor;
		g_signal_connect_object (_tmp48_, "glade-member-add", (GCallback) _vala_plugin_insert_member_decl_and_init_ianjuta_editor_glade_member_add, self, 0);
	}
	_tmp49_ = self->priv->report;
	_tmp50_ = self->current_editor;
	anjuta_report_update_errors (_tmp49_, _tmp50_);
	_g_object_unref0 (project);
	_g_object_unref0 (pm);
	_g_object_unref0 (current_file);
}


void vala_plugin_editor_value_removed (ValaPlugin* self, AnjutaPlugin* plugin, const gchar* name) {
	IAnjutaEditor* _tmp0_;
	IAnjutaEditor* _tmp3_;
	IAnjutaEditor* _tmp6_;
	IAnjutaEditor* _tmp11_;
	IAnjutaEditor* _tmp18_;
	guint _tmp19_;
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (plugin != NULL);
	g_return_if_fail (name != NULL);
	g_debug ("plugin.vala:290: editor value removed");
	_tmp0_ = self->current_editor;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, ianjuta_editor_assist_get_type ())) {
		IAnjutaEditor* _tmp1_;
		ValaProvider* _tmp2_;
		_tmp1_ = self->current_editor;
		_tmp2_ = self->priv->provider;
		ianjuta_editor_assist_remove (G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, ianjuta_editor_assist_get_type ()) ? ((IAnjutaEditorAssist*) _tmp1_) : NULL, (IAnjutaProvider*) _tmp2_, &_inner_error_);
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return;
		}
	}
	_tmp3_ = self->current_editor;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, ianjuta_editor_tip_get_type ())) {
		IAnjutaEditor* _tmp4_;
		guint _tmp5_;
		_tmp4_ = self->current_editor;
		g_signal_parse_name ("char-added", ianjuta_editor_get_type (), &_tmp5_, NULL, FALSE);
		g_signal_handlers_disconnect_matched (_tmp4_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp5_, 0, NULL, (GCallback) _vala_plugin_on_char_added_ianjuta_editor_char_added, self);
	}
	_tmp6_ = self->current_editor;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp6_, ianjuta_file_savable_get_type ())) {
		IAnjutaFileSavable* file_savable = NULL;
		IAnjutaEditor* _tmp7_;
		IAnjutaFileSavable* _tmp8_;
		IAnjutaFileSavable* _tmp9_;
		guint _tmp10_;
		_tmp7_ = self->current_editor;
		_tmp8_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, ianjuta_file_savable_get_type (), IAnjutaFileSavable));
		file_savable = _tmp8_;
		_tmp9_ = file_savable;
		g_signal_parse_name ("saved", ianjuta_file_savable_get_type (), &_tmp10_, NULL, FALSE);
		g_signal_handlers_disconnect_matched (_tmp9_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp10_, 0, NULL, (GCallback) _vala_plugin_on_file_saved_ianjuta_file_savable_saved, self);
		_g_object_unref0 (file_savable);
	}
	_tmp11_ = self->current_editor;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp11_, ianjuta_editor_glade_signal_get_type ())) {
		IAnjutaEditorGladeSignal* gladesig = NULL;
		IAnjutaEditor* _tmp12_;
		IAnjutaEditorGladeSignal* _tmp13_;
		IAnjutaEditorGladeSignal* _tmp14_;
		guint _tmp15_;
		IAnjutaEditorGladeSignal* _tmp16_;
		guint _tmp17_;
		_tmp12_ = self->current_editor;
		_tmp13_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp12_, ianjuta_editor_glade_signal_get_type ()) ? ((IAnjutaEditorGladeSignal*) _tmp12_) : NULL);
		gladesig = _tmp13_;
		_tmp14_ = gladesig;
		g_signal_parse_name ("drop-possible", ianjuta_editor_glade_signal_get_type (), &_tmp15_, NULL, FALSE);
		g_signal_handlers_disconnect_matched (_tmp14_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp15_, 0, NULL, (GCallback) _vala_plugin_on_drop_possible_ianjuta_editor_glade_signal_drop_possible, self);
		_tmp16_ = gladesig;
		g_signal_parse_name ("drop", ianjuta_editor_glade_signal_get_type (), &_tmp17_, NULL, FALSE);
		g_signal_handlers_disconnect_matched (_tmp16_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp17_, 0, NULL, (GCallback) _vala_plugin_on_drop_ianjuta_editor_glade_signal_drop, self);
		_g_object_unref0 (gladesig);
	}
	_tmp18_ = self->current_editor;
	g_signal_parse_name ("glade-member-add", ianjuta_editor_get_type (), &_tmp19_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (_tmp18_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp19_, 0, NULL, (GCallback) _vala_plugin_insert_member_decl_and_init_ianjuta_editor_glade_member_add, self);
	self->current_editor = NULL;
}


void vala_plugin_on_file_saved (ValaPlugin* self, IAnjutaFileSavable* savable, GFile* file) {
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (savable != NULL);
	g_return_if_fail (file != NULL);
	{
		ValaList* _source_file_list = NULL;
		ValaCodeContext* _tmp0_;
		ValaList* _tmp1_;
		gint _source_file_size = 0;
		ValaList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _source_file_index = 0;
		_tmp0_ = self->priv->context;
		_tmp1_ = vala_code_context_get_source_files (_tmp0_);
		_source_file_list = _tmp1_;
		_tmp2_ = _source_file_list;
		_tmp3_ = vala_collection_get_size ((ValaCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_source_file_size = _tmp4_;
		_source_file_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			gint _tmp7_;
			ValaSourceFile* source_file = NULL;
			ValaList* _tmp8_;
			gint _tmp9_;
			gpointer _tmp10_;
			ValaSourceFile* _tmp11_;
			const gchar* _tmp12_;
			const gchar* _tmp13_;
			GFile* _tmp14_;
			gchar* _tmp15_;
			gchar* _tmp16_;
			gboolean _tmp17_;
			guint8* contents = NULL;
			gint contents_length1 = 0;
			gint _contents_size_ = 0;
			_tmp5_ = _source_file_index;
			_source_file_index = _tmp5_ + 1;
			_tmp6_ = _source_file_index;
			_tmp7_ = _source_file_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _source_file_list;
			_tmp9_ = _source_file_index;
			_tmp10_ = vala_list_get (_tmp8_, _tmp9_);
			source_file = (ValaSourceFile*) _tmp10_;
			_tmp11_ = source_file;
			_tmp12_ = vala_source_file_get_filename (_tmp11_);
			_tmp13_ = _tmp12_;
			_tmp14_ = file;
			_tmp15_ = g_file_get_path (_tmp14_);
			_tmp16_ = _tmp15_;
			_tmp17_ = g_strcmp0 (_tmp13_, _tmp16_) != 0;
			_g_free0 (_tmp16_);
			if (_tmp17_) {
				_vala_source_file_unref0 (source_file);
				continue;
			}
			{
				GFile* _tmp18_;
				guint8* _tmp19_ = NULL;
				gsize _tmp20_;
				ValaSourceFile* _tmp21_;
				ValaSourceFile* _tmp22_;
				_tmp18_ = file;
				g_file_load_contents (_tmp18_, NULL, &_tmp19_, &_tmp20_, NULL, &_inner_error_);
				contents = (g_free (contents), NULL);
				contents = _tmp19_;
				contents_length1 = _tmp20_;
				_contents_size_ = contents_length1;
				if (G_UNLIKELY (_inner_error_ != NULL)) {
					goto __catch5_g_error;
				}
				_tmp21_ = source_file;
				vala_source_file_set_content (_tmp21_, (const gchar*) contents);
				_tmp22_ = source_file;
				vala_plugin_update_file (self, _tmp22_);
			}
			goto __finally5;
			__catch5_g_error:
			{
				GError* e = NULL;
				e = _inner_error_;
				_inner_error_ = NULL;
				_g_error_free0 (e);
			}
			__finally5:
			if (G_UNLIKELY (_inner_error_ != NULL)) {
				contents = (g_free (contents), NULL);
				_vala_source_file_unref0 (source_file);
				_vala_iterable_unref0 (_source_file_list);
				g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
				g_clear_error (&_inner_error_);
				return;
			}
			contents = (g_free (contents), NULL);
			_vala_source_file_unref0 (source_file);
			_vala_iterable_unref0 (_source_file_list);
			return;
		}
		_vala_iterable_unref0 (_source_file_list);
	}
}


void vala_plugin_on_char_added (ValaPlugin* self, IAnjutaEditor* editor, IAnjutaIterable* position, gchar ch) {
	GSettings* _tmp0_;
	gboolean _tmp1_;
	IAnjutaEditorTip* editortip = NULL;
	IAnjutaEditor* _tmp2_;
	IAnjutaEditorTip* _tmp3_;
	gchar _tmp4_;
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (editor != NULL);
	g_return_if_fail (position != NULL);
	_tmp0_ = self->settings;
	_tmp1_ = g_settings_get_boolean (_tmp0_, VALA_PROVIDER_PREF_CALLTIP_ENABLE);
	if (!_tmp1_) {
		return;
	}
	_tmp2_ = editor;
	_tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, ianjuta_editor_tip_get_type ()) ? ((IAnjutaEditorTip*) _tmp2_) : NULL);
	editortip = _tmp3_;
	_tmp4_ = ch;
	if (_tmp4_ == '(') {
		ValaProvider* _tmp5_;
		IAnjutaEditorTip* _tmp6_;
		_tmp5_ = self->priv->provider;
		_tmp6_ = editortip;
		vala_provider_show_call_tip (_tmp5_, _tmp6_);
	} else {
		gchar _tmp7_;
		_tmp7_ = ch;
		if (_tmp7_ == ')') {
			IAnjutaEditorTip* _tmp8_;
			_tmp8_ = editortip;
			ianjuta_editor_tip_cancel (_tmp8_, &_inner_error_);
			if (G_UNLIKELY (_inner_error_ != NULL)) {
				_g_object_unref0 (editortip);
				g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
				g_clear_error (&_inner_error_);
				return;
			}
		}
	}
	_g_object_unref0 (editortip);
}


static gunichar string_get_char (const gchar* self, glong index) {
	gunichar result = 0U;
	glong _tmp0_;
	gunichar _tmp1_;
	g_return_val_if_fail (self != NULL, 0U);
	_tmp0_ = index;
	_tmp1_ = g_utf8_get_char (((gchar*) self) + _tmp0_);
	result = _tmp1_;
	return result;
}


static ValaSymbol* vala_plugin_get_scope (ValaPlugin* self, IAnjutaEditor* editor, IAnjutaIterable* position) {
	ValaSymbol* result = NULL;
	gint depth = 0;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (editor != NULL, NULL);
	g_return_val_if_fail (position != NULL, NULL);
	depth = 0;
	{
		gboolean _tmp0_ = FALSE;
		_tmp0_ = TRUE;
		while (TRUE) {
			gchar* current_char = NULL;
			IAnjutaIterable* _tmp4_;
			gchar* _tmp5_;
			const gchar* _tmp6_;
			if (!_tmp0_) {
				gboolean _tmp1_ = FALSE;
				IAnjutaIterable* _tmp2_;
				gboolean _tmp3_;
				_tmp2_ = position;
				_tmp3_ = ianjuta_iterable_previous (_tmp2_, &_inner_error_);
				_tmp1_ = _tmp3_;
				if (G_UNLIKELY (_inner_error_ != NULL)) {
					g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
					g_clear_error (&_inner_error_);
					return NULL;
				}
				if (!_tmp1_) {
					break;
				}
			}
			_tmp0_ = FALSE;
			_tmp4_ = position;
			_tmp5_ = ianjuta_editor_cell_get_character (G_TYPE_CHECK_INSTANCE_TYPE (_tmp4_, ianjuta_editor_cell_get_type ()) ? ((IAnjutaEditorCell*) _tmp4_) : NULL, &_inner_error_);
			current_char = _tmp5_;
			if (G_UNLIKELY (_inner_error_ != NULL)) {
				g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
				g_clear_error (&_inner_error_);
				return NULL;
			}
			_tmp6_ = current_char;
			if (g_strcmp0 (_tmp6_, "}") == 0) {
				gint _tmp7_;
				_tmp7_ = depth;
				depth = _tmp7_ + 1;
			} else {
				const gchar* _tmp8_;
				_tmp8_ = current_char;
				if (g_strcmp0 (_tmp8_, "{") == 0) {
					gint _tmp9_;
					_tmp9_ = depth;
					if (_tmp9_ > 0) {
						gint _tmp10_;
						_tmp10_ = depth;
						depth = _tmp10_ - 1;
					} else {
						IAnjutaEditor* _tmp20_;
						IAnjutaIterable* _tmp21_;
						ValaSymbol* _tmp22_;
						{
							gboolean _tmp11_ = FALSE;
							_tmp11_ = TRUE;
							while (TRUE) {
								IAnjutaIterable* _tmp15_;
								gchar* _tmp16_ = NULL;
								IAnjutaIterable* _tmp17_;
								gchar* _tmp18_;
								gchar* _tmp19_;
								if (!_tmp11_) {
									const gchar* _tmp12_;
									gunichar _tmp13_;
									gboolean _tmp14_;
									_tmp12_ = current_char;
									_tmp13_ = string_get_char (_tmp12_, (glong) 0);
									_tmp14_ = g_unichar_isalnum (_tmp13_);
									if (!(!_tmp14_)) {
										break;
									}
								}
								_tmp11_ = FALSE;
								_tmp15_ = position;
								ianjuta_iterable_previous (_tmp15_, &_inner_error_);
								if (G_UNLIKELY (_inner_error_ != NULL)) {
									_g_free0 (current_char);
									g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
									g_clear_error (&_inner_error_);
									return NULL;
								}
								_tmp17_ = position;
								_tmp18_ = ianjuta_editor_cell_get_character (G_TYPE_CHECK_INSTANCE_TYPE (_tmp17_, ianjuta_editor_cell_get_type ()) ? ((IAnjutaEditorCell*) _tmp17_) : NULL, &_inner_error_);
								_tmp16_ = _tmp18_;
								if (G_UNLIKELY (_inner_error_ != NULL)) {
									_g_free0 (current_char);
									g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
									g_clear_error (&_inner_error_);
									return NULL;
								}
								_tmp19_ = _tmp16_;
								_tmp16_ = NULL;
								_g_free0 (current_char);
								current_char = _tmp19_;
								_g_free0 (_tmp16_);
							}
						}
						_tmp20_ = editor;
						_tmp21_ = position;
						_tmp22_ = vala_plugin_get_current_context (self, _tmp20_, _tmp21_);
						result = _tmp22_;
						_g_free0 (current_char);
						return result;
					}
				}
			}
			_g_free0 (current_char);
		}
	}
	result = NULL;
	return result;
}


gboolean vala_plugin_on_drop_possible (ValaPlugin* self, IAnjutaEditorGladeSignal* editor, IAnjutaIterable* position) {
	gboolean result = FALSE;
	gint line = 0;
	IAnjutaEditorGladeSignal* _tmp0_;
	IAnjutaIterable* _tmp1_;
	gint _tmp2_;
	IAnjutaIterable* _tmp4_ = NULL;
	IAnjutaEditorGladeSignal* _tmp5_;
	gint _tmp6_;
	IAnjutaIterable* _tmp7_;
	gint column = 0;
	IAnjutaIterable* _tmp9_;
	gint _tmp10_;
	gint _tmp12_;
	gint _tmp13_;
	IAnjutaIterable* _tmp14_ = NULL;
	IAnjutaIterable* _tmp15_;
	IAnjutaIterable* _tmp16_;
	ValaSymbol* scope = NULL;
	IAnjutaEditorGladeSignal* _tmp18_;
	ValaSymbol* _tmp19_;
	ValaSymbol* _tmp20_;
	gboolean _tmp24_ = FALSE;
	gboolean _tmp25_ = FALSE;
	ValaSymbol* _tmp26_;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (editor != NULL, FALSE);
	g_return_val_if_fail (position != NULL, FALSE);
	_tmp0_ = editor;
	_tmp1_ = position;
	_tmp2_ = ianjuta_editor_get_line_from_position ((IAnjutaEditor*) _tmp0_, _tmp1_, &_inner_error_);
	line = _tmp2_;
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		gboolean _tmp3_ = FALSE;
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return _tmp3_;
	}
	_tmp5_ = editor;
	_tmp6_ = line;
	_tmp7_ = ianjuta_editor_get_line_begin_position ((IAnjutaEditor*) _tmp5_, _tmp6_, &_inner_error_);
	_tmp4_ = _tmp7_;
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		gboolean _tmp8_ = FALSE;
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return _tmp8_;
	}
	_tmp9_ = position;
	_tmp10_ = ianjuta_iterable_diff (_tmp4_, _tmp9_, &_inner_error_);
	column = _tmp10_;
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		gboolean _tmp11_ = FALSE;
		_g_object_unref0 (_tmp4_);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return _tmp11_;
	}
	_tmp12_ = line;
	_tmp13_ = column;
	g_debug ("plugin.vala:365: line %d, column %d", _tmp12_, _tmp13_);
	_tmp15_ = position;
	_tmp16_ = ianjuta_iterable_clone (_tmp15_, &_inner_error_);
	_tmp14_ = _tmp16_;
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		gboolean _tmp17_ = FALSE;
		_g_object_unref0 (_tmp4_);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return _tmp17_;
	}
	_tmp18_ = editor;
	_tmp19_ = vala_plugin_get_scope (self, (IAnjutaEditor*) _tmp18_, _tmp14_);
	scope = _tmp19_;
	_tmp20_ = scope;
	if (_tmp20_ != NULL) {
		ValaSymbol* _tmp21_;
		gchar* _tmp22_;
		gchar* _tmp23_;
		_tmp21_ = scope;
		_tmp22_ = vala_symbol_get_full_name (_tmp21_);
		_tmp23_ = _tmp22_;
		g_debug ("plugin.vala:369: drag is inside %s", _tmp23_);
		_g_free0 (_tmp23_);
	}
	_tmp26_ = scope;
	if (_tmp26_ == NULL) {
		_tmp25_ = TRUE;
	} else {
		ValaSymbol* _tmp27_;
		_tmp27_ = scope;
		_tmp25_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp27_, VALA_TYPE_NAMESPACE);
	}
	if (_tmp25_) {
		_tmp24_ = TRUE;
	} else {
		ValaSymbol* _tmp28_;
		_tmp28_ = scope;
		_tmp24_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp28_, VALA_TYPE_CLASS);
	}
	if (_tmp24_) {
		result = TRUE;
		_vala_code_node_unref0 (scope);
		_g_object_unref0 (_tmp14_);
		_g_object_unref0 (_tmp4_);
		return result;
	}
	result = FALSE;
	_vala_code_node_unref0 (scope);
	_g_object_unref0 (_tmp14_);
	_g_object_unref0 (_tmp4_);
	return result;
}


static void _vala_code_node_unref0_ (gpointer var) {
	(var == NULL) ? NULL : (var = (vala_code_node_unref (var), NULL));
}


static inline void _g_list_free__vala_code_node_unref0_ (GList* self) {
	g_list_free_full (self, (GDestroyNotify) _vala_code_node_unref0_);
}


static gpointer _vala_code_node_ref0 (gpointer self) {
	return self ? vala_code_node_ref (self) : NULL;
}


void vala_plugin_on_drop (ValaPlugin* self, IAnjutaEditorGladeSignal* editor, IAnjutaIterable* position, const gchar* signal_data) {
	gchar** data = NULL;
	const gchar* _tmp0_;
	gchar** _tmp1_;
	gchar** _tmp2_;
	gint data_length1;
	gint _data_size_;
	gchar* widget_name = NULL;
	gchar** _tmp3_;
	gint _tmp3__length1;
	const gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* signal_name = NULL;
	gchar** _tmp6_;
	gint _tmp6__length1;
	const gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* handler_name = NULL;
	gchar** _tmp9_;
	gint _tmp9__length1;
	const gchar* _tmp10_;
	gchar* _tmp11_;
	gboolean swapped = FALSE;
	gchar** _tmp12_;
	gint _tmp12__length1;
	const gchar* _tmp13_;
	IAnjutaIterable* _tmp14_ = NULL;
	IAnjutaIterable* _tmp15_;
	IAnjutaIterable* _tmp16_;
	ValaSymbol* scope = NULL;
	IAnjutaEditorGladeSignal* _tmp17_;
	ValaSymbol* _tmp18_;
	GString* builder = NULL;
	GString* _tmp19_;
	gchar* handler_cname = NULL;
	gchar* _tmp20_;
	gboolean _tmp21_ = FALSE;
	gchar** _tmp22_;
	gint _tmp22__length1;
	const gchar* _tmp23_;
	const gchar* _tmp24_;
	ValaSymbol* widget = NULL;
	const gchar* _tmp37_;
	ValaCodeContext* _tmp38_;
	ValaNamespace* _tmp39_;
	ValaNamespace* _tmp40_;
	ValaSymbol* _tmp41_;
	GList* sigs = NULL;
	ValaSymbol* _tmp42_;
	const gchar* _tmp43_;
	GList* _tmp44_;
	gboolean _tmp45_ = FALSE;
	GList* _tmp46_;
	ValaSignal* sig = NULL;
	GList* _tmp49_;
	gconstpointer _tmp50_;
	ValaSignal* _tmp51_;
	GString* _tmp52_;
	const gchar* _tmp53_;
	gboolean _tmp54_;
	GString* _tmp107_;
	IAnjutaEditorGladeSignal* _tmp108_;
	IAnjutaIterable* _tmp109_;
	GString* _tmp110_;
	const gchar* _tmp111_;
	GObject* _tmp112_ = NULL;
	AnjutaShell* _tmp113_;
	AnjutaShell* _tmp114_;
	AnjutaShell* _tmp115_;
	GObject* _tmp116_;
	GObject* _tmp117_;
	IAnjutaIndenter* indenter = NULL;
	IAnjutaIndenter* _tmp118_;
	IAnjutaIndenter* _tmp119_;
	gint _tmp132_ = 0;
	IAnjutaEditorGladeSignal* _tmp133_;
	IAnjutaIterable* _tmp134_;
	gint _tmp135_;
	IAnjutaIterable* inside = NULL;
	IAnjutaEditorGladeSignal* _tmp136_;
	IAnjutaIterable* _tmp137_;
	IAnjutaEditorGladeSignal* _tmp138_;
	IAnjutaIterable* _tmp139_;
	IAnjutaIndenter* _tmp140_;
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (editor != NULL);
	g_return_if_fail (position != NULL);
	g_return_if_fail (signal_data != NULL);
	_tmp0_ = signal_data;
	_tmp2_ = _tmp1_ = g_strsplit (_tmp0_, ":", 0);
	data = _tmp2_;
	data_length1 = _vala_array_length (_tmp1_);
	_data_size_ = data_length1;
	_tmp3_ = data;
	_tmp3__length1 = data_length1;
	_tmp4_ = _tmp3_[0];
	_tmp5_ = g_strdup (_tmp4_);
	widget_name = _tmp5_;
	_tmp6_ = data;
	_tmp6__length1 = data_length1;
	_tmp7_ = _tmp6_[1];
	_tmp8_ = string_replace (_tmp7_, "-", "_");
	signal_name = _tmp8_;
	_tmp9_ = data;
	_tmp9__length1 = data_length1;
	_tmp10_ = _tmp9_[2];
	_tmp11_ = g_strdup (_tmp10_);
	handler_name = _tmp11_;
	_tmp12_ = data;
	_tmp12__length1 = data_length1;
	_tmp13_ = _tmp12_[4];
	swapped = g_strcmp0 (_tmp13_, "1") == 0;
	_tmp15_ = position;
	_tmp16_ = ianjuta_iterable_clone (_tmp15_, &_inner_error_);
	_tmp14_ = _tmp16_;
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		_g_free0 (handler_name);
		_g_free0 (signal_name);
		_g_free0 (widget_name);
		data = (_vala_array_free (data, data_length1, (GDestroyNotify) g_free), NULL);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
	_tmp17_ = editor;
	_tmp18_ = vala_plugin_get_scope (self, (IAnjutaEditor*) _tmp17_, _tmp14_);
	scope = _tmp18_;
	_tmp19_ = g_string_new ("");
	builder = _tmp19_;
	_tmp20_ = g_strdup ("");
	handler_cname = _tmp20_;
	_tmp22_ = data;
	_tmp22__length1 = data_length1;
	_tmp23_ = _tmp22_[2];
	_tmp24_ = handler_cname;
	if (g_strcmp0 (_tmp23_, _tmp24_) != 0) {
		gboolean _tmp25_;
		_tmp25_ = swapped;
		_tmp21_ = !_tmp25_;
	} else {
		_tmp21_ = FALSE;
	}
	if (_tmp21_) {
		GString* _tmp26_;
		gchar** _tmp27_;
		gint _tmp27__length1;
		const gchar* _tmp28_;
		_tmp26_ = builder;
		_tmp27_ = data;
		_tmp27__length1 = data_length1;
		_tmp28_ = _tmp27_[2];
		g_string_append_printf (_tmp26_, "[CCode (cname=\"%s\", instance_pos=-1)]\n", _tmp28_);
	} else {
		gchar** _tmp29_;
		gint _tmp29__length1;
		const gchar* _tmp30_;
		const gchar* _tmp31_;
		_tmp29_ = data;
		_tmp29__length1 = data_length1;
		_tmp30_ = _tmp29_[2];
		_tmp31_ = handler_cname;
		if (g_strcmp0 (_tmp30_, _tmp31_) != 0) {
			GString* _tmp32_;
			gchar** _tmp33_;
			gint _tmp33__length1;
			const gchar* _tmp34_;
			_tmp32_ = builder;
			_tmp33_ = data;
			_tmp33__length1 = data_length1;
			_tmp34_ = _tmp33_[2];
			g_string_append_printf (_tmp32_, "[CCode (cname=\"%s\")]\n", _tmp34_);
		} else {
			gboolean _tmp35_;
			_tmp35_ = swapped;
			if (!_tmp35_) {
				GString* _tmp36_;
				_tmp36_ = builder;
				g_string_append (_tmp36_, "[CCode (instance_pos=-1)]\n");
			}
		}
	}
	_tmp37_ = widget_name;
	_tmp38_ = self->priv->context;
	_tmp39_ = vala_code_context_get_root (_tmp38_);
	_tmp40_ = _tmp39_;
	_tmp41_ = vala_plugin_lookup_symbol_by_cname (self, _tmp37_, (ValaSymbol*) _tmp40_);
	widget = _tmp41_;
	_tmp42_ = widget;
	_tmp43_ = signal_name;
	_tmp44_ = vala_plugin_symbol_lookup_inherited (self, _tmp42_, _tmp43_, FALSE, FALSE);
	sigs = _tmp44_;
	_tmp46_ = sigs;
	if (_tmp46_ == NULL) {
		_tmp45_ = TRUE;
	} else {
		GList* _tmp47_;
		gconstpointer _tmp48_;
		_tmp47_ = sigs;
		_tmp48_ = _tmp47_->data;
		_tmp45_ = !G_TYPE_CHECK_INSTANCE_TYPE ((ValaSymbol*) _tmp48_, VALA_TYPE_SIGNAL);
	}
	if (_tmp45_) {
		__g_list_free__vala_code_node_unref0_0 (sigs);
		_vala_code_node_unref0 (widget);
		_g_free0 (handler_cname);
		_g_string_free0 (builder);
		_vala_code_node_unref0 (scope);
		_g_object_unref0 (_tmp14_);
		_g_free0 (handler_name);
		_g_free0 (signal_name);
		_g_free0 (widget_name);
		data = (_vala_array_free (data, data_length1, (GDestroyNotify) g_free), NULL);
		return;
	}
	_tmp49_ = sigs;
	_tmp50_ = _tmp49_->data;
	_tmp51_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST ((ValaSymbol*) _tmp50_, VALA_TYPE_SIGNAL, ValaSignal));
	sig = _tmp51_;
	_tmp52_ = builder;
	_tmp53_ = handler_name;
	g_string_append_printf (_tmp52_, "public void %s (", _tmp53_);
	_tmp54_ = swapped;
	if (_tmp54_) {
		GString* _tmp55_;
		ValaSymbol* _tmp56_;
		gchar* _tmp57_;
		gchar* _tmp58_;
		_tmp55_ = builder;
		_tmp56_ = widget;
		_tmp57_ = vala_symbol_get_full_name (_tmp56_);
		_tmp58_ = _tmp57_;
		g_string_append_printf (_tmp55_, "%s sender", _tmp58_);
		_g_free0 (_tmp58_);
		{
			ValaList* _param_list = NULL;
			ValaSignal* _tmp59_;
			ValaList* _tmp60_;
			gint _param_size = 0;
			ValaList* _tmp61_;
			gint _tmp62_;
			gint _tmp63_;
			gint _param_index = 0;
			_tmp59_ = sig;
			_tmp60_ = vala_callable_get_parameters ((ValaCallable*) _tmp59_);
			_param_list = _tmp60_;
			_tmp61_ = _param_list;
			_tmp62_ = vala_collection_get_size ((ValaCollection*) _tmp61_);
			_tmp63_ = _tmp62_;
			_param_size = _tmp63_;
			_param_index = -1;
			while (TRUE) {
				gint _tmp64_;
				gint _tmp65_;
				gint _tmp66_;
				ValaParameter* param = NULL;
				ValaList* _tmp67_;
				gint _tmp68_;
				gpointer _tmp69_;
				GString* _tmp70_;
				ValaParameter* _tmp71_;
				ValaDataType* _tmp72_;
				ValaDataType* _tmp73_;
				ValaTypeSymbol* _tmp74_;
				ValaTypeSymbol* _tmp75_;
				gchar* _tmp76_;
				gchar* _tmp77_;
				ValaParameter* _tmp78_;
				const gchar* _tmp79_;
				const gchar* _tmp80_;
				_tmp64_ = _param_index;
				_param_index = _tmp64_ + 1;
				_tmp65_ = _param_index;
				_tmp66_ = _param_size;
				if (!(_tmp65_ < _tmp66_)) {
					break;
				}
				_tmp67_ = _param_list;
				_tmp68_ = _param_index;
				_tmp69_ = vala_list_get (_tmp67_, _tmp68_);
				param = (ValaParameter*) _tmp69_;
				_tmp70_ = builder;
				_tmp71_ = param;
				_tmp72_ = vala_variable_get_variable_type ((ValaVariable*) _tmp71_);
				_tmp73_ = _tmp72_;
				_tmp74_ = vala_data_type_get_data_type (_tmp73_);
				_tmp75_ = _tmp74_;
				_tmp76_ = vala_symbol_get_full_name ((ValaSymbol*) _tmp75_);
				_tmp77_ = _tmp76_;
				_tmp78_ = param;
				_tmp79_ = vala_symbol_get_name ((ValaSymbol*) _tmp78_);
				_tmp80_ = _tmp79_;
				g_string_append_printf (_tmp70_, ", %s %s", _tmp77_, _tmp80_);
				_g_free0 (_tmp77_);
				_vala_code_node_unref0 (param);
			}
			_vala_iterable_unref0 (_param_list);
		}
	} else {
		GString* _tmp103_;
		ValaSymbol* _tmp104_;
		gchar* _tmp105_;
		gchar* _tmp106_;
		{
			ValaList* _param_list = NULL;
			ValaSignal* _tmp81_;
			ValaList* _tmp82_;
			gint _param_size = 0;
			ValaList* _tmp83_;
			gint _tmp84_;
			gint _tmp85_;
			gint _param_index = 0;
			_tmp81_ = sig;
			_tmp82_ = vala_callable_get_parameters ((ValaCallable*) _tmp81_);
			_param_list = _tmp82_;
			_tmp83_ = _param_list;
			_tmp84_ = vala_collection_get_size ((ValaCollection*) _tmp83_);
			_tmp85_ = _tmp84_;
			_param_size = _tmp85_;
			_param_index = -1;
			while (TRUE) {
				gint _tmp86_;
				gint _tmp87_;
				gint _tmp88_;
				ValaParameter* param = NULL;
				ValaList* _tmp89_;
				gint _tmp90_;
				gpointer _tmp91_;
				GString* _tmp92_;
				ValaParameter* _tmp93_;
				ValaDataType* _tmp94_;
				ValaDataType* _tmp95_;
				ValaTypeSymbol* _tmp96_;
				ValaTypeSymbol* _tmp97_;
				gchar* _tmp98_;
				gchar* _tmp99_;
				ValaParameter* _tmp100_;
				const gchar* _tmp101_;
				const gchar* _tmp102_;
				_tmp86_ = _param_index;
				_param_index = _tmp86_ + 1;
				_tmp87_ = _param_index;
				_tmp88_ = _param_size;
				if (!(_tmp87_ < _tmp88_)) {
					break;
				}
				_tmp89_ = _param_list;
				_tmp90_ = _param_index;
				_tmp91_ = vala_list_get (_tmp89_, _tmp90_);
				param = (ValaParameter*) _tmp91_;
				_tmp92_ = builder;
				_tmp93_ = param;
				_tmp94_ = vala_variable_get_variable_type ((ValaVariable*) _tmp93_);
				_tmp95_ = _tmp94_;
				_tmp96_ = vala_data_type_get_data_type (_tmp95_);
				_tmp97_ = _tmp96_;
				_tmp98_ = vala_symbol_get_full_name ((ValaSymbol*) _tmp97_);
				_tmp99_ = _tmp98_;
				_tmp100_ = param;
				_tmp101_ = vala_symbol_get_name ((ValaSymbol*) _tmp100_);
				_tmp102_ = _tmp101_;
				g_string_append_printf (_tmp92_, "%s %s, ", _tmp99_, _tmp102_);
				_g_free0 (_tmp99_);
				_vala_code_node_unref0 (param);
			}
			_vala_iterable_unref0 (_param_list);
		}
		_tmp103_ = builder;
		_tmp104_ = widget;
		_tmp105_ = vala_symbol_get_full_name (_tmp104_);
		_tmp106_ = _tmp105_;
		g_string_append_printf (_tmp103_, "%s sender", _tmp106_);
		_g_free0 (_tmp106_);
	}
	_tmp107_ = builder;
	g_string_append_printf (_tmp107_, ") {\n\n}\n");
	_tmp108_ = editor;
	_tmp109_ = position;
	_tmp110_ = builder;
	_tmp111_ = _tmp110_->str;
	ianjuta_editor_insert ((IAnjutaEditor*) _tmp108_, _tmp109_, _tmp111_, -1, &_inner_error_);
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		_vala_code_node_unref0 (sig);
		__g_list_free__vala_code_node_unref0_0 (sigs);
		_vala_code_node_unref0 (widget);
		_g_free0 (handler_cname);
		_g_string_free0 (builder);
		_vala_code_node_unref0 (scope);
		_g_object_unref0 (_tmp14_);
		_g_free0 (handler_name);
		_g_free0 (signal_name);
		_g_free0 (widget_name);
		data = (_vala_array_free (data, data_length1, (GDestroyNotify) g_free), NULL);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
	g_object_get ((AnjutaPlugin*) self, "shell", &_tmp113_, NULL);
	_tmp114_ = _tmp113_;
	_tmp115_ = _tmp114_;
	_tmp116_ = anjuta_shell_get_object (_tmp115_, "IAnjutaIndenter", &_inner_error_);
	_tmp117_ = _tmp116_;
	_g_object_unref0 (_tmp115_);
	_tmp112_ = _tmp117_;
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		_vala_code_node_unref0 (sig);
		__g_list_free__vala_code_node_unref0_0 (sigs);
		_vala_code_node_unref0 (widget);
		_g_free0 (handler_cname);
		_g_string_free0 (builder);
		_vala_code_node_unref0 (scope);
		_g_object_unref0 (_tmp14_);
		_g_free0 (handler_name);
		_g_free0 (signal_name);
		_g_free0 (widget_name);
		data = (_vala_array_free (data, data_length1, (GDestroyNotify) g_free), NULL);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
	_tmp118_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp112_, ianjuta_indenter_get_type ()) ? ((IAnjutaIndenter*) _tmp112_) : NULL);
	indenter = _tmp118_;
	_tmp119_ = indenter;
	if (_tmp119_ != NULL) {
		IAnjutaIterable* end = NULL;
		IAnjutaIterable* _tmp120_;
		IAnjutaIterable* _tmp121_;
		gint _tmp122_ = 0;
		IAnjutaIterable* _tmp123_;
		gint _tmp124_;
		IAnjutaIterable* _tmp125_;
		GString* _tmp126_;
		const gchar* _tmp127_;
		gint _tmp128_;
		IAnjutaIndenter* _tmp129_;
		IAnjutaIterable* _tmp130_;
		IAnjutaIterable* _tmp131_;
		_tmp120_ = position;
		_tmp121_ = ianjuta_iterable_clone (_tmp120_, &_inner_error_);
		end = _tmp121_;
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			_g_object_unref0 (indenter);
			_vala_code_node_unref0 (sig);
			__g_list_free__vala_code_node_unref0_0 (sigs);
			_vala_code_node_unref0 (widget);
			_g_free0 (handler_cname);
			_g_string_free0 (builder);
			_vala_code_node_unref0 (scope);
			_g_object_unref0 (_tmp14_);
			_g_free0 (handler_name);
			_g_free0 (signal_name);
			_g_free0 (widget_name);
			data = (_vala_array_free (data, data_length1, (GDestroyNotify) g_free), NULL);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return;
		}
		_tmp123_ = end;
		_tmp124_ = ianjuta_iterable_get_position (_tmp123_, &_inner_error_);
		_tmp122_ = _tmp124_;
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			_g_object_unref0 (end);
			_g_object_unref0 (indenter);
			_vala_code_node_unref0 (sig);
			__g_list_free__vala_code_node_unref0_0 (sigs);
			_vala_code_node_unref0 (widget);
			_g_free0 (handler_cname);
			_g_string_free0 (builder);
			_vala_code_node_unref0 (scope);
			_g_object_unref0 (_tmp14_);
			_g_free0 (handler_name);
			_g_free0 (signal_name);
			_g_free0 (widget_name);
			data = (_vala_array_free (data, data_length1, (GDestroyNotify) g_free), NULL);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return;
		}
		_tmp125_ = end;
		_tmp126_ = builder;
		_tmp127_ = _tmp126_->str;
		_tmp128_ = g_utf8_strlen (_tmp127_, (gssize) -1);
		ianjuta_iterable_set_position (_tmp125_, (_tmp122_ + _tmp128_) - 1, &_inner_error_);
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			_g_object_unref0 (end);
			_g_object_unref0 (indenter);
			_vala_code_node_unref0 (sig);
			__g_list_free__vala_code_node_unref0_0 (sigs);
			_vala_code_node_unref0 (widget);
			_g_free0 (handler_cname);
			_g_string_free0 (builder);
			_vala_code_node_unref0 (scope);
			_g_object_unref0 (_tmp14_);
			_g_free0 (handler_name);
			_g_free0 (signal_name);
			_g_free0 (widget_name);
			data = (_vala_array_free (data, data_length1, (GDestroyNotify) g_free), NULL);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return;
		}
		_tmp129_ = indenter;
		_tmp130_ = position;
		_tmp131_ = end;
		ianjuta_indenter_indent (_tmp129_, _tmp130_, _tmp131_, &_inner_error_);
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			_g_object_unref0 (end);
			_g_object_unref0 (indenter);
			_vala_code_node_unref0 (sig);
			__g_list_free__vala_code_node_unref0_0 (sigs);
			_vala_code_node_unref0 (widget);
			_g_free0 (handler_cname);
			_g_string_free0 (builder);
			_vala_code_node_unref0 (scope);
			_g_object_unref0 (_tmp14_);
			_g_free0 (handler_name);
			_g_free0 (signal_name);
			_g_free0 (widget_name);
			data = (_vala_array_free (data, data_length1, (GDestroyNotify) g_free), NULL);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return;
		}
		_g_object_unref0 (end);
	}
	_tmp133_ = editor;
	_tmp134_ = position;
	_tmp135_ = ianjuta_editor_get_line_from_position ((IAnjutaEditor*) _tmp133_, _tmp134_, &_inner_error_);
	_tmp132_ = _tmp135_;
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		_g_object_unref0 (indenter);
		_vala_code_node_unref0 (sig);
		__g_list_free__vala_code_node_unref0_0 (sigs);
		_vala_code_node_unref0 (widget);
		_g_free0 (handler_cname);
		_g_string_free0 (builder);
		_vala_code_node_unref0 (scope);
		_g_object_unref0 (_tmp14_);
		_g_free0 (handler_name);
		_g_free0 (signal_name);
		_g_free0 (widget_name);
		data = (_vala_array_free (data, data_length1, (GDestroyNotify) g_free), NULL);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
	_tmp136_ = editor;
	_tmp137_ = ianjuta_editor_get_line_end_position ((IAnjutaEditor*) _tmp136_, _tmp132_ + 2, &_inner_error_);
	inside = _tmp137_;
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		_g_object_unref0 (indenter);
		_vala_code_node_unref0 (sig);
		__g_list_free__vala_code_node_unref0_0 (sigs);
		_vala_code_node_unref0 (widget);
		_g_free0 (handler_cname);
		_g_string_free0 (builder);
		_vala_code_node_unref0 (scope);
		_g_object_unref0 (_tmp14_);
		_g_free0 (handler_name);
		_g_free0 (signal_name);
		_g_free0 (widget_name);
		data = (_vala_array_free (data, data_length1, (GDestroyNotify) g_free), NULL);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
	_tmp138_ = editor;
	_tmp139_ = inside;
	ianjuta_editor_goto_position ((IAnjutaEditor*) _tmp138_, _tmp139_, &_inner_error_);
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		_g_object_unref0 (inside);
		_g_object_unref0 (indenter);
		_vala_code_node_unref0 (sig);
		__g_list_free__vala_code_node_unref0_0 (sigs);
		_vala_code_node_unref0 (widget);
		_g_free0 (handler_cname);
		_g_string_free0 (builder);
		_vala_code_node_unref0 (scope);
		_g_object_unref0 (_tmp14_);
		_g_free0 (handler_name);
		_g_free0 (signal_name);
		_g_free0 (widget_name);
		data = (_vala_array_free (data, data_length1, (GDestroyNotify) g_free), NULL);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
	_tmp140_ = indenter;
	if (_tmp140_ != NULL) {
		IAnjutaIndenter* _tmp141_;
		IAnjutaIterable* _tmp142_;
		IAnjutaIterable* _tmp143_;
		_tmp141_ = indenter;
		_tmp142_ = inside;
		_tmp143_ = inside;
		ianjuta_indenter_indent (_tmp141_, _tmp142_, _tmp143_, &_inner_error_);
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			_g_object_unref0 (inside);
			_g_object_unref0 (indenter);
			_vala_code_node_unref0 (sig);
			__g_list_free__vala_code_node_unref0_0 (sigs);
			_vala_code_node_unref0 (widget);
			_g_free0 (handler_cname);
			_g_string_free0 (builder);
			_vala_code_node_unref0 (scope);
			_g_object_unref0 (_tmp14_);
			_g_free0 (handler_name);
			_g_free0 (signal_name);
			_g_free0 (widget_name);
			data = (_vala_array_free (data, data_length1, (GDestroyNotify) g_free), NULL);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return;
		}
	}
	_g_object_unref0 (inside);
	_g_object_unref0 (indenter);
	_vala_code_node_unref0 (sig);
	__g_list_free__vala_code_node_unref0_0 (sigs);
	_vala_code_node_unref0 (widget);
	_g_free0 (handler_cname);
	_g_string_free0 (builder);
	_vala_code_node_unref0 (scope);
	_g_object_unref0 (_tmp14_);
	_g_free0 (handler_name);
	_g_free0 (signal_name);
	_g_free0 (widget_name);
	data = (_vala_array_free (data, data_length1, (GDestroyNotify) g_free), NULL);
}


static void vala_plugin_insert_member_decl_and_init (ValaPlugin* self, IAnjutaEditor* editor, const gchar* widget_ctype, const gchar* widget_name, const gchar* filename) {
	gchar* widget_type = NULL;
	const gchar* _tmp0_;
	ValaCodeContext* _tmp1_;
	ValaNamespace* _tmp2_;
	ValaNamespace* _tmp3_;
	ValaSymbol* _tmp4_;
	ValaSymbol* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* basename = NULL;
	const gchar* _tmp8_;
	gchar* _tmp9_;
	gchar* member_decl = NULL;
	const gchar* _tmp10_;
	const gchar* _tmp11_;
	gchar* _tmp12_;
	gchar* member_init = NULL;
	const gchar* _tmp13_;
	const gchar* _tmp14_;
	const gchar* _tmp15_;
	gchar* _tmp16_;
	gboolean _tmp17_ = FALSE;
	IAnjutaEditor* _tmp18_;
	const gchar* _tmp19_;
	gchar* _tmp20_;
	gchar* _tmp21_;
	const gchar* _tmp22_;
	gboolean _tmp23_;
	gboolean _tmp24_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (editor != NULL);
	g_return_if_fail (widget_ctype != NULL);
	g_return_if_fail (widget_name != NULL);
	g_return_if_fail (filename != NULL);
	_tmp0_ = widget_ctype;
	_tmp1_ = self->priv->context;
	_tmp2_ = vala_code_context_get_root (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = vala_plugin_lookup_symbol_by_cname (self, _tmp0_, (ValaSymbol*) _tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = vala_symbol_get_full_name (_tmp5_);
	_tmp7_ = _tmp6_;
	_vala_code_node_unref0 (_tmp5_);
	widget_type = _tmp7_;
	_tmp8_ = filename;
	_tmp9_ = g_path_get_basename (_tmp8_);
	basename = _tmp9_;
	_tmp10_ = widget_type;
	_tmp11_ = widget_name;
	_tmp12_ = g_strdup_printf ("%s %s;\n", _tmp10_, _tmp11_);
	member_decl = _tmp12_;
	_tmp13_ = widget_name;
	_tmp14_ = widget_name;
	_tmp15_ = widget_type;
	_tmp16_ = g_strdup_printf ("%s = builder.get_object(\"%s\") as %s;\n", _tmp13_, _tmp14_, _tmp15_);
	member_init = _tmp16_;
	_tmp18_ = editor;
	_tmp19_ = basename;
	_tmp20_ = g_strdup_printf (VALA_PLUGIN_DECL_MARK, _tmp19_);
	_tmp21_ = _tmp20_;
	_tmp22_ = member_decl;
	_tmp23_ = vala_plugin_insert_after_mark (self, _tmp18_, _tmp21_, _tmp22_);
	_tmp24_ = _tmp23_;
	_g_free0 (_tmp21_);
	if (_tmp24_) {
		IAnjutaEditor* _tmp25_;
		const gchar* _tmp26_;
		gchar* _tmp27_;
		gchar* _tmp28_;
		const gchar* _tmp29_;
		gboolean _tmp30_;
		_tmp25_ = editor;
		_tmp26_ = basename;
		_tmp27_ = g_strdup_printf (VALA_PLUGIN_INIT_MARK, _tmp26_);
		_tmp28_ = _tmp27_;
		_tmp29_ = member_init;
		_tmp30_ = vala_plugin_insert_after_mark (self, _tmp25_, _tmp28_, _tmp29_);
		_tmp17_ = _tmp30_;
		_g_free0 (_tmp28_);
	} else {
		_tmp17_ = FALSE;
	}
	_g_free0 (member_init);
	_g_free0 (member_decl);
	_g_free0 (basename);
	_g_free0 (widget_type);
}


static gboolean vala_plugin_insert_after_mark (ValaPlugin* self, IAnjutaEditor* editor, const gchar* mark, const gchar* code_to_add) {
	gboolean result = FALSE;
	IAnjutaIterable* _tmp0_ = NULL;
	IAnjutaEditor* _tmp1_;
	IAnjutaIterable* _tmp2_;
	IAnjutaEditorCell* search_start = NULL;
	IAnjutaEditorCell* _tmp4_;
	IAnjutaIterable* _tmp5_ = NULL;
	IAnjutaEditor* _tmp6_;
	IAnjutaIterable* _tmp7_;
	IAnjutaEditorCell* search_end = NULL;
	IAnjutaEditorCell* _tmp9_;
	IAnjutaEditorCell* result_end = NULL;
	IAnjutaEditor* _tmp10_;
	const gchar* _tmp11_;
	IAnjutaEditorCell* _tmp12_;
	IAnjutaEditorCell* _tmp13_;
	IAnjutaEditorCell* _tmp14_ = NULL;
	IAnjutaIterable* mark_position = NULL;
	IAnjutaEditorCell* _tmp16_;
	IAnjutaIterable* _tmp17_;
	IAnjutaIterable* _tmp18_;
	IAnjutaEditor* _tmp19_;
	IAnjutaIterable* _tmp20_;
	const gchar* _tmp21_;
	GObject* _tmp23_ = NULL;
	AnjutaShell* _tmp24_;
	AnjutaShell* _tmp25_;
	AnjutaShell* _tmp26_;
	GObject* _tmp27_;
	GObject* _tmp28_;
	IAnjutaIndenter* indenter = NULL;
	IAnjutaIndenter* _tmp30_;
	IAnjutaIndenter* _tmp31_;
	IAnjutaEditor* _tmp47_;
	IAnjutaIterable* _tmp48_;
	const gchar* _tmp49_;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (editor != NULL, FALSE);
	g_return_val_if_fail (mark != NULL, FALSE);
	g_return_val_if_fail (code_to_add != NULL, FALSE);
	_tmp1_ = editor;
	_tmp2_ = ianjuta_editor_get_start_position (_tmp1_, &_inner_error_);
	_tmp0_ = _tmp2_;
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		gboolean _tmp3_ = FALSE;
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return _tmp3_;
	}
	_tmp4_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, ianjuta_editor_cell_get_type ()) ? ((IAnjutaEditorCell*) _tmp0_) : NULL);
	search_start = _tmp4_;
	_tmp6_ = editor;
	_tmp7_ = ianjuta_editor_get_end_position (_tmp6_, &_inner_error_);
	_tmp5_ = _tmp7_;
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		gboolean _tmp8_ = FALSE;
		_g_object_unref0 (search_start);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return _tmp8_;
	}
	_tmp9_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp5_, ianjuta_editor_cell_get_type ()) ? ((IAnjutaEditorCell*) _tmp5_) : NULL);
	search_end = _tmp9_;
	_tmp10_ = editor;
	_tmp11_ = mark;
	_tmp12_ = search_start;
	_tmp13_ = search_end;
	ianjuta_editor_search_forward (G_TYPE_CHECK_INSTANCE_TYPE (_tmp10_, ianjuta_editor_search_get_type ()) ? ((IAnjutaEditorSearch*) _tmp10_) : NULL, _tmp11_, FALSE, _tmp12_, _tmp13_, NULL, &_tmp14_, &_inner_error_);
	_g_object_unref0 (result_end);
	result_end = _tmp14_;
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		gboolean _tmp15_ = FALSE;
		_g_object_unref0 (result_end);
		_g_object_unref0 (search_end);
		_g_object_unref0 (search_start);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return _tmp15_;
	}
	_tmp16_ = result_end;
	_tmp17_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp16_, ianjuta_iterable_get_type ()) ? ((IAnjutaIterable*) _tmp16_) : NULL);
	mark_position = _tmp17_;
	_tmp18_ = mark_position;
	if (_tmp18_ == NULL) {
		result = FALSE;
		_g_object_unref0 (mark_position);
		_g_object_unref0 (result_end);
		_g_object_unref0 (search_end);
		_g_object_unref0 (search_start);
		return result;
	}
	_tmp19_ = editor;
	_tmp20_ = mark_position;
	_tmp21_ = code_to_add;
	ianjuta_editor_insert (_tmp19_, _tmp20_, _tmp21_, -1, &_inner_error_);
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		gboolean _tmp22_ = FALSE;
		_g_object_unref0 (mark_position);
		_g_object_unref0 (result_end);
		_g_object_unref0 (search_end);
		_g_object_unref0 (search_start);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return _tmp22_;
	}
	g_object_get ((AnjutaPlugin*) self, "shell", &_tmp24_, NULL);
	_tmp25_ = _tmp24_;
	_tmp26_ = _tmp25_;
	_tmp27_ = anjuta_shell_get_object (_tmp26_, "IAnjutaIndenter", &_inner_error_);
	_tmp28_ = _tmp27_;
	_g_object_unref0 (_tmp26_);
	_tmp23_ = _tmp28_;
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		gboolean _tmp29_ = FALSE;
		_g_object_unref0 (mark_position);
		_g_object_unref0 (result_end);
		_g_object_unref0 (search_end);
		_g_object_unref0 (search_start);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return _tmp29_;
	}
	_tmp30_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp23_, ianjuta_indenter_get_type ()) ? ((IAnjutaIndenter*) _tmp23_) : NULL);
	indenter = _tmp30_;
	_tmp31_ = indenter;
	if (_tmp31_ != NULL) {
		IAnjutaIterable* end = NULL;
		IAnjutaIterable* _tmp32_;
		IAnjutaIterable* _tmp33_;
		gint _tmp35_ = 0;
		IAnjutaIterable* _tmp36_;
		gint _tmp37_;
		IAnjutaIterable* _tmp39_;
		const gchar* _tmp40_;
		gint _tmp41_;
		IAnjutaIndenter* _tmp43_;
		IAnjutaIterable* _tmp44_;
		IAnjutaIterable* _tmp45_;
		_tmp32_ = mark_position;
		_tmp33_ = ianjuta_iterable_clone (_tmp32_, &_inner_error_);
		end = _tmp33_;
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			gboolean _tmp34_ = FALSE;
			_g_object_unref0 (indenter);
			_g_object_unref0 (mark_position);
			_g_object_unref0 (result_end);
			_g_object_unref0 (search_end);
			_g_object_unref0 (search_start);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return _tmp34_;
		}
		_tmp36_ = end;
		_tmp37_ = ianjuta_iterable_get_position (_tmp36_, &_inner_error_);
		_tmp35_ = _tmp37_;
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			gboolean _tmp38_ = FALSE;
			_g_object_unref0 (end);
			_g_object_unref0 (indenter);
			_g_object_unref0 (mark_position);
			_g_object_unref0 (result_end);
			_g_object_unref0 (search_end);
			_g_object_unref0 (search_start);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return _tmp38_;
		}
		_tmp39_ = end;
		_tmp40_ = code_to_add;
		_tmp41_ = g_utf8_strlen (_tmp40_, (gssize) -1);
		ianjuta_iterable_set_position (_tmp39_, (_tmp35_ + _tmp41_) - 1, &_inner_error_);
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			gboolean _tmp42_ = FALSE;
			_g_object_unref0 (end);
			_g_object_unref0 (indenter);
			_g_object_unref0 (mark_position);
			_g_object_unref0 (result_end);
			_g_object_unref0 (search_end);
			_g_object_unref0 (search_start);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return _tmp42_;
		}
		_tmp43_ = indenter;
		_tmp44_ = mark_position;
		_tmp45_ = end;
		ianjuta_indenter_indent (_tmp43_, _tmp44_, _tmp45_, &_inner_error_);
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			gboolean _tmp46_ = FALSE;
			_g_object_unref0 (end);
			_g_object_unref0 (indenter);
			_g_object_unref0 (mark_position);
			_g_object_unref0 (result_end);
			_g_object_unref0 (search_end);
			_g_object_unref0 (search_start);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return _tmp46_;
		}
		_g_object_unref0 (end);
	}
	_tmp47_ = editor;
	_tmp48_ = mark_position;
	_tmp49_ = code_to_add;
	g_signal_emit_by_name (_tmp47_, "code-added", _tmp48_, _tmp49_);
	result = TRUE;
	_g_object_unref0 (indenter);
	_g_object_unref0 (mark_position);
	_g_object_unref0 (result_end);
	_g_object_unref0 (search_end);
	_g_object_unref0 (search_start);
	return result;
}


static ValaSymbol* vala_plugin_lookup_symbol_by_cname (ValaPlugin* self, const gchar* cname, ValaSymbol* parent) {
	ValaSymbol* result = NULL;
	ValaSymbol* sym = NULL;
	ValaSymbol* _tmp0_;
	ValaScope* _tmp1_;
	ValaScope* _tmp2_;
	const gchar* _tmp3_;
	ValaSymbol* _tmp4_;
	ValaSymbol* _tmp5_;
	ValaMap* symtab = NULL;
	ValaSymbol* _tmp6_;
	ValaScope* _tmp7_;
	ValaScope* _tmp8_;
	ValaMap* _tmp9_;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (cname != NULL, NULL);
	g_return_val_if_fail (parent != NULL, NULL);
	_tmp0_ = parent;
	_tmp1_ = vala_symbol_get_scope (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = cname;
	_tmp4_ = vala_scope_lookup (_tmp2_, _tmp3_);
	sym = _tmp4_;
	_tmp5_ = sym;
	if (_tmp5_ != NULL) {
		result = sym;
		return result;
	}
	_tmp6_ = parent;
	_tmp7_ = vala_symbol_get_scope (_tmp6_);
	_tmp8_ = _tmp7_;
	_tmp9_ = vala_scope_get_symbol_table (_tmp8_);
	symtab = _tmp9_;
	{
		ValaIterator* _name_it = NULL;
		ValaMap* _tmp10_;
		ValaSet* _tmp11_;
		ValaSet* _tmp12_;
		ValaIterator* _tmp13_;
		ValaIterator* _tmp14_;
		_tmp10_ = symtab;
		_tmp11_ = vala_map_get_keys (_tmp10_);
		_tmp12_ = _tmp11_;
		_tmp13_ = vala_iterable_iterator ((ValaIterable*) _tmp12_);
		_tmp14_ = _tmp13_;
		_vala_iterable_unref0 (_tmp12_);
		_name_it = _tmp14_;
		while (TRUE) {
			ValaIterator* _tmp15_;
			gboolean _tmp16_;
			gchar* name = NULL;
			ValaIterator* _tmp17_;
			gpointer _tmp18_;
			const gchar* _tmp19_;
			const gchar* _tmp20_;
			gboolean _tmp21_;
			_tmp15_ = _name_it;
			_tmp16_ = vala_iterator_next (_tmp15_);
			if (!_tmp16_) {
				break;
			}
			_tmp17_ = _name_it;
			_tmp18_ = vala_iterator_get (_tmp17_);
			name = (gchar*) _tmp18_;
			_tmp19_ = cname;
			_tmp20_ = name;
			_tmp21_ = g_str_has_prefix (_tmp19_, _tmp20_);
			if (_tmp21_) {
				const gchar* _tmp22_;
				const gchar* _tmp23_;
				gint _tmp24_;
				gint _tmp25_;
				gchar* _tmp26_;
				gchar* _tmp27_;
				ValaSymbol* _tmp28_;
				ValaScope* _tmp29_;
				ValaScope* _tmp30_;
				const gchar* _tmp31_;
				ValaSymbol* _tmp32_;
				ValaSymbol* _tmp33_;
				ValaSymbol* _tmp34_;
				ValaSymbol* _tmp35_;
				_tmp22_ = cname;
				_tmp23_ = name;
				_tmp24_ = strlen (_tmp23_);
				_tmp25_ = _tmp24_;
				_tmp26_ = string_substring (_tmp22_, (glong) _tmp25_, (glong) -1);
				_tmp27_ = _tmp26_;
				_tmp28_ = parent;
				_tmp29_ = vala_symbol_get_scope (_tmp28_);
				_tmp30_ = _tmp29_;
				_tmp31_ = name;
				_tmp32_ = vala_scope_lookup (_tmp30_, _tmp31_);
				_tmp33_ = _tmp32_;
				_tmp34_ = vala_plugin_lookup_symbol_by_cname (self, _tmp27_, _tmp33_);
				_tmp35_ = _tmp34_;
				_vala_code_node_unref0 (_tmp33_);
				_g_free0 (_tmp27_);
				result = _tmp35_;
				_g_free0 (name);
				_vala_iterator_unref0 (_name_it);
				_vala_map_unref0 (symtab);
				_vala_code_node_unref0 (sym);
				return result;
			}
			_g_free0 (name);
		}
		_vala_iterator_unref0 (_name_it);
	}
	result = NULL;
	_vala_map_unref0 (symtab);
	_vala_code_node_unref0 (sym);
	return result;
}


static gpointer _vala_source_file_ref0 (gpointer self) {
	return self ? vala_source_file_ref (self) : NULL;
}


ValaSymbol* vala_plugin_get_current_context (ValaPlugin* self, IAnjutaEditor* editor, IAnjutaIterable* position) {
	ValaSymbol* result = NULL;
	IAnjutaEditor* _tmp0_;
	IAnjutaFile* file = NULL;
	IAnjutaEditor* _tmp1_;
	IAnjutaFile* _tmp2_;
	GFile* _tmp3_ = NULL;
	IAnjutaFile* _tmp4_;
	GFile* _tmp5_;
	gchar* path = NULL;
	gchar* _tmp6_;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (editor != NULL, NULL);
	_tmp0_ = editor;
	_vala_return_val_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, ianjuta_file_get_type ()), "editor is IAnjuta.File", NULL);
	_tmp1_ = editor;
	_tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, ianjuta_file_get_type ()) ? ((IAnjutaFile*) _tmp1_) : NULL);
	file = _tmp2_;
	_tmp4_ = file;
	_tmp5_ = ianjuta_file_get_file (_tmp4_, &_inner_error_);
	_tmp3_ = _tmp5_;
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		_g_object_unref0 (file);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return NULL;
	}
	_tmp6_ = g_file_get_path (_tmp3_);
	path = _tmp6_;
	{
		ValaCodeContext* _tmp7_;
		_tmp7_ = self->priv->context;
		g_rec_mutex_lock (&self->priv->__lock_context);
		{
			ValaSourceFile* source = NULL;
			ValaSourceFile* _tmp25_;
			gint line = 0;
			gint column = 0;
			IAnjutaIterable* _tmp35_;
			BlockLocator* _tmp53_;
			ValaSourceFile* _tmp54_;
			gint _tmp55_;
			gint _tmp56_;
			ValaSymbol* _tmp57_;
			source = NULL;
			{
				ValaList* _src_list = NULL;
				ValaCodeContext* _tmp8_;
				ValaList* _tmp9_;
				gint _src_size = 0;
				ValaList* _tmp10_;
				gint _tmp11_;
				gint _tmp12_;
				gint _src_index = 0;
				_tmp8_ = self->priv->context;
				_tmp9_ = vala_code_context_get_source_files (_tmp8_);
				_src_list = _tmp9_;
				_tmp10_ = _src_list;
				_tmp11_ = vala_collection_get_size ((ValaCollection*) _tmp10_);
				_tmp12_ = _tmp11_;
				_src_size = _tmp12_;
				_src_index = -1;
				while (TRUE) {
					gint _tmp13_;
					gint _tmp14_;
					gint _tmp15_;
					ValaSourceFile* src = NULL;
					ValaList* _tmp16_;
					gint _tmp17_;
					gpointer _tmp18_;
					ValaSourceFile* _tmp19_;
					const gchar* _tmp20_;
					const gchar* _tmp21_;
					const gchar* _tmp22_;
					_tmp13_ = _src_index;
					_src_index = _tmp13_ + 1;
					_tmp14_ = _src_index;
					_tmp15_ = _src_size;
					if (!(_tmp14_ < _tmp15_)) {
						break;
					}
					_tmp16_ = _src_list;
					_tmp17_ = _src_index;
					_tmp18_ = vala_list_get (_tmp16_, _tmp17_);
					src = (ValaSourceFile*) _tmp18_;
					_tmp19_ = src;
					_tmp20_ = vala_source_file_get_filename (_tmp19_);
					_tmp21_ = _tmp20_;
					_tmp22_ = path;
					if (g_strcmp0 (_tmp21_, _tmp22_) == 0) {
						ValaSourceFile* _tmp23_;
						ValaSourceFile* _tmp24_;
						_tmp23_ = src;
						_tmp24_ = _vala_source_file_ref0 (_tmp23_);
						_vala_source_file_unref0 (source);
						source = _tmp24_;
						_vala_source_file_unref0 (src);
						break;
					}
					_vala_source_file_unref0 (src);
				}
				_vala_iterable_unref0 (_src_list);
			}
			_tmp25_ = source;
			if (_tmp25_ == NULL) {
				ValaSourceFileType _tmp26_ = 0;
				const gchar* _tmp27_;
				gboolean _tmp28_;
				ValaCodeContext* _tmp29_;
				const gchar* _tmp30_;
				ValaSourceFile* _tmp31_;
				ValaCodeContext* _tmp32_;
				ValaSourceFile* _tmp33_;
				ValaSourceFile* _tmp34_;
				_tmp27_ = path;
				_tmp28_ = g_str_has_suffix (_tmp27_, "vapi");
				if (_tmp28_) {
					_tmp26_ = VALA_SOURCE_FILE_TYPE_PACKAGE;
				} else {
					_tmp26_ = VALA_SOURCE_FILE_TYPE_SOURCE;
				}
				_tmp29_ = self->priv->context;
				_tmp30_ = path;
				_tmp31_ = vala_source_file_new (_tmp29_, _tmp26_, _tmp30_, NULL, FALSE);
				_vala_source_file_unref0 (source);
				source = _tmp31_;
				_tmp32_ = self->priv->context;
				_tmp33_ = source;
				vala_code_context_add_source_file (_tmp32_, _tmp33_);
				_tmp34_ = source;
				vala_plugin_update_file (self, _tmp34_);
			}
			_tmp35_ = position;
			if (_tmp35_ == NULL) {
				gint _tmp36_ = 0;
				IAnjutaEditor* _tmp37_;
				gint _tmp38_;
				gint _tmp39_ = 0;
				IAnjutaEditor* _tmp40_;
				gint _tmp41_;
				_tmp37_ = editor;
				_tmp38_ = ianjuta_editor_get_lineno (_tmp37_, &_inner_error_);
				_tmp36_ = _tmp38_;
				if (G_UNLIKELY (_inner_error_ != NULL)) {
					_vala_source_file_unref0 (source);
					goto __finally6;
				}
				line = _tmp36_;
				_tmp40_ = editor;
				_tmp41_ = ianjuta_editor_get_column (_tmp40_, &_inner_error_);
				_tmp39_ = _tmp41_;
				if (G_UNLIKELY (_inner_error_ != NULL)) {
					_vala_source_file_unref0 (source);
					goto __finally6;
				}
				column = _tmp39_;
			} else {
				gint _tmp42_ = 0;
				IAnjutaEditor* _tmp43_;
				IAnjutaIterable* _tmp44_;
				gint _tmp45_;
				IAnjutaIterable* _tmp46_ = NULL;
				IAnjutaEditor* _tmp47_;
				gint _tmp48_;
				IAnjutaIterable* _tmp49_;
				gint _tmp50_ = 0;
				IAnjutaIterable* _tmp51_;
				gint _tmp52_;
				_tmp43_ = editor;
				_tmp44_ = position;
				_tmp45_ = ianjuta_editor_get_line_from_position (_tmp43_, _tmp44_, &_inner_error_);
				_tmp42_ = _tmp45_;
				if (G_UNLIKELY (_inner_error_ != NULL)) {
					_vala_source_file_unref0 (source);
					goto __finally6;
				}
				line = _tmp42_;
				_tmp47_ = editor;
				_tmp48_ = line;
				_tmp49_ = ianjuta_editor_get_line_begin_position (_tmp47_, _tmp48_, &_inner_error_);
				_tmp46_ = _tmp49_;
				if (G_UNLIKELY (_inner_error_ != NULL)) {
					_vala_source_file_unref0 (source);
					goto __finally6;
				}
				_tmp51_ = position;
				_tmp52_ = ianjuta_iterable_diff (_tmp46_, _tmp51_, &_inner_error_);
				_tmp50_ = _tmp52_;
				if (G_UNLIKELY (_inner_error_ != NULL)) {
					_g_object_unref0 (_tmp46_);
					_vala_source_file_unref0 (source);
					goto __finally6;
				}
				column = _tmp50_;
				_g_object_unref0 (_tmp46_);
			}
			_tmp53_ = self->priv->locator;
			_tmp54_ = source;
			_tmp55_ = line;
			_tmp56_ = column;
			_tmp57_ = block_locator_locate (_tmp53_, _tmp54_, _tmp55_, _tmp56_);
			result = _tmp57_;
			_vala_source_file_unref0 (source);
			{
				ValaCodeContext* _tmp58_;
				_tmp58_ = self->priv->context;
				g_rec_mutex_unlock (&self->priv->__lock_context);
			}
			_g_free0 (path);
			_g_object_unref0 (_tmp3_);
			_g_object_unref0 (file);
			return result;
		}
		__finally6:
		{
			ValaCodeContext* _tmp59_;
			_tmp59_ = self->priv->context;
			g_rec_mutex_unlock (&self->priv->__lock_context);
		}
		_g_free0 (path);
		_g_object_unref0 (_tmp3_);
		_g_object_unref0 (file);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return NULL;
	}
	_g_free0 (path);
	_g_object_unref0 (_tmp3_);
	_g_object_unref0 (file);
}


static gpointer _vala_iterable_ref0 (gpointer self) {
	return self ? vala_iterable_ref (self) : NULL;
}


GList* vala_plugin_lookup_symbol (ValaPlugin* self, ValaExpression* inner, const gchar* name, gboolean prefix_match, ValaBlock* block) {
	GList* result = NULL;
	GList* matching_symbols = NULL;
	ValaBlock* _tmp0_;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (name != NULL, NULL);
	matching_symbols = NULL;
	_tmp0_ = block;
	if (_tmp0_ == NULL) {
		result = matching_symbols;
		return result;
	}
	{
		ValaCodeContext* _tmp1_;
		_tmp1_ = self->priv->context;
		g_rec_mutex_lock (&self->priv->__lock_context);
		{
			ValaExpression* _tmp2_;
			_tmp2_ = inner;
			if (_tmp2_ == NULL) {
				{
					ValaSymbol* sym = NULL;
					ValaBlock* _tmp3_;
					ValaSymbol* _tmp4_;
					_tmp3_ = block;
					_tmp4_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, VALA_TYPE_SYMBOL, ValaSymbol));
					sym = _tmp4_;
					{
						gboolean _tmp5_ = FALSE;
						_tmp5_ = TRUE;
						while (TRUE) {
							ValaSymbol* _tmp10_;
							ValaSymbol* _tmp11_;
							const gchar* _tmp12_;
							gboolean _tmp13_;
							GList* _tmp14_;
							if (!_tmp5_) {
								ValaSymbol* _tmp6_;
								ValaSymbol* _tmp7_;
								ValaSymbol* _tmp8_;
								ValaSymbol* _tmp9_;
								_tmp6_ = sym;
								_tmp7_ = vala_symbol_get_parent_symbol (_tmp6_);
								_tmp8_ = _tmp7_;
								_tmp9_ = _vala_code_node_ref0 (_tmp8_);
								_vala_code_node_unref0 (sym);
								sym = _tmp9_;
							}
							_tmp5_ = FALSE;
							_tmp10_ = sym;
							if (!(_tmp10_ != NULL)) {
								break;
							}
							_tmp11_ = sym;
							_tmp12_ = name;
							_tmp13_ = prefix_match;
							_tmp14_ = vala_plugin_symbol_lookup_inherited (self, _tmp11_, _tmp12_, _tmp13_, FALSE);
							matching_symbols = g_list_concat (matching_symbols, _tmp14_);
						}
					}
					_vala_code_node_unref0 (sym);
				}
				{
					ValaList* _ns_list = NULL;
					ValaBlock* _tmp15_;
					ValaSourceReference* _tmp16_;
					ValaSourceReference* _tmp17_;
					ValaSourceFile* _tmp18_;
					ValaSourceFile* _tmp19_;
					ValaList* _tmp20_;
					ValaList* _tmp21_;
					ValaList* _tmp22_;
					gint _ns_size = 0;
					ValaList* _tmp23_;
					gint _tmp24_;
					gint _tmp25_;
					gint _ns_index = 0;
					_tmp15_ = block;
					_tmp16_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp15_);
					_tmp17_ = _tmp16_;
					_tmp18_ = vala_source_reference_get_file (_tmp17_);
					_tmp19_ = _tmp18_;
					_tmp20_ = vala_source_file_get_current_using_directives (_tmp19_);
					_tmp21_ = _tmp20_;
					_tmp22_ = _vala_iterable_ref0 (_tmp21_);
					_ns_list = _tmp22_;
					_tmp23_ = _ns_list;
					_tmp24_ = vala_collection_get_size ((ValaCollection*) _tmp23_);
					_tmp25_ = _tmp24_;
					_ns_size = _tmp25_;
					_ns_index = -1;
					while (TRUE) {
						gint _tmp26_;
						gint _tmp27_;
						gint _tmp28_;
						ValaUsingDirective* ns = NULL;
						ValaList* _tmp29_;
						gint _tmp30_;
						gpointer _tmp31_;
						ValaUsingDirective* _tmp32_;
						ValaSymbol* _tmp33_;
						ValaSymbol* _tmp34_;
						const gchar* _tmp35_;
						gboolean _tmp36_;
						GList* _tmp37_;
						_tmp26_ = _ns_index;
						_ns_index = _tmp26_ + 1;
						_tmp27_ = _ns_index;
						_tmp28_ = _ns_size;
						if (!(_tmp27_ < _tmp28_)) {
							break;
						}
						_tmp29_ = _ns_list;
						_tmp30_ = _ns_index;
						_tmp31_ = vala_list_get (_tmp29_, _tmp30_);
						ns = (ValaUsingDirective*) _tmp31_;
						_tmp32_ = ns;
						_tmp33_ = vala_using_directive_get_namespace_symbol (_tmp32_);
						_tmp34_ = _tmp33_;
						_tmp35_ = name;
						_tmp36_ = prefix_match;
						_tmp37_ = vala_plugin_symbol_lookup_inherited (self, _tmp34_, _tmp35_, _tmp36_, FALSE);
						matching_symbols = g_list_concat (matching_symbols, _tmp37_);
						_vala_code_node_unref0 (ns);
					}
					_vala_iterable_unref0 (_ns_list);
				}
			} else {
				ValaExpression* _tmp38_;
				ValaSymbol* _tmp39_;
				ValaSymbol* _tmp40_;
				_tmp38_ = inner;
				_tmp39_ = vala_expression_get_symbol_reference (_tmp38_);
				_tmp40_ = _tmp39_;
				if (_tmp40_ != NULL) {
					ValaExpression* _tmp41_;
					ValaSymbol* _tmp42_;
					ValaSymbol* _tmp43_;
					const gchar* _tmp44_;
					gboolean _tmp45_;
					GList* _tmp46_;
					_tmp41_ = inner;
					_tmp42_ = vala_expression_get_symbol_reference (_tmp41_);
					_tmp43_ = _tmp42_;
					_tmp44_ = name;
					_tmp45_ = prefix_match;
					_tmp46_ = vala_plugin_symbol_lookup_inherited (self, _tmp43_, _tmp44_, _tmp45_, FALSE);
					matching_symbols = g_list_concat (matching_symbols, _tmp46_);
				} else {
					ValaExpression* _tmp47_;
					_tmp47_ = inner;
					if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp47_, VALA_TYPE_MEMBER_ACCESS)) {
						ValaMemberAccess* inner_ma = NULL;
						ValaExpression* _tmp48_;
						ValaMemberAccess* _tmp49_;
						GList* matching = NULL;
						ValaMemberAccess* _tmp50_;
						ValaExpression* _tmp51_;
						ValaExpression* _tmp52_;
						ValaMemberAccess* _tmp53_;
						const gchar* _tmp54_;
						const gchar* _tmp55_;
						ValaBlock* _tmp56_;
						GList* _tmp57_;
						GList* _tmp58_;
						_tmp48_ = inner;
						_tmp49_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp48_, VALA_TYPE_MEMBER_ACCESS, ValaMemberAccess));
						inner_ma = _tmp49_;
						_tmp50_ = inner_ma;
						_tmp51_ = vala_member_access_get_inner (_tmp50_);
						_tmp52_ = _tmp51_;
						_tmp53_ = inner_ma;
						_tmp54_ = vala_member_access_get_member_name (_tmp53_);
						_tmp55_ = _tmp54_;
						_tmp56_ = block;
						_tmp57_ = vala_plugin_lookup_symbol (self, _tmp52_, _tmp55_, FALSE, _tmp56_);
						matching = _tmp57_;
						_tmp58_ = matching;
						if (_tmp58_ != NULL) {
							GList* _tmp59_;
							gconstpointer _tmp60_;
							const gchar* _tmp61_;
							gboolean _tmp62_;
							GList* _tmp63_;
							_tmp59_ = matching;
							_tmp60_ = _tmp59_->data;
							_tmp61_ = name;
							_tmp62_ = prefix_match;
							_tmp63_ = vala_plugin_symbol_lookup_inherited (self, (ValaSymbol*) _tmp60_, _tmp61_, _tmp62_, FALSE);
							matching_symbols = g_list_concat (matching_symbols, _tmp63_);
						}
						__g_list_free__vala_code_node_unref0_0 (matching);
						_vala_code_node_unref0 (inner_ma);
					} else {
						ValaExpression* _tmp64_;
						_tmp64_ = inner;
						if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp64_, VALA_TYPE_METHOD_CALL)) {
							ValaMethodCall* inner_inv = NULL;
							ValaExpression* _tmp65_;
							ValaMethodCall* _tmp66_;
							ValaMemberAccess* inner_ma = NULL;
							ValaMethodCall* _tmp67_;
							ValaExpression* _tmp68_;
							ValaExpression* _tmp69_;
							ValaMemberAccess* _tmp70_;
							ValaMemberAccess* _tmp71_;
							_tmp65_ = inner;
							_tmp66_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp65_, VALA_TYPE_METHOD_CALL, ValaMethodCall));
							inner_inv = _tmp66_;
							_tmp67_ = inner_inv;
							_tmp68_ = vala_method_call_get_call (_tmp67_);
							_tmp69_ = _tmp68_;
							_tmp70_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp69_, VALA_TYPE_MEMBER_ACCESS) ? ((ValaMemberAccess*) _tmp69_) : NULL);
							inner_ma = _tmp70_;
							_tmp71_ = inner_ma;
							if (_tmp71_ != NULL) {
								GList* matching = NULL;
								ValaMemberAccess* _tmp72_;
								ValaExpression* _tmp73_;
								ValaExpression* _tmp74_;
								ValaMemberAccess* _tmp75_;
								const gchar* _tmp76_;
								const gchar* _tmp77_;
								ValaBlock* _tmp78_;
								GList* _tmp79_;
								GList* _tmp80_;
								_tmp72_ = inner_ma;
								_tmp73_ = vala_member_access_get_inner (_tmp72_);
								_tmp74_ = _tmp73_;
								_tmp75_ = inner_ma;
								_tmp76_ = vala_member_access_get_member_name (_tmp75_);
								_tmp77_ = _tmp76_;
								_tmp78_ = block;
								_tmp79_ = vala_plugin_lookup_symbol (self, _tmp74_, _tmp77_, FALSE, _tmp78_);
								matching = _tmp79_;
								_tmp80_ = matching;
								if (_tmp80_ != NULL) {
									GList* _tmp81_;
									gconstpointer _tmp82_;
									const gchar* _tmp83_;
									gboolean _tmp84_;
									GList* _tmp85_;
									_tmp81_ = matching;
									_tmp82_ = _tmp81_->data;
									_tmp83_ = name;
									_tmp84_ = prefix_match;
									_tmp85_ = vala_plugin_symbol_lookup_inherited (self, (ValaSymbol*) _tmp82_, _tmp83_, _tmp84_, TRUE);
									matching_symbols = g_list_concat (matching_symbols, _tmp85_);
								}
								__g_list_free__vala_code_node_unref0_0 (matching);
							}
							_vala_code_node_unref0 (inner_ma);
							_vala_code_node_unref0 (inner_inv);
						}
					}
				}
			}
		}
		__finally7:
		{
			ValaCodeContext* _tmp86_;
			_tmp86_ = self->priv->context;
			g_rec_mutex_unlock (&self->priv->__lock_context);
		}
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			__g_list_free__vala_code_node_unref0_0 (matching_symbols);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return NULL;
		}
	}
	result = matching_symbols;
	return result;
}


static GList* vala_plugin_symbol_lookup_inherited (ValaPlugin* self, ValaSymbol* sym, const gchar* name, gboolean prefix_match, gboolean invocation) {
	GList* result = NULL;
	GList* _result_ = NULL;
	ValaSymbol* _tmp0_;
	ValaMap* symbol_table = NULL;
	ValaSymbol* _tmp1_;
	ValaScope* _tmp2_;
	ValaScope* _tmp3_;
	ValaMap* _tmp4_;
	ValaMap* _tmp5_;
	gboolean _tmp26_ = FALSE;
	gboolean _tmp27_;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (name != NULL, NULL);
	_result_ = NULL;
	_tmp0_ = sym;
	if (_tmp0_ == NULL) {
		result = _result_;
		return result;
	}
	_tmp1_ = sym;
	_tmp2_ = vala_symbol_get_scope (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = vala_scope_get_symbol_table (_tmp3_);
	symbol_table = _tmp4_;
	_tmp5_ = symbol_table;
	if (_tmp5_ != NULL) {
		{
			ValaIterator* _key_it = NULL;
			ValaMap* _tmp6_;
			ValaSet* _tmp7_;
			ValaSet* _tmp8_;
			ValaIterator* _tmp9_;
			ValaIterator* _tmp10_;
			_tmp6_ = symbol_table;
			_tmp7_ = vala_map_get_keys (_tmp6_);
			_tmp8_ = _tmp7_;
			_tmp9_ = vala_iterable_iterator ((ValaIterable*) _tmp8_);
			_tmp10_ = _tmp9_;
			_vala_iterable_unref0 (_tmp8_);
			_key_it = _tmp10_;
			while (TRUE) {
				ValaIterator* _tmp11_;
				gboolean _tmp12_;
				gchar* key = NULL;
				ValaIterator* _tmp13_;
				gpointer _tmp14_;
				gboolean _tmp15_ = FALSE;
				gboolean _tmp16_ = FALSE;
				gboolean _tmp17_;
				_tmp11_ = _key_it;
				_tmp12_ = vala_iterator_next (_tmp11_);
				if (!_tmp12_) {
					break;
				}
				_tmp13_ = _key_it;
				_tmp14_ = vala_iterator_get (_tmp13_);
				key = (gchar*) _tmp14_;
				_tmp17_ = prefix_match;
				if (_tmp17_) {
					const gchar* _tmp18_;
					const gchar* _tmp19_;
					gboolean _tmp20_;
					_tmp18_ = key;
					_tmp19_ = name;
					_tmp20_ = g_str_has_prefix (_tmp18_, _tmp19_);
					_tmp16_ = _tmp20_;
				} else {
					_tmp16_ = FALSE;
				}
				if (_tmp16_) {
					_tmp15_ = TRUE;
				} else {
					const gchar* _tmp21_;
					const gchar* _tmp22_;
					_tmp21_ = key;
					_tmp22_ = name;
					_tmp15_ = g_strcmp0 (_tmp21_, _tmp22_) == 0;
				}
				if (_tmp15_) {
					ValaMap* _tmp23_;
					const gchar* _tmp24_;
					gpointer _tmp25_;
					_tmp23_ = symbol_table;
					_tmp24_ = key;
					_tmp25_ = vala_map_get (_tmp23_, _tmp24_);
					_result_ = g_list_append (_result_, (ValaSymbol*) _tmp25_);
				}
				_g_free0 (key);
			}
			_vala_iterator_unref0 (_key_it);
		}
	}
	_tmp27_ = invocation;
	if (_tmp27_) {
		ValaSymbol* _tmp28_;
		_tmp28_ = sym;
		_tmp26_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp28_, VALA_TYPE_METHOD);
	} else {
		_tmp26_ = FALSE;
	}
	if (_tmp26_) {
		ValaMethod* func = NULL;
		ValaSymbol* _tmp29_;
		ValaMethod* _tmp30_;
		ValaMethod* _tmp31_;
		ValaDataType* _tmp32_;
		ValaDataType* _tmp33_;
		ValaTypeSymbol* _tmp34_;
		ValaTypeSymbol* _tmp35_;
		const gchar* _tmp36_;
		gboolean _tmp37_;
		GList* _tmp38_;
		_tmp29_ = sym;
		_tmp30_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, VALA_TYPE_METHOD, ValaMethod));
		func = _tmp30_;
		_tmp31_ = func;
		_tmp32_ = vala_callable_get_return_type ((ValaCallable*) _tmp31_);
		_tmp33_ = _tmp32_;
		_tmp34_ = vala_data_type_get_data_type (_tmp33_);
		_tmp35_ = _tmp34_;
		_tmp36_ = name;
		_tmp37_ = prefix_match;
		_tmp38_ = vala_plugin_symbol_lookup_inherited (self, (ValaSymbol*) _tmp35_, _tmp36_, _tmp37_, FALSE);
		_result_ = g_list_concat (_result_, _tmp38_);
		_vala_code_node_unref0 (func);
	} else {
		ValaSymbol* _tmp39_;
		_tmp39_ = sym;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp39_, VALA_TYPE_CLASS)) {
			ValaClass* cl = NULL;
			ValaSymbol* _tmp40_;
			ValaClass* _tmp41_;
			_tmp40_ = sym;
			_tmp41_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp40_, VALA_TYPE_CLASS, ValaClass));
			cl = _tmp41_;
			{
				ValaList* _base_type_list = NULL;
				ValaClass* _tmp42_;
				ValaList* _tmp43_;
				gint _base_type_size = 0;
				ValaList* _tmp44_;
				gint _tmp45_;
				gint _tmp46_;
				gint _base_type_index = 0;
				_tmp42_ = cl;
				_tmp43_ = vala_class_get_base_types (_tmp42_);
				_base_type_list = _tmp43_;
				_tmp44_ = _base_type_list;
				_tmp45_ = vala_collection_get_size ((ValaCollection*) _tmp44_);
				_tmp46_ = _tmp45_;
				_base_type_size = _tmp46_;
				_base_type_index = -1;
				while (TRUE) {
					gint _tmp47_;
					gint _tmp48_;
					gint _tmp49_;
					ValaDataType* base_type = NULL;
					ValaList* _tmp50_;
					gint _tmp51_;
					gpointer _tmp52_;
					ValaDataType* _tmp53_;
					ValaTypeSymbol* _tmp54_;
					ValaTypeSymbol* _tmp55_;
					const gchar* _tmp56_;
					gboolean _tmp57_;
					GList* _tmp58_;
					_tmp47_ = _base_type_index;
					_base_type_index = _tmp47_ + 1;
					_tmp48_ = _base_type_index;
					_tmp49_ = _base_type_size;
					if (!(_tmp48_ < _tmp49_)) {
						break;
					}
					_tmp50_ = _base_type_list;
					_tmp51_ = _base_type_index;
					_tmp52_ = vala_list_get (_tmp50_, _tmp51_);
					base_type = (ValaDataType*) _tmp52_;
					_tmp53_ = base_type;
					_tmp54_ = vala_data_type_get_data_type (_tmp53_);
					_tmp55_ = _tmp54_;
					_tmp56_ = name;
					_tmp57_ = prefix_match;
					_tmp58_ = vala_plugin_symbol_lookup_inherited (self, (ValaSymbol*) _tmp55_, _tmp56_, _tmp57_, FALSE);
					_result_ = g_list_concat (_result_, _tmp58_);
					_vala_code_node_unref0 (base_type);
				}
				_vala_iterable_unref0 (_base_type_list);
			}
			_vala_code_node_unref0 (cl);
		} else {
			ValaSymbol* _tmp59_;
			_tmp59_ = sym;
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp59_, VALA_TYPE_STRUCT)) {
				ValaStruct* st = NULL;
				ValaSymbol* _tmp60_;
				ValaStruct* _tmp61_;
				ValaStruct* _tmp62_;
				ValaDataType* _tmp63_;
				ValaDataType* _tmp64_;
				ValaTypeSymbol* _tmp65_;
				ValaTypeSymbol* _tmp66_;
				const gchar* _tmp67_;
				gboolean _tmp68_;
				GList* _tmp69_;
				_tmp60_ = sym;
				_tmp61_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp60_, VALA_TYPE_STRUCT, ValaStruct));
				st = _tmp61_;
				_tmp62_ = st;
				_tmp63_ = vala_struct_get_base_type (_tmp62_);
				_tmp64_ = _tmp63_;
				_tmp65_ = vala_data_type_get_data_type (_tmp64_);
				_tmp66_ = _tmp65_;
				_tmp67_ = name;
				_tmp68_ = prefix_match;
				_tmp69_ = vala_plugin_symbol_lookup_inherited (self, (ValaSymbol*) _tmp66_, _tmp67_, _tmp68_, FALSE);
				_result_ = g_list_concat (_result_, _tmp69_);
				_vala_code_node_unref0 (st);
			} else {
				ValaSymbol* _tmp70_;
				_tmp70_ = sym;
				if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp70_, VALA_TYPE_INTERFACE)) {
					ValaInterface* iface = NULL;
					ValaSymbol* _tmp71_;
					ValaInterface* _tmp72_;
					_tmp71_ = sym;
					_tmp72_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp71_, VALA_TYPE_INTERFACE, ValaInterface));
					iface = _tmp72_;
					{
						ValaList* _prerequisite_list = NULL;
						ValaInterface* _tmp73_;
						ValaList* _tmp74_;
						gint _prerequisite_size = 0;
						ValaList* _tmp75_;
						gint _tmp76_;
						gint _tmp77_;
						gint _prerequisite_index = 0;
						_tmp73_ = iface;
						_tmp74_ = vala_interface_get_prerequisites (_tmp73_);
						_prerequisite_list = _tmp74_;
						_tmp75_ = _prerequisite_list;
						_tmp76_ = vala_collection_get_size ((ValaCollection*) _tmp75_);
						_tmp77_ = _tmp76_;
						_prerequisite_size = _tmp77_;
						_prerequisite_index = -1;
						while (TRUE) {
							gint _tmp78_;
							gint _tmp79_;
							gint _tmp80_;
							ValaDataType* prerequisite = NULL;
							ValaList* _tmp81_;
							gint _tmp82_;
							gpointer _tmp83_;
							ValaDataType* _tmp84_;
							ValaTypeSymbol* _tmp85_;
							ValaTypeSymbol* _tmp86_;
							const gchar* _tmp87_;
							gboolean _tmp88_;
							GList* _tmp89_;
							_tmp78_ = _prerequisite_index;
							_prerequisite_index = _tmp78_ + 1;
							_tmp79_ = _prerequisite_index;
							_tmp80_ = _prerequisite_size;
							if (!(_tmp79_ < _tmp80_)) {
								break;
							}
							_tmp81_ = _prerequisite_list;
							_tmp82_ = _prerequisite_index;
							_tmp83_ = vala_list_get (_tmp81_, _tmp82_);
							prerequisite = (ValaDataType*) _tmp83_;
							_tmp84_ = prerequisite;
							_tmp85_ = vala_data_type_get_data_type (_tmp84_);
							_tmp86_ = _tmp85_;
							_tmp87_ = name;
							_tmp88_ = prefix_match;
							_tmp89_ = vala_plugin_symbol_lookup_inherited (self, (ValaSymbol*) _tmp86_, _tmp87_, _tmp88_, FALSE);
							_result_ = g_list_concat (_result_, _tmp89_);
							_vala_code_node_unref0 (prerequisite);
						}
						_vala_iterable_unref0 (_prerequisite_list);
					}
					_vala_code_node_unref0 (iface);
				} else {
					ValaSymbol* _tmp90_;
					_tmp90_ = sym;
					if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp90_, VALA_TYPE_LOCAL_VARIABLE)) {
						ValaLocalVariable* variable = NULL;
						ValaSymbol* _tmp91_;
						ValaLocalVariable* _tmp92_;
						ValaLocalVariable* _tmp93_;
						ValaDataType* _tmp94_;
						ValaDataType* _tmp95_;
						ValaTypeSymbol* _tmp96_;
						ValaTypeSymbol* _tmp97_;
						const gchar* _tmp98_;
						gboolean _tmp99_;
						GList* _tmp100_;
						_tmp91_ = sym;
						_tmp92_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp91_, VALA_TYPE_LOCAL_VARIABLE, ValaLocalVariable));
						variable = _tmp92_;
						_tmp93_ = variable;
						_tmp94_ = vala_variable_get_variable_type ((ValaVariable*) _tmp93_);
						_tmp95_ = _tmp94_;
						_tmp96_ = vala_data_type_get_data_type (_tmp95_);
						_tmp97_ = _tmp96_;
						_tmp98_ = name;
						_tmp99_ = prefix_match;
						_tmp100_ = vala_plugin_symbol_lookup_inherited (self, (ValaSymbol*) _tmp97_, _tmp98_, _tmp99_, FALSE);
						_result_ = g_list_concat (_result_, _tmp100_);
						_vala_code_node_unref0 (variable);
					} else {
						ValaSymbol* _tmp101_;
						_tmp101_ = sym;
						if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp101_, VALA_TYPE_FIELD)) {
							ValaField* field = NULL;
							ValaSymbol* _tmp102_;
							ValaField* _tmp103_;
							ValaField* _tmp104_;
							ValaDataType* _tmp105_;
							ValaDataType* _tmp106_;
							ValaTypeSymbol* _tmp107_;
							ValaTypeSymbol* _tmp108_;
							const gchar* _tmp109_;
							gboolean _tmp110_;
							GList* _tmp111_;
							_tmp102_ = sym;
							_tmp103_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp102_, VALA_TYPE_FIELD, ValaField));
							field = _tmp103_;
							_tmp104_ = field;
							_tmp105_ = vala_variable_get_variable_type ((ValaVariable*) _tmp104_);
							_tmp106_ = _tmp105_;
							_tmp107_ = vala_data_type_get_data_type (_tmp106_);
							_tmp108_ = _tmp107_;
							_tmp109_ = name;
							_tmp110_ = prefix_match;
							_tmp111_ = vala_plugin_symbol_lookup_inherited (self, (ValaSymbol*) _tmp108_, _tmp109_, _tmp110_, FALSE);
							_result_ = g_list_concat (_result_, _tmp111_);
							_vala_code_node_unref0 (field);
						} else {
							ValaSymbol* _tmp112_;
							_tmp112_ = sym;
							if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp112_, VALA_TYPE_PROPERTY)) {
								ValaProperty* prop = NULL;
								ValaSymbol* _tmp113_;
								ValaProperty* _tmp114_;
								ValaProperty* _tmp115_;
								ValaDataType* _tmp116_;
								ValaDataType* _tmp117_;
								ValaTypeSymbol* _tmp118_;
								ValaTypeSymbol* _tmp119_;
								const gchar* _tmp120_;
								gboolean _tmp121_;
								GList* _tmp122_;
								_tmp113_ = sym;
								_tmp114_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp113_, VALA_TYPE_PROPERTY, ValaProperty));
								prop = _tmp114_;
								_tmp115_ = prop;
								_tmp116_ = vala_property_get_property_type (_tmp115_);
								_tmp117_ = _tmp116_;
								_tmp118_ = vala_data_type_get_data_type (_tmp117_);
								_tmp119_ = _tmp118_;
								_tmp120_ = name;
								_tmp121_ = prefix_match;
								_tmp122_ = vala_plugin_symbol_lookup_inherited (self, (ValaSymbol*) _tmp119_, _tmp120_, _tmp121_, FALSE);
								_result_ = g_list_concat (_result_, _tmp122_);
								_vala_code_node_unref0 (prop);
							} else {
								ValaSymbol* _tmp123_;
								_tmp123_ = sym;
								if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp123_, VALA_TYPE_PARAMETER)) {
									ValaParameter* fp = NULL;
									ValaSymbol* _tmp124_;
									ValaParameter* _tmp125_;
									ValaParameter* _tmp126_;
									ValaDataType* _tmp127_;
									ValaDataType* _tmp128_;
									ValaTypeSymbol* _tmp129_;
									ValaTypeSymbol* _tmp130_;
									const gchar* _tmp131_;
									gboolean _tmp132_;
									GList* _tmp133_;
									_tmp124_ = sym;
									_tmp125_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp124_, VALA_TYPE_PARAMETER, ValaParameter));
									fp = _tmp125_;
									_tmp126_ = fp;
									_tmp127_ = vala_variable_get_variable_type ((ValaVariable*) _tmp126_);
									_tmp128_ = _tmp127_;
									_tmp129_ = vala_data_type_get_data_type (_tmp128_);
									_tmp130_ = _tmp129_;
									_tmp131_ = name;
									_tmp132_ = prefix_match;
									_tmp133_ = vala_plugin_symbol_lookup_inherited (self, (ValaSymbol*) _tmp130_, _tmp131_, _tmp132_, FALSE);
									_result_ = g_list_concat (_result_, _tmp133_);
									_vala_code_node_unref0 (fp);
								}
							}
						}
					}
				}
			}
		}
	}
	result = _result_;
	_vala_map_unref0 (symbol_table);
	return result;
}


static void vala_plugin_update_file (ValaPlugin* self, ValaSourceFile* file) {
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (file != NULL);
	{
		ValaCodeContext* _tmp0_;
		_tmp0_ = self->priv->context;
		g_rec_mutex_lock (&self->priv->__lock_context);
		{
			ValaArrayList* nodes = NULL;
			GEqualFunc _tmp1_;
			ValaArrayList* _tmp2_;
			ValaSourceFile* _tmp46_;
			GEqualFunc _tmp47_;
			ValaArrayList* _tmp48_;
			ValaArrayList* _tmp49_;
			ValaUsingDirective* ns_ref = NULL;
			ValaUnresolvedSymbol* _tmp50_;
			ValaUnresolvedSymbol* _tmp51_;
			ValaUsingDirective* _tmp52_;
			ValaUsingDirective* _tmp53_;
			ValaSourceFile* _tmp54_;
			ValaCodeContext* _tmp55_;
			ValaNamespace* _tmp56_;
			ValaNamespace* _tmp57_;
			AnjutaReport* _tmp58_;
			ValaSourceFile* _tmp59_;
			AnjutaReport* _tmp60_;
			IAnjutaEditor* _tmp61_;
			_tmp1_ = g_direct_equal;
			_tmp2_ = vala_array_list_new (VALA_TYPE_CODE_NODE, (GBoxedCopyFunc) vala_code_node_ref, (GDestroyNotify) vala_code_node_unref, _tmp1_);
			nodes = _tmp2_;
			{
				ValaList* _node_list = NULL;
				ValaSourceFile* _tmp3_;
				ValaList* _tmp4_;
				gint _node_size = 0;
				ValaList* _tmp5_;
				gint _tmp6_;
				gint _tmp7_;
				gint _node_index = 0;
				_tmp3_ = file;
				_tmp4_ = vala_source_file_get_nodes (_tmp3_);
				_node_list = _tmp4_;
				_tmp5_ = _node_list;
				_tmp6_ = vala_collection_get_size ((ValaCollection*) _tmp5_);
				_tmp7_ = _tmp6_;
				_node_size = _tmp7_;
				_node_index = -1;
				while (TRUE) {
					gint _tmp8_;
					gint _tmp9_;
					gint _tmp10_;
					ValaCodeNode* node = NULL;
					ValaList* _tmp11_;
					gint _tmp12_;
					gpointer _tmp13_;
					ValaArrayList* _tmp14_;
					ValaCodeNode* _tmp15_;
					_tmp8_ = _node_index;
					_node_index = _tmp8_ + 1;
					_tmp9_ = _node_index;
					_tmp10_ = _node_size;
					if (!(_tmp9_ < _tmp10_)) {
						break;
					}
					_tmp11_ = _node_list;
					_tmp12_ = _node_index;
					_tmp13_ = vala_list_get (_tmp11_, _tmp12_);
					node = (ValaCodeNode*) _tmp13_;
					_tmp14_ = nodes;
					_tmp15_ = node;
					vala_collection_add ((ValaCollection*) _tmp14_, _tmp15_);
					_vala_code_node_unref0 (node);
				}
				_vala_iterable_unref0 (_node_list);
			}
			{
				ValaArrayList* _node_list = NULL;
				ValaArrayList* _tmp16_;
				ValaArrayList* _tmp17_;
				gint _node_size = 0;
				ValaArrayList* _tmp18_;
				gint _tmp19_;
				gint _tmp20_;
				gint _node_index = 0;
				_tmp16_ = nodes;
				_tmp17_ = _vala_iterable_ref0 (_tmp16_);
				_node_list = _tmp17_;
				_tmp18_ = _node_list;
				_tmp19_ = vala_collection_get_size ((ValaCollection*) _tmp18_);
				_tmp20_ = _tmp19_;
				_node_size = _tmp20_;
				_node_index = -1;
				while (TRUE) {
					gint _tmp21_;
					gint _tmp22_;
					gint _tmp23_;
					ValaCodeNode* node = NULL;
					ValaArrayList* _tmp24_;
					gint _tmp25_;
					gpointer _tmp26_;
					ValaSourceFile* _tmp27_;
					ValaCodeNode* _tmp28_;
					ValaCodeNode* _tmp29_;
					_tmp21_ = _node_index;
					_node_index = _tmp21_ + 1;
					_tmp22_ = _node_index;
					_tmp23_ = _node_size;
					if (!(_tmp22_ < _tmp23_)) {
						break;
					}
					_tmp24_ = _node_list;
					_tmp25_ = _node_index;
					_tmp26_ = vala_list_get ((ValaList*) _tmp24_, _tmp25_);
					node = (ValaCodeNode*) _tmp26_;
					_tmp27_ = file;
					_tmp28_ = node;
					vala_source_file_remove_node (_tmp27_, _tmp28_);
					_tmp29_ = node;
					if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp29_, VALA_TYPE_SYMBOL)) {
						ValaSymbol* sym = NULL;
						ValaCodeNode* _tmp30_;
						ValaSymbol* _tmp31_;
						ValaSymbol* _tmp32_;
						ValaScope* _tmp33_;
						ValaScope* _tmp34_;
						ValaCodeContext* _tmp41_;
						ValaMethod* _tmp42_;
						ValaMethod* _tmp43_;
						ValaSymbol* _tmp44_;
						_tmp30_ = node;
						_tmp31_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp30_, VALA_TYPE_SYMBOL, ValaSymbol));
						sym = _tmp31_;
						_tmp32_ = sym;
						_tmp33_ = vala_symbol_get_owner (_tmp32_);
						_tmp34_ = _tmp33_;
						if (_tmp34_ != NULL) {
							ValaSymbol* _tmp35_;
							ValaScope* _tmp36_;
							ValaScope* _tmp37_;
							ValaSymbol* _tmp38_;
							const gchar* _tmp39_;
							const gchar* _tmp40_;
							_tmp35_ = sym;
							_tmp36_ = vala_symbol_get_owner (_tmp35_);
							_tmp37_ = _tmp36_;
							_tmp38_ = sym;
							_tmp39_ = vala_symbol_get_name (_tmp38_);
							_tmp40_ = _tmp39_;
							vala_scope_remove (_tmp37_, _tmp40_);
						}
						_tmp41_ = self->priv->context;
						_tmp42_ = vala_code_context_get_entry_point (_tmp41_);
						_tmp43_ = _tmp42_;
						_tmp44_ = sym;
						if (G_TYPE_CHECK_INSTANCE_CAST (_tmp43_, VALA_TYPE_SYMBOL, ValaSymbol) == _tmp44_) {
							ValaCodeContext* _tmp45_;
							_tmp45_ = self->priv->context;
							vala_code_context_set_entry_point (_tmp45_, NULL);
						}
						_vala_code_node_unref0 (sym);
					}
					_vala_code_node_unref0 (node);
				}
				_vala_iterable_unref0 (_node_list);
			}
			_tmp46_ = file;
			_tmp47_ = g_direct_equal;
			_tmp48_ = vala_array_list_new (VALA_TYPE_USING_DIRECTIVE, (GBoxedCopyFunc) vala_code_node_ref, (GDestroyNotify) vala_code_node_unref, _tmp47_);
			_tmp49_ = _tmp48_;
			vala_source_file_set_current_using_directives (_tmp46_, (ValaList*) _tmp49_);
			_vala_iterable_unref0 (_tmp49_);
			_tmp50_ = vala_unresolved_symbol_new (NULL, "GLib", NULL);
			_tmp51_ = _tmp50_;
			_tmp52_ = vala_using_directive_new ((ValaSymbol*) _tmp51_, NULL);
			_tmp53_ = _tmp52_;
			_vala_code_node_unref0 (_tmp51_);
			ns_ref = _tmp53_;
			_tmp54_ = file;
			vala_source_file_add_using_directive (_tmp54_, ns_ref);
			_tmp55_ = self->priv->context;
			_tmp56_ = vala_code_context_get_root (_tmp55_);
			_tmp57_ = _tmp56_;
			vala_namespace_add_using_directive (_tmp57_, ns_ref);
			_tmp58_ = self->priv->report;
			_tmp59_ = file;
			anjuta_report_clear_error_indicators (_tmp58_, _tmp59_);
			vala_plugin_parse (self);
			_tmp60_ = self->priv->report;
			_tmp61_ = self->current_editor;
			anjuta_report_update_errors (_tmp60_, _tmp61_);
			_vala_code_node_unref0 (ns_ref);
			_vala_iterable_unref0 (nodes);
		}
		__finally8:
		{
			ValaCodeContext* _tmp62_;
			_tmp62_ = self->priv->context;
			g_rec_mutex_unlock (&self->priv->__lock_context);
		}
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return;
		}
	}
}


static void vala_plugin_on_autocompletion_toggled (ValaPlugin* self, GtkToggleButton* button) {
	gboolean sensitive = FALSE;
	GtkToggleButton* _tmp0_;
	gboolean _tmp1_;
	GtkWidget* widget = NULL;
	GtkBuilder* _tmp2_;
	GObject* _tmp3_;
	GtkWidget* _tmp4_;
	GtkWidget* _tmp5_;
	GtkBuilder* _tmp6_;
	GObject* _tmp7_;
	GtkWidget* _tmp8_;
	GtkWidget* _tmp9_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (button != NULL);
	_tmp0_ = button;
	_tmp1_ = gtk_toggle_button_get_active (_tmp0_);
	sensitive = _tmp1_;
	_tmp2_ = vala_plugin_bxml;
	_tmp3_ = gtk_builder_get_object (_tmp2_, VALA_PLUGIN_PREF_WIDGET_SPACE);
	_tmp4_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, gtk_widget_get_type ()) ? ((GtkWidget*) _tmp3_) : NULL);
	widget = _tmp4_;
	_tmp5_ = widget;
	gtk_widget_set_sensitive (_tmp5_, sensitive);
	_tmp6_ = vala_plugin_bxml;
	_tmp7_ = gtk_builder_get_object (_tmp6_, VALA_PLUGIN_PREF_WIDGET_BRACE);
	_tmp8_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp7_, gtk_widget_get_type ()) ? ((GtkWidget*) _tmp7_) : NULL);
	_g_object_unref0 (widget);
	widget = _tmp8_;
	_tmp9_ = widget;
	gtk_widget_set_sensitive (_tmp9_, sensitive);
	_g_object_unref0 (widget);
}


static void _vala_plugin_on_autocompletion_toggled_gtk_toggle_button_toggled (GtkToggleButton* _sender, gpointer self) {
	vala_plugin_on_autocompletion_toggled ((ValaPlugin*) self, _sender);
}


static void vala_plugin_real_merge (IAnjutaPreferences* base, AnjutaPreferences* prefs, GError** error) {
	ValaPlugin * self;
	GtkBuilder* _tmp0_;
	AnjutaPreferences* _tmp5_;
	GtkBuilder* _tmp6_;
	GSettings* _tmp7_;
	GtkToggleButton* toggle = NULL;
	GtkBuilder* _tmp8_;
	GObject* _tmp9_;
	GtkToggleButton* _tmp10_;
	GError * _inner_error_ = NULL;
	self = (ValaPlugin*) base;
	g_return_if_fail (prefs != NULL);
	_tmp0_ = gtk_builder_new ();
	_g_object_unref0 (vala_plugin_bxml);
	vala_plugin_bxml = _tmp0_;
	{
		GtkBuilder* _tmp1_;
		const gchar* _tmp2_;
		_tmp1_ = vala_plugin_bxml;
		_tmp2_ = vala_plugin_PREFS_BUILDER;
		gtk_builder_add_from_file (_tmp1_, _tmp2_, &_inner_error_);
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			goto __catch9_g_error;
		}
	}
	goto __finally9;
	__catch9_g_error:
	{
		GError* err = NULL;
		GError* _tmp3_;
		const gchar* _tmp4_;
		err = _inner_error_;
		_inner_error_ = NULL;
		_tmp3_ = err;
		_tmp4_ = _tmp3_->message;
		g_warning ("plugin.vala:659: Couldn't load builder file: %s", _tmp4_);
		_g_error_free0 (err);
	}
	__finally9:
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		g_propagate_error (error, _inner_error_);
		return;
	}
	_tmp5_ = prefs;
	_tmp6_ = vala_plugin_bxml;
	_tmp7_ = self->settings;
	anjuta_preferences_add_from_builder (_tmp5_, _tmp6_, _tmp7_, "preferences", _ ("Auto-complete"), VALA_PLUGIN_ICON_FILE);
	_tmp8_ = vala_plugin_bxml;
	_tmp9_ = gtk_builder_get_object (_tmp8_, VALA_PLUGIN_PREF_WIDGET_AUTO);
	_tmp10_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp9_, gtk_toggle_button_get_type ()) ? ((GtkToggleButton*) _tmp9_) : NULL);
	toggle = _tmp10_;
	g_signal_connect_object (toggle, "toggled", (GCallback) _vala_plugin_on_autocompletion_toggled_gtk_toggle_button_toggled, self, 0);
	vala_plugin_on_autocompletion_toggled (self, toggle);
	_g_object_unref0 (toggle);
}


static void vala_plugin_real_unmerge (IAnjutaPreferences* base, AnjutaPreferences* prefs, GError** error) {
	ValaPlugin * self;
	AnjutaPreferences* _tmp0_;
	self = (ValaPlugin*) base;
	g_return_if_fail (prefs != NULL);
	_tmp0_ = prefs;
	anjuta_preferences_remove_page (_tmp0_, _ ("Auto-complete"));
}


static void vala_plugin_class_init (ValaPluginClass * klass) {
	gchar* _tmp0_;
	vala_plugin_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (ValaPluginPrivate));
	((AnjutaPluginClass *) klass)->activate = (gboolean (*) (AnjutaPlugin *)) vala_plugin_real_activate;
	((AnjutaPluginClass *) klass)->deactivate = (gboolean (*) (AnjutaPlugin *)) vala_plugin_real_deactivate;
	G_OBJECT_CLASS (klass)->finalize = vala_plugin_finalize;
	_tmp0_ = g_strdup (PACKAGE_DATA_DIR "/glade/anjuta-vala.ui");
	vala_plugin_PREFS_BUILDER = _tmp0_;
}


static void vala_plugin_ianjuta_preferences_interface_init (IAnjutaPreferencesIface * iface) {
	vala_plugin_ianjuta_preferences_parent_iface = g_type_interface_peek_parent (iface);
	iface->merge = (void (*) (IAnjutaPreferences *, AnjutaPreferences*, GError**)) vala_plugin_real_merge;
	iface->unmerge = (void (*) (IAnjutaPreferences *, AnjutaPreferences*, GError**)) vala_plugin_real_unmerge;
}


static void vala_plugin_instance_init (ValaPlugin * self) {
	GSettings* _tmp0_;
	BlockLocator* _tmp1_;
	GHashFunc _tmp2_;
	GEqualFunc _tmp3_;
	ValaHashSet* _tmp4_;
	self->priv = VALA_PLUGIN_GET_PRIVATE (self);
	_tmp0_ = g_settings_new ("org.gnome.anjuta.plugins.vala");
	self->settings = _tmp0_;
	g_rec_mutex_init (&self->priv->__lock_context);
	_tmp1_ = block_locator_new ();
	self->priv->locator = _tmp1_;
	_tmp2_ = g_str_hash;
	_tmp3_ = g_str_equal;
	_tmp4_ = vala_hash_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, _tmp2_, _tmp3_);
	self->priv->current_sources = (ValaSet*) _tmp4_;
}


static void vala_plugin_finalize (GObject * obj) {
	ValaPlugin * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_VALA_PLUGIN, ValaPlugin);
	_g_object_unref0 (self->settings);
	g_rec_mutex_clear (&self->priv->__lock_context);
	_vala_code_context_unref0 (self->priv->context);
	_g_object_unref0 (self->priv->cancel);
	_vala_code_visitor_unref0 (self->priv->locator);
	_vala_report_unref0 (self->priv->report);
	_g_object_unref0 (self->priv->provider);
	_vala_code_visitor_unref0 (self->priv->parser);
	_vala_code_visitor_unref0 (self->priv->genie_parser);
	_vala_iterable_unref0 (self->priv->current_sources);
	G_OBJECT_CLASS (vala_plugin_parent_class)->finalize (obj);
}


GType vala_plugin_get_type (void) {
	return vala_plugin_type_id;
}


GType vala_plugin_register_type (GTypeModule * module) {
	static const GTypeInfo g_define_type_info = { sizeof (ValaPluginClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_plugin_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaPlugin), 0, (GInstanceInitFunc) vala_plugin_instance_init, NULL };
	static const GInterfaceInfo ianjuta_preferences_info = { (GInterfaceInitFunc) vala_plugin_ianjuta_preferences_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	vala_plugin_type_id = g_type_module_register_type (module, anjuta_plugin_get_type (), "ValaPlugin", &g_define_type_info, 0);
	g_type_module_add_interface (module, vala_plugin_type_id, ianjuta_preferences_get_type (), &ianjuta_preferences_info);
	return vala_plugin_type_id;
}


GType anjuta_glue_register_components (GTypeModule* module) {
	GType result = 0UL;
	g_return_val_if_fail (module != NULL, 0UL);
	block_locator_register_type (module);
	vala_plugin_register_type (module);
	vala_provider_register_type (module);
	anjuta_report_register_type (module);
	result = TYPE_VALA_PLUGIN;
	return result;
}


static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	if ((array != NULL) && (destroy_func != NULL)) {
		int 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, gint array_length, GDestroyNotify destroy_func) {
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}


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



