PDA

View Full Version : ArmADev Eclipse Plugin



Alwarren
Aug 24 2011, 17:26
This is the first test release of the FHQ ArmADev plug-in for Eclipse. ArmADev is a plug-in that extends the Eclipse IDE in such a way that you can develop ARMA 2 and ARMA 2 Operation Arrowhead projects with it. It mostly centres around the SQF editor and project management.

ArmADev is still under development, and in a very early stage (currently 0.0.12), but I have tested it for a while now and it seems to be usable. Still a bit rough around the edges though. Therefore I decided to release it in order to collect bug reports and feedback.

ArmADev is released under the Creative Commons Attribution Unported License (http://creativecommons.org/licenses/by/3.0/).

The following features are implemented and work:


Custom editing perspective.
Integrated SQF editor. The SQF editor is automatically opened for ARMA script function (SQF) files, and supports the usual features one would expect from such an editor:

Syntax Highlighting. Keywords are coloured by their type and the combination of local and global arguments they accept. Strings, comments, and other elements are also coloured.



Automatic formatting and auto-indent. Braces are automatically indented, and brackets can be automatically matched. Comments can be formatted automatically.



Content Assist. Hovering the mouse pointer over a keyword will pop up an explanation of the keyword including parameters and description. A custom view is available that displays this information permanently as a side-bar.



Auto-completion. Hitting CTRL+SPACE will use what you entered and propose completions. Currently only works for keywords and functions, I want to add support for local and global variables later.



Folding. Since there are no real high-level constructs in SQF, folding is done via special comment markers (“//+” to start a fold, “//-” to end it) and can be nested at any depth.



Template support. CTRL+SPACE will also propose template expansions if their name matches with the prefix in the editor.


Integrated Project Management. There are two New Project Wizards available currently:

“New mission from existing source” will create a new project based on your choice of a directory. Checks whether a mission.sgm file is present.



“New mission from scratch” will create a new mission project and folder, and can pre-generate some files (like description.ext, briefing.html, loadscreen and overview picture, etc).


Two custom “Views” (In Eclipse, a view is a window that is not an editor, i.e. something that displays information).

“COMREF” view displays the comref entry of the current selection. Double-click on “addAction” in the editor, and it will show an explanation of the addAction command.



“RPT View” displays the last n kilobytes of the RPT file. If you had script errors during your mission, you can scroll back here to see them.



In order to get ArmADev, you need to do the following:


Install the latest Eclipse (at least 4.1) if you don't have it. Eclipse can be downloaded for free from http://www.eclipse.org/.
Start Eclipse, and go to Help->Install New Software.
Click the 'Add' button
Enter a name in the Name field, for example “ArmADev updates”
In the URL field, enter "http://armadev.friedenhq.org/"
Click OK
The list should refresh and an ArmADev feature should appear under the “ArmADev" category. Check the Checkbox.
Click OK.

Eclipse might need to install additional plugins on which ArmADev depends. Also, it will complain that ArmADev is unsigned. Once it has installed, Eclipse will need to restart. To verify that the installation worked, go to Help->About Eclipse. There should be a new button “FHQ ARMADEV”.
There is a bit of preliminary online help available under Help->Help Content->ArmAScript Development. It's not much, but should get you started.

Features that I have planned for the future:


A campaign project type. This would bundle a couple of mission projects into a campaign, with the ability to test missions separately and then “build” the campaign out of it, with sharing of data such as function module extension, identities, sounds/music, basically anything that goes into description.ext
Specialized, forms-based editors for briefing.html, description.ext, and similar files.
Localization support. An editor for stringtable.xml, and automatic insertion of string keys where appropriate (for example, as popup in the SQF editor)
Loadout editor and config/Class reference. I'd like to be able to edit a loadout for a solider or cargo and then insert it at appropriate places, with constraints (i.e. a soldier loadout only has 12 magazine slots, etc).
More wizards. I'd like to automate a few of the more tedious things like writing a briefing and managing tasks, but also things like wizards for specific files or creating scripts from an SQF template.

A bit further into the future:


A GMF-based FSM editor. Edit FSM's directly in Eclipse.
“Managed” mission building. The project manager keeps control of certain files (like init.sqf) and can automate some things. A bit like the mission wizard within the game, but with more flexibility and freedom, for scripting newbies.
SQF syntax analysis and parsing to prevent script errors.
“Library Plug-ins”. A lot of good pre-made scripting solutions (like SHK Taskmaster, UPSMON, etc) exist that can be used in a mission. They invariably boil down to copying files into the project and hooking into init.sqf. This could be automated in the form of a “library plug-in”.

I am looking for bug reports and feedback on this right now. Personally, I only edit missions, but I'd like this to be useful for addon makers also, so I'd also like to hear from Addon makers what kind of functionality they'd like to see.

Finally: I know there is another IDE based on Netbeans out there. I decided to go ahead with this one though out of a few reasons. For one thing, I was already working on it and I don't like to quit a project. Secondly, I like Eclipse better than Netbeans (a purely personal matter of taste).

Anyway, as I said, feedback is very welcome :)

kylania
Aug 24 2011, 18:13
Interesting! You'll want to post this here (http://forums.bistudio.com/forumdisplay.php?f=111) though. :)

Alwarren
Aug 24 2011, 19:55
Interesting! You'll want to post this here (http://forums.bistudio.com/forumdisplay.php?f=111) though. :)

Hm, good point. Never seen this forum before. Maybe a moderator would be so kind to move the thread? Thanks :)

