List Info

Thread: KDevelop4 project file




KDevelop4 project file
user name
2006-07-20 17:58:41
On Thu, Jul 20, 2006 at 10:15:20AM -0400, Adam Treat wrote:
> On Thursday 20 July 2006 5:42 am, Andras Mantia wrote:
> > On Thursday 20 July 2006 12:10, Andras Mantia
wrote:
> > > Hi,
> > >
> > >  As I read in the commits, the project files
are now in INI format.
> > > Is the structure of them described somewhere?
I cannot find any
> > > discussion relating to this change, so it
kind'a caught me at
> > > surprise and now I really wonder what is the
good way to put my stuff
> > > in the project file. Until now it was easy, I
put everything under
> > > the "project" node, and extending
the "items" nodes with our own
> > > attributes was easy. How should I go on now?
Of course, I could use
> > > my own XML file and insert a line in the
kdev4 project file pointing
> > > to this XML file, but that is far from being
ideal.
> 
> Yes, I've discussed this change many times in many
different forums.  I've 
> discussed it on IRC with mattr, hamish and adymo.  The
folks who I knew to be 
> working on kdevelop4.  I've discussed this on k-c-d in
the course of a patch 
> to kconfig to allow this.  I've discussed this on the
commit messages I've 
> made.  Finally, I've written documentation in the
actual source files.  But, 
> no, you are right, I didn't discuss it here...  Sorry.
> 
> The project files are now in INI style format, it is
true.  This is because we 
> now use the KConfig framework for project settings too.
 This has the benefit 
> that we can use KConfigXT and that all settings are
saved in the exact same 
> way.  This is how it works:
> 
> When a project is opened any changes to the settings
will be reflected in the 
> project file(s).  When a project is not currently
opened any changes to the 
> settings will be reflected as normal... in
$USER/.kde4/config/kdeveloprc
> 
> This means that we have one configuration dialog for
both kdevelop and the 
> project.  When a project is opened it is in project
mode.  When a project is 
> not opened it is in regular 'configure kdevelop'
mode.  I will be making a 
> change to the top-level menu item to reflect this. 
When a project is opened 
> it will read 'configure project' and when a project
is not opened it will 
> read 'configure kdevelop'.
> 
> Now, what does a kdevelop plugin developer need to know
in order to use all of 
> this?  Just a few things.
> 
> 1.  All settings are saved to the global KConfig
object.  Period.  The 
> framework handles the project opening behind the
scenes.  Again, when a 
> project is opened the framework initializes the global
KConfig object to 
> point to project file(s).  When a project is not
currently open the framework 
> initializes the global KConfig object to point to
regular config files.
> 
> 2.  You SHOULD NOT access the global KConfig object
through KGlobal::config() 
> anymore.  Instead, you should access it through three
different methods:
> 
> 	KDevConfig::standard() <-- This is the usual way
you will access it.  Only in 
> 	very rare cases will you need to access it from the
other two methods.
> 
> 	KDevConfig::localProject() <-- If you are making a
setting without KConfigXT
> 	and wish to make sure the setting is NOT saved in the
global shareable
> 	project file, then you can use this.
> 
> 	KDevConfig::globalProject <-- You should rarely if
ever use this.  It is
> 	operationally the same as standard.  It may be
removed.
> 
> 3.  You should be using KConfigXT for your settings
dialogs wherever possible.  
> You can find examples of this in the documentview part,
the cmake part and in 
> the shell.  We have two new classes that should be used
for this:  
> KDevCModule and KDevConfigSkeleton.  They should be
used in place of their 
> respective parents.  They enable the possibility of
specifying settings that 
> should only be saved in the local project file such as
hard coded paths.  
> Again, look at the cmake settings as an example, but
the idea is that you 
> implement one virtual method in KDevCModule that points
to a data file which 
> lists the settings that can not be shared.  The
framework will then take care 
> to place those settings in the local project file, not
the global project 
> file.
> 
> The advantages to this are numerous:
> 
> *  Plugin developers don't have to worry about whether
settings belong in the 
> project or in the regular config.  Settings are
settings.  When a project is 
> opened then settings are given a project scope.  When a
project is not opened 
> then settings are given a regular scope.
> 
> *  Users don't have to wonder how to find a particular
setting... "Is it in 
> the project config or is it in the regular
config"... there is only one place 
> to get/set settings.  The config dialog.
> 
> *  We can finally pass around kdevelop project files
and commit them to svn.  
> The global project file should be safe (ie, it won't
contain hardcoded paths 
> or environment variables) to commit.
> 
> *  All settings can be configured on an individual
project basis.  A project 
> manager could finally define AStyle settings for the
whole project, for 
> instance.  And developers who work on more than one
project might have AStyle 
> settings for each different project.
> 
> > As I look in the code it seems that now the
project file cannot be
> > accessed at all, only via KDevFileManager, to
manipulate folders/files.
> > No extra information can be stored in the project
file?
> > Maybe I miss something, but this is a step back
compared to KDevelop3
> > architecture.
> 
> No, you can no longer access the old projectdom. 
That's because we are no 
> longer using it.  It all goes through KConfig now.
> 
> But, OF COURSE, you can access the project file.  It is
just done in a 
> different way... through KConfig... actually through
KDevConfig ;)
> 

