如何解决不工作的Eclipse索引器?

tquggr8v  于 2022-11-04  发布在  Eclipse
关注(0)|答案(1)|浏览(157)

我的Eclipse C索引器不工作,它在.metadata/.log文件中写入一个条目:
2022-10-24 16:46:02.674!消息索引'eio_valto'(0个源,0个头)在0.008秒内:0个声明;参考文献0篇; 0个未解析的内含物; 0个语法错误; 0个无法解析的名称(0%)
在索引器设置中,勾选了“索引在编辑器中打开的源文件和头文件”,因此它应该至少找到一个在我的编辑器中打开的文件。
我该如何解决这个问题?
这是一个C项目,我用File --〉New --〉C/C++ Project创建的,我使用外部Makefile来构建。它和我所有其他项目一样,但其他项目都工作得很好,只有这个不行。
提前感谢!
整个日志:

!SESSION 2022-10-24 16:16:41.372 -----------------------------------------------
eclipse.buildId=4.7.3.M20180330-0640
java.version=1.8.0_172
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=hu_HU
Framework arguments:  -product org.eclipse.epp.package.cpp.product
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.cpp.product

!ENTRY org.eclipse.jface 2 0 2022-10-24 16:16:51.319
!MESSAGE Keybinding conflicts occurred.  They may interfere with normal accelerator operation.
!SUBENTRY 1 org.eclipse.jface 2 0 2022-10-24 16:16:51.319
!MESSAGE A conflict occurred for ALT+CTRL+T:
Binding(ALT+CTRL+T,
    ParameterizedCommand(Command(org.eclipse.search.ui.performTextSearchWorkspace,Find Text in Workspace,
        Searches the files in the workspace for specific text.,
        Category(org.eclipse.search.ui.category.search,Search,Search command category,true),
        org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@407b41e6,
        ,,true),null),
    org.eclipse.ui.defaultAcceleratorConfiguration,
    org.eclipse.ui.contexts.window,hu,,system)
Binding(ALT+CTRL+T,
    ParameterizedCommand(Command(org.eclipse.tm.terminal.connector.local.command.launch,Open Local Terminal on Selection,
        ,
        Category(org.eclipse.tm.terminal.view.ui.commands.category,Terminal Commands,null,true),
        org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@3291d9c2,
        ,,true),null),
    org.eclipse.ui.defaultAcceleratorConfiguration,
    org.eclipse.ui.contexts.window,,,system)

!ENTRY org.eclipse.egit.ui 2 0 2022-10-24 16:17:03.170
!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git
user global configuration and to define the default location to store repositories: 'C:\Users\mester.adam'. If this is
not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and
EGit might behave differently since they see different configuration options.
This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.

!ENTRY org.eclipse.epp.logging.aeri.ide 2 17 2022-10-24 16:17:07.658
!MESSAGE Server ‘org.eclipse.epp.logging.aeri.ide.server’ failed with exception: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $. ; version: 2.0.7.v20170906-1327
!STACK 0
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
    at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:224)
    at com.google.gson.Gson.fromJson(Gson.java:887)
    at com.google.gson.Gson.fromJson(Gson.java:852)
    at com.google.gson.Gson.fromJson(Gson.java:801)
    at org.eclipse.epp.internal.logging.aeri.ide.server.json.Json.deserialize(Json.java:91)
    at org.eclipse.epp.internal.logging.aeri.ide.server.mars.IO.refreshConfiguration(IO.java:66)
    at org.eclipse.epp.internal.logging.aeri.ide.server.mars.ServerConnection.startUp(ServerConnection.java:124)
    at com.google.common.util.concurrent.AbstractIdleService$DelegateService$1.run(AbstractIdleService.java:62)
    at com.google.common.util.concurrent.Callables$4.run(Callables.java:122)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
    at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:385)
    at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:213)
    ... 9 more

!ENTRY org.eclipse.launchbar.core 2 0 2022-10-24 16:17:08.381
!MESSAGE Enablement expression is missing for descriptor type org.eclipse.cdt.debug.core.coreBuildDescriptorType

!ENTRY org.eclipse.launchbar.core 2 0 2022-10-24 16:17:08.399
!MESSAGE Enablement expression is missing for config provider for org.eclipse.cdt.debug.core.coreBuildDescriptorType

!ENTRY org.eclipse.launchbar.core 2 0 2022-10-24 16:17:08.413
!MESSAGE Enablement expression is missing for config provider for org.eclipse.cdt.debug.core.coreBuildDescriptorType

!ENTRY org.eclipse.cdt.core 1 0 2022-10-24 16:19:33.058
!MESSAGE Indexed 'eio_valto' (0 sources, 0 headers) in 0,145 sec: 0 declarations; 0 references; 0 unresolved inclusions; 0 syntax errors; 0 unresolved names (0%)

!ENTRY org.eclipse.cdt.core 1 0 2022-10-24 16:37:01.920
!MESSAGE Indexed 'eio_valto' (0 sources, 0 headers) in 0,127 sec: 0 declarations; 0 references; 0 unresolved inclusions; 0 syntax errors; 0 unresolved names (0%)

!ENTRY org.eclipse.cdt.core 1 0 2022-10-24 16:37:53.391
!MESSAGE Indexed 'eio_valto' (0 sources, 0 headers) in 0,103 sec: 0 declarations; 0 references; 0 unresolved inclusions; 0 syntax errors; 0 unresolved names (0%)
qkf9rpyu

qkf9rpyu1#

我尝试了以下方法:

  • 重建索引
  • 关闭并重新打开项目,然后重新生成索引
  • 刷新项目,然后重新生成索引
  • 删除项目并将其重新导入工作区

没有一个人帮得上忙。
最后道:我已经删除了这个项目,并使用我的文件创建了一个新项目,但是我必须创建并重新配置我所有的构建配置。现在它工作得很好,索引器也是,但是很奇怪,因为工作区设置是相同的,我也将项目设置设置为相同的。所以我不接受我的方法作为解决方案,它只是一个变通方案。但是现在,我不能重现这个问题,所以我真的不知道,如何找到这个问题的适当解决方案。

相关问题