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 135166 - YAML editor does not handle YAML content
Summary: YAML editor does not handle YAML content
Status: RESOLVED DUPLICATE of bug 120590
Alias: None
Product: web
Classification: Unclassified
Component: YAML (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Torbjorn Norbye
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-15 17:18 UTC by jfurmankiewicz
Modified: 2008-08-29 09:26 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Error screenshot (57.33 KB, image/png)
2008-05-15 17:18 UTC, jfurmankiewicz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jfurmankiewicz 2008-05-15 17:18:03 UTC
I paste valid YAML into the YAML editor and it chokes on it.

I am guessing the editor does not handle YAML block literals correctly:
http://en.wikipedia.org/wiki/YAML#Newlines_preserved

Here is the YAML content:

JFrame:
    title: frame.title
    content:
        - JPanel:
            content:
                - JBSeparator: {name: sepName, text: header.name}
                - JLabel: {name: fNameLabel, text: label.firstName}
                - JTextField: {name: fNameField, onFocus: onFirstNameFocus, onFocusLost: onFirstNameFocusLost}
                - JLabel: {name: lNameLabel, text: label.lastName}
                - JTextField: {name: lNameField, onKeyPressed: onLastNameKeyPressed, onKeyReleased: onLastNameKeyReleased}
                - JLabel: {name: titleLabel, text: label.title}
                - JTextField: {name: titleField, onKeyTyped: onTitleKeyTyped}
                - JLabel: {name: dfLabel, text: label.displayFormat}
                - JComboBox: {name: dfCombo}
                - JLabel: {name: nickLabel, text: label.nickname}
                - JTextField: {name: nickField}
                - JBSeparator: {name: sepList, text: header.list}
                - JLabel: {name: labelEmail, text: label.email}
                - JTextField: {name: fieldEmail}                
                - JList: {name: textArea}
                - JButton: {name: addButton, text: button.add, actionCommand: add}
                - JButton: {name: deleteButton, text: button.delete, actionCommand: delete}
                - JButton: {name: editButton, text: button.edit, onAction: edit}
                - JButton: {name: advancedButton, text: button.advanced, actionCommand: advanced}
                - JButton: {name: okButton, text: button.ok, onAction: save}
                - JButton: {name: cancelButton, text: button.cancel, onAction: cancel}
            layout: |
                [pref]       [grow,100px]              [grow]               [pref]             
                sepName+*              
                >fNameLabel  fNameField=1  >lNameLabel lNameField+2=1
                >titleLabel  titleField=1  >nickLabel  nickField+2=1
                >dfLabel     dfCombo+*
                sepList+*
                >labelEmail  fieldEmail+3                                    addButton+1+4=3      
                textArea+4+3                                                 editButton=3         [grow]
                                                                             deleteButton=3
                                                                             advancedButton=3                          
                                  
                >okButton+*=2,cancelButton=2
Comment 1 jfurmankiewicz 2008-05-15 17:18:31 UTC
Created attachment 61439 [details]
Error screenshot
Comment 2 jfurmankiewicz 2008-05-15 17:19:34 UTC
Just want to mention that this content is properly parsed without issues by jvyaml and the Eclipse YAML editor:
http://code.google.com/p/yamleditor/

handles it without any issues either.
Comment 3 Petr Jiricka 2008-06-10 14:39:43 UTC
Adding Hanz to cc - Hanz, any ideas what the problem could be and how to fix it? Thanks.

Also changing category to languages/yaml.
Comment 4 Jan Jancura 2008-06-12 12:16:29 UTC
"|" is one of many features, that are not supported in our current version of YAML support. Not easy to fix it.
Comment 5 jfurmankiewicz 2008-06-12 12:54:48 UTC
I am sorry to hear that. Experience from past defects that I have filed for NB tells me that milestone of "future" means
basically "never". :-(

Comment 6 Jan Jancura 2008-06-16 13:56:29 UTC

*** This issue has been marked as a duplicate of 120590 ***
Comment 7 Torbjorn Norbye 2008-06-29 23:15:15 UTC
I have a new GSF-based YAML editor which I've sent to Jacek to see if it addresses his needs. If it does, I'll switch
NetBeans over to it unless there are any objections.
Comment 8 Jan Jancura 2008-06-30 12:04:35 UTC
Great! Do it asap.
Comment 9 jfurmankiewicz 2008-06-30 12:42:45 UTC
Tor, do I need NB 6.5dev for this? I tried installing it into my instance of NB 6.1 and it does not seem to do anything.
Any file with either .yml or .yaml extension does not seem to get recognized as such. It's just a regular notepad-style
editor.

I already had the Ruby pack installed...does that conflict with the new editor?
Comment 10 Torbjorn Norbye 2008-06-30 18:45:04 UTC
Ok, I've checked in. Jacek, you can get the new editor in build #2538 or later from
http://deadlock.netbeans.org/hudson/job/trunk/