Git Product home page Git Product logo

alibaba / structure-view Goto Github PK

View Code? Open in Web Editor NEW
33.0 10.0 15.0 540 KB

Structure View for ATOM editor, just like Outline view in Eclipse or Structure tool window in IDEA / WebStorm, provides quick navigation for symbols of source code with a tree view.

Home Page: https://atom.io/packages/structure-view

License: MIT License

JavaScript 92.91% CSS 4.47% HTML 2.61%
atom-package ctags structure-viewer outline tree-view symbols navigation atom taglist tagbar

structure-view's Introduction

Structure-View

Structure View for ATOM editor, just like Outline view in Eclipse or Structure tool window in IDEA / WebStorm, provides quick navigation for symbols of source code with a tree view.

demo

Pull requests are welcomed! Raise an issue here if you have any question.

Table of Contents

Installation

Two ways to install:

  • From command line:
apm install structure-view
  • From Atom editor:

    Settings/Preferences ➔ Packages ➔ Search for structure-view

Language Support

Lanuage File Extensions AST Parser
HTML .html , .njk , .xtpl , ... htmlparser2
CSS .css css
Javascript .js esprima / jsctags
Others .coffe , .less , .scss , .sass , .yaml , .yml , .md , .markdown , .mdown , .mkd , .mkdown , .ron , .json , .cson , .gyp , .c , .cpp , .mm , .py, .rb , .php , .module , .go , .pl , .pod , .es6 , .jsx , .es , .hx , .nim , .rs , .lc , .livecodescript , .irev , .sql , .bdy , .spc , .pls , plb , .ddl , .pks , .pkb , .sce , .sci , .m , .kla , .ini ctags

Usage

Commands

You can find all these commands by Command Palette.

  • Structure View: Hide
  • Structure View: Show
  • Structure View: Toggle

Shortcut

  • Ctrl-o : Structure View: Toggle

Operations

  • Single click: navigation of tag
  • Double click: collapse/expand the tree of selected tag

Settings

Feature Description Default
Show Variables If you don't need variables in the structure of file, just uncheck this config. true
Show Properties If you don't need properties in the structure of file (such as CSS), just uncheck this config. true
Double Click To Fold Tree View If this value is false, then select tag and toggle the tree view would all by single click. true
Autoscroll from Source (Beta) Enable this feature to have Atom automatically move the focus in the Structure View to the node that corresponds to the code where the cursor is currently positioned in the editor. false

Icon alphabet meaning

HTML
  • <> : Element
CSS
  • S : Selector
  • P : Property
Javascript
  • C : Class
  • I : Import
  • F : Function
  • M : Method
  • V : Variable

Others

  • U : Unknown

TODO

See TODO.md.

Contributing

License

MIT

structure-view's People

Contributors

alios-studio avatar gerdus avatar gitarian avatar joouis avatar mgielda avatar svoop 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  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

structure-view's Issues

Click Tree view, scroll the selected item to the middle of the view

I noticed when tree view item is clicked, if the item is in the current view, there is no scroll. However, still need to scan the whole view to find the item.
I'd propose to scroll the selected item to middle of the view, unless it's already scrolled down to the bottom.

I guess the code is here:

if ((elemTop < viewTop) || (elemBottom > viewBottom)) ret.distance = scrollTop + elemTop - viewTop;

Install of 0.1.4 requires Git?

Why do I need to have Git installed in order to install Structure-View?

Installing “[email protected]” failed.Hide output…
Failed to install structure-view because Git was not found.

The structure-view package has module dependencies that cannot be installed without Git.

You need to install Git and add it to your path environment variable in order to install this package.

You can install Git by downloading, installing, and launching GitHub for Windows: https://windows.github.com

Run apm -v after installing Git to see what version has been detected.

Gitarian

How to support additional languages?

I thought I might take a crack at implementing Python, but I'm struggling to figure out how to get the package to recognize a new language. I made a python.js file with the obligatory parseFile(), that includes a Python-parsing library (sarama.js) and is supposed to spit out dummy content to the tree while giving me a log of the ast object so that I can take a look at it and see how it's built. However, when I toggle structure-view in my test Python file, it appears to load forever. What am I missing?

No tag in the file - export modifier for class

In some of my new javascript code I use the new export modifier for class definition. This results in structure-view giving "No tag in the file.";

minimal example code:
export class Example { }

#include in Markdown code-segment

Hi,

unfortunately code-segments are parsed to in Markdown, to find the basic headlines. The result is:

only one Header

#include <stdio.h>
#include Test.h

...

results in three headline ...

Regards ...

Support for more languages?

It may be worth joining efforts on the same plugin rather than scattering through various projects.
The .ctags version of symbols-tree-nav has been patched several times, maybe you could take it to update the one of structure-view to better support languages (and/or support more)?

