Re: [gedit-list] Completion Status



Hi,

	I'm thinking about the completion context. I write some ideas and you
can tell me if it is what you want:

CompletionContext
-----------------
	- get_capability () 
		* Event how produces the completion
		("standard::interactive","standard::automatic" 
		or another custom call)
	- set_proposals (provider, proposals_list)
	- add_proposals (provider, proposals_list)
	- get_proposals (provider): proposals_list

Provider
---------
	- populate_completion (context)
		* The provider must add the proposals with
		context->set_proposals
	- filter_proposals (context)
		* The default implementation filter by label
		* The provider can overwrite it and filter the current
		proposals doing something like context.get_proposals,
		some filters and context.set_proposals
	- completion_finished (context)
		* The provider can free cached data

The completion will do:

1.- User press <Control>Space to show the completion 
2.- Completion creates the context
3.- Completion call populate_completion to all the providers
4.- If the user writes some char the call filter_proposals on all
providers
5.- If the user selects a proposal call to provider.activate_proposal
6.- When the completion ends, call to completion_finished on all the
providers.

What do you think about?

Perriman



El mar, 28-07-2009 a las 00:37 +0200, perriman escribió:
> Hi all!!
> 
> 	I have talking with Nacho about the completion changes. I need someone
> tell me what is the "context" idea with more detail. 
> 
> 	Currently the completion calls to provider.get_proposals(). I think the
> change would be remove this call and add something like
> provider.populate_completion (context). The providers could call to
> context.add_proposals () sync or async, in a thread, etc like the
> provider wants.
> 
> Can you explain me better what is the idea?
> 
> Perriman
> 



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