color coding of text

D

don

In Word you can select a color for highlighted text. I'd like to be able to
do this in eclipse or some other java editor. It would allow you to show a
programs structure nicely. Is there such a thing?
 
J

Joerg Meier

In Word you can select a color for highlighted text. I'd like to be able to
do this in eclipse or some other java editor. It would allow you to show a
programs structure nicely. Is there such a thing?

The Java compiler will not read files with any sort of artificial colouring
codes in them, so even if you find an editor that would allow this, you
would then be unable to use it to write Java files that compiled.

That being said, most editors have configurable syntax highlighting, and of
course you can always simply copy and paste the Java code into Word and
colour it there (but then it won't compile anymore obviously).

Liebe Gruesse,
Joerg
 
R

Roedy Green

In Word you can select a color for highlighted text. I'd like to be able to
do this in eclipse or some other java editor. It would allow you to show a
programs structure nicely. Is there such a thing?

I have done it two ways:

1. generate simple HTML and have Swing render it. See
http://mindprod.com/jgloss/htmlrendering.html I have had very little
success rendering "wild" HTML plucked from the web. You can do inline
styles, but the markup must be validated and vanilla.

2. I generate binary tokens, one for each string. It includes the
text. The type of the token encodes the font size, colours,
highlighting etc. Then I use drawString to render this at the lowest
level. See http://mindprod.com/products1.html#JDISPLAY
 
F

FredK

In Word you can select a color for highlighted text. I'd like to be able to do this in eclipse or some other java editor. It would allow you to show a programs structure nicely. Is there such a thing?

In Eclipse: Window -> Preferences -> Java -> Editor -> Syntax Coloring
 
L

Lew

D

don

Not the highlight color, the *text* color!

I bet you don't speak to people like that in person.
 
L

Lew

Not the highlight color, the *text* color!

You wrote:
"In Word you can select a color for highlighted text.
I'd like to be able to do this in eclipse [sic] or some other java [sic] editor."

You asked for the color for highlighted text. Don't be mad at me for answering
the question you actually asked instead of the one you intended to ask.

You will note that the query term I suggested was *your* phrase, with the word
"Java" added. If you don't like *your own* search phrase, then for God's sake
use a different one.

Besides, it's the same answer: RTFM!
I bet you don't speak to people like that in person.

Did you RTFM first?

Did you try an online search first?

This is a newsgroup for Java programmers. Part of the essential skill of
being a programmer is knowing how to look things up. Something you did not do.

The advice is sound. Follow it. Get over yourself.
 
D

don

The threads title "color coding of text" might've been a clue¡K

Just sayin.

BTW, telling someone to "RTFM" is abusive.

Period.

That is why you don't say it to someone's face.

Get over it.
 
J

Joerg Meier

BTW, telling someone to "RTFM" is abusive.

Telling someone to RFTM is in absolutely no way abusive, not even a little
bit, not even jokingly. If being told to read the documentation for
something you want to use offends you, I recommend you give up on
programming and take on something less mentally challenging where you won't
be offended by reading documentation.

Liebe Gruesse,
Joerg
 
J

Joerg Meier

Why can't you just give advice?
Why do you always feel it necessary to behave like
a total arsehole?

In his defense, his original advice was in a neutral tone, he only turned
rude when he was yelled at instead of thanked by the ungrateful original
poster for posting his link.

Liebe Gruesse,
Joerg
 
R

Robert Klemme

Why can't you just give advice?
Why do you always feel it necessary to behave like
a total arsehole?

Why do you even bother, if you don't think the question a valid one then
why bother to respond?

<disclaimer>I'm not Lew so I don't have access to his mind.</disclaimer>
You could look at this from a different perspective: since he *did*
bother to answer you could give him the benefit of the doubt and assume
that he wants to help. And in fact, I find most of the time Lew's
postings are helpful - maybe not in an obvious way though. :)
Your bizarre behavior lowers the tone of the group
get over yourself, you really are not that important.

You make it important - with your posting. You may not agree with his
style - very well. But what makes you believe this posting of yours is
helping to improve things?

Cheers

robert
 
A

Arved Sandstrom

Telling someone to RFTM is in absolutely no way abusive, not even a little
bit, not even jokingly. If being told to read the documentation for
something you want to use offends you, I recommend you give up on
programming and take on something less mentally challenging where you won't
be offended by reading documentation.

Liebe Gruesse,
Joerg
Considering that it means Read The Fucking Manual, it is actually a
somewhat hostile way of telling someone to read the docs. Abusive?
Depends on how you the recipient feels when they've been cursed out in a
professional forum. Maybe.

A neutral way of telling someone to read the docs is "read the docs".

Even better, do like FredK did, and provide a useful hint.

AHS
 
A

Arved Sandstrom

<disclaimer>I'm not Lew so I don't have access to his mind.</disclaimer>
You could look at this from a different perspective: since he *did*
bother to answer you could give him the benefit of the doubt and assume
that he wants to help. And in fact, I find most of the time Lew's
postings are helpful - maybe not in an obvious way though. :)


You make it important - with your posting. You may not agree with his
style - very well. But what makes you believe this posting of yours is
helping to improve things?

Cheers

robert
Here's the thing, Robert. If we knew that every poster to this NG was a
professional programmer, then even though RTFM is unprofessional, you
could probably tenuously justify saying it. After all, career
programmers should be doing some research before asking questions.

But we don't know that every poster here is a pro. I'll bet quite a few
are not. You might have a guy who works a shitty job who is looking to
improve his marketability by learning a programming language on his own,
for example. Or a parent trying to keep up with her kid's homework.
Under these circumstances using the term RTFM is unhelpful.

AHS
 
L

Lars Enderin

2013-06-01 14:40, lipska the kat skrev:
Plenty of others, including myself managed to reply without giving it
large with the smart arse attitude. You can defend him all you want but
bullies have never phased me, I always stand up to them and they always
turn out to be cowards.

ITYM fazed. And I think you are an over-sensitive jerk, too prone to
label others as bullies and cowards. Get over yourself.
I'm happy for you.

How gracious of you!

In your opinion.
Allowing thugs to practice their thuggery unopposed never contributes to
an open and free debate.

You are not helping either by labelling people as thugs just because you
don't like them.
 
L

Lars Enderin

2013-06-01 21:04, lipska the kat skrev:
2013-06-01 14:40, lipska the kat skrev:
On 01/06/13 12:30, Robert Klemme wrote:
On 01.06.2013 10:06, lipska the kat wrote:
[snip]

You are not helping either by labelling people as thugs just because you
don't like them.

Piss off Lars you idiot.

You need to work on your attitude.
 
A

Arne Vajhøj

In Word you can select a color for highlighted text. I'd like to be
able to
do this in eclipse or some other java editor. It would allow you to
show a
programs structure nicely. Is there such a thing?

emacs is almost infinitely configurable and is available for Windows
but it can be a bit of a headbanger to get started with

http://ftp.gnu.org/gnu/emacs/windows/

gedit allows you to create .lang files in [Ubuntu Linux]
/usr/share/gtksourceview-3.0/language-specs/
and is simpler to use and configure but not as flexible
also available for Windows

https://live.gnome.org/Gedit/Windows

I've never used the Windows versions myself.

JEdit is a nice editor and then it is written in Java.

:)

Arne
 
A

Arne Vajhøj

The threads title "color coding of text" might've been a clue…

Just sayin.

It is a clue.

But you can hardly criticize somebody for assuming that you meant what
you wrote in the message body.
BTW, telling someone to "RTFM" is abusive.

RTFM without any reference to what FM is not abusive. It is
not very helpful either.

RTFM with a reference to a FM is not abusive and it is helpful.

Lew did provide a link to the FM for highlighting in his first reply.

He did not in his second reply for text, but a minimum of search
would in the first link would fine the requested information.

Making claims and then say "period" does convince many
about the validity of the claim. Most likely the opposite.

Arne
 
A

Arne Vajhøj

Considering that it means Read The Fucking Manual, it is actually a
somewhat hostile way of telling someone to read the docs. Abusive?
Depends on how you the recipient feels when they've been cursed out in a
professional forum. Maybe.

A neutral way of telling someone to read the docs is "read the docs".

Even better, do like FredK did, and provide a useful hint.

Well - the F can stand for "Fine" as well. Or a few less used
words starting with F.

And even if Lew actually meant "Fucking", then I find it
difficult to see as being abusive given the context of
internet year 2013. I am not even sure that I would call
it rude. I would call it harsh.

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top