symbols-tree-view, as well as symbols-tree-nav, uses an external binary to parse the files, I think the support for several languages is only due to this binary even if the current version is broken for several languages in symbols-tree-view. For instance there's no regex for python in the .ctags files of symbols-tree-view (nor symbols-tree-nav), yet python is supported. I don't understand completely how you parse files (looks like everything is done in javascript?), but maybe an external binary would allow a support for more languages?

At Cannot find module 'jquery'

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.33.1 x64
Electron: 2.0.16
OS: Unknown Windows version
Thrown From: structure-view package 0.2.1

Stack Trace

Failed to activate the structure-view package

At Cannot find module 'jquery'

Error: Cannot find module 'jquery'
    at Module._resolveFilename (module.js:543:15)
    at Module._resolveFilename (~/AppData/Local/atom/app-1.33.1/resources/electron.asar/common/reset-search-paths.js:35:12)
    at Function.get_Module._resolveFilename (~/AppData/Local/atom/app-1.33.1/resources/app/static/<embedded>:11:154667)
    at Module.require (/app.asar/static/index.js:40:43)
    at require (~/AppData/Local/atom/app-1.33.1/resources/app/static/<embedded>:11:145974)
    at /packages/structure-view/lib/main.js:2:43)
    at /packages/structure-view/lib/main.js:77:2)
    at Module.get_Module._compile (~/AppData/Local/atom/app-1.33.1/resources/app/static/<embedded>:11:146684)
    at Object.value [as .js] (~/AppData/Local/atom/app-1.33.1/resources/app/static/<embedded>:11:150231)
    at Module.load (module.js:561:32)
    at tryModuleLoad (module.js:504:12)
    at Function.Module._load (module.js:496:3)
    at Module.require (/app.asar/static/index.js:47:45)
    at require (internal/module.js:11:18)
    at customRequire (~/AppData/Local/atom/app-1.33.1/resources/app/static/<embedded>:1:639369)
    at Package.requireMainModule (~/AppData/Local/atom/app-1.33.1/resources/app/static/<embedded>:11:3041061)
    at Package.activateNow (~/AppData/Local/atom/app-1.33.1/resources/app/static/<embedded>:11:3029195)
    at activationCommandSubscriptions.add.commandRegistry.onWillDispatch.n (~/AppData/Local/atom/app-1.33.1/resources/app/static/<embedded>:14:1717)
    at Function.simpleDispatch (~/AppData/Local/atom/app-1.33.1/resources/app/static/<embedded>:11:1190759)
    at Emitter.emit (~/AppData/Local/atom/app-1.33.1/resources/app/static/<embedded>:11:1192200)
    at CommandRegistry.handleCommandEvent (~/AppData/Local/atom/app-1.33.1/resources/app/static/<embedded>:11:349666)
    at CommandRegistry.dispatch (~/AppData/Local/atom/app-1.33.1/resources/app/static/<embedded>:11:348509)
    at AtomEnvironment.dispatchContextMenuCommand (~/AppData/Local/atom/app-1.33.1/resources/app/static/<embedded>:1:669106)
    at EventEmitter.t (~/AppData/Local/atom/app-1.33.1/resources/app/static/<embedded>:1:676573)
    at emitThree (events.js:136:13)
    at EventEmitter.emit (events.js:217:7)

Commands

     -0:06.4.0 structure-view:toggle (div.line)

Non-Core Packages

What distinguishes this from symbols-tree-view and its derivatives?

Compared to the (seemingly original) symbols-tree-view package, I'm not sure if I can see any obvious differences in functioonality, besides the fact that the other package might take another package that fixes some issues with it. (I don't eve know if these are necessary anymore)

So why structure-view over the alternatives? Even if it's just the code owners personal opinion.
Don't want to come off entitled, I like both packages and just am obsessed with details when things are forked or accomplish the same goal #

Selecting item in Structure View navigates to wrong spot with code folding

I'm working with Java code and I noticed this issue:

Selecting an item from within the Structure View was moving my navigation inside the editor, as expected. However, it was not landing on the method declaration line. It was after I noticed that my import lines had been folded, and then unfolded them, that the navigation lands on the proper spot.

If this is a function of another package, I apologize. Please let me know and I'll open an issue there.

Atom: 1.30.0 x64 (Windows)
structure-view: 0.2.1
ide-java: 0.8.3

Install blocked in setting panel

I tried to install this package a whole day, but it blocked for very long time. I tried to install other atom packages, but never seen this blocking phenomenon.
screen shot 2017-09-24 at 12 05 16 pm

Unintuitive toggle behavior

