[anjuta/newproject] Remove old IAnjutaProject interface functions



commit 4aad7ae733876ab022b3dbf1d3a11cdda7c5a7c9
Author: Sébastien Granjoux <seb sfo free fr>
Date:   Sat Sep 11 11:47:53 2010 +0200

    Remove old IAnjutaProject interface functions

 libanjuta/interfaces/libanjuta.idl |  246 ------------
 plugins/am-project/am-project.c    |  725 ------------------------------------
 plugins/am-project/projectparser.c |    5 +-
 plugins/dir-project/dir-project.c  |  179 ---------
 plugins/mk-project/mk-project.c    |  139 +------
 plugins/project-manager/project.c  |   40 ++-
 6 files changed, 54 insertions(+), 1280 deletions(-)
---
diff --git a/libanjuta/interfaces/libanjuta.idl b/libanjuta/interfaces/libanjuta.idl
index 06bd3f1..6e8fec3 100644
--- a/libanjuta/interfaces/libanjuta.idl
+++ b/libanjuta/interfaces/libanjuta.idl
@@ -3169,123 +3169,6 @@ interface IAnjutaProject
 	gboolean set_property (AnjutaProjectNode *parent, AnjutaProjectProperty* property, const gchar *value);
 
 	/**
-	 * ianjuta_project_new_root_node:
-	 * @obj: Self
-	 * @file: Project file or directory
-	 * @err: Error propagation and reporting
-	 *
-	 * Create a new node representing the project root.
-	 *
-	 * Return value: The newly created node, NULL if error
-	 */
-	AnjutaProjectNode *new_root_node (GFile *file);
-
-	/**
-	 * ianjuta_project_add_file:
-	 * @obj: Self
-	 * @parent: Parent node
-	 * @sibling: Sibling node or NULL
-	 * @type: Node type
-	 * @file: Node file or directory
-	 * @err: Error propagation and reporting
-	 *
-	 * Create a new node as a child of parent after sibling or as the last
-	 * child if sibling is NULL.
-	 *
-	 * Return value: The newly created node, NULL if error
-	 */
-	AnjutaProjectNode *add_file_node (AnjutaProjectNode *parent, AnjutaProjectNode *sibling, AnjutaProjectNodeType type, GFile *file);
-
-	/**
-	 * ianjuta_project_add_name:
-	 * @obj: Self
-	 * @parent: Parent node
-	 * @sibling: Sibling node or NULL
-	 * @type: Node type
-	 * @name: Node name
-	 * @err: Error propagation and reporting
-	 *
-	 * Create a new node as a child of parent after sibling or as the last
-	 * child if sibling is NULL.
-	 *
-	 * Return value: The newly created node, NULL if error
-	 */
-	AnjutaProjectNode *add_name_node (AnjutaProjectNode *parent, AnjutaProjectNode *sibling, AnjutaProjectNodeType type, const gchar *name);
-
-	/**
-	 * ianjuta_project_remove_node:
-	 * @obj: Self
-	 * @node: Node
-	 * @err: Error propagation and reporting
-	 *
-	 * Free a node and its children.
-	 *
-	 * Return value: TRUE if the node has been successfully removed
-	 * else FALSE
-	 */
-	gboolean remove_node (AnjutaProjectNode *node);
-
-	/**
-	 * ianjuta_project_set_boolean_property:
-	 * @obj: Self
-	 * @node: Node
-	 * @property: Property
-	 * @value: Property value
-	 * @err: Error propagation and reporting
-	 *
-	 * Set a property type of node to the corresponding value, overwrite
-	 * the existing value if it exists.
-	 *
-	 * Return value: The newly created property, NULL on error
-	 */
-	AnjutaProjectProperty *set_boolean_property (AnjutaProjectNode *node, AnjutaProjectProperty *property, gboolean value);
-
-	/**
-	 * ianjuta_project_set_string_property:
-	 * @obj: Self
-	 * @node: Parent node
-	 * @property: Property
-	 * @value: Property value
-	 * @err: Error propagation and reporting
-	 *
-	 * Set a property type of node to the corresponding value, overwrite
-	 * the existing value if it exists.
-	 *
-	 * Return value: The newly created property, NULL on error
-	 */
-	AnjutaProjectProperty *set_string_property (AnjutaProjectNode *node, AnjutaProjectProperty *property, const gchar *value);
-
-	/**
-	 * ianjuta_project_set_list_property:
-	 * @obj: Self
-	 * @node: Parent node
-	 * @type: Node type
-	 * @property: Property
-	 * @name: Property name
-	 * @value: Node name
-	 * @err: Error propagation and reporting
-	 *
-	 * Add a new value to the property type of node to the corresponding.
-	 *
-	 * Return value: The newly created property, NULL on error
-	 */
-	AnjutaProjectProperty *set_list_property (AnjutaProjectNode *node, AnjutaProjectProperty *property, const gchar *name, const gchar *value);
-
-	/**
-	 * ianjuta_project_remove_property:
-	 * @obj: Self
-	 * @node: Node
-	 * @property: Property
-	 * @err: Error propagation and reporting
-	 *
-	 * Remove a property from a node.
-	 *
-	 * Return value: TRUE if the property has been successfully removed
-	 * else FALSE
-	 */
-	gboolean remove_property (AnjutaProjectNode *node, AnjutaProjectProperty *property);
-
-	/**
 	 * ianjuta_project_get_node_info:
 	 * @obj: Self
 	 * @err: Error propagation and reporting
@@ -3296,135 +3179,6 @@ interface IAnjutaProject
 	 * else FALSE
 	 */
 	List<AnjutaProjectNodeInformation *> get_node_info();
