PDA

View Full Version : Skufer (almost) IDE



DiRaven
Jul 18 2011, 19:59
I'm wandering around with the idea of the IDE for Arma for the pretty much long time now. The tool, which will include project management, version control systems, extensive editing for sqf, sqm and other files, pbo/unpbo etc.

Since I did not find anything like this in one solid tool - I've decided to make one myself.

http://dev-heaven.net/attachments/download/14439/skufer_screenshot.png

The project is very young, the only thing I'm asking for - if you were curious enough to download and install it - take a moment to report a bug or post a suggestion, please.

BugTracker and Downloads (see "Files" section):
http://dev-heaven.net/projects/skufer

Currently implemented features:
0. All the features of the NetBeans Platform (http://netbeans.org/features/index.html) itself.
1. Syntax coloring for *.sqf files (all the colors are customizable via the options menu).
2. Basical syntax errors detecting and reporting for *.sqf files.
3. Simple code completion (thanks PvPscene for the database). Aside from the completion itself and internal docs about the command - you can always click the button at the top of the command description window to get to the corresponding wiki page and view full info with examples there.
4. Code templates.
5. PBO management (import of the project from PBO, export of the project to PBO).

NBP Plugins/tools included in the package:
- Mercurial support.
- Subversion support.
- CVS support.

Planning for the future:
- Implement atleast UTF-8 support to fix ASCII-only problem. Ideally - also other encodings.
- Code folding.
- Autoformatting.
- Advanced syntax errors detecting.
- Context-sensitive code completion.
- And more...

Additional info (How To's FAQ's etc):
http://dev-heaven.net/projects/skufer/wiki/Wiki

.kju [PvPscene]
Jul 19 2011, 07:41
Also thanks to you and your effort DiRaven!

It looks like very promising after testing your first release.
What do you think about a project space (at DH) as a place for feedback?

The other overall suggestion I have for the start is to get into contact with SBS Mac
and T_D to ask them to share their sources in terms of grammar, lexer, parser to be able
to improve your error checking system.

DiRaven
Jul 19 2011, 08:18
Also thanks to you and your effort DiRaven!

It looks like very promising after testing your first release.
What do you think about a project space (at DH) as a place for feedback?

The other overall suggestion I have for the start is to get into contact with SBS Mac
and T_D to ask them to share their sources in terms of grammar, lexer, parser to be able
to improve your error checking system.

You are welcome. While I was doing what is already done - I've got a whole bunch of new info and knowladge. =) I like how it going.

DH space would be good, installing/configuring bug tracker myself for the single project would be just waste of time. Thanks.

Yes, I'll try, thanks a lot. It's a bit meanly to ask for the sources when I do not plan to share too much, but I'll try.

.kju [PvPscene]
Jul 19 2011, 08:46
Cheers :)

Here is the info how to get a project space (http://dev-heaven.net/projects/heaven/wiki/Request_your_project_space#Contact-us).

DiRaven
Jul 19 2011, 10:05
Request sent. Thanks.

---------- Post added at 10:05 AM ---------- Previous post was at 08:53 AM ----------

Does anyone have http://www.arma2.com/comref/comref.html in the computer-friendly format? Like any kind of database, or xml or whatever?

DiRaven
Jul 19 2011, 16:07
0.1.0 is out:
- [NEW] Added simple code completion (thanks PvPscene for the database). Aside from the completion itself and internal docs about the command - you can always click the button at the top of the command description window to get to the corresponding wiki page and view full info with examples there.
- [NEW] Added an ability to create arma mission projects.

.kju [PvPscene]
Jul 19 2011, 17:22
Thanks mate. Will give it an in depth test tomorrow. :)

DiRaven
Jul 19 2011, 18:24
Found a pretty much ugly bug with the deployment version. Building fixed version now, will upload in a few minutes.

DiRaven
Jul 26 2011, 13:15
v. 0.1.2 was released.

[NEW] Introduced code templates (Tools->Options->Editor->Code Templates) (will add more templates later).
[NEW] You can now delete project along with the real folder on the disc (not only project from Skufer).
[NEW] You can now create new project by importing PBO file contents. Just go into the File->New Project->Projects with Existing Sources and follow the wizard.
[NEW] You can now build PBO right from inside the IDE by right clicking the project node and selecting "Build PBO" option. In the dialog you may select folder or *.pbo file, or even put filename yourself, just not forget to put the *.pbo extension. To see the output of the process, press ctrl+4 or use Window->Output->Output menu.
[CHANGE] Moved "Empty Sqf" template into the "ArmA" group.

Jedra
Jul 27 2011, 19:37
Found a small issue - it seems to not like some statements with curly braces. For example, it is quite happy with



