A truly hackable editor: simple, lightweight, understandable

Related tags

App kanvas
Overview
Comments
  • Autocompletion for sandy stopped to work after complex expression in parentesis

    Autocompletion for sandy stopped to work after complex expression in parentesis

    Expression var a=(1 has suggestions ),*,+,-,/ but expression var a=(1+1 should have same suggestions instead if has only *,+,-,/ (without closing parenthesis)

    I think it's related to handling of StarLoopbackState somehow.

    opened by eschava 10
  • build failed: unresolved references

    build failed: unresolved references

    hi federico,

    unfortunately the build fails for me, supposedly due to missing dependencies/private libraries.

    ... :assemble UP-TO-DATE :kanvas-core:compileKotlin e: /opt/volumes/swentw/kanvas/kanvas-core/src/main/kotlin/LanguageSupport.kt: (3, 22): Unresolved reference: antlr e: /opt/volumes/swentw/kanvas/kanvas-core/src/main/kotlin/LanguageSupport.kt: (63, 56): Unresolved reference: None :kanvas-core:compileKotlin FAILED

    opened by mrolappe 3
  • Problem running the tool

    Problem running the tool

    Hi! Running the kanvas.kt (Intellij, jdk 1.8) returns a black editor where I can't write anything. I'm still wrapping my mind around Kotlin and swing, so maybe am I missing something? Thanks for all your guides and hard work!

    image

    image

    opened by AlessandroCaste 2
  • LICENSE file at top level?

    LICENSE file at top level?

    I can see from the build.gradle and the pom that this is released under the MIT license, but it took a little digging. Would you be willing to add the license file at the root folder level to make it clearer?

    Thanks and sorry for the trouble.

    opened by nkedel 2
  • Readme Links

    Readme Links

    Two links at the bottom of the readme.md to the https://tomassetti.thisacpb domain don't work but tried with https://tomassetti.me and it worked fine - guessing you updated at some point.

    opened by CraicOverflow89 1
  • Error trying to make use of example code in Kanvas article

    Error trying to make use of example code in Kanvas article

    I'm experimenting with Kanvas, trying to reproduce the code from here:

    https://tomassetti.me/kanvas-generating-simple-ide-antlr-grammar/

    Given the following Kotlin code:

    import me.tomassetti.kanvas.BaseLanguageSupport
    import me.tomassetti.kanvas.AntlrLexerFactory
    import me.tomassetti.kanvas.ParserData
    import me.tomassetti.kanvas.Kanvas
    import me.tomassetti.kanvas.languageSupportRegistry
    import javax.swing.SwingUtilities
    import org.antlr.v4.runtime.Lexer
    import XParser
    import XLexer
    import com.strumenta.kolasu.model.Node
    
    class KanvasEditorExpt {
       object langSupport : BaseLanguageSupport<Node>() {
           override val antlrLexerFactory: AntlrLexerFactory
               get() = object : AntlrLexerFactory {
                   override fun create(code: String) : Lexer =
                       XLexer(org.antlr.v4.runtime.ANTLRInputStream(code))
               }
           
           override val parserData: ParserData?
               get() =
                   ParserData(XParser.ruleNames, XParser.VOCABULARY, XParser._ATN)
           }
           
       fun main(args: Array<String>) {
           languageSupportRegistry.register("X", langSupport)
           
    	    val kanvas = Kanvas()
           
    	    SwingUtilities.invokeLater {
    	        kanvas.createAndShowKanvasGUI()
    	        kanvas.addTab("My X", languageSupport = langSupport)
    	    }
       }
    }
    

    I see this error:

    Object 'langSupport' is not abstract and does not implement abstract base class member public abstract val 
     parser: Parser<Node> defined in me.tomassetti.kanvas.BaseLanguageSupport
    

    I built the .jar files below via Gradle:

    I’ve cloned from GitHub and built what I think are the relevant libraries (note the versions):

    • kanvas-core-0.2.4.jar
    • kolasu-core-1.3.11.jar
    • rsyntaxtextarea-3.1.3.jar

    I saw a different error before using BaseLanguageSupport<Node> instead of BaseLanguageSupport.

    Note that with the following in Java:

    class MyLanguageSupport extends BaseLanguageSupport<Node> {	
    }
    

    I see a slightly different Parser related error:

    The type com.strumenta.kolasu.parsing.Parser cannot be resolved. It is indirectly referenced from required .class files
    

    I suspect I should be using something other than Node here, but I need more docs/examples.

    A minimal complete example in GitHub including imports and dependencies would help.

    Advice welcome. Thanks.

    Apologies for what feels like a newbie error. I am only just beginning to work with Kotlin and gradle, and tend to work with Java and Ant mostly.

    See also my post on the Strumenta Language Workbench forum re: this.

    Thanks.

    opened by dbenn 0
  • kanvas.kt fails to instantiate

    kanvas.kt fails to instantiate

    I'm currently writing my own language and found your tutorial and code for making an editor. I followed the reference implementation of python when writing my code, as I don't code in kotlin.

    Here is the repo that contains the editor https://github.com/cliserkad/kdl-editor

    I use maven to import this repo and another of my own which contains my language. When trying to run the Editor.kt file in IntelliJ, I encounter a runtime error. Here is the stack trace:

    Exception in thread "main" java.io.IOException: Problem reading font data.
    	at java.desktop/java.awt.Font.createFont0(Font.java:1177)
    	at java.desktop/java.awt.Font.createFont(Font.java:1046)
    	at me.tomassetti.kanvas.Kanvas.<init>(kanvas.kt:320)
    	at com.xarql.kdl_editor.EditorKt.main(Editor.kt:13)
    

    I looked at the source code for kanvas.kt to see if the problem was related to a default constructor, but it isn't. The value being set isn't in any constructor because it is a constant. I think I could catch the exception and create the font in my code, then pass the font to kanvas's constructor, but then this would still be broken. I checked the .jar that maven downloaded, and it does indeed contain the .ttf file for the font.

    I think the underlying issue is that the wrong file is being selected somehow, but I'm unsure. The .ttf file is not corrupt.

    opened by cliserkad 0
Owner
Federico Tomassetti
Software Architect and Founder of Strumenta. We are specialized in language engineering: DSLs, design languages, parsers, editors, interpreters
Federico Tomassetti
A file manager,apk editor....

A file manager,apk editor....

FlyingYu 41 Oct 20, 2022
🌄 Photo editor using native modules for iOS and Android. Inherit from 2 available libraries, Brightroom (iOS) and PhotoEditor (Android)

React Native Photo Editor (RNPE) ?? Image editor using native modules for iOS and Android. Inherit from 2 available libraries, Brightroom (iOS) and Ph

Baron Ha. 242 Dec 28, 2022
An advanced DEX editor for Android.

An advanced DEX editor for Android.

Mike Anderson 75 Jan 3, 2023
JBytedit - Java bytecode editor

JBytedit - Java bytecode editor JBytedit was a free, fully featured graphical Java Bytecode editor made by (Matthew Dupraz). This is an archival copy

null 1 Jan 22, 2022
Android Kotlin Fundamentals: 02.3 ConstraintLayout using the Layout Editor

ColorMyViews Android Kotlin Bootcamp from Google Developer website Android Kotli

Marcelo Viana 0 Feb 13, 2022
A capable — pixel art editor for Android.

A capable — pixel art editor for Android.

thebluepandabear 128 Dec 31, 2022
Instagram-like story editor in compose

Story Editor Instagram-like story editor to add content to your pictures. Note: this is still a WIP Setup First, add jitpack in your build.gradle at t

Yann Badoual 27 Nov 30, 2022
Turtle Graphics 🐢 implementation for Android Platform with Code Editor, Preview Screen and packages

Turtle Graphics Download Turtle is an Android Application inspired from the original Turtle Graphics and Logo, Logo is an educational programming lang

Amr Hesham 15 Dec 30, 2022
A lightweight Android browser with modern navigation

Lightning Browser Speed, Simplicity, Security Download Master Branch Dev Branch Features Bookmarks History Multiple search engines (Google, Bing, Yaho

Anthony Restaino 1.9k Dec 28, 2022
DNS-based Host Blocker (and lightweight ad blocker) for Android

DNS-Based Host Blocking for Android This is a DNS-based host blocker for Android. In the default configuration, several widely-respected host files ar

Julian Andres Klode 1.9k Jan 8, 2023
A lightweight super-fast wireless file sharing application built on WiFi Peer-to-Peer technology.

ZipBolt ZipBolt is a file-sharing platform that allows digital devices to share files at incredible speeds using WiFi Peer-to-Peer technology. ZipBolt

Prosper Ekwerike 9 Sep 22, 2022
Wallum is a superfast ⚡ lightweight wallpaper app, built using Kotlin, Retrofit, MVVM, Paging 3, Hilt, and Navigation Components

Show some ❤️ and star the repo to show support for the project Wallum Android App Wallum is a super-fast ?? , lightweight wallpaper app built purely w

Aditya Verma 19 Dec 6, 2022
📲💬 react-native-fontext is a lightweight library to integrate fonts in your React Native application that works seamlessly in android and iOS devices.

React Native Fontext react-native-fontext is a lightweight library to integrate fonts in your React Native application that works seamlessly in androi

mroads 9 Dec 3, 2021
CutableTextView - the super lightweight library that helps to you cut long text. ✂️

An easy to use CutableTextView when you need to cut a long text. ✂️ ✂️ ✂️ Gradle dependencies { implementation 'com.github.devit951:cutabletextvie

Ildarov 2 Aug 29, 2019
QCalc - A lightweight semi-scientific calculator for Android

QCalc A lightweight semi-scientific calculator for Android. Written from scratch

Trent Lilley 0 Jan 27, 2022
Scp-wallet-android - Lightweight ScPrime wallet for Android

SCP Wallet Android SCP Wallet is lightweight ScPrime wallet for Android. Get sta

Paolo Biglioli 3 Mar 31, 2022
A lightweight, feature-rich wrapper for the Telegram Bot API, providing a handy Kotlin DSL to quickly build your bot.

Kotlin Telegram Bot Kotlin based wrapper over Telegram API. Current version of the Telegram Api: 6.0 Principles Annotations Magic. The basic interacti

Jey 61 Dec 27, 2022
Java/Kotlin lightweight implementation of RFC-6238 and RFC-4226 to generate and validate time-based one-time passwords (TOTP).

1time Java/Kotlin lightweight implementation of RFC-6238 and RFC-4226 to generate and validate time-based one-time passwords (TOTP). Maven / gradle de

Atlassian Labs 31 Dec 21, 2022