Of course you now realize that all of this needs to go into
some API
documentation somewhere, right? (and no, I'm not
volunteering) 
--
Matt


_______________________________________________
KDevelop-devel mailing list
KDevelop-develbarney.cs.uni-potsdam.de
http://barney.cs.uni-potsdam.de/mailman/listinfo/
kdevelop-devel
KDevelop4 project file
user name
2006-07-20 17:58:41
On Thu, Jul 20, 2006 at 10:15:20AM -0400, Adam Treat wrote:
> On Thursday 20 July 2006 5:42 am, Andras Mantia wrote:
> > On Thursday 20 July 2006 12:10, Andras Mantia
wrote:
> > > Hi,
> > >
> > >  As I read in the commits, the project files
are now in INI format.
> > > Is the structure of them described somewhere?
I cannot find any
> > > discussion relating to this change, so it
kind'a caught me at
> > > surprise and now I really wonder what is the
good way to put my stuff
> > > in the project file. Until now it was easy, I
put everything under
> > > the "project" node, and extending
the "items" nodes with our own
> > > attributes was easy. How should I go on now?
Of course, I could use
> > > my own XML file and insert a line in the
kdev4 project file pointing
> > > to this XML file, but that is far from being
ideal.
> 
> Yes, I've discussed this change many times in many
different forums.  I've 
> discussed it on IRC with mattr, hamish and adymo.  The
folks who I knew to be 
> working on kdevelop4.  I've discussed this on k-c-d in
the course of a patch 
> to kconfig to allow this.  I've discussed this on the
commit messages I've 
> made.  Finally, I've written documentation in the
actual source files.  But, 
> no, you are right, I didn't discuss it here...  Sorry.
> 
> The project files are now in INI style format, it is
true.  This is because we 
> now use the KConfig framework for project settings too.
 This has the benefit 
