dtuzjzs3853 2013-04-29 15:52
浏览 82

如何更改Netbeans PHP elseif自动格式化

Using PHP plugin v1.47.1 for NetBeans IDE 7.3 RC2.

I like to comment my if's and elseifs as follows:

/*
 * If this is the case, then do that.
 */
if (*condition1*) {
    // do some stuff.
}

/*
 * Otherwise, if this is the case, do the other thing.
 */
elseif (*condition2*) {
    // do some other stuff
}

/*
 * Finally, if neither of these is the case, then do something
 * totally different.
 */
else {
    // do something totally different.
}

But when I hit -- to autoformat, I get the following:

/*
 * If this is the case, then do that.
 */
if (*condition1*) {
    // do some stuff.
}
/*
 * Otherwise, if this is the case, do the other thing.
 */ elseif (*condition2*) {
    // do some other stuff
}
/*
 * Finally, if neither of these is the case, then do something
 * totally different.
 */ else {
    // do something totally different.
}

I can deal with it, but I'd like to be able to change it. I looked in Tools -> Options -> Editor -> Formatting but didn't see anything about putting an "elseif" or "else" on a new line.

  • 写回答

1条回答 默认 最新

  • douzhuangna6906 2013-04-29 15:57
    关注

    You can change a very limited number of settings related to formatting.

    Go to tools->options click on Editor button on top left of the options dialog box click on the formatting tab select PHP from the language select box then you would be able to see the required settings that can be changed

    评论

报告相同问题?

悬赏问题

  • ¥100 角动量包络面如何用MATLAB绘制
  • ¥15 merge函数占用内存过大
  • ¥15 Revit2020下载问题
  • ¥15 使用EMD去噪处理RML2016数据集时候的原理
  • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大
  • ¥15 单片机无法进入HAL_TIM_PWM_PulseFinishedCallback回调函数
  • ¥15 Oracle中如何从clob类型截取特定字符串后面的字符
  • ¥15 想通过pywinauto自动电机应用程序按钮,但是找不到应用程序按钮信息
  • ¥15 如何在炒股软件中,爬到我想看的日k线
  • ¥15 seatunnel 怎么配置Elasticsearch