List Info

Thread: KDevFileManager questions




KDevFileManager questions
user name
2006-08-16 15:00:46
Hi,

 I have some questions about how a KDevFileManager should be

implemented. The problematic areas are import and parse.
It is unclear what they are supposed to do. By looking at
the code where 
they are implemented (KDevGenericImporter) and used 
(KDevProjectManagerPart and ImportProjectJob) I assume that
import 
simply puts the base of the project in a
KDevProjectFolderItem, while 
parse parses the project files and adds to this base. But
the 
implementation confused me a little as import takes a
KDevProjectModel 
and a  KUrl as argument, but the model object is not used.
Furthermore 
the value returned by the import is added to the model in
the project 
manager code. If the model argument is present, shouldn't
this addition 
happen inside the import method itself?
 If the above assumption is true, maybe import should be
renamed to 
something else, like "createBaseItem".
 The second issue is with the return value of the parse
method. Is this 
a list of folders that were found during parsing? Is it
mandatory to 
return a list if we parser all folders and files in one go
with the 
parse method (and not with a KJob as it is done in
ImportProjectJob)?

If I find what's correct, I will take care of updating the
API 
documentation. 

Andras

-- 
Quanta Plus developer - http://quanta.kdewebdev.o
rg
K Desktop Environment - http://www.kde.org
_______________________________________________
KDevelop-devel mailing list
KDevelop-develbarney.cs.uni-potsdam.de
http://barney.cs.uni-potsdam.de/mailman/listinfo/
kdevelop-devel
KDevFileManager questions
user name
2006-08-16 17:12:51
On Wed, Aug 16, 2006 at 06:00:46PM +0300, Andras Mantia
wrote:
> Hi,
> 
>  I have some questions about how a KDevFileManager
should be 
> implemented. The problematic areas are import and
parse.
> It is unclear what they are supposed to do. By looking
at the code where 
> they are implemented (KDevGenericImporter) and used 
> (KDevProjectManagerPart and ImportProjectJob) I assume
that import 
> simply puts the base of the project in a
KDevProjectFolderItem, while 
> parse parses the project files and adds to this base.
But the 
> implementation confused me a little as import takes a
KDevProjectModel 
> and a  KUrl as argument, but the model object is not
used. Furthermore 
> the value returned by the import is added to the model
in the project 
> manager code. If the model argument is present,
shouldn't this addition 
> happen inside the import method itself?
>  If the above assumption is true, maybe import should
be renamed to 
> something else, like "createBaseItem".
>  The second issue is with the return value of the parse
method. Is this 
> a list of folders that were found during parsing? Is it
mandatory to 
> return a list if we parser all folders and files in one
go with the 
> parse method (and not with a KJob as it is done in
ImportProjectJob)?
> 
> If I find what's correct, I will take care of updating
the API 
> documentation. 
> 
> Andras
> 

import should not be renamed. It should also not take a
KDevProjectModel
as a parameter.

parse needs to go away as long as none of the other
file/build managers
are using it.
--
Matt


_______________________________________________
KDevelop-devel mailing list
KDevelop-develbarney.cs.uni-potsdam.de
http://barney.cs.uni-potsdam.de/mailman/listinfo/
kdevelop-devel
KDevFileManager questions
user name
2006-08-16 17:19:50
On Wednesday 16 August 2006 20:12, Matt Rogers wrote:
> import should not be renamed. It should also not take a
> KDevProjectModel as a parameter.

Ok, so what should import really do? Just create a base 
KDevProjectFolderItem?

> parse needs to go away as long as none of the other
file/build
> managers are using it.

Fine for me.

Andras

-- 
Quanta Plus developer - http://quanta.kdewebdev.o
rg
K Desktop Environment - http://www.kde.org
_______________________________________________
KDevelop-devel mailing list
KDevelop-develbarney.cs.uni-potsdam.de
http://barney.cs.uni-potsdam.de/mailman/listinfo/
kdevelop-devel
KDevFileManager questions
user name
2006-08-16 23:57:56
On Wednesday 16 August 2006 12:19, Andras Mantia wrote:
> On Wednesday 16 August 2006 20:12, Matt Rogers wrote:
> > import should not be renamed. It should also not
take a
> > KDevProjectModel as a parameter.
>
> Ok, so what should import really do? Just create a base
> KDevProjectFolderItem?
>

Import the entire project and return the toplevel folder in
the project as a 
KDevProjectFolderItem.

> > parse needs to go away as long as none of the
other file/build
> > managers are using it.
>
> Fine for me.
>

Will you do the removal or should I?
--
Matt

_______________________________________________
KDevelop-devel mailing list
KDevelop-develbarney.cs.uni-potsdam.de
http://barney.cs.uni-potsdam.de/mailman/listinfo/
kdevelop-devel
KDevFileManager questions
user name
2006-08-17 06:35:57
On Thursday 17 August 2006 02:57, Matt Rogers wrote:
> On Wednesday 16 August 2006 12:19, Andras Mantia wrote:
> > On Wednesday 16 August 2006 20:12, Matt Rogers
wrote:
> > > import should not be renamed. It should also
not take a
> > > KDevProjectModel as a parameter.
> >
> > Ok, so what should import really do? Just create a
base
> > KDevProjectFolderItem?
>
> Import the entire project and return the toplevel
folder in the
> project as a KDevProjectFolderItem.

I see, so this is basic what I imagined to be
"parse".
> 
> > > parse needs to go away as long as none of the
other file/build
> > > managers are using it.
> >
> > Fine for me.
>
> Will you do the removal or should I?

You can do it. 
 
Andras

-- 
Quanta Plus developer - http://quanta.kdewebdev.o
rg
K Desktop Environment - http://www.kde.org
_______________________________________________
KDevelop-devel mailing list
KDevelop-develbarney.cs.uni-potsdam.de
http://barney.cs.uni-potsdam.de/mailman/listinfo/
kdevelop-devel
[1-5]

about | contact  Other archives ( Real Estate discussion Medical topics )