Menu

#551 Allow writting macros in Fantom

none
open
nobody
None
5
2020-06-02
2020-05-24
ruanjiaxing
No

I found the Fantom language to be very good alternative to BeanShell and suitable as a scripting language to write JEdit macros. Please consider supporting it. JEdit is a very good text editor but it's now inferior to other JavaScripts/Python/Lua based editors because lacking of good plugins. I think part of the problem is using BeanShell as the scripting language. BeanShell is... just Java! It's convenient because it's familiar so Java devs don't have to learn new languages to write scripts, but it's the same plain old wordy Java that discourage new users to write scripts for JEdit. I suggest extend to support other JVM languages like Groovy, Fantom... I myself recommend Fantom. Please consider my suggestion. Thanks.

Related

Feature Requests: #551

Discussion

  • Dale Anson

    Dale Anson - 2020-05-24

    What plugins are lacking?

    Several other languages are already supported, take a look at the Clojure, Groovy, Oolong, Scheme, and Python plugins. There may be more, there are a lot of plugins, which makes me ask again, what plugins are lacking? What are these other editors you're talking about?

     
    • ruanjiaxing

      ruanjiaxing - 2020-05-25

      Lua based editor: TextAdept and many, I don't like Lua so I don't use them, but there are a lot.

      Python based editor: the most notable is Sublime Text, there also be CudaText and many.

      JavaScript based editor: VSCode, Atom, Brackets... too many.

      Note: they might not be written in said language, but they allow extends the editor by writing plugins/extensions/scripts using said language.

      Editor like VSCode is more or less on par with an IDE. Install the appropriate plugin and you will really have an IDE.

      JEdit is definitely lacking many plugins. For example, language server plugin. By utilizing language server, they provide Visual Studio level of code completion/intellisense for a lot of language: Java, JavaScript, C#, Objective C, Object Pascal... Integrated VCS + build tool support let them become a complete development environment.

      I love JEdit because it's the truly cross platform editor, thanks to the awesomeness of Java. I use it on Linux, OpenBSD and HaikuOS. But the fact I have to said JEdit's plugins are mostly outdated and looked like a toy compared with VSCode or Sublime Text. Sorry.

       
      • ruanjiaxing

        ruanjiaxing - 2020-05-25

        I think you are not used VSCode or Sublime Text. The number of plugins of JEditor could be considered as poor (too few) compared to them. This is not "a lot of" at all.

         
  • ruanjiaxing

    ruanjiaxing - 2020-05-25

    Sorry. I have confused between plugins and macros. This ticket I asked about a plugin allow writing macros in Fantom (or possibly, Groovy) as there are already plugins allow writting macros in Java (javamacros) and JavaScript (javascriptshell). When I wrote the messages above I'm deprived of sleep and very tired so I have confused between plugin and macros. JEdit definitely needs more plugins, but this is not what this ticket is about. Sorry for the misleading I have made.

    As my little research showed that any JVM languages could consumes the JEdit API could be used to develop JEdit plugins, so we are already possible to use Fantom (or Groovy) to develop plugins for JEdit? BeanShell is the default language for JEdit macros but not for develop JEdit plugins and I have badly confused it. Most of JEdit plugins I saw on the Plugin Central were written in Java itself.

    Let's back to what this ticket is about, macros in Fantom (or Groovy).

     
  • ruanjiaxing

    ruanjiaxing - 2020-05-25

    Fantom is a JVM language but it compiles to fcode, not Java bytecode. When running, the Fantom interpreter convert fcode into bytecode and run it on the JVM. We can't use the plugin JavaMacros because there is no .class file, so a special plugin like what for JavaScriptShell is needed. I checked Groovy also compiles to .class file so I think it should work with JavaMacros plugin, but Fantom needs special treatment to work as a language for JEdit macros.

     
  • Dale Anson

    Dale Anson - 2020-05-25

    Is there something specific you're looking for a macro to do? There are a lot of macros available on the community site (which doesn't work well), plus there is the MacroManager plugin (which seems to be broken at the moment).

     
    • Mikey

      Mikey - 2020-05-25

      I've been looking for the roman numerals macro. I reverse engineered the
      link (which was broken) to tell me the filenames and was able to get google
      to find the macros on some japanese website for download... back in
      2013ish. But I have lost the original download (I think).. I thought there
      was at least one of the roman numeral macros that would scan whole files
      for roman numerals not just convert the selection, but maybe I'm
      remembering some other methodology than jedit/macros.

      I've also tried to figure out how to get an account on the jedit community
      website. and never been able to get my openID to function.

      On Mon, May 25, 2020 at 11:51 AM Dale Anson via jEdit-devel jedit-devel@lists.sourceforge.net wrote:

      Is there something specific you're looking for a macro to do? There are a
      lot of macros available on the community site (which doesn't work well),
      plus there is the MacroManager plugin (which seems to be broken at the
      moment).


      Status: open
      Group: none
      Created: Sun May 24, 2020 02:38 PM UTC by ruanjiaxing
      Last Updated: Mon May 25, 2020 03:57 PM UTC
      Owner: nobody

      I found the Fantom language https://fantom.org to be very good
      alternative to BeanShell and suitable as a scripting language to write
      JEdit macros. Please consider supporting it. JEdit is a very good text
      editor but it's now inferior to other JavaScripts/Python/Lua based editors
      because lacking of good plugins. I think part of the problem is using
      BeanShell as the scripting language. BeanShell is... just Java! It's
      convenient because it's familiar so Java devs don't have to learn new
      languages to write scripts, but it's the same plain old wordy Java that
      discourage new users to write scripts for JEdit. I suggest extend to
      support other JVM languages like Groovy, Fantom... I myself recommend
      Fantom. Please consider my suggestion. Thanks.


      Sent from sourceforge.net because jedit-devel@lists.sourceforge.net is
      subscribed to https://sourceforge.net/p/jedit/feature-requests/

      To unsubscribe from further messages, a project admin can change settings
      at https://sourceforge.net/p/jedit/admin/feature-requests/options. Or, if
      this is a mailing list, you can unsubscribe from the mailing list.
      --


      jEdit Developers' List
      jEdit-devel@lists.sourceforge.net
      https://lists.sourceforge.net/lists/listinfo/jedit-devel

       

      Related

      Feature Requests: #551

      • ruanjiaxing

        ruanjiaxing - 2020-05-26

        I can't get an account on the JEdit forum, too. I send them an email as they said but they never reply me.

         
      • Dale Anson

        Dale Anson - 2020-05-26

        http://community.jedit.org/?q=filestore/download/20

        Link to the numeric conversion macros, however, the download seems to be corrupt.

         
    • ruanjiaxing

      ruanjiaxing - 2020-05-26

      I learned the old Java and can't keep up with modern Java, so I made a switch to Fantom and never looked back. BeanShell IMHO is just a stripped down Java. I want to be able to use my familiar language to write macros to extend JEdit. But as you said on my other ticket, I think I should learn to write an actual JEdit plugin. So no, I don't need any specific functions from a macros but only want to write macros in my favorite language to automate boring job and also extend the editor on the way when using JEdit as my main text editor. I think I could do more with Fantom than BeanShell because, IHMO, Fantom is more powerful than BeanShell.

      I think more options is better than just one. The JavascriptShell plugin advertised that they also added the ability to write macros in Javascript (I'm not tested it yet) so I think there is no reason something similar for Fantom, FantomShell, is impossible. Fantom itself also included a shell, fansh. So I think it is perfectly matched up with JEdit to become an alternative languages for macros alongside of BeanShell.

       

      Last edit: ruanjiaxing 2020-05-26

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.