<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.openclonk.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Domtron</id>
	<title>OpenClonk Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.openclonk.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Domtron"/>
	<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/w/Special:Contributions/Domtron"/>
	<updated>2026-04-28T17:45:22Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.44.5</generator>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=C4DT_Installation_Guide&amp;diff=1414</id>
		<title>C4DT Installation Guide</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=C4DT_Installation_Guide&amp;diff=1414"/>
		<updated>2013-11-08T19:41:21Z</updated>

		<summary type="html">&lt;p&gt;Domtron: /* Prerequisites */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Prerequisites==&lt;br /&gt;
First you need to install Eclipse itself. This is relatively straightforward. Go to the [http://eclipse.org/downloads/ Eclipse Download Page] and download the &#039;&#039;Eclipse for Java Developers&#039;&#039; package. Eclipse does not require running an installer. Just unpack the folder somewhere and run the Eclipse program inside it. Unless you don&#039;t have Java installed Eclipse should boot although that might take a while. On first boot, Eclipse will usually ask you to provide a workspace location. That&#039;s the folder Eclipse will create projects in by default. Set it as you like.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note to Linux Users&#039;&#039;&#039;: Download Eclipse from its website even if it is available from your distribution&#039;s repository. A number of Linux users have had [http://askubuntu.com/questions/282951/how-to-completely-uninstall-eclipse problems] when eclipse is installed from the repo.&lt;br /&gt;
&lt;br /&gt;
==Installing C4DT==&lt;br /&gt;
Installing C4DT (Clonk Development Tools) is the next step to tailor that generic Eclipse installation you now have for the purpose of editing C4Scripts and other OpenClonk files with it. It is a plug-in that provides a number of improvements you might know from other IDEs. Among those are&lt;br /&gt;
* Content Assistance (similar to IntelliSense from Visual Studio)&lt;br /&gt;
* Error recognition (to not have to boot up the engine for getting a list of syntax errors)&lt;br /&gt;
* Navigation (clicking on identifiers, getting to their declaration locations)&lt;br /&gt;
* Debugging scripts (suspending execution of scripts, executing them in single steps)&lt;br /&gt;
To install C4DT, you first have to add its update site to the list of update sites Eclipse is maintaining. An update site is a location (usually on some web site although it can be local as well) Eclipse can download plug ins from. Once downloaded, those plug ins will also be updated from the same update site if Eclipse finds new versions of the plug-in there. To add an update site, go to Help -&amp;gt; Install New Software and press the Add button in the Install window.&lt;br /&gt;
[[File:Eclipse_InstallWindow.png|left]]&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
C4DT&#039;s Update Site is currently [http://www.openclonk.org/c4dt/ http://www.openclonk.org/c4dt/]. Add the Update Site (the name you choose for the site is of no concern), select it if that didn&#039;t happen automatically and you should see two items for installation:&lt;br /&gt;
[[File:EclipseAvailableFeatures.png|left]]&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
The first one is the C4DT plugin itself that contains all the functionality. The second one is a German language pack you can optionally install as well. Note though that only functionality added by C4DT is translated. The rest of Eclipse stays in English. To change that, head over to the [http://www.eclipse.org/babel/downloads.php Eclipse Babel Project] and install language packs from there. After pressing &amp;quot;Next&amp;quot; quite a few times, accepting the license (which is supposed to be the same as the one OpenClonk uses), agreeing to install unsigned content and restarting Eclipse, C4DT should be installed. A sign of success would be having a Clonk menu item in the main menu.&lt;br /&gt;
&lt;br /&gt;
==Setting Eclipse up for Clonk development==&lt;br /&gt;
[[File:Eclipse_ChoosePerspective.png|right]] Now that C4DT is installed Eclipse needs to be set into Clonk mode. Press the button in the top-right of the window and &amp;quot;Other...&amp;quot;.&amp;lt;br clear=all/&amp;gt;[[File:Eclipse_Perspectives.png|border|right]] You should see a window listing the available perspectives Eclipse can be put into. Choose the one named &amp;quot;Clonk&amp;quot;.&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
In Eclipse lingo, a perspective is a default configuration on what views the main window should contain and how those views are arranged. There are perspectives for working on various tasks, like synchronizing code with a repository or working on a Java project. C4DT adds a Clonk perspective that by default looks like this:&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
[[File:Eclipse_DefaultClonkPerspective.png|border]]&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Initial configuration==&lt;br /&gt;
What now needs to be done is setting some default preferences that C4DT will need to not completely screw up. Open up the preferences (Window -&amp;gt; Preferences) and go to the Clonk section:&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Eclipse_ClonkPreferences.png|left]]&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The preferences are divided into preferences to control the general behaviour of the plug-in (below) and engine-specific preferences (on top).&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Set the game path for OpenClonk to the planet folder in your repository.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The two fields &amp;quot;C4Group Executable&amp;quot; and &amp;quot;Engine&amp;quot; will be filled out automatically if suitable executables are contained in the planet folder. If those are to be found somewhere else in your case, select them manually.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The repository field isn&#039;t exactly needed at the moment but you can set it to the path to your repository (not the planet folder) anyway.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This is all you need to set in the preferences but of course you can configure other things to your liking. Specifying Syntax highlighting colours used in Clonk text editors (expand the Clonk item in the tree view on the right) or keyboard short cuts (General -&amp;gt; Keys) come to mind.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When you&#039;re done, press OK.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Getting OpenClonk content into Eclipse==&lt;br /&gt;
&amp;lt;p&amp;gt;Now notice the Project Explorer view. It&#039;s glaringly empty. To fill it with OpenClonk content, open up the Clonk project wizard by pressing File -&amp;gt; New Clonk Project.&amp;lt;/p&amp;gt;&lt;br /&gt;
[[File:Eclipse_NewClonkProject.png|left]]&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Choose the name of the project. &amp;quot;OpenClonk&amp;quot; is advisable but in the end it&#039;s up to your preference.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The following steps differ based on whether you cloned the OpenClonk repository or downloaded an official release.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Cloned from Repository&#039;&#039;&#039;&lt;br /&gt;
:&amp;lt;p&amp;gt;Eclipse will create projects in its workspace folder. But in the case of OpenClonk this is not suitable since all the game content is contained in the planet folder. Luckily, Eclipse provides a mechanism for such situations. It allows you to create projects from folders arbitrarily located in the file system. To use that mechanism uncheck &amp;quot;Use default location&amp;quot; and provide the path to the planet folder. This might feel kind of redundant since you already specified that path in the preferences and well, it is.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Downloaded official release&#039;&#039;&#039;&lt;br /&gt;
:C4Groups in the official release are packed. C4DT can read packed c4groups, but not modify them. To access the content of packed groups, you have two choices. You can&lt;br /&gt;
:* &#039;&#039;link to those groups.&#039;&#039;&lt;br /&gt;
::For that purpose, there is a link tab in the Clonk Project Wizard that enables you to add groups to be linked to the new project. Add all the .c4d/.c4f/.c4g files from the OpenClonk installation. When you finish the wizard later on, the linked groups will be displayed like regular folders, except for a link sign on the icon ([[File:EclipseLinkedGroup.png]])&lt;br /&gt;
::To actually edit stuff, you need to create a new project that references the project containing the linked c4groups. Actually, this is not strictly necessary but advisable to keep things clear.&lt;br /&gt;
::For referencing other projects (making stuff defined in that project known to the other project), use the Project References tab in the wizard. For changing project references later on, open the properties of a project (right click on the project in the Project Explorer, then select &amp;quot;Properties&amp;quot;) and go to the Project References section.&lt;br /&gt;
:* &#039;&#039;import the groups.&#039;&#039;&lt;br /&gt;
::The groups will be unpacked into the Eclipse workspace folder and modifying the unpacked files there won&#039;t be modify the original groups. Add groups to be imported from the Importing tab in the wizard.&lt;br /&gt;
::If you plan on modyifing content from the releases you could think about whether it wouldn&#039;t be better to clone from the repository so you will be able to track your modifications using version control.&lt;br /&gt;
* &#039;&#039;&#039;Both&#039;&#039;&#039;&lt;br /&gt;
:Next, you should set the engine to &amp;quot;Open Clonk&amp;quot;. When leaving it set to &amp;quot;Default engine&amp;quot; the project&#039;s engine will always be equal to the one selected in the preferences which might be troublesome when mixing Clonk Rage and Open Clonk projects in one workspace.&lt;br /&gt;
&lt;br /&gt;
==The Result==&lt;br /&gt;
&amp;lt;p&amp;gt;After creating the OpenClonk project and waiting a bit for Eclipse to analyze all the scripts you should be presented with a vista such as this:&lt;br /&gt;
[[File:Eclipse_OpenClonkProjectCreated.png]]&amp;lt;br clear=all/&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In its current state, C4DT should more or less be able to parse all the scripts and not litter the problems view with false positives. When new functions are added to the engine (which tends to happen quite a lot with an engine still in development) those functions will be unknown to Eclipse at first, hence its complaining. But fear not, as those gaping holes of ignorance will sooner or later be stuffed.&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>Domtron</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Temporary_test_page_for_content_development_with_Eclipse&amp;diff=1410</id>
		<title>Temporary test page for content development with Eclipse</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Temporary_test_page_for_content_development_with_Eclipse&amp;diff=1410"/>
		<updated>2013-11-04T02:23:32Z</updated>

		<summary type="html">&lt;p&gt;Domtron: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This guide covers the basics of using Eclipse to create, organize, and test content for Open Clonk. Eclipse is an extensible opensource [http://en.wikipedia.org/wiki/Integrated_development_environment Integrated Development Environment] (IDE) written in Java. Before you can start this guide you need to follow the instructions in the [[C4DT Installation Guide]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Once you have finished reading this guide and have a basic understanding of the C4DT interface you can continue onto the next step in the [[Content Developers Guide]]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Problems&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;p&amp;gt;If you run into any problems while using Eclipse checkout our [[C4DT_FAQ#Eclipse and C4DT FAQ&#039;s|Eclipse FAQ section]] or post your question in our [http://forum.openclonk.org/board_show.pl?bid=16 help forum]. Please notify us of any problems or bugs with this guide on the help forum&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=C4DT Basic Usage=&lt;br /&gt;
&amp;lt;p&amp;gt;As of now, you should have created an OpenClonk project and be sitting in front of something that is quite comparable to the original Clonk Editor. On the left side you have the Project Explorer (or on the right side or wherever you like, since all views can be freely arranged in Eclipse). You can use it to navigate packets as you&#039;d do when using the editor.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Unlike the editor though, files are generally openend not it an external program but in a tab in the Eclipse window. You can still set programs to handle specific files by either using the Open With command in the context menu of the Project Explorer or by setting a program in the preferences. The first method works on a file-by-file basis so you could tell Eclipse to open a specific graphics file with Photoshop while opening others with Paint. The second method (Preferences -&amp;gt; General -&amp;gt; Editors -&amp;gt; File Associations) sets a file association for all files of that type.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Eclipse provides different internal editors for different file types. For Clonk-specific files, C4DT adds some more to the list. Among those are a&lt;br /&gt;
*C4Script Editor&lt;br /&gt;
*Landscape.txt Editor&lt;br /&gt;
*Ini Files Editor (DefCore.txt, ActMap.txt etc)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;All editors provided by C4DT offer suitable syntax highlighting. Apart from that they include special support for the types of files they were intended for:&amp;lt;/p&amp;gt;&lt;br /&gt;
*The C4Script Editor is supposed to help you write scripts more quickly by displaying errors and warnings contained in the script as soon as you save them and offering you a list of identifiers you can insert in specific places. It also tries to make writing properly formatted scripts easier by automatically inserting closing brackets and indenting. In addition to that it also strives to make navigation among and inside scripts easier by hyperlinking between them and providing an outline of the script.&lt;br /&gt;
*The Landscape.txt Editor is tailored for editing - surprise! - Landscape.txt files. Sadly, it doesn&#039;t offer a live preview on how the generated map would look like so it&#039;s probably a good idea to use Mape instead. There are plans to include similar functionality directly in Eclipse though.&lt;br /&gt;
*The Ini Files Editor also includes support for hyperlinks.&lt;br /&gt;
==Navigation==&lt;br /&gt;
&amp;lt;p&amp;gt;Navigating to and between scripts quickly is very important. Because of that, C4DT adds several navigation features:&lt;br /&gt;
*[[File:Eclipse_Hyperlinks.png|right]] &#039;&#039;&#039;Hyperlinks&#039;&#039;&#039;: All valid identifiers can be turned into links by pressing Ctrl/⌘ while hovering over the identifier with your mouse. When you click on them the declaration location of the thing the identifier is referring to will be opened. This works for variables, functions, definitions and also for StringTbl entries ($BlaBla$). [[File:Eclipse_HyperlinksIni.png|right]] Identifiers in ini editors can also be turned into hyperlinks.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
*[[File:Clonk_OpenObject.png|right]] &#039;&#039;&#039;Open Object Dialog&#039;&#039;&#039;: The Open Object dialog can be activated using the Clonk menu in the main menu. As soon as you start typing the dialog starts listing definitions that match the typed text.&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:Eclipse_BackForward.png|right]] &#039;&#039;&#039;Going back and forward&#039;&#039;&#039;: When clicking on hyperlinks or navigating to other files by any other means you will always be able to go back to the original file by either pressing Alt+Left or using the yellow arrows in the toolbar. On a Mac, you can also install [http://marketplace.eclipse.org/content/eclipse-multi-touch Eclipse Multitouch] to navigate back and forth using gestures.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
[[File:Eclipse_DeclarationsFilter.png|right]]&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;&#039;Lookup Declaration&#039;&#039;&#039;: From any script or when having selected a file in the project explorer, you can invoke Lookup Declaration from the Clonk menu (also a candidate for a nice keyboard assignment). You can then filter all the declarations from the current selection (either the project selected in the project explorer or the script being currently edited including its #includes) using regular expressions and jump to the declaration of any identifier matched by the expression.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Getting Content Assistance==&lt;br /&gt;
&amp;lt;p&amp;gt;When you are editing a script you can invoke a list offering you identifiers to insert. This list is context-sensitive so it will display different options depending on whether the cursor is inside a function or not or whether you are invoking it after having written &#039;-&amp;gt;&#039;. The short cut for the Content Assist list is Ctrl+Space but like any other short cut it can be changed in the preferences.&amp;lt;/p&amp;gt;&lt;br /&gt;
[[File:Eclipse_ContentAssist.png]]&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Improvements compared to generic text editors==&lt;br /&gt;
The C4Script editor adds special behaviour for some situations. Those are:&lt;br /&gt;
*[[File:Eclipse_AutomaticBlock.png|right]] Automatic block: When typing &#039;{&#039; and then pressing Return a block will be created automatically and the caret will be placed inside the block indented by one tab.&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
*[[File:Eclipse_AutomaticParmBrackets.png|right]] When you type &#039;(&#039; or &#039;[&#039; the corresponding closing bracket will be automatically inserted. In order to not interrupt your typing those inserted closing brackets will be overridden if you type them by hand subsequently. In this special situation, pressing tab will cause the caret to jump over the closing bracket.&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
*[[File:Eclipse_ParmHint.png|right]]Parameter hints: As soon as you enter the brackets of a function call the parameters will be displayed above, not at all by chance similar to C4Scripter. The mechanism to find the right parameters to display is kind of smart and will also work when calling a function on an object using &#039;-&amp;gt;&#039; as long as C4DT can deduce the object type of the expression left to &#039;-&amp;gt;&#039;.&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
*[[File:Eclipse_AutoFunction.png|right]] When you want to declare a new function you can type the name and then invoke Content Assistance (Ctrl+Space). A function block will be created for you.&lt;br /&gt;
&lt;br /&gt;
==Outline==&lt;br /&gt;
[[File:Eclipse_Outline.png|right]] &amp;lt;p&amp;gt;C4DT Editors fill the Outline view with an outline of the files being edited. The default Clonk perspective places the outline on the left below the Project Explorer.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The outline allows you to filter the list of declarations using a regular expression or wildcard.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The outline also shows types of variables and return types of functions, as inferred by the internal C4Script parser. Of course, since C4Script is relatively dynamic in its nature with eval and arbitrary attribute setting and the like, all those type inferences are without guarantee and might not reflect the true usage of the variable. A question mark following the type signals that the parser detected the possibility of the variable having just about any type so the weather forecast character is even more pronounced in that case.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Type guesses in the form of [x-y: &amp;lt;type&amp;gt;] represent cases where the expression is anticipated to have some array type where the range from x to y is of the given type. There could also be some additional &#039;…&#039; thrown in which would signify that the array will probably have more elements at runtime than those in the specified range.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Errors &amp;amp; Warnings==&lt;br /&gt;
[[File:Eclipse_ProblemsView.png|right]] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The script parser built into C4DT tries to detect lots of potential and actual errors, which are listed in the problems view. A script is reparsed when it gets saved. In some cases errors might become stale and won&#039;t get removed from the list automatically. What you can then do is Clean the project using Project -&amp;gt; Clean. This will reparse all the scripts in either the entire workspace or specific projects and hopefully remove the false errors.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For a list of warnings &amp;amp; errors take a look at [http://bitbucket.org/mortimer/c4dt/src/tip/C4DT/src/net/arctics/clonk/parser/ParserErrorCode.java ParserErrorCode.java].&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Errors and Warnings listed in the Problems View can be individually deactivated if they annoy you. To do that, open up the properties window for the project you want to configure, select the Clonk category and deactivate kinds of errors/warnings to your heart&#039;s content.&amp;lt;/p&amp;gt;&lt;br /&gt;
[[File:Eclipse_ProblemsFilter.png]]&lt;br /&gt;
&lt;br /&gt;
==Quick Fixes==&lt;br /&gt;
[[File:Eclipse_QuickFix.png|right]]&lt;br /&gt;
&amp;lt;p&amp;gt;For certain common cases of errors, c4dt offers automatic quick fixes which are offered to you when you press Ctrl/⌘+1 while having the cursor in a script inside a region marked as erroneous/problematic.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Additional Views==&lt;br /&gt;
&amp;lt;p&amp;gt;C4DT adds a handful of views. Two of them will get placed in the same tabzone as the Outline view by the Clonk perspective.&amp;lt;/p&amp;gt;&lt;br /&gt;
*The Preview view serves as a replacement for the preview feature found in the Clonk Editor.&lt;br /&gt;
*The Clonk Folder view enables quick access to packed c4group files inside the game folder of the engine set for the project whose files you are currently editing.&lt;br /&gt;
&lt;br /&gt;
==Auto-Refresh==&lt;br /&gt;
[[File:Eclipse_AutoRefresh.png|right]]&lt;br /&gt;
&amp;lt;p&amp;gt;When updating your local repository clone, Eclipse tends to get confused because it keeps its own cache of file contents which won&#039;t match with the actual file contents after updating, so messages like &#039;This and that is out of sync with the file system&#039; will pop up. To remedy that, you can open the General-&amp;gt;Workspace preferences and set the settings as shown on the right.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Running Scenarios from Eclipse==&lt;br /&gt;
[[File:C4DT_Run_Scenario.png|right]] You can run scenarios by selecting it in the Project Explorer and then selecting the option Run Scenario found in the popup menu of the Run button (the green one with the white play symbol).&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Debugging===&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:C4DT_Debug_Persp.PNG|right]] To execute scripts one-instruction-at-a-time and inspect values while the script is halted, you have to switch to the debug perspective first. The layout of the main window changes to acommodate debugging. You can still arrange the views as you want but changes to the layout done while in the debug perspective will stay in the debug perspective, so as soon as you switch back to the Clonk perspective your old layout will be restored.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:C4DT_Breakpoint.PNG|right]] Apart from window layout there are also some keyboard shortcuts that become available. Among those is the shortcut to create a breakpoint. By default, it&#039;s Ctrl+Shift+B. You can open any c4script and place a breakpoint in a line that contains function code by using that shortcut (or alternatively right-clicking the ledge on the left and clicking &amp;quot;Toggle Breakpoint&amp;quot;).&amp;lt;/p&amp;gt;&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:C4DT_Debug_Button.PNG|right]] To run a scenario in debug mode all you have to do is pressing the Debug button instead of the Run one. The engine will now be halting script execution as soon as it encounters an instruction marked by a breakpoint. Eclipse will highlight the location where script execution halted. Now various views can be utilised to gain information about the current state of variables and objects. More on those views below.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Now that execution is halted you can do three things:&lt;br /&gt;
*Step Into: The instruction at the current execution position will be executed. If the instruction contains a function call, the debugger will jump into the function and allow you to continue stepping inside that function. Default keystroke: F5&lt;br /&gt;
*Step Over: Same as Step Into with the exception that the debugger won&#039;t go into subordinate function calls. Default keystroke: F6&lt;br /&gt;
*Resume: Resume script execution. The engine will run normally until the next breakpoint is encountered. Default keystroke: F8&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Variables===&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:C4DT_Variables_View.PNG|right]] The Variables view displays local variables and parameters of the function being executed.&amp;lt;/p&amp;gt;&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Expressions===&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:C4DT_Expressions_View.PNG]]&amp;lt;br clear=all/&amp;gt; The expressions view displays a list of user-defined expressions that get evaluated after every execution step. It is evaluated in the context of the calling object so expressions like &amp;quot;GetName()&amp;quot; will work as expected. Local variables and parameters can in principle be used in expressions but evaluation of such expressions might be buggy.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To add new expressions right-click into the view and select &amp;quot;Add Watch Expression&amp;quot;.&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>Domtron</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Temporary_test_page_for_content_development_with_Eclipse&amp;diff=1409</id>
		<title>Temporary test page for content development with Eclipse</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Temporary_test_page_for_content_development_with_Eclipse&amp;diff=1409"/>
		<updated>2013-11-04T02:12:34Z</updated>

		<summary type="html">&lt;p&gt;Domtron: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This guide covers the basics of using Eclipse to create, organize, and test content for Open Clonk. Eclipse is an extensible opensource [http://en.wikipedia.org/wiki/Integrated_development_environment Integrated Development Environment] (IDE) written in Java. Before you can start this guide you need to follow the instructions in the [[C4DT Installation Guide]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Once you have finished reading this guide and have a basic understanding of the C4DT interface you can continue onto the next step in the [[Content Developers Guide]]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Problems==&lt;br /&gt;
&amp;lt;p&amp;gt;If you run into any problems while using Eclipse checkout our [[C4DT_FAQ#Eclipse and C4DT FAQ&#039;s|Eclipse FAQ section]] or post your question in our [http://forum.openclonk.org/board_show.pl?bid=16 help forum]. Please notify us of any problems or bugs with this guide on the help forum&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=C4DT Basic Usage=&lt;br /&gt;
&amp;lt;p&amp;gt;As of now, you should have created an OpenClonk project and be sitting in front of something that is quite comparable to the original Clonk Editor. On the left side you have the Project Explorer (or on the right side or wherever you like, since all views can be freely arranged in Eclipse). You can use it to navigate packets as you&#039;d do when using the editor.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Unlike the editor though, files are generally openend not it an external program but in a tab in the Eclipse window. You can still set programs to handle specific files by either using the Open With command in the context menu of the Project Explorer or by setting a program in the preferences. The first method works on a file-by-file basis so you could tell Eclipse to open a specific graphics file with Photoshop while opening others with Paint. The second method (Preferences -&amp;gt; General -&amp;gt; Editors -&amp;gt; File Associations) sets a file association for all files of that type.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Eclipse provides different internal editors for different file types. For Clonk-specific files, C4DT adds some more to the list. Among those are a&lt;br /&gt;
*C4Script Editor&lt;br /&gt;
*Landscape.txt Editor&lt;br /&gt;
*Ini Files Editor (DefCore.txt, ActMap.txt etc)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;All editors provided by C4DT offer suitable syntax highlighting. Apart from that they include special support for the types of files they were intended for:&amp;lt;/p&amp;gt;&lt;br /&gt;
*The C4Script Editor is supposed to help you write scripts more quickly by displaying errors and warnings contained in the script as soon as you save them and offering you a list of identifiers you can insert in specific places. It also tries to make writing properly formatted scripts easier by automatically inserting closing brackets and indenting. In addition to that it also strives to make navigation among and inside scripts easier by hyperlinking between them and providing an outline of the script.&lt;br /&gt;
*The Landscape.txt Editor is tailored for editing - surprise! - Landscape.txt files. Sadly, it doesn&#039;t offer a live preview on how the generated map would look like so it&#039;s probably a good idea to use Mape instead. There are plans to include similar functionality directly in Eclipse though.&lt;br /&gt;
*The Ini Files Editor also includes support for hyperlinks.&lt;br /&gt;
==Navigation==&lt;br /&gt;
&amp;lt;p&amp;gt;Navigating to and between scripts quickly is very important. Because of that, C4DT adds several navigation features:&lt;br /&gt;
*[[File:Eclipse_Hyperlinks.png|right]] &#039;&#039;&#039;Hyperlinks&#039;&#039;&#039;: All valid identifiers can be turned into links by pressing Ctrl/⌘ while hovering over the identifier with your mouse. When you click on them the declaration location of the thing the identifier is referring to will be opened. This works for variables, functions, definitions and also for StringTbl entries ($BlaBla$). [[File:Eclipse_HyperlinksIni.png|right]] Identifiers in ini editors can also be turned into hyperlinks.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
*[[File:Clonk_OpenObject.png|right]] &#039;&#039;&#039;Open Object Dialog&#039;&#039;&#039;: The Open Object dialog can be activated using the Clonk menu in the main menu. As soon as you start typing the dialog starts listing definitions that match the typed text.&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:Eclipse_BackForward.png|right]] &#039;&#039;&#039;Going back and forward&#039;&#039;&#039;: When clicking on hyperlinks or navigating to other files by any other means you will always be able to go back to the original file by either pressing Alt+Left or using the yellow arrows in the toolbar. On a Mac, you can also install [http://marketplace.eclipse.org/content/eclipse-multi-touch Eclipse Multitouch] to navigate back and forth using gestures.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
[[File:Eclipse_DeclarationsFilter.png|right]]&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;&#039;Lookup Declaration&#039;&#039;&#039;: From any script or when having selected a file in the project explorer, you can invoke Lookup Declaration from the Clonk menu (also a candidate for a nice keyboard assignment). You can then filter all the declarations from the current selection (either the project selected in the project explorer or the script being currently edited including its #includes) using regular expressions and jump to the declaration of any identifier matched by the expression.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Getting Content Assistance==&lt;br /&gt;
&amp;lt;p&amp;gt;When you are editing a script you can invoke a list offering you identifiers to insert. This list is context-sensitive so it will display different options depending on whether the cursor is inside a function or not or whether you are invoking it after having written &#039;-&amp;gt;&#039;. The short cut for the Content Assist list is Ctrl+Space but like any other short cut it can be changed in the preferences.&amp;lt;/p&amp;gt;&lt;br /&gt;
[[File:Eclipse_ContentAssist.png]]&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Improvements compared to generic text editors==&lt;br /&gt;
The C4Script editor adds special behaviour for some situations. Those are:&lt;br /&gt;
*[[File:Eclipse_AutomaticBlock.png|right]] Automatic block: When typing &#039;{&#039; and then pressing Return a block will be created automatically and the caret will be placed inside the block indented by one tab.&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
*[[File:Eclipse_AutomaticParmBrackets.png|right]] When you type &#039;(&#039; or &#039;[&#039; the corresponding closing bracket will be automatically inserted. In order to not interrupt your typing those inserted closing brackets will be overridden if you type them by hand subsequently. In this special situation, pressing tab will cause the caret to jump over the closing bracket.&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
*[[File:Eclipse_ParmHint.png|right]]Parameter hints: As soon as you enter the brackets of a function call the parameters will be displayed above, not at all by chance similar to C4Scripter. The mechanism to find the right parameters to display is kind of smart and will also work when calling a function on an object using &#039;-&amp;gt;&#039; as long as C4DT can deduce the object type of the expression left to &#039;-&amp;gt;&#039;.&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
*[[File:Eclipse_AutoFunction.png|right]] When you want to declare a new function you can type the name and then invoke Content Assistance (Ctrl+Space). A function block will be created for you.&lt;br /&gt;
&lt;br /&gt;
==Outline==&lt;br /&gt;
[[File:Eclipse_Outline.png|right]] &amp;lt;p&amp;gt;C4DT Editors fill the Outline view with an outline of the files being edited. The default Clonk perspective places the outline on the left below the Project Explorer.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The outline allows you to filter the list of declarations using a regular expression or wildcard.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The outline also shows types of variables and return types of functions, as inferred by the internal C4Script parser. Of course, since C4Script is relatively dynamic in its nature with eval and arbitrary attribute setting and the like, all those type inferences are without guarantee and might not reflect the true usage of the variable. A question mark following the type signals that the parser detected the possibility of the variable having just about any type so the weather forecast character is even more pronounced in that case.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Type guesses in the form of [x-y: &amp;lt;type&amp;gt;] represent cases where the expression is anticipated to have some array type where the range from x to y is of the given type. There could also be some additional &#039;…&#039; thrown in which would signify that the array will probably have more elements at runtime than those in the specified range.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Errors &amp;amp; Warnings==&lt;br /&gt;
[[File:Eclipse_ProblemsView.png|right]] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The script parser built into C4DT tries to detect lots of potential and actual errors, which are listed in the problems view. A script is reparsed when it gets saved. In some cases errors might become stale and won&#039;t get removed from the list automatically. What you can then do is Clean the project using Project -&amp;gt; Clean. This will reparse all the scripts in either the entire workspace or specific projects and hopefully remove the false errors.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For a list of warnings &amp;amp; errors take a look at [http://bitbucket.org/mortimer/c4dt/src/tip/C4DT/src/net/arctics/clonk/parser/ParserErrorCode.java ParserErrorCode.java].&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Errors and Warnings listed in the Problems View can be individually deactivated if they annoy you. To do that, open up the properties window for the project you want to configure, select the Clonk category and deactivate kinds of errors/warnings to your heart&#039;s content.&amp;lt;/p&amp;gt;&lt;br /&gt;
[[File:Eclipse_ProblemsFilter.png]]&lt;br /&gt;
&lt;br /&gt;
==Quick Fixes==&lt;br /&gt;
[[File:Eclipse_QuickFix.png|right]]&lt;br /&gt;
&amp;lt;p&amp;gt;For certain common cases of errors, c4dt offers automatic quick fixes which are offered to you when you press Ctrl/⌘+1 while having the cursor in a script inside a region marked as erroneous/problematic.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Additional Views==&lt;br /&gt;
&amp;lt;p&amp;gt;C4DT adds a handful of views. Two of them will get placed in the same tabzone as the Outline view by the Clonk perspective.&amp;lt;/p&amp;gt;&lt;br /&gt;
*The Preview view serves as a replacement for the preview feature found in the Clonk Editor.&lt;br /&gt;
*The Clonk Folder view enables quick access to packed c4group files inside the game folder of the engine set for the project whose files you are currently editing.&lt;br /&gt;
&lt;br /&gt;
==Auto-Refresh==&lt;br /&gt;
[[File:Eclipse_AutoRefresh.png|right]]&lt;br /&gt;
&amp;lt;p&amp;gt;When updating your local repository clone, Eclipse tends to get confused because it keeps its own cache of file contents which won&#039;t match with the actual file contents after updating, so messages like &#039;This and that is out of sync with the file system&#039; will pop up. To remedy that, you can open the General-&amp;gt;Workspace preferences and set the settings as shown on the right.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Running Scenarios from Eclipse==&lt;br /&gt;
[[File:C4DT_Run_Scenario.png|right]] You can run scenarios by selecting it in the Project Explorer and then selecting the option Run Scenario found in the popup menu of the Run button (the green one with the white play symbol).&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Debugging===&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:C4DT_Debug_Persp.PNG|right]] To execute scripts one-instruction-at-a-time and inspect values while the script is halted, you have to switch to the debug perspective first. The layout of the main window changes to acommodate debugging. You can still arrange the views as you want but changes to the layout done while in the debug perspective will stay in the debug perspective, so as soon as you switch back to the Clonk perspective your old layout will be restored.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:C4DT_Breakpoint.PNG|right]] Apart from window layout there are also some keyboard shortcuts that become available. Among those is the shortcut to create a breakpoint. By default, it&#039;s Ctrl+Shift+B. You can open any c4script and place a breakpoint in a line that contains function code by using that shortcut (or alternatively right-clicking the ledge on the left and clicking &amp;quot;Toggle Breakpoint&amp;quot;).&amp;lt;/p&amp;gt;&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:C4DT_Debug_Button.PNG|right]] To run a scenario in debug mode all you have to do is pressing the Debug button instead of the Run one. The engine will now be halting script execution as soon as it encounters an instruction marked by a breakpoint. Eclipse will highlight the location where script execution halted. Now various views can be utilised to gain information about the current state of variables and objects. More on those views below.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Now that execution is halted you can do three things:&lt;br /&gt;
*Step Into: The instruction at the current execution position will be executed. If the instruction contains a function call, the debugger will jump into the function and allow you to continue stepping inside that function. Default keystroke: F5&lt;br /&gt;
*Step Over: Same as Step Into with the exception that the debugger won&#039;t go into subordinate function calls. Default keystroke: F6&lt;br /&gt;
*Resume: Resume script execution. The engine will run normally until the next breakpoint is encountered. Default keystroke: F8&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Variables===&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:C4DT_Variables_View.PNG|right]] The Variables view displays local variables and parameters of the function being executed.&amp;lt;/p&amp;gt;&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Expressions===&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:C4DT_Expressions_View.PNG]]&amp;lt;br clear=all/&amp;gt; The expressions view displays a list of user-defined expressions that get evaluated after every execution step. It is evaluated in the context of the calling object so expressions like &amp;quot;GetName()&amp;quot; will work as expected. Local variables and parameters can in principle be used in expressions but evaluation of such expressions might be buggy.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To add new expressions right-click into the view and select &amp;quot;Add Watch Expression&amp;quot;.&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>Domtron</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Temporary_test_page_for_content_development_with_Eclipse&amp;diff=1408</id>
		<title>Temporary test page for content development with Eclipse</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Temporary_test_page_for_content_development_with_Eclipse&amp;diff=1408"/>
		<updated>2013-11-04T02:08:26Z</updated>

		<summary type="html">&lt;p&gt;Domtron: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This guide covers the basics of using Eclipse to create, organize, and test content for Open Clonk. Eclipse is an extensible opensource [http://en.wikipedia.org/wiki/Integrated_development_environment Integrated Development Environment] (IDE) written in Java. Before you can start this guide you need to follow the instructions in the [[C4DT Installation Guide]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Once you have finished reading this guide and have a basic understanding of the C4DT interface you can continue onto the next step in the [[Content Developers Guide]]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Problems==&lt;br /&gt;
&amp;lt;p&amp;gt;If you run into any problems while using Eclipse checkout our [[C4DT_FAQ#Eclipse and C4DT FAQ&#039;s|Eclipse FAQ section]] or post your question in our [http://forum.openclonk.org/board_show.pl?bid=16 help forum]. Please notify us of any problems or bugs with this guide on the help forum&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=C4DT Basic Usage=&lt;br /&gt;
&amp;lt;p&amp;gt;As of now, you should have created an OpenClonk project and be sitting in front of something that is quite comparable to the original Clonk Editor. On the left side you have the Project Explorer (or on the right side or wherever you like, since all views can be freely arranged in Eclipse). You can use it to navigate packets as you&#039;d do when using the editor.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Unlike the editor though, files are generally openend not it an external program but in a tab in the Eclipse window. You can still set programs to handle specific files by either using the Open With command in the context menu of the Project Explorer or by setting a program in the preferences. The first method works on a file-by-file basis so you could tell Eclipse to open a specific graphics file with Photoshop while opening others with Paint. The second method (Preferences -&amp;gt; General -&amp;gt; Editors -&amp;gt; File Associations) sets a file association for all files of that type.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Eclipse provides different internal editors for different file types. For Clonk-specific files, C4DT adds some more to the list. Among those are a&lt;br /&gt;
*C4Script Editor&lt;br /&gt;
*Landscape.txt Editor&lt;br /&gt;
*Ini Files Editor (DefCore.txt, ActMap.txt etc)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;All editors provided by C4DT offer suitable syntax highlighting. Apart from that they include special support for the types of files they were intended for:&amp;lt;/p&amp;gt;&lt;br /&gt;
*The C4Script Editor is supposed to help you write scripts more quickly by displaying errors and warnings contained in the script as soon as you save them and offering you a list of identifiers you can insert in specific places. It also tries to make writing properly formatted scripts easier by automatically inserting closing brackets and indenting. In addition to that it also strives to make navigation among and inside scripts easier by hyperlinking between them and providing an outline of the script.&lt;br /&gt;
*The Landscape.txt Editor is tailored for editing - surprise! - Landscape.txt files. Sadly, it doesn&#039;t offer a live preview on how the generated map would look like so it&#039;s probably a good idea to use Mape instead. There are plans to include similar functionality directly in Eclipse though.&lt;br /&gt;
*The Ini Files Editor also includes support for hyperlinks.&lt;br /&gt;
==Navigation==&lt;br /&gt;
&amp;lt;p&amp;gt;Navigating to and between scripts quickly is very important. Because of that, C4DT adds several navigation features:&lt;br /&gt;
*[[File:Eclipse_Hyperlinks.png|right]] &#039;&#039;&#039;Hyperlinks&#039;&#039;&#039;: All valid identifiers can be turned into links by pressing Ctrl/⌘ while hovering over the identifier with your mouse. When you click on them the declaration location of the thing the identifier is referring to will be opened. This works for variables, functions, definitions and also for StringTbl entries ($BlaBla$). [[File:Eclipse_HyperlinksIni.png|right]] Identifiers in ini editors can also be turned into hyperlinks.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
*[[File:Clonk_OpenObject.png|right]] &#039;&#039;&#039;Open Object Dialog&#039;&#039;&#039;: The Open Object dialog can be activated using the Clonk menu in the main menu. As soon as you start typing the dialog starts listing definitions that match the typed text.&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:Eclipse_BackForward.png|right]] &#039;&#039;&#039;Going back and forward&#039;&#039;&#039;: When clicking on hyperlinks or navigating to other files by any other means you will always be able to go back to the original file by either pressing Alt+Left or using the yellow arrows in the toolbar. On a Mac, you can also install [http://marketplace.eclipse.org/content/eclipse-multi-touch Eclipse Multitouch] to navigate back and forth using gestures.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
[[File:Eclipse_DeclarationsFilter.png|right]]&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;&#039;Lookup Declaration&#039;&#039;&#039;: From any script or when having selected a file in the project explorer, you can invoke Lookup Declaration from the Clonk menu (also a candidate for a nice keyboard assignment). You can then filter all the declarations from the current selection (either the project selected in the project explorer or the script being currently edited including its #includes) using regular expressions and jump to the declaration of any identifier matched by the expression.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Getting Content Assistance==&lt;br /&gt;
&amp;lt;p&amp;gt;When you are editing a script you can invoke a list offering you identifiers to insert. This list is context-sensitive so it will display different options depending on whether the cursor is inside a function or not or whether you are invoking it after having written &#039;-&amp;gt;&#039;. The short cut for the Content Assist list is Ctrl+Space but like any other short cut it can be changed in the preferences.&amp;lt;/p&amp;gt;&lt;br /&gt;
[[File:Eclipse_ContentAssist.png]]&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Improvements compared to generic text editors==&lt;br /&gt;
The C4Script editor adds special behaviour for some situations. Those are:&lt;br /&gt;
*[[File:Eclipse_AutomaticBlock.png|right]] Automatic block: When typing &#039;{&#039; and then pressing Return a block will be created automatically and the caret will be placed inside the block indented by one tab.&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
*[[File:Eclipse_AutomaticParmBrackets.png|right]] When you type &#039;(&#039; or &#039;[&#039; the corresponding closing bracket will be automatically inserted. In order to not interrupt your typing those inserted closing brackets will be overridden if you type them by hand subsequently. In this special situation, pressing tab will cause the caret to jump over the closing bracket.&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
*[[File:Eclipse_ParmHint.png|right]]Parameter hints: As soon as you enter the brackets of a function call the parameters will be displayed above, not at all by chance similar to C4Scripter. The mechanism to find the right parameters to display is kind of smart and will also work when calling a function on an object using &#039;-&amp;gt;&#039; as long as C4DT can deduce the object type of the expression left to &#039;-&amp;gt;&#039;.&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
*[[File:Eclipse_AutoFunction.png|right]] When you want to declare a new function you can type the name and then invoke Content Assistance (Ctrl+Space). A function block will be created for you.&lt;br /&gt;
&lt;br /&gt;
==Outline==&lt;br /&gt;
[[File:Eclipse_Outline.png|right]] &amp;lt;p&amp;gt;C4DT Editors fill the Outline view with an outline of the files being edited. The default Clonk perspective places the outline on the left below the Project Explorer.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The outline allows you to filter the list of declarations using a regular expression or wildcard.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The outline also shows types of variables and return types of functions, as inferred by the internal C4Script parser. Of course, since C4Script is relatively dynamic in its nature with eval and arbitrary attribute setting and the like, all those type inferences are without guarantee and might not reflect the true usage of the variable. A question mark following the type signals that the parser detected the possibility of the variable having just about any type so the weather forecast character is even more pronounced in that case.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Type guesses in the form of [x-y: &amp;lt;type&amp;gt;] represent cases where the expression is anticipated to have some array type where the range from x to y is of the given type. There could also be some additional &#039;…&#039; thrown in which would signify that the array will probably have more elements at runtime than those in the specified range.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Errors &amp;amp; Warnings==&lt;br /&gt;
[[File:Eclipse_ProblemsView.png|right]] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The script parser built into C4DT tries to detect lots of potential and actual errors, which are listed in the problems view. A script is reparsed when it gets saved. In some cases errors might become stale and won&#039;t get removed from the list automatically. What you can then do is Clean the project using Project -&amp;gt; Clean. This will reparse all the scripts in either the entire workspace or specific projects and hopefully remove the false errors.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For a list of warnings &amp;amp; errors take a look at [http://bitbucket.org/mortimer/c4dt/src/tip/C4DT/src/net/arctics/clonk/parser/ParserErrorCode.java ParserErrorCode.java].&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Errors and Warnings listed in the Problems View can be individually deactivated if they annoy you. To do that, open up the properties window for the project you want to configure, select the Clonk category and deactivate kinds of errors/warnings to your heart&#039;s content.&amp;lt;/p&amp;gt;&lt;br /&gt;
[[File:Eclipse_ProblemsFilter.png]]&lt;br /&gt;
&lt;br /&gt;
==Quick Fixes==&lt;br /&gt;
[[File:Eclipse_QuickFix.png|right]]&lt;br /&gt;
&amp;lt;p&amp;gt;For certain common cases of errors, c4dt offers automatic quick fixes which are offered to you when you press Ctrl/⌘+1 while having the cursor in a script inside a region marked as erroneous/problematic.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Additional Views==&lt;br /&gt;
&amp;lt;p&amp;gt;C4DT adds a handful of views. Two of them will get placed in the same tabzone as the Outline view by the Clonk perspective.&amp;lt;/p&amp;gt;&lt;br /&gt;
*The Preview view serves as a replacement for the preview feature found in the Clonk Editor.&lt;br /&gt;
*The Clonk Folder view enables quick access to packed c4group files inside the game folder of the engine set for the project whose files you are currently editing.&lt;br /&gt;
&lt;br /&gt;
==Auto-Refresh==&lt;br /&gt;
[[File:Eclipse_AutoRefresh.png|right]]&lt;br /&gt;
&amp;lt;p&amp;gt;When updating your local repository clone, Eclipse tends to get confused because it keeps its own cache of file contents which won&#039;t match with the actual file contents after updating, so messages like &#039;This and that is out of sync with the file system&#039; will pop up. To remedy that, you can open the General-&amp;gt;Workspace preferences and set the settings as shown on the right.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Running Scenarios from Eclipse==&lt;br /&gt;
[[File:C4DT_Run_Scenario.png|right]] You can run scenarios by selecting it in the Project Explorer and then selecting the option Run Scenario found in the popup menu of the Run button (the green one with the white play symbol).&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Debugging===&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:C4DT_Debug_Persp.PNG|right]] To execute scripts one-instruction-at-a-time and inspect values while the script is halted, you have to switch to the debug perspective first. The layout of the main window changes to acommodate debugging. You can still arrange the views as you want but changes to the layout done while in the debug perspective will stay in the debug perspective, so as soon as you switch back to the Clonk perspective your old layout will be restored.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:C4DT_Breakpoint.PNG|right]] Apart from window layout there are also some keyboard shortcuts that become available. Among those is the shortcut to create a breakpoint. By default, it&#039;s Ctrl+Shift+B. You can open any c4script and place a breakpoint in a line that contains function code by using that shortcut (or alternatively right-clicking the ledge on the left and clicking &amp;quot;Toggle Breakpoint&amp;quot;).&amp;lt;/p&amp;gt;&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:C4DT_Debug_Button.PNG|right]] To run a scenario in debug mode all you have to do is pressing the Debug button instead of the Run one. The engine will now be halting script execution as soon as it encounters an instruction marked by a breakpoint. Eclipse will highlight the location where script execution halted. Now various views can be utilised to gain information about the current state of variables and objects. More on those views below.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Now that execution is halted you can do three things:&lt;br /&gt;
*Step Into: The instruction at the current execution position will be executed. If the instruction contains a function call, the debugger will jump into the function and allow you to continue stepping inside that function. Default keystroke: F5&lt;br /&gt;
*Step Over: Same as Step Into with the exception that the debugger won&#039;t go into subordinate function calls. Default keystroke: F6&lt;br /&gt;
*Resume: Resume script execution. The engine will run normally until the next breakpoint is encountered. Default keystroke: F8&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Variables===&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:C4DT_Variables_View.PNG|right]] The Variables view displays local variables and parameters of the function being executed.&amp;lt;/p&amp;gt;&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Expressions===&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:C4DT_Expressions_View.PNG]]&amp;lt;br clear=all/&amp;gt; The expressions view displays a list of user-defined expressions that get evaluated after every execution step. It is evaluated in the context of the calling object so expressions like &amp;quot;GetName()&amp;quot; will work as expected. Local variables and parameters can in principle be used in expressions but evaluation of such expressions might be buggy.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To add new expressions right-click into the view and select &amp;quot;Add Watch Expression&amp;quot;.&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>Domtron</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Temporary_test_page_for_content_development_with_Eclipse&amp;diff=1407</id>
		<title>Temporary test page for content development with Eclipse</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Temporary_test_page_for_content_development_with_Eclipse&amp;diff=1407"/>
		<updated>2013-11-03T23:51:41Z</updated>

		<summary type="html">&lt;p&gt;Domtron: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This guide covers the basics of using Eclipse to create, organize, and test content for Open Clonk. Eclipse is an extensible opensource [http://en.wikipedia.org/wiki/Integrated_development_environment Integrated Development Environment] (IDE) written in Java, and is available from [http://eclipse.org/downloads/ the eclipse download page]. For the purpose of Clonk development, download the &#039;&#039;Eclipse IDE for Java Developers&#039;&#039; package. In order for Eclipse to be aware of C4Scripts and other Clonk-related files a plugin has to be installed. An explanation on how to do that can be found in the [[C4DT Installation Guide]]. Once you understand the basics of using Eclipse and C4DT for content creation you can continue onto the next step in the [[Content Developers Guide]]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Problems==&lt;br /&gt;
&amp;lt;p&amp;gt;If you run into any problems while using Eclipse checkout our [[C4DT_FAQ#Eclipse and C4DT FAQ&#039;s|Eclipse FAQ section]] or post your question in our [http://forum.openclonk.org/board_show.pl?bid=16 help forum]. Please notify us of any problems or bugs with this guide on the help forum&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=C4DT Basic Usage=&lt;br /&gt;
&amp;lt;p&amp;gt;As of now, you should have created an OpenClonk project and be sitting in front of something that is quite comparable to the original Clonk Editor. On the left side you have the Project Explorer (or on the right side or wherever you like, since all views can be freely arranged in Eclipse). You can use it to navigate packets as you&#039;d do when using the editor.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Unlike the editor though, files are generally openend not it an external program but in a tab in the Eclipse window. You can still set programs to handle specific files by either using the Open With command in the context menu of the Project Explorer or by setting a program in the preferences. The first method works on a file-by-file basis so you could tell Eclipse to open a specific graphics file with Photoshop while opening others with Paint. The second method (Preferences -&amp;gt; General -&amp;gt; Editors -&amp;gt; File Associations) sets a file association for all files of that type.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Eclipse provides different internal editors for different file types. For Clonk-specific files, C4DT adds some more to the list. Among those are a&lt;br /&gt;
*C4Script Editor&lt;br /&gt;
*Landscape.txt Editor&lt;br /&gt;
*Ini Files Editor (DefCore.txt, ActMap.txt etc)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;All editors provided by C4DT offer suitable syntax highlighting. Apart from that they include special support for the types of files they were intended for:&amp;lt;/p&amp;gt;&lt;br /&gt;
*The C4Script Editor is supposed to help you write scripts more quickly by displaying errors and warnings contained in the script as soon as you save them and offering you a list of identifiers you can insert in specific places. It also tries to make writing properly formatted scripts easier by automatically inserting closing brackets and indenting. In addition to that it also strives to make navigation among and inside scripts easier by hyperlinking between them and providing an outline of the script.&lt;br /&gt;
*The Landscape.txt Editor is tailored for editing - surprise! - Landscape.txt files. Sadly, it doesn&#039;t offer a live preview on how the generated map would look like so it&#039;s probably a good idea to use Mape instead. There are plans to include similar functionality directly in Eclipse though.&lt;br /&gt;
*The Ini Files Editor also includes support for hyperlinks.&lt;br /&gt;
==Navigation==&lt;br /&gt;
&amp;lt;p&amp;gt;Navigating to and between scripts quickly is very important. Because of that, C4DT adds several navigation features:&lt;br /&gt;
*[[File:Eclipse_Hyperlinks.png|right]] &#039;&#039;&#039;Hyperlinks&#039;&#039;&#039;: All valid identifiers can be turned into links by pressing Ctrl/⌘ while hovering over the identifier with your mouse. When you click on them the declaration location of the thing the identifier is referring to will be opened. This works for variables, functions, definitions and also for StringTbl entries ($BlaBla$). [[File:Eclipse_HyperlinksIni.png|right]] Identifiers in ini editors can also be turned into hyperlinks.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
*[[File:Clonk_OpenObject.png|right]] &#039;&#039;&#039;Open Object Dialog&#039;&#039;&#039;: The Open Object dialog can be activated using the Clonk menu in the main menu. As soon as you start typing the dialog starts listing definitions that match the typed text.&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:Eclipse_BackForward.png|right]] &#039;&#039;&#039;Going back and forward&#039;&#039;&#039;: When clicking on hyperlinks or navigating to other files by any other means you will always be able to go back to the original file by either pressing Alt+Left or using the yellow arrows in the toolbar. On a Mac, you can also install [http://marketplace.eclipse.org/content/eclipse-multi-touch Eclipse Multitouch] to navigate back and forth using gestures.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
[[File:Eclipse_DeclarationsFilter.png|right]]&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;&#039;Lookup Declaration&#039;&#039;&#039;: From any script or when having selected a file in the project explorer, you can invoke Lookup Declaration from the Clonk menu (also a candidate for a nice keyboard assignment). You can then filter all the declarations from the current selection (either the project selected in the project explorer or the script being currently edited including its #includes) using regular expressions and jump to the declaration of any identifier matched by the expression.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Getting Content Assistance==&lt;br /&gt;
&amp;lt;p&amp;gt;When you are editing a script you can invoke a list offering you identifiers to insert. This list is context-sensitive so it will display different options depending on whether the cursor is inside a function or not or whether you are invoking it after having written &#039;-&amp;gt;&#039;. The short cut for the Content Assist list is Ctrl+Space but like any other short cut it can be changed in the preferences.&amp;lt;/p&amp;gt;&lt;br /&gt;
[[File:Eclipse_ContentAssist.png]]&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Improvements compared to generic text editors==&lt;br /&gt;
The C4Script editor adds special behaviour for some situations. Those are:&lt;br /&gt;
*[[File:Eclipse_AutomaticBlock.png|right]] Automatic block: When typing &#039;{&#039; and then pressing Return a block will be created automatically and the caret will be placed inside the block indented by one tab.&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
*[[File:Eclipse_AutomaticParmBrackets.png|right]] When you type &#039;(&#039; or &#039;[&#039; the corresponding closing bracket will be automatically inserted. In order to not interrupt your typing those inserted closing brackets will be overridden if you type them by hand subsequently. In this special situation, pressing tab will cause the caret to jump over the closing bracket.&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
*[[File:Eclipse_ParmHint.png|right]]Parameter hints: As soon as you enter the brackets of a function call the parameters will be displayed above, not at all by chance similar to C4Scripter. The mechanism to find the right parameters to display is kind of smart and will also work when calling a function on an object using &#039;-&amp;gt;&#039; as long as C4DT can deduce the object type of the expression left to &#039;-&amp;gt;&#039;.&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
*[[File:Eclipse_AutoFunction.png|right]] When you want to declare a new function you can type the name and then invoke Content Assistance (Ctrl+Space). A function block will be created for you.&lt;br /&gt;
&lt;br /&gt;
==Outline==&lt;br /&gt;
[[File:Eclipse_Outline.png|right]] &amp;lt;p&amp;gt;C4DT Editors fill the Outline view with an outline of the files being edited. The default Clonk perspective places the outline on the left below the Project Explorer.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The outline allows you to filter the list of declarations using a regular expression or wildcard.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The outline also shows types of variables and return types of functions, as inferred by the internal C4Script parser. Of course, since C4Script is relatively dynamic in its nature with eval and arbitrary attribute setting and the like, all those type inferences are without guarantee and might not reflect the true usage of the variable. A question mark following the type signals that the parser detected the possibility of the variable having just about any type so the weather forecast character is even more pronounced in that case.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Type guesses in the form of [x-y: &amp;lt;type&amp;gt;] represent cases where the expression is anticipated to have some array type where the range from x to y is of the given type. There could also be some additional &#039;…&#039; thrown in which would signify that the array will probably have more elements at runtime than those in the specified range.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Errors &amp;amp; Warnings==&lt;br /&gt;
[[File:Eclipse_ProblemsView.png|right]] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The script parser built into C4DT tries to detect lots of potential and actual errors, which are listed in the problems view. A script is reparsed when it gets saved. In some cases errors might become stale and won&#039;t get removed from the list automatically. What you can then do is Clean the project using Project -&amp;gt; Clean. This will reparse all the scripts in either the entire workspace or specific projects and hopefully remove the false errors.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For a list of warnings &amp;amp; errors take a look at [http://bitbucket.org/mortimer/c4dt/src/tip/C4DT/src/net/arctics/clonk/parser/ParserErrorCode.java ParserErrorCode.java].&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Errors and Warnings listed in the Problems View can be individually deactivated if they annoy you. To do that, open up the properties window for the project you want to configure, select the Clonk category and deactivate kinds of errors/warnings to your heart&#039;s content.&amp;lt;/p&amp;gt;&lt;br /&gt;
[[File:Eclipse_ProblemsFilter.png]]&lt;br /&gt;
&lt;br /&gt;
==Quick Fixes==&lt;br /&gt;
[[File:Eclipse_QuickFix.png|right]]&lt;br /&gt;
&amp;lt;p&amp;gt;For certain common cases of errors, c4dt offers automatic quick fixes which are offered to you when you press Ctrl/⌘+1 while having the cursor in a script inside a region marked as erroneous/problematic.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Additional Views==&lt;br /&gt;
&amp;lt;p&amp;gt;C4DT adds a handful of views. Two of them will get placed in the same tabzone as the Outline view by the Clonk perspective.&amp;lt;/p&amp;gt;&lt;br /&gt;
*The Preview view serves as a replacement for the preview feature found in the Clonk Editor.&lt;br /&gt;
*The Clonk Folder view enables quick access to packed c4group files inside the game folder of the engine set for the project whose files you are currently editing.&lt;br /&gt;
&lt;br /&gt;
==Auto-Refresh==&lt;br /&gt;
[[File:Eclipse_AutoRefresh.png|right]]&lt;br /&gt;
&amp;lt;p&amp;gt;When updating your local repository clone, Eclipse tends to get confused because it keeps its own cache of file contents which won&#039;t match with the actual file contents after updating, so messages like &#039;This and that is out of sync with the file system&#039; will pop up. To remedy that, you can open the General-&amp;gt;Workspace preferences and set the settings as shown on the right.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Running Scenarios from Eclipse==&lt;br /&gt;
[[File:C4DT_Run_Scenario.png|right]] You can run scenarios by selecting it in the Project Explorer and then selecting the option Run Scenario found in the popup menu of the Run button (the green one with the white play symbol).&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Debugging===&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:C4DT_Debug_Persp.PNG|right]] To execute scripts one-instruction-at-a-time and inspect values while the script is halted, you have to switch to the debug perspective first. The layout of the main window changes to acommodate debugging. You can still arrange the views as you want but changes to the layout done while in the debug perspective will stay in the debug perspective, so as soon as you switch back to the Clonk perspective your old layout will be restored.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:C4DT_Breakpoint.PNG|right]] Apart from window layout there are also some keyboard shortcuts that become available. Among those is the shortcut to create a breakpoint. By default, it&#039;s Ctrl+Shift+B. You can open any c4script and place a breakpoint in a line that contains function code by using that shortcut (or alternatively right-clicking the ledge on the left and clicking &amp;quot;Toggle Breakpoint&amp;quot;).&amp;lt;/p&amp;gt;&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:C4DT_Debug_Button.PNG|right]] To run a scenario in debug mode all you have to do is pressing the Debug button instead of the Run one. The engine will now be halting script execution as soon as it encounters an instruction marked by a breakpoint. Eclipse will highlight the location where script execution halted. Now various views can be utilised to gain information about the current state of variables and objects. More on those views below.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Now that execution is halted you can do three things:&lt;br /&gt;
*Step Into: The instruction at the current execution position will be executed. If the instruction contains a function call, the debugger will jump into the function and allow you to continue stepping inside that function. Default keystroke: F5&lt;br /&gt;
*Step Over: Same as Step Into with the exception that the debugger won&#039;t go into subordinate function calls. Default keystroke: F6&lt;br /&gt;
*Resume: Resume script execution. The engine will run normally until the next breakpoint is encountered. Default keystroke: F8&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Variables===&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:C4DT_Variables_View.PNG|right]] The Variables view displays local variables and parameters of the function being executed.&amp;lt;/p&amp;gt;&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Expressions===&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:C4DT_Expressions_View.PNG]]&amp;lt;br clear=all/&amp;gt; The expressions view displays a list of user-defined expressions that get evaluated after every execution step. It is evaluated in the context of the calling object so expressions like &amp;quot;GetName()&amp;quot; will work as expected. Local variables and parameters can in principle be used in expressions but evaluation of such expressions might be buggy.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To add new expressions right-click into the view and select &amp;quot;Add Watch Expression&amp;quot;.&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>Domtron</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Temporary_test_page_for_content_development_with_Eclipse&amp;diff=1406</id>
		<title>Temporary test page for content development with Eclipse</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Temporary_test_page_for_content_development_with_Eclipse&amp;diff=1406"/>
		<updated>2013-11-03T15:57:07Z</updated>

		<summary type="html">&lt;p&gt;Domtron: /* Problems */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This guide covers the basics of using Eclipse to create, organize, and test content for Open Clonk. Eclipse is an extensible opensource [http://en.wikipedia.org/wiki/Integrated_development_environment Integrated Development Environment] (IDE) written in Java, and is available from [http://eclipse.org/downloads/ the eclipse download page]. For the purpose of Clonk development, download the &#039;&#039;Eclipse IDE for Java Developers&#039;&#039; package. In order for Eclipse to be aware of C4Scripts and other Clonk-related files a plugin has to be installed. An explanation on how to do that can be found in the [[C4DT Installation Guide]]. Once you understand the basics of using Eclipse and C4DT for content creation you can continue onto the next step in the [[Content Developers Guide]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Problems==&lt;br /&gt;
&amp;lt;p&amp;gt;If you run into any problems while using Eclipse checkout our [[C4DT_FAQ#Eclipse and C4DT FAQ&#039;s|Eclipse FAQ section]] or post your question in our [http://forum.openclonk.org/board_show.pl?bid=16 help forum]. Please notify us of any problems or bugs with this guide on the help forum&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=C4DT Basic Usage=&lt;br /&gt;
&amp;lt;p&amp;gt;As of now, you should have created an OpenClonk project and be sitting in front of something that is quite comparable to the original Clonk Editor. On the left side you have the Project Explorer (or on the right side or wherever you like, since all views can be freely arranged in Eclipse). You can use it to navigate packets as you&#039;d do when using the editor.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Unlike the editor though, files are generally openend not it an external program but in a tab in the Eclipse window. You can still set programs to handle specific files by either using the Open With command in the context menu of the Project Explorer or by setting a program in the preferences. The first method works on a file-by-file basis so you could tell Eclipse to open a specific graphics file with Photoshop while opening others with Paint. The second method (Preferences -&amp;gt; General -&amp;gt; Editors -&amp;gt; File Associations) sets a file association for all files of that type.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Eclipse provides different internal editors for different file types. For Clonk-specific files, C4DT adds some more to the list. Among those are a&lt;br /&gt;
*C4Script Editor&lt;br /&gt;
*Landscape.txt Editor&lt;br /&gt;
*Ini Files Editor (DefCore.txt, ActMap.txt etc)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;All editors provided by C4DT offer suitable syntax highlighting. Apart from that they include special support for the types of files they were intended for:&amp;lt;/p&amp;gt;&lt;br /&gt;
*The C4Script Editor is supposed to help you write scripts more quickly by displaying errors and warnings contained in the script as soon as you save them and offering you a list of identifiers you can insert in specific places. It also tries to make writing properly formatted scripts easier by automatically inserting closing brackets and indenting. In addition to that it also strives to make navigation among and inside scripts easier by hyperlinking between them and providing an outline of the script.&lt;br /&gt;
*The Landscape.txt Editor is tailored for editing - surprise! - Landscape.txt files. Sadly, it doesn&#039;t offer a live preview on how the generated map would look like so it&#039;s probably a good idea to use Mape instead. There are plans to include similar functionality directly in Eclipse though.&lt;br /&gt;
*The Ini Files Editor also includes support for hyperlinks.&lt;br /&gt;
==Navigation==&lt;br /&gt;
&amp;lt;p&amp;gt;Navigating to and between scripts quickly is very important. Because of that, C4DT adds several navigation features:&lt;br /&gt;
*[[File:Eclipse_Hyperlinks.png|right]] &#039;&#039;&#039;Hyperlinks&#039;&#039;&#039;: All valid identifiers can be turned into links by pressing Ctrl/⌘ while hovering over the identifier with your mouse. When you click on them the declaration location of the thing the identifier is referring to will be opened. This works for variables, functions, definitions and also for StringTbl entries ($BlaBla$). [[File:Eclipse_HyperlinksIni.png|right]] Identifiers in ini editors can also be turned into hyperlinks.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
*[[File:Clonk_OpenObject.png|right]] &#039;&#039;&#039;Open Object Dialog&#039;&#039;&#039;: The Open Object dialog can be activated using the Clonk menu in the main menu. As soon as you start typing the dialog starts listing definitions that match the typed text.&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:Eclipse_BackForward.png|right]] &#039;&#039;&#039;Going back and forward&#039;&#039;&#039;: When clicking on hyperlinks or navigating to other files by any other means you will always be able to go back to the original file by either pressing Alt+Left or using the yellow arrows in the toolbar. On a Mac, you can also install [http://marketplace.eclipse.org/content/eclipse-multi-touch Eclipse Multitouch] to navigate back and forth using gestures.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
[[File:Eclipse_DeclarationsFilter.png|right]]&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;&#039;Lookup Declaration&#039;&#039;&#039;: From any script or when having selected a file in the project explorer, you can invoke Lookup Declaration from the Clonk menu (also a candidate for a nice keyboard assignment). You can then filter all the declarations from the current selection (either the project selected in the project explorer or the script being currently edited including its #includes) using regular expressions and jump to the declaration of any identifier matched by the expression.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Getting Content Assistance==&lt;br /&gt;
&amp;lt;p&amp;gt;When you are editing a script you can invoke a list offering you identifiers to insert. This list is context-sensitive so it will display different options depending on whether the cursor is inside a function or not or whether you are invoking it after having written &#039;-&amp;gt;&#039;. The short cut for the Content Assist list is Ctrl+Space but like any other short cut it can be changed in the preferences.&amp;lt;/p&amp;gt;&lt;br /&gt;
[[File:Eclipse_ContentAssist.png]]&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Improvements compared to generic text editors==&lt;br /&gt;
The C4Script editor adds special behaviour for some situations. Those are:&lt;br /&gt;
*[[File:Eclipse_AutomaticBlock.png|right]] Automatic block: When typing &#039;{&#039; and then pressing Return a block will be created automatically and the caret will be placed inside the block indented by one tab.&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
*[[File:Eclipse_AutomaticParmBrackets.png|right]] When you type &#039;(&#039; or &#039;[&#039; the corresponding closing bracket will be automatically inserted. In order to not interrupt your typing those inserted closing brackets will be overridden if you type them by hand subsequently. In this special situation, pressing tab will cause the caret to jump over the closing bracket.&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
*[[File:Eclipse_ParmHint.png|right]]Parameter hints: As soon as you enter the brackets of a function call the parameters will be displayed above, not at all by chance similar to C4Scripter. The mechanism to find the right parameters to display is kind of smart and will also work when calling a function on an object using &#039;-&amp;gt;&#039; as long as C4DT can deduce the object type of the expression left to &#039;-&amp;gt;&#039;.&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
*[[File:Eclipse_AutoFunction.png|right]] When you want to declare a new function you can type the name and then invoke Content Assistance (Ctrl+Space). A function block will be created for you.&lt;br /&gt;
&lt;br /&gt;
==Outline==&lt;br /&gt;
[[File:Eclipse_Outline.png|right]] &amp;lt;p&amp;gt;C4DT Editors fill the Outline view with an outline of the files being edited. The default Clonk perspective places the outline on the left below the Project Explorer.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The outline allows you to filter the list of declarations using a regular expression or wildcard.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The outline also shows types of variables and return types of functions, as inferred by the internal C4Script parser. Of course, since C4Script is relatively dynamic in its nature with eval and arbitrary attribute setting and the like, all those type inferences are without guarantee and might not reflect the true usage of the variable. A question mark following the type signals that the parser detected the possibility of the variable having just about any type so the weather forecast character is even more pronounced in that case.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Type guesses in the form of [x-y: &amp;lt;type&amp;gt;] represent cases where the expression is anticipated to have some array type where the range from x to y is of the given type. There could also be some additional &#039;…&#039; thrown in which would signify that the array will probably have more elements at runtime than those in the specified range.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Errors &amp;amp; Warnings==&lt;br /&gt;
[[File:Eclipse_ProblemsView.png|right]] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The script parser built into C4DT tries to detect lots of potential and actual errors, which are listed in the problems view. A script is reparsed when it gets saved. In some cases errors might become stale and won&#039;t get removed from the list automatically. What you can then do is Clean the project using Project -&amp;gt; Clean. This will reparse all the scripts in either the entire workspace or specific projects and hopefully remove the false errors.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For a list of warnings &amp;amp; errors take a look at [http://bitbucket.org/mortimer/c4dt/src/tip/C4DT/src/net/arctics/clonk/parser/ParserErrorCode.java ParserErrorCode.java].&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Errors and Warnings listed in the Problems View can be individually deactivated if they annoy you. To do that, open up the properties window for the project you want to configure, select the Clonk category and deactivate kinds of errors/warnings to your heart&#039;s content.&amp;lt;/p&amp;gt;&lt;br /&gt;
[[File:Eclipse_ProblemsFilter.png]]&lt;br /&gt;
&lt;br /&gt;
==Quick Fixes==&lt;br /&gt;
[[File:Eclipse_QuickFix.png|right]]&lt;br /&gt;
&amp;lt;p&amp;gt;For certain common cases of errors, c4dt offers automatic quick fixes which are offered to you when you press Ctrl/⌘+1 while having the cursor in a script inside a region marked as erroneous/problematic.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Additional Views==&lt;br /&gt;
&amp;lt;p&amp;gt;C4DT adds a handful of views. Two of them will get placed in the same tabzone as the Outline view by the Clonk perspective.&amp;lt;/p&amp;gt;&lt;br /&gt;
*The Preview view serves as a replacement for the preview feature found in the Clonk Editor.&lt;br /&gt;
*The Clonk Folder view enables quick access to packed c4group files inside the game folder of the engine set for the project whose files you are currently editing.&lt;br /&gt;
&lt;br /&gt;
==Auto-Refresh==&lt;br /&gt;
[[File:Eclipse_AutoRefresh.png|right]]&lt;br /&gt;
&amp;lt;p&amp;gt;When updating your local repository clone, Eclipse tends to get confused because it keeps its own cache of file contents which won&#039;t match with the actual file contents after updating, so messages like &#039;This and that is out of sync with the file system&#039; will pop up. To remedy that, you can open the General-&amp;gt;Workspace preferences and set the settings as shown on the right.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Running Scenarios from Eclipse==&lt;br /&gt;
[[File:C4DT_Run_Scenario.png|right]] You can run scenarios by selecting it in the Project Explorer and then selecting the option Run Scenario found in the popup menu of the Run button (the green one with the white play symbol).&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Debugging===&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:C4DT_Debug_Persp.PNG|right]] To execute scripts one-instruction-at-a-time and inspect values while the script is halted, you have to switch to the debug perspective first. The layout of the main window changes to acommodate debugging. You can still arrange the views as you want but changes to the layout done while in the debug perspective will stay in the debug perspective, so as soon as you switch back to the Clonk perspective your old layout will be restored.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:C4DT_Breakpoint.PNG|right]] Apart from window layout there are also some keyboard shortcuts that become available. Among those is the shortcut to create a breakpoint. By default, it&#039;s Ctrl+Shift+B. You can open any c4script and place a breakpoint in a line that contains function code by using that shortcut (or alternatively right-clicking the ledge on the left and clicking &amp;quot;Toggle Breakpoint&amp;quot;).&amp;lt;/p&amp;gt;&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:C4DT_Debug_Button.PNG|right]] To run a scenario in debug mode all you have to do is pressing the Debug button instead of the Run one. The engine will now be halting script execution as soon as it encounters an instruction marked by a breakpoint. Eclipse will highlight the location where script execution halted. Now various views can be utilised to gain information about the current state of variables and objects. More on those views below.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Now that execution is halted you can do three things:&lt;br /&gt;
*Step Into: The instruction at the current execution position will be executed. If the instruction contains a function call, the debugger will jump into the function and allow you to continue stepping inside that function. Default keystroke: F5&lt;br /&gt;
*Step Over: Same as Step Into with the exception that the debugger won&#039;t go into subordinate function calls. Default keystroke: F6&lt;br /&gt;
*Resume: Resume script execution. The engine will run normally until the next breakpoint is encountered. Default keystroke: F8&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Variables===&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:C4DT_Variables_View.PNG|right]] The Variables view displays local variables and parameters of the function being executed.&amp;lt;/p&amp;gt;&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Expressions===&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:C4DT_Expressions_View.PNG]]&amp;lt;br clear=all/&amp;gt; The expressions view displays a list of user-defined expressions that get evaluated after every execution step. It is evaluated in the context of the calling object so expressions like &amp;quot;GetName()&amp;quot; will work as expected. Local variables and parameters can in principle be used in expressions but evaluation of such expressions might be buggy.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To add new expressions right-click into the view and select &amp;quot;Add Watch Expression&amp;quot;.&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>Domtron</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Temporary_test_page_for_content_development_with_Eclipse&amp;diff=1405</id>
		<title>Temporary test page for content development with Eclipse</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Temporary_test_page_for_content_development_with_Eclipse&amp;diff=1405"/>
		<updated>2013-11-03T15:56:15Z</updated>

		<summary type="html">&lt;p&gt;Domtron: /* Problems */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This guide covers the basics of using Eclipse to create, organize, and test content for Open Clonk. Eclipse is an extensible opensource [http://en.wikipedia.org/wiki/Integrated_development_environment Integrated Development Environment] (IDE) written in Java, and is available from [http://eclipse.org/downloads/ the eclipse download page]. For the purpose of Clonk development, download the &#039;&#039;Eclipse IDE for Java Developers&#039;&#039; package. In order for Eclipse to be aware of C4Scripts and other Clonk-related files a plugin has to be installed. An explanation on how to do that can be found in the [[C4DT Installation Guide]]. Once you understand the basics of using Eclipse and C4DT for content creation you can continue onto the next step in the [[Content Developers Guide]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Problems==&lt;br /&gt;
&amp;lt;p&amp;gt;If you run into any problems while using Eclipse checkout our [[C4DT_FAQ#Eclipse and C4DT FAQ&#039;s|FAQ&#039;s Eclipse section]] or post your question in our [http://forum.openclonk.org/board_show.pl?bid=16 help forum]. Please notify us of any problems or bugs with this guide on the help forum&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=C4DT Basic Usage=&lt;br /&gt;
&amp;lt;p&amp;gt;As of now, you should have created an OpenClonk project and be sitting in front of something that is quite comparable to the original Clonk Editor. On the left side you have the Project Explorer (or on the right side or wherever you like, since all views can be freely arranged in Eclipse). You can use it to navigate packets as you&#039;d do when using the editor.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Unlike the editor though, files are generally openend not it an external program but in a tab in the Eclipse window. You can still set programs to handle specific files by either using the Open With command in the context menu of the Project Explorer or by setting a program in the preferences. The first method works on a file-by-file basis so you could tell Eclipse to open a specific graphics file with Photoshop while opening others with Paint. The second method (Preferences -&amp;gt; General -&amp;gt; Editors -&amp;gt; File Associations) sets a file association for all files of that type.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Eclipse provides different internal editors for different file types. For Clonk-specific files, C4DT adds some more to the list. Among those are a&lt;br /&gt;
*C4Script Editor&lt;br /&gt;
*Landscape.txt Editor&lt;br /&gt;
*Ini Files Editor (DefCore.txt, ActMap.txt etc)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;All editors provided by C4DT offer suitable syntax highlighting. Apart from that they include special support for the types of files they were intended for:&amp;lt;/p&amp;gt;&lt;br /&gt;
*The C4Script Editor is supposed to help you write scripts more quickly by displaying errors and warnings contained in the script as soon as you save them and offering you a list of identifiers you can insert in specific places. It also tries to make writing properly formatted scripts easier by automatically inserting closing brackets and indenting. In addition to that it also strives to make navigation among and inside scripts easier by hyperlinking between them and providing an outline of the script.&lt;br /&gt;
*The Landscape.txt Editor is tailored for editing - surprise! - Landscape.txt files. Sadly, it doesn&#039;t offer a live preview on how the generated map would look like so it&#039;s probably a good idea to use Mape instead. There are plans to include similar functionality directly in Eclipse though.&lt;br /&gt;
*The Ini Files Editor also includes support for hyperlinks.&lt;br /&gt;
==Navigation==&lt;br /&gt;
&amp;lt;p&amp;gt;Navigating to and between scripts quickly is very important. Because of that, C4DT adds several navigation features:&lt;br /&gt;
*[[File:Eclipse_Hyperlinks.png|right]] &#039;&#039;&#039;Hyperlinks&#039;&#039;&#039;: All valid identifiers can be turned into links by pressing Ctrl/⌘ while hovering over the identifier with your mouse. When you click on them the declaration location of the thing the identifier is referring to will be opened. This works for variables, functions, definitions and also for StringTbl entries ($BlaBla$). [[File:Eclipse_HyperlinksIni.png|right]] Identifiers in ini editors can also be turned into hyperlinks.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
*[[File:Clonk_OpenObject.png|right]] &#039;&#039;&#039;Open Object Dialog&#039;&#039;&#039;: The Open Object dialog can be activated using the Clonk menu in the main menu. As soon as you start typing the dialog starts listing definitions that match the typed text.&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:Eclipse_BackForward.png|right]] &#039;&#039;&#039;Going back and forward&#039;&#039;&#039;: When clicking on hyperlinks or navigating to other files by any other means you will always be able to go back to the original file by either pressing Alt+Left or using the yellow arrows in the toolbar. On a Mac, you can also install [http://marketplace.eclipse.org/content/eclipse-multi-touch Eclipse Multitouch] to navigate back and forth using gestures.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
[[File:Eclipse_DeclarationsFilter.png|right]]&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;&#039;Lookup Declaration&#039;&#039;&#039;: From any script or when having selected a file in the project explorer, you can invoke Lookup Declaration from the Clonk menu (also a candidate for a nice keyboard assignment). You can then filter all the declarations from the current selection (either the project selected in the project explorer or the script being currently edited including its #includes) using regular expressions and jump to the declaration of any identifier matched by the expression.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Getting Content Assistance==&lt;br /&gt;
&amp;lt;p&amp;gt;When you are editing a script you can invoke a list offering you identifiers to insert. This list is context-sensitive so it will display different options depending on whether the cursor is inside a function or not or whether you are invoking it after having written &#039;-&amp;gt;&#039;. The short cut for the Content Assist list is Ctrl+Space but like any other short cut it can be changed in the preferences.&amp;lt;/p&amp;gt;&lt;br /&gt;
[[File:Eclipse_ContentAssist.png]]&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Improvements compared to generic text editors==&lt;br /&gt;
The C4Script editor adds special behaviour for some situations. Those are:&lt;br /&gt;
*[[File:Eclipse_AutomaticBlock.png|right]] Automatic block: When typing &#039;{&#039; and then pressing Return a block will be created automatically and the caret will be placed inside the block indented by one tab.&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
*[[File:Eclipse_AutomaticParmBrackets.png|right]] When you type &#039;(&#039; or &#039;[&#039; the corresponding closing bracket will be automatically inserted. In order to not interrupt your typing those inserted closing brackets will be overridden if you type them by hand subsequently. In this special situation, pressing tab will cause the caret to jump over the closing bracket.&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
*[[File:Eclipse_ParmHint.png|right]]Parameter hints: As soon as you enter the brackets of a function call the parameters will be displayed above, not at all by chance similar to C4Scripter. The mechanism to find the right parameters to display is kind of smart and will also work when calling a function on an object using &#039;-&amp;gt;&#039; as long as C4DT can deduce the object type of the expression left to &#039;-&amp;gt;&#039;.&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
*[[File:Eclipse_AutoFunction.png|right]] When you want to declare a new function you can type the name and then invoke Content Assistance (Ctrl+Space). A function block will be created for you.&lt;br /&gt;
&lt;br /&gt;
==Outline==&lt;br /&gt;
[[File:Eclipse_Outline.png|right]] &amp;lt;p&amp;gt;C4DT Editors fill the Outline view with an outline of the files being edited. The default Clonk perspective places the outline on the left below the Project Explorer.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The outline allows you to filter the list of declarations using a regular expression or wildcard.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The outline also shows types of variables and return types of functions, as inferred by the internal C4Script parser. Of course, since C4Script is relatively dynamic in its nature with eval and arbitrary attribute setting and the like, all those type inferences are without guarantee and might not reflect the true usage of the variable. A question mark following the type signals that the parser detected the possibility of the variable having just about any type so the weather forecast character is even more pronounced in that case.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Type guesses in the form of [x-y: &amp;lt;type&amp;gt;] represent cases where the expression is anticipated to have some array type where the range from x to y is of the given type. There could also be some additional &#039;…&#039; thrown in which would signify that the array will probably have more elements at runtime than those in the specified range.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Errors &amp;amp; Warnings==&lt;br /&gt;
[[File:Eclipse_ProblemsView.png|right]] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The script parser built into C4DT tries to detect lots of potential and actual errors, which are listed in the problems view. A script is reparsed when it gets saved. In some cases errors might become stale and won&#039;t get removed from the list automatically. What you can then do is Clean the project using Project -&amp;gt; Clean. This will reparse all the scripts in either the entire workspace or specific projects and hopefully remove the false errors.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For a list of warnings &amp;amp; errors take a look at [http://bitbucket.org/mortimer/c4dt/src/tip/C4DT/src/net/arctics/clonk/parser/ParserErrorCode.java ParserErrorCode.java].&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Errors and Warnings listed in the Problems View can be individually deactivated if they annoy you. To do that, open up the properties window for the project you want to configure, select the Clonk category and deactivate kinds of errors/warnings to your heart&#039;s content.&amp;lt;/p&amp;gt;&lt;br /&gt;
[[File:Eclipse_ProblemsFilter.png]]&lt;br /&gt;
&lt;br /&gt;
==Quick Fixes==&lt;br /&gt;
[[File:Eclipse_QuickFix.png|right]]&lt;br /&gt;
&amp;lt;p&amp;gt;For certain common cases of errors, c4dt offers automatic quick fixes which are offered to you when you press Ctrl/⌘+1 while having the cursor in a script inside a region marked as erroneous/problematic.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Additional Views==&lt;br /&gt;
&amp;lt;p&amp;gt;C4DT adds a handful of views. Two of them will get placed in the same tabzone as the Outline view by the Clonk perspective.&amp;lt;/p&amp;gt;&lt;br /&gt;
*The Preview view serves as a replacement for the preview feature found in the Clonk Editor.&lt;br /&gt;
*The Clonk Folder view enables quick access to packed c4group files inside the game folder of the engine set for the project whose files you are currently editing.&lt;br /&gt;
&lt;br /&gt;
==Auto-Refresh==&lt;br /&gt;
[[File:Eclipse_AutoRefresh.png|right]]&lt;br /&gt;
&amp;lt;p&amp;gt;When updating your local repository clone, Eclipse tends to get confused because it keeps its own cache of file contents which won&#039;t match with the actual file contents after updating, so messages like &#039;This and that is out of sync with the file system&#039; will pop up. To remedy that, you can open the General-&amp;gt;Workspace preferences and set the settings as shown on the right.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Running Scenarios from Eclipse==&lt;br /&gt;
[[File:C4DT_Run_Scenario.png|right]] You can run scenarios by selecting it in the Project Explorer and then selecting the option Run Scenario found in the popup menu of the Run button (the green one with the white play symbol).&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Debugging===&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:C4DT_Debug_Persp.PNG|right]] To execute scripts one-instruction-at-a-time and inspect values while the script is halted, you have to switch to the debug perspective first. The layout of the main window changes to acommodate debugging. You can still arrange the views as you want but changes to the layout done while in the debug perspective will stay in the debug perspective, so as soon as you switch back to the Clonk perspective your old layout will be restored.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:C4DT_Breakpoint.PNG|right]] Apart from window layout there are also some keyboard shortcuts that become available. Among those is the shortcut to create a breakpoint. By default, it&#039;s Ctrl+Shift+B. You can open any c4script and place a breakpoint in a line that contains function code by using that shortcut (or alternatively right-clicking the ledge on the left and clicking &amp;quot;Toggle Breakpoint&amp;quot;).&amp;lt;/p&amp;gt;&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:C4DT_Debug_Button.PNG|right]] To run a scenario in debug mode all you have to do is pressing the Debug button instead of the Run one. The engine will now be halting script execution as soon as it encounters an instruction marked by a breakpoint. Eclipse will highlight the location where script execution halted. Now various views can be utilised to gain information about the current state of variables and objects. More on those views below.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Now that execution is halted you can do three things:&lt;br /&gt;
*Step Into: The instruction at the current execution position will be executed. If the instruction contains a function call, the debugger will jump into the function and allow you to continue stepping inside that function. Default keystroke: F5&lt;br /&gt;
*Step Over: Same as Step Into with the exception that the debugger won&#039;t go into subordinate function calls. Default keystroke: F6&lt;br /&gt;
*Resume: Resume script execution. The engine will run normally until the next breakpoint is encountered. Default keystroke: F8&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Variables===&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:C4DT_Variables_View.PNG|right]] The Variables view displays local variables and parameters of the function being executed.&amp;lt;/p&amp;gt;&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Expressions===&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:C4DT_Expressions_View.PNG]]&amp;lt;br clear=all/&amp;gt; The expressions view displays a list of user-defined expressions that get evaluated after every execution step. It is evaluated in the context of the calling object so expressions like &amp;quot;GetName()&amp;quot; will work as expected. Local variables and parameters can in principle be used in expressions but evaluation of such expressions might be buggy.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To add new expressions right-click into the view and select &amp;quot;Add Watch Expression&amp;quot;.&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>Domtron</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Temporary_test_page_for_content_development_with_Eclipse&amp;diff=1404</id>
		<title>Temporary test page for content development with Eclipse</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Temporary_test_page_for_content_development_with_Eclipse&amp;diff=1404"/>
		<updated>2013-11-03T15:53:52Z</updated>

		<summary type="html">&lt;p&gt;Domtron: Removed FAQ section and added a problems section that links to the general FAQ page.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This guide covers the basics of using Eclipse to create, organize, and test content for Open Clonk. Eclipse is an extensible opensource [http://en.wikipedia.org/wiki/Integrated_development_environment Integrated Development Environment] (IDE) written in Java, and is available from [http://eclipse.org/downloads/ the eclipse download page]. For the purpose of Clonk development, download the &#039;&#039;Eclipse IDE for Java Developers&#039;&#039; package. In order for Eclipse to be aware of C4Scripts and other Clonk-related files a plugin has to be installed. An explanation on how to do that can be found in the [[C4DT Installation Guide]]. Once you understand the basics of using Eclipse and C4DT for content creation you can continue onto the next step in the [[Content Developers Guide]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Problems==&lt;br /&gt;
&amp;lt;p&amp;gt;If you run into any problems while using Eclipse checkout our [[C4DT_FAQ#Eclipse and C4DT FAQ&#039;s|FAQ&#039;s Eclipse section]] or post your question in our [http://forum.openclonk.org/board_show.pl?bid=16 help forum].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=C4DT Basic Usage=&lt;br /&gt;
&amp;lt;p&amp;gt;As of now, you should have created an OpenClonk project and be sitting in front of something that is quite comparable to the original Clonk Editor. On the left side you have the Project Explorer (or on the right side or wherever you like, since all views can be freely arranged in Eclipse). You can use it to navigate packets as you&#039;d do when using the editor.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Unlike the editor though, files are generally openend not it an external program but in a tab in the Eclipse window. You can still set programs to handle specific files by either using the Open With command in the context menu of the Project Explorer or by setting a program in the preferences. The first method works on a file-by-file basis so you could tell Eclipse to open a specific graphics file with Photoshop while opening others with Paint. The second method (Preferences -&amp;gt; General -&amp;gt; Editors -&amp;gt; File Associations) sets a file association for all files of that type.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Eclipse provides different internal editors for different file types. For Clonk-specific files, C4DT adds some more to the list. Among those are a&lt;br /&gt;
*C4Script Editor&lt;br /&gt;
*Landscape.txt Editor&lt;br /&gt;
*Ini Files Editor (DefCore.txt, ActMap.txt etc)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;All editors provided by C4DT offer suitable syntax highlighting. Apart from that they include special support for the types of files they were intended for:&amp;lt;/p&amp;gt;&lt;br /&gt;
*The C4Script Editor is supposed to help you write scripts more quickly by displaying errors and warnings contained in the script as soon as you save them and offering you a list of identifiers you can insert in specific places. It also tries to make writing properly formatted scripts easier by automatically inserting closing brackets and indenting. In addition to that it also strives to make navigation among and inside scripts easier by hyperlinking between them and providing an outline of the script.&lt;br /&gt;
*The Landscape.txt Editor is tailored for editing - surprise! - Landscape.txt files. Sadly, it doesn&#039;t offer a live preview on how the generated map would look like so it&#039;s probably a good idea to use Mape instead. There are plans to include similar functionality directly in Eclipse though.&lt;br /&gt;
*The Ini Files Editor also includes support for hyperlinks.&lt;br /&gt;
==Navigation==&lt;br /&gt;
&amp;lt;p&amp;gt;Navigating to and between scripts quickly is very important. Because of that, C4DT adds several navigation features:&lt;br /&gt;
*[[File:Eclipse_Hyperlinks.png|right]] &#039;&#039;&#039;Hyperlinks&#039;&#039;&#039;: All valid identifiers can be turned into links by pressing Ctrl/⌘ while hovering over the identifier with your mouse. When you click on them the declaration location of the thing the identifier is referring to will be opened. This works for variables, functions, definitions and also for StringTbl entries ($BlaBla$). [[File:Eclipse_HyperlinksIni.png|right]] Identifiers in ini editors can also be turned into hyperlinks.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
*[[File:Clonk_OpenObject.png|right]] &#039;&#039;&#039;Open Object Dialog&#039;&#039;&#039;: The Open Object dialog can be activated using the Clonk menu in the main menu. As soon as you start typing the dialog starts listing definitions that match the typed text.&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:Eclipse_BackForward.png|right]] &#039;&#039;&#039;Going back and forward&#039;&#039;&#039;: When clicking on hyperlinks or navigating to other files by any other means you will always be able to go back to the original file by either pressing Alt+Left or using the yellow arrows in the toolbar. On a Mac, you can also install [http://marketplace.eclipse.org/content/eclipse-multi-touch Eclipse Multitouch] to navigate back and forth using gestures.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
[[File:Eclipse_DeclarationsFilter.png|right]]&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;&#039;Lookup Declaration&#039;&#039;&#039;: From any script or when having selected a file in the project explorer, you can invoke Lookup Declaration from the Clonk menu (also a candidate for a nice keyboard assignment). You can then filter all the declarations from the current selection (either the project selected in the project explorer or the script being currently edited including its #includes) using regular expressions and jump to the declaration of any identifier matched by the expression.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Getting Content Assistance==&lt;br /&gt;
&amp;lt;p&amp;gt;When you are editing a script you can invoke a list offering you identifiers to insert. This list is context-sensitive so it will display different options depending on whether the cursor is inside a function or not or whether you are invoking it after having written &#039;-&amp;gt;&#039;. The short cut for the Content Assist list is Ctrl+Space but like any other short cut it can be changed in the preferences.&amp;lt;/p&amp;gt;&lt;br /&gt;
[[File:Eclipse_ContentAssist.png]]&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Improvements compared to generic text editors==&lt;br /&gt;
The C4Script editor adds special behaviour for some situations. Those are:&lt;br /&gt;
*[[File:Eclipse_AutomaticBlock.png|right]] Automatic block: When typing &#039;{&#039; and then pressing Return a block will be created automatically and the caret will be placed inside the block indented by one tab.&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
*[[File:Eclipse_AutomaticParmBrackets.png|right]] When you type &#039;(&#039; or &#039;[&#039; the corresponding closing bracket will be automatically inserted. In order to not interrupt your typing those inserted closing brackets will be overridden if you type them by hand subsequently. In this special situation, pressing tab will cause the caret to jump over the closing bracket.&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
*[[File:Eclipse_ParmHint.png|right]]Parameter hints: As soon as you enter the brackets of a function call the parameters will be displayed above, not at all by chance similar to C4Scripter. The mechanism to find the right parameters to display is kind of smart and will also work when calling a function on an object using &#039;-&amp;gt;&#039; as long as C4DT can deduce the object type of the expression left to &#039;-&amp;gt;&#039;.&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
*[[File:Eclipse_AutoFunction.png|right]] When you want to declare a new function you can type the name and then invoke Content Assistance (Ctrl+Space). A function block will be created for you.&lt;br /&gt;
&lt;br /&gt;
==Outline==&lt;br /&gt;
[[File:Eclipse_Outline.png|right]] &amp;lt;p&amp;gt;C4DT Editors fill the Outline view with an outline of the files being edited. The default Clonk perspective places the outline on the left below the Project Explorer.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The outline allows you to filter the list of declarations using a regular expression or wildcard.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The outline also shows types of variables and return types of functions, as inferred by the internal C4Script parser. Of course, since C4Script is relatively dynamic in its nature with eval and arbitrary attribute setting and the like, all those type inferences are without guarantee and might not reflect the true usage of the variable. A question mark following the type signals that the parser detected the possibility of the variable having just about any type so the weather forecast character is even more pronounced in that case.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Type guesses in the form of [x-y: &amp;lt;type&amp;gt;] represent cases where the expression is anticipated to have some array type where the range from x to y is of the given type. There could also be some additional &#039;…&#039; thrown in which would signify that the array will probably have more elements at runtime than those in the specified range.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Errors &amp;amp; Warnings==&lt;br /&gt;
[[File:Eclipse_ProblemsView.png|right]] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The script parser built into C4DT tries to detect lots of potential and actual errors, which are listed in the problems view. A script is reparsed when it gets saved. In some cases errors might become stale and won&#039;t get removed from the list automatically. What you can then do is Clean the project using Project -&amp;gt; Clean. This will reparse all the scripts in either the entire workspace or specific projects and hopefully remove the false errors.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For a list of warnings &amp;amp; errors take a look at [http://bitbucket.org/mortimer/c4dt/src/tip/C4DT/src/net/arctics/clonk/parser/ParserErrorCode.java ParserErrorCode.java].&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Errors and Warnings listed in the Problems View can be individually deactivated if they annoy you. To do that, open up the properties window for the project you want to configure, select the Clonk category and deactivate kinds of errors/warnings to your heart&#039;s content.&amp;lt;/p&amp;gt;&lt;br /&gt;
[[File:Eclipse_ProblemsFilter.png]]&lt;br /&gt;
&lt;br /&gt;
==Quick Fixes==&lt;br /&gt;
[[File:Eclipse_QuickFix.png|right]]&lt;br /&gt;
&amp;lt;p&amp;gt;For certain common cases of errors, c4dt offers automatic quick fixes which are offered to you when you press Ctrl/⌘+1 while having the cursor in a script inside a region marked as erroneous/problematic.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Additional Views==&lt;br /&gt;
&amp;lt;p&amp;gt;C4DT adds a handful of views. Two of them will get placed in the same tabzone as the Outline view by the Clonk perspective.&amp;lt;/p&amp;gt;&lt;br /&gt;
*The Preview view serves as a replacement for the preview feature found in the Clonk Editor.&lt;br /&gt;
*The Clonk Folder view enables quick access to packed c4group files inside the game folder of the engine set for the project whose files you are currently editing.&lt;br /&gt;
&lt;br /&gt;
==Auto-Refresh==&lt;br /&gt;
[[File:Eclipse_AutoRefresh.png|right]]&lt;br /&gt;
&amp;lt;p&amp;gt;When updating your local repository clone, Eclipse tends to get confused because it keeps its own cache of file contents which won&#039;t match with the actual file contents after updating, so messages like &#039;This and that is out of sync with the file system&#039; will pop up. To remedy that, you can open the General-&amp;gt;Workspace preferences and set the settings as shown on the right.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Running Scenarios from Eclipse==&lt;br /&gt;
[[File:C4DT_Run_Scenario.png|right]] You can run scenarios by selecting it in the Project Explorer and then selecting the option Run Scenario found in the popup menu of the Run button (the green one with the white play symbol).&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Debugging===&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:C4DT_Debug_Persp.PNG|right]] To execute scripts one-instruction-at-a-time and inspect values while the script is halted, you have to switch to the debug perspective first. The layout of the main window changes to acommodate debugging. You can still arrange the views as you want but changes to the layout done while in the debug perspective will stay in the debug perspective, so as soon as you switch back to the Clonk perspective your old layout will be restored.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:C4DT_Breakpoint.PNG|right]] Apart from window layout there are also some keyboard shortcuts that become available. Among those is the shortcut to create a breakpoint. By default, it&#039;s Ctrl+Shift+B. You can open any c4script and place a breakpoint in a line that contains function code by using that shortcut (or alternatively right-clicking the ledge on the left and clicking &amp;quot;Toggle Breakpoint&amp;quot;).&amp;lt;/p&amp;gt;&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:C4DT_Debug_Button.PNG|right]] To run a scenario in debug mode all you have to do is pressing the Debug button instead of the Run one. The engine will now be halting script execution as soon as it encounters an instruction marked by a breakpoint. Eclipse will highlight the location where script execution halted. Now various views can be utilised to gain information about the current state of variables and objects. More on those views below.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Now that execution is halted you can do three things:&lt;br /&gt;
*Step Into: The instruction at the current execution position will be executed. If the instruction contains a function call, the debugger will jump into the function and allow you to continue stepping inside that function. Default keystroke: F5&lt;br /&gt;
*Step Over: Same as Step Into with the exception that the debugger won&#039;t go into subordinate function calls. Default keystroke: F6&lt;br /&gt;
*Resume: Resume script execution. The engine will run normally until the next breakpoint is encountered. Default keystroke: F8&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Variables===&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:C4DT_Variables_View.PNG|right]] The Variables view displays local variables and parameters of the function being executed.&amp;lt;/p&amp;gt;&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Expressions===&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:C4DT_Expressions_View.PNG]]&amp;lt;br clear=all/&amp;gt; The expressions view displays a list of user-defined expressions that get evaluated after every execution step. It is evaluated in the context of the calling object so expressions like &amp;quot;GetName()&amp;quot; will work as expected. Local variables and parameters can in principle be used in expressions but evaluation of such expressions might be buggy.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To add new expressions right-click into the view and select &amp;quot;Add Watch Expression&amp;quot;.&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>Domtron</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=C4DT_FAQ&amp;diff=1403</id>
		<title>C4DT FAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=C4DT_FAQ&amp;diff=1403"/>
		<updated>2013-11-03T15:16:36Z</updated>

		<summary type="html">&lt;p&gt;Domtron: added a section for Elipse and C4DT FAQ&amp;#039;s and moved the eclipse question under that.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
==Eclipse and C4DT FAQ&#039;s==&lt;br /&gt;
===Eclipse corrupts my png files when I edit them in a graphics program===&lt;br /&gt;
You can go to Preferences -&amp;gt; General -&amp;gt; Editors -&amp;gt; File Associations and add a new file association for *.png files to ensure that png will always be opened in an external editor of your choice and not in an editor tab inside Eclipse.&lt;/div&gt;</summary>
		<author><name>Domtron</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Temporary_test_page_for_content_development_with_Eclipse&amp;diff=1402</id>
		<title>Temporary test page for content development with Eclipse</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Temporary_test_page_for_content_development_with_Eclipse&amp;diff=1402"/>
		<updated>2013-11-03T14:24:10Z</updated>

		<summary type="html">&lt;p&gt;Domtron: /* Introduction */ Changed a few sentences so the intro would work with the new larger guide.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
This guide covers the basics of using Eclipse to create, organize, and test content for Open Clonk. Eclipse is an extensible opensource [http://en.wikipedia.org/wiki/Integrated_development_environment Integrated Development Environment] (IDE) written in Java, and is available from [http://eclipse.org/downloads/ the eclipse download page]. For the purpose of Clonk development, download the &#039;&#039;Eclipse IDE for Java Developers&#039;&#039; package. In order for Eclipse to be aware of C4Scripts and other Clonk-related files a plugin has to be installed. An explanation on how to do that can be found in the [[C4DT Installation Guide]].&lt;br /&gt;
&lt;br /&gt;
=C4DT Basic Usage=&lt;br /&gt;
&amp;lt;p&amp;gt;As of now, you should have created an OpenClonk project and be sitting in front of something that is quite comparable to the original Clonk Editor. On the left side you have the Project Explorer (or on the right side or wherever you like, since all views can be freely arranged in Eclipse). You can use it to navigate packets as you&#039;d do when using the editor.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Unlike the editor though, files are generally openend not it an external program but in a tab in the Eclipse window. You can still set programs to handle specific files by either using the Open With command in the context menu of the Project Explorer or by setting a program in the preferences. The first method works on a file-by-file basis so you could tell Eclipse to open a specific graphics file with Photoshop while opening others with Paint. The second method (Preferences -&amp;gt; General -&amp;gt; Editors -&amp;gt; File Associations) sets a file association for all files of that type.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Eclipse provides different internal editors for different file types. For Clonk-specific files, C4DT adds some more to the list. Among those are a&lt;br /&gt;
*C4Script Editor&lt;br /&gt;
*Landscape.txt Editor&lt;br /&gt;
*Ini Files Editor (DefCore.txt, ActMap.txt etc)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;All editors provided by C4DT offer suitable syntax highlighting. Apart from that they include special support for the types of files they were intended for:&amp;lt;/p&amp;gt;&lt;br /&gt;
*The C4Script Editor is supposed to help you write scripts more quickly by displaying errors and warnings contained in the script as soon as you save them and offering you a list of identifiers you can insert in specific places. It also tries to make writing properly formatted scripts easier by automatically inserting closing brackets and indenting. In addition to that it also strives to make navigation among and inside scripts easier by hyperlinking between them and providing an outline of the script.&lt;br /&gt;
*The Landscape.txt Editor is tailored for editing - surprise! - Landscape.txt files. Sadly, it doesn&#039;t offer a live preview on how the generated map would look like so it&#039;s probably a good idea to use Mape instead. There are plans to include similar functionality directly in Eclipse though.&lt;br /&gt;
*The Ini Files Editor also includes support for hyperlinks.&lt;br /&gt;
==Navigation==&lt;br /&gt;
&amp;lt;p&amp;gt;Navigating to and between scripts quickly is very important. Because of that, C4DT adds several navigation features:&lt;br /&gt;
*[[File:Eclipse_Hyperlinks.png|right]] &#039;&#039;&#039;Hyperlinks&#039;&#039;&#039;: All valid identifiers can be turned into links by pressing Ctrl/⌘ while hovering over the identifier with your mouse. When you click on them the declaration location of the thing the identifier is referring to will be opened. This works for variables, functions, definitions and also for StringTbl entries ($BlaBla$). [[File:Eclipse_HyperlinksIni.png|right]] Identifiers in ini editors can also be turned into hyperlinks.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
*[[File:Clonk_OpenObject.png|right]] &#039;&#039;&#039;Open Object Dialog&#039;&#039;&#039;: The Open Object dialog can be activated using the Clonk menu in the main menu. As soon as you start typing the dialog starts listing definitions that match the typed text.&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:Eclipse_BackForward.png|right]] &#039;&#039;&#039;Going back and forward&#039;&#039;&#039;: When clicking on hyperlinks or navigating to other files by any other means you will always be able to go back to the original file by either pressing Alt+Left or using the yellow arrows in the toolbar. On a Mac, you can also install [http://marketplace.eclipse.org/content/eclipse-multi-touch Eclipse Multitouch] to navigate back and forth using gestures.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
[[File:Eclipse_DeclarationsFilter.png|right]]&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;&#039;Lookup Declaration&#039;&#039;&#039;: From any script or when having selected a file in the project explorer, you can invoke Lookup Declaration from the Clonk menu (also a candidate for a nice keyboard assignment). You can then filter all the declarations from the current selection (either the project selected in the project explorer or the script being currently edited including its #includes) using regular expressions and jump to the declaration of any identifier matched by the expression.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Getting Content Assistance==&lt;br /&gt;
&amp;lt;p&amp;gt;When you are editing a script you can invoke a list offering you identifiers to insert. This list is context-sensitive so it will display different options depending on whether the cursor is inside a function or not or whether you are invoking it after having written &#039;-&amp;gt;&#039;. The short cut for the Content Assist list is Ctrl+Space but like any other short cut it can be changed in the preferences.&amp;lt;/p&amp;gt;&lt;br /&gt;
[[File:Eclipse_ContentAssist.png]]&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Improvements compared to generic text editors==&lt;br /&gt;
The C4Script editor adds special behaviour for some situations. Those are:&lt;br /&gt;
*[[File:Eclipse_AutomaticBlock.png|right]] Automatic block: When typing &#039;{&#039; and then pressing Return a block will be created automatically and the caret will be placed inside the block indented by one tab.&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
*[[File:Eclipse_AutomaticParmBrackets.png|right]] When you type &#039;(&#039; or &#039;[&#039; the corresponding closing bracket will be automatically inserted. In order to not interrupt your typing those inserted closing brackets will be overridden if you type them by hand subsequently. In this special situation, pressing tab will cause the caret to jump over the closing bracket.&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
*[[File:Eclipse_ParmHint.png|right]]Parameter hints: As soon as you enter the brackets of a function call the parameters will be displayed above, not at all by chance similar to C4Scripter. The mechanism to find the right parameters to display is kind of smart and will also work when calling a function on an object using &#039;-&amp;gt;&#039; as long as C4DT can deduce the object type of the expression left to &#039;-&amp;gt;&#039;.&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
*[[File:Eclipse_AutoFunction.png|right]] When you want to declare a new function you can type the name and then invoke Content Assistance (Ctrl+Space). A function block will be created for you.&lt;br /&gt;
&lt;br /&gt;
==Outline==&lt;br /&gt;
[[File:Eclipse_Outline.png|right]] &amp;lt;p&amp;gt;C4DT Editors fill the Outline view with an outline of the files being edited. The default Clonk perspective places the outline on the left below the Project Explorer.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The outline allows you to filter the list of declarations using a regular expression or wildcard.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The outline also shows types of variables and return types of functions, as inferred by the internal C4Script parser. Of course, since C4Script is relatively dynamic in its nature with eval and arbitrary attribute setting and the like, all those type inferences are without guarantee and might not reflect the true usage of the variable. A question mark following the type signals that the parser detected the possibility of the variable having just about any type so the weather forecast character is even more pronounced in that case.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Type guesses in the form of [x-y: &amp;lt;type&amp;gt;] represent cases where the expression is anticipated to have some array type where the range from x to y is of the given type. There could also be some additional &#039;…&#039; thrown in which would signify that the array will probably have more elements at runtime than those in the specified range.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Errors &amp;amp; Warnings==&lt;br /&gt;
[[File:Eclipse_ProblemsView.png|right]] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The script parser built into C4DT tries to detect lots of potential and actual errors, which are listed in the problems view. A script is reparsed when it gets saved. In some cases errors might become stale and won&#039;t get removed from the list automatically. What you can then do is Clean the project using Project -&amp;gt; Clean. This will reparse all the scripts in either the entire workspace or specific projects and hopefully remove the false errors.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For a list of warnings &amp;amp; errors take a look at [http://bitbucket.org/mortimer/c4dt/src/tip/C4DT/src/net/arctics/clonk/parser/ParserErrorCode.java ParserErrorCode.java].&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Errors and Warnings listed in the Problems View can be individually deactivated if they annoy you. To do that, open up the properties window for the project you want to configure, select the Clonk category and deactivate kinds of errors/warnings to your heart&#039;s content.&amp;lt;/p&amp;gt;&lt;br /&gt;
[[File:Eclipse_ProblemsFilter.png]]&lt;br /&gt;
&lt;br /&gt;
==Quick Fixes==&lt;br /&gt;
[[File:Eclipse_QuickFix.png|right]]&lt;br /&gt;
&amp;lt;p&amp;gt;For certain common cases of errors, c4dt offers automatic quick fixes which are offered to you when you press Ctrl/⌘+1 while having the cursor in a script inside a region marked as erroneous/problematic.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Additional Views==&lt;br /&gt;
&amp;lt;p&amp;gt;C4DT adds a handful of views. Two of them will get placed in the same tabzone as the Outline view by the Clonk perspective.&amp;lt;/p&amp;gt;&lt;br /&gt;
*The Preview view serves as a replacement for the preview feature found in the Clonk Editor.&lt;br /&gt;
*The Clonk Folder view enables quick access to packed c4group files inside the game folder of the engine set for the project whose files you are currently editing.&lt;br /&gt;
&lt;br /&gt;
==Auto-Refresh==&lt;br /&gt;
[[File:Eclipse_AutoRefresh.png|right]]&lt;br /&gt;
&amp;lt;p&amp;gt;When updating your local repository clone, Eclipse tends to get confused because it keeps its own cache of file contents which won&#039;t match with the actual file contents after updating, so messages like &#039;This and that is out of sync with the file system&#039; will pop up. To remedy that, you can open the General-&amp;gt;Workspace preferences and set the settings as shown on the right.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Running Scenarios from Eclipse==&lt;br /&gt;
[[File:C4DT_Run_Scenario.png|right]] You can run scenarios by selecting it in the Project Explorer and then selecting the option Run Scenario found in the popup menu of the Run button (the green one with the white play symbol).&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Debugging===&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:C4DT_Debug_Persp.PNG|right]] To execute scripts one-instruction-at-a-time and inspect values while the script is halted, you have to switch to the debug perspective first. The layout of the main window changes to acommodate debugging. You can still arrange the views as you want but changes to the layout done while in the debug perspective will stay in the debug perspective, so as soon as you switch back to the Clonk perspective your old layout will be restored.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:C4DT_Breakpoint.PNG|right]] Apart from window layout there are also some keyboard shortcuts that become available. Among those is the shortcut to create a breakpoint. By default, it&#039;s Ctrl+Shift+B. You can open any c4script and place a breakpoint in a line that contains function code by using that shortcut (or alternatively right-clicking the ledge on the left and clicking &amp;quot;Toggle Breakpoint&amp;quot;).&amp;lt;/p&amp;gt;&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:C4DT_Debug_Button.PNG|right]] To run a scenario in debug mode all you have to do is pressing the Debug button instead of the Run one. The engine will now be halting script execution as soon as it encounters an instruction marked by a breakpoint. Eclipse will highlight the location where script execution halted. Now various views can be utilised to gain information about the current state of variables and objects. More on those views below.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Now that execution is halted you can do three things:&lt;br /&gt;
*Step Into: The instruction at the current execution position will be executed. If the instruction contains a function call, the debugger will jump into the function and allow you to continue stepping inside that function. Default keystroke: F5&lt;br /&gt;
*Step Over: Same as Step Into with the exception that the debugger won&#039;t go into subordinate function calls. Default keystroke: F6&lt;br /&gt;
*Resume: Resume script execution. The engine will run normally until the next breakpoint is encountered. Default keystroke: F8&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Variables===&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:C4DT_Variables_View.PNG|right]] The Variables view displays local variables and parameters of the function being executed.&amp;lt;/p&amp;gt;&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Expressions===&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:C4DT_Expressions_View.PNG]]&amp;lt;br clear=all/&amp;gt; The expressions view displays a list of user-defined expressions that get evaluated after every execution step. It is evaluated in the context of the calling object so expressions like &amp;quot;GetName()&amp;quot; will work as expected. Local variables and parameters can in principle be used in expressions but evaluation of such expressions might be buggy.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To add new expressions right-click into the view and select &amp;quot;Add Watch Expression&amp;quot;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=End=&lt;br /&gt;
&amp;lt;p&amp;gt;If you have had any problems please checkout the FAQ below or post the question on our [http://forum.openclonk.org/board_show.pl?bid=16 forums]. Now that you know how to use Eclipse and C4DT for content creation you can continue with the [[Content Developers Guide]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
==Eclipse corrupts my png files when I edit them in a graphics program==&lt;br /&gt;
&amp;lt;p&amp;gt;You can go to Preferences -&amp;gt; General -&amp;gt; Editors -&amp;gt; File Associations and add a new file association for *.png files to ensure that png will always be opened in an external editor of your choice and not in an editor tab inside Eclipse.&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>Domtron</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Temporary_test_page_for_content_development_with_Eclipse&amp;diff=1401</id>
		<title>Temporary test page for content development with Eclipse</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Temporary_test_page_for_content_development_with_Eclipse&amp;diff=1401"/>
		<updated>2013-11-02T17:15:18Z</updated>

		<summary type="html">&lt;p&gt;Domtron: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
Eclipse is an extensible opensource IDE written in Java. It can be obtained from [http://eclipse.org/downloads/ the eclipse]. For the purpose of Clonk development the &#039;&#039;Eclipse IDE for Java Developers&#039;&#039; package will do. In order for Eclipse to be aware of C4Scripts and other Clonk-related files a plugin has to be installed. An explanation on how to do that can be found in the [[C4DT Installation Guide]]. Below is a list of tutorials to introduce you to C4DT, the Clonk Development Tools for Eclipse.&lt;br /&gt;
&lt;br /&gt;
=C4DT Basic Usage=&lt;br /&gt;
&amp;lt;p&amp;gt;As of now, you should have created an OpenClonk project and be sitting in front of something that is quite comparable to the original Clonk Editor. On the left side you have the Project Explorer (or on the right side or wherever you like, since all views can be freely arranged in Eclipse). You can use it to navigate packets as you&#039;d do when using the editor.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Unlike the editor though, files are generally openend not it an external program but in a tab in the Eclipse window. You can still set programs to handle specific files by either using the Open With command in the context menu of the Project Explorer or by setting a program in the preferences. The first method works on a file-by-file basis so you could tell Eclipse to open a specific graphics file with Photoshop while opening others with Paint. The second method (Preferences -&amp;gt; General -&amp;gt; Editors -&amp;gt; File Associations) sets a file association for all files of that type.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Eclipse provides different internal editors for different file types. For Clonk-specific files, C4DT adds some more to the list. Among those are a&lt;br /&gt;
*C4Script Editor&lt;br /&gt;
*Landscape.txt Editor&lt;br /&gt;
*Ini Files Editor (DefCore.txt, ActMap.txt etc)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;All editors provided by C4DT offer suitable syntax highlighting. Apart from that they include special support for the types of files they were intended for:&amp;lt;/p&amp;gt;&lt;br /&gt;
*The C4Script Editor is supposed to help you write scripts more quickly by displaying errors and warnings contained in the script as soon as you save them and offering you a list of identifiers you can insert in specific places. It also tries to make writing properly formatted scripts easier by automatically inserting closing brackets and indenting. In addition to that it also strives to make navigation among and inside scripts easier by hyperlinking between them and providing an outline of the script.&lt;br /&gt;
*The Landscape.txt Editor is tailored for editing - surprise! - Landscape.txt files. Sadly, it doesn&#039;t offer a live preview on how the generated map would look like so it&#039;s probably a good idea to use Mape instead. There are plans to include similar functionality directly in Eclipse though.&lt;br /&gt;
*The Ini Files Editor also includes support for hyperlinks.&lt;br /&gt;
==Navigation==&lt;br /&gt;
&amp;lt;p&amp;gt;Navigating to and between scripts quickly is very important. Because of that, C4DT adds several navigation features:&lt;br /&gt;
*[[File:Eclipse_Hyperlinks.png|right]] &#039;&#039;&#039;Hyperlinks&#039;&#039;&#039;: All valid identifiers can be turned into links by pressing Ctrl/⌘ while hovering over the identifier with your mouse. When you click on them the declaration location of the thing the identifier is referring to will be opened. This works for variables, functions, definitions and also for StringTbl entries ($BlaBla$). [[File:Eclipse_HyperlinksIni.png|right]] Identifiers in ini editors can also be turned into hyperlinks.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
*[[File:Clonk_OpenObject.png|right]] &#039;&#039;&#039;Open Object Dialog&#039;&#039;&#039;: The Open Object dialog can be activated using the Clonk menu in the main menu. As soon as you start typing the dialog starts listing definitions that match the typed text.&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:Eclipse_BackForward.png|right]] &#039;&#039;&#039;Going back and forward&#039;&#039;&#039;: When clicking on hyperlinks or navigating to other files by any other means you will always be able to go back to the original file by either pressing Alt+Left or using the yellow arrows in the toolbar. On a Mac, you can also install [http://marketplace.eclipse.org/content/eclipse-multi-touch Eclipse Multitouch] to navigate back and forth using gestures.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
[[File:Eclipse_DeclarationsFilter.png|right]]&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;&#039;Lookup Declaration&#039;&#039;&#039;: From any script or when having selected a file in the project explorer, you can invoke Lookup Declaration from the Clonk menu (also a candidate for a nice keyboard assignment). You can then filter all the declarations from the current selection (either the project selected in the project explorer or the script being currently edited including its #includes) using regular expressions and jump to the declaration of any identifier matched by the expression.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Getting Content Assistance==&lt;br /&gt;
&amp;lt;p&amp;gt;When you are editing a script you can invoke a list offering you identifiers to insert. This list is context-sensitive so it will display different options depending on whether the cursor is inside a function or not or whether you are invoking it after having written &#039;-&amp;gt;&#039;. The short cut for the Content Assist list is Ctrl+Space but like any other short cut it can be changed in the preferences.&amp;lt;/p&amp;gt;&lt;br /&gt;
[[File:Eclipse_ContentAssist.png]]&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Improvements compared to generic text editors==&lt;br /&gt;
The C4Script editor adds special behaviour for some situations. Those are:&lt;br /&gt;
*[[File:Eclipse_AutomaticBlock.png|right]] Automatic block: When typing &#039;{&#039; and then pressing Return a block will be created automatically and the caret will be placed inside the block indented by one tab.&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
*[[File:Eclipse_AutomaticParmBrackets.png|right]] When you type &#039;(&#039; or &#039;[&#039; the corresponding closing bracket will be automatically inserted. In order to not interrupt your typing those inserted closing brackets will be overridden if you type them by hand subsequently. In this special situation, pressing tab will cause the caret to jump over the closing bracket.&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
*[[File:Eclipse_ParmHint.png|right]]Parameter hints: As soon as you enter the brackets of a function call the parameters will be displayed above, not at all by chance similar to C4Scripter. The mechanism to find the right parameters to display is kind of smart and will also work when calling a function on an object using &#039;-&amp;gt;&#039; as long as C4DT can deduce the object type of the expression left to &#039;-&amp;gt;&#039;.&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
*[[File:Eclipse_AutoFunction.png|right]] When you want to declare a new function you can type the name and then invoke Content Assistance (Ctrl+Space). A function block will be created for you.&lt;br /&gt;
&lt;br /&gt;
==Outline==&lt;br /&gt;
[[File:Eclipse_Outline.png|right]] &amp;lt;p&amp;gt;C4DT Editors fill the Outline view with an outline of the files being edited. The default Clonk perspective places the outline on the left below the Project Explorer.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The outline allows you to filter the list of declarations using a regular expression or wildcard.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The outline also shows types of variables and return types of functions, as inferred by the internal C4Script parser. Of course, since C4Script is relatively dynamic in its nature with eval and arbitrary attribute setting and the like, all those type inferences are without guarantee and might not reflect the true usage of the variable. A question mark following the type signals that the parser detected the possibility of the variable having just about any type so the weather forecast character is even more pronounced in that case.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Type guesses in the form of [x-y: &amp;lt;type&amp;gt;] represent cases where the expression is anticipated to have some array type where the range from x to y is of the given type. There could also be some additional &#039;…&#039; thrown in which would signify that the array will probably have more elements at runtime than those in the specified range.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Errors &amp;amp; Warnings==&lt;br /&gt;
[[File:Eclipse_ProblemsView.png|right]] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The script parser built into C4DT tries to detect lots of potential and actual errors, which are listed in the problems view. A script is reparsed when it gets saved. In some cases errors might become stale and won&#039;t get removed from the list automatically. What you can then do is Clean the project using Project -&amp;gt; Clean. This will reparse all the scripts in either the entire workspace or specific projects and hopefully remove the false errors.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For a list of warnings &amp;amp; errors take a look at [http://bitbucket.org/mortimer/c4dt/src/tip/C4DT/src/net/arctics/clonk/parser/ParserErrorCode.java ParserErrorCode.java].&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Errors and Warnings listed in the Problems View can be individually deactivated if they annoy you. To do that, open up the properties window for the project you want to configure, select the Clonk category and deactivate kinds of errors/warnings to your heart&#039;s content.&amp;lt;/p&amp;gt;&lt;br /&gt;
[[File:Eclipse_ProblemsFilter.png]]&lt;br /&gt;
&lt;br /&gt;
==Quick Fixes==&lt;br /&gt;
[[File:Eclipse_QuickFix.png|right]]&lt;br /&gt;
&amp;lt;p&amp;gt;For certain common cases of errors, c4dt offers automatic quick fixes which are offered to you when you press Ctrl/⌘+1 while having the cursor in a script inside a region marked as erroneous/problematic.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Additional Views==&lt;br /&gt;
&amp;lt;p&amp;gt;C4DT adds a handful of views. Two of them will get placed in the same tabzone as the Outline view by the Clonk perspective.&amp;lt;/p&amp;gt;&lt;br /&gt;
*The Preview view serves as a replacement for the preview feature found in the Clonk Editor.&lt;br /&gt;
*The Clonk Folder view enables quick access to packed c4group files inside the game folder of the engine set for the project whose files you are currently editing.&lt;br /&gt;
&lt;br /&gt;
==Auto-Refresh==&lt;br /&gt;
[[File:Eclipse_AutoRefresh.png|right]]&lt;br /&gt;
&amp;lt;p&amp;gt;When updating your local repository clone, Eclipse tends to get confused because it keeps its own cache of file contents which won&#039;t match with the actual file contents after updating, so messages like &#039;This and that is out of sync with the file system&#039; will pop up. To remedy that, you can open the General-&amp;gt;Workspace preferences and set the settings as shown on the right.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Running Scenarios from Eclipse==&lt;br /&gt;
[[File:C4DT_Run_Scenario.png|right]] You can run scenarios by selecting it in the Project Explorer and then selecting the option Run Scenario found in the popup menu of the Run button (the green one with the white play symbol).&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Debugging===&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:C4DT_Debug_Persp.PNG|right]] To execute scripts one-instruction-at-a-time and inspect values while the script is halted, you have to switch to the debug perspective first. The layout of the main window changes to acommodate debugging. You can still arrange the views as you want but changes to the layout done while in the debug perspective will stay in the debug perspective, so as soon as you switch back to the Clonk perspective your old layout will be restored.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:C4DT_Breakpoint.PNG|right]] Apart from window layout there are also some keyboard shortcuts that become available. Among those is the shortcut to create a breakpoint. By default, it&#039;s Ctrl+Shift+B. You can open any c4script and place a breakpoint in a line that contains function code by using that shortcut (or alternatively right-clicking the ledge on the left and clicking &amp;quot;Toggle Breakpoint&amp;quot;).&amp;lt;/p&amp;gt;&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:C4DT_Debug_Button.PNG|right]] To run a scenario in debug mode all you have to do is pressing the Debug button instead of the Run one. The engine will now be halting script execution as soon as it encounters an instruction marked by a breakpoint. Eclipse will highlight the location where script execution halted. Now various views can be utilised to gain information about the current state of variables and objects. More on those views below.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Now that execution is halted you can do three things:&lt;br /&gt;
*Step Into: The instruction at the current execution position will be executed. If the instruction contains a function call, the debugger will jump into the function and allow you to continue stepping inside that function. Default keystroke: F5&lt;br /&gt;
*Step Over: Same as Step Into with the exception that the debugger won&#039;t go into subordinate function calls. Default keystroke: F6&lt;br /&gt;
*Resume: Resume script execution. The engine will run normally until the next breakpoint is encountered. Default keystroke: F8&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Variables===&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:C4DT_Variables_View.PNG|right]] The Variables view displays local variables and parameters of the function being executed.&amp;lt;/p&amp;gt;&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Expressions===&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:C4DT_Expressions_View.PNG]]&amp;lt;br clear=all/&amp;gt; The expressions view displays a list of user-defined expressions that get evaluated after every execution step. It is evaluated in the context of the calling object so expressions like &amp;quot;GetName()&amp;quot; will work as expected. Local variables and parameters can in principle be used in expressions but evaluation of such expressions might be buggy.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To add new expressions right-click into the view and select &amp;quot;Add Watch Expression&amp;quot;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=End=&lt;br /&gt;
&amp;lt;p&amp;gt;If you have had any problems please checkout the FAQ below or post the question on our [http://forum.openclonk.org/board_show.pl?bid=16 forums]. Now that you know how to use Eclipse and C4DT for content creation you can continue with the [[Content Developers Guide]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
==Eclipse corrupts my png files when I edit them in a graphics program==&lt;br /&gt;
&amp;lt;p&amp;gt;You can go to Preferences -&amp;gt; General -&amp;gt; Editors -&amp;gt; File Associations and add a new file association for *.png files to ensure that png will always be opened in an external editor of your choice and not in an editor tab inside Eclipse.&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>Domtron</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Temporary_test_page_for_content_development_with_Eclipse&amp;diff=1400</id>
		<title>Temporary test page for content development with Eclipse</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Temporary_test_page_for_content_development_with_Eclipse&amp;diff=1400"/>
		<updated>2013-11-02T16:30:50Z</updated>

		<summary type="html">&lt;p&gt;Domtron: Merged several separate pages about using eclipse for OC content development into one page. Tweaks are needed for image placements and the general flow of the guide.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
Eclipse is an extensible opensource IDE written in Java. It can be obtained from [http://eclipse.org/downloads/ the eclipse]. For the purpose of Clonk development the &#039;&#039;Eclipse IDE for Java Developers&#039;&#039; package will do. In order for Eclipse to be aware of C4Scripts and other Clonk-related files a plugin has to be installed. An explanation on how to do that can be found in the [[C4DT Installation Guide]]. Below is a list of tutorials to introduce you to C4DT, the Clonk Development Tools for Eclipse.&lt;br /&gt;
&lt;br /&gt;
=C4DT Basic Usage=&lt;br /&gt;
&amp;lt;p&amp;gt;As of now, you should have created an OpenClonk project and be sitting in front of something that is quite comparable to the original Clonk Editor. On the left side you have the Project Explorer (or on the right side or wherever you like, since all views can be freely arranged in Eclipse). You can use it to navigate packets as you&#039;d do when using the editor.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Unlike the editor though, files are generally openend not it an external program but in a tab in the Eclipse window. You can still set programs to handle specific files by either using the Open With command in the context menu of the Project Explorer or by setting a program in the preferences. The first method works on a file-by-file basis so you could tell Eclipse to open a specific graphics file with Photoshop while opening others with Paint. The second method (Preferences -&amp;gt; General -&amp;gt; Editors -&amp;gt; File Associations) sets a file association for all files of that type.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Eclipse provides different internal editors for different file types. For Clonk-specific files, C4DT adds some more to the list. Among those are a&lt;br /&gt;
*C4Script Editor&lt;br /&gt;
*Landscape.txt Editor&lt;br /&gt;
*Ini Files Editor (DefCore.txt, ActMap.txt etc)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;All editors provided by C4DT offer suitable syntax highlighting. Apart from that they include special support for the types of files they were intended for:&amp;lt;/p&amp;gt;&lt;br /&gt;
*The C4Script Editor is supposed to help you write scripts more quickly by displaying errors and warnings contained in the script as soon as you save them and offering you a list of identifiers you can insert in specific places. It also tries to make writing properly formatted scripts easier by automatically inserting closing brackets and indenting. In addition to that it also strives to make navigation among and inside scripts easier by hyperlinking between them and providing an outline of the script.&lt;br /&gt;
*The Landscape.txt Editor is tailored for editing - surprise! - Landscape.txt files. Sadly, it doesn&#039;t offer a live preview on how the generated map would look like so it&#039;s probably a good idea to use Mape instead. There are plans to include similar functionality directly in Eclipse though.&lt;br /&gt;
*The Ini Files Editor also includes support for hyperlinks.&lt;br /&gt;
==Navigation==&lt;br /&gt;
&amp;lt;p&amp;gt;Navigating to and between scripts quickly is very important. Because of that, C4DT adds several navigation features:&lt;br /&gt;
*[[File:Eclipse_Hyperlinks.png|right]] &#039;&#039;&#039;Hyperlinks&#039;&#039;&#039;: All valid identifiers can be turned into links by pressing Ctrl/⌘ while hovering over the identifier with your mouse. When you click on them the declaration location of the thing the identifier is referring to will be opened. This works for variables, functions, definitions and also for StringTbl entries ($BlaBla$). [[File:Eclipse_HyperlinksIni.png|right]] Identifiers in ini editors can also be turned into hyperlinks.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
*[[File:Clonk_OpenObject.png|right]] &#039;&#039;&#039;Open Object Dialog&#039;&#039;&#039;: The Open Object dialog can be activated using the Clonk menu in the main menu. As soon as you start typing the dialog starts listing definitions that match the typed text.&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:Eclipse_BackForward.png|right]] &#039;&#039;&#039;Going back and forward&#039;&#039;&#039;: When clicking on hyperlinks or navigating to other files by any other means you will always be able to go back to the original file by either pressing Alt+Left or using the yellow arrows in the toolbar. On a Mac, you can also install [http://marketplace.eclipse.org/content/eclipse-multi-touch Eclipse Multitouch] to navigate back and forth using gestures.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
[[File:Eclipse_DeclarationsFilter.png|right]]&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;&#039;Lookup Declaration&#039;&#039;&#039;: From any script or when having selected a file in the project explorer, you can invoke Lookup Declaration from the Clonk menu (also a candidate for a nice keyboard assignment). You can then filter all the declarations from the current selection (either the project selected in the project explorer or the script being currently edited including its #includes) using regular expressions and jump to the declaration of any identifier matched by the expression.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Getting Content Assistance==&lt;br /&gt;
&amp;lt;p&amp;gt;When you are editing a script you can invoke a list offering you identifiers to insert. This list is context-sensitive so it will display different options depending on whether the cursor is inside a function or not or whether you are invoking it after having written &#039;-&amp;gt;&#039;. The short cut for the Content Assist list is Ctrl+Space but like any other short cut it can be changed in the preferences.&amp;lt;/p&amp;gt;&lt;br /&gt;
[[File:Eclipse_ContentAssist.png]]&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Improvements compared to generic text editors==&lt;br /&gt;
The C4Script editor adds special behaviour for some situations. Those are:&lt;br /&gt;
*[[File:Eclipse_AutomaticBlock.png|right]] Automatic block: When typing &#039;{&#039; and then pressing Return a block will be created automatically and the caret will be placed inside the block indented by one tab.&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
*[[File:Eclipse_AutomaticParmBrackets.png|right]] When you type &#039;(&#039; or &#039;[&#039; the corresponding closing bracket will be automatically inserted. In order to not interrupt your typing those inserted closing brackets will be overridden if you type them by hand subsequently. In this special situation, pressing tab will cause the caret to jump over the closing bracket.&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
*[[File:Eclipse_ParmHint.png|right]]Parameter hints: As soon as you enter the brackets of a function call the parameters will be displayed above, not at all by chance similar to C4Scripter. The mechanism to find the right parameters to display is kind of smart and will also work when calling a function on an object using &#039;-&amp;gt;&#039; as long as C4DT can deduce the object type of the expression left to &#039;-&amp;gt;&#039;.&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
*[[File:Eclipse_AutoFunction.png|right]] When you want to declare a new function you can type the name and then invoke Content Assistance (Ctrl+Space). A function block will be created for you.&lt;br /&gt;
&lt;br /&gt;
==Outline==&lt;br /&gt;
[[File:Eclipse_Outline.png|right]] &amp;lt;p&amp;gt;C4DT Editors fill the Outline view with an outline of the files being edited. The default Clonk perspective places the outline on the left below the Project Explorer.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The outline allows you to filter the list of declarations using a regular expression or wildcard.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The outline also shows types of variables and return types of functions, as inferred by the internal C4Script parser. Of course, since C4Script is relatively dynamic in its nature with eval and arbitrary attribute setting and the like, all those type inferences are without guarantee and might not reflect the true usage of the variable. A question mark following the type signals that the parser detected the possibility of the variable having just about any type so the weather forecast character is even more pronounced in that case.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Type guesses in the form of [x-y: &amp;lt;type&amp;gt;] represent cases where the expression is anticipated to have some array type where the range from x to y is of the given type. There could also be some additional &#039;…&#039; thrown in which would signify that the array will probably have more elements at runtime than those in the specified range.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Errors &amp;amp; Warnings==&lt;br /&gt;
[[File:Eclipse_ProblemsView.png|right]] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The script parser built into C4DT tries to detect lots of potential and actual errors, which are listed in the problems view. A script is reparsed when it gets saved. In some cases errors might become stale and won&#039;t get removed from the list automatically. What you can then do is Clean the project using Project -&amp;gt; Clean. This will reparse all the scripts in either the entire workspace or specific projects and hopefully remove the false errors.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For a list of warnings &amp;amp; errors take a look at [http://bitbucket.org/mortimer/c4dt/src/tip/C4DT/src/net/arctics/clonk/parser/ParserErrorCode.java ParserErrorCode.java].&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Errors and Warnings listed in the Problems View can be individually deactivated if they annoy you. To do that, open up the properties window for the project you want to configure, select the Clonk category and deactivate kinds of errors/warnings to your heart&#039;s content.&amp;lt;/p&amp;gt;&lt;br /&gt;
[[File:Eclipse_ProblemsFilter.png]]&lt;br /&gt;
&lt;br /&gt;
==Quick Fixes==&lt;br /&gt;
[[File:Eclipse_QuickFix.png|right]]&lt;br /&gt;
&amp;lt;p&amp;gt;For certain common cases of errors, c4dt offers automatic quick fixes which are offered to you when you press Ctrl/⌘+1 while having the cursor in a script inside a region marked as erroneous/problematic.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Additional Views==&lt;br /&gt;
&amp;lt;p&amp;gt;C4DT adds a handful of views. Two of them will get placed in the same tabzone as the Outline view by the Clonk perspective.&amp;lt;/p&amp;gt;&lt;br /&gt;
*The Preview view serves as a replacement for the preview feature found in the Clonk Editor.&lt;br /&gt;
*The Clonk Folder view enables quick access to packed c4group files inside the game folder of the engine set for the project whose files you are currently editing.&lt;br /&gt;
&lt;br /&gt;
==Auto-Refresh==&lt;br /&gt;
[[File:Eclipse_AutoRefresh.png|right]]&lt;br /&gt;
&amp;lt;p&amp;gt;When updating your local repository clone, Eclipse tends to get confused because it keeps its own cache of file contents which won&#039;t match with the actual file contents after updating, so messages like &#039;This and that is out of sync with the file system&#039; will pop up. To remedy that, you can open the General-&amp;gt;Workspace preferences and set the settings as shown on the right.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Running Scenarios from Eclipse==&lt;br /&gt;
[[File:C4DT_Run_Scenario.png|right]] You can run scenarios by selecting it in the Project Explorer and then selecting the option Run Scenario found in the popup menu of the Run button (the green one with the white play symbol).&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Debugging===&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:C4DT_Debug_Persp.PNG|right]] To execute scripts one-instruction-at-a-time and inspect values while the script is halted, you have to switch to the debug perspective first. The layout of the main window changes to acommodate debugging. You can still arrange the views as you want but changes to the layout done while in the debug perspective will stay in the debug perspective, so as soon as you switch back to the Clonk perspective your old layout will be restored.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:C4DT_Breakpoint.PNG|right]] Apart from window layout there are also some keyboard shortcuts that become available. Among those is the shortcut to create a breakpoint. By default, it&#039;s Ctrl+Shift+B. You can open any c4script and place a breakpoint in a line that contains function code by using that shortcut (or alternatively right-clicking the ledge on the left and clicking &amp;quot;Toggle Breakpoint&amp;quot;).&amp;lt;/p&amp;gt;&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:C4DT_Debug_Button.PNG|right]] To run a scenario in debug mode all you have to do is pressing the Debug button instead of the Run one. The engine will now be halting script execution as soon as it encounters an instruction marked by a breakpoint. Eclipse will highlight the location where script execution halted. Now various views can be utilised to gain information about the current state of variables and objects. More on those views below.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Now that execution is halted you can do three things:&lt;br /&gt;
*Step Into: The instruction at the current execution position will be executed. If the instruction contains a function call, the debugger will jump into the function and allow you to continue stepping inside that function. Default keystroke: F5&lt;br /&gt;
*Step Over: Same as Step Into with the exception that the debugger won&#039;t go into subordinate function calls. Default keystroke: F6&lt;br /&gt;
*Resume: Resume script execution. The engine will run normally until the next breakpoint is encountered. Default keystroke: F8&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Variables===&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:C4DT_Variables_View.PNG|right]] The Variables view displays local variables and parameters of the function being executed.&amp;lt;/p&amp;gt;&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Expressions===&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:C4DT_Expressions_View.PNG]]&amp;lt;br clear=all/&amp;gt; The expressions view displays a list of user-defined expressions that get evaluated after every execution step. It is evaluated in the context of the calling object so expressions like &amp;quot;GetName()&amp;quot; will work as expected. Local variables and parameters can in principle be used in expressions but evaluation of such expressions might be buggy.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To add new expressions right-click into the view and select &amp;quot;Add Watch Expression&amp;quot;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=End=&lt;br /&gt;
&amp;lt;p&amp;gt;If you have had any problems please checkout the FAQ below or post the question on our [http://forum.openclonk.org/board_show.pl?bid=16 forums].Now that you know how to use Eclipse and C4DT for content creation you can continue with the [[Content Developers Guide]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
==Eclipse corrupts my png files when I edit them in a graphics program==&lt;br /&gt;
&amp;lt;p&amp;gt;You can go to Preferences -&amp;gt; General -&amp;gt; Editors -&amp;gt; File Associations and add a new file association for *.png files to ensure that png will always be opened in an external editor of your choice and not in an editor tab inside Eclipse.&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>Domtron</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=User_talk:Domtron&amp;diff=1399</id>
		<title>User talk:Domtron</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=User_talk:Domtron&amp;diff=1399"/>
		<updated>2013-11-02T15:57:50Z</updated>

		<summary type="html">&lt;p&gt;Domtron: Created page with &amp;quot;temporary test page for content development with Eclipse&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[temporary test page for content development with Eclipse]]&lt;/div&gt;</summary>
		<author><name>Domtron</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=C4DT_Editors&amp;diff=1398</id>
		<title>C4DT Editors</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=C4DT_Editors&amp;diff=1398"/>
		<updated>2013-11-02T15:51:17Z</updated>

		<summary type="html">&lt;p&gt;Domtron: added a missing &amp;lt;/p&amp;gt; that caused the &amp;lt;p&amp;gt; for the next paragraph to be rendered as text on the page.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&amp;lt;p&amp;gt;As of now, you should have created an OpenClonk project and be sitting in front of something that is quite comparable to the original Clonk Editor. On the left side you have the Project Explorer (or on the right side or wherever you like, since all views can be freely arranged in Eclipse). You can use it to navigate packets as you&#039;d do when using the editor.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Unlike the editor though, files are generally openend not it an external program but in a tab in the Eclipse window. You can still set programs to handle specific files by either using the Open With command in the context menu of the Project Explorer or by setting a program in the preferences. The first method works on a file-by-file basis so you could tell Eclipse to open a specific graphics file with Photoshop while opening others with Paint. The second method (Preferences -&amp;gt; General -&amp;gt; Editors -&amp;gt; File Associations) sets a file association for all files of that type.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Eclipse provides different internal editors for different file types. For Clonk-specific files, C4DT adds some more to the list. Among those are a&lt;br /&gt;
*C4Script Editor&lt;br /&gt;
*Landscape.txt Editor&lt;br /&gt;
*Ini Files Editor (DefCore.txt, ActMap.txt etc)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;All editors provided by C4DT offer suitable syntax highlighting. Apart from that they include special support for the types of files they were intended for:&amp;lt;/p&amp;gt;&lt;br /&gt;
*The C4Script Editor is supposed to help you write scripts more quickly by displaying errors and warnings contained in the script as soon as you save them and offering you a list of identifiers you can insert in specific places. It also tries to make writing properly formatted scripts easier by automatically inserting closing brackets and indenting. In addition to that it also strives to make navigation among and inside scripts easier by hyperlinking between them and providing an outline of the script.&lt;br /&gt;
*The Landscape.txt Editor is tailored for editing - surprise! - Landscape.txt files. Sadly, it doesn&#039;t offer a live preview on how the generated map would look like so it&#039;s probably a good idea to use Mape instead. There are plans to include similar functionality directly in Eclipse though.&lt;br /&gt;
*The Ini Files Editor also includes support for hyperlinks.&lt;br /&gt;
==Navigation==&lt;br /&gt;
&amp;lt;p&amp;gt;Navigating to and between scripts quickly is very important. Because of that, C4DT adds several navigation features:&lt;br /&gt;
*[[File:Eclipse_Hyperlinks.png|right]] &#039;&#039;&#039;Hyperlinks&#039;&#039;&#039;: All valid identifiers can be turned into links by pressing Ctrl/⌘ while hovering over the identifier with your mouse. When you click on them the declaration location of the thing the identifier is referring to will be opened. This works for variables, functions, definitions and also for StringTbl entries ($BlaBla$). [[File:Eclipse_HyperlinksIni.png|right]] Identifiers in ini editors can also be turned into hyperlinks.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
*[[File:Clonk_OpenObject.png|right]] &#039;&#039;&#039;Open Object Dialog&#039;&#039;&#039;: The Open Object dialog can be activated using the Clonk menu in the main menu. As soon as you start typing the dialog starts listing definitions that match the typed text.&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:Eclipse_BackForward.png|right]] &#039;&#039;&#039;Going back and forward&#039;&#039;&#039;: When clicking on hyperlinks or navigating to other files by any other means you will always be able to go back to the original file by either pressing Alt+Left or using the yellow arrows in the toolbar. On a Mac, you can also install [http://marketplace.eclipse.org/content/eclipse-multi-touch Eclipse Multitouch] to navigate back and forth using gestures.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
[[File:Eclipse_DeclarationsFilter.png|right]]&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;&#039;Lookup Declaration&#039;&#039;&#039;: From any script or when having selected a file in the project explorer, you can invoke Lookup Declaration from the Clonk menu (also a candidate for a nice keyboard assignment). You can then filter all the declarations from the current selection (either the project selected in the project explorer or the script being currently edited including its #includes) using regular expressions and jump to the declaration of any identifier matched by the expression.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Getting Content Assistance==&lt;br /&gt;
&amp;lt;p&amp;gt;When you are editing a script you can invoke a list offering you identifiers to insert. This list is context-sensitive so it will display different options depending on whether the cursor is inside a function or not or whether you are invoking it after having written &#039;-&amp;gt;&#039;. The short cut for the Content Assist list is Ctrl+Space but like any other short cut it can be changed in the preferences.&amp;lt;/p&amp;gt;&lt;br /&gt;
[[File:Eclipse_ContentAssist.png]]&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Improvements compared to generic text editors==&lt;br /&gt;
The C4Script editor adds special behaviour for some situations. Those are:&lt;br /&gt;
*[[File:Eclipse_AutomaticBlock.png|right]] Automatic block: When typing &#039;{&#039; and then pressing Return a block will be created automatically and the caret will be placed inside the block indented by one tab.&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
*[[File:Eclipse_AutomaticParmBrackets.png|right]] When you type &#039;(&#039; or &#039;[&#039; the corresponding closing bracket will be automatically inserted. In order to not interrupt your typing those inserted closing brackets will be overridden if you type them by hand subsequently. In this special situation, pressing tab will cause the caret to jump over the closing bracket.&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
*[[File:Eclipse_ParmHint.png|right]]Parameter hints: As soon as you enter the brackets of a function call the parameters will be displayed above, not at all by chance similar to C4Scripter. The mechanism to find the right parameters to display is kind of smart and will also work when calling a function on an object using &#039;-&amp;gt;&#039; as long as C4DT can deduce the object type of the expression left to &#039;-&amp;gt;&#039;.&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
*[[File:Eclipse_AutoFunction.png|right]] When you want to declare a new function you can type the name and then invoke Content Assistance (Ctrl+Space). A function block will be created for you.&lt;br /&gt;
&lt;br /&gt;
==Outline==&lt;br /&gt;
[[File:Eclipse_Outline.png|right]] &amp;lt;p&amp;gt;C4DT Editors fill the Outline view with an outline of the files being edited. The default Clonk perspective places the outline on the left below the Project Explorer.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The outline allows you to filter the list of declarations using a regular expression or wildcard.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The outline also shows types of variables and return types of functions, as inferred by the internal C4Script parser. Of course, since C4Script is relatively dynamic in its nature with eval and arbitrary attribute setting and the like, all those type inferences are without guarantee and might not reflect the true usage of the variable. A question mark following the type signals that the parser detected the possibility of the variable having just about any type so the weather forecast character is even more pronounced in that case.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Type guesses in the form of [x-y: &amp;lt;type&amp;gt;] represent cases where the expression is anticipated to have some array type where the range from x to y is of the given type. There could also be some additional &#039;…&#039; thrown in which would signify that the array will probably have more elements at runtime than those in the specified range.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Errors &amp;amp; Warnings==&lt;br /&gt;
[[File:Eclipse_ProblemsView.png|right]] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The script parser built into C4DT tries to detect lots of potential and actual errors, which are listed in the problems view. A script is reparsed when it gets saved. In some cases errors might become stale and won&#039;t get removed from the list automatically. What you can then do is Clean the project using Project -&amp;gt; Clean. This will reparse all the scripts in either the entire workspace or specific projects and hopefully remove the false errors.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For a list of warnings &amp;amp; errors take a look at [http://bitbucket.org/mortimer/c4dt/src/tip/C4DT/src/net/arctics/clonk/parser/ParserErrorCode.java ParserErrorCode.java].&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Errors and Warnings listed in the Problems View can be individually deactivated if they annoy you. To do that, open up the properties window for the project you want to configure, select the Clonk category and deactivate kinds of errors/warnings to your heart&#039;s content.&amp;lt;/p&amp;gt;&lt;br /&gt;
[[File:Eclipse_ProblemsFilter.png]]&lt;br /&gt;
&lt;br /&gt;
==Quick Fixes==&lt;br /&gt;
[[File:Eclipse_QuickFix.png|right]]&lt;br /&gt;
&amp;lt;p&amp;gt;For certain common cases of errors, c4dt offers automatic quick fixes which are offered to you when you press Ctrl/⌘+1 while having the cursor in a script inside a region marked as erroneous/problematic.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Additional Views==&lt;br /&gt;
&amp;lt;p&amp;gt;C4DT adds a handful of views. Two of them will get placed in the same tabzone as the Outline view by the Clonk perspective.&amp;lt;/p&amp;gt;&lt;br /&gt;
*The Preview view serves as a replacement for the preview feature found in the Clonk Editor.&lt;br /&gt;
*The Clonk Folder view enables quick access to packed c4group files inside the game folder of the engine set for the project whose files you are currently editing.&lt;br /&gt;
&lt;br /&gt;
==Auto-Refresh==&lt;br /&gt;
[[File:Eclipse_AutoRefresh.png|right]]&lt;br /&gt;
&amp;lt;p&amp;gt;When updating your local repository clone, Eclipse tends to get confused because it keeps its own cache of file contents which won&#039;t match with the actual file contents after updating, so messages like &#039;This and that is out of sync with the file system&#039; will pop up. To remedy that, you can open the General-&amp;gt;Workspace preferences and set the settings as shown on the right.&lt;/div&gt;</summary>
		<author><name>Domtron</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=C4DT_Editors&amp;diff=1397</id>
		<title>C4DT Editors</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=C4DT_Editors&amp;diff=1397"/>
		<updated>2013-11-02T15:47:44Z</updated>

		<summary type="html">&lt;p&gt;Domtron: added a missing &amp;lt;/p&amp;gt; that caused the &amp;lt;p&amp;gt; for the next paragraph to be rendered as text on the page.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&amp;lt;p&amp;gt;As of now, you should have created an OpenClonk project and be sitting in front of something that is quite comparable to the original Clonk Editor. On the left side you have the Project Explorer (or on the right side or wherever you like, since all views can be freely arranged in Eclipse). You can use it to navigate packets as you&#039;d do when using the editor.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Unlike the editor though, files are generally openend not it an external program but in a tab in the Eclipse window. You can still set programs to handle specific files by either using the Open With command in the context menu of the Project Explorer or by setting a program in the preferences. The first method works on a file-by-file basis so you could tell Eclipse to open a specific graphics file with Photoshop while opening others with Paint. The second method (Preferences -&amp;gt; General -&amp;gt; Editors -&amp;gt; File Associations) sets a file association for all files of that type.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Eclipse provides different internal editors for different file types. For Clonk-specific files, C4DT adds some more to the list. Among those are a&lt;br /&gt;