Atom 1.34.0
macOS High Sierra 10.13.6
structure-view 0.2.1

Toggling the structure-view seems quite unintuitive.
By default, it seems to open in a right pane. Usually Git and Github tabs are open on the right as well. Keeping that in mind, I have trouble in some use cases.

Case 1: Structure-view is already open and is focused (toggle works as expected).
Case 2: The structure-view is closed but the right pane is open. Toggle closes the right pane first, and it requires another toggle to open the structure-view. Expected behavior: it should open the structure-view with directly on the right pane.
Case 3: The structure-view is open, the right pane is open, but it's focused on something else (such as the git tab). The same as Case 2, the toggle first closes the pane and reopen with another toggle. Expected behavior: it should change the focus onto the structure-view tab with one toggle.

By "toggling" it's expected to either open or close. I don't think it makes sense to toggle twice to open. Moreover, it shouldn't close the pane where structure-view is not even present.

Can't install

Atom 1.34.0, Win 7

When I try to install this package, it animates "Install" button for some time, then animation stops and that's all. The package is not installed. Tried several times, with Atom restarting as well.

TypeScript

I recently found this package, and I'd like to say great job! but I've been working a lot and I recently moved my files to TypeScript instead of JS for error checking and auto-completion in this thing I'm making. If you could, could you also include .ts files with structure-view, perhaps similarly to JS? Would be great.

AngularJS v1.6.4: No tag in the file.

I'm given No tag in the file. when using this package in my AngularJS controller files. Here's a short preview of what one of my files looks like:

/*jslint browser: true, devel: true*/
/*global $ */

window.app.controller('alerts', ['$scope', '$http', function alerts($scope, $http) {
    "use strict";
    console.log('alerts controller');

    $scope.alerts = [];

    function foo() {
        alert('bar');
    }

    $http.get('api/dash/getAlerts.php').then(function (response) {

        if (!$rootScope.checkResponse(response)) {
            return false;
        }

        $scope.alerts = response.data.alerts;

    }, function (response) {
        console.error(response);

        if (confirm("The server encountered a temporary error and could not complete your request. Do you want to reload to try again?")) {
            window.location.reload();
        }
    });
}]);

Add settings to hide any available types

Hello

Adding settings to hide any possible type could be useful. Each user has different needs or preferences, some might want to see imports, some not. Same goes for all the other types.

I've seen this has been implemented for variables and properties, would be great to have it for every type.

Cheers

Git required to install?

I noticed this package failed to install for me because it requires git. Since git is now included in Atom, I wonder if this can be avoided? Totally just a long shot, but it would be nice to not have to install git when I don't need to as I use Atom and GitKraken for my git clients. Thanks!!

Collapse functions

It would be nice to be able to specify tags to be collapsed by default in the settings.
For example, I would like to have all the Classes expended and all the Methods collapsed.

Capture d’écran 2019-09-26 à 23 42 42

Error installing package

Installing “[email protected]” failed.Hide output…

