Identation problems [message #123242] |
Mon, 01 December 2003 11:38 |
Eclipse User |
|
|
|
Originally posted by: paulj.inet.com
Hi,
I'm working in a java unix project but I'm facing serious problems with
identation. Problem is that I am compiling the project on Windows using
Eclipse, but there are other very guys in the project that using the old
and ugly VI editor to work their codes on UNIX. All the files that I edit
have bad identation. I tried to convert the delimiters from windows to
unix, but its does not work! The problem seems to be beyong that due to
TAB characters.
Because of this very bad issue, whenever I finish changing anything, I
have to open the file on unix, using the vi just to check the identation
and usually it is all wrong. It is getting nightmare. I'm usually spending
the double of time I spent coding just fixing identation.
I'm also unable to view the files created on unix correctly on Eclipse.
Again, they appear with very identation. I can't explain why..
Is there any solution for this? How can I make the Eclipse Editor reflects
EXACTLY the identation of the file when accessed by a UNIX machine?
thanks and regards
Paul
|
|
|
Re: Identation problems [message #123347 is a reply to message #123242] |
Mon, 01 December 2003 15:47 |
Eclipse User |
|
|
|
Originally posted by: eclipse.tkilla.ch
Paul Jone wrote:
> I'm working in a java unix project but I'm facing serious problems with
> identation. Problem is that I am compiling the project on Windows using
> Eclipse, but there are other very guys in the project that using the old
> and ugly VI editor to work their codes on UNIX. All the files that I edit
> have bad identation. I tried to convert the delimiters from windows to
> unix, but its does not work! The problem seems to be beyong that due to
> TAB characters.
>
> Because of this very bad issue, whenever I finish changing anything, I
> have to open the file on unix, using the vi just to check the identation
> and usually it is all wrong. It is getting nightmare. I'm usually spending
> the double of time I spent coding just fixing identation.
>
> I'm also unable to view the files created on unix correctly on Eclipse.
> Again, they appear with very identation. I can't explain why..
>
> Is there any solution for this? How can I make the Eclipse Editor reflects
> EXACTLY the identation of the file when accessed by a UNIX machine?
Try to play with the preferences:
- Java->Code Formatter->Style: Use Tab as indentation character, Number
of spaces representing an indentation level
- Java->Editor->Tab Width
Also note that the comment formatter will currently always insert tabs
for indentation.
If more than just tabs are wrong, you should file a bug report with
exact steps to reprodce against jdt-text.
-tom
|
|
|
Re: Identation problems [message #123452 is a reply to message #123347] |
Mon, 01 December 2003 18:47 |
Eclipse User |
|
|
|
Originally posted by: olivier_thomann.ca.ibm.comNOSPAM
Le Mon, 01 Dec 2003 16:47:48 +0100, Tom Eicher <eclipse@tkilla.ch> a
écrit :
>Also note that the comment formatter will currently always insert tabs
>for indentation.
It should not be the case if you use the new formatter. See the work
in progress section of the Java preferences.
--
Olivier
|
|
|
|
Re: Identation problems [message #123632 is a reply to message #123619] |
Tue, 02 December 2003 10:14 |
Eclipse User |
|
|
|
Originally posted by: paulj.inet.com
Tom Eicher wrote:
> Olivier Thomann wrote:
> >>Also note that the comment formatter will currently always insert tabs
> >>for indentation.
> >
> > It should not be the case if you use the new formatter. See the work
> > in progress section of the Java preferences.
> Just the comment formatting; see
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=47491
> -tom
Thanks All!
The problem is exactly the one reported in the bug - the usage of TABS
instead of spaces.
I reproduced the problem by performing the following steps:
1) Created a file named Test.java
2) FTP the file to a directory located on a Windows machine.
3) Created a new project, pointing this directory as the source directory.
4) Edited the file by adding some comments idented with tabs.
5) FTP the file back to UNIX -> Identation was all wrong.
By allowing the user to use spaces instead of tabs the problem would be
solved.
I believe I will wait for the fix.
regards
Paul
|
|
|
Re: Identation problems [message #123952 is a reply to message #123242] |
Tue, 02 December 2003 20:58 |
Eclipse User |
|
|
|
Originally posted by: bob.objfac.com
Before you do anything else to the files, set your tab width to 8 and look
at them.
Bob Foster
"Paul Jone" <paulj@inet.com> wrote in message
news:bqf97s$ea5$1@eclipse.org...
> Hi,
>
> I'm working in a java unix project but I'm facing serious problems with
> identation. Problem is that I am compiling the project on Windows using
> Eclipse, but there are other very guys in the project that using the old
> and ugly VI editor to work their codes on UNIX. All the files that I edit
> have bad identation. I tried to convert the delimiters from windows to
> unix, but its does not work! The problem seems to be beyong that due to
> TAB characters.
>
> Because of this very bad issue, whenever I finish changing anything, I
> have to open the file on unix, using the vi just to check the identation
> and usually it is all wrong. It is getting nightmare. I'm usually spending
> the double of time I spent coding just fixing identation.
>
> I'm also unable to view the files created on unix correctly on Eclipse.
> Again, they appear with very identation. I can't explain why..
>
> Is there any solution for this? How can I make the Eclipse Editor reflects
> EXACTLY the identation of the file when accessed by a UNIX machine?
>
> thanks and regards
>
> Paul
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.04051 seconds