|
From: Adam P. <ap...@ar...> - 2019-10-17 22:37:35
|
Hi Dale, I really appreciate your taking a look at the code. Alas, since all strings in the interface are scrambled, the Global Options dialog is unintelligable. I tried looking in my .jedit/properties file but didn't notice anything there. The only wild conjecture I have is that it's connected with my deleting the lang_fr.properties file in the QuickNotepad plugin and maybe there's a loose end somewhere from that. all the best, Adam On 10/17/19 3:28 PM, Dale Anson wrote: > I looked at your code on github, and I don't see anything that would > make your jEdit menus and so on have odd fonts. Maybe check your font > settings in Utilities - Global Options - Appearance? > > On Thu, Oct 17, 2019 at 4:11 PM Adam Pease > <ap...@ar... <mailto:ap...@ar...>> > wrote: > > Hi Dale, > I didn't figure this one out, but I solved it by eliminating the > dockable window entirely. All I wanted anyway to start is the ability > to trigger syntax checking from a menu. In the long run, I'm hoping I > can trigger it from changes to a file and just send the changed lines > and their context to the code that checks for correctness. The end > result is that my plugin is much simpler with just three classes and no > windows or dialogs other than the main editor window. > > all the best, > Adam > > > On 10/17/19 3:07 PM, Dale Anson wrote: > > For your problem with "Unknown dockable window", do you have > > "SUMOjEdit.title" or SUMOjEdit.label" in your properties file? > These are > > properties for a dockable window, so if you have those and no > > dockable.xml, you'll probably get that message. Also, I'm pretty > sure > > you have to have a dockables.xml, even if it is empty. > > > > > > On Thu, Oct 17, 2019 at 7:51 AM Adam Pease > > <ap...@ar... > <mailto:ap...@ar...> > <mailto:ap...@ar... > <mailto:ap...@ar...>>> > > wrote: > > > > Hi Dale and All, > > Using the Log class worked, with log level of MESSAGE. > Using log > > level of DEBUG didn't result in printing to STDOUT. > > I've succeeded at getting my syntax checker function to > report > > errors to ErrorList. Now it's just about details :-) > > One strange thing that happened is that all my jEdit > menus are now > > special characters like the enclosed screenshot of the > Activity Log > > (I'll send this separately since the list appears to block > images). Do > > you know what might cause that? > > Another challenge results from my trying to delete features > > from the > > QuickNotepad plugin that aren't part of my system and rename the > > classes. This has resulted in the Activity Log message > > > > 11:14:36 AM [AWT-EventQueue-0] [error] DockableWindowManagerImpl: > > Unknown dockable window: SUMOjEdit > > > > But the message is not as helpful as a Java error since it > doesn't > > mention from what file or line of code it comes from. Do you > have any > > thoughts on debugging messages of this sort? > > > > all the best, > > Adam > > > > On 10/15/19 5:57 PM, Adam Pease wrote: > > > Hi Dale, > > > Many thanks for the quick response! For some reason I > don't see > > > System.out messages in the Activity log. I'm starting > jEdit from the > > > command line and don't see them there either. I'll try > the Log > > class. > > > I'm afraid Antlr and others would be "underkill" for my > > application > > > since it's not just syntax checking (although I figured it was > > easier to > > > call it that at first, but now since you've brought it > up... :-) but > > > rather complex things like type inference in a higher-order > > mathematical > > > logic. > > > > > > all the best, > > > Adam > > > > > > > > > On 10/15/19 5:40 PM, Dale Anson wrote: > > >> System.out and/or System.err should work fine, those > messages should > > >> show up in the Activity log. If you start jEdit from a > command line, > > >> System.out and System.err should also show there. Another > (perhaps > > >> better) option is to use jEdit's Log class, > org.gjt.sp.util.Log, > > you can > > >> find the API details in jEdit's help. Basic usage is > something > > like this: > > >> > > >> import org.gjt.sp.util.Log; > > >> ... > > >> Log.log(Log.DEBUG,this,"some important message"); > > >> > > >> The "this" can really be anything, it takes an Object, so it > > could be a > > >> String or the class you're calling it from, or whatever is > > useful for you. > > >> > > >> How are you writing your syntax checking plugin? I've > used both > > javacc > > >> and Antlr quite a bit for such things, both have a bit of > a learning > > >> curve, but work very well. You can look at the source > for Beauty, > > >> JavaSideKick, and XML plugins for examples of both. On > the other > > hand, > > >> that could be overkill for what you're trying to do. > > >> > > >> Dale > > >> > > >> > > >> > > >> On Tue, Oct 15, 2019 at 4:21 PM Adam Pease > > >> <ap...@ar... > <mailto:ap...@ar...> > > <mailto:ap...@ar... > <mailto:ap...@ar...>> > > <mailto:ap...@ar... > <mailto:ap...@ar...> > > <mailto:ap...@ar... > <mailto:ap...@ar...>>>> > > >> wrote: > > >> > > >> Hi All, > > >> I'm attempting to write a syntax checking plugin in > > jEdit for a > > >> language I've created. Thanks to help from Dale > Anson and the > > >> QuickNotepad plugin tutorial, I have a basic plugin that > > loads code > > >> from > > >> my existing framework (on GitHub at > > https://github.com/ontologyportal > > >> and the plugin is SUMOjEdit). I've started working with > > the ErrorList > > >> plugin as part of this effort. But I've reached an > impasse > > where the > > >> first feature I want to implement doesn't work and I > need > > to figure out > > >> how to generate some status messages that would help > me to > > debug it. > > >> I can create the ErrorList and see a placeholder > sort > > of error > > >> that I > > >> create in my QuickNotepad.checkErrors() method (if > anyone > > wants to look > > >> at the code). > > >> I can look at the Troubleshooting->ActivityLog > and see > > all the > > >> messages my framework writes to System.out when > > initializing, called > > >> from the QuickNotepad constructor. However, if I > put some > > simple > > >> System.out.println() messages into the plugin action of > > >> QuickNotepad.checkErrors() they don't appear. I've also > > tried writing > > >> to the status bar, following the advice at > > >> http://community.jedit.org/?q=node/view/3977 without success. > > >> Can anyone point me to an approach that would > allow me > > to display > > >> status messages from my plugin during its execution? > > >> > > >> all the best, > > >> Adam > > >> > > >> -- > > >> -------- > > >> Adam Pease > > >> http://www.ontologyportal.org > > >> http://www.adampease.org > > >> @apease_ontology on Twitter > > >> > > >> -- > > >> ----------------------------------------------- > > >> jEdit Developers' List > > >> jEd...@li... > <mailto:jEd...@li...> > > <mailto:jEd...@li... > <mailto:jEd...@li...>> > > >> <mailto:jEd...@li... > <mailto:jEd...@li...> > > <mailto:jEd...@li... > <mailto:jEd...@li...>>> > > >> https://lists.sourceforge.net/lists/listinfo/jedit-devel > > >> > > > > > > > -- > > -------- > > Adam Pease > > http://www.ontologyportal.org > > http://www.adampease.org > > @apease_ontology on Twitter > > > > > > -- > > ----------------------------------------------- > > jEdit Developers' List > > jEd...@li... > <mailto:jEd...@li...> > > <mailto:jEd...@li... > <mailto:jEd...@li...>> > > https://lists.sourceforge.net/lists/listinfo/jedit-devel > > > > -- > -------- > Adam Pease > http://www.ontologyportal.org > http://www.adampease.org > @apease_ontology on Twitter > -- -------- Adam Pease http://www.ontologyportal.org http://www.adampease.org @apease_ontology on Twitter |