Jump to content
Sign in to follow this  
Tom_48_97

Poseidon: advanced text editor for Scipts & Configs

Recommended Posts

This thread is no more updated, please, use this one instead: A3 Thread

280_950aedb0964a17fe.jpg

What is Poseidon?

First, it's based on the text editor "Sublime Text 2". Then, basically, it's a kind of sophisticated text editor (yet another notepad) with some options for any type of text/code file and other options and features dedicated to the Arma series content developments.

Ps: Yes, it works for Arma 3 and all commands are supported, later, perhaps , I'll post a topic on the Arma 3 forum...

Note: The name, "Poseidon", is a tribute to the very first version of the Real Virtuality engine."Poseidon" is the base of all the Arma series icon_e_wink.gif

Current version: 0.53 alpha (very early, I estimate that 60% of the development is done)

Updates will come quickly and often but not more than 3 a week

Main features (non limiting)

  • Project management
  • Instant Project Switch
  • Distraction Free Mode
  • Split Editing (Can display up to four file on the same screen)
  • Auto Completion (based on commands and existing text in the file)
  • Persistent session [1]
  • Snippets (eg: file header, control structures, game functions etc...) [2]
  • Syntax highlighter (for SQF (from ofp to arma 3), SQM, HPP, CPP, C, EXT...)
  • Full support of SQF & SQS, Java, XML, Cpp
  • Macro creation
  • Documentation link [3]

[1] Try to open multiple files, just click the red cross to close the window and reopen Poseidon, your files will be automatically opened

[2] Wanna to write a switch statement or a new file?

[3]Select a command or a word or why not a function name, right click, view online doc, select your language and it's magic. (UI, result)

Installation, configuration & maintenance

  1. Installation
  2. Download this file: tom4897.info/app/poseidon/latest (or poseidon.arma3.fr/latest)
  3. Copy and paste the folder named "Poseidon" where you want into your computer
  4. Run edit_file_assoc.bat if you want to open every sqm, sqf, sqs, ext, hpp with Poseidon
    Configuration
  5. Run edit_pereference.bat to edit your preferences (username, email address, ofpectag... essentially for snippets)
    configuration OR edit the following file Poseidon\Data\Packages\BI Tools\options\Default.tmPreferences
    Maintenance
  6. Update: run update.bat as administrator or download this file: tom4897.info/app/poseidon/latest (or poseidon.arma3.fr/latest)

Any feature planned?

  • What do you want, THAT's the point!
  • Support of revision control
    GIT and SVN, both with local and distant repositories
  • Better auto completion
  • Snippets for everything needed in level design and config edition
    Each designer has his way of work, so, feel free to suggest!
  • Automatic distant backup (on a distant secured server)
    At worst... I'll be the lonely user ^^
    eg: execute a file or a code only on server or client side, log data in rpt and so much thing!

Snippets (sketchy list)

Ctrl+G to display all snippets available for the current file (depends with the file type)

  • Common
    • Create centers (triggered by create)
    • format (triggered by format)
    • exit file (triggered by exitWith, endoffile)
    • etc...

    [*]Config

    • CfgIdentities (triggered by CfgIdentities)
    • CfgRadio (triggered by CfgRadio)
    • CfgSounds (triggered by CfgSounds)
    • Header (mission) (triggered by Header)
    • etc...

    [*]Control Structures

    • For Loop (triggered by for, loop)
    • If Condition exitWith (triggered by if, exitWith)
    • If Condition (triggered by if)
    • if else (triggered by if)
    • swicth (triggered by switch)
    • switch/default (triggered by )
    • switch/case (triggered by case)
    • waitUntil a condition (triggered by waitUntil)
    • While Loop (triggered by while)

    [*]Descriptions and comments

    • file header (triggered by header, description)
    • statement's comment (triggered by description, comment, statement)
    • etc...

    [*]Editor modules

    • Config for ALICE Module (triggered by BIS_alice, Alice)
    • Disable ALICE Module (triggered by BIS_alice, Alice)
    • etc...

    [*]Functions

    • Destroy city with triggers (triggered by bis_fnc_destroyCity, destroyCity)
    • etc...

    [*]Misc

    • etc...

    [*]PreProcessor commands

    • #define VAR VALUE (triggered by define)
    • #ifdef … #define … #endif (triggered by ifdef, define)
    • #ifdef ... #else ... #endif (triggered by ifdef)
    • #ifdef ... #endif (triggered by ifdef, define)
    • #ifndef ... #endif (triggered by ifndef, define)
    • #include "…" (triggered by include)

