0

I have a question about the autocompletion in eclipse. because I have created a system that has a tree like structure for example:

{"user": {
    _class: "table"
    "firstname": {}
    "lastname": {}
    "logins": {
        "date": {},
    }
}}

How can this structure create the context for the auto completion system. This is some example code that is messing up 1 part of the auto completion...:( And I really want this to work!

/**
* This code will return a object. in this case a text_read object but it can 
be different depending on what the system logic does.
**/
function getObject () {
    $type = "text"
    $className = $type . "_read";

    $object = new $className;

    return $object
}

And the next problem i have is that a class creates properties dynamicly that it returns by a getter function.

class tmp {
    private $a = array(
        "firstname" => "Pietje"
    ); //this array is filled dynamicly in the constructor in production code
    public function _getField ($name) {
        return $this->a[$name];
    }
}

Like to hear from you!

  • http://stackoverflow.com/questions/14934660/accessing-json-array-after-json-decode-multidimensional-array, http://stackoverflow.com/questions/9471592/processing-multidimensional-json-array-with-php –  Sep 27 '16 at 14:24
  • Sorry but that is definitely not the answer that is json encoding & decoding and how to work with json in php. this question is about auto completion in a tree like structure in eclipse! – Sjaak Hijmering Sep 27 '16 at 14:27
  • autocomplete on HTML form, right? then, eclipse or phpstorm, doesn't matter. what format is the data? looks like json, is it array? you need to be way clearer. –  Sep 27 '16 at 14:35
  • I mean autocomplete inside the ide ctrl+space stuff;) – Sjaak Hijmering Sep 27 '16 at 15:18

0 Answers0