npm WARN deprecated [email protected]: Use uuid module instead
npm WARN deprecated [email protected]: This package is deprecated. Use Array.isArray.
npm ERR! git submodule -q update --init --recursive:       0 [main] sh (1832) C:\Program Files\SmartGit 7.0.3\git\usr\bin\sh.exe: *** fatal error - cygheap base mismatch detected - 0x33DC400/0x369C400.
npm ERR! git submodule -q update --init --recursive: This problem is probably due to using incompatible versions of the cygwin DLL.
npm ERR! git submodule -q update --init --recursive: Search for cygwin1.dll using the Windows Start->Find/Search facility
npm ERR! git submodule -q update --init --recursive: and delete all but the most recent version.  The most recent version *should*
npm ERR! git submodule -q update --init --recursive: reside in x:\cygwin\bin, where 'x' is the drive on which you have
npm ERR! git submodule -q update --init --recursive: installed the cygwin distribution.  Rebooting is also suggested if you
npm ERR! git submodule -q update --init --recursive: are unable to find another cygwin DLL.
npm ERR! git submodule -q update --init --recursive:       0 [main] sh 10316 fork: child -1 - forked process 1832 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
npm ERR! git submodule -q update --init --recursive: C:\Program Files\SmartGit 7.0.3\git\mingw32/libexec/git-core\git-submodule: fork: retry: No child processes
npm ERR! git submodule -q update --init --recursive:       1 [main] sh (21896) C:\Program Files\SmartGit 7.0.3\git\usr\bin\sh.exe: *** fatal error - cygheap base mismatch detected - 0x33DC400/0x337C400.
npm ERR! git submodule -q update --init --recursive: This problem is probably due to using incompatible versions of the cygwin DLL.
npm ERR! git submodule -q update --init --recursive: Search for cygwin1.dll using the Windows Start->Find/Search facility
npm ERR! git submodule -q update --init --recursive: and delete all but the most recent version.  The most recent version *should*
npm ERR! git submodule -q update --init --recursive: reside in x:\cygwin\bin, where 'x' is the drive on which you have
npm ERR! git submodule -q update --init --recursive: installed the cygwin distribution.  Rebooting is also suggested if you
npm ERR! git submodule -q update --init --recursive: are unable to find another cygwin DLL.
npm ERR! git submodule -q update --init --recursive: 1370882 [main] sh 10316 fork: child -1 - forked process 21896 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
npm ERR! git submodule -q update --init --recursive: C:\Program Files\SmartGit 7.0.3\git\mingw32/libexec/git-core\git-submodule: fork: retry: No child processes
npm ERR! git submodule -q update --init --recursive:       1 [main] sh (11396) C:\Program Files\SmartGit 7.0.3\git\usr\bin\sh.exe: *** fatal error - cygheap base mismatch detected - 0x33DC400/0x331C400.
npm ERR! git submodule -q update --init --recursive: This problem is probably due to using incompatible versions of the cygwin DLL.
npm ERR! git submodule -q update --init --recursive: Search for cygwin1.dll using the Windows Start->Find/Search facility
npm ERR! git submodule -q update --init --recursive: and delete all but the most recent version.  The most recent version *should*
npm ERR! git submodule -q update --init --recursive: reside in x:\cygwin\bin, where 'x' is the drive on which you have
npm ERR! git submodule -q update --init --recursive: installed the cygwin distribution.  Rebooting is also suggested if you
npm ERR! git submodule -q update --init --recursive: are unable to find another cygwin DLL.
npm ERR! git submodule -q update --init --recursive: 3655884 [main] sh 10316 fork: child -1 - forked process 11396 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
npm ERR! git submodule -q update --init --recursive: C:\Program Files\SmartGit 7.0.3\git\mingw32/libexec/git-core\git-submodule: fork: retry: No child processes
npm ERR! git submodule -q update --init --recursive:       1 [main] sh (20572) C:\Program Files\SmartGit 7.0.3\git\usr\bin\sh.exe: *** fatal error - cygheap base mismatch detected - 0x33DC400/0x32DC400.
npm ERR! git submodule -q update --init --recursive: This problem is probably due to using incompatible versions of the cygwin DLL.
npm ERR! git submodule -q update --init --recursive: Search for cygwin1.dll using the Windows Start->Find/Search facility
npm ERR! git submodule -q update --init --recursive: and delete all but the most recent version.  The most recent version *should*
npm ERR! git submodule -q update --init --recursive: reside in x:\cygwin\bin, where 'x' is the drive on which you have
npm ERR! git submodule -q update --init --recursive: installed the cygwin distribution.  Rebooting is also suggested if you
npm ERR! git submodule -q update --init --recursive: are unable to find another cygwin DLL.
npm ERR! git submodule -q update --init --recursive: 7808612 [main] sh 10316 fork: child -1 - forked process 20572 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
npm ERR! git submodule -q update --init --recursive: C:\Program Files\SmartGit 7.0.3\git\mingw32/libexec/git-core\git-submodule: fork: retry: No child processes
npm ERR! git submodule -q update --init --recursive:       0 [main] sh (16204) C:\Program Files\SmartGit 7.0.3\git\usr\bin\sh.exe: *** fatal error - cygheap base mismatch detected - 0x33DC400/0x30AC400.
npm ERR! git submodule -q update --init --recursive: This problem is probably due to using incompatible versions of the cygwin DLL.
npm ERR! git submodule -q update --init --recursive: Search for cygwin1.dll using the Windows Start->Find/Search facility
npm ERR! git submodule -q update --init --recursive: and delete all but the most recent version.  The most recent version *should*
npm ERR! git submodule -q update --init --recursive: reside in x:\cygwin\bin, where 'x' is the drive on which you have
npm ERR! git submodule -q update --init --recursive: installed the cygwin distribution.  Rebooting is also suggested if you
npm ERR! git submodule -q update --init --recursive: are unable to find another cygwin DLL.
npm ERR! git submodule -q update --init --recursive: 15973325 [main] sh 10316 fork: child -1 - forked process 16204 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
npm ERR! git submodule -q update --init --recursive: C:\Program Files\SmartGit 7.0.3\git\mingw32/libexec/git-core\git-submodule: fork: Resource temporarily unavailable
npm ERR! git submodule -q update --init --recursive: 
npm ERR! git submodule -q update --init --recursive:       0 [main] sh (15216) C:\Program Files\SmartGit 7.0.3\git\usr\bin\sh.exe: *** fatal error - cygheap base mismatch detected - 0x358C400/0x32BC400.
npm ERR! git submodule -q update --init --recursive: This problem is probably due to using incompatible versions of the cygwin DLL.
npm ERR! git submodule -q update --init --recursive: Search for cygwin1.dll using the Windows Start->Find/Search facility
npm ERR! git submodule -q update --init --recursive: and delete all but the most recent version.  The most recent version *should*
npm ERR! git submodule -q update --init --recursive: reside in x:\cygwin\bin, where 'x' is the drive on which you have
npm ERR! git submodule -q update --init --recursive: installed the cygwin distribution.  Rebooting is also suggested if you
npm ERR! git submodule -q update --init --recursive: are unable to find another cygwin DLL.
npm ERR! git submodule -q update --init --recursive:       0 [main] sh 11172 fork: child -1 - forked process 15216 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
npm ERR! git submodule -q update --init --recursive: C:\Program Files\SmartGit 7.0.3\git\mingw32/libexec/git-core\git-submodule: fork: retry: No child processes
npm ERR! git submodule -q update --init --recursive:       0 [main] sh (16072) C:\Program Files\SmartGit 7.0.3\git\usr\bin\sh.exe: *** fatal error - cygheap base mismatch detected - 0x358C400/0x340C400.
npm ERR! git submodule -q update --init --recursive: This problem is probably due to using incompatible versions of the cygwin DLL.
npm ERR! git submodule -q update --init --recursive: Search for cygwin1.dll using the Windows Start->Find/Search facility
npm ERR! git submodule -q update --init --recursive: and delete all but the most recent version.  The most recent version *should*
npm ERR! git submodule -q update --init --recursive: reside in x:\cygwin\bin, where 'x' is the drive on which you have
npm ERR! git submodule -q update --init --recursive: installed the cygwin distribution.  Rebooting is also suggested if you
npm ERR! git submodule -q update --init --recursive: are unable to find another cygwin DLL.
npm ERR! git submodule -q update --init --recursive: 1074336 [main] sh 11172 fork: child -1 - forked process 16072 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
npm ERR! git submodule -q update --init --recursive: C:\Program Files\SmartGit 7.0.3\git\mingw32/libexec/git-core\git-submodule: fork: retry: No child processes
npm ERR! git submodule -q update --init --recursive:       1 [main] sh (20736) C:\Program Files\SmartGit 7.0.3\git\usr\bin\sh.exe: *** fatal error - cygheap base mismatch detected - 0x358C400/0x32FC400.
npm ERR! git submodule -q update --init --recursive: This problem is probably due to using incompatible versions of the cygwin DLL.
npm ERR! git submodule -q update --init --recursive: Search for cygwin1.dll using the Windows Start->Find/Search facility
npm ERR! git submodule -q update --init --recursive: and delete all but the most recent version.  The most recent version *should*
npm ERR! git submodule -q update --init --recursive: reside in x:\cygwin\bin, where 'x' is the drive on which you have
npm ERR! git submodule -q update --init --recursive: installed the cygwin distribution.  Rebooting is also suggested if you
npm ERR! git submodule -q update --init --recursive: are unable to find another cygwin DLL.
npm ERR! git submodule -q update --init --recursive: 3180279 [main] sh 11172 fork: child -1 - forked process 20736 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
npm ERR! git submodule -q update --init --recursive: C:\Program Files\SmartGit 7.0.3\git\mingw32/libexec/git-core\git-submodule: fork: retry: No child processes
npm ERR! git submodule -q update --init --recursive:       1 [main] sh (22760) C:\Program Files\SmartGit 7.0.3\git\usr\bin\sh.exe: *** fatal error - cygheap base mismatch detected - 0x358C400/0x330C400.
npm ERR! git submodule -q update --init --recursive: This problem is probably due to using incompatible versions of the cygwin DLL.
npm ERR! git submodule -q update --init --recursive: Search for cygwin1.dll using the Windows Start->Find/Search facility
npm ERR! git submodule -q update --init --recursive: and delete all but the most recent version.  The most recent version *should*
npm ERR! git submodule -q update --init --recursive: reside in x:\cygwin\bin, where 'x' is the drive on which you have
npm ERR! git submodule -q update --init --recursive: installed the cygwin distribution.  Rebooting is also suggested if you
npm ERR! git submodule -q update --init --recursive: are unable to find another cygwin DLL.
npm ERR! git submodule -q update --init --recursive: 7271814 [main] sh 11172 fork: child -1 - forked process 22760 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
npm ERR! git submodule -q update --init --recursive: C:\Program Files\SmartGit 7.0.3\git\mingw32/libexec/git-core\git-submodule: fork: retry: No child processes
npm ERR! git submodule -q update --init --recursive:       1 [main] sh (6376) C:\Program Files\SmartGit 7.0.3\git\usr\bin\sh.exe: *** fatal error - cygheap base mismatch detected - 0x358C400/0x362C400.
npm ERR! git submodule -q update --init --recursive: This problem is probably due to using incompatible versions of the cygwin DLL.
npm ERR! git submodule -q update --init --recursive: Search for cygwin1.dll using the Windows Start->Find/Search facility
npm ERR! git submodule -q update --init --recursive: and delete all but the most recent version.  The most recent version *should*
npm ERR! git submodule -q update --init --recursive: reside in x:\cygwin\bin, where 'x' is the drive on which you have
npm ERR! git submodule -q update --init --recursive: installed the cygwin distribution.  Rebooting is also suggested if you
npm ERR! git submodule -q update --init --recursive: are unable to find another cygwin DLL.
npm ERR! git submodule -q update --init --recursive: 15335163 [main] sh 11172 fork: child -1 - forked process 6376 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
npm ERR! git submodule -q update --init --recursive: C:\Program Files\SmartGit 7.0.3\git\mingw32/libexec/git-core\git-submodule: fork: Resource temporarily unavailable
npm ERR! git submodule -q update --init --recursive: 
npm WARN addRemoteGit ramitos/tern-jsx#bb32547 pre-existing cached repo C:\Users\Guilherme C. Souza\.atom\.apm\_git-remotes\git-github-com-ramitos-tern-jsx-git-bb32547-081c7c92 points to https://gitlab.com/gi-toolchain/atom-settings.git and not [email protected]:ramitos/tern-jsx.git
npm ERR! git clone --template=C:\Users\Guilherme C. Souza\.atom\.apm\_git-remotes\_templates --mirror [email protected]:ramitos/tern-jsx.git C:\Users\Guilherme C. Souza\.atom\.apm\_git-remotes\git-github-com-ramitos-tern-jsx-git-bb32547-081c7c92: Cloning into bare repository 'C:\Users\Guilherme C. Souza\.atom\.apm\_git-remotes\git-github-com-ramitos-tern-jsx-git-bb32547-081c7c92'...
npm ERR! git clone --template=C:\Users\Guilherme C. Souza\.atom\.apm\_git-remotes\_templates --mirror [email protected]:ramitos/tern-jsx.git C:\Users\Guilherme C. Souza\.atom\.apm\_git-remotes\git-github-com-ramitos-tern-jsx-git-bb32547-081c7c92: Host key verification failed.
npm ERR! git clone --template=C:\Users\Guilherme C. Souza\.atom\.apm\_git-remotes\_templates --mirror [email protected]:ramitos/tern-jsx.git C:\Users\Guilherme C. Souza\.atom\.apm\_git-remotes\git-github-com-ramitos-tern-jsx-git-bb32547-081c7c92: fatal: Could not read from remote repository.
npm ERR! git clone --template=C:\Users\Guilherme C. Souza\.atom\.apm\_git-remotes\_templates --mirror [email protected]:ramitos/tern-jsx.git C:\Users\Guilherme C. Souza\.atom\.apm\_git-remotes\git-github-com-ramitos-tern-jsx-git-bb32547-081c7c92: 
npm ERR! git clone --template=C:\Users\Guilherme C. Souza\.atom\.apm\_git-remotes\_templates --mirror [email protected]:ramitos/tern-jsx.git C:\Users\Guilherme C. Souza\.atom\.apm\_git-remotes\git-github-com-ramitos-tern-jsx-git-bb32547-081c7c92: Please make sure you have the correct access rights
npm ERR! git clone --template=C:\Users\Guilherme C. Souza\.atom\.apm\_git-remotes\_templates --mirror [email protected]:ramitos/tern-jsx.git C:\Users\Guilherme C. Souza\.atom\.apm\_git-remotes\git-github-com-ramitos-tern-jsx-git-bb32547-081c7c92: and the repository exists.
npm ERR! Windows_NT 10.0.16299
npm ERR! argv "C:\\Users\\Guilherme C. Souza\\AppData\\Local\\atom\\app-1.23.1\\resources\\app\\apm\\bin\\node.exe" "C:\\Users\\Guilherme C. Souza\\AppData\\Local\\atom\\app-1.23.1\\resources\\app\\apm\\node_modules\\npm\\bin\\npm-cli.js" "--globalconfig" "C:\\Users\\Guilherme C. Souza\\.atom\\.apm\\.apmrc" "--userconfig" "C:\\Users\\Guilherme C. Souza\\.atom\\.apmrc" "install" "C:\\Users\\GUILHE~1.SOU\\AppData\\Local\\Temp\\d-1171122-5980-flf6hq.wkorr1wcdi\\package.tgz" "--runtime=electron" "--target=1.6.15" "--arch=ia32" "--global-style" "--msvs_version=2015"
npm ERR! node v6.9.5
npm ERR! npm  v3.10.10
npm ERR! code 128

