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 162675 - Code formating: actions are not formatted after dragging it from Palette
Summary: Code formating: actions are not formatted after dragging it from Palette
Status: VERIFIED WONTFIX
Alias: None
Product: javafx
Classification: Unclassified
Component: Editor (show other bugs)
Version: 5.x
Hardware: Macintosh All
: P4 blocker (vote)
Assignee: Anton Chechel
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-15 08:57 UTC by Alexandr Scherbatiy
Modified: 2009-08-04 11:10 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandr Scherbatiy 2009-04-15 08:57:52 UTC
Steps to reproduce:

1. add the following source to the editor:
--------
import javafx.animation.KeyFrame;
import javafx.animation.Interpolator;

var a;

KeyFrame {
    values : [ a => 0.0 tween Interpolator.LINEAR ]
    time: 1s
}
-----------
2. After time: 1s press enter to add a new line (will automatically tab in for you)
3. Drag/drop Animation > Action into the new line

You get:

KeyFrame {
    values : [ a => 0.0 tween Interpolator.LINEAR ]
    time: 1s
        action: function() {
        
    }
    
}


The 'action' attribute is not formatted
Comment 1 Alexandr Scherbatiy 2009-04-15 08:58:12 UTC
 marina-netbeans-plugin ยป #81
Comment 2 Anton Chechel 2009-04-29 16:06:27 UTC
It is preformatted before and pasted correctly. Indent before is that 4 spaces what was there.
Comment 3 Alexandr Scherbatiy 2009-05-13 13:59:42 UTC
The indentation depends of a cursor position.

- Drag and Drop Timeline:
-------------------------------------------
Timeline {
    repeatCount: Timeline.INDEFINITE
    keyFrames : [
        KeyFrame {
            time : 1s
            canSkip : true
            
        }
    ]
}
-------------------------------------------
- Drag and drop Action under 'canSkip' attribute

The result is:
-------------------------------------------
        KeyFrame {
            time : 1s
            canSkip : true
                        action: function() {  // <-- wrong indentation
                
            }
 -------------------------------------------

If I drag and drop the action at the beginning of line the indentation is correct

Comment 4 Anton Chechel 2009-05-25 12:49:17 UTC
yes, because we have no context-aware reformatting at the moment
Comment 5 Alexandr Scherbatiy 2009-08-04 11:10:27 UTC
verified