htd / nst Goto Github PK
View Code? Open in Web Editor NEWNew Source Tree Komodo Addon
New Source Tree Komodo Addon
I know this plugin is dead, and I wonder if someone will read this one day, but still :
I noticed the method list was incomplete in one of my file :
I got only the 3 first methodes and then nothing.
I deleted line by line to find the cause, and it seems to be this line :
$dir = glob($dir.'/*ZZPFORM');
And more exactly these two combined characters : */
Deleting "/*", I got all my methods back in the list.
So there is probably a problem with the parser...
no sub "tst" in code tree:
print $ENV{m};
sub tst() {
}
I am using Komodo Edit version 11.1.1 on Windows 10. I have New Source Tree version 0.63. The "source" pane does not list any classes/methods/functions when a C# code file is opened. Is there a way to enable this for C#?
This works:
var MyObject = {
myFunction: function() {
}
}
This doesn't work:
var MyObject = {
myFunction: function myObjectFunction() {
}
}
Unfortunately this makes NST not work for my entire project :(
parsing this code:
sub test1 {
m{
\d{2}\s\d
}x;
}
NST generates exception (created illegal regex)
as result: no source tree for file and "wait" cursor
It would be really nice to get support for YAML.
I would love to write it myself, but I need some little help to begin with (I am a PHP developer, knowing also Javascript)
If you don't know YAML, see http://yaml.org/
Version 0.61 fails to automatically render source tree in Komodo Edit 6.1 when loading source code (tested with PHP, Javascript, HTML, XML).
When switching between tabs the source tree for the previous tab is rendered.
When the file is saved the source tree for the current file is rendered.
When clicking the "refresh" button the source tree for the current file is rendered.
Version 0.59 did not cause these issues in Komodo Edit 6.1.
I just wanted to bring back to your attention a bug report I made in the Active State comments.
In the source tree window, the objects in the tree are cut off about 40% too early. Its almost like NST thinks the window is much more narrow than it actually is.
This only happens in the NST window in my primary editor instance. If I open a new editor window, the NST display is correct there, that is, the elements span the entire width of the NST window.
Screenshots:
http://rcs-comp.com/tmp/nst1.png
http://rcs-comp.com/tmp/nst2.png
http://rcs-comp.com/tmp/nst3.png
http://rcs-comp.com/tmp/nst4.png
You have said you are not able to reproduce this. Its something I can't STOP reproducing :). I have a fresh install of Xubuntu 11.10, fresh install of Komodo Edit, and fresh install of NST.
If you are not able to reproduce, I'd be happy to setup a VM on one of our servers with the problem so you can troubleshoot.
Thanks.
Tried uninstalling and reinstalling. Source no longer an option for the toolbox/sidebar.
While and after showing the tree, every movement slows down.
In the code section:
if top_level_count == 2:
index = cat_nodes_list.index(cat_node)
default_category = cat_nodes_list[index - 1]
break
the line:
default_category = cat_nodes_list[index - 1]
Is interpreted as a function definition and gets listed in the source tree sidebar
Komodo Edit 7.1.4, build 11196
I think it worth to separate all parsers functions:
content
NST.js
overlay.xul
pane-nst.xul
parsers
python.js
...
In python.js
you will have your function:
(LineParserPython = function(document) {
// code
}());
Then, at the beginning of NST.js
import python.js
using:
xtk.load('chrome://NST/content/parsers/python.js');
see http://docs.komodoide.com/SDK/api/legacy/xtk#xtk_functions_load
Functions with accents in the name aren't listed.
I know it's not a good idea to use accents in functions/variables names...
Example :
function ajoutActivité() { ... };
Is not shown in the function list.
Version : 0.61.1
in this code
sub foo {
(1) / 2;
}
sub bar {
1;
}
only "foo" appears in source tree, and "bar" missed
The add-on doesn't works on latest version of Komodo Edit
in this code "<<" is "shift left" operator. not heredoc:
sub test1 {
1 << 2;
}
sub test_2 {
#
}
only the first sub shown in tree, but the second one must be shown too
I do not know how to add this to the code base (never used GIT or GitHub before), but I have added simple, yet incomplete, support for Tcl. Since version 7 of Komodo Edit this was missing but now I can finally update to Komodo Edit 9!
I just cannot find out how to also show the Tcl [proc] parameters in the source tree but maybe anyone here can help? Anyway, here’s the patched NST.xpi file:
http://www.typoscriptics.de/misc/NST-Tcl.xpi
Please include this into the code on GitHub if you find it useful.
this code parsed wrong
package test;
sub test1 {
return <<EOT;
'
EOT
}
sub test2 {
#
}
"test2" must be in tree too
For example, NST doesn't parse 'some key' property:
var obj = {
'some key': {},
somekey: {}
}
This works:
var MyObject = {
myFunction: function() {
}
}
This doesn't work:
var MyObject = {
myFunction: function myObjectFunction() {
}
}
Unfortunately this makes NST not work for my entire project :(
perl: searching for subs inside quoted text, pod, after END
In the following code "not_a_subX" are just quoted strings/documentation/data.
But NST shows it in source tree as subroutimes.
package Foo;
print q{sub not_a_sub};
print qq{sub not_a_sub2};
print <<'END_TEXT';
sub not_a_sub3
END_TEXT
=pod
sub not_a_sub4
=cut
m{sub not_a_sub5};
1;
__END__
sub not_a_sub6
screenshot:
http://files.codejumper.ru/nst-bug2.png
In real code this issue affects perl files with documentation and/or code for generating code.
There is more exotic ways, but them don't used in real code:
print q~sub not_a_sub~;
Do similarly to Atom: https://github.com/atom/symbols-view/blob/master/lib/tag-generator.coffee
in this code:
sub foo;
sub bar {
#
}
sub foo {
#
}
all functions must be on the same tree indentation level
PS: and again github code highlighter have the same bug
It does not work in php-classes when using type-hinting wich was introduced with php 7:
public function xyz(): bool
{
...
}
in this code only "One" in the source tree
One = function() {
this.foo = new bar(
/[/*]/
);
};
Two = function() {};
and "Two" is missed
but for this code both "One" and "Two" and the source tree:
One = function() {
this.foo = new bar(
/[/]/
);
};
Two = function() {};
EXCEPTION: properties is undefined
in line 1642
of chrome://nst/content/NST.js
STACK TRACE:
SourceTreeViewClass.prototype.getCellProperties@chrome://nst/content/NST.js:1643 [anonymous]@null:0in this code only "test1" shown in the source tree:
sub test1 {
255 / 2;
}
sub test2 {
#
}
and "test2" is missed
Files very long, like tkinter/__init__.py
which has almost 4000 lines, are not parsed and the symbols list is not built.
Tested with Komodo Edit 11.0.1 on Linux.
it does not works as expected in NST 0.59 / komodo edit 7.0.2, build 9923 ; tested on php a file:
instead of toggleing automatic tracking ( the function / class where the cursor is automatically highlighted when this is on ) clicking on this button perform a one-time update of the highlighted function (correctly) wether i'm switching it to on or off.
if I hit the reload button, the highlighted function is updated if this setting is on but this is not the behavior i expected.
in this code only "test1" shown in tree:
sub test1 {
/foo/s;
}
sub test2 {
#
}
and "test2" missed
Yesterday I let Komodo Edit auto-update to 8.5. Upon restart, I am finding that the entire Komodo Edit UI is laggy as long as NST ("Source") is selected in the right-hand sidebar. If I have the "Toolbox" selected, everything (eg. scrolling, typing, menu interaction) is snappy. But if I switch to NST ("Source"), there is severe lag while attempting any of those actions, so long as I'm also currently looking at a PHP file in the editor pane.
This is on Ubuntu, 64-bit.
Hi
First, thanks for this nice plugin ;)
For example in Node.js / Express.js (http://expressjs.com/guide.html) it is usual to write following:
app.get('/url1', function(req, res)
{
});
app.get('/url2', function(req, res)
{
});
app.post('/mypost', function(req, res)
{
});
Is it possible to list such constructs in the NST as for example get(url1), get(url2), post(mypost) ?
Thanks
Hi,
please add case 'Node.js': in getLineParser()
otherwise, no outline is there for files typed 'Node.js'
like this:
var getLineParser = function(self) {
switch (self.lang = d.language) {
case 'Node.js':
case 'JavaScript':
p = new LineParserJS(self.lang,
['name.prototype = {',
'*name = {',
'name : {'],
['id.prototype.name = function()',
'function name() {',
'*name = function() {',
'*name : function() {']);
break;
case 'ActionScript':
p = new LineParserJS(self.lang,
Komodo Edit version 7.1.*, has been around the entire time I've used NST.
edit:
Can anyone else confirm that simply adding
case 'Python3':
p = new LineParserPython();
break;
After case 'Python': fixes this?
Hi there, I'm the lead Komodo developer. We're currently preparing our 9.2 release which includes a package installer, allowing people to easily install packages (addons, macros, skins, etc) such as this one. For your "package" to be installable by user it needs to have a "release", which people can download.
Please consider adding a release, you can find out how by checking steps 3 through 4 on this page. Thank you!
Be sure to also update your install.rdf to reflect the latest version of Komodo that it is compatible with.
Regular expressions with paired delimiters can contain balanced pairs of that delimiters.
In this code:
package test;
sub test1 {
m{
\d{2}\s\d
}x;
}
sub test2 {
#
}
"test1" and "test2" must be on the same level (inside "test"),
but now only "test1" shown inside "test1" ("test2" on the same level with "test")
PS: github code highlighter parses this code wrong too
Wrong nesting for perl functions inside module.
For following code function "one" in NST nested inside module "Foo", but function "two" outside (must be inside)
package Foo;
sub one {
if ( $#_ ) {
1;
}
}
sub two {
1;
}
1;
screenshot:
http://files.codejumper.ru/nst-bug.png
Komodo Edit, version 7.0.2, build 9923, platform linux-x86
NST 0.59
At the moment this repository has two branches:
testing
basti1253-testing
Wouldn't it be better the rename the main one master
, in order to avoid confusing?
https://stackoverflow.com/questions/30590083/how-to-rename-a-remote-git-branch-name
Hi,
the rendering performance of the xslt parser is slow - if I'm opening a file (1000 lines) I notice a few seconds lasting gap till the file is displayed. It'd be very nice if xslt-support can be commented out till the parser is fast enough to handle serious file sizes.
best regards
Sebastian
This is more a feature-request than bug.
It is not compatible with the latest version of Komodo Edit.
Are there any plans to make it work with that?
Best regards and thanks for this exceptional plugin!
Hi,
There is a strange problem with this plugin :
It makes komodo crash at totally random times.
I'm on MacOS X, with Komodo 10.2.2.
I can observe this bug since the Komodo 9 > 10 update.
Sometimes can see a bug report explicitly calling NST as the source of the problem.
If I can catch it again i'll repost it here.
in this code only "test1" in the source tree:
sub test1 {
sort grep !/reg_date/, @_;
}
sub test2 {
#
}
and "test2" is missed
The Ruby parser does not increment the depth for 'while' loops, which causes the indention to be off for method names after a 'while' loop appears in the code.
Here's a patch:
1204c1204
< else if ( code.match(/^(if|unless|case)\b/) ) {
---
> else if ( code.match(/^(if|unless|case|while)\b/) ) {
It would be good to be able to parse based on "label" keyword in PHP to ease navigation. Conside the sample below:
/***
* ColorCode
*/
color_label: $code['ColorCode'] = array(
'R' => '255,0,0',
'G' => '0,255,0',
'B' => '0,0,255',
);
/***
* PriceCode
*/
price_label: $code['PriceCode'] = array(
'0' => 'FOC',
'50' => '$0.50',
'100' => '$1.00',
);
Or is there a way to remark a section inside comment for easy navigation?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.