color coding of text

Discussion in 'Java' started by don, May 31, 2013.

  1. don

    don Guest

    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?
     
    don, May 31, 2013
    #1
    1. Advertising

  2. don

    Joerg Meier Guest

    On Fri, 31 May 2013 10:38:51 -0400, don wrote:

    > 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

    --
    Ich lese meine Emails nicht, replies to Email bleiben also leider
    ungelesen.
     
    Joerg Meier, May 31, 2013
    #2
    1. Advertising

  3. don

    Guest

    , May 31, 2013
    #3
  4. don

    Roedy Green Guest

    On Fri, 31 May 2013 10:38:51 -0400, don <> wrote,
    quoted or indirectly quoted someone who said :

    >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


    --
    Roedy Green Canadian Mind Products http://mindprod.com
    Getting information off the Internet is
    like taking a drink from a fire hydrant.
    ~ Mitch Kapor 1950-11-01
     
    Roedy Green, May 31, 2013
    #4
  5. don

    FredK Guest

    On Friday, May 31, 2013 7:38:51 AM UTC-7, don wrote:
    > 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
    --
    Fred K
     
    FredK, May 31, 2013
    #5
  6. don

    Lew Guest

    On Friday, May 31, 2013 7:38:51 AM UTC-7, don 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. It would allow you to show a
    > programs [sic] structure nicely. Is there such a thing?


    RTFM:
    http://help.eclipse.org/juno/topic/org.eclipse.platform.doc.user/reference/ref-texteditorprefs.htm

    For more general information:
    http://lmgtfy.com/?q=Select color for highlighted text in Java IDE

    which query led me to the RTFM link.

    --
    Lew
     
    Lew, May 31, 2013
    #6
  7. don

    don Guest

    Not the highlight color, the *text* color!

    I bet you don't speak to people like that in person.
     
    don, May 31, 2013
    #7
  8. don

    Lew Guest

    On Friday, May 31, 2013 1:34:38 PM UTC-7, don wrote:
    > 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.

    --
    Lew
     
    Lew, May 31, 2013
    #8
  9. don

    don Guest

    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.
     
    don, Jun 1, 2013
    #9
  10. On 05/31/2013 03:25 PM, FredK wrote:
    > On Friday, May 31, 2013 7:38:51 AM UTC-7, don wrote:
    >> 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
    >

    Best answer.

    AHS

    --
    When a true genius appears, you can know him by this sign:
    that all the dunces are in a confederacy against him.
    -- Jonathan Swift
     
    Arved Sandstrom, Jun 1, 2013
    #10
  11. don

    Joerg Meier Guest

    On Fri, 31 May 2013 19:17:54 -0400, don wrote:

    > BTW, telling someone to "RTFM" is abusive.


    > Period.


    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

    --
    Ich lese meine Emails nicht, replies to Email bleiben also leider
    ungelesen.
     
    Joerg Meier, Jun 1, 2013
    #11
  12. don

    Joerg Meier Guest

    On Sat, 01 Jun 2013 09:06:47 +0100, lipska the kat wrote:

    > 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

    --
    Ich lese meine Emails nicht, replies to Email bleiben also leider
    ungelesen.
     
    Joerg Meier, Jun 1, 2013
    #12
  13. On 01.06.2013 10:06, lipska the kat wrote:
    > On 31/05/13 21:43, Lew wrote:
    >> On Friday, May 31, 2013 1:34:38 PM UTC-7, don wrote:


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

    >
    > 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

    --
    remember.guy do |as, often| as.you_can - without end
    http://blog.rubybestpractices.com/
     
    Robert Klemme, Jun 1, 2013
    #13
  14. On 06/01/2013 07:01 AM, Joerg Meier wrote:
    > On Fri, 31 May 2013 19:17:54 -0400, don wrote:
    >
    >> BTW, telling someone to "RTFM" is abusive.

    >
    >> Period.

    >
    > 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
    --
    When a true genius appears, you can know him by this sign:
    that all the dunces are in a confederacy against him.
    -- Jonathan Swift
     
    Arved Sandstrom, Jun 1, 2013
    #14
  15. On 06/01/2013 08:30 AM, Robert Klemme wrote:
    > On 01.06.2013 10:06, lipska the kat wrote:
    >> On 31/05/13 21:43, Lew wrote:
    >>> On Friday, May 31, 2013 1:34:38 PM UTC-7, don wrote:

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

    >>
    >> 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
    >

    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
    --
    When a true genius appears, you can know him by this sign:
    that all the dunces are in a confederacy against him.
    -- Jonathan Swift
     
    Arved Sandstrom, Jun 1, 2013
    #15
  16. don

    Lars Enderin Guest

    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:


    >> <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.

    >
    > 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.

    >> And in fact, I find most of the time Lew's
    >> postings are helpful - maybe not in an obvious way though. :)

    >
    > I'm happy for you.


    How gracious of you!

    >>> Your bizarre behavior lowers the tone of the group
    >>> get over yourself, you really are not that important.


    In your opinion.

    >> 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?

    >
    > 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.

    --
    Lars Enderin
     
    Lars Enderin, Jun 1, 2013
    #16
  17. don

    Lars Enderin Guest

    2013-06-01 21:04, lipska the kat skrev:
    > On 01/06/13 19:54, Lars Enderin wrote:
    >> 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.

    --
    Lars Enderin
     
    Lars Enderin, Jun 1, 2013
    #17
  18. don

    Arne Vajhøj Guest

    On 5/31/2013 11:56 AM, lipska the kat wrote:
    > On 31/05/13 15:38, don wrote:
    >> 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
     
    Arne Vajhøj, Jun 1, 2013
    #18
  19. On 5/31/2013 7:17 PM, don wrote:
    > 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.

    > Period.


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

    Arne
     
    Arne Vajhøj, Jun 1, 2013
    #19
  20. don

    Arne Vajhøj Guest

    On 6/1/2013 8:15 AM, Arved Sandstrom wrote:
    > On 06/01/2013 07:01 AM, Joerg Meier wrote:
    >> On Fri, 31 May 2013 19:17:54 -0400, don wrote:
    >>
    >>> BTW, telling someone to "RTFM" is abusive.

    >>
    >>> Period.

    >>
    >> 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.
    >>

    > 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
     
    Arne Vajhøj, Jun 1, 2013
    #20
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jon Maz
    Replies:
    14
    Views:
    880
    Mikhail Arkhipov (Microsoft)
    Oct 19, 2004
  2. Matt Adams
    Replies:
    0
    Views:
    931
    Matt Adams
    Aug 26, 2003
  3. calmar
    Replies:
    11
    Views:
    960
    calmar
    Feb 21, 2006
  4. Kamaljeet Saini
    Replies:
    0
    Views:
    500
    Kamaljeet Saini
    Feb 13, 2009
  5. Replies:
    7
    Views:
    412
    Mick White
    Feb 2, 2005
Loading...

Share This Page