Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Why the white spce has smaller size before right brace...
Why the white spce has smaller size before right brace... [message #665438] Thu, 14 April 2011 15:32 Go to next message
YI-JU  is currently offline YI-JU Friend
Messages: 4
Registered: April 2011
Junior Member
Hi all~

I've tried many formater setting, but I can't find out the solution. The problem I suffered is that the display of the right brace is not aligned well in eclipse. I use which space to replace tab with tab size = 4. Then one can imagine the format, take below as example.

class test {
    public:
        void test () {
            XXX;
        }
}

but in elipse, it shows
class test {
    public:
        void test () {
            XXX;
  } <= the alignment is displayed incorrect
}


How do I change the format to display correctly in eclipse. Thanks...
Re: Why the white spce has smaller size before right brace... [message #665471 is a reply to message #665438] Thu, 14 April 2011 17:17 Go to previous messageGo to next message
Deepak Azad is currently offline Deepak AzadFriend
Messages: 543
Registered: July 2009
Senior Member
On 4/14/2011 9:02 PM, YI-JU wrote:
> Hi all~
>
> I've tried many formater setting, but I can't find out the solution. The
> problem I suffered is that the display of the right brace is not aligned
> well in eclipse. I use which space to replace tab with tab size = 4.
> Then one can imagine the format, take below as example.
>
>
> class test {
> public:
> void test () {
> XXX;
> }
> }
>
> but in elipse, it shows
> class test {
> public:
> void test () {
> XXX;
> } <= the alignment is displayed incorrect
> }
>
>
> How do I change the format to display correctly in eclipse. Thanks...

Since you are using C++, you should ask this in CDT forum.
Re: Why the white spce has smaller size before right brace... [message #665532 is a reply to message #665471] Thu, 14 April 2011 23:10 Go to previous messageGo to next message
YI-JU  is currently offline YI-JU Friend
Messages: 4
Registered: April 2011
Junior Member
Hi ~

In fact, I'm using Java to write Android program. This is just a case no matter in what language. The formater of eclipse works for all language and I'm having trouble to setup the text format (code format) in eclipse, not in specific language. Thanks...

BR

Yi-Ju
Re: Why the white spce has smaller size before right brace... [message #665552 is a reply to message #665532] Fri, 15 April 2011 04:38 Go to previous message
Deepak Azad is currently offline Deepak AzadFriend
Messages: 543
Registered: July 2009
Senior Member
On 4/15/2011 4:40 AM, YI-JU wrote:
> Hi ~
>
> In fact, I'm using Java to write Android program. This is just a case no
> matter in what language. The formater of eclipse works for all language
> and I'm having trouble to setup the text format (code format) in
> eclipse, not in specific language. Thanks...
>
> BR
>
> Yi-Ju


> class test {
> public:
> void test () {
> XXX;
> } <= the alignment is displayed incorrect
> }

This is not valid Java code.

Plus for each language there is a different formatter. Why? Because each
language is different and has different rules and conventions.

FWIW, the following is formatted correctly by the Java formatter with
the default formatter profile.
class test {
public void test() {

}
}
Previous Topic:Major problems with Java kit and Eclipse
Next Topic:CSS and HTML aggregator
Goto Forum:
  


Current Time: Fri Apr 19 20:27:39 GMT 2024

Powered by FUDForum. Page generated in 0.02689 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top