aspose file tools*
The moose likes Cattle Drive and the fly likes Editor and indentation problems Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » This Site » Cattle Drive
Bookmark "Editor and indentation problems" Watch "Editor and indentation problems" New topic
Author

Editor and indentation problems

Manju Jain
Ranch Hand

Joined: Feb 08, 2001
Posts: 168
I am using notepad for java programs and indenting as per style guide. But copying the same into compose message box [ for submission of assignments ] creates a mess of my indentation.
Has anyone faced this problem?
Peter Gragert
Ranch Hand

Joined: Jan 16, 2001
Posts: 424
I assume that you are using < tab>characters?
If so, try what happens if you replace them by spaces.
Which mailprogram do you use, maybe that is the reason of
trouble?
Other suggestion:
Look at the 'editor' topic, there are so many (free too) possibilities to get 'editor-help' in formatting code.
(Marilyn added a space between < and tab> to prevent interpretation of <tab> as html code)
[This message has been edited by Marilyn deQueiroz (edited February 26, 2001).]
Peter Gragert
Ranch Hand

Joined: Jan 16, 2001
Posts: 424
Horrible: "tab" characters vanished in previous reply
I typed less tab greater and it vanished from posting.
Where do I (we) find info, about what is allowed, possible
in an 'reply' window?
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9052
    
  12
Peter,
At the top of each forum page is a little "faq" link which contains some information. Also some information is in the link at the left side of the "Your Reply" box when you are creating or editing a message.


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9052
    
  12
Originally posted by Manju Jain:
I am using notepad for java programs and indenting as per style guide. But copying the same into compose message box [ for submission of assignments ] creates a mess of my indentation.
Has anyone faced this problem?

The two most common reasons for indentation problems are:

1) using tabs instead of spaces for indentation
2) setting the email program for sending "html" or "rtf" instead of "plain text"

Also, some text editors will secretly change spaces to tabs without the consent or knowledge of the author.
Joe Von
Ranch Hand

Joined: Feb 22, 2001
Posts: 32
Personally I always use tabs when writing. (Mostly 'cause I'm lazy and get irked by counting spaces). Then when I'm done I do a global search/replace on \t and replace it with " ".
I dunno if that works with all editors, I use PFE (programmer's file editor) which is a pretty decent free editor. Its old and no-longer supported and I'm sure there are newer/flashier editors these days. But it gets the job done without getting in your way, so I like it.
Its available at: http://www.lancs.ac.uk/people/cpaap/pfe/
ryan burgdorfer
Ranch Hand

Joined: Jan 24, 2001
Posts: 219
Synedit simply rules. It has a tabs-to-spaces (and vice-versa) option, among *many* other features. Get it free from http://www.mkidesign.com


<UL TYPE=SQUARE><I><LI>Ryan Burgdorfer<BR><LI>Java Acolyte</I></UL>
Chris Stehno
Ranch Hand

Joined: Feb 26, 2001
Posts: 180
I highly recommend TextPad (www.textpad.com) and/or NetBeans IDE (www.netbeans.org) coding in Java. Both handle indentation and context highlighting very well.
------------------
Chris Stehno (Sun Certified Programmer for the Java 2 Platform)


- Chris Stehno, SCPJ
Beth Beardsley
Greenhorn

Joined: Mar 07, 2001
Posts: 9
I am having a similar problem and have about decided it is the mail program I'm using. Unfortunately I don't usually have the time to do these mailings from Outlook Express and usually use a remote site. To my knowledge there are no formatting options there. If you have a resident mail program you should be able to copy and paste from notepad and than format in your mail program.
Matthew Phillips
Ranch Hand

Joined: Mar 09, 2001
Posts: 2676
I use SynEdit as well and really like it. It gets my recommendation as well.
Matt


Matthew Phillips
 
 
subject: Editor and indentation problems