Why do we need another IDE?

Some people say they like Xcode. Well, I do not. It is a carelessly made design, very confusing and badly planned, which tries to do everything, and the result is that it doesn't do it well. There are symbols and options everywhere to the extent that you never find what you need. In particular, making an external compiler (like a Pascal compiler) work with it is a nightmare. Several people have worked on the problem, and although they manage to build scripts that can build applications, the system remains brittle and often fails.

Case in point: If you download a demo from Apple, you can spend a lot of time fiddling with project settings before you can build. With Lightweight IDE, it generally works right out of the box, maybe change some setting like adding a framework, and just compile and run!

This can be argued, but I conclude that another path would be valuable, if nothing else for getting a simpler, more focused and less confusing solution.

What is Lightweight IDE?

Lightweight IDE (LWP for short) is an easy-to-use application with the following major functions:

That is, it does everything important that Xcode does!

This is how it looks when running:

There are two special windows visible already, the message window (top-left) and the error message window (bottom-left). Text editor windows appear to the right (not tabbed, I like multi-window better). As you can see, there is syntax coloring, which is updated any time you save.

Find and replace is implemented and works pretty well. Multi-file search exists (but is a bit brittle so far so save first).

There are function and uses/#include pop-up menus.

This is what it looks like when debugging, with a breakpoint, single-stepping from it, while watching local variables.

No project file

One thing is very special with LWP: There is no project file! There are two reasons for this:

You may argue that the two message windows above are more than you really need, and I agree. In the long run, I hope to make the message window (the plain text one) optional, but right now we can't do without it.

No deep hierarchies

Did you ever notice that Xcode creates hilarious hierarchies of folders? You can navigate for some time just to find the application that you just compiled. LWP keeps everything nearby. Temporary files like .o and .ppu files (that you usually don't want to see) go into a sub-folder, while everything that you want to work with (source-code, nib files, compiled program...) is under your fingertips, just where it should be.

No toolbar, few visible controls

Skipping the toolbar and making the editor non-tabbed is daring today. The idea is to minimize the litter on screen to put full focus on the source-code. I can add a toolbar any day! Adding stuff is easy, taking it out is hard.

Reasonably small

At less than 2 Mb (universal binary), it is a small application by modern standards. Xcode is 48 Mb! The small size means that it is fast in many ways, startup in particular.

Application bundles

When you compile an application, LWP automatically creates a bundle, with the most necessary files, moves the executabe there, and also copies resource, nib and icns files present in the same folder as the main program file, if they share the same name.

Support for Pascal, Object Pascal, C, C++, ObjC, Ada, Shellscripts

LWP is designed for building Mac applications using FPC or GCC, using Pascal, Object Pascal, C or C++ and Objective-C. I mainly test with Pascal and C. It has partial Java support, but nobody seems to want it so it is not developed further. It also has some support for shellscripts and Ada. I would like to add more C++ and ObjC demos.

The editor has syntax coloring, functions pop-up menu and uses/#include pop-up menu supporting both C and Pascal, and can analyze error messages from both FPC and GCC.

Compiling and linking with both C and Pascal units

Mixing languages requires some special tricks, but LWP is not entirely helpless.

C in Pascal: If you open a C file and build, it creates a .o file (not in the intermediate-files folder but in the same folder as the source). If your Pascal program includes a LinkLib preprocessor statement (i.e. {$LinkLib 'MyCLib.o'} then it will try linking with it. Look in examples.

Pascal in C: From version 0.2, there is a way to build C application with Pascal units, using the "file list" strategy. Compile the Pascal units to object code, and then include the .o file in the file list. You probably also need to include runtime libraries.

What is missing?

No, it isn't the world's best IDE yet. A couple of things are missing:

Well, and a million other gripes and wishes, but of less importance, and of course this:

Other languages?

LWP only fully supports Pascal and C/C++/Objective C. It also has limited support for Java, Ada and shellscripts.

Plug-in modules to support other languages? It can be done, but it would make the IDE a lot more complex. It will be considered if someone wants it and can justify it.

Through makefiles and shellscripts, LWP can really do anything (LWP can execute shell scripts and makefiles), but that is a primitive solution that allows little intelligent use of the results.