Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Work in Progress / yade - Yet Another Dark Editor

Author
Message
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 23rd Apr 2006 08:36 Edited at: 25th Apr 2006 10:08
Here's the old thread for any of those who might remember this project I started last year. I had an urge to work on it today, and so, after many hours, I finally got correct and complete syntax highlighting. (started from scratch) Haven't found any problems, yet.

Current state, nothing more than a syntax highlighter. Test it out, lemme know if I missed any keywords that aren't part of the INI.

Download here

Screenshot


[Update: April 25, 3:00am]
- New screenshot uploaded, looks much nicer, more IDE-like now.
- Finally got line numbers to display properly.

Still a bug where its drawing every line number, whether visible or not. No problem until you try to scroll a document with 4k lines, verrrry slow. The TrenchRunner's 4500 line source code has been a good stress test candidate.




keyword ini filepath is hardcoded at the moment, looks for:



Attachments

Login to view attachments
Sergey K
20
Years of Service
User Offline
Joined: 4th Jan 2004
Location:
Posted: 23rd Apr 2006 09:54
isnt that was the IDE that you made only to see "if you can make one" ?

MyNewSite:http://gogetax.com
Forums(About BLO and more):http://gogetax.com/forum
dark coder
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 23rd Apr 2006 11:29
looks pretty crappy :p, only one button? kinda misses the point of an ide , but i suppose its better than nothing.

Halowed are the ori.
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 23rd Apr 2006 12:37
well all i've done so far was make the highlighter.

Quote: "isnt that was the IDE that you made only to see "if you can make one" "

sure is!


Bob da reaper
18
Years of Service
User Offline
Joined: 25th Mar 2006
Location:
Posted: 23rd Apr 2006 15:55
lol i like it, very simplistic and as the designers say 'less is more'

I pwn n00bs
dark coder
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 23rd Apr 2006 16:09
yea who needs a compile button, aslong as your code looks sleek

Halowed are the ori.
DB newbie
18
Years of Service
User Offline
Joined: 13th Nov 2005
Location: um..... i dont remember.
Posted: 23rd Apr 2006 18:06
exactly

visit my site (unfinished)
www.freewebs.com/dbnewbie
Bob da reaper
18
Years of Service
User Offline
Joined: 25th Mar 2006
Location:
Posted: 24th Apr 2006 20:43
by the way could we get a demo cos i could quite easily use this

I pwn n00bs
Milkman
18
Years of Service
User Offline
Joined: 30th Nov 2005
Location: United States
Posted: 24th Apr 2006 21:48
Actually, I think a simplistic editor would be quite cool... Make it look like notepad!


Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 25th Apr 2006 02:52 Edited at: 25th Apr 2006 03:12
anybody have any idea of the compiler's command line?

I threw up the current demo, don't expect to do more than just look at your code in colors.

I've opened files with a few thousand lines and it seemed to run ok. I had line numbers, but there was a bug that slowed it down immensely and so I removed it for this demo until I get it fixed.


Cryptoman
20
Years of Service
User Offline
Joined: 24th Nov 2003
Location: Utah Mountains
Posted: 25th Apr 2006 03:44
[/href]http://forum.thegamecreators.com/?m=forum_view&t=56639&b=1[href]

That will get you running the compiler.


Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 25th Apr 2006 10:08
Thx Crypto.

Changed the screenshot to a most recent.


Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 25th Apr 2006 11:25
I actually like that! I'm a big fan of lightweight apps. I dont like seeing a simple editor eat 100Mb RAM! As long as it compiles my code and tells me whats wrong, its a good editor One of the things I didn't like about Synergy was that it was an "AIO" (All In One) app. When I load my IDE, I dont want to load a photoeditor, image editor, model viewer, blah, blah...

Phaelax:
1) Can it handle multiple instances of itself (like if I want two DBP Projects open at once)
2) How does it handle projects with multiple sources?

adr
21
Years of Service
User Offline
Joined: 21st May 2003
Location: Job Centre
Posted: 25th Apr 2006 15:49
Phaelax > How protective are you over your highlighting algorithm?

