fdorg / flashdevelop

FlashDevelop is a free and open source code editor.
MIT License
823 stars 220 forks source link

[Haxe] Code completion bug #2436

Open DarthVan opened 5 years ago

DarthVan commented 5 years ago

Hi! Here is a little problem: completionbug after witing "." or using hotkey CTRL+SPACE FD shows available methods or propertites, but after second it gones :( thanks!

PS: this is my class, which method i tried to call in animation:

package sith.core.pools.destroy;

import openfl.Vector;
import sith.core.IDestroyable;

class DestroyablePool implements IDestroyable {

    public var vector(get, null) : Vector<IDestroyable>;
    public var length(get, null) : Int;

    public function new() {
        vector = new Vector<IDestroyable>();
    }

    public function add(object : IDestroyable) : Void {
        vector.insertAt(vector.length, object);
    }

    public function remove(object : IDestroyable) : Bool {
        var length : Int = vector.length;
        for (i in 0...length)
            if (vector[i] == object) {
                vector.removeAt(i);
                return true;
            }
        return false;
    }

    public function destroy() : Void {
        var length : Int = vector.length;
        for (i in 0...length)
            vector.removeAt(length - i - 1).destroy();
    }

    private function get_vector() : Vector<IDestroyable> {
        return vector;
    }

    private function get_length() : Int {
        return vector.length;
    }
}
DarthVan commented 5 years ago

UPD: completionbug2

this method and prop(get,set) relate to _snapController : SnapController ... 2018-10-09 14 09 11

software: FD 5.3.4.217

haxeContext: 2018-10-09 13 27 31

And my project uses Lime 7.1.1 & OpenFl 8.5.1

DarthVan commented 5 years ago

UPD2: There is no bug, if i changed completionMode "compiler" to "FlashDevelop"

DarthVan commented 5 years ago

UPD3: one more thing: dotsbug4 this code compiles fine, but at some rows has no completion list :(

I tried to change Compleion Mode, but it brings no effect (with FD mode every row has no completions)

code is here: https://pastebin.com/eC3Uye7a

ty.