npm ERR! Command failed: git -c core.longpaths=true clone --template=C:\Users\Guilherme C. Souza\.atom\.apm\_git-remotes\_templates --mirror [email protected]:ramitos/tern-jsx.git C:\Users\Guilherme C. Souza\.atom\.apm\_git-remotes\git-github-com-ramitos-tern-jsx-git-bb32547-081c7c92
npm ERR! Cloning into bare repository 'C:\Users\Guilherme C. Souza\.atom\.apm\_git-remotes\git-github-com-ramitos-tern-jsx-git-bb32547-081c7c92'...
npm ERR! Host key verification failed.
npm ERR! fatal: Could not read from remote repository.
npm ERR! 
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
npm ERR! 
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\GUILHE~1.SOU\AppData\Local\Temp\apm-install-dir-1171122-5980-7l90pu.pok49529\npm-debug.log

Arrows the only trigger for TagTree toggling?

Hi,

what do you think about making the arrows (maybe the symbol letters as well) the only trigger for node collapse/expansion?
Currently every "click for jump" collapses the respective node which is a bit cumbersome, especially when there are deeper structures along this very descendent path.

Feature: Add a setting for unsorted listing

While many like the structure view to list the matches sorted by type and name, others prefer to see the matches unsorted in the order of appearance in the document.