*C4Script Editor&lt;br /&gt;
*Landscape.txt Editor&lt;br /&gt;
*Ini Files Editor (DefCore.txt, ActMap.txt etc)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;All editors provided by C4DT offer suitable syntax highlighting. Apart from that they include special support for the types of files they were intended for:&amp;lt;/p&amp;gt;&lt;br /&gt;
*The C4Script Editor is supposed to help you write scripts more quickly by displaying errors and warnings contained in the script as soon as you save them and offering you a list of identifiers you can insert in specific places. It also tries to make writing properly formatted scripts easier by automatically inserting closing brackets and indenting. In addition to that it also strives to make navigation among and inside scripts easier by hyperlinking between them and providing an outline of the script.&lt;br /&gt;
*The Landscape.txt Editor is tailored for editing - surprise! - Landscape.txt files. Sadly, it doesn&#039;t offer a live preview on how the generated map would look like so it&#039;s probably a good idea to use Mape instead. There are plans to include similar functionality directly in Eclipse though.&lt;br /&gt;
*The Ini Files Editor also includes support for hyperlinks.&lt;br /&gt;
==Navigation==&lt;br /&gt;
&amp;lt;p&amp;gt;Navigating to and between scripts quickly is very important. Because of that, C4DT adds several navigation features:&lt;br /&gt;
*[[File:Eclipse_Hyperlinks.png|right]] &#039;&#039;&#039;Hyperlinks&#039;&#039;&#039;: All valid identifiers can be turned into links by pressing Ctrl/⌘ while hovering over the identifier with your mouse. When you click on them the declaration location of the thing the identifier is referring to will be opened. This works for variables, functions, definitions and also for StringTbl entries ($BlaBla$). [[File:Eclipse_HyperlinksIni.png|right]] Identifiers in ini editors can also be turned into hyperlinks.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
*[[File:Clonk_OpenObject.png|right]] &#039;&#039;&#039;Open Object Dialog&#039;&#039;&#039;: The Open Object dialog can be activated using the Clonk menu in the main menu. As soon as you start typing the dialog starts listing definitions that match the typed text.&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;[[File:Eclipse_BackForward.png|right]] &#039;&#039;&#039;Going back and forward&#039;&#039;&#039;: When clicking on hyperlinks or navigating to other files by any other means you will always be able to go back to the original file by either pressing Alt+Left or using the yellow arrows in the toolbar. On a Mac, you can also install [http://marketplace.eclipse.org/content/eclipse-multi-touch Eclipse Multitouch] to navigate back and forth using gestures.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
[[File:Eclipse_DeclarationsFilter.png|right]]&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;&#039;Lookup Declaration&#039;&#039;&#039;: From any script or when having selected a file in the project explorer, you can invoke Lookup Declaration from the Clonk menu (also a candidate for a nice keyboard assignment). You can then filter all the declarations from the current selection (either the project selected in the project explorer or the script being currently edited including its #includes) using regular expressions and jump to the declaration of any identifier matched by the expression.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Getting Content Assistance==&lt;br /&gt;
&amp;lt;p&amp;gt;When you are editing a script you can invoke a list offering you identifiers to insert. This list is context-sensitive so it will display different options depending on whether the cursor is inside a function or not or whether you are invoking it after having written &#039;-&amp;gt;&#039;. The short cut for the Content Assist list is Ctrl+Space but like any other short cut it can be changed in the preferences.&amp;lt;/p&amp;gt;&lt;br /&gt;
[[File:Eclipse_ContentAssist.png]]&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Improvements compared to generic text editors==&lt;br /&gt;
The C4Script editor adds special behaviour for some situations. Those are:&lt;br /&gt;
*[[File:Eclipse_AutomaticBlock.png|right]] Automatic block: When typing &#039;{&#039; and then pressing Return a block will be created automatically and the caret will be placed inside the block indented by one tab.&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
*[[File:Eclipse_AutomaticParmBrackets.png|right]] When you type &#039;(&#039; or &#039;[&#039; the corresponding closing bracket will be automatically inserted. In order to not interrupt your typing those inserted closing brackets will be overridden if you type them by hand subsequently. In this special situation, pressing tab will cause the caret to jump over the closing bracket.&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
*[[File:Eclipse_ParmHint.png|right]]Parameter hints: As soon as you enter the brackets of a function call the parameters will be displayed above, not at all by chance similar to C4Scripter. The mechanism to find the right parameters to display is kind of smart and will also work when calling a function on an object using &#039;-&amp;gt;&#039; as long as C4DT can deduce the object type of the expression left to &#039;-&amp;gt;&#039;.&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
*[[File:Eclipse_AutoFunction.png|right]] When you want to declare a new function you can type the name and then invoke Content Assistance (Ctrl+Space). A function block will be created for you.&lt;br /&gt;
&lt;br /&gt;
==Outline==&lt;br /&gt;
[[File:Eclipse_Outline.png|right]] &amp;lt;p&amp;gt;C4DT Editors fill the Outline view with an outline of the files being edited. The default Clonk perspective places the outline on the left below the Project Explorer.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The outline allows you to filter the list of declarations using a regular expression or wildcard.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The outline also shows types of variables and return types of functions, as inferred by the internal C4Script parser. Of course, since C4Script is relatively dynamic in its nature with eval and arbitrary attribute setting and the like, all those type inferences are without guarantee and might not reflect the true usage of the variable. A question mark following the type signals that the parser detected the possibility of the variable having just about any type so the weather forecast character is even more pronounced in that case.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Type guesses in the form of [x-y: &amp;lt;type&amp;gt;] represent cases where the expression is anticipated to have some array type where the range from x to y is of the given type. There could also be some additional &#039;…&#039; thrown in which would signify that the array will probably have more elements at runtime than those in the specified range.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Errors &amp;amp; Warnings==&lt;br /&gt;
[[File:Eclipse_ProblemsView.png|right]] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The script parser built into C4DT tries to detect lots of potential and actual errors, which are listed in the problems view. A script is reparsed when it gets saved. In some cases errors might become stale and won&#039;t get removed from the list automatically. What you can then do is Clean the project using Project -&amp;gt; Clean. This will reparse all the scripts in either the entire workspace or specific projects and hopefully remove the false errors.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For a list of warnings &amp;amp; errors take a look at [http://bitbucket.org/mortimer/c4dt/src/tip/C4DT/src/net/arctics/clonk/parser/ParserErrorCode.java ParserErrorCode.java].&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Errors and Warnings listed in the Problems View can be individually deactivated if they annoy you. To do that, open up the properties window for the project you want to configure, select the Clonk category and deactivate kinds of errors/warnings to your heart&#039;s content.&amp;lt;/p&amp;gt;&lt;br /&gt;
[[File:Eclipse_ProblemsFilter.png]]&lt;br /&gt;
&lt;br /&gt;
==Quick Fixes==&lt;br /&gt;
[[File:Eclipse_QuickFix.png|right]]&lt;br /&gt;
&amp;lt;p&amp;gt;For certain common cases of errors, c4dt offers automatic quick fixes which are offered to you when you press Ctrl/⌘+1 while having the cursor in a script inside a region marked as erroneous/problematic.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Additional Views==&lt;br /&gt;
&amp;lt;p&amp;gt;C4DT adds a handful of views. Two of them will get placed in the same tabzone as the Outline view by the Clonk perspective.&amp;lt;/p&amp;gt;&lt;br /&gt;
*The Preview view serves as a replacement for the preview feature found in the Clonk Editor.&lt;br /&gt;
*The Clonk Folder view enables quick access to packed c4group files inside the game folder of the engine set for the project whose files you are currently editing.&lt;br /&gt;
&lt;br /&gt;
==Auto-Refresh==&lt;br /&gt;
[[File:Eclipse_AutoRefresh.png|right]]&lt;br /&gt;
&amp;lt;p&amp;gt;When updating your local repository clone, Eclipse tends to get confused because it keeps its own cache of file contents which won&#039;t match with the actual file contents after updating, so messages like &#039;This and that is out of sync with the file system&#039; will pop up. To remedy that, you can open the General-&amp;gt;Workspace preferences and set the settings as shown on the right.&lt;/div&gt;</summary>
		<author><name>Domtron</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Tutorial:_Scenario_Creation&amp;diff=1396</id>
		<title>Tutorial: Scenario Creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Tutorial:_Scenario_Creation&amp;diff=1396"/>
		<updated>2013-10-31T03:36:24Z</updated>

		<summary type="html">&lt;p&gt;Domtron: /* Starting a Scenario in Editor Mode */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Hello and welcome to this guide on how to create your own scenarios for OpenClonk!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This tutorial will show you how to make maps for OpenClonk.&lt;br /&gt;