alef
Aug 24 2011, 22:31
Good idea, thanks for sharing. Installation went fine, no problems.
When I selected Windows->Preferences->ArmAScript->ArmA II Settings, I've got error "The current displayed page contains invalid values.". That page is empty, the others are fine, but there is where I should have set the Default Player profile.
If you need more info, let me know.

Alwarren
Aug 24 2011, 23:25
Good idea, thanks for sharing. Installation went fine, no problems.
When I selected Windows->Preferences->ArmAScript->ArmA II Settings, I've got error "The current displayed page contains invalid values.". That page is empty, the others are fine, but there is where I should have set the Default Player profile.
If you need more info, let me know.

Try to give the correct paths for the ARMA 2 and Arrowhead installation, that should cure it.

I should try to read the registry for these values.

alef
Aug 25 2011, 11:37
Try to give the correct paths for the ARMA 2 and Arrowhead installation, that should cure it.
That's what I wanted to do in that page, but the settings page is empty, the form has no fields, probably because of the error message. I'll send you a screenshot somehow.


I should try to read the registry for these values.
Try this set under HKEY_LOCAL_MACHINE\SOFTWARE:
Bohemia Interactive Studio\ArmA 2/MAIN
Bohemia Interactive Studio\ArmA 2/InstallPath
Bohemia Interactive\ArmA 2/InstallPath
Wow6432Node\Bohemia Interactive Studio\ArmA 2/MAIN
Bohemia Interactive Studio\ArmA 2 OA/MAIN
Bohemia Interactive Studio\ArmA 2 OA/InstallPath
Bohemia Interactive\ArmA 2 OA/InstallPath
Wow6432Node\Bohemia Interactive Studio\ArmA 2 OA/MAINOr check 6th updater by Sickboy, he probably check Valve's Steam registry too.

Alwarren
Sep 3 2011, 17:32
Update is now available:

ARMADev-0.1.0
Changes:


Removed ARMA 2 and Arrowhead paths from preferences, they're not used right now anyway.
Corrected syntax highlighting, now strings work correctly.
A few minor fixes.

Available via Update on Eclipse, or as outlined in the first post :)

UnforgivenRPP
Jan 9 2012, 23:33
Unfortunately I cannot get this to work, everything installed fine however when I select "Create a new mission project" nothing happens after pressing next but if I double click it I get "An error has occurred. See error log for more details.
java.lang.NullPointerException"

On importing a mission project I get the dialog to select a mission directory and set project name, but after pressing "finish" nothing happens and the dialog remains open.

I also get the error message ""The current displayed page contains invalid values."" in Preferences -> ArmA 2 settings.

It is a shame as I would really like to use this :(

Alwarren
Jan 11 2012, 10:10
Unfortunately I cannot get this to work, everything installed fine however when I select "Create a new mission project" nothing happens after pressing next but if I double click it I get "An error has occurred. See error log for more details.
java.lang.NullPointerException"

On importing a mission project I get the dialog to select a mission directory and set project name, but after pressing "finish" nothing happens and the dialog remains open.

I also get the error message ""The current displayed page contains invalid values."" in Preferences -> ArmA 2 settings.

It is a shame as I would really like to use this :(

Hm, are yiou using Eclipse 3.7.1? Note you need the updated version. It might also be needing JRE 1.7, although I think it should work with 1.6.

If you have those, and still get the error, please send me the error log so I can trace it back. Thanks :)

UnforgivenRPP
Jan 11 2012, 11:20
Using Java 1.7 seems to have fixed the issue, was using 1.6 before.

scifer
Apr 3 2012, 01:13
There is no download links available in armaholic anymore.

Foxhound
Apr 3 2012, 07:38
Did you read the first post? (and that info is also available on the Armaholic downloadpage)

Puyttre
Feb 3 2013, 14:34
Aww man :( I wish it was for NetBeans!

Oh well, this is very useful :) Thank you very much sir! Can't wait for your website's recreation to be finished ;)