-
-	/**
-	 * ianjuta_project_load:
-	 * @obj: Self
-	 * @file: Project directory
-	 * @err: Error propagation and reporting
-	 *
-	 * Load a project
-	 *
-	 * Return value: TRUE is loaded without errors
-	 */
-	gboolean load (GFile *file);
-
-	/**
-	 * ianjuta_project_refresh:
-	 * @obj: Self
-	 * @err: Error propagation and reporting
-	 *
-	 * Reload the current project
-	 *
-	 * Return value: TRUE is loaded without errors
-	 */
-	gboolean refresh ();
-
-	/**
-	* ianjuta_project_get_capabilities:
-	* @obj: Self
-	* @err: Error propagation and reporting.
-	*
-	* Returns the capabilites of project whether it can add group, target
-	* sources etc.
-	*
-	* Returns: Supported capabilites.
-	*/
-	guint get_capabilities ();
-
-	/**
-	 * ianjuta_project_get_target_types:
-	 * @obj: Self
-	 * @err: Error propagation and reporting.
-	 *
-	 * Returns: (element-type Anjuta.ProjectTargetInformation): the list of supported target types
-	 */
-	List<AnjutaProjectNodeType> get_target_types();
-	
-	/**
-	* ianjuta_project_configure:
-	* @obj: Self
-	* @err: Error propagation and reporting.
-	*
-	* Return a widget that can be use to set any options needed by the project
-	*
-	* Returns: A GtkWidget
-	*/
-	GtkWidget* configure ();
-	
-	/**
-	* ianjuta_project_get_root:
-	* @obj: Self
-	* @err: Error propagation and reporting.
-	*
-	* Get the root node of the project (always a group)
-	*
-	* Returns: The new group or NULL on error.
-	*/
-	AnjutaProjectNode* get_root ();
-
-	/**
-	 * ianjuta_project_get_packages:
-	 * @obj: Self
-	 * @err: Error propagation and reporting.
-	 *
-	 * Returns: (element-type utf8): the list of pkg-config packages that the current project
-	 * requires in it's configure.ac. Can be NULL if there is no project
-	 * opened currently or no package is required.
-	 */
-	List<gchar*> get_packages();
-	
-	/**
-	* ianjuta_project_add_group:
-	* @obj: Self
-	* @parent: parent group
-	* @name: new group name
-	* @err: Error propagation and reporting.
-	*
-	* Create a new group, parent can be NULL.
-	*
-	* Returns: The new group or NULL on error.
-	*/
-	AnjutaProjectNode* add_group (AnjutaProjectNode *parent, const gchar *name);
-
-	/**
-	* ianjuta_project_add_target:
-	* @obj: Self
-	* @parent: parent group
-	* @name: new target name
-	* @type: new target type
-	* @err: Error propagation and reporting.
-	*
-	* Create a new target, parent cannot be NULL
-	*
-	* Returns: The new target or NULL on error.
-	*/
-	AnjutaProjectNode* add_target (AnjutaProjectNode *parent, const gchar *name, AnjutaProjectNodeType type);
-
-	/**
-	* ianjuta_project_add_source:
-	* @obj: Self
-	* @parent: parent target
-	* @file: source file
-	* @err: Error propagation and reporting.
-	*
-	* Create a new source, parent cannot be NULL
-	*
-	* Returns: The new source or NULL on error.
-	*/
-	AnjutaProjectNode* add_source (AnjutaProjectNode *parent, GFile *file);
-
-	/**
-	* ianjuta_project_configure_node:
-	* @obj: Self
-	* @node: node to configure
-	* @err: Error propagation and reporting.
-	*
-	* Return a widget that can be use to set any options needed by this node
-	*
-	* Returns: A GtkWidget
-	*/
-	GtkWidget* configure_node (AnjutaProjectNode *node);
 }
 
 /**
diff --git a/plugins/am-project/am-project.c b/plugins/am-project/am-project.c
index 4d479f0..17d56d3 100644
--- a/plugins/am-project/am-project.c
+++ b/plugins/am-project/am-project.c
@@ -2887,233 +2887,6 @@ amp_project_get_token_location (AmpProject *project, AnjutaTokenFileLocation *lo
 	return FALSE;
 }
 
-AmpGroup*
-amp_project_add_sibling_group (AmpProject  *project,
-    	AmpGroup *parent,
-    	const gchar *name,
-    	gboolean after,
-    	AmpGroup *sibling,
-    	GError **error)
-{
-	AmpGroup *last;
-	AmpGroup *child;
-	GFile *directory;
-	GFile *makefile;
-	AnjutaToken *list;
-	gchar *basename;
-	gchar *uri;
-	AnjutaTokenFile* tfile;
-	
-	g_return_val_if_fail (name != NULL, NULL);
-	g_return_val_if_fail (parent != NULL, NULL);
-
-	/* Validate group name */
-	if (!name || strlen (name) <= 0)
-	{
-		error_set (error, IANJUTA_PROJECT_ERROR_VALIDATION_FAILED,
-			   _("Please specify group name"));
-		return NULL;
-	}
-	{
-		gboolean failed = FALSE;
-		const gchar *ptr = name;
-		while (*ptr) {
-			if (!isalnum (*ptr) && *ptr != '.' && *ptr != '-' &&
-			    *ptr != '_')
-				failed = TRUE;
-			ptr++;
-		}
-		if (failed) {
-			error_set (error, IANJUTA_PROJECT_ERROR_VALIDATION_FAILED,
-				   _("Group name can only contain alphanumeric, '_', '-' or '.' characters"));
-			return NULL;
-		}
-	}
-
-	/* Check that the new group doesn't already exist */
-	directory = g_file_get_child (AMP_GROUP_DATA (parent)->base.file, name);
-	uri = g_file_get_uri (directory);
-	if (g_hash_table_lookup (project->groups, uri) != NULL)
-	{
-		g_free (uri);
-		error_set (error, IANJUTA_PROJECT_ERROR_DOESNT_EXIST,
-			_("Group already exists"));
-		return NULL;
-	}
-
-	/* If a sibling is used, check that the parent is right */
-	if ((sibling != NULL) && (parent != anjuta_project_node_parent (sibling)))
-	{
-		g_free (uri);
-		error_set (error, IANJUTA_PROJECT_ERROR_VALIDATION_FAILED,
-			_("Sibling group has not the same parent"));
-		return NULL;
-	}
-	
-	/* Add group node in project tree */
-	child = amp_group_new (directory, FALSE, NULL);
-	g_hash_table_insert (project->groups, uri, child);
-	g_object_unref (directory);
-	if (after)
-	{
-		anjuta_project_node_insert_after (parent, sibling, child);
-	}
-	else
-	{
-		anjuta_project_node_insert_before (parent, sibling, child);
-	}
-
-	/* Create directory */
-	g_file_make_directory (directory, NULL, NULL);
-
-	/* Create Makefile.am */
-	basename = AMP_GROUP_DATA (parent)->makefile != NULL ? g_file_get_basename (AMP_GROUP_DATA (parent)->makefile) : NULL;
-	if (basename != NULL)
-	{
-		makefile = g_file_get_child (directory, basename);
-		g_free (basename);
-	}
-	else
-	{
-		makefile = g_file_get_child (directory, "Makefile.am");
-	}
-	g_file_replace_contents (makefile, "", 0, NULL, FALSE, G_FILE_CREATE_NONE, NULL, NULL, NULL);
-	tfile = amp_group_set_makefile (child, makefile, project);
-	g_hash_table_insert (project->files, makefile, tfile);
-	g_object_add_toggle_ref (G_OBJECT (tfile), remove_config_file, project);
-
-	if (sibling == NULL)
-	{
-		/* Find a sibling before */
-		for (last = anjuta_project_node_prev_sibling (child); (last != NULL) && (anjuta_project_node_get_type (last) != ANJUTA_PROJECT_GROUP); last = anjuta_project_node_prev_sibling (last));
-		if (last != NULL)
-		{
-			sibling = last;
-			after = TRUE;
-		}
-		else
-		{
-			/* Find a sibling after */
-			for (last = anjuta_project_node_next_sibling (child); (last != NULL) && (anjuta_project_node_get_type (last) != ANJUTA_PROJECT_GROUP); last = anjuta_project_node_next_sibling (last));
-			if (last != NULL)
-			{
-				sibling = last;
-				after = FALSE;
-			}
-		}
-	}
-	
-	/* Add in configure */
-	list = NULL;
-	if (sibling) list = amp_group_get_first_token (sibling, AM_GROUP_TOKEN_CONFIGURE);
-	if (list == NULL) list= amp_group_get_first_token (parent, AM_GROUP_TOKEN_CONFIGURE);
-	if (list != NULL) list = anjuta_token_list (list);
-	if (list == NULL)
-	{
-		list = amp_project_write_config_list (project);
-		list = anjuta_token_next (list);
-	}
-	if (list != NULL)
-	{
-		gchar *relative_make;
-		gchar *ext;
-		AnjutaToken *prev = NULL;
-
-		if (sibling)
-		{
-			prev = amp_group_get_first_token (sibling, AM_GROUP_TOKEN_CONFIGURE);
-			/*if ((prev != NULL) && after)
-			{
-				prev = anjuta_token_next_word (prev);
-			}*/
-		}
-		//prev_token = (AnjutaToken *)token_list->data;
-
-		relative_make = g_file_get_relative_path (project->root_file, makefile);
-		ext = relative_make + strlen (relative_make) - 3;
-		if (strcmp (ext, ".am") == 0)
-		{
-			*ext = '\0';
-		}
-		//token = anjuta_token_new_string (ANJUTA_TOKEN_NAME | ANJUTA_TOKEN_ADDED,  relative_make);
-		amp_project_write_config_file (project, list, after, prev, relative_make);
-		g_free (relative_make);
-		
-		//style = anjuta_token_style_new (NULL," ","\n",NULL,0);
-		//anjuta_token_add_word (prev_token, token, style);
-		//anjuta_token_style_free (style);
-	}
-	
-	/* Add in Makefile.am */
-	if (sibling == NULL)
-	{
-		AnjutaToken *pos;
-		static gint eol_type[] = {ANJUTA_TOKEN_EOL, ANJUTA_TOKEN_SPACE, ANJUTA_TOKEN_COMMENT, 0};
-	
-		pos = anjuta_token_find_type (AMP_GROUP_DATA (parent)->make_token, ANJUTA_TOKEN_SEARCH_NOT, eol_type);
-		if (pos == NULL)
-		{
-			pos = anjuta_token_prepend_child (AMP_GROUP_DATA (parent)->make_token, anjuta_token_new_static (ANJUTA_TOKEN_SPACE, "\n"));
-		}
-
-		list = anjuta_token_insert_token_list (FALSE, pos,
-		    	ANJUTA_TOKEN_SPACE, "\n");
-		list = anjuta_token_insert_token_list (FALSE, list,
-	    		AM_TOKEN_SUBDIRS, "SUBDIRS",
-		    	ANJUTA_TOKEN_SPACE, " ",
-		    	ANJUTA_TOKEN_OPERATOR, "=",
-	    		ANJUTA_TOKEN_LIST, NULL,
-	    		ANJUTA_TOKEN_LAST, NULL,
-	    		NULL);
-		list = anjuta_token_next (anjuta_token_next ( anjuta_token_next (list)));
-	}
-	else
-	{
-		AnjutaToken *prev;
-		
-		prev = amp_group_get_first_token (sibling, AM_GROUP_TOKEN_SUBDIRS);
-		list = anjuta_token_list (prev);
-	}
-
-	if (list != NULL)
-	{
-		AnjutaToken *token;
-		AnjutaToken *prev;
-
-		if (sibling)
-		{
-			prev = amp_group_get_first_token (sibling, AM_GROUP_TOKEN_SUBDIRS);
-		}		
-		
-		token = anjuta_token_new_string (ANJUTA_TOKEN_NAME | ANJUTA_TOKEN_ADDED, name);
-		if (after)
-		{
-			anjuta_token_insert_word_after (list, prev, token);
-		}
-		else
-		{
-			anjuta_token_insert_word_before (list, prev, token);
-		}
-	
-		anjuta_token_style_format (project->am_space_list, list);
-		anjuta_token_file_update (AMP_GROUP_DATA (parent)->tfile, token);
-		
-		amp_group_add_token (child, token, AM_GROUP_TOKEN_SUBDIRS);
-	}
-
-	return child;
-}
-
-
-AmpGroup* 
-amp_project_add_group (AmpProject  *project,
-		AmpGroup *parent,
-		const gchar *name,
-		GError     **error)
-{
-	return amp_project_add_sibling_group (project, parent, name, TRUE, NULL, error);
-}
-
 void 
 amp_project_remove_group (AmpProject  *project,
 		   AmpGroup *group,
@@ -3139,190 +2912,6 @@ amp_project_remove_group (AmpProject  *project,
 	amp_group_free (group);
 }
 
-AmpTarget* 
-amp_project_add_sibling_target (AmpProject  *project, AmpGroup *parent, const gchar *name, AnjutaProjectNodeType type, gboolean after, AmpTarget *sibling, GError **error)
-{
-	AmpTarget *child;
-	AnjutaToken* token;
-	AnjutaToken *args;
-	AnjutaToken *var;
-	AnjutaToken *prev;
-	AmpNodeInfo *info;
-	gchar *targetname;
-	gchar *find;
-	GList *last;
-	
-	g_return_val_if_fail (name != NULL, NULL);
-	g_return_val_if_fail (parent != NULL, NULL);
-
-	info = (AmpNodeInfo *)amp_project_get_type_info (project, type);
-	
-	/* Validate target name */
-	if (!name || strlen (name) <= 0)
-	{
-		error_set (error, IANJUTA_PROJECT_ERROR_VALIDATION_FAILED,
-			   _("Please specify target name"));
-		return NULL;
-	}
-	{
-		gboolean failed = FALSE;
-		const gchar *ptr = name;
-		while (*ptr) {
-			if (!isalnum (*ptr) && *ptr != '.' && *ptr != '-' &&
-			    *ptr != '_')
-				failed = TRUE;
-			ptr++;
-		}
-		if (failed) {
-			error_set (error, IANJUTA_PROJECT_ERROR_VALIDATION_FAILED,
-				   _("Target name can only contain alphanumeric, '_', '-' or '.' characters"));
-			return NULL;
-		}
-	}
-	if ((type & ANJUTA_PROJECT_ID_MASK) == ANJUTA_PROJECT_SHAREDLIB) {
-		if (strlen (name) < 7 ||
-		    strncmp (name, "lib", strlen("lib")) != 0 ||
-		    strcmp (&name[strlen(name) - 3], ".la") != 0) {
-			error_set (error, IANJUTA_PROJECT_ERROR_VALIDATION_FAILED,
-				   _("Shared library target name must be of the form 'libxxx.la'"));
-			return NULL;
-		}
-	}
-	else if ((type & ANJUTA_PROJECT_ID_MASK) == ANJUTA_PROJECT_STATICLIB) {
-		if (strlen (name) < 6 ||
-		    strncmp (name, "lib", strlen("lib")) != 0 ||
-		    strcmp (&name[strlen(name) - 2], ".a") != 0) {
-			error_set (error, IANJUTA_PROJECT_ERROR_VALIDATION_FAILED,
-				   _("Static library target name must be of the form 'libxxx.a'"));
-			return NULL;
-		}
-	}
-
-	/* If a sibling is used, check that the parent is right */
-	if ((sibling != NULL) && (parent != anjuta_project_node_parent (sibling)))
-	{
-		error_set (error, IANJUTA_PROJECT_ERROR_VALIDATION_FAILED,
-			_("Sibling target has not the same parent"));
-		return NULL;
-	}
-	
-	/* Check that the new target doesn't already exist */
-	find = (gchar *)name;
-	anjuta_project_node_children_foreach (parent, find_target, &find);
-	if ((gchar *)find != name)
-	{
-		error_set (error, IANJUTA_PROJECT_ERROR_DOESNT_EXIST,
-			_("Target already exists"));
-
-		return NULL;
-	}
-	
-	/* Add target node in project tree */
-	child = amp_target_new (name, type, "", 0, NULL);
-	if (after)
-	{
-		anjuta_project_node_insert_after (parent, sibling, child);
-	}
-	else
-	{
-		anjuta_project_node_insert_before (parent, sibling, child);
-	}
-	//anjuta_project_node_append (parent, child);
-
-	/* Add in Makefile.am */
-	targetname = g_strconcat (info->install, info->prefix, NULL);
-
-	// Get token corresponding to sibling and check if the target are compatible
-	args = NULL;
-	var = NULL;
-	if (sibling != NULL)
-	{
-		last = amp_target_get_token (sibling);
-
-		if (last != NULL) 
-		{
-			AnjutaToken *token = (AnjutaToken *)last->data;
-
-			token = anjuta_token_list (token);
-			if (token != NULL)
-			{
-				token = anjuta_token_list (token);
-				var = token;
-				if (token != NULL)
-				{
-					token = anjuta_token_first_item (token);
-					if (token != NULL)
-					{
-						gchar *value;
-						
-						value = anjuta_token_evaluate (token);
-		
-						if ((value != NULL) && (strcmp (targetname, value) == 0))
-						{
-							g_free (value);
-							prev = (AnjutaToken *)last->data;
-							args = anjuta_token_last_item (anjuta_token_list (prev));
-						}
-					}
-				}
-			}	
-		}
-	}
-
-	if (args == NULL)
-	{
-		for (last = amp_group_get_token (parent, AM_GROUP_TARGET); last != NULL; last = g_list_next (last))
-		{
-			gchar *value = anjuta_token_evaluate ((AnjutaToken *)last->data);
-		
-			if ((value != NULL) && (strcmp (targetname, value) == 0))
-			{
-				g_free (value);
-				args = anjuta_token_last_item (anjuta_token_list ((AnjutaToken *)last->data));
-				break;
-			}
-			g_free (value);
-		}
-	}
-
-
-	if (args == NULL)
-	{
-		args = amp_project_write_target (AMP_GROUP_DATA (parent)->make_token, info->token, targetname, after, var);
-	}
-	g_free (targetname);
-	
-	if (args != NULL)
-	{
-		token = anjuta_token_new_string (ANJUTA_TOKEN_NAME | ANJUTA_TOKEN_ADDED, name);
-		if (after)
-		{
-			anjuta_token_insert_word_after (args, prev, token);
-		}
-		else
-		{
-			anjuta_token_insert_word_before (args, prev, token);
-		}
-	
-		anjuta_token_style_format (project->am_space_list, args);
-		anjuta_token_file_update (AMP_GROUP_DATA (parent)->tfile, token);
-		
-		amp_target_add_token (child, token);
-	}
-
-	return child;
-}
-
-AmpTarget*
-amp_project_add_target (AmpProject  *project,
-		 AmpGroup *parent,
-		 const gchar *name,
-		 AnjutaProjectNodeType type,
-		 GError     **error)
-{
-	return amp_project_add_sibling_target (project, parent, name, type, TRUE, NULL, error);
-}
-
 void 
 amp_project_remove_target (AmpProject  *project,
 		    AmpTarget *target,
@@ -3340,106 +2929,6 @@ amp_project_remove_target (AmpProject  *project,
 	amp_target_free (target);
 }
 
-AmpSource* 
-amp_project_add_sibling_source (AmpProject  *project, AmpTarget *target, GFile *file, gboolean after, AmpSource *sibling, GError **error)
-{
-	AmpGroup *group;
-	AmpSource *source;
-	AnjutaToken *token;
-	AnjutaToken *prev;
-	AnjutaToken *args;
-	gchar *relative_name;
-	
-	g_return_val_if_fail (file != NULL, NULL);
-	g_return_val_if_fail (target != NULL, NULL);
-
-	if (anjuta_project_node_get_type (target) != ANJUTA_PROJECT_TARGET) return NULL;
-	
-	group = (AmpGroup *)(target->parent);
-	relative_name = g_file_get_relative_path (AMP_GROUP_DATA (group)->base.file, file);
-
-	/* Add in Makefile.am */
-
-	// Get token corresponding to sibling and check if the target are compatible
-	prev = NULL;
-	args = NULL;
-	if (sibling != NULL)
-	{
-		prev = AMP_SOURCE_DATA (sibling)->token;
-		args = anjuta_token_list (prev);
-	}
-
-	if (args == NULL)
-	{
-		gchar *target_var;
-		gchar *canon_name;
-		AnjutaToken *var;
-		GList *list;
-		
-		canon_name = canonicalize_automake_variable (AMP_TARGET_DATA (target)->base.name);
-		target_var = g_strconcat (canon_name,  "_SOURCES", NULL);
-
-		/* Search where the target is declared */
-		var = NULL;
-		list = amp_target_get_token (target);
-		if (list != NULL)
-		{
-			var = (AnjutaToken *)list->data;
-			if (var != NULL)
-			{
-				var = anjuta_token_list (var);
-				if (var != NULL)
-				{
-					var = anjuta_token_list (var);
-				}
-			}
-		}
-		
-		args = amp_project_write_source_list (AMP_GROUP_DATA (group)->make_token, target_var, after, var);
-		g_free (target_var);
-	}
-	
-	if (args != NULL)
-	{
-		token = anjuta_token_new_string (ANJUTA_TOKEN_NAME | ANJUTA_TOKEN_ADDED, relative_name);
-		if (after)
-		{
-			anjuta_token_insert_word_after (args, prev, token);
-		}
-		else
-		{
-			anjuta_token_insert_word_before (args, prev, token);
-		}
-	
-		anjuta_token_style_format (project->am_space_list, args);
-		anjuta_token_file_update (AMP_GROUP_DATA (group)->tfile, token);
-	}
-
-	/* Add source node in project tree */
-	source = project_node_new (project, ANJUTA_PROJECT_SOURCE | ANJUTA_PROJECT_PROJECT, file, NULL, NULL);
-;
-	AMP_SOURCE_DATA(source)->token = token;
-	if (after)
-	{
-		anjuta_project_node_insert_after (target, sibling, source);
-	}
-	else
-	{
-		anjuta_project_node_insert_before (target, sibling, source);
-	}
-
-	return source;
-}
-
-AmpSource* 
-amp_project_add_source (AmpProject  *project,
-		 AmpTarget *target,
-		 GFile *file,
-		 GError     **error)
-{
-	return amp_project_add_sibling_source (project, target, file, TRUE, NULL, error);
-}
-
 void 
 amp_project_remove_source (AmpProject  *project,
 		    AmpSource *source,
@@ -3454,59 +2943,6 @@ amp_project_remove_source (AmpProject  *project,
 }
 
 GList *
-amp_project_get_config_modules   (AmpProject *project, GError **error)
-{
-	AmpModule *module;
-	GList *modules = NULL;
-
-	g_return_val_if_fail (project != NULL, NULL);
-	
-	for (module = anjuta_project_node_first_child (project->root_node); module != NULL; module = anjuta_project_node_next_sibling (module))
-	{
-		if (anjuta_project_node_get_type(module) == ANJUTA_PROJECT_MODULE)
-		{
-				modules = g_list_prepend (modules, anjuta_project_node_get_name (module));
-		}
-	}
-	modules = g_list_reverse (modules);
-
-	return modules;
-}
-
-GList *
-amp_project_get_config_packages  (AmpProject *project,
-			   const gchar* module_name,
-			   GError **error)
-{
-	AmpModule *module;
-	GList *packages = NULL;
-
-	g_return_val_if_fail (project != NULL, NULL);
-
-	
-	for (module = anjuta_project_node_first_child (project->root_node); module != NULL; module = anjuta_project_node_next_sibling (module))
-	{
-		gchar *name = anjuta_project_node_get_name (module);
-
-		if ((anjuta_project_node_get_type(module) == ANJUTA_PROJECT_MODULE) && (strcmp (name, module_name) == 0))
-		{
-			AmpPackage *package;
-
-			for (package = anjuta_project_node_first_child (module); package != NULL; package = anjuta_project_node_next_sibling (package))
-			{
-				if (anjuta_project_node_get_type (package) == ANJUTA_PROJECT_PACKAGE)
-				{
-					packages = g_list_prepend (packages, anjuta_project_node_get_name (package));
-				}
-			}
-		}
-	}
-	packages = g_list_reverse (packages);
-
-	return packages;
-}
-
-GList *
 amp_project_get_node_info (AmpProject *project, GError **error)
 {
 	static GList *info_list = NULL;
@@ -3849,95 +3285,6 @@ amp_project_set_property (AmpProject *project, AmpPropertyType type, const gchar
 /* Implement IAnjutaProject
  *---------------------------------------------------------------------------*/
 
-static AnjutaProjectNode* 
-iproject_add_group (IAnjutaProject *obj, AnjutaProjectNode *parent,  const gchar *name, GError **err)
-{
-	return amp_project_add_group (AMP_PROJECT (obj), AMP_GROUP (parent), name, err);
-}
-
-static AnjutaProjectNode* 
-iproject_add_source (IAnjutaProject *obj, AnjutaProjectNode *parent,  GFile *file, GError **err)
-{
-	return amp_project_add_source (AMP_PROJECT (obj), AMP_TARGET (parent), file, err);
-}
-
-static AnjutaProjectNode* 
-iproject_add_target (IAnjutaProject *obj, AnjutaProjectNode *parent,  const gchar *name,  AnjutaProjectNodeType type, GError **err)
-{
-	return amp_project_add_target (AMP_PROJECT (obj), AMP_GROUP (parent), name, type, err);
-}
-
-static GtkWidget* 
-iproject_configure (IAnjutaProject *obj, GError **err)
-{
-	return NULL;
-}
-
-static guint 
-iproject_get_capabilities (IAnjutaProject *obj, GError **err)
-{
-	return 0;
-}
-
-static GList* 
-iproject_get_packages (IAnjutaProject *obj, GError **err)
-{
-	GList *modules;
-	GList *packages;
-	GList* node;
-	GHashTable *all = g_hash_table_new (g_str_hash, g_str_equal);
-	
-	modules = amp_project_get_config_modules (AMP_PROJECT (obj), NULL);
-	for (node = modules; node != NULL; node = g_list_next (node))
-	{
-		GList *pack;
-		
-		packages = amp_project_get_config_packages (AMP_PROJECT (obj), (const gchar *)node->data, NULL);
-		for (pack = packages; pack != NULL; pack = g_list_next (pack))
-		{
-			g_hash_table_replace (all, pack->data, NULL);
-		}
-	    g_list_free (packages);
-	}
-    g_list_free (modules);
-
-	packages = g_hash_table_get_keys (all);
-	g_hash_table_destroy (all);
-	
-	return packages;
-}
-
-static AnjutaProjectNode* 
-iproject_get_root (IAnjutaProject *obj, GError **err)
-{
-	return amp_project_get_root (AMP_PROJECT (obj));
-}
-
-static GList* 
-iproject_get_target_types (IAnjutaProject *obj, GError **err)
-{
-	return amp_project_get_node_info (AMP_PROJECT (obj), err);
-}
-
-static gboolean
-iproject_load (IAnjutaProject *obj, GFile *file, GError **err)
-{
-	return amp_project_load (AMP_PROJECT (obj), file, err);
-}
-
-static gboolean
-iproject_refresh (IAnjutaProject *obj, GError **err)
-{
-	//return amp_project_reload (AMP_PROJECT (obj), err);
-	return TRUE;
-}
-
-static GtkWidget*
-iproject_configure_node (IAnjutaProject *obj, AnjutaProjectNode *node, GError **err)
-{
-	return NULL;
-}
-
 static AnjutaProjectNode *
 iproject_load_node (IAnjutaProject *obj, AnjutaProjectNode *node, GError **err)
 {
@@ -4021,59 +3368,6 @@ iproject_free_node (IAnjutaProject *obj, AnjutaProjectNode *node, GError **err)
 	project_node_destroy (AMP_PROJECT (obj), node);
 }
 
-static AnjutaProjectNode *
-iproject_new_root_node (IAnjutaProject *obj, GFile *file, GError **err)
-{
-	return project_node_new (AMP_PROJECT (obj), ANJUTA_PROJECT_ROOT, file, NULL, err);
-}
-
-static AnjutaProjectNode *
-iproject_add_file_node (IAnjutaProject *obj, AnjutaProjectNode *parent, AnjutaProjectNode *sibling, AnjutaProjectNodeType type, GFile *file, GError **err)
-{
-	return NULL;
-}
-
-static AnjutaProjectNode *
-iproject_add_name_node (IAnjutaProject *obj, AnjutaProjectNode *parent, AnjutaProjectNode *sibling, AnjutaProjectNodeType type, const gchar *name, GError **err)
-{
-	return NULL;
-}
-
-static gboolean
-iproject_remove_node (IAnjutaProject *obj, AnjutaProjectNode *node, GError **err)
-{
-	return project_node_destroy (AMP_PROJECT (obj), node);
-}
-
-static AnjutaProjectProperty *
-iproject_set_boolean_property (IAnjutaProject *project, AnjutaProjectNode *node, AnjutaProjectProperty *property, gboolean value, GError **err )
-{
-	return NULL;
-}
-
-static AnjutaProjectProperty *
-iproject_set_string_property (IAnjutaProject *project, AnjutaProjectNode *node, AnjutaProjectProperty *property, const gchar *value, GError **err )
-{
-	AnjutaProjectProperty *new_prop;
-	
-	new_prop = amp_node_property_set (node, property, value);
-	amp_project_update_property (AMP_PROJECT (project), new_prop);
-
-	return new_prop;
-}
-
-static AnjutaProjectProperty *
-iproject_set_list_property (IAnjutaProject *project, AnjutaProjectNode *node, AnjutaProjectProperty *property, const gchar *name, const gchar *value, GError **err )
-{
-	return NULL;
-}
-
-static gboolean
-iproject_remove_property (IAnjutaProject *project, AnjutaProjectNode *node, AnjutaProjectProperty *property, GError **err)
-{
-	return FALSE;
-}
-
 static GList* 
 iproject_get_node_info (IAnjutaProject *obj, GError **err)
 {
@@ -4083,30 +3377,11 @@ iproject_get_node_info (IAnjutaProject *obj, GError **err)
 static void
 iproject_iface_init(IAnjutaProjectIface* iface)
 {
-	iface->add_group = iproject_add_group;
-	iface->add_source = iproject_add_source;
-	iface->add_target = iproject_add_target;
-	iface->configure = iproject_configure;
-	iface->get_capabilities = iproject_get_capabilities;
-	iface->get_packages = iproject_get_packages;
-	iface->get_root = iproject_get_root;
-	iface->get_target_types = iproject_get_target_types;
-	iface->load = iproject_load;
-	iface->refresh = iproject_refresh;
-	iface->configure_node = iproject_configure_node;
 	iface->load_node = iproject_load_node;
 	iface->save_node = iproject_save_node;
 	iface->set_property = iproject_set_property;
 	iface->new_node = iproject_new_node;
 	iface->free_node = iproject_free_node;
-	iface->new_root_node = iproject_new_root_node;
-	iface->add_file_node = iproject_add_file_node;
-	iface->add_name_node = iproject_add_name_node;
-	iface->remove_node = iproject_remove_node;
-	iface->set_boolean_property = iproject_set_boolean_property;
-	iface->set_string_property = iproject_set_string_property;
-	iface->set_list_property = iproject_set_list_property;
-	iface->remove_property = iproject_remove_property;
 	iface->get_node_info = iproject_get_node_info;
 }
 
diff --git a/plugins/am-project/projectparser.c b/plugins/am-project/projectparser.c
index 636df15..c0b95dd 100644
--- a/plugins/am-project/projectparser.c
+++ b/plugins/am-project/projectparser.c
@@ -563,7 +563,8 @@ main(int argc, char *argv[])
 		else if (g_ascii_strcasecmp (*command, "remove") == 0)
 		{
 			node = get_node (project, root, *(++command));
-			ianjuta_project_remove_node (project, node, NULL);
+			anjuta_project_node_set_state (node, ANJUTA_PROJECT_REMOVED);
+			ianjuta_project_save_node (project, child, NULL);
 		}
 		else if (g_ascii_strcasecmp (command[0], "add") == 0)
 		{
@@ -665,7 +666,7 @@ main(int argc, char *argv[])
 				item = get_project_property (project, root, command[1]);
 				if (item != NULL)
 				{
-					ianjuta_project_set_string_property (project, root, item, command[2], NULL);
+					ianjuta_project_set_property (project, root, item, command[2], NULL);
 				}
 			}
 			command += 2;
diff --git a/plugins/dir-project/dir-project.c b/plugins/dir-project/dir-project.c
index 252ffd5..d0070ca 100644
--- a/plugins/dir-project/dir-project.c
+++ b/plugins/dir-project/dir-project.c
@@ -867,34 +867,6 @@ dir_project_probe (GFile *file,
 	return probe ? IANJUTA_PROJECT_PROBE_FILES : 0;
 }
 
-static DirGroup* 
-dir_project_add_group (DirProject  *project,
-		DirGroup *parent,
-		const gchar *name,
-		GError     **error)
-{
-	return NULL;
-}
-
-static DirTarget*
-dir_project_add_target (DirProject  *project,
-		 DirGroup *parent,
-		 const gchar *name,
-		 AnjutaProjectNodeType type,
-		 GError     **error)
-{
-	return NULL;
-}
-
-static DirSource* 
-dir_project_add_source (DirProject  *project,
-		 DirTarget *target,
-		 GFile *file,
-		 GError     **error)
-{
-	return NULL;
-}
-
 static GList *
 dir_project_get_node_info (DirProject *project, GError **error)
 {
@@ -945,66 +917,6 @@ dir_project_new (void)
 /* Implement IAnjutaProject
  *---------------------------------------------------------------------------*/
 
-static AnjutaProjectNode* 
-iproject_add_group (IAnjutaProject *obj, AnjutaProjectNode *parent,  const gchar *name, GError **err)
-{
-	return dir_project_add_group (DIR_PROJECT (obj), parent, name, err);
-}
-
-static AnjutaProjectNode* 
-iproject_add_source (IAnjutaProject *obj, AnjutaProjectNode *parent,  GFile *file, GError **err)
-{
-	return dir_project_add_source (DIR_PROJECT (obj), parent, file, err);
-}
-
-static AnjutaProjectNode* 
-iproject_add_target (IAnjutaProject *obj, AnjutaProjectNode *parent,  const gchar *name,  AnjutaProjectNodeType type, GError **err)
-{
-	return dir_project_add_target (DIR_PROJECT (obj), parent, name, type, err);
-}
-
-static GtkWidget* 
-iproject_configure (IAnjutaProject *obj, GError **err)
-{
-	return NULL;
-}
-
-static guint 
-iproject_get_capabilities (IAnjutaProject *obj, GError **err)
-{
-	return 0;
-}
-
-static GList* 
-iproject_get_packages (IAnjutaProject *obj, GError **err)
-{
-	return NULL;
-}
-
-static AnjutaProjectNode* 
-iproject_get_root (IAnjutaProject *obj, GError **err)
-{
-	return dir_project_get_root (DIR_PROJECT (obj));
-}
-
-static GList* 
-iproject_get_target_types (IAnjutaProject *obj, GError **err)
-{
-	return dir_project_get_node_info (DIR_PROJECT (obj), err);
-}
-
-static gboolean
-iproject_load (IAnjutaProject *obj, GFile *file, GError **err)
-{
-	return dir_project_load (DIR_PROJECT (obj), file, err);
-}
-
-static gboolean
-iproject_refresh (IAnjutaProject *obj, GError **err)
-{
-	return FALSE; //dir_project_reload (DIR_PROJECT (obj), err);
-}
-
 static AnjutaProjectNode *
 iproject_load_node (IAnjutaProject *obj, AnjutaProjectNode *node, GError **err)
 {
@@ -1044,78 +956,6 @@ iproject_set_property (IAnjutaProject *obj, AnjutaProjectNode *node, AnjutaProje
 	return FALSE;
 }
 
-static AnjutaProjectNode *
-iproject_new_root_node (IAnjutaProject *obj, GFile *file, GError **error)
-{
-	return project_node_new (DIR_PROJECT (obj), NULL, ANJUTA_PROJECT_ROOT, file, NULL, error);
-}
-
-static AnjutaProjectNode *
-iproject_add_file_node (IAnjutaProject *obj, AnjutaProjectNode *parent, AnjutaProjectNode *sibling, AnjutaProjectNodeType type, GFile *file, GError **err)
-{
-	return NULL;
-}
-
-static AnjutaProjectNode *
-iproject_add_name_node (IAnjutaProject *obj, AnjutaProjectNode *parent, AnjutaProjectNode *sibling, AnjutaProjectNodeType type, const gchar *name, GError **error)
-{
-	AnjutaProjectNode *node = NULL;
-	GFile *file;
-	
-	/* Create a group for directory */
-	switch (type & ANJUTA_PROJECT_TYPE_MASK)
-	{
-	case ANJUTA_PROJECT_GROUP:
-		file = g_file_get_child (anjuta_project_node_get_file (parent), name);
-		if (g_file_make_directory (file, NULL, error))
-		{
-			node = project_node_new (DIR_PROJECT (obj), NULL, type, file, NULL, NULL);
-			anjuta_project_node_append (parent, node);
-		}
-		g_object_unref (file);
-		break;
-	default:
-		g_set_error (error, IANJUTA_PROJECT_ERROR, 
-					IANJUTA_PROJECT_ERROR_NOT_SUPPORTED,
-			_("Project doesn't allow to add such type of element"));
-		break;
-	}
-	
-	return node;
-}
-
-static gboolean
-iproject_remove_node (IAnjutaProject *obj, AnjutaProjectNode *node, GError **err)
-{
-	project_node_destroy (DIR_PROJECT (obj), node);
-
-	return TRUE;
-}
-
-static AnjutaProjectProperty *
-iproject_set_boolean_property (IAnjutaProject *project, AnjutaProjectNode *node, AnjutaProjectProperty *property, gboolean value, GError **err )
-{
-	return NULL;
-}
-
-static AnjutaProjectProperty *
-iproject_set_string_property (IAnjutaProject *project, AnjutaProjectNode *node, AnjutaProjectProperty *property, const gchar *value, GError **err )
-{
-	return NULL;
-}
-
-static AnjutaProjectProperty *
-iproject_set_list_property (IAnjutaProject *project, AnjutaProjectNode *node, AnjutaProjectProperty *property, const gchar *name, const gchar *value, GError **err )
-{
-	return NULL;
-}
-
-static gboolean
-iproject_remove_property (IAnjutaProject *project, AnjutaProjectNode *node, AnjutaProjectProperty *property, GError **err)
-{
-	return FALSE;
-}
-
 static GList* 
 iproject_get_node_info (IAnjutaProject *obj, GError **err)
 {
@@ -1130,25 +970,6 @@ iproject_iface_init(IAnjutaProjectIface* iface)
 	iface->new_node = iproject_new_node;
 	iface->free_node = iproject_free_node;
 	iface->set_property = iproject_set_property;
-
-	iface->add_group = iproject_add_group;
-	iface->add_source = iproject_add_source;
-	iface->add_target = iproject_add_target;
-	iface->configure = iproject_configure;
-	iface->get_capabilities = iproject_get_capabilities;
-	iface->get_packages = iproject_get_packages;
-	iface->get_root = iproject_get_root;
-	iface->get_target_types = iproject_get_target_types;
-	iface->load = iproject_load;
-	iface->refresh = iproject_refresh;
-	iface->new_root_node = iproject_new_root_node;
-	iface->add_file_node = iproject_add_file_node;
-	iface->add_name_node = iproject_add_name_node;
-	iface->remove_node = iproject_remove_node;
-	iface->set_boolean_property = iproject_set_boolean_property;
-	iface->set_string_property = iproject_set_string_property;
-	iface->set_list_property = iproject_set_list_property;
-	iface->remove_property = iproject_remove_property;
 	iface->get_node_info = iproject_get_node_info;
 }
 
diff --git a/plugins/mk-project/mk-project.c b/plugins/mk-project/mk-project.c
index ed67446..b6b8283 100644
--- a/plugins/mk-project/mk-project.c
+++ b/plugins/mk-project/mk-project.c
@@ -1128,7 +1128,7 @@ mkp_project_load_root (MkpProject *project, AnjutaProjectNode *node, GError **er
 }
 
 AnjutaProjectNode *
-dir_project_load_node (MkpProject *project, AnjutaProjectNode *node, GError **error) 
+mkp_project_load_node (MkpProject *project, AnjutaProjectNode *node, GError **error) 
 {
 	switch (anjuta_project_node_get_type (node))
 	{
@@ -1365,70 +1365,10 @@ mkp_project_new (void)
 /* Implement IAnjutaProject
  *---------------------------------------------------------------------------*/
 
-static AnjutaProjectNode* 
-iproject_add_group (IAnjutaProject *obj, AnjutaProjectNode *parent,  const gchar *name, GError **err)
-{
-	return NULL;
-}
-
-static AnjutaProjectNode* 
-iproject_add_source (IAnjutaProject *obj, AnjutaProjectNode *parent,  GFile *file, GError **err)
-{
-	return NULL;
-}
-
-static AnjutaProjectNode* 
-iproject_add_target (IAnjutaProject *obj, AnjutaProjectNode *parent,  const gchar *name,  AnjutaProjectNodeType type, GError **err)
-{
-	return NULL;
-}
-
-static GtkWidget* 
-iproject_configure (IAnjutaProject *obj, GError **err)
-{
-	return NULL;
-}
-
-static guint 
-iproject_get_capabilities (IAnjutaProject *obj, GError **err)
-{
-	return 0;
-}
-
-static GList* 
-iproject_get_packages (IAnjutaProject *obj, GError **err)
-{
-	return NULL;
-}
-
-static AnjutaProjectNode* 
-iproject_get_root (IAnjutaProject *obj, GError **err)
-{
-	return mkp_project_get_root (MKP_PROJECT (obj));
-}
-
-static GList* 
-iproject_get_target_types (IAnjutaProject *obj, GError **err)
-{
-	return mkp_project_get_node_info (MKP_PROJECT (obj), err);
-}
-
-static gboolean
-iproject_load (IAnjutaProject *obj, GFile *file, GError **err)
-{
-	return mkp_project_load (MKP_PROJECT (obj), file, err);
-}
-
-static gboolean
-iproject_refresh (IAnjutaProject *obj, GError **err)
-{
-	return FALSE; //mkp_project_reload (MKP_PROJECT (obj), err);
-}
-
 static AnjutaProjectNode *
 iproject_load_node (IAnjutaProject *obj, AnjutaProjectNode *node, GError **err)
 {
-	return dir_project_load_node (MKP_PROJECT (obj), node, err);
+	return mkp_project_load_node (MKP_PROJECT (obj), node, err);
 }
 
 static AnjutaProjectNode *
@@ -1447,87 +1387,38 @@ iproject_set_property (IAnjutaProject *obj, AnjutaProjectNode *node, AnjutaProje
 	return FALSE;
 }
 
-static AnjutaProjectNode *
-iproject_new_root_node (IAnjutaProject *obj, GFile *file, GError **err)
+static GList* 
+iproject_get_node_info (IAnjutaProject *obj, GError **err)
 {
-	return project_node_new (MKP_PROJECT (obj), ANJUTA_PROJECT_ROOT, file, NULL);
+	return mkp_project_get_node_info (MKP_PROJECT (obj), err);
 }
 
 static AnjutaProjectNode *
-iproject_add_file_node (IAnjutaProject *obj, AnjutaProjectNode *parent, AnjutaProjectNode *sibling, AnjutaProjectNodeType type, GFile *file, GError **err)
+iproject_new_node (IAnjutaProject *obj, AnjutaProjectNode *parent, AnjutaProjectNodeType type, GFile *file, const gchar *name, GError **err)
 {
-	return NULL;
-}
+	AnjutaProjectNode *node;
 
-static AnjutaProjectNode *
-iproject_add_name_node (IAnjutaProject *obj, AnjutaProjectNode *parent, AnjutaProjectNode *sibling, AnjutaProjectNodeType type, const gchar *name, GError **err)
-{
-	return NULL;
+	node = project_node_new (MKP_PROJECT (obj), type, file, name);
+	node->parent = parent;
+	
+	return node;
 }
 
-static gboolean
-iproject_remove_node (IAnjutaProject *obj, AnjutaProjectNode *node, GError **err)
+static void
+iproject_free_node (IAnjutaProject *obj, AnjutaProjectNode *node, GError **err)
 {
 	project_node_destroy (MKP_PROJECT (obj), node);
-
-	return TRUE;
-}
-
-static AnjutaProjectProperty *
-iproject_set_boolean_property (IAnjutaProject *project, AnjutaProjectNode *node, AnjutaProjectProperty *property, gboolean value, GError **err )
-{
-	return NULL;
-}
-
-static AnjutaProjectProperty *
-iproject_set_string_property (IAnjutaProject *project, AnjutaProjectNode *node, AnjutaProjectProperty *property, const gchar *value, GError **err )
-{
-	return NULL;
-}
-
-static AnjutaProjectProperty *
-iproject_set_list_property (IAnjutaProject *project, AnjutaProjectNode *node, AnjutaProjectProperty *property, const gchar *name, const gchar *value, GError **err )
-{
-	return NULL;
-}
-
-static gboolean
-iproject_remove_property (IAnjutaProject *project, AnjutaProjectNode *node, AnjutaProjectProperty *property, GError **err)
-{
-	return FALSE;
-}
-
-static GList* 
-iproject_get_node_info (IAnjutaProject *obj, GError **err)
-{
-	return mkp_project_get_node_info (MKP_PROJECT (obj), err);
 }
 
 static void
 iproject_iface_init(IAnjutaProjectIface* iface)
 {
-	iface->add_group = iproject_add_group;
-	iface->add_source = iproject_add_source;
-	iface->add_target = iproject_add_target;
-	iface->configure = iproject_configure;
-	iface->get_capabilities = iproject_get_capabilities;
-	iface->get_packages = iproject_get_packages;
-	iface->get_root = iproject_get_root;
-	iface->get_target_types = iproject_get_target_types;
-	iface->load = iproject_load;
-	iface->refresh = iproject_refresh;
 	iface->load_node = iproject_load_node;
 	iface->save_node = iproject_save_node;
 	iface->set_property = iproject_set_property;
-	iface->new_root_node = iproject_new_root_node;
-	iface->add_file_node = iproject_add_file_node;
-	iface->add_name_node = iproject_add_name_node;
-	iface->remove_node = iproject_remove_node;
-	iface->set_boolean_property = iproject_set_boolean_property;
-	iface->set_string_property = iproject_set_string_property;
-	iface->set_list_property = iproject_set_list_property;
-	iface->remove_property = iproject_remove_property;
 	iface->get_node_info = iproject_get_node_info;
+	iface->new_node = iproject_new_node;
+	iface->free_node = iproject_free_node;
 }
 
 /* GObject implementation
diff --git a/plugins/project-manager/project.c b/plugins/project-manager/project.c
index 189761d..d0b1658 100644
--- a/plugins/project-manager/project.c
+++ b/plugins/project-manager/project.c
@@ -889,9 +889,34 @@ anjuta_pm_project_get_root (AnjutaPmProject *project)
 GList *
 anjuta_pm_project_get_packages (AnjutaPmProject *project)
 {
-	if (project->project == NULL) return NULL;
+	AnjutaProjectNode *module;
+	GHashTable *all;
+	GList *packages;
 
-	return ianjuta_project_get_packages (project->project, NULL);
+	g_return_val_if_fail (project != NULL, NULL);
+	
+	all = g_hash_table_new (g_str_hash, g_str_equal);
+	
+	for (module = anjuta_project_node_first_child (project->root); module != NULL; module = anjuta_project_node_next_sibling (module))
+	{
+		if (anjuta_project_node_get_type(module) == ANJUTA_PROJECT_MODULE)
+		{
+			AnjutaProjectNode *package;
+
+			for (package = anjuta_project_node_first_child (module); package != NULL; package = anjuta_project_node_next_sibling (package))
+			{
+				if (anjuta_project_node_get_type (package) == ANJUTA_PROJECT_PACKAGE)
+				{
+					g_hash_table_replace (all, anjuta_project_node_get_name (package), NULL);
+				}
+			}
+		}
+	}
+	
+	packages = g_hash_table_get_keys (all);
+	g_hash_table_destroy (all);
+	
+	return packages;
 }
 
 AnjutaProjectNode *
@@ -912,9 +937,16 @@ anjuta_pm_project_add_group (AnjutaPmProject *project, AnjutaProjectNode *parent
 AnjutaProjectNode *
 anjuta_pm_project_add_target (AnjutaPmProject *project, AnjutaProjectNode *parent, AnjutaProjectNode *sibling, const gchar *name, AnjutaProjectNodeType type, GError **error)
 {
-	g_return_val_if_fail (project->project != NULL, NULL);
+	AnjutaProjectNode *node;
 	
-	return ianjuta_project_add_target (project->project, parent, name, type, error);
+	g_return_val_if_fail (project->project != NULL, NULL);
+
+	node = ianjuta_project_new_node (project->project, parent, ANJUTA_PROJECT_TARGET | type, NULL, name, error);
+	node->parent = parent;
+	node->prev = sibling;
+	pm_project_push_command (project, ADD, node);
+
+	return node;
 }
 
 AnjutaProjectNode *



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