> that we can use KConfigXT and that all settings are
saved in the exact same 
> way.  This is how it works:
> 
> When a project is opened any changes to the settings
will be reflected in the 
> project file(s).  When a project is not currently
opened any changes to the 
> settings will be reflected as normal... in
$USER/.kde4/config/kdeveloprc
> 
> This means that we have one configuration dialog for
both kdevelop and the 
> project.  When a project is opened it is in project
mode.  When a project is 
> not opened it is in regular 'configure kdevelop'
mode.  I will be making a 
> change to the top-level menu item to reflect this. 
When a project is opened 
> it will read 'configure project' and when a project
is not opened it will 
> read 'configure kdevelop'.
> 
> Now, what does a kdevelop plugin developer need to know
in order to use all of 
> this?  Just a few things.
> 
> 1.  All settings are saved to the global KConfig
object.  Period.  The 
> framework handles the project opening behind the
scenes.  Again, when a 
> project is opened the framework initializes the global
KConfig object to 
> point to project file(s).  When a project is not
currently open the framework 
> initializes the global KConfig object to point to
regular config files.
> 
> 2.  You SHOULD NOT access the global KConfig object
through KGlobal::config() 
> anymore.  Instead, you should access it through three
different methods:
> 
> 	KDevConfig::standard() <-- This is the usual way
you will access it.  Only in 
> 	very rare cases will you need to access it from the
other two methods.
> 
> 	KDevConfig::localProject() <-- If you are making a
setting without KConfigXT
> 	and wish to make sure the setting is NOT saved in the
global shareable
> 	project file, then you can use this.
> 
> 	KDevConfig::globalProject <-- You should rarely if
ever use this.  It is
> 	operationally the same as standard.  It may be
removed.
> 
> 3.  You should be using KConfigXT for your settings
dialogs wherever possible.  
> You can find examples of this in the documentview part,
the cmake part and in 
> the shell.  We have two new classes that should be used
for this:  
> KDevCModule and KDevConfigSkeleton.  They should be
used in place of their 
> respective parents.  They enable the possibility of
specifying settings that 
> should only be saved in the local project file such as
hard coded paths.  
> Again, look at the cmake settings as an example, but
the idea is that you 
> implement one virtual method in KDevCModule that points
to a data file which 
> lists the settings that can not be shared.  The
framework will then take care 
> to place those settings in the local project file, not
the global project 
> file.
> 
> The advantages to this are numerous:
> 
> *  Plugin developers don't have to worry about whether
settings belong in the 
> project or in the regular config.  Settings are
settings.  When a project is 
> opened then settings are given a project scope.  When a
project is not opened 
> then settings are given a regular scope.
> 
> *  Users don't have to wonder how to find a particular
setting... "Is it in 
> the project config or is it in the regular
config"... there is only one place 
> to get/set settings.  The config dialog.
> 
> *  We can finally pass around kdevelop project files
and commit them to svn.  
> The global project file should be safe (ie, it won't
contain hardcoded paths 
> or environment variables) to commit.
> 
> *  All settings can be configured on an individual
project basis.  A project 
> manager could finally define AStyle settings for the
whole project, for 
> instance.  And developers who work on more than one
project might have AStyle 
> settings for each different project.
> 
> > As I look in the code it seems that now the
project file cannot be
> > accessed at all, only via KDevFileManager, to
manipulate folders/files.
> > No extra information can be stored in the project
file?
> > Maybe I miss something, but this is a step back
compared to KDevelop3
> > architecture.
> 
> No, you can no longer access the old projectdom. 
That's because we are no 
> longer using it.  It all goes through KConfig now.
> 
> But, OF COURSE, you can access the project file.  It is
just done in a 
> different way... through KConfig... actually through
KDevConfig ;)
> 

Of course you now realize that all of this needs to go into
some API
documentation somewhere, right? (and no, I'm not
volunteering) 
--
Matt


_______________________________________________
KDevelop-devel mailing list
KDevelop-develbarney.cs.uni-potsdam.de
http://barney.cs.uni-potsdam.de/mailman/listinfo/
kdevelop-devel
KDevelop4 project file
user name
2006-07-20 17:58:41
On Thu, Jul 20, 2006 at 10:15:20AM -0400, Adam Treat wrote:
> On Thursday 20 July 2006 5:42 am, Andras Mantia wrote:
> > On Thursday 20 July 2006 12:10, Andras Mantia
wrote:
> > > Hi,
> > >
> > >  As I read in the commits, the project files
are now in INI format.
> > > Is the structure of them described somewhere?
I cannot find any
> > > discussion relating to this change, so it
kind'a caught me at
> > > surprise and now I really wonder what is the
good way to put my stuff
> > > in the project file. Until now it was easy, I
put everything under
> > > the "project" node, and extending
the "items" nodes with our own
> > > attributes was easy. How should I go on now?
Of course, I could use
> > > my own XML file and insert a line in the
kdev4 project file pointing
> > > to this XML file, but that is far from being
ideal.
> 
> Yes, I've discussed this change many times in many
different forums.  I've 
> discussed it on IRC with mattr, hamish and adymo.  The
folks who I knew to be 
> working on kdevelop4.  I've discussed this on k-c-d in
the course of a patch 
> to kconfig to allow this.  I've discussed this on the
commit messages I've 
> made.  Finally, I've written documentation in the
actual source files.  But, 
> no, you are right, I didn't discuss it here...  Sorry.
> 
> The project files are now in INI style format, it is
true.  This is because we 
> now use the KConfig framework for project settings too.
 This has the benefit 