280_thumb_29889090b82b536a.jpg 280_thumb_7b7dc527d872deff.jpg

ChangeLog

http://poseidon.arma3.fr/CHANGELOG.txt

Developers

Tom_48_97

Thanks

Sublime Text devs

JonBons

RawLine

Arma3.fr

Bohemia Interactive

The community

Arma2-wiki.fr


Download

Nightly builds

Edited by tom_48_97
Links

Share this post


Link to post
Share on other sites

Would it be possible to implement some system that can keep track of rpt files at said locations. Maybe assign an hotkey that would open the rpt file and scroll to and highlight the latest section of it. Perhaps even "link" the very specific error messages to the parts of files that caused them.

Also maybe integration with depbo.dll and the like could be very help full and speed up the process.

Also the RTFM file should maybe open each time you start the program without a project.

Also I applaud your work and are hungry for more. This kind of work really helps other people make their project materialize faster. Your work is a catalyst.

Share this post


Link to post
Share on other sites

About the handling of RPT files, it will be available with the next update (probably tomorrow). The usage is basic, it's on the top menu -> Poseidon -> Open Log... Only A3 was "problematic" because A3 generate one log each launch, so, the action opens the latest.

For the rpt highlight, I have 4 levels:

1 - Critical: Must be fixed, it impacts the game (red)

2 - Warning: Can impact the game (orange)

3 - Important: Important or usefull info (purple)

4 - Notice: Can be skipped (grey)

I'm also trying to write a "tail" function... but, I can't tell if it'll be done or not because of the other features that must be done.

For the integration of depbo.dll, can you be more specific on what's in your mind?

Finally, thank you :cool:

Share this post


Link to post
Share on other sites

Like I said, updated comes often, here the newest version, 0.54.

Download links unchanged:

Changelog:

/* This list can be incomplete */

VERSION 0.54    
   KNONW BUG: It needs a file openned to access to logs
   KNONW BUG: Poseidon loses the focus when it opens a log
   KNOWN BUG: bis_fnc_3Dcredits is not colorized

   CHNGD: Default Theme
   FIXED: Pre processor snippets
   ADDED: RPT handling (main menu->Poseidon->Open +GAME+ log)
           Arma 3: Because A3 generate one log each launch, this action opens the most recent
           Keep your logs tidy, clean often
   ADDED: Access to the profile settings (used for snippets) (Menu->Poseidon->Preferences->Profile
   CHNGD: Some snippets
   ADDED: Automatically save the file on loss of focus (sqf only)
   ADDED: Default Format UTF8 w/o BOM for SQS/SQF/EXT/HPP
   ADDED: trim trailing line's whitespace for script files
   ADDED: antialias for greys
   ADDED: Magic variables
   ADDED: Colorized BIS functions (BIS_FNC_*)
   CHNGD: RTFM (help) updated
   CHNGD: font for SQF
   ADDED: Readme skeleton (make a text file (plain text), type "read" and push ctrl+space. Then push tab to         edit sections) 
   ADDED: BIS function support: bis_fnc_3Dcredits, bis_fnc_crows, bis_fnc_taskDefend, bis_fnc_taskPatrol...
   ADDED: Shortcut (ctrl+/) to comment / uncomment the selection (line, elements, blocks...)

Share this post


Link to post
Share on other sites

Awesome! I'll write my next few scripts with this, and give it a shot. Looks very promising!

Share this post


Link to post
Share on other sites

Nice to see another custom script tool in the works :)