Alwarren
Feb 3 2013, 20:48
There is at least one (http://forums.bistudio.com/showthread.php?122454-Skufer-(almost)-IDE) project like this that is NetBeans-based, but I don't know if there is still development going on.

Personally, I like Eclipse better, but that's just my personal opinion :)

Two weeks or so ago I did start again to work on ArmADEV, but my time right now is pretty limited so I don't know when a new release will come, but just to give a heads-up, it is still under development. The update site should be back as well, it can now be reached under http://armadev.friedenhq.org/, I forgot to update the page on the web site :)

Wolffy.au
Feb 5 2013, 05:10
Alwarren, you need to change:

In the URL field, enter "http://www.friedenhq.org/ArmADev"
to

In the URL field, enter "http://armadev.friedenhq.org/"

EDIT: That is in reference to your instructions on http://armadev.friedenhq.org/

Alwarren
Feb 5 2013, 08:08
Thanks for the heards-up, that part was copied straight from the old site, and it shows :)

ArmASalt3
Mar 16 2013, 12:40
Hey, ever thought of supporting ArmA 3 with this software?

Pimmelorus
Mar 27 2013, 06:23
Hi Alwarren,

Since my OFP days I have not been coding for OFP/Arma, and with the comming of Arma 3 I feel its time to start again. I am currently using Eclipse everyday for Java development so your ArmaDev plug in is very valuable to me. Thnaks for starting this and I hope you find the time to work on it. If it would be of any use, I offer to help out and develop/test future releases. For instance, integration of Arma 3 ComRef would be nice. Also, a mission template that contains placeholders for all basic files in a mission would be nice. Maybe this already implemented, but the "Create new mission" does not work on my system. Anyways, thanks for the time in developing this and my offer for assistance stands.

All the best,

Pim

Pimmelorus
Mar 27 2013, 08:54
Btw I think that the installation mechanism in Eclipse states that it is installing v0.2.0, but that in reality it is installing v0.1.0 this is I think also relflected in the feature.xml


<plugin
id="org.friedenhq.armascript"
download-size="0"
install-size="0"
version="0.1.0"
unpack="false"/>

<plugin
id="org.friedenhq.armascript.about"
download-size="0"
install-size="0"
version="0.1.0"
unpack="false"/>

All the best,

Pim

Alwarren
Mar 27 2013, 09:33
Hi Alwarren,

Since my OFP days I have not been coding for OFP/Arma, and with the comming of Arma 3 I feel its time to start again. I am currently using Eclipse everyday for Java development so your ArmaDev plug in is very valuable to me. Thnaks for starting this and I hope you find the time to work on it. If it would be of any use, I offer to help out and develop/test future releases. For instance, integration of Arma 3 ComRef would be nice. Also, a mission template that contains placeholders for all basic files in a mission would be nice. Maybe this already implemented, but the "Create new mission" does not work on my system. Anyways, thanks for the time in developing this and my offer for assistance stands.


The latest (yet unreleased) version of ArmaDev comes with a mission template that is single- and Multiplayer-compatible and contains a number of template files, pre-defined scripts and a wizard that will pre-fill some of the data of the template. Also, I am reworking the comref stuff to be able to streamline updating it with new commands; the new comref should also contain encoded type information since I am trying to build an on-the-fly syntax checker/code analyzer via Eclipse's Reconciler interface.

Unfortunately, between ArmaDev, mission making and modding, I have taken on too many projects, so this is sadly lagging behind.



Btw I think that the installation mechanism in Eclipse states that it is installing v0.2.0, but that in reality it is installing v0.1.0 this is I think also relflected in the feature.xml


<plugin
id="org.friedenhq.armascript"
download-size="0"
install-size="0"
version="0.1.0"
unpack="false"/>

<plugin
id="org.friedenhq.armascript.about"
download-size="0"
install-size="0"
version="0.1.0"
unpack="false"/>

All the best,

Pim

The 0.2.0 version number is the number of the ArmaDev 'feature'. The individual components have different version numbers that can actually be different from the feature. At least that is how I understood it :)

Pimmelorus
Mar 27 2013, 14:33
I have noticed several templates in the root of the plugi-in should be suggested when using the ctrl-space keys. I can only find the suggestions from the comref.xml however. Is this a not implemented feature then?

Alwarren
Mar 27 2013, 15:17
I can only find the suggestions from the comref.xml however. Is this a not implemented feature then?

Yes, for some reasons the defaults that I wanted to have there didn't show up. Eclipse is a pretty big beast, so I didn't get around to look at this problem so far.

Pimmelorus
Apr 13 2013, 12:35
Alwarden, I am using ArmaDev now in combination with a Git repository. If I clone a project in to the workspace I have a hard time to make all ArmaDev goodies work on the checked out project. During the cloning procedure I have the ability to apply a wizard to the project, but the ArmaDev wizards seem not compatible. Do you know how to transform an existing project into an ArmaDev process? I was thinking something about project facets, but these do not seem to be visible for new projects.

Pimmelorus
Apr 19 2013, 09:08
Just an update. I have all issues solved now. Very nice work! I hope you'll find the time and energy to continue with ArmaDev development.

Bye, Pim