Eclipse的JavaScript格式化程序连接包装变量赋值

时间:2017-08-30 11:55:54

标签: javascript eclipse formatter linewrap

目前我正在努力使用Eclipse的JavaScript格式化程序设置(Eclipse Neon3 4.6.3,Spring STS 3.9.0)。我有以下几行代码(期望的结果):

feature = {

    initAttachOverlay: function (multipleSelectionBoxInstance, productWorkingCopyIdToAttach) {
        var attachButton = $('#attachToMasterProductButton'),
            confirmationButton = $('div.button-bar button.save', this.attachCloneOverlay),
            cancelButton = $('div.button-bar button.cancel', this.attachCloneOverlay),
            closeIcon = $('div.titleBar span.icon-delete_outlined', this.attachCloneOverlay);
    }
}

当格​​式化这些行时,我最终会加入所有变量定义行:

feature = {

    initAttachOverlay: function (multipleSelectionBoxInstance, productWorkingCopyIdToAttach) {
        var attachButton = $('#attachToMasterProductButton'), confirmationButton = $('div.button-bar button.save', this.attachCloneOverlay), cancelButton = $('div.button-bar button.cancel', this.attachCloneOverlay), closeIcon = $(
                'div.titleBar span.icon-delete_outlined', this.attachCloneOverlay);
    }
}

是否有任何设置可以保留这些行,或者在每个逗号后分割变量定义?我试图在“Line Wrapping”选项卡上更改每个有意义的设置,但没有成功。

我正在寻找的是“在变量声明中插入逗号后的新行”,如“在”新行“选项卡中”在对象初始值设定项中插入逗号后插入新行“。

非常感谢任何帮助!

0 个答案:

没有答案