KDevelop 1.0beta3 patch - Objective-C support added
Richard Dale
duke at tipitina.demon.co.uk
Sun Sep 26 13:05:00 BST 1999
I've spent the last week adding Objective-C support to KDevelop, and have put
the results into a patch - Objective-C syntax highlighting, class
browsing, '.m' files searched via the search panel, Objective-C added to the
New class dialogue etc.
I've also fixed some errors in KDevelop. For instance, if a comment is longer
than 2048 characters the tokenizer will corrupt memory. The symptom in my case
was that the wait cursor was turned on permanently when I included a header
with an especially large comment.
Please find attached the patch, and an example large Objective-C KDevelop
project for testing the class browser (the GNUstep core/base directory
hierarchy).
gunzip kdevelop-1.0beta3objc.patch.gz gnustepbase.kdevprj.gz
I tested the changes with the GNUstep 'base' classes. To obtain them do the
following:
export CVSROOT=":pserver:anoncvs at cvs.net-community.com:/gnustep"
cvs login
(Logging in to anoncvs at cvs.net-community.com)
CVS password:
Enter the password `anoncvs'. This should return you to your prompt.
>From here you can checkout any module in the CVS server you like.
cvs -z3 checkout base <press enter>
Copy gnustepbase.kdevprj. to the base directory in the GNUstep source code tree.
Obtain KDevelop 1.0beta3 and KDdb by following the instructions on
www.kevelop.org web site. Copy kdevelop-1.0beta3objc.patch to the directory
above the KDevelop sources
$ cd <KDevelop source directory>
$ patch -p1 < ../kdevelop-1.0beta3objc.patch
$ ./configure
$ make
$ make install
Configure KDdb to use a 'patched for Objective-C' version of gdb (see the
GNUstep web site). Start KDevelop, open gnustepbase.kdevprj and have fun
browsing the GNUstep base Objective-C class hierarchy...
If you're interested in further details, here is the change log from the patch:
Sat Sep 25 10:55:07 1999 Richard Dale <duke at tipitina.demon.co.uk>
This patch provides Objective-C support for KDevelop 1.0beta3.
It contains the following changes:
'**' denotes a KDevelop fix, rather than an Objective-C addition
** ceditwidget.cpp: An incorrect assertion was failing when the 'Delete
method' option was used
* ceditwidget.cpp: Added a '.m' suffix to source file filters
* kdevelop.cc: Added author credit for this patch on info panel
* ckdevelop_init.cpp: Bookmarks menu item label changed from 'C/C++
Window'to 'C/C++/Source Window'. Heading on tab in sources window changed
from 'C/C++' to 'C/C++/Source'
* ckdevelop_whatsthis.cpp: 'C/C++' in tool tip text changed to
'C/C++/Source'.
** Typo fixed, 'declared' was spelt 'declarated'.
* ckdevinstall.cpp: Objective-C highlighting configuration entry added.
Objective-C added to languages in the syntax highlighing selection
pulldown.
* ClassParser.cc: The following methods were added to parse Objective-C;
fillInParsedObjcMethod(), parseObjcCategory(), parseObjcImplementation(),
parseObjcClassLexem(), parseObjcClassHeader(), parseObjcClass().
The parseTopLevelLexem() method was changed to parse Objective-C if a
'@interface', '@implementation' or '@class' token was encountered. Note
that syntactically correct C++ can never contain these, so the behaviour
of the parser with standard C++ should be unaffected.
* ClassParser.h: Declarations added for the new Objective-C member
functions.
* ParsedMethod.cc: 'isObjectiveC' flag added. If this flag is TRUE, the
name of the method is displayed in Objective-C style, eg '-init:forCoder:'
* ParsedMethod.h: Added declaration of 'isObjectiveC'.
* tokenizer.h: Added #defines for Objective-C tokens.
* tokenizer.l: Added rules for Objective-C lexemes.
** tokenizer.l: Fixed memory corruption bug when comments were longer than
2048 characters.
* cnewclassdlg.cpp: Added a radio button 'objectivc-c public' to the New
Class panel. If this button is selected, an Objective-C class is
generated.
* cnewclassdlg.h: Declaration of 'public-objc-button' added.
* cnewfiledlg.ccp: A '.m' suffix was added to to the expected
suffixes for these types of source files.
* cproject.cpp: A file with a '.m' suffix is classified as a 'CPP_SOURCE'
file.
* grepdialog.cpp: A '.m' suffix was added to the file types to be searched.
** kdlgitems.cpp: The cursor was being set to wait cursor, but not always
reset back to the arrow cursor (I assume this is a bug - the code certainly
looks wrong - please see KDlgItems::itemSelected() ).
* highlight.cpp: Objective-C keywords added for syntax highlighting,
Objective-C label added to the syntax highlight selection pulldown menu.
* highkight.h: Added new class 'ObjcHighlight'.
Regards
-- Richard Dale
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdevelop-1.0beta3objc.patch.gz
Type: application/x-gzip
Size: 10568 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kdevelop/attachments/19990926/215f2cb3/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gnustepbase.kdevprj.gz
Type: application/x-gzip
Size: 6868 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kdevelop/attachments/19990926/215f2cb3/attachment-0001.bin>
More information about the KDevelop
mailing list