For ctags, adding -u to the command arguments will do the trick.

Thanks for considering this feature.

(Btw, I've just submitted a PR #22 to add support for RSpec and MiniTest which makes much more sense if you can switch off sorting.)

No support for async functions in Javascript?

While structure view recognizes const f = async () => {} as a function, it doesn't appear to recognize async function() { }.

Is there a work-around?

Thanks.

/rr

structure-view: 0.2.1

Atom: 1.54.0
Electron: 6.1.12
Chrome: 76.0.3809.146
Node: v12.4.0

Can't handle Node.js files

The javascript parser does not support node.js files for some reason.

So, I recommend that tag-generator be allowed to fall back to CTAGS support when no tags are in the file. It's not great (flat; no regenerating tags on save) but it's something.

For my version I have adjusted the setting like so:

tag-generator.js:76::add:
if( !tags.list || Object.keys(tags.list).length <= 0 ) {
Gen = require('./tag-generators/universal');
//ctx.lang = 'universal';
tags = await Gen.parseFile(ctx); // tags contains list and tree data structure
// For inline script in HTML
if (tags.scriptNode && tags.scriptNode.length) await this.inlineScriptHandler(tags.scriptNode, ctx);
}

Picture archive

This issue is opened for saving pictures used in the repo.

Installation error

I get the following error when trying to install the package:

Failed to install structure-view because Git was not found.

The structure-view package has module dependencies that cannot be installed without Git.

You need to install Git and add it to your path environment variable in order to install this package.

You can install Git by downloading, installing, and launching GitHub for Windows: https://windows.github.com

Run apm -v after installing Git to see what version has been detected.

After I got the error the first time, I did install GitHub Desktop for Windows and added its path as an environmental variable, but I'm still getting the error.

apm -v outputs the following:

apm  1.19.0
npm  3.10.10
node 6.9.5 x64
atom 1.26.1
python
git
visual studio

Failed to activate the structure-view package

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.53.0 x64
Electron: 6.1.12
OS: Unknown Windows version
Thrown From: structure-view package 0.2.1

Stack Trace

Failed to activate the structure-view package

At Cannot find module 'jquery'
Require stack:
- C:\Users\sofia\.atom\packages\structure-view-master\lib\main.js
- C:\Users\sofia\AppData\Local\atom\app-1.53.0\resources\app.asar\static\index.html

Error: Cannot find module 'jquery'
Require stack:
- C:\Users\sofia\.atom\packages\structure-view-master\lib\main.js
- C:\Users\sofia\AppData\Local\atom\app-1.53.0\resources\app.asar\static\index.html
    at Module._resolveFilename (internal/modules/cjs/loader.js:627:15)
    at Module._resolveFilename (~/AppData/Local/atom/app-1.53.0/resources/electron.asar/common/reset-search-paths.js:41:16)
    at Function.get_Module._resolveFilename (~/AppData/Local/atom/app-1.53.0/resources/app/static/<embedded>:11:155481)
    at Module.require (/app.asar/static/index.js:61:43)
    at require (~/AppData/Local/atom/app-1.53.0/resources/app/static/<embedded>:11:146814)
    at /packages/structure-view-master/lib/main.js:2:43)
    at /packages/structure-view-master/lib/main.js:77:2)
    at Module.get_Module._compile (~/AppData/Local/atom/app-1.53.0/resources/app/static/<embedded>:11:147498)
    at Object.value [as .js] (~/AppData/Local/atom/app-1.53.0/resources/app/static/<embedded>:11:151046)
    at Module.load (internal/modules/cjs/loader.js:645:32)
    at Function.Module._load (internal/modules/cjs/loader.js:560:12)
    at Module.require (/app.asar/static/index.js:72:46)
    at require (internal/modules/cjs/helpers.js:16:16)
    at customRequire (~/AppData/Local/atom/app-1.53.0/resources/app/static/<embedded>:1:736531)
    at Package.requireMainModule (~/AppData/Local/atom/app-1.53.0/resources/app/static/<embedded>:11:3711337)
    at Package.activateNow (~/AppData/Local/atom/app-1.53.0/resources/app/static/<embedded>:11:3699321)
    at ~/AppData/Local/atom/app-1.53.0/resources/app/static/<embedded>:14:1879
    at Function.simpleDispatch (~/AppData/Local/atom/app-1.53.0/resources/app/static/<embedded>:11:1190051)
    at Emitter.emit (~/AppData/Local/atom/app-1.53.0/resources/app/static/<embedded>:11:1191492)
    at CommandRegistry.handleCommandEvent (~/AppData/Local/atom/app-1.53.0/resources/app/static/<embedded>:11:349897)
    at KeymapManager.dispatchCommandEvent (~/AppData/Local/atom/app-1.53.0/resources/app/static/<embedded>:11:1230852)
    at KeymapManager.handleKeyboardEvent (~/AppData/Local/atom/app-1.53.0/resources/app/static/<embedded>:11:1226986)
    at WindowEventHandler.handleDocumentKeyEvent (~/AppData/Local/atom/app-1.53.0/resources/app/static/<embedded>:11:284919)