It&#039;s up to you if you want to create a settlement scenario, an arena, a parcour or whatever. Here you will learn the basics and then you can visit one of the follow-up tutorials for the type of scenario you would like to make. &lt;br /&gt;
&lt;br /&gt;
I will use the Eclipse C4DT Editor, so if you did not already, follow [[C4DT Installation Guide|&#039;&#039;&#039;this guide&#039;&#039;&#039;]] for installing and setting it up properly.&lt;br /&gt;
&lt;br /&gt;
==First Steps==&lt;br /&gt;
Fire up Eclipse, you should be presented with your OpenClonk project. Right click on it and select New -&amp;gt; Szenario. In the following configuration window, you can specify the directory, the folder name (the name you see inside Eclipse), and the scenario titel itself. I recommend you to keep those two names the same so it doesn&#039;t get too confusing.&lt;br /&gt;
&lt;br /&gt;
[[File:SetName.png]]&lt;br /&gt;
&lt;br /&gt;
After hitting the Finish button, your scenario will most likely appear somewhere at the bottom, so press F5 to refresh and it will jump in it&#039;s place.&lt;br /&gt;
&lt;br /&gt;
==Landscape==&lt;br /&gt;
&lt;br /&gt;
Before continuing, let&#039;s talk a bit about the landscape. The landscape - also called map - is a fundamental part of any scenario. After you have finished the concept for your scenario and created the necessary files, designing a landscape is probably your first priority. In OpenClonk there are three ways to make landscapes, these are:&lt;br /&gt;
* Dynamic maps using Scenario.txt, which have the drawback of just being stretched and scaled sinusoidal chunks of different materials. This is an obsolete feature and should rather not be used as the landscapes it produces are very boring.&lt;br /&gt;
* Generated maps using a Landscape.txt file where you can create dynamic landscapes using complex algorithms. A lengthy tutorial about the map generator can be found [[Tutorial: Map Generator - The Basics|&#039;&#039;&#039;here&#039;&#039;&#039;]].&lt;br /&gt;
The choice for either a static map or a generated dynamic map depends on the scenario design, adventures rather use static maps opposed to settlement rounds.&lt;br /&gt;
* Static maps which store a hand-drawn landscape in a Map.bmp file, where each pixel represents a certain amount of pixels ingame. This is the method which will be covered in this tutorial.&lt;br /&gt;
&lt;br /&gt;
==Preparations for Static Map Creation==&lt;br /&gt;
&lt;br /&gt;
Expand your newly created scenario by clicking on the little arrow beneath it and open up the file called &amp;quot;Scenario.txt&amp;quot;. This file contains information about the scenario that will be executed at startup ([http://docs.openclonk.org/en/sdk/scenario/scenario.html more information]).&amp;lt;br&amp;gt;&lt;br /&gt;
Scroll down to the &amp;quot;[Landscape]&amp;quot; section and delete everything in it except &#039;&#039;MapWidth&#039;&#039; and &#039;&#039;MapHeight&#039;&#039;. Those two values determine the map size. Changing them after having painted something won&#039;t have any effect, so choose them carefully. If you are not sure, think of a scenario which is about the size you would like yours to have and look up it&#039;s map size. This is how Scenario.txt looks like in my case:&lt;br /&gt;
&lt;br /&gt;
[[File:Scentxt.png]]&lt;br /&gt;
&lt;br /&gt;
Save and close the file.&lt;br /&gt;
&lt;br /&gt;
Now we&#039;re gonna delete the file &amp;quot;Landscape.txt&amp;quot;, it is for dynamic map generation and we want to paint our map manually, so we do not need it.&lt;br /&gt;
&lt;br /&gt;
==Starting a Scenario in Editor Mode==&lt;br /&gt;
To edit a map, you have to start your scenario in Editor Mode, which gives you access to various editing tools. You can start a scenario with or without players. Unfortunately, it is not possible to toggle players inside Eclipse (yet), so you have to start OpenClonk and (de)activate players in the &amp;quot;Player Selection&amp;quot; dialogue.&amp;lt;br&amp;gt;&lt;br /&gt;
When starting without players, the game starts paused and you have to open a viewport yourself via Viewport -&amp;gt; New. I recommend you to start with a player though, because the viewport scrolling bars are broken and you can navigate better with the camera following a clonk.&amp;lt;br&amp;gt;&lt;br /&gt;
Either way, to start the scenario, select it and press the little play button in the action bar at the top.&lt;br /&gt;
&lt;br /&gt;
[[File:StartButton.png]]&lt;br /&gt;
                            | |&lt;br /&gt;
                            | |&lt;br /&gt;
                            V V&lt;br /&gt;
[[File:TUT-SCEN_EMStart.png]]&lt;br /&gt;
&lt;br /&gt;
And you will start in a perfectly clean world. Best conditions for creating your masterpiece, so let&#039;s get to the fun part! There are various tools available to design a map, they are explained in the next chapter:&lt;br /&gt;
&lt;br /&gt;
==Map Editing Tools==&lt;br /&gt;
(See [http://docs.openclonk.org/en/sdk/console.html this page] for more details.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Pause/Resume Buttons:&#039;&#039;&#039; [[File:TUT-SCEN_PauseResume.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
As the name suggests, you can pause and resume the game using these. Left and right to them, you can see a frame counter, a real time counter, and the current FPS.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Game Cursor:&#039;&#039;&#039; [[File:TUT-SCEN_GameCursor.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
This cursor is the same as the ingame cursor, you can use it to throw objects, shoot arrows, and do all the other mouse control stuff.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; You can only zoom with the scrolling wheel when this cursor is selected. Otherwise, you have to use F5/F6.&lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&#039;Editing Cursor:&#039;&#039;&#039; [[File:TUT-SCEN_EditingCursor.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
With this cursor, you can select objects, drag them around, duplicate them, and delete them. Try selecting your Clonk and drag him around. If there are multiple objects overlapping, you can rightclick and select the one you want in the contextmenu.&amp;lt;br&amp;gt;&lt;br /&gt;
When you pick the editing cursor, a properties window appears, and you can see the cursor position coordinates alongside the name of the object currently hovering over in the lower left corner of the engine window. These coordinates are especially important when it comes to determining the starting position or placing objects via script.&amp;lt;br&amp;gt;&lt;br /&gt;
You can delete and duplicate objects, and also access their contents, in the right click contextmenu.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Landscape Brush:&#039;&#039;&#039; [[File:TUT-SCEN_LandscapeBrush.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
Select this tool, and a little window will appear with all the options greyed out, which says &amp;quot;Dynamic landscape&amp;quot;. This means that the map is generated randomly on scenario start based on special [http://docs.openclonk.org/en/sdk/scenario/MapCreatorS2.html Map Generator code.] (The Landscape.txt file we deleted, remember?) But since that&#039;s a bit more complicated and we just want to paint the map straight away inside the viewport, we&#039;re gonna switch to the second option: &amp;quot;Static landscape&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
Static landscape means you can paint a map with all the different materials, save the map into a Map.bmp file, and on next startup, you get the same map.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; Do &#039;&#039;not&#039;&#039; use the third type, &amp;quot;Exact landscape&amp;quot;. It generates way too big files and is buggy, so you can loose all your progress.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:TUT-SCEN_BrushTools.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
The options in this window are pretty straightforward if you are familiar with an image editor like [http://www.gimp.org/ GIMP]. There are different brush types, you can adjust the stroke thickness with the slider, and you can select a material-texture combination. The right texture for each material is chosen automatically, but for some materials, like earth, there are multiple textures available, these are the ones above the hyphen. (You could theoretically also choose a texture from below and e.g. make gold which looks like rock.) Use the different textures to bring more diversity into your maps.&amp;lt;br&amp;gt;&lt;br /&gt;
The two buttons right to the slider determine the background appearing when the painted material is dug or blasted free. The lower one is tunnel background, the default, which is fine for most cases. However, you might want it to be sky background in a sky islands scenario for example.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Log:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:TUT-SCEN_Log.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
The log is where all the information is displayed, like status messages, errors and executed functions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Commandline:&#039;&#039;&#039; [[File:TUT-SCEN_Commandline.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
Is used to execute global script commands. You can click the little expand arrow to bring up list of &#039;&#039;all&#039;&#039; available functions. (Which are indeed quite a lot.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Adding Objects:&#039;&#039;&#039;&lt;br /&gt;
All the original objects are stored inside the Objects.ocd folder. You can add an object to your map by simply dragging the ocd file into the viewport.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Saving:&#039;&#039;&#039;&lt;br /&gt;
The engine doesn&#039;t save your changes automatically, so save your scenario frequently. Do this by selecting File -&amp;gt; Save scenario in the engine window. The log will say &amp;quot;Scenario saved.&amp;quot; and you can quit with peace of mind.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Delete your Clonk before saving, otherwise there will be an &amp;quot;Object XY is missing!&amp;quot; error on startup.&lt;br /&gt;
&lt;br /&gt;
==Follow-up Tutorials==&lt;br /&gt;
&lt;br /&gt;
Now you can design all sorts of maps, but just a pretty landscape isn&#039;t enough - for a complete scenario, you need things like goals, spawnpoints, etc. You will learn how to do this stuff in the follow-up tutorials:&lt;br /&gt;
&lt;br /&gt;
[[How to Create a Settlement Scenario|&#039;&#039;&#039;How to Create a Settlement Scenario&#039;&#039;&#039;]]&lt;br /&gt;
&lt;br /&gt;
[[How to Create an Arena Scenario|&#039;&#039;&#039;How to Create an Arena Scenario&#039;&#039;&#039;]] - &#039;&#039;Not yet available&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Those are planned for the near future, but I hope there will be more to come.&lt;/div&gt;</summary>
		<author><name>Domtron</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=About&amp;diff=1395</id>
		<title>About</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=About&amp;diff=1395"/>
		<updated>2013-10-30T21:34:40Z</updated>

		<summary type="html">&lt;p&gt;Domtron: &amp;quot;What is Clonk&amp;quot; section edit. I tried to improve the last sentence&amp;#039;s syntax to make it sound better.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;OpenClonk is the [http://en.wikipedia.org/wiki/Open_source Open source] successor of the &#039;&#039;&#039;Clonk gaming series&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
OpenClonk is a project dedicated to the further development of the Clonk game series. Our goal is to improve and make the real strengths of Clonk more fun to play: Bustling mining, production lines and economy, fast and fiddly melees. Another focus lies on the further enchancement of the game engine and the extensibility/modability of the game content with [[C4Script Documentation|C4Script]] which has always been one of the most important features of Clonk. &lt;br /&gt;
&lt;br /&gt;
== What is Clonk? ==&lt;br /&gt;
[[File:ClonkDigging.png|right]]&lt;br /&gt;
Clonk is a multiplayer-action-tactics-skill game. It is often referred to as a mixture of The Settlers and Worms. In a simple 2D antfarm-style landscape, the player controls his crew of Clonks, small but robust humanoid beings. The game encourages free play but the normal goal is to either exploit valuable resources from the earth by building a mine or fight each other on an arena-like map.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
The inventor of the game is Matthes Bender.&lt;br /&gt;
The first Clonk was a two player melee game in which the players fought with rocks, flints (basic explosives) and catapults. Through several versions Clonk developed into a hectic and quite complicated game with numerous tactics and possibilities. The classic versions of the game are freeware and can be downloaded from [http://www.clonk.de clonk.de] (may be in German only).&lt;br /&gt;
&lt;br /&gt;
The newer versions of Clonk series (Clonk 4, Planet, Endeavour and Rage) are mostly based on the engine of Clonk 4. Clonk Planet (2000) was the first game in the series with a built-in developer mode that enabled the player to actually develop their own mods for the game. Permitting access the core scripts of the objects and scenarios, the developer mode became one of the most beloved features of Clonk. Thousands of player made and still make mods that are accessible on the [http://www.ccan.de CCAN], the main download archive. Single objects but also big settlements packs or adventures are available. On the [http://www.clonkforge.net Clonk Forge], hobby developers come together to collaborate and contribute to each others clonk development projects.&lt;br /&gt;
Since Clonk Planet, new original game content was continuously added to the main game, for example the knight pack (introducing the knight as a new type of Clonk and medieval battles), the fantasy pack (with a powerful mage and new magic spells) or the FarWorlds (uncommon places such as the Arctic, the Jungle and the Deep-sea). The scripts of the objects and scenarios are written in Clonk&#039;s own scripting language: [[C4Script Documentation|C4Script]] (with a C-style syntax).&lt;br /&gt;
&lt;br /&gt;
In the last years the Clonk community grew continuously, even beyond the borders of the German speaking countries.&lt;br /&gt;
&lt;br /&gt;
In early March 2009, Matthes Bender told the other developers of Clonk Rage that he wouldn&#039;t have any time to work on Clonk anymore. As the Lead Designer of Clonk since Clonk 1 and Directing Manager of RedWolf Design, the company selling the Clonk titles, he left a significant vacancy. The development of Clonk Rage, the last commercial Clonk title, was mostly done as a hobby by the other developers and although they wanted to continue doing that, they felt that more contributors were needed. RedWolf Design agreed to put the game engine&#039;s source code under an open source license, the [[License#The_ISC_license | ISC license]].&lt;br /&gt;
The source code was published in a public repository, allowing everyone to freely modify the source code and game content and discuss the future directions in an open forum. This big change gave us the opportunity to redesign the deadlocked structures of the shareware Clonk titles. By giving up the downward compatibility new concepts become possible. So it was also decided to drop a lot of the &amp;quot;old&amp;quot; game content and drop the [[FAQ#Why_do_you_start_from_scratch_regarding_the_game_content.3F|backwards compatibility requirement]].&lt;/div&gt;</summary>
		<author><name>Domtron</name></author>
	</entry>
</feed>