AMAPstudio

### Sidebar

NotePad++ is an open source and powerfull code editor for Windows. Features:

• Coloration
• Easy indentation
• Integrated console
• Powerfull search functions…

### Configuration with Capsis

• In menu → plugins → NppExec → Excecute : enter the command you want to execute, for instance :
• c:\capsis4\ant.bat compile

TextPad is a general purpose editor with coloration and compilation command for Windows.

TextPad is a shareware (It is not an Open Source / Libre Software).

### Configuration with Capsis

• Open Configuration panel : ConfigurationPreferences
• Click on the Tools item
• Delete existing java tools with the delete button (red cross).

(This way, compile in Capsis will be the first entry in the menu with the usual shortcut CTRL+&. The standard Java tools will be restored later.)

• Click AddProgram and select your_capsis_directory/src/javac_capsis.bat
• Click Add → Java SDK Commands to restore previously removed java tools.
• When editing a java source file, you can compile with the following command : Tools → external tools → Compile

# Scite Editor (Linux user)

Scite is a simple editor available on Linux system. Use your system installer to install it.

For instance, for Ubuntu distribution use:

sudo apt-get install scite

### Configuration with Capsis

• Go to Options → Open User Options file
• Add the following lines in the file (Replace my_capsis_dir by the full path of your capsis4 directory)
command.compile.*.java=sh my_capsis_dir/bin/javac_capsis.sh $(FileNameExt) command.build.*.java=sh my_capsis_dir/bin/javac_capsis.sh$(FileNameExt)
command.go.*.java=java \$(FileName)
• Save the file

You can now compile in Scite !!

See this note if you want to compile Capsis and Jeeb in Scite.

· 2008/11/28 15:59 ·

# Using Eclipse

### Presentation

Eclipse is an IDE (integrated development environment). It intends to facilitate the developer works with integrated tools. Interessing features are

• A powerfull editor with completion and refactoring capabilities
• Version repository access (CVS, SVN)
• Debugging tools / Profiling
• Test framework

<note information> You don't need to use Eclipse to integrate your model in Capsis. Eclipse IDE has very advanced functionalities and can be a bit complex for occasional programmers. If you are not sure that Eclipse is for you, you can still use your own editor (like Textpad or Scite). See using textpad scite </note>

We recommend to use the last version of eclipse : Ganymede

### Import Capsis from SVN

1. Install Eclipse Subversive SVN plugin
• With more recent versions of Eclipse, you can install Subversive - SVN Team Provider with the Eclipse marketplace that you find in the help menu.
2. New project → Project from SVN
3. Create a new repository location
4. Select trunk
5. Click Finish
6. Select Check out as a porject with the name specified and enter capsis4
7. Click Finish

### Build Capsis

• Capsis4 will be imported as a java project. Eclipse will manage compilation.
• It is not necessary to edit the build path since configuration files are already under version control
• If you need to customize compilation process
• go in the project properties.
• ensure that source folders on build path and default output folder are set to capsis4/bin
• ensure that all .jar are in the build path by using the button Add jars

### Run Capsis

• Click on the Run Button.
• You can add a particular configuration
• Run → Run configuration
• Select Java Application
• New launch configuration
• Specify the main class (here capsis.app.Starter)

### Troubleshooting

• If you have to press twice the run button before Capsis really starts then replace the file capsis4/.project by the following one :
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>capsis4</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
• If the visu 3D do not work when you launch capsis with Eclipse under Windows, then add the path of the corresponding nativewindow_jvm.dll among your system variables. For example, for a windows 64 : /capsis4/ext/windows64/nativewindow_jvm.dll (does not work with recent version of eclipse)
· 2008/11/24 10:47 ·

# Configuring Textpad to open the file in error at the given line

Afer a compilation, if there are errors, it is possible to double click on the “file:line” reference to open the file for correction.

Check this configuration :

• Configuration > Preferences > Tools
• Select javac_capsis
• Check the regular expression in the matching field (1)

If trouble with the expressions (double clicking does not open the file):

• Help > “Regular expressions matching the compilation errors” link
• Copy the expression for java; e.g. ^$[A-Za-z]:[^:]+$:$[0-9]+$:
• Paste it in the field (1) upper