FeaturesPluginsDocs & SupportCommunityPartners

NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Formatting

 
Post new topic   Reply to topic    NetBeans Forums -> PHP Users
View previous topic :: View next topic  
Author Message
4485670



Joined: 08 May 2009
Posts: 5

PostPosted: Tue May 12, 2009 12:31 pm    Post subject: Formatting Reply with quote

hi,

how does code formatting work in netbeans php.
i have i.e. this code:

Code:

public function foo
{ $this->greatMethod($bar); }


which should automatically turn to:

Code:

public function foo {
    $this->greatMethod( $bar );
}


how can i achieve this?
i see that there is formatting beneath options->editor, but this seems to be very rudimentary?

Thank you!
Back to top
View user's profile Send private message
Filip Zamboj
Posted via mailing list.





PostPosted: Tue May 12, 2009 2:23 pm    Post subject: Formatting Reply with quote

source -> format or alt+shift+f

how good formatting is depends on version you are using Smile. 67beta is
much better than 65

Regards,

Issuezilla HowTo: http://www.netbeans.org/community/issues.html
-------------
Filip Zamboj
Sun Microsystems



4485670 wrote:
Quote:
hi,



how does code formatting work in netbeans php.

i have i.e. this code:




Code:


public function foo

{ $this->greatMethod($bar); }







which should automatically turn to:




Code:


public function foo {

$this->greatMethod( $bar );

}







how can i achieve this?

i see that there is formatting beneath options->editor, but this seems to be very rudimentary?



Thank you!










Back to top
4485670



Joined: 08 May 2009
Posts: 5

PostPosted: Tue May 12, 2009 2:50 pm    Post subject: Re: Formatting Reply with quote

okay, but where do i set it up cause it will change:

Code:

public function foo
{ $this->greatMethod($bar); }


to:

Code:

public function foo { $this->greatMethod( $bar ); }


which should be:

Code:

public function foo {
   $this->greatMethod( $bar );
}
Back to top
View user's profile Send private message
Tomasz Slota
Posted via mailing list.





PostPosted: Tue May 12, 2009 2:51 pm    Post subject: Formatting Reply with quote

This particular use case is still not supported. Currently code
formatting is mostly about re-indenting lines. With a few exceptions the
PHP formatter won't split one line of code into several. We are planning
to improve it in the next release.

-TS


4485670 wrote:
Quote:
hi,



how does code formatting work in netbeans php.

i have i.e. this code:




Code:


public function foo

{ $this->greatMethod($bar); }







which should automatically turn to:




Code:


public function foo {

$this->greatMethod( $bar );

}







how can i achieve this?

i see that there is formatting beneath options->editor, but this seems to be very rudimentary?



Thank you!










Back to top
4485670



Joined: 08 May 2009
Posts: 5

PostPosted: Tue May 12, 2009 2:52 pm    Post subject: Reply with quote

oh okay, thanks Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> PHP Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB