Jump to content

Photo

ZScript Code Editor


  • Please log in to reply
123 replies to this topic

#46 LinktheMaster

LinktheMaster

    Hey Listen, Kid

  • Members
  • Real Name:Matt
  • Location:United States

Posted 13 September 2012 - 10:30 PM

Yeah, I spoke with SUCCESSOR about this, and he was using the .z file extension. .z and .zh are both valid file extensions for ZScript. (Well, really, any file can be imported, but those two are the ones actively used.) .zh is intended for headers that are imported in scripts. .z is intended for exporting/importing into ZQuest itself.

#47 bobby_light

bobby_light

    Experienced Forumer

  • Members

Posted 14 September 2012 - 07:55 AM

Okay, that makes sense. I'll fix that in the next release.

#48 bobby_light

bobby_light

    Experienced Forumer

  • Members

Posted 16 September 2012 - 11:07 PM

This week's changes include:
  • Tool tips for function/member field documentation on hover over global variables, as mentioned a couple of posts ago (win32, web demo, RText)
  • *.z files are opened as ZScript files, not just *.zh files (RText)
  • Project plugin added to RText

Of particular interest is the project plugin. It took a lot more work than I thought it would. On startup, you should have a "Projects" docked window on the left-hand side of the application. From there you can add and edit "projects," which are simply logical groupings of files and folders on your local file system. You can filter what files folders are displayed when you add a folder to a project (i.e., only show *.z and *.zh files, or don't show *.bak files or CVS metadata subfolders). Workspaces (collections of projects) are automatically saved when the application closes or you open a different workspace.

If you find any problems with the project support, let me know! And as always, bugs or feature requests for the actual ZScript langauge support are welcome.

Grab it here: http://fifesoft.com/zscript/


#49 LinktheMaster

LinktheMaster

    Hey Listen, Kid

  • Members
  • Real Name:Matt
  • Location:United States

Posted 17 September 2012 - 06:33 AM

Well, unless I run into any bugs, it's safe to say that I'll be switching over to this now. icon_razz.gif I'll let you know if I come up with anything, though. Thank you so much for all the work you've put into this. It looks absolutely amazing. icon_smile.gif

Edit: I did have trouble with it saving workspaces at first. I ended up having to create the Workspaces folder myself in the .rtext folder.

Edit 2: Also, is there anywhere I can donate to? I'd definitely like to help out since you're providing the ZC community such an amazing too.

Edit 3: I'll try to make this the last one. icon_blah.gif Just curious. Are there any commandline arguments for determining which workspace runs? If not, you don't need to add it or anything. Like I said, I was just wondering.

#50 Kite

Kite

    ???

  • Members

Posted 17 September 2012 - 03:30 PM

I'm definitely switching to RText for ZScript. icon_smile.gif It does pretty much everything I used Programmer's Notepad to do (organizing scripts and their documentation into projects really easily, being able to create shortcuts to external tools, and such), but the ZScript specific stuff such as function auto-completion and being able to check for potential errors before going to the compiler (which is sometimes slow on my system) sells it for me. Well, the templates are also going to sell it for me once I set those up. icon_razz.gif

As far as problems, one thing I've noticed is that when you add a folder in a project you can't edit it without removing it and adding it again. While this isn't too large of an issue, it's still slightly annoying. It would also be nice if, at least for the current session, RText could remember folders you were previously in for things like specifying folders to add to the project. Or better yet, it would be nice if RText let you navigate to favorite folders or the folder of the currently open file in the file tree views. icon_shrug.gif

Thank you for taking the time to make some ZScript specific support for a code editor. icon_smile.gif Up until you started on this, I think everyone that wanted any sort of editing support beyond messing with plain text (or the horrid buffer in ZQuest) had to rely on using tools that parsed things based on C++ rules. While this works for the most part, there are several ZScript specific things that have never been supported by such tools. Also, most editors required some sort of configuration before they automatically recognized ZScript as a C++ like language. So I can't thank you enough for doing this. icon_smile.gif

#51 bobby_light

bobby_light

    Experienced Forumer

  • Members

Posted 17 September 2012 - 09:18 PM

I'm glad folks are finding it useful! It's definitely pushing me to make both the editor component and the application more robust.

QUOTE(LinktheMaster @ Sep 17 2012, 07:33 AM) View Post

Edit: I did have trouble with it saving workspaces at first. I ended up having to create the Workspaces folder myself in the .rtext folder.


I believe I've fixed this, thanks. I've updated the RText zip to include this fix. It's the price you pay for using effectively "beta" software! icon_smile.gif

QUOTE

Edit 3: I'll try to make this the last one. icon_blah.gif Just curious. Are there any commandline arguments for determining which workspace runs? If not, you don't need to add it or anything. Like I said, I was just wondering.


Not yet, but I can look into it. As a start, the latest RText zip now lets you specify a workspace to load *if* you run the jar directly, instead of the wrapper .exe:

CODE

cd <rtext-dir>
java -Dworkspace.override=C:\path\to\myWorkspace.xml -jar RText.jar


However, by default RText should remember the last workspace that was opened when you exited, and open that one the next time you start it up.

QUOTE(Nick @ Sep 17 2012, 07:33 AM) View Post

As far as problems, one thing I've noticed is that when you add a folder in a project you can't edit it without removing it and adding it again. While this isn't too large of an issue, it's still slightly annoying.


That's next on the to-do list. icon_smile.gif All you can currently do is "rename" the folder, but I need to provide a way to change the filters you specified.

QUOTE

It would also be nice if, at least for the current session, RText could remember folders you were previously in for things like specifying folders to add to the project. Or better yet, it would be nice if RText let you navigate to favorite folders or the folder of the currently open file in the file tree views.


The file chooser used by the workspace tree should remember the last folder you selected a file from. Is that not the behavior you're seeing? Or perhaps you want it to be "synced" with the file chooser you use to open files in the editor? That is doable if it seems like the natural thing to do.

As for a list of favorite folders, the main file chooser (via Ctrl+O) does have a concept of "favorites;" when you're in a directory you can click on the button with the "book" icon in the top right corner and select "Add to Favorites". RText keeps a list of your favorite folders in that button's popup menu. Selecting a directory from that menu moves the file chooser into that directory. This list is also editable in the Options dialog (File Chooser -> Favorite Directories). Anyway, I can (and should) link the workspace tree's file chooser to that same list of favorite directories.

#52 bobby_light

bobby_light

    Experienced Forumer

  • Members

Posted 14 October 2012 - 11:00 PM

Yet another new version posted on the project's site]. Not much has changed in the zscript-parsing department, so I waited until there were enough updates to the projects support to warrant another release. You can now edit filters on "logical folders" after they've been created. Gone is the top-level "workspace" root node in the tree view, since it's pretty useless and causes the actual project nodes to be needlessly horizontally indented. The compile error/warning icons in the text area gutter now have the error message as a tool tip when you hover over them. There are a few other under-the-hood changes to projects as well, but the other main changes aren't ZScript-specific - code folding for HTML and PHP.

I'm also wondering what other features would be useful for a ZScript editor. Perhaps integration with an online script database such as PureZC's? I looked into scraping scripts, their ratings and descriptions out of the script database forum, but again, I'm not sure whether that would be a useful feature. I think if the results were searchable and linked back to each script's respective forum post, it would be pretty cool, but it raises questions, such as what's the common "project" layout for ZScript files?

Ideally, of course, this script information would be available by via a web service to avoid how brittle scraping the information can be, but I'm sure the PureZC admins have better things to do with their time. icon_smile.gif

#53 bobby_light

bobby_light

    Experienced Forumer

  • Members

Posted 04 November 2012 - 11:55 PM

Another weekend with (unfortunately) too much idle time, another update. The demo application was not updated, but the RText editor demo now includes a PureZC script browser. Pressing Ctrl+Shift+Z (Cmd+Shift+Z on OS X) opens a dialog that scrapes all "completed" scripts out of PureZC's Script Database forum:

IPB Image

You can sort on each column by clicking on its header, and multi-sort by Ctrl+Click. Typing text in the "filter" text box at the top filters the list so only scripts whose title or author matches what you've typed are displayed. Clicking on a script in the table opens that script in the editor on the right; from there you should be able to copy-and-paste it into ZQuest.

The interface is simplistic but might be useful if you use RText to edit ZScript code and want to see if a script already exists to handle some feature or effect. If there were other databases of scripts, this plugin could be extended to grep from those as well, and provide a single, composite list.

Please note though that this feature is *extremely* fragile, as I'm just scraping the forum HTML for script information. The moment one of the admins tweaks the site, this may break.


#54 Russ

Russ

    Caelan, the Encouraging

  • Administrators
  • Location:Washington

Posted 05 November 2012 - 12:02 AM

...

You sir. You are amazing. I don't have words to describe how awesome this is. Just... thank you. This is great.

#55 bobby_light

bobby_light

    Experienced Forumer

  • Members

Posted 23 December 2012 - 01:18 PM

Everything's been updated to be in sync with the changes in 2.50 final, and OS X versions have (finally) been added as well!

http://fifesoft.com/zscript

Enjoy!


#56 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 27 February 2013 - 06:16 PM

(Copied and expanded from my thread about SourceCookifier)

This is a pretty awesome program, but it has a few problems I'd like to point out:

1. The ZScript Notices section is a bit confused, though. Among other things, it looks at this line:
CODE

import "Solaris\scripts\Environment\randomMovement.z"

and says "Unexpected token; scripts can only contain functions."

2. The PureZC script downloader is cool, but it can't tell when a staff member is posting someone else's script (it incorrectly has my name on a few, for example). Perhaps you could look for a topic description saying "By ___"?

#57 bobby_light

bobby_light

    Experienced Forumer

  • Members

Posted 27 February 2013 - 11:24 PM

Thanks for the feedback Moscow. I'll fix up that parsing bug. Despite the lack of news, I'm still working on this periodically, as it'll be the editor in the Java ZQ implementation. I'm currently making it even more language-aware; Ctrl+clicking on local variables will take you to their declarations (a la Eclipse), and ctrl+clicking on functions and global constructs will (hopefully) either open the source code for those constructs (if it's zscript), or open documentation about it in a browser.

I'll also take a look at fixing the script downloader. I don't even really know if folks would find it useful or not; I was just toying with things that might be handy for folks writing scripts.

EDIT: I take it from your import example that '\' isn't treated as an escape character in ZScript strings, I didn't know that either. Are there any escapes in ZScript strings? I suppose I'll just figure it out via trial and error myself (I still haven't gotten around to really digging into actually using ZQuest myself icon_redface.gif ). The doc over on the Shardstorm wiki is very thorough overall, but I didn't see anything about this.

Edited by bobby_light, 27 February 2013 - 11:39 PM.


#58 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 28 February 2013 - 01:01 AM

Backslashes are used for string control codes in ZQuest message strings, but I don't think there are any escape codes in ZScript.

#59 David

David

    Fallen leaves... adorn my night.

  • Administrators
  • Real Name:David
  • Pronouns:He / Him

Posted 16 July 2013 - 09:59 AM

Wow, I NOW discover this? This is simply amazing, and it is going to be SO MUCH MORE useful for writing scripts than using Notepad. Thank you so much!! :D Again, truly amazing and so useful.

Edited by DaviAwesome, 16 July 2013 - 10:00 AM.


#60 kurt91

kurt91

    Follower of Destiny

  • Members
  • Real Name:Kurtis
  • Location:Eastern Washington University

Posted 25 August 2013 - 06:22 AM

This program is amazing! Much better than writing scripts directly in the buffer. (I only had NotePad, so I didn't see why not to just do it directly) Being able to collapse the scripts down so I only see the name of each makes it a lot easier to keep track of what goes where, and I love being able to see any mistakes I make being caught as I'm still typing.

 

I  haven't hit the point where I need it quite yet, but if I import something like ghost.zh into my scripts, is it possible to get the little tooltips to pop up for anything brought in by that? It would make working out how header files work much easier.

 

Also, whatever happened to this being pinned on the Script Database? I only found out about this because LinkTheMaster pointed it out to me earlier today. This needs to become something like an official addition to ZC, to be honest. Have the official downloads include ZC, ZQuest, ZC Launcher, and this.


  • Binx and David like this


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users