Objective-C support for KDevelop, KWrite and KDoc - SUBMISSION
Richard Dale
Richard_Dale at tipitina.demon.co.uk
Fri Oct 29 19:18:58 BST 1999
I sent this email with the patches as an attachment to the KDevelop list but I'm
afraid it was too big to get though Majordomo (thanks Sandy Meier for telling
me it went missing). I've ftp'd the package to the GNUstep site at
ftp.gnustep.org in the pub/incoming directory. Here is the text of my original
email again:
> Thankyou for putting my Objective-C patch for
> KDevelop-1.0beta3 on the KDevelop web site last month. Here is the same patch
> for kdevelop-1.0beta4 with some extras as 'kdeobjc.tar.gz'. This email
> supercedes the beta3 email. I've also ftp'd it to the GNUstep site, as it now
> includes support for all the GNUstep code (GNUstep is the equivalent of Qt/KDE
> libs for Objective-C).
Regards
-- Richard Dale
It contains the following.
-rw-rw-r-- duke/duke 3878 1999-10-28 14:21 README
-rw-rw-r-- duke/duke 17589 1999-10-28 12:08 gnustep.kdevprj
-rw-rw-r-- duke/duke 61508 1999-10-28 12:08 gnustepbase.kdevprj
-rw-rw-r-- duke/duke 93060 1999-10-28 12:08 gnustepgui.kdevprj
-rw-rw-r-- duke/duke 6527 1999-10-28 12:08 gnusteptesting.kdevprj
-rw-rw-r-- duke/duke 8547 1999-10-28 12:08 gnustepxgps.kdevprj
-rw-rw-r-- duke/duke 23954 1999-10-28 14:51 kdedocobjc.patch
-rw-rw-r-- duke/duke 4601 1999-10-28 12:06 kdevelop-1.0beta4autocopy.patch
-rw-rw-r-- duke/duke 42044 1999-10-28 12:06 kdevelop-1.0beta4objc.patch
-rw-rw-r-- duke/duke 3321 1999-10-28 12:07 kwriteautocopy.patch
-rw-rw-r-- duke/duke 3141 1999-10-28 12:06 kwriteobjc.patch
-rw-r--r-- duke/duke 883 1999-10-28 14:12 x-objcsrc.kdelnk
The text from the README file is below.
Regards
-- Richard
--README--
DESCRIPTION
Here are patches to provide Objective-C support for the KDevelop IDE,
the KWrite text editor and the KDoc javadoc-like documentation
extraction tool.
* kdevelop-1.0beta4objc.patch
* kdevelop-1.0beta4autocopy.patch
* kwriteobjc.patch
* kwriteautocopy.patch
* kdedocobjc.patch
The '..objc' patches add Objective-C support - syntax highlighting,
class browser, '.m' files as source and so on.
The '..autocopy' patches fix the KDE copy and paste behaviour so it
is similar to OPENSTEP or the Mac. Normally, if you just select some
text it automatically copies it to the clipboard (without using the
copy command on the edit menu).This might be ok if you're used to it,
but I found it very annoying.
The KDoc patch adds Objective-C parsing, and Objective-C versions of
the @see and @ref directives. eg '@ref -[Array count]' or '@see
#-init:forCoder:'.
I've created five KDevelop projects to cover the entire GNUstep
source tree (everything under the 'core' directory):
* ./core/Testing/gnusteptesting.kdevprj
* ./core/base/gnustepbase.kdevprj
* ./core/gui/gnustepgui.kdevprj
* ./core/xgps/gnustepxgps.kdevprj
* ./core/gnustep.kdevprj
This file is my attempt at defining a KDE mime type for Objective-C.
The kfm file manager can then tell that a '.m' file is an Objective-C
source.
* x-objcsrc.kdelnk
INSTALLATION
Download KDevelop-1.0beta4 from the KDevelop web site at
http://www.kdevelop.org. You will find instructions there on the other
resources needed to install KDevelop. KDoc is also on the KDevelop
site.
You will need to download KDbg for visual debugging, and
configure it to use a version of gdb which is patched for Objective-C.
KWrite is on the KDE web site (http://www.kde.org) in
kdeutils-1.1.2/kwrite. You don't need to have KWrite to use KDevelop,
but it's handy to have a separate text editor with the same language
syntax highlighting as the IDE.
Copy the five KDevelop projects to the directories in the GNUstep
source code tree as above.
Copy kdevelop-1.0beta4objc.patch and kdevelop-1.0beta4objc.patch to
the directory above KDevelopbeta4
$ cd kdevelop-1.0beta4
$ patch -p1 < ../kdevelop-1.0beta4objc.patch
$ patch -p1 < ../kdevelop-1.0beta4autocopy.patch
$ ./configure
$ make
$ make install
Copy the KDoc patch to the directory above kdoc
$ cd kdedoc
$ patch -p1 < ../kdedocobjc.patch
$ ./configure
$ make
$ make install
Copy kwriteobjc.patch and kwriteautocopy.patch to the directory above
kwrite.
$ cd kdeutils-1.1.2
$ ./configure
$ cd kwrite
$ patch -p1 < ../kwriteobjc.patch
$ patch -p1 < ../kwriteautocopy.patch
$ make
$ make install
Copy the KDE mime definition file 'x-objcsrc.kdelnk' to
/usr/share/mimelnk/text.
USAGE
Start up KDevelop, choose the 'Options->Syntax Highlighting' menu
remove the '*.h' pattern from the C++ syntax highlighting option, then
choose Objective-C syntax highlighting, add a '*.h' pattern. This is
so the editor will assume '.h' files are Objective-C rather than C++.
Open up a GNUstep project, and have fun exploring with the excellent
class browser. Generate the api documentation by using the
'Project->Make API-Doc' menu command to invoke kdoc. Then have some
more fun browsing the HTML documentation. Marvel at the class
hierarchy diagrams from the 'Show graphical class view' menu option.
No protocol inheritance I'm afraid though - the size of the
GNUstep hierarchy with protocols appeared to choke the diagram drawing
code.
For the purposes of browsing, category names are converted into class
names by concatenationg "<class name> '(' <category name> ')'"
together, and considering the category to be a sub-class of <class
name>.
KDevelop has CVS support, but I haven't worked out how to define the
GNUstep repository in the project files yet.
BUGS/FEEDBACK
Welcome at the email address below..
Regards
-- Richard Dale (Richard_Dale at tipitina.demon.co.uk)
-------------------------------------------------------
-------------------------------------------------------
More information about the KDevelop
mailing list