2013-04-29 35 views
0

在NetBeans IDE 7.3 RC2中使用PHP插件v1.47.1。如何更改Netbeans PHP elseif自動格式化

我喜歡評論我,如果公司和elseifs如下:

/* 
* 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. 
} 

但是,當我打 - 到自動套用,我得到如下:

/* 
* 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. 
} 

我可以對付它,但我希望能夠改變它。我查看了工具 - >選項 - >編輯 - >格式化,但沒有看到關於在新行上添加「elseif」或「else」的任何信息。

回答

1

您可以更改與格式有關的非常有限數量的設置。

轉到工具>選項 點擊編輯按鈕上的選項對話框 點擊從語言選擇框 格式化標籤 選擇PHP的左上角,然後你就可以看到所需要的設置,可以被改變

+0

謝謝 - 在我的帖子的底部,我提到我已經試過這個。 :)我不確定是否有可以編輯的XML文件。 – livefree75 2013-04-29 17:25:37