简体   繁体   English

Javascript Aptana辅助扩展

[英]Javascript Aptana assist extend

Code: 码:

var a={
    value:5,
    test:function()
    {
        this.value=4;
    }
}



var b=someFunction(
{
    value:5,
    test:function()
    {
        this.value=4;
    }
});

As you see they are look the same, diffrence is only that in first case we define object, in second, we pass this object into function. 正如您所看到的一样,区别仅在于第一种情况下我们定义对象,第二种情况下我们将此对象传递给函数。

The problem is that in first case I see code assist when I type "this.v" (as a this.value) , but cant see that in second case. 问题是,在第一种情况下,键入“ this.v”(作为this.value)时,我会看到代码辅助,但是在第二种情况下,则看不到代码辅助。 I tried creating an object, then use as a argument for this function - this works, but unfortunately automatic documentation script need code to be in the second version. 我尝试创建一个对象,然后将其用作该函数的参数-可以正常工作,但是不幸的是,自动文档脚本需要代码在第二个版本中。 My question is - Can I force Aptana somehow to use object passed into functions the same way as it do like in declared object? 我的问题是-我可以强迫Aptana以某种方式使用传递给函数的对象,就像在声明的对象中一样吗? I figured out that it does code assist on "= {}" declaration. 我发现它确实对“ = {}”声明提供了代码辅助。 I would like to extend this to any "{}" occurence. 我想将此扩展到任何“ {}”出现。 Anyone have idea how to do this ? 有人知道该怎么做吗?

It is possible only by extending Aptana Java files. 只有通过扩展Aptana Java文件才有可能。 No other way - maybe future Aptana will support this by default... 没有其他方法-也许将来的Aptana将默认支持此功能...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM