Code Monkey home page Code Monkey logo

annotate-extension's Introduction

A rough timeline of my obsession with making software

2020-today

Still a hobby developer, I'm now focusing on building 3D games and VR / AR / XR experiences & tools, using C# and Unity almost exclusively. I've recently created apps for Quest 2 and games for PC/Mac.

2017-2020

During these years I stepped away from web development and spent a lot of my personnal time learning Machine Learning with Python and Jupyter notebooks. It was a great experience from a learning point of view, even though I'm afraid I didn't build/release anything special out of it !

2012-2017

Now working full time at Adobe, I went back to just being a hobby developer. During these years I mostly coded for fun in javascript - both front end and nodejs - often in the context of developing plug-ins and extensions for various Adobe Creative Cloud apps, and other developer tools in the creative coding ecosystem.

2002-2012

I started my career with Flash and ActionScript, as a consultant, teacher and publisher. For all the bad press it got later, Flash started as an incredible creative tool, open to a diverse range of skills and backgrounds, which is probably why the community was so amazing.

annotate-extension's People

Contributors

ajorquera avatar aonic avatar claudiojs avatar davidderaedt avatar jolson474 avatar mbaez avatar robso86 avatar semigradsky avatar

Stargazers

 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

annotate-extension's Issues

Not working inside your own extension

I tried it on your own main.js and it only shows me your no function found alert

 function generateComment(fname, params,returnsValue, prefix) {

        var output = [];
        output.push("/**");

        // Assume function is private if it starts with an underscore
        if (fname.charAt(0) === "_") {
            output.push(" * @private");
        }

        // Add description
        output.push(" * Description");

        // Add parameters
        if (params.length > 0) {
            var i;
            for (i = 0; i < params.length; i++) {
                var param = params[i];
                output.push(" * @param {type} " + param + " Description");
            }
        }

        if (returnsValue) output.push(" * @returns {type} Description");

        // TODO use if 'return' is found in the function body?
        //output += " * @return {type} ???\n";
        output.push(" */");

        return prefix + output.join("\n" + prefix) + "\n";
    }

Use a Javascript parser instead of reqular expressions

Hi David,
Referring to #27 I think too, that the design of the extension should be rethought. As a first suggestion I'd like to propose to switch to a JS parser to identify functions (and possibly other things to annotate) instead of using regular expressions.
Codemirror uses acorn.js anyway for code completion, so why not use it too to generate the jsdocs? What's you opinion on that?

As a start I wrote my first brackets plugin from scratch which uses acorn.js and can be found at:
https://github.com/Hopiu/brackets-annotate-extension

(Of course I won't publish the plugin in the extension repo)

Not finding functions

When I run annotate, I always get the alert "no functions found". I consistently use expressions (foo = function() {}) rather than function declarations. Is that the reason, or is something else going on?
Thanks,
Robert

prototype function

the extension doesn't work for prototype function :

MyObject.prototype.myFunction = function (pram1, param2) { //content };

Generate JSDoc after typing /**

A feature of my current editor, WebStorm, is that if I type /** and hit enter just before the start of a function it generates the JSDoc info.

I find this very useful because, there is no need to break my workflow by going to the menu, and no need to remember yet another obscure shortcut to invoke the annotator :)

Ctrl + Alt + A doesnt work

and i have no clue why :-(
i am working on windows 7, current brackets sprint is 28.
Annotate form the Edit menu works.

Slow in this version

I installed the extension from the registry and saw that this is a newer version which provides a multiline description but the extension is unfortunately really slow in this version :/

Description exists

It would be great to check if a description already exists. Checking if there is a

/**

*/

directly in front of the function name

return values are not processed

The extension currently only looks for the function signature to generate the annotation, ignoring its body, including any return statement.

Bad fomatting

If you try to create a JSDoc annotation with a function that has text preceding it, it will format the annotation with the same characters.

;(function (params) {}());

Will create

;(/**
;( * Description
;( */

Design of project

Hello my name is Andrew and I have a few ideas I will like to discuss. This the first project I have contributed, so maybe I'm wrong in a lot of things.

*Design pattern: I have checked the code and I don't see a clear pattern of design. So, maybe we can discuss about the design.

*Discussion over each pull: maybe before the owner of the project makes a merge, he can give at least a few days to discuss about the code. This way, contributors can give their opinions about it.

*Create a branch for development: maybe the owner can make a develop branch. This way we can test that nothing breaks before releasing the new version.

*Unnecessary pull request: I have seen sometimes that people will make pull requests just for minor changes that doesn't really make a difference.

I think we can work better and more efficient if we all put our heads together than just working by ourselves. If anyone has other ideas or think I'm wrong, please feel free to post.

function code is corrupted

  1. I start with this code:
function getHand(svgDoc, id)
{
}
  1. If I put IP on line before function definition, I get this:
/**
 * Description
 * @param {type} svgDoc Description
 * @param {type} id Description
 */
function getHand(svgDoc, id)
{
}
  1. But, if I place IP at char 0 on same line as "function getHand(svgDoc, id)", that line of code is removed:
/**
 * Description
 * @param {type} svgDoc Description
 * @param {type} id Description
 */
{
}

Result:
My code is corrupted

Expected Result:
Code should not be removed. Either comment is added, or nothing.

Step Through Editing

I wish the tool would step you through all the parts of creation like Sublime's DocBlockr does. So the description would be highlighted first for you to edit and then it with each subsequent [tab] it would highlight the next field to edit.

Does not work with function expressions

No annotation is generated if function is an expression, ie with the form:

var myFunction = function(){
};

Annotations are only generated for function declarations, ie with the form

function myFunction() {
}

JSDoc Annotation in one row

I press keyboard shortcut and received that:
111

Windows8, Brackets sprint 35 experimental build 0.35.0-10897 (release 445deaaa9)
I installed only "Annotate" and "Themes for Brackets" plugins.

Lost character

For this code:

function ValidationFor($filter) {
}

extension generates:

/**
* Description
* @param {type} filter Description
*/
function ValidationFor($filter) {
}

Annotations are not indented

Annotations are inserted starting from the current cursor position and no indentation is generated, which results in a lesser readable code.

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.