This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 139032

Summary: Formatting for short functions
Product: javafx Reporter: Alexandr Scherbatiy <sunflower>
Component: EditorAssignee: Anton Chechel <manowar>
Status: VERIFIED FIXED    
Severity: blocker    
Priority: P4    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on: 155123    
Bug Blocks: 155841    

Description Alexandr Scherbatiy 2008-07-04 12:37:50 UTC
Steps to reproduce:

- Create a JavaFX Script file:
---------------------------------------------
function sqr ( x: Number ) {  x * x }
---------------------------------------------
- Format it
---------------------------------------------
function sqr ( x: Number ) {  
    x * x 
} 
---------------------------------------------

The suggestion is to not format functions that are written on one line.

The same is for short actions:
----------------------------------------------------------------
import javafx.ext.swing.*;

Frame {
    closeAction: function() { java.lang.System.exit( 0 ); }
}
----------------------------------------------------------------
Comment 1 Rastislav Komara 2008-07-07 17:07:13 UTC
There is no option like "Keep short functions inline" unfortunately. The formatting of document depends on Java
formatting settings. Well, maybe we should introduce some special options for JavaFX format but we are after freeze.
Switching into enhancement request. And lowering priority.
Comment 2 Rastislav Komara 2008-08-19 09:51:35 UTC
.
Comment 3 Rastislav Komara 2009-03-02 10:14:05 UTC
reassigning to new owner.
Comment 4 Anton Chechel 2009-03-19 18:23:38 UTC
fixed, old reformat has been disabled
Comment 5 Alexandr Scherbatiy 2009-04-02 12:31:27 UTC
verified