CodeGuide |
This document gives answers to frequently asked questions about Omnicore CodeGuide 1.2.
Questions
- How can I create a new file with CodeGuide?
- How can I open a file with CodeGuide?
- How can I save a file into another directory?
- What are the Source directories, destination directory, API source directories and API class directories in the Project Browser?
- How do I configure different JDKs in CodeGuide?
- How can I get the smart features going?
- How can I use third party Java APIs (like JGL or Java3D) with CodeGuide?
- Why does CodeGuide not show the names of method parameters in some cases?
- Does CodeGuide support Java 2 (JDK 1.2)?
- How can I integrate CodeGuide with other Java tools?
- What does the Execute button and Project > Execute do?
- What does Project > Build and Project > Rebuild do?
- What does Build, Build all, Rebuild and Rebuild all in the directory popup menu do?
- How can I use the regular expression with Search and Replace?
- Why does CodeGuide exit quietly if started a second time?
- How can I make CodeGuide perform better on my computer?
- Why does CodeGuide take such a long time to start?
How can I create a new file with CodeGuide?
To do file operations with CodeGuide you can use the integrated File Browser. This File Browser works like the Windows Explorer. To create a new file follow these steps:
- Dig down to the directory where you want to create the file and select it with a mouse click.
- Use the context menu to select New file.
- Afterwards you can change the name of the newly created file.
How can I open a file with CodeGuide?
To open a file in CodeGuide open the integrated File Browser and dig down to the desired file. Afterwards you can open the file with either a double click or by using the context menu.
How can I save a file into another directory?
To save an open file into another directory just select the directory the file will be saved in by using the File Browser and select Save ... into ... in the context menu. Afterwards you can change the name of the saved file.
What are the Source directories, destination directory, API source directories and API class directories in the Project Browser?
The Project Browser is separated in four categories to which you have to mount different kinds of directories. These categories can be considered as specialized classpaths.
Source directories
Mount all the directories which contain java source files which should be compiled as well as possible resources of your current project to this category.
Destination directory
This directory specifies where compiled classes are stored. If this category is empty classes are stored where their corresponding sources are.
API source directories
Mount all the the directories which contain sources of APIs used by your current project to this category. Source files mounted in this category will not be compiled. They are rather used to obtain additional information for the code analysis.
API class directories
Mount all the the directories which contain classes of APIs used by your current project to this category. The classes are required to compile and execute your project.
Hint:
The system classes are configured in the Environment Section in the Preferences Dialog. You do not have to change these settings normally.
How do I configure different JDKs in CodeGuide?
To configure a JDK in CodeGuide use the Environment Section in the Preferences Dialog. To automatically configure a new JDK use the Search for JDKs function in this dialog. Afterwards you can manually alter the configuration, for example change the compiler or enter additional parameters for the VM in the advanced settings dialog.
How can I get the smart features going?
CodeGuide shows you errors in your java programs instantaneously. It also gives you assistance for method and constructor invocations and it automatically creates a structured view of your source. However these features do only work properly for a file if the following conditions are true
- the file ends with ".java",
- the file is in CodeGuide's sourcepath or API sourcepath,
- the sourcepath matches the package declaration in the file
- and all the APIs used by the file are contained in the sourcepath, API sourcepath or API classpath and the selected environment has been configured properly.
How do I use third party Java APIs (like JGL or Java3D) with CodeGuide?
To use a third party API you have to adjust your classpath to make the API known to CodeGuide. To do this select the directory (or the jar/zip file) containing the .class files of the API in the File Browser, open the context menu and choose the Add to... > API class directories-item. Whenever possible set an API source path as well by choosing the Add to.... > API source directories-item. Setting a source path enables CodeGuide to show not only the type of expected parameters of methods and constructors but their names as well. Class files do not contain that information. (See next answer for details).
Why does CodeGuide not show the names of method parameters in some cases?
CodeGuide uses the API as specified by the API classpath or API sourcepath. If you have set both a sourcepath and a classpath of an API, CodeGuide uses the source files to obtain the names of method parameters. If you only have an API classpath set CodeGuide uses these class files. Since class files do not contain parameter names CodeGuide is not able to show them in this case. If you want to see parameter names you have to put the source code of the API into the API source path.
Does CodeGuide support Java 2 (JDK 1.2)?
You can write programs for Java 2 (JDK 1.2) with CodeGuide. You just have to configure the JDK 1.2 as an environment using the Environment Section in the Preferences Dialog.
How can I integrate CodeGuide with other Java tools?
CodeGuide has built-in support for third-party compilers, VMs and appletviewers, which are invoked directly by CodeGuide. To customize how compiler, VM and Appletviewer are invoked use the Environment section of the Preferences Dialog.
CodeGuide does not use a proprietary repository or project files, it works on your source tree instead. CodeGuide is able to synchronize itself with the source tree whether files are changed by CodeGuide or externally by another tool. That is why CodeGuide can work together with other tools which themselves work on the source tree.
You can supply files you want CodeGuide to load on the command line. Once CodeGuide is started it acts as a server. So if you start CodeGuide again supplying files to be loaded the file specification is communicated to the running CodeGuide and loaded into it.
What does the Execute button and Project > Execute do?
Both invoke the current default executable. The default executable can either be a html-file in which case the appletviewer is invoked or a java/class-file in which case the VM is invoked. To set the default executable select the file in the File or Project Browser open the popup menu and choose select as default executable. Afterward execute will start the desired file.
What does Project > Build and Project > Rebuild do?
Project > Rebuild feeds all Java files contained in the source paths and their descendant subdirectories to the external compiler of the current environment. This causes all your project source files to be recompiled.
Project > Build feeds all Java files contained in the source paths and their descendant subdirectories to the external compiler of the current environment, for which no newer class file is found. This causes all modified source files and all new source files of your project source files to be recompiled. Use Build for day to day use. Project > Build does not check the dependencies of source files and can therefore not find out, which files have to be recompiled. If you are unsure about the consequences of the changes you have made use Project > Rebuild to be sure that your project is consistent after compilation.
What does Build, Build all, Rebuild and Rebuild all in the directory popup menu do?
Rebuild causes all source files contained in the directory to be compiled by the external compiler.
Rebuild all causes all source files contained in the directory and all source files contained in all descendant directories to be compiled by the external compiler
Build causes all source files contained in the directory for which no newer class file can be found to be compiled by the external compiler.
Build all causes all source files contained in the directory and all source files contained in all descendant directories for which no newer class file can be found to be compiled by the external compiler.
Why does CodeGuide exit quietly if started a second time?
Once CodeGuide is started it acts as a load server. So if you start CodeGuide again supplying files to be loaded the file specification is communicated to the running CodeGuide and loaded into it. If you do not supply any arguments CodeGuide has nothing to communicated and exits quietly.
How do I use the regular expressions with Search and Replace?
The regular expressions used by CodeGuide are compatible with Perl 5 regular expressions.
How can I make CodeGuide perform better on my computer?
CodeGuide can only be as good as the VM (Virtual Machine) it is running on. The performance of the VM in turn is limited by the hardware. To offer some previously unseen advanced features such as error checking and member completion CodeGuide needs to retain some information about your source code and the used APIs in memory. That leads to a higher memory consumption than that of other conventional IDEs. If your computer swaps a lot when running CodeGuide and you want to buy new hardware, more memory will be a good investment.
However CodeGuide was designed to perform as good as the VM permits, if you have the proper VM for your environment installed (See the README.HTML file for details). Here are some tips to increase performance of CodeGuide on your computer:
- If you have not already done so - turn on the JIT (Just-In-Time) Compiler. This increases performance drastically.
- Make sure CodeGuide gets enough memory. Starting the VM with "-ms16m" can dramatically improve the performance.
- Make sure there are not too many other memory consuming applications running.
- To get a better startup time make sure CodeGuide is installed on your local harddisk.
Platform-specific hints:
Microsoft Windows 95/98/NT
- Use the Microsoft VM Build 3155 or higher with the JIT enabled. (The JIT can be enabled by using the Advanced Section of the Internet Options menu in the Internet Explorer).
- Use JDK 1.1 in favor of JDK 1.2 for better GUI performance.
- The JDK 1.2 HotSpot VM increases the speed of the smart features significantly. However the GUI performance of JDK 1.2 is not yet reached the GUI performance of JDK 1.1. As soon as Sun releases a maintenance release of JDK 1.2 with improved GUI performance JDK 1.2 HotSpot will probably become a good choice.
Solaris
- Use the JDK 1.1 Production release available from http://www.sun.com/java not the reference implementation available from Javasoft.
Linux
- Use IBM JDK 1.1.6 alpha for Linux
- If you use the Blackdown JDK install the TYA Just-In-Time Compiler and use green threads if you do not have a multi-processor machine (Green-threads give better response time in the GUI)
- Use an accelerated X-Server.
Other platforms
- Make sure you have the latest release of the JDK for your platform installed.
Why does CodeGuide take such a long time to start?
CodeGuide loads all needed classes on startup to limit the response time of the application to the minimum possible. Thus the time for CodeGuide to start is dominated by the class loading time. Class loading time depends on the VM implementation and may greatly vary (Fastest known classloader is implemented in the Microsoft VM). Storing CodeGuide on the local harddisk instead of a network-mounted drive results in a significant speedup of the startup process.
Copyright © 1999 Omnicore Software |