I tried to make a DBP highlighter in PHP, but I got unstuck because of the spaces in function names. It became this awful mass of while loops, continues and breaks and it just got out of hand. Of course, I'm assuming it only highlights full keywords (unlike Synergie, which seems to highlight "make" and "object" on their own)...

[center]
iv tryed everything!!!!!!!!!! could u please just add The gun and shooting Code thats All!!!!!!!!!
Bob da reaper
18
Years of Service
User Offline
Joined: 25th Mar 2006
Location:
Posted: 25th Apr 2006 21:40
Man, you've given me inspiration, right now i'm downloading c# express and reading how to do syntax highlighting

I pwn n00bs
Cryptoman
20
Years of Service
User Offline
Joined: 24th Nov 2003
Location: Utah Mountains
Posted: 25th Apr 2006 22:44
I downloaded it and it only highlights strings, to purple, keywords are black along with rem(s).


Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 26th Apr 2006 01:35
Probably cause your keywords.ini file was located somewhere else. The path was hard-coded because I dont have all the menus complete yet.

Quote: "1) Can it handle multiple instances of itself (like if I want two DBP Projects open at once)"

You can run multiple instances. But when I'm done, each instance will have tabs to open multiple documents anyway.

Quote: "2) How does it handle projects with multiple sources?"

Not there yet. I'm just now getting to the compiler part, which I'm unsure how to do right now. I guess I haven't mentioned yet, this is written in Java. Currently, the program weighs in at only 11kb.

Quote: "How protective are you over your highlighting algorithm?"

Not very, it sucks. It works just fine, its just very slow on the initial file loading because it has to highlight every line first. After that, it only changes on a per edited line basis.

Quote: "Of course, I'm assuming it only highlights full keywords "

Your assumption is correct.


My current algorithm works by checking to see if any of the keywords are present in each line, rather than break the line into tokens and search them against the keyword array. Slow and inefficient, yes. Simple to implement and get around commands with spaces, yet.

I have a much better method I've been playing around with and I'll let you know when I have it implemented.

ADR, if you would like the highlighting code (in java), I can email it to you.


Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 11th May 2006 22:13
Well, Java has caused a slight problem, loading a file into a "StyledDocument" is way too slow. So unless I find some way around it, this project is moving to C#; of which I'm currently making a highlighter for that now.


Bob da reaper
18
Years of Service
User Offline
Joined: 25th Mar 2006
Location:
Posted: 12th May 2006 19:09
c# is good, but i think it's hard for a kid like me to learn

I pwn n00bs
Cryptoman
20
Years of Service
User Offline
Joined: 24th Nov 2003
Location: Utah Mountains
Posted: 12th May 2006 19:24
I don't know java but you can speed up keyword compare with a simple hash table. But maybe you already use a hash, I don't know.


Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 14th May 2006 01:23 Edited at: 14th May 2006 01:24
Already using a hash table. That's not what's causing the slowdown though. Even if I take out the highlighting altogether it still loads larger files quite slowly. WordPad opens the file in under a second, mine takes like 30seconds on the same 4k line file. Files under 1000 lines aren't noticebly slow.

Here's a pic of the IDE after I converted it to Java syntax, a little morning project of mine. My school feels the need to use unregistered TextPad, so I'm tired of annoying popups. I want to keep this IDE for java simple but effective, for intro-level students in hopes that I can get the school to use it as an alternative. I did rewrite the highlighter though, since keywords no longer contain spaces I can make it more efficient.




Attachments

Login to view attachments
DB newbie
18
Years of Service
User Offline
Joined: 13th Nov 2005
Location: um..... i dont remember.
Posted: 14th May 2006 07:37
wow that looks nicer more buttons but i still like compile buttonsn the best.

Instead of just learning how to program i am also learning how to model in Wings 3D so if you know of any good tutorials let me know.
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 14th May 2006 09:40
who wants to click buttons? shortcut keys! I can navigate anywhere in windows with just a keyboard!


Login to post a reply

Server time is: 2024-09-29 14:34:30
Your offset time is: 2024-09-29 14:34:30