> that we can use KConfigXT and that all settings are
saved in the exact same 
> way.  This is how it works:
> 
> When a project is opened any changes to the settings
will be reflected in the 
> project file(s).  When a project is not currently
opened any changes to the 
> settings will be reflected as normal... in
$USER/.kde4/config/kdeveloprc
> 
> This means that we have one configuration dialog for
both kdevelop and the 
> project.  When a project is opened it is in project
mode.  When a project is 
> not opened it is in regular 'configure kdevelop'
mode.  I will be making a 
> change to the top-level menu item to reflect this. 
When a project is opened 
> it will read 'configure project' and when a project
is not opened it will 
> read 'configure kdevelop'.
> 
> Now, what does a kdevelop plugin developer need to know
in order to use all of 
> this?  Just a few things.
> 
> 1.  All settings are saved to the global KConfig
object.  Period.  The 
> framework handles the project opening behind the
scenes.  Again, when a 
> project is opened the framework initializes the global
KConfig object to 
> point to project file(s).  When a project is not
currently open the framework 
> initializes the global KConfig object to point to
regular config files.
> 
> 2.  You SHOULD NOT access the global KConfig object
through KGlobal::config() 
> anymore.  Instead, you should access it through three
different methods:
> 
> 	KDevConfig::standard() <-- This is the usual way
you will access it.  Only in 
> 	very rare cases will you need to access it from the
other two methods.
> 
> 	KDevConfig::localProject() <-- If you are making a
setting without KConfigXT
> 	and wish to make sure the setting is NOT saved in the
global shareable
> 	project file, then you can use this.
> 
> 	KDevConfig::globalProject <-- You should rarely if
ever use this.  It is
> 	operationally the same as standard.  It may be
removed.
> 
> 3.  You should be using KConfigXT for your settings
dialogs wherever possible.  
> You can find examples of this in the documentview part,
the cmake part and in 
> the shell.  We have two new classes that should be used
for this:  
> KDevCModule and KDevConfigSkeleton.  They should be
used in place of their 
> respective parents.  They enable the possibility of
specifying settings that 
> should only be saved in the local project file such as
hard coded paths.  
> Again, look at the cmake settings as an example, but
the idea is that you 
> implement one virtual method in KDevCModule that points
to a data file which 
> lists the settings that can not be shared.  The
framework will then take care 
> to place those settings in the local project file, not
the global project 
> file.
> 
> The advantages to this are numerous:
> 
> *  Plugin developers don't have to worry about whether
settings belong in the 
> project or in the regular config.  Settings are
settings.  When a project is 
> opened then settings are given a project scope.  When a
project is not opened 
> then settings are given a regular scope.
> 
> *  Users don't have to wonder how to find a particular
setting... "Is it in 
> the project config or is it in the regular
config"... there is only one place 
> to get/set settings.  The config dialog.
> 
> *  We can finally pass around kdevelop project files
and commit them to svn.  
> The global project file should be safe (ie, it won't
contain hardcoded paths 
> or environment variables) to commit.
> 
> *  All settings can be configured on an individual
project basis.  A project 
> manager could finally define AStyle settings for the
whole project, for 
> instance.  And developers who work on more than one
project might have AStyle 
> settings for each different project.
> 
> > As I look in the code it seems that now the
project file cannot be
> > accessed at all, only via KDevFileManager, to
manipulate folders/files.
> > No extra information can be stored in the project
file?
> > Maybe I miss something, but this is a step back
compared to KDevelop3
> > architecture.
> 
> No, you can no longer access the old projectdom. 
That's because we are no 
> longer using it.  It all goes through KConfig now.
> 
> But, OF COURSE, you can access the project file.  It is
just done in a 
> different way... through KConfig... actually through
KDevConfig ;)
> 

