Git Product home page Git Product logo

brackets-outline-list's People

Contributors

brackets-io avatar cedced19 avatar edumardo avatar florian-r avatar giovannicalo avatar hirse avatar juice avatar mskocik avatar nishioka avatar omikorin avatar pelatx avatar yfwz100 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

brackets-outline-list's Issues

.jsx not recognised

Hi, is it possible to add .jsx to the recognised script. It is the same as JavaScript but for Adobe Application.

Thanks, this function list is what was missing from Brackets.

ES6 Support

The title is self explanatory. I understand that you're using regex to determine if a string is a function declaration, and the semantics of arrow functions introduce a high level of complexity, but browsers and JS environments are already starting to support arrow functions natively, so this extension should keep up with that.

Display error

snip20150211_2
snip20150211_3

Node.js, queryPersonObjectID is not a function, but brackets-outline-list also display in left window.

Support sort by name

Can you add sorting capability so I can sort by name the functions list. It is much easier for me to find specific function if the functions list is sorted.

Python support

I've become dependent on this extension (it's great!), but now that I have to write something in python it seems outline list doesn't work 😞

Could you please add outline support for python too?

Thank you!

Don't kill events globally

Along this lines, there's a few call to jQuery.off.

As the handler isn't specified, it unbind all others handlers from others extensions. For example, it makes Brackets-git unusable.

Mind a PR for this one?

Support suggestion for Stylus

I could not understand how to make a plugin for the Outline.
So, I opened this issue, as Stylus use, like to have the features as css.

Thanks =D

Highlight current function

When working with multiple larger functions in a file it would help if the current function you're working on in the editor was highlighted in the Outline.

I've made and example implementation build upon the most recent commit. It probably needs some optimalization, but it clearly shows what I mean.

CSS:

.outline-entry.active {
  background: #0F1114;
  font-weight: 700;
}

javascript:

var editor_lines = 0;

var onKeyActivity = function ($event, editor, event) {
  selectCurrentFunction(editor);
}

var onCursorActivity = function ($event, editor) {
  selectCurrentFunction(editor);
}

function selectCurrentFunction(editor) {
  var pos = editor.getCursorPos();


  if (editor_lines != editor.getLastVisibleLine())
  {
    console.log('changed');
    createList();
  }
  editor_lines = editor.getLastVisibleLine();

  var remove_entries = $("#outline-list ul li");
  remove_entries.removeClass('active');

  var entry = $("#outline-list ul li").filter(function() {
    var id = $(this)[0].id;
    var splitted = id.split('_');
    var line_start = splitted[splitted.length-2];
    var line_eind = splitted[splitted.length-1];
    return line_start <= pos.line && line_eind >= pos.line;
  });
  entry.addClass('active');
}


function updateOutline() {

    var currentEditor = EditorManager.getActiveEditor();
    $(currentEditor).on('keyup', onKeyActivity);
    $(currentEditor).on('cursorActivity', onCursorActivity);
    $(currentEditor).on('cursorActivity', onCursorActivity);

    showOutline();

    createList();
}

function createList() {
  var doc = DocumentManager.getCurrentDocument();
  if (!doc) {
      hideOutline();
      return;
  }

  var lang = languages[doc.getLanguage().getName()];
  if (!lang) {
      hideOutline();
      return;
  }

  var lines = doc.getText(false).split("\n");
  var list = lang.getOutlineList(lines, prefs.get("args"), prefs.get("unnamed"));

  if (prefs.get("sort") && lang.compare) {
      list.sort(lang.compare);
  }

  list.reverse();

  var last_line = 999999999;
  list.forEach(function (entry) {
    entry.end_line = last_line;
    last_line = entry.line - 1;
  });

  list.reverse();

  $("#outline-list ul li").remove();
  list.forEach(function (entry) {
    var $entry = $(document.createElement("li"));
    $entry.addClass("outline-entry");
    $entry.addClass(entry.classes);
    $entry.append(entry.$html);
    $entry[0].id = 'outline_line_' + entry.line + '_' + entry.end_line;
    $entry.click({
        line: entry.line,
        ch: entry.ch
    }, goToLine);
    $("#outline-list ul").append($entry);
    last_line = entry.line;
  });
}

Brackets crash after outline panel vertically resized.

Brackets version : Release 1.3 experimental build 1.3.0-16022 (release cd0a6aae5)
build timestamp: Fri Apr 24 2015 05:29:46 GMT-0700
plugin version : 0.5.1
reproduce : Open Brackets outline panel and resize it vertically.

Cant scroll outline in sidebar

On latest brackets, mac os x yosemite, can't scroll outline when attached to sidebar, works fine in the other mode though

Suggestion for autohide

I have suggestion. Can you do something what is in Sidebar Plus? I mean when i edit some file outline is hidden on right, but i can click on it when i want and select what i want and then when i click again in file to edit something and it hides again. As hidden i mean there are a small bar what you can expand. It could be awesome !

Height when shown on left panel

Hey there,

first thanks for this great plugin!

Let's come to the point: When you switch outline position to the left side and you don't maximize your window, you can't scroll down in the way you want to. At first nothing works, but in the second I just can scroll down to a specific position but not to the most bottom place. So few methods at the bottom are missing. If I increase the window height, they come back and appear.

Sometimes I don't want to have a to high height, so if this would work at this behaviour too, it would be perfect.

thumps up

php default parameters

I have problem, the functions like this:
public function findByStatusGreaterThan($status, $criteria = array())
with parameters with default value for example as array() are not listed in outline list.

Identation Dots disappear

Amazing extension!

As in you own screenshot to see, the identation dots disapear from the Code Editor.
Extra ScreenShot

