Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #11125
    urlwolf
    Member

    The Outline plugin is laughably bad.
    It gets fooled by things that are not the correct level often. Comments make it go bonkers. It fails to get the right code blocks.

    It’s a core part of emeditor for years. It surely has gotten some love (I see updates in emeditor showing new features for the plugin). How can it be so bad? It’s not even close to functional…

    #11151
    Antnee
    Member

    This is exactly why I’m here! We use PHPDOC blocks in our code, so example:

    /**
    * Foo
    *
    * Function description
    *
    * @param STRING $bar The string that you want to foo
    * @return STRING
    */
    public function foo($bar){
    return $bar;
    }

    When we look at this in the outline view we see only @return STRING

    If it has to return a line from the comments, it should really be returning the first line of the comments, not the last. But really it should be showing the line after the comments so I can see “public function foo” or something

    #11206
    urlwolf
    Member

    No news about whether we can expect work on the outline plugin? It’s unusable in its current state. I don’t dare opening it, it makes me reconsider my choice of text editor.

    #11211
    Yutaka Emura
    Keymaster

    Hello,

    This is the screenshot in my case:

     

    How would you like to change this?

    Thanks!

    #11215
    Antnee
    Member

    Hi Yutaka,

    The problem there is that the function name is buried under the /** parent, which is incorrect. However, I was unclear about my exact use-case, so apologies for that. I’d not realised that the problem for me occurs under classes. I’ve taken this screen shot for you to see. I’ve had to blur a few bits out as this is internal.

    Just taking the visible code from the main window into account, what I expect is something more along the lines of:

    class className
    - private $allowIncompleteCollections
    - private $cacheItemTypes
    - private $cacheArticles
    - private $cacheItems
    ...
    - public function __construct()
    - public function setXmlFeedPattern($pattern)

    Or something like that. Basically, I expect that it will disregard characters that indicate comments. Since these can be defined in the Configuration Hightlight (2) tab, with multi-line (“Begin:”, “End:”) parameters and single line (“Line Comment:”) parameters, and it will then use the first line afterwards. If I change the “Make Comments Collapsible” option I just end up with loads of “/**” in there instead

    Less important, since it begins heading into true IDE territory, would be for it to recognise bracket-pairs as containers for each level. For example:

    class foo{
    public function bar(){
    if (baz()){
    return TRUE;
    }
    }

    private function baz(){
    return TRUE;
    }
    }

    I would expect this to appear in outline as:

    class foo
    - public function bar{
    - - if (baz()){
    - private function baz{

    But oddly, all I see is this:

    class foo{

    This is weird. It’s also useless. The collapsing works in the editor for that code, which is good. However, it works based on the justification of each line. It really ought to be doing so based on the bracket-pairs, especially (in PHP and many other similar languages at least) the curly braces { and }

    Do that, and EmEditor gets a second chance of being my primary editor, and not just my large file editor.

    By the way, if I’m viewing any massive XML files, the Outline plugin still tries to process the entire document. It took a while for me to realise that my CPU was burning along at 100\% just because of this. Got very warm in the room! ;)

    #11217
    Yutaka Emura
    Keymaster

    Hello,

    You will need to change the Outline plug-in properties to work for your code.

    Here are screenshots for the Properties used and how EmEditor displays the outlines.

    JavaScript:

    http://www.emeditor.com/images/outline_prop_js.png

    http://www.emeditor.com/images/outline_js.png

    PHP:

    http://www.emeditor.com/images/outline_prop_php.png

    http://www.emeditor.com/images/outline_php.png

    Thanks!

    #11218
    Antnee
    Member

    Well that turned the outline for this particular file into the require and class statements only. No properties visible. No functions. It also seems like a very specific solution that will only work with this particular file. It doesn’t work across PHP itself.

    I didn’t realise there was a “number of braces” option, which I’ve just tried. Much better. In fact, close to what I need. If only it would identify properties as well. Oh, and functions that aren’t “public”. The only ones that have shown up are public, so private and protected methods are missing from the outline.

    Something more along the lines of:

    s*?(class|function).*

    for level 1 and

    s*?(public|private|protected|const|var).*

    for level 2. That gives a better result

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.