UI-less kdevplatform

Andreas Pakulat apaku at gmx.de
Thu Aug 7 17:16:44 UTC 2008


On 07.08.08 18:58:04, Alexander Dymo wrote:
> On Thursday 07 August 2008 18:23:46 Aleix wrote:
> > But anyway my idea was to leverage the more possible the shell when working
> > without UI.
> > > I think the easiest way would be to just run the application without
> > > showing
> > > the mainwindow.
> > Shouldn't this be the last chance?
> 
> Maybe not. Let me elaborate. UiController doesn't give any guarantees for 
> plugins (and shell) that the mainwindow exists. 
> For example, IUiController::activeMainWindow() can return 0 and that's 
> documented. 
> So what we need to do is to keep using UiController that we have and simply do 
> not create mainwindow. I haven't looked deep enough into the code to 
> understand what can break but ideally nothing should break under this 
> situation. So maybe your flag needs to be used in UiControllerPrivate 
> constructor to avoid creating default main window?
> 
> Other than that, UiController itself is quite cheap (it just initializes area 
> and mainwindow). Area is cheap as well, so if we don't create mainwindow, 
> we'll have fast enough cmdline shell.

There's also the problem of dialogs, there are quite some plugins which
use dialogs. IMHO we should extend this, if we really go for a non-ui
mode, and provide a new property on plugins that says "I'm not using ui"
or "I'm using ui" and then if the shell is created without ui the
plugin-controller can make sure no ui-plugin is loaded. 

So language plugins and eventually also project builders would fall into
the no-ui-category and could be used, while everything else wouldn't.

Andreas

-- 
You're definitely on their list.  The question to ask next is what list it is.




More information about the KDevelop-devel mailing list