Commands

     -0:54.8.0 application:reopen-project (div#add-projects-view.)
     -0:45.6.0 application:open-folder (div.tool-panel.tree-view)
     -0:13.6.0 structure-view:toggle (input.hidden-input)

Non-Core Packages

structure-view 0.2.1 
clang-format 2.0.8 
hey-pane 1.2.0 
highlight-selected 0.17.0 
structure-view 0.2.1 
structure-view 0.2.1 
symbols-tree-view 0.14.0 

show on startup

It seems that this does not remember the previously-used state and there is no option to automatically show on atom start. It would be great if I didn't have to manually activate this every time I launch atom.

python ctags

Hello,

would it be possible to implement the python ctags ? and eventually a python.js for better matching ?
I might be looking into it sometimes soon but it might be easier for somebody that knows the repo.

Thx

Inline JavaScript

Nice plugin!

Would love to have structure of inline javascript

<dom-module id="my-element">
  <template>
    <!-- etc -->
  </template>
  <script>
  // structure me!
  Polymer({
    is: 'my-element',
    method: function() {},
    _private: () => true,
  });
  </script>
</dom-module>

Great work!

Sort/Unsorted Option

Great Job with these extension.!!!!

I do not see/know how to sort/unsort the structure view. It kinda needs to be sorted so we can do a human visual search fast. I read there is a -u from the command line for unsorting but not very clear how to do this or the opposite. Could you explain. Regards

Error installing package

Having this error when trying to install the package:
npm WARN deprecated [email protected]: This package is deprecated. Use Array.isArray. npm WARN deprecated [email protected]: Use uuid module instead npm ERR! Error while executing: npm ERR! /usr/bin/git ls-remote -h -t ssh://[email protected]/ramitos/tern-jsx.git npm ERR! npm ERR! xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun npm ERR! npm ERR! exited with error code: 1

Incorrect class name display for c++ sources.

Structure-view displays a class name final corresponding to this source snippet:
class TitleScreen final.

The displayed class name should be TitleScreen, not final.

Also, namespaces should be parsed in the tree view, but it seems they are ignored. E.g.

namespace OpenRCT2
{
    class GameState;

    class TitleScreen final
    {

Should be shown as

NS OpenRCT2
     C GameState
     C TitleScreen
            F ... and so on

Keep options (collapse all, settings) frozen while scrolling

I'd like the options to be frozen while scrolling. Per my previous bug report, saving uncollapses all panes. If you have scrolled down to a later structure in structure-view, this presents a major workflow inconvenience. You have to scroll all the way up to the top structures just to collapse the panes again. Keeping the options frozen at the top will keep it so that you don't have to scroll to access these settings.

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.