Coder Social home page Coder Social logo

nst's Introduction

Code Browser -like extension for Komodo Edit

by Adam Łyskawa

Contributors:
See content/NST.js

PLEASE - UPDATE COMMENT IN content/NST.js, or I could miss your contribution
on ActiveState Community website! And I don't want to!

Since I'm too busy with my current work to update NST, please feel free to
update the code as you like, fix bugs, implement new features.

Then test it, e-mail me it works and I'll release it as new version
on ActiveState Community website.

You don't need to fork the project, if you need anything, like privileges,
just ask. I don't use GIT everyday, so I don't even know how to grant them,
but I'll find it out.

I would love NST to become community project. It's my "baby", but I can't
find time to develop it anymore. Maybe if I ever change my job to more
related with what NST does or how it works...

http://www.youtube.com/watch?v=dj2nqILbPdA

Thank you for all the support. Feel free to change this README too.

-----------
-- Notes --
-----------

Please don't change code formatting:
2 spaces for indentation, opening braces on the same line.

Or if you convinced 4 spaces indentation would look more
readable (well, we have bigger screens now) - change the indentation
globally in each file, let it be consistent at least.

Please document your changes using JSDoc syntax.

THANK YOU.

-------------------
-- License (BSD) --
-------------------
Copyright (c) 2010-2013, Adam Łyskawa
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
Neither the name of nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

nst's People

Contributors

abravetti avatar basti1253 avatar chalda-pnuzig avatar dingus9 avatar hongquan avatar htd avatar jgoguen avatar manhg avatar mudasobwa avatar pixxelfactory avatar sni avatar titobouzout avatar tormec avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nst's Issues

Add a release

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.

Request: Parsing "label" for PHP

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?

Files too long are not parsed

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.

adding support for YAML

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/

Severe lag on Komodo Edit 8.5

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.

Display Bug Chops off NST objects

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.

Komodo Edit 9 Support

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!

Specific string breaking NST list

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...

JavaScript accentued functions not listed

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

Node.js - Type - support

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,

perl: wrong nesting: balanced pairs of regex delimiters inside regex

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

perl: searching for subs inside quoted text, pod, after __END__

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~;

Does not list classes/methods of C# Code

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#?

Added experimental support for Tcl/Tk

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.

Version 0.61 fails to automatically render source tree

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.

function definition identification error

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

ruby: while loops/blocks not recognized

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/) ) {

Not working in Komodo Edit 10 with multiple tabs

When i have more than one files open,
the tree of the first file is displayed not correctly:

bildschirmfoto 2016-11-04 um 12 17 50

When i switch to the second tab, the tree of the first file remains, the second one is not displayed.

JavaScript: wrong tree, bug in regex parsing

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() {};

Javascript: Node.js / Express.js support

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

exception on Komodo 8.5

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:0

xslt parser performance

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

automatic location of the current line

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.

NST makes Komodo edit 10 crash

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.