![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Sep 2006
Posts: 14
Rep Power: 0
![]() |
Code Highlighting in Text Editor
Hi all this is my first post here.
Sorry if it's been asked before, i did search. Anyway, i am developing a text editor and want to add highlighting to the syntax, to start with HTML then PHP and ASP. But not sure where to start. I'm coding in Java using the Swing library. Thanks ![]() |
|
|
|
|
|
#2 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Is there an actual question in there somewhere?
![]()
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#3 |
|
Newbie
Join Date: Sep 2006
Posts: 14
Rep Power: 0
![]() |
Sorry,
I am developing a text editor and i want to add highlighting to the source code. But i'm not sure how it's done. So my question is, can anyone point me in the right direction as to how i go about it? |
|
|
|
|
|
#4 |
|
Sexy Programmer
|
I would recommend looking at this url.
http://www.google.com/search?hl=en&l...ghting+in+Java
__________________
I would love to change the world, but they won't give me the source code! |
|
|
|
|
|
#5 |
|
Newbie
Join Date: Sep 2006
Posts: 14
Rep Power: 0
![]() |
I've searched on google quite a bit and found plenty of examples but i just wondered if anyone had any experience in this and would be able to direct me to good method that wasn't too complicated.
I'm quite new to Java. |
|
|
|
|
|
#6 |
|
Professional Programmer
![]() Join Date: Sep 2005
Posts: 419
Rep Power: 3
![]() |
>I'm quite new to Java.
And you're writing a graphical text editor with syntax highlighting...
__________________
Even if the voices aren't real, they have some pretty good ideas. |
|
|
|
|
|
#7 |
|
Sexy Programmer
|
I've been studying Java a little over a year and not that long ago was hardly able to create a basic text editor.
__________________
I would love to change the world, but they won't give me the source code! |
|
|
|
|
|
#8 |
|
Newbie
Join Date: Sep 2006
Posts: 14
Rep Power: 0
![]() |
I'm not new to programming.
I just wanted to use Java for the portability. I don't think changing to a different language should be too difficult. |
|
|
|
|
|
#9 |
|
Hobbyist Programmer
|
IIRC you can highlight syntax using StringTokenizer and either the rtf or html style in a EditorPane, I dont remember exactly how but look in that direction... Search on google for a plugin or something like that.
__________________
Pain is just weakness leaving the body.
|
|
|
|
|
|
#10 |
|
Newbie
Join Date: Sep 2006
Posts: 14
Rep Power: 0
![]() |
Thanks, i've found a section in a book about this now. That's hopefully pointed me in the right direction.
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [perl] graphical text editor | glimmy | Existing Project Development | 0 | Aug 6th, 2006 11:47 PM |
| Basic HTML Tutorial - Reuben Keeney | ReubenK | HTML / XHTML / CSS | 14 | Mar 26th, 2006 5:50 AM |
| How to detect cursor location and insert text??? | syntax-error | C# | 3 | Jun 30th, 2005 1:42 AM |
| Text editor source code... | paperboy | C++ | 2 | Mar 9th, 2005 2:08 PM |