javascript editor - parse pure object too

Feature requests
Post Reply
martin.dufka
Posts: 12
Joined: Sun Jan 10, 2010 7:10 pm

javascript editor - parse pure object too

Post by martin.dufka » Wed Apr 08, 2015 10:40 am

Hi Eric,

it would be nice if your javascript editor parse pure object file too, the same as file with object array.

Stand alone files in eclipse
1. [{x:'x',y:'y'}] - array is OK
2. {x:'x',y:'y'} - generates error:

Multiple markers at this line
- Syntax error on token ":", invalid
Semicolon_full
- 1 changed line

For example, I have got extjs tabpanel with items array, where every item has its own file.

tab_panel.phtml:
....,
items : [
//detail.phtml file
<?php echo $this->render('detail.phtml'); ?>,
// attach.phtml file
<?php echo $this->render('attach.phtml'); ?>
], ....

detail.phtml content:
{
title:'detail',
html:'detail'
}

attach.phtml content:
{
title:'Attach',
html:'attach'
}

eric_suen
Site Admin
Posts: 678
Joined: Wed Sep 28, 2005 7:00 am
Contact:

Re: javascript editor - parse pure object too

Post by eric_suen » Thu Apr 09, 2015 7:46 am

pure object is not valid js syntax, that should be json syntax, maybe use a json editor?

martin.dufka
Posts: 12
Joined: Sun Jan 10, 2010 7:10 pm

Re: javascript editor - parse pure object too

Post by martin.dufka » Thu Apr 09, 2015 8:04 am

Spket JSON Editor generates "Syntax error on token ":", invalid Semicolon_full" error on detail.phtml, attach.phtml files.

eric_suen
Site Admin
Posts: 678
Joined: Wed Sep 28, 2005 7:00 am
Contact:

Re: javascript editor - parse pure object too

Post by eric_suen » Fri Apr 10, 2015 5:57 am

Json Editor only has syntax highlighting, I don't think it has syntax check or code assist.

martin.dufka
Posts: 12
Joined: Sun Jan 10, 2010 7:10 pm

Re: javascript editor - parse pure object too

Post by martin.dufka » Fri Apr 10, 2015 9:10 am

so it would be nice to accept {} file similary as [{}] file in JS editor. : ))))

Spket JSON Editor really generates "Syntax error on token ":", invalid Semicolon_full" error. I see this with one's own eyes on kepler eclipse. : )))

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests