Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #1111 > unrolled thread
| Started by | "Timasmith" <timasmith@THRWHITE.remove-dii-this> |
|---|---|
| First post | 2011-04-27 15:31 +0000 |
| Last post | 2011-04-27 15:31 +0000 |
| Articles | 4 — 3 participants |
Back to article view | Back to comp.lang.java.gui
javascript (rhino) syntax "Timasmith" <timasmith@THRWHITE.remove-dii-this> - 2011-04-27 15:31 +0000
Re: javascript (rhino) sy "Chris Uppal" <chris.uppal@THRWHITE.remove-dii-this> - 2011-04-27 15:31 +0000
Re: javascript (rhino) sy "Chris Uppal" <chris.uppal@THRWHITE.remove-dii-this> - 2011-04-27 15:31 +0000
Re: javascript (rhino) sy "Thomas Kellerer" <thomas.kellerer@THRWHITE.remove-dii-this> - 2011-04-27 15:31 +0000
| From | "Timasmith" <timasmith@THRWHITE.remove-dii-this> |
|---|---|
| Date | 2011-04-27 15:31 +0000 |
| Subject | javascript (rhino) syntax |
| Message-ID | <1173034214.469194.236760@8g2000cwh.googlegroups.com> |
To: comp.lang.java.gui,comp.l Hi, Withing a large system, I have an 'editor' with lets the user modify the contents of a script. I would like to add some color for comments, text, etc, perhaps squiggly lines under code that fails to compile. The language I want to validate against is Javascript. What is the best open source code to add functionality like this to my app (Eclipse, JEdit etc.) Not looking to have anything complex, just some basics. Using JEdit as a plugin might work, though that adds a lot of code and must integrate with my classes to persist the script. thanks Tim --- * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet! --- Synchronet 3.15a-Win32 NewsLink 1.92 Time Warp of the Future BBS - telnet://time.synchro.net:24
[toc] | [next] | [standalone]
| From | "Chris Uppal" <chris.uppal@THRWHITE.remove-dii-this> |
|---|---|
| Date | 2011-04-27 15:31 +0000 |
| Subject | Re: javascript (rhino) sy |
| Message-ID | <45eb24aa$0$762$bed64819@news.gradwell.net> |
| In reply to | #1111 |
To: comp.lang.java.gui,comp.l
Timasmith wrote:
> What is the best open source code to add functionality like this to my
> app (Eclipse, JEdit etc.) Not looking to have anything complex, just
> some basics. Using JEdit as a plugin might work, though that adds a
> lot of code and must integrate with my classes to persist the script.
Does JEdit add that much ? I had thought that it seemed to have a relatively
lightweight component inside it. I'm thinking of packages
org.gjt.sp.jedit.textarea and org.gjt.sp.jedit.syntax.in the documentation at
http://www.jedit.org/api/index.html .
Mind, that's only an impression from looking at the website, I haven't tried to
integrate that code with anything.
-- chris
---
* Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24
[toc] | [prev] | [next] | [standalone]
| From | "Chris Uppal" <chris.uppal@THRWHITE.remove-dii-this> |
|---|---|
| Date | 2011-04-27 15:31 +0000 |
| Subject | Re: javascript (rhino) sy |
| Message-ID | <45ebb9c8$0$763$bed64819@news.gradwell.net> |
| In reply to | #1111 |
To: comp.lang.java.gui,comp.l
[Sorry Tim, I emailed this to yoiu directly by mistake]
Timasmith wrote:
> I've been using Rhino for a while with java 1.5. Now having spent a
> couple of hours troubleshooting why the script was converting my Long
> object into a double value, I would consider changing to 1.6 to avoid
> scripts messing with my data type objects.
As far as I know, the only numeric type ECMAScript has is 64-bit floating
point. So there's very little else a JavaScript interpreter is allowed to
do.
Of more practical value to you, I imagine, is to know why Rhino makes your
long (when converted to floating point) behave and/or look like a floating
point value instead of coyly pretending to be an integer. I can only guess
that the original value is outside some range. For instance ECMAScript's
built in Number -> String conversion will only represent "integer" Number
values as if they /are/ integers if they lie within some range -- the rules
are a little complicated, but I think that range is +/-1.0e21.
What is the value of the original long ? And what are you doing with the
resulting JavaScript number to be able to see that it has "turned into"
floating point ?
-- chris
---
* Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24
[toc] | [prev] | [next] | [standalone]
| From | "Thomas Kellerer" <thomas.kellerer@THRWHITE.remove-dii-this> |
|---|---|
| Date | 2011-04-27 15:31 +0000 |
| Subject | Re: javascript (rhino) sy |
| Message-ID | <552137F227ftdU1@mid.individual.net> |
| In reply to | #1111 |
To: comp.lang.java.gui,comp.l On 04.03.2007 19:50 Timasmith wrote: > Hi, > > Withing a large system, I have an 'editor' with lets the user modify > the contents of a script. I would like to add some color for > comments, text, etc, perhaps squiggly lines under code that fails to > compile. The language I want to validate against is Javascript. > > What is the best open source code to add functionality like this to my > app (Eclipse, JEdit etc.) Not looking to have anything complex, just > some basics. Using JEdit as a plugin might work, though that adds a > lot of code and must integrate with my classes to persist the script. The "old" jEdit syntax pacakge that is available at sourceforge is probably not the "best" but for a simple editor it should be enough. It's only a single package that doesn't add too much overhaed. For apparent reasons it is not maintained any longer, but it does work for me. http://sourceforge.net/projects/jedit-syntax/ I don't think it includes JavaScript highlighting, but this shouldn't be too complicated to add. Thomas --- * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet! --- Synchronet 3.15a-Win32 NewsLink 1.92 Time Warp of the Future BBS - telnet://time.synchro.net:24
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.java.gui
csiph-web