Eclipse PDT代码折叠问题
我最近使用 Eclipse 和 PDT 进行 PHP 开发。
在编写类时,我倾向于对类常量和属性使用以下样式:
class Foo extends Bar
{
const
CNST_1 = 1,
CNST_2 = 2,
CNST_3 = 3;
private
$fred = array(),
$barney = array ();
public
$wilma = 123,
$betty = 456;
}
不幸的是,如果我打开加载时折叠代码,代码折叠会使事情变得一团糟。它最终看起来像这样:
class Foo extends Bar
{
CNST_3 = 3;
$barney = array ();
$betty = 456;
}
代码展开控件在那里,但单击它每次只会显示源文件的一行额外内容,直到它到达 const、public、private 等部分。然后单击折叠框仅隐藏关键字后的第一项。
还有其他人遇到过这个问题吗?如果有,他们对此做了什么?
I've recently been using Eclipse with PDT for PHP development.
When writing classes I tend to use the following style for class constants and properties:
class Foo extends Bar
{
const
CNST_1 = 1,
CNST_2 = 2,
CNST_3 = 3;
private
$fred = array(),
$barney = array ();
public
$wilma = 123,
$betty = 456;
}
Unfortunately code folding makes something of a mess of this if I have fold code on load turned on. It ends up looking like this:
class Foo extends Bar
{
CNST_3 = 3;
$barney = array ();
$betty = 456;
}
The code unfold control is there, but clicking it only reveals one extra row of my source file each time until it get to the const, public, private etc part. Then clicking the folding box only hides the first item after the keyword.
Has anyone else hit this issue, and if so what did they do about it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不太了解 PDT,但是在 PHPeclipse 上,您可以通过以下方式解决此问题:
Window -> ;首选项-> PHPeclipse-> PHP
,然后在“折叠
”选项卡中取消选择所有默认设置。对于 PDT,我建议您通过简单地搜索
folding
或PHP
的首选项来搜索此设置。I don't know PDT very well, but on PHPeclipse you can solve this by:
Window -> Preferences -> PHPeclipse -> PHP
and then in the tab "Folding
" unselect all default settings.For PDT I recomend you, to search for this setting by simply seraching in the preferences for
folding
orPHP
.