waitUntil {true;

//note missing brace


yet



waitUntil {true};


gives a warning and the message 'extraneous input '}' expecting SEP_SEMICOLON.

It does look very good though and might just wean me off Squint!

DiRaven
Jul 27 2011, 19:55
Found a small issue - it seems to not like some statements with curly braces. For example, it is quite happy with



waitUntil {true;

//note missing brace


yet



waitUntil {true};


gives a warning and the message 'extraneous input '}' expecting SEP_SEMICOLON.

It does look very good though and might just wean me off Squint!

Yes, it probably does not like single-line statements inside curly braces (arma allows them to be without semicolon while my parser goes mad when sees that). Will fix, thanks.

Jedra
Jul 27 2011, 19:59
Of course! Arma has made me lazy!!

DiRaven
Jul 28 2011, 09:16
Both issues are fixed in the next version. It will let you know there is braces mismatch, but for now not able to tell you where the problem is, it will just highlight the first line of the script and tell "(location unknown)". Not really great, but better then nothing.

UPD: It will try to guess the mismatched brace position, but location may not be 100% precise.

DiRaven
Aug 18 2011, 12:25
0.1.3 released.
[FIX] "waitUntil {true;" case will be reported as an error, Skufer will try to guess the location of the braces mismatch error, but this location may not be 100% precise.
[FIX] "waitUntil {true};" now will not be reported as an error.

---------- Post added at 12:25 PM ---------- Previous post was at 12:19 PM ----------

Still trying to sort out the code folding and autoformatting. Netbeans lacks user-friendly documentation. =)

Jedra
Aug 18 2011, 16:42
cool - will check out the new version. I really like this IDE.

EDIT ---> Small request - any chance you could get it to update if there is a version still installed? Save me having to unistall it first. Not a biggie of course!

DiRaven
Aug 18 2011, 20:53
cool - will check out the new version. I really like this IDE.

EDIT ---> Small request - any chance you could get it to update if there is a version still installed? Save me having to unistall it first. Not a biggie of course!

There are few options to make reinstalling go away, but neither of them is easy, so that's not the matter of the nearest future. Anyways all the config files are untouched unless you explicitly set them to be deleted during the uninstall.

Jedra
Aug 18 2011, 21:30
There are few options to make reinstalling go away, but neither of them is easy, so that's not the matter of the nearest future. Anyways all the config files are untouched unless you explicitly set them to be deleted during the uninstall.

OK, no worries - I did notice that the options was there not to delete the config so that's cool. I am using this pretty much all the time now, just the occasional trip back to Squint for in-depth checking.

DiRaven
Sep 1 2011, 21:37
Ok, there are actually few ways of extending the IDE right now:
1. Keep trying to implement code folding/autoformatting - looks like a dead end for me rignt now. I'll keep searching for info and trying, but for now no progress made.
2. Work on the contextual code completion and extended contextual error reporting (like Squint does) - a whole bunch of work, actually. Not the matter of few days.
3. Incorporate few useful 3rd-party tools (optimizers, checkers etc.) into the IDE to make it more like an IDE - that is simpler task.
4. Add more filetypes support. SQS, EXT, SQM.

Any ideas? What would you like to be done first?

.kju [PvPscene]
Sep 2 2011, 14:51
My take: 3, 2, 1, 4 (lowest prio) :)

DiRaven
Sep 4 2011, 21:54
My take: 3, 2, 1, 4 (lowest prio) :)

Well since no other ideas written - I'll take it. Thanks.

Wolffy.au
Oct 1 2011, 22:39
Any screenshots bud? Looks promising but I'd like to see the layout before I go installed all the JDK stuff on my pristine new computer install. :)

DiRaven
Oct 2 2011, 08:35
Any screenshots bud? Looks promising but I'd like to see the layout before I go installed all the JDK stuff on my pristine new computer install. :)

Yes, of course. Here is the main window. Looks pretty much like any other NB IDE'ish thing. =)

http://dev-heaven.net/attachments/download/14439/skufer_screenshot.png

DiRaven
Nov 3 2011, 08:40
Sorry for no updates - I've got a huge project to work with and still trying to write my own small game. =)

No updates has one important advantage - there are no new bugs. xD

Since someone downloaded this thing and may be even using it - I'll take time to add some new features, but not right now.

DenVdmj
Nov 7 2011, 10:47
(many screens)

http://i.imgur.com/Vdv7r.png
http://i.imgur.com/4n5Iq.png
http://i.imgur.com/QLpq9.png
http://i.imgur.com/7W0Ip.png
http://i.imgur.com/00RUk.png
http://i.imgur.com/DXJQ6.png
http://i.imgur.com/KmuFI.png
http://i.imgur.com/R48pO.png
http://i.imgur.com/EA7sm.png
http://i.imgur.com/IqW0u.png


We can't have the same approach to the interpreted language with dynamic typing, as to the usual C++.
In terms of sqf-compiler, the following (obviously wrong) expressions are valid:


123 = qwe / player
// check: compile "123 = qwe / player"

Why try to be smarter than the compiler?

The language doesn't have syntactic structures such as: "if the else" or "while do", these are just the several operators, such as "-", "+".
But let's look further: the following expressions are valid (also) in terms of semantics (correct, in fact):


_printHello = { diag_log "Hello!" };
_for_i = for "_i";
_for_i_from_1 = _for_i from 1;
_do_ten_times = _for_i_from_1 to 10;
_do_ten_times do _printHello;


((( for "_i" ) from 10 ) to 12 ) do { player sideChat str _i }


_always = if true;
_never = if false;

// almost from real code:
// caseignored "in": if (_regionType in _requestedTypes) then { ... }
{ if (_x == _regionType) exitwith { _always }; _never } foreach _requestedTypes then {
_distance = getArray (_cfgRegion >> "position") distance _position;
if (_distance < _minDistance) then {
_minDistance = _distance;
_nearestRegion = _cfgRegion;
};
};


_print_a_is_a = { hint "a is a" };
_print_a_isnt_a = { hint "a is not a" };

(switch a) call {
_this do {
case "a" : _always;
default _never;
}
} call {
_this then (_print_a_is_a else _print_a_isnt_a)
};

How do you test it?

In all other respects - a very useful tool!

PS. sorry for my lang

DiRaven
Nov 7 2011, 12:23
The language is ok, but to be honest I didn't really get what the problem is. I understand that lexer/parser gives wrong output while lexing the code? And you have just given few examples showing the code that works in-game (i.e. Arma compiler takes it and processes it) while my lexer/parser says it wrong, right?

---------- Post added at 01:23 PM ---------- Previous post was at 12:25 PM ----------

I guess first problem - my parser does not know what is >>. I'll fix that.

Second, is there any real task that would need inputs like:
123 = qwe / player
or
((( for "_i" ) from 10 ) to 12 ) do { player sideChat str _i }
?

I understand that they may be valid in terms of semantics, but is there any real need to write ((( for "_i" ) from 10 ) to 12 ) do { player sideChat str _i } instead of justfor "_i" from 10 to 12 do { player sideChat str _i }?

Just to add this specific case I'll need either disable if-then-else checks, that may be resould in having code with incorrect statements rendered as valid, or add high level parser rules to make sure this is handled. Just need to know if this is worth of time spent.

DenVdmj
Nov 10 2011, 22:19
I understand that they may be valid in terms of semantics, but is there any real need to write ((( for "_i" ) from 10 ) to 12 ) do { player sideChat str _i } instead of justfor "_i" from 10 to 12 do { player sideChat str _i }?
Formally, this is the correct code. Respectively, checker (formally correct checker) should recognize it as valid. (otherwise, what is the profit of checking?)

In SQF every command has one of the three basic syntactic forms. Most of the commands more correctly be called "operators", and below we see why.
1) No-operand form, either a constant, such as "west", "pi", or "access function" such as "player", "overcast".
2) Single operand from, such as unary operators "-", "not" in Pascal or operators "!", "new", "delete" in C++. In SQF it is a "if", "switch", "for", unary "-", "!", "not", and others.
3) Two-operands form, operators such as "*", "/", "or", "and" of Pascal. In SQF, this syntactic group includes follows operators: "then", "else", "do", "from", "to", "*", "/", "&&", "and", "||", "or", and others.


What is my point: SQF has little to do with us habitual programming languages. And if in other languages "if then else" - is the basic syntax, then in the SQF is a just expression, wich syntactically no different from the "! ((Pi / 6) == (someVar * 120))"

There are many other differing languages, such as Forth, LISP, Haskel, etc.
We can't be consider that is only one scripting style is right style, style that more similar to C way, but less to the LISP way (for example).
The maximum, that can afford code checker, it is warnings only: "your code doesn't look like the C++ code!".

DiRaven
Nov 11 2011, 10:19
Well I want my checker at least make sure user did not type if (***) {asdf} (without "then" keyword). I.e. check at least some basical errors. If there is no real situation where you would write ((( for "_i" ) from 10 ) to 12 ) do { player sideChat str _i } - I'm not sure if I should disable the "if-then-else" correctness checks just to allow statements like above one. Turning it off basically would mean just turning off the spellchecker. With the same profit you would just ignore it's warnings.