To me, the best Arma specific tool we've had was Squint, but it was abandoned and now is missing many new commands. My feature requests, most borrowed from Squint:

  • link to Biki should work by simply right clicking on word (without needing to highlight the word first)
  • tool to show Pre-processed form of sqf files (so line numbers in sqf files with includes match those in Arma's RPT files)
  • allow keyword lists of script commands etc to be easily updated by user (in case project ever gets abandoned, it's nice to allow users to maintain it's usefulness)
  • automated tool to find all local variables within a script file and automatically add them to private array
  • ability to open a file referenced within current file (eg myFunc = compile preprocessFileLineNumbers "sqf\myFile.sqf"; right click on "sqf\myFile.sqf" provides option to open that file)
  • syntax error checking

Also, as someone with delusions of scripting grandeur, little actual ability and poor short term memory, I struggle keeping track of the "flow" between multiple scripts files. I've been using Natural Docs to create self documenting sqf files (similar to CBA), but to create the useful documentation I want (links to origin of global variables, lists of what files depend or modify them etc) it is a lot of work maintaining comments. I'd love some tools to automate that work, so here are a couple more suggestions that are more about documentation rather than scripting:

  • automatic creation and maintenance of lists of variables used within each file/function/project (declarations and dependencies)
  • Creation of script flow chart (eg, init.sqf -> myScript.sqf -> myFunction etc)

Ideally these tools would create some kind of hyperlinked output, or comments in a form compatible with some free documentation software. Cheers

Share this post


Link to post
Share on other sites

Awesome Tom!

I'd ask for;

Support for MODEL.CFG

Support for ability to have open (and auto re-open on restarting app) the very large All-in-One.CPP (Dev Heaven), with no performance issues.

(no, havent tested, but prior tools by others struggle)

Share this post


Link to post
Share on other sites

Follwed your instructions but I get this error when I try to run the "Edit_file_assoc" file.

C:\Poseidon\edit_file_assoc.bat is not a validWin32 application

Share this post


Link to post
Share on other sites

Nice editor, maybe i'll switch from notepad++ to this one for sqf editing :)

The .bat file is empty

Share this post


Link to post
Share on other sites

First thanks to all for feedback and, I urge to take your time to read the entire message

About all requests, I'm simply going to apply the MoSCoW method in order to sort, and then, I'll prioritize. This is not really a small project, it must keep going forward.

Nice to see another custom script tool in the works :)

To me, the best Arma specific tool we've had was Squint, but it was abandoned and now is missing many new commands. My feature requests, most borrowed from Squint:

  • link to Biki should work by simply right clicking on word (without needing to highlight the word first)
  • tool to show Pre-processed form of sqf files (so line numbers in sqf files with includes match those in Arma's RPT files)
  • allow keyword lists of script commands etc to be easily updated by user (in case project ever gets abandoned, it's nice to allow users to maintain it's usefulness)
  • automated tool to find all local variables within a script file and automatically add them to private array
  • ability to open a file referenced within current file (eg myFunc = compile preprocessFileLineNumbers "sqf\myFile.sqf"; right click on "sqf\myFile.sqf" provides option to open that file)
  • syntax error checking

  1. Link to biki has been changed, just one click on it and push alt+e (alt+f for Frogs) or use the context menu. It no longer requires selection, only to place the caret somewhere in the word.
  2. I agree on the face that pre-processed files present a real problem when en error occurs. I'll take a look soon.
  3. I'll write a script (I don't know under what format yet) to import new commands easily, maybe it'll end w/ an automatic update... Will see.
  4. About the private array, it was already in the pipe, but for the moment, I've some issues, so unavailable.
  5. Good point here. But, the ability to open file from the string will require a saved project and allow only some extension (it must be that I do my "catch" on something)
  6. About the syntax error, I made some tests w/ hpp files (you can try by adding a full class but without the closure semicolon), it's planned, but... will definitely be the longest development step. So, it'll come later.

Also, as someone with delusions of scripting grandeur, little actual ability and poor short term memory, I struggle keeping track of the "flow" between multiple scripts files. I've been using Natural Docs to create self documenting sqf files (similar to CBA), but to create the useful documentation I want (links to origin of global variables, lists of what files depend or modify them etc) it is a lot of work maintaining comments. I'd love some tools to automate that work, so here are a couple more suggestions that are more about documentation rather than scripting:

  • automatic creation and maintenance of lists of variables used within each file/function/project (declarations and dependencies)
  • Creation of script flow chart (eg, init.sqf -> myScript.sqf -> myFunction etc)

Ideally these tools would create some kind of hyperlinked output, or comments in a form compatible with some free documentation software. Cheers

About the doc, I'll do my best. But, the fact is that catching variable is really hard... For example, I can catch all word outside a scope and list them (file etc...), but the problem will come from pre-process like #define myCommandCall MyCommandStatement, and also from new commands. Anyway, I didn't said my last word on this!

About the flow, I'm not sure what you meant there... From my side, it most likely I never (or almost never) use myFunc = compile preprocessFileLineNumbers, I prefer cfgFunctions, immediately usable, can be easily recompiled through bis_fnc_mp and so one...

If I follow you, want as much references as possible within a same project? A little like BIS generates HTML for debugging.

Finally, about the project itself, it'll be fully documented here when a first stable version will be released (and btw, when I have more time on my hands... be an independent developer doesn't let a lot of free time)

Gnat;2474192']Awesome Tom!

I'd ask for;

Support for MODEL.CFG

Support for ability to have open (and auto re-open on restarting app) the very large All-in-One.CPP (Dev Heaven)' date=' with no performance issues.

(no, havent tested, but prior tools by others struggle)[/quote']Well, you almost killed me with the support of model.cfg... but, it'll be included in the next update.

Now, about large files, I think this test of the 0.55 will answer:

Tests has been made with some files openned (36MB of RAM allocated, before, not monitored during tests). No freeze during loading, the progress bar is updated as it should. During loading, you can open/edit/save/create another file. Now, here the results:

1 cpp for ~11MB (418 362 lines) -> 06.6 secondes to load

2 cpp for ~23MB (830 970 lines) -> 11.8 secondes to load

Edition and navigation are perfectly fluid. Please, notice that files are loaded one by one to prevent freeze or lag. No performance issue detected with 14 files (for ~72MB) loaded while displaying for at once in split screen.

Follwed your instructions but I get this error when I try to run the "Edit_file_assoc" file.
Le_CuLtO is right. That's normal, this script is not done yet, planned but, not a priority since Poseidon allow drag and drop of text/files/folders
Nice editor, maybe i'll switch from notepad++ to this one for sqf editing
What does it miss? To encourage you to switch, this is the question :rolleyes:
I was just wondering, why not an Eclipse plugin?
3 facts. First is simply that I don't know how it works, I mean, the soft itself (I already used a while but never developed plugin or feature for it). I've nothing against learning, but these past years, I had enough new languages and software.

In fine, I also wanted a portable application and mainly, a very light tool.

Ok, so, now you've read the all... Here the changelog of the tomorrow update (latest before the GC):

  • CHNGD: RPT highlight

  • CHNGD: Main background color

  • CHNGD: Sidebar background color

  • CHNGD: To display online doc, right click on keyword, then View online Doc

  • CHNDG: Displaying online doc no longer requires to select the all word, just one click on it and push alt+e (alt+f for french doc)

  • ADDED: Support of model.cfg

  • CHNGD: Snippet: Comment for header's file no longer requires additional edit

  • CHNGD: Keywords list and commands list moved for make future updates easier

  • ADDED: Persistent sessions, unsaved files openned while closing Poseidon will loaded on the next launch (2 main scopes (each project gets its session more a default session unlinked with any project (unsaved project in fact ^_^)))

  • CHNGD: Performances improved

  • REMOV: Java support disabled, it isn't used ATM ;)

  • ADDED: #debug.bat (in root folder), if poseidon crashes at launch, just run it

Note about performance tests:

Tests has been made with some files openned (36MB of RAM allocated). No freeze during loading, the progress bar is updated as it should. During loading, you can open/edit/save/create another file. Now, here the results:

  • 1 cpp for ~11MB (418 362 lines) -> 06.6 secondes to load

  • 2 cpp for ~23MB (830 970 lines) -> 11.8 secondes to load

Edition and navigation are perfectly fluid. Please, notice that files are loaded one by one to prevent freeze or lag. No performance issue detected with 14 files (for ~72MB) loaded while displaying for at once in split screen.

PREVIOUS Changelog can be found here:

Later, I'll write a full list of planned features to keep this topic as clear as possible.

Ps: sorry for mistakes and grammar, but my bed is calling me :p


LAST EDIT: 21/08 at 1h30 pm

@[APS]Gnat: If I'm right, you need to work on huge files, eg some config... So, I think this will interest you. I made some tests with a single file opened 3 or 4 times and displayed in split screen.

280_thumb_a40f22e9cd8fa955.jpg 280_thumb_4765586f08dac97b.jpg

Let's explain a little what's displayed... (first screen)

  • I opened the file and wait until for the loading. Then, on the top menu, I clicked "Misc tools"-> Open (clone) current file three times to get 4 instance of my file.
  • Then, I knew I wanted to edit the class V3S_TK_GUE_EP1, I made ctrl+f, entered the class name finally find the one I wanted (f3 to switch to the next result) (class V3S_TK_GUE_EP1 at line 123 738).
  • This class inherits from V3S_Base_EP1 and I wished to see what's inside... Again ctrl+f, class name and this once maj+f3 to see the previous occurrence since it's definitely declared before the inherited one.
  • I made a bookmark (ctrl+f2) and now, I can switch between bookmarks with F2 key.
  • Note: Always save an edit made in a view to refresh the others! (obvious requirement but need to be known!)

Infos:

  • The red bubble next to the file name means that the file is unsaved
  • Save on instance will refresh the others without going to top or end of the file, just keep you where you are
  • You can run several instances, how many you want. I tried with two instance of Poseidon with 4 views each and it works good.
  • Bookmarks are links to the view
  • You can go a to a specific line by ctrl+p and enter :LINE NUMBER eg, :12359 to go at line 12359 [SCREEN; Go to line number...]
  • You search for a given class with ctrl+p and enter @blabla bla [SCREEN; Search a class with free text] [SCREEN; search a Given class]

Edited by tom_48_97

Share this post


Link to post
Share on other sites

With 24h of late... here the new version of Poseidon, prepared with love and not enough sleep.

Download: poseidon.arma3.fr/latest

Full changelog: http://poseidon.arma3.fr/CHANGELOG.txt

version 0.55

  • CHNGD: RPT highlight
    Member already defined
  • CHNGD: Main background color
  • CHNGD: Sidebar background color
  • CHNGD: To display online doc, right click on keyword, then View online Doc
  • CHNDG: Displaying online doc no longer requires to select the all word, just one click on it and push alt+e (alt+f for french doc)
  • ADDED: Support of model.cfg
  • CHNGD: Snippet: Comment for header's file no longer requires additional edit
  • CHNGD: Keywords list and commands list moved for make future updates easier
  • ADDED: Persistent sessions, unsaved files openned while closing Poseidon will loaded on the next launch (2 main scopes (each project gets its session more a default session unlinked with any project (unsaved project in fact ^_^)))
  • CHNGD: Performances improved
  • REMOV: Java support disabled, it's not used ATM ;)
  • ADDED: #debug.bat (in root folder), if poseidon crashes at launch, just run it
  • ADDED: Open file from another. Put the caret on a file name, right click->Misc->Open File name. OR push alt+d
  • ADDED: Clone a file to be able to edit it from multiple views (Main menu->Misc tools->Clone current file, and move it to another group tabs)
  • ADDED: File association with Poseidon (see folder <Poseidon_Dir>\run_once) for SQS, SQF, SQM, EXT

Share this post


Link to post
Share on other sites

Great editor. I switched from notepad++ to it!

Just a little suggestion: It would be nice if the brace matching was a bit more aggressive as it is sometimes difficult to spot the matching brace.

I like the default one in notepad++ (it highlights in red the brace and its matching brace).

Share this post


Link to post
Share on other sites

New version frontpaged on the Armaholic homepage.

===================================================

We have also "connected" these pages to your account on Armaholic.

This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

Share this post


Link to post
Share on other sites

This kinda sucks, I enjoyed using this but a box popped up and said I need to purchase because I have an unregistered version and to continue use I need to purchase??? I missed the part that said this costs money or did I just overlook that, my fault if I did. Either way this is a great tool to use and really enjoyed it. Thanks for your hard work with this.

Edited by Cunico

Share this post


Link to post
Share on other sites

@Cunico: In fact, Poseidon is based on Sublime Text 2, this is the point. You can buy it or just dismiss the popup by pressing escape when it shows up. It doesn't change anything, features are the same regardless you've a registered copy or not. This is not my doing, and since the soft is based on this, I think normal to let it.

@super-truite: Will be updated in the 0.56 ;)

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×