Eclipse Oxygen 不标记事件 - 如何修复?
Posted
技术标签:
【中文标题】Eclipse Oxygen 不标记事件 - 如何修复?【英文标题】:Eclipse Oxygen does not mark occurrences - How to fix? 【发布时间】:2018-03-23 03:52:05 【问题描述】:我已经设置了 Eclipse Oxygen.1 4.7.1 (Build 20170914-1200) 来处理基于 Symfony 的 php 项目。
一切正常,但出现的亮点(例如局部变量、方法等)。
public function someMethod($paramA)
doSomething($paramA);
...
$var = $paramA;
当我将光标放在方法签名中的$paramA
中时,我希望在方法主体中出现$paramA
会突出显示。前段时间使用 Ecplise Mars 时肯定是这种情况。知道为什么这不起作用吗?
我已经检查了Preferences/PHP/Editor/Mark/Occurrences
,所有选项都已检查/激活。
Preferences/General/Editors/Text Editors/Annotations/Occurrences
似乎也设置正确(垂直标尺:否,概览标尺:是,文本作为突出显示,颜色:灰色,包含在下一个/上一个导航中:否)
还有其他需要检查的偏好吗?
这是已安装软件的列表:
Eclipse GitHub integration with task focused interface 4.8.0.201706111038-r org.eclipse.mylyn.github.feature.feature.group Eclipse EGit
Eclipse IDE for PHP Developers 4.7.1.20170914-1200 epp.package.php Eclipse Packaging Project
Eclipse Platform 4.7.1.v20170906-1700 org.eclipse.platform.feature.group Eclipse.org
Eclipse RCP 4.7.1.v20170906-1700 org.eclipse.rcp.feature.group Eclipse.org
Eclipse XML Editors and Tools 3.9.1.v201707252002 org.eclipse.wst.xml_ui.feature.feature.group Eclipse Web Tools Platform
Git integration for Eclipse 4.8.0.201706111038-r org.eclipse.egit.feature.group Eclipse EGit
Git integration for Eclipse - Gitflow support 4.8.0.201706111038-r org.eclipse.egit.gitflow.feature.feature.group Eclipse EGit
Git integration for Eclipse - Task focused interface 4.8.0.201706111038-r org.eclipse.egit.mylyn.feature.group Eclipse EGit
javascript Development Tools 2.1.0.v201706011953 org.eclipse.wst.jsdt.feature.feature.group Eclipse Web Tools Platform
Mylyn Context Connector: Eclipse IDE 3.23.0.v20170411-2108 org.eclipse.mylyn.ide_feature.feature.group Eclipse Mylyn
Mylyn Task List 3.23.1.v20170623-0008 org.eclipse.mylyn_feature.feature.group Eclipse Mylyn
Mylyn Task-Focused Interface 3.23.0.v20170414-0629 org.eclipse.mylyn.context_feature.feature.group Eclipse Mylyn
Mylyn Tasks Connector: Bugzilla 3.23.1.v20170623-0008 org.eclipse.mylyn.bugzilla_feature.feature.group Eclipse Mylyn
Mylyn WikiText 3.0.6.201703111926 org.eclipse.mylyn.wikitext_feature.feature.group Eclipse Mylyn
Oomph Setup 1.9.0.v20170706-0615 org.eclipse.oomph.setup.feature.group Eclipse Oomph Project
PDT Extensions 0.23.1.201707041945 org.pdtextensions.feature.feature.group http://pdt-extensions.org
PHP CodeSniffer 1.3.0.R20111119000000 org.phpsrc.eclipse.pti.tools.codesniffer.feature.group Sven Kiera
PHP Copy/Paste Detection 0.2.2.R20100414000000 org.phpsrc.eclipse.pti.tools.phpcpd.feature.group Sven Kiera
PHP Depend 0.3.3.R20110627000000 org.phpsrc.eclipse.pti.tools.phpdepend.feature.group Sven Kiera
PHP Development Tools (PDT) 5.2.0.201709191002 org.eclipse.php.feature.group Eclipse PDT
PHP Development Tools (PDT) Composer Support 5.2.0.201709191002 org.eclipse.php.composer.feature.group Eclipse PDT
PHP Development Tools (PDT) Mylyn Integration 5.2.0.201709191002 org.eclipse.php.mylyn.feature.group Eclipse PDT
PHP Development Tools (PDT) PHPUnit Support 5.2.0.201709191002 org.eclipse.php.phpunit.feature.feature.group Eclipse PDT
PHP Development Tools (PDT) Remote Project Synchronization Support 5.2.0.201709191002 org.eclipse.php.rdt.sync.feature.group Eclipse PDT
PHP Development Tools (PDT) Zend Profiler Support 5.2.0.201709191002 org.eclipse.php.profiler.feature.group Eclipse PDT
PHP Mess Detector 0.1.0.R20110628000000 org.phpsrc.eclipse.pti.tools.phpmd.feature.group Dejan Spasic
PHP Tool Integration Core 1.6.0.R20111119000000 org.phpsrc.eclipse.pti.core.feature.group Sven Kiera
PHPUnit 0.8.0.R20111119000000 org.phpsrc.eclipse.pti.tools.phpunit.feature.group Sven Kiera
Remote System Explorer End-User Runtime 3.7.3.201704251225 org.eclipse.rse.feature.group Eclipse TM Project
Smarty Feature 0.10.0.201707132003 org.eclipse.php.smarty_feature.feature.group null
TM Terminal 4.3.0.201706140544 org.eclipse.tm.terminal.feature.feature.group Eclipse.org - Target Management
Twig Editor Feature 2.1.1.201707041935 com.dubture.twig.feature.feature.group https://github.com/pulse00
YEdit Feature 1.0.20.201509041456-RELEASE org.dadacoalition.yedit.feature.feature.group YEdit Project
【问题讨论】:
【参考方案1】:一开始我也遇到了同样的问题。也许是你的文件夹或项目结构?
如果脚本是通过“从文件系统打开项目...”添加的,则标记并发对我不起作用。
尝试在 Eclipse 中创建与您的项目同名的“PHP 项目”。然后将您的脚本甚至整个文件夹结构拖到新创建的项目中,使用“刷新”进行更新,突出显示应该可以工作了。
【讨论】:
我不使用任何项目。这些文件不存储在语言环境机器上,而是存储在删除服务器上。因此,我的本地机器上没有项目文件夹、元数据文件等。使用远程系统资源管理器访问删除文件,这是没有任何 Eclipse 项目结构的“普通”文件。 我怀疑问题可能类似。通过使用 github,文件在 eclipse 中以某种方式被错误地读取,标记无法正常工作。 如果您遇到与我相同的问题,则 Code Sniffer 插件不适用于最新版本的 Eclipse。如果你尝试编辑选项,它会抛出很多异常。以上是关于Eclipse Oxygen 不标记事件 - 如何修复?的主要内容,如果未能解决你的问题,请参考以下文章
传苹果 iPhone 8 将启用 WIFI 充电;Eclipse 4.7 Oxygen 正式发布