Maybe related to #3

plugin can't list one method

First of all, thank you very much for this useful plugin!!

i have some kind of issue when listing one of my classes, this class contains this method:

public static function htmlSimplifyWord($text, $allowed_tags = '<h1><h2><h3><h4><h5><p><br><b><i><sub><sup><ul><ol><li>', $allowed_attributes = array('alt', 'href', 'title', 'rowspan', 'colspan', 'src', 'summary', 'class', 'id', 'name', 'title', 'target', 'nowrap', 'rel')) {}

This method is not listed in the plugin, I've copy pasted it in another classes and none could be listed.
I've seen the problem are the tags, removing them it works properly, just in case you need to know it!
Thank you for your work!

PHP missing functions

When i have for example function like:

public function setCalendarEntry(\XYZ\CoreBundle\Entity\CalendarEntry $calendarEntry = null)
    {
        $this->calendarEntry = $calendarEntry;

        return $this;
    }

then its not detected in outline, i guess its cuz of object with namespace in argument ?

CFML Support

Love this plugin! Nice work! Is there an easy way to add support to show methods within ColdFusion CFC files?

Methods all use the same format:

<cffunction name="myMethod">

     <cfargument name="myargument" />

</cffunction>

https://jsfiddle.net/do27jn5t/

PHP class support

Hello,

it should be awesome if you could implement PHP objects support to show outline of whole classes for example, something like code explorer in other softwares.
For example:

  • ClassName [extends Class]
    • $prop1
    • $prop2
    • $prop3
    • .... (methods)
  • ClassName2 [extends Class]
    • $prop1
    • $prop2
    • $prop3
    • .... (methods)

Outline is hidden after Project switch

The Outline List disappears after switching to another Project.

In my case, i switch to a different Project with the top left Project Button.
The Outline List hides, Brackets loads the previously opened Files, but the Outline List is now gone, even if the current selected file could use the Outline List.

A switch to another file and back again is a workaround.

Outline List should check after a Project Switch if the currently opened File in the Editor uses the Outline List.

Indented view

Especially for javascript, it would be much nicer to have an indented view, so it's easier to see functions defined inside another function.

Display class name (especially with PHP)

Hello,
Thank you for this plugin, it is very useful :)

I have a request: when I work with PHP files, every methods are listed like functions.
It would be nice to display it under the class name (or near, or whatever).

David

Feature request: Fake pragma mark

Know those handy pragma marks you can use in applications like Xcode that show op in the outliner? It really helps to group your functions and make searching through them easier. Could this be implemented with maybe a default comment pattern like a triple forward slash or something? Thanks!

JS Object properties that are functions

Would like to see in the outline list object (or perhaps just returned objects from a module?) properties that are functions.

Often modules will return an object of the form:

    return {
       function1: function(foo) {
           _doStuff();
       },
      function2: _doStuff2
    };

At the moment, the function1 will appear in the outline, but not function2. Would be great to have both.
Loving this extension, BTW!

Slowdown the screen display

Hi,
I saw a very important slowdown from keyboard to display on screen with this extension active...
I use a JS file which have a lot of comment...
Is it known issue ?

Support suggestion for Jade

I could not understand how to make a plugin for the Outline.
So, I opened this issue, as Jade use, like to have the features as html.

Thanks =D

Build a parser instead of using regexp to detect PHP code structure.

Currently, the outline is very limited. The function defined inside a class is not described properly. Each constructor in a PHP is defined as the same name. It may make users confused.

In order to support hierarchical code structure, I suggest a parser instead of using regexp to build such code structure.

Idea for supporting HTML

Here's an idea for supporting HTML.

It might be possible to support HTML by displaying "key" elements, like only the head, body, and first-level elements within the body, and then keep adding more nesting levels until the outline has become N items long at most. You could do a similar with for SVG.

Just an idea. Other/better ideas are welcome I'm sure.

Extension didn't work on Ubuntu

Hello!

I installed the extension in Ubuntu 14.04, I reloaded Brackets and then, when I try to use the extension, surprise!, didn't work (extension error). How can I solve that?

Thanks for your help :).

Functions with referenced params are ignored

In PHP a function declared with a referenced parameter is not shown in the outline sidebar.

// This won't be outlined
private static function getObject(&$item)

// This will be outlined
private static function getObject($item)

Does crash bracket with base64-encoding!

This plugin crashes brackets when using long base64-encoded images in e.g. an icons.css
Brackets version: Release 1.2 Build 1.2.0-15697 (release 8f82e2a97)
System: OSX

Doesn't understand LESS nesting

When in less file, nested styles shows as &.child while it should be #parent .something.
It renders it difficult to navigate, since I got many &:after and I cannot differ them. Is there a way around for this?

image

Organize JavaScript (ES5) function by "Class"

I would like to have javascript functions organized by "Class"

For example :

function Person(name,age) {
  this.name = name;
  this.age = age;
}
Person.prototype.sayHello = function() {
  console.log("Hi, my name is " + this.name);
};
Person.prototype.sayAge = function() {
  console.log("I am " + this.age + " years old");
};

Is it possible to organize them like this :

Person(name,age)
 - Person.sayHello()
 - Person.sayAge()

Extract problem

I think your plugin is awesome, but...
It is causing Adobe Extract not to load properly. I uninstalled your plugin and the Extract plugin icon showed back up on the right tool bar. Have posted at Extract repo too.
FYI

Auto-hide for unsupported files

Would be a nice touch if the Outline pane would auto-hide when editing a file for which it's unsupported, such as html, markdown (friendly hint ;)), htaccess, plain text, etc.

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.