Of course you now realize that all of this needs to go into
some API
documentation somewhere, right? (and no, I'm not
volunteering) 
--
Matt


_______________________________________________
KDevelop-devel mailing list
KDevelop-develbarney.cs.uni-potsdam.de
http://barney.cs.uni-potsdam.de/mailman/listinfo/
kdevelop-devel
KDevelop4 project file
user name
2006-07-20 20:04:45
On Thursday 20 July 2006 20:57, Matt Rogers wrote:
> I will make efforts to make sure that changes are
announced here when
> they are made or shortly after being made. Announcing
discussion of a
> change may not always happen, but when known about in
advance, I'll
> do my best to announce planned discussions as well.

Thanks in advance. I hope I can be more active in such
discussions. If 
not, I cannot complain anymore. 

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
new code-completion-options
user name
2006-07-24 10:58:49
Hi! I just wanted to finally implement using the options..
but it seems that 
cppcodecompletion.h is missing many of the new options like
for example the 
namespace-aliases.

Am I missing something? 

greetings, David

_______________________________________________
KDevelop-devel mailing list
KDevelop-develbarney.cs.uni-potsdam.de
http://barney.cs.uni-potsdam.de/mailman/listinfo/
kdevelop-devel
new code-completion-options
user name
2006-07-24 11:06:31
Sorry this was ment to go directly to Jens Dagerbo.. I
forgot that it's 
automatically sent to the list when I answer to hin

David

_______________________________________________
KDevelop-devel mailing list
KDevelop-develbarney.cs.uni-potsdam.de
http://barney.cs.uni-potsdam.de/mailman/listinfo/
kdevelop-devel
new code-completion-options
user name
2006-07-24 12:28:20
Hi David,

Yeah, I never got around to quite finish adding that. I
couldn't
figure out where to apply the settings and since they
wouldnt' have
done anything I guess I didn't muster the will to put in
the
boilerplate code (and, among other things, my development
box died..)

cppcodecompletion.h probably doesn't have to change at all.

Look at
http://websvn.kde.org/branches/kdevelop/3.4/languages/cpp
/ccconfigwidget.cpp?rev=547820&r1=543802&r2=547820
http://websvn.kde.org/branches/kdevelop/3.4/lang
uages/cpp/cppcodecompletionconfig.cpp?rev=547820&r1=5370
78&r2=547820
http://websvn.kde.org/branches/kdevelop/3.4/languages/
cpp/cppcodecompletion.cpp?rev=547820&r1=547152&r2=54
7820
to see what I removed (commented out for the moment) to
remove the old
settings. It should give you a good idea of what to add to
put the new
options in and how to access them.

// jens

On 7/24/06, David Nolden <david.noldenart-master.de> wrote:
> Hi! I just wanted to finally implement using the
options.. but it seems that
> cppcodecompletion.h is missing many of the new options
like for example the
> namespace-aliases.
>
> Am I missing something? 
>
> greetings, David
>
> _______________________________________________
> KDevelop-devel mailing list
> KDevelop-develbarney.cs.uni-potsdam.de
> http://barney.cs.uni-potsdam.de/mailman/listinfo/
kdevelop-devel
>

_______________________________________________
KDevelop-devel mailing list
KDevelop-develbarney.cs.uni-potsdam.de
http://barney.cs.uni-potsdam.de/mailman/listinfo/
kdevelop-devel
[1-10] [11-20] [21-30] [31-40] [41-50] [51-57]

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