插件开发中的问题:Eclipse 3.4无法找到最终存在的包!

时间:2023-01-15 15:55:40

Today I had a problem with my old Eclipse 3.4 installation and I had to re-download the entire package. However, I don't think that I got the exact package as before, and I'm having some problems.

今天我的旧版Eclipse 3.4安装有问题,我不得不重新下载整个软件包。但是,我不认为我像以前那样得到了确切的包装,而且我遇到了一些问题。

The problem can be summarized as follows: when developing a plug-in, I cannot resolve dependencies towards 'org.eclipse.jdt.ui'. When trying to add the missing plugin, in the dialog the closest match is 'org.eclipse.jdt.ui**.source**'. A similar thing happens with other core plugins.

问题可归纳如下:在开发插件时,我无法解析对'org.eclipse.jdt.ui'的依赖关系。在尝试添加缺少的插件时,在对话框中最接近的匹配是'org.eclipse.jdt.ui **。source **'。其他核心插件也会发生类似的事情。

In order to test, I created a new plug-in using the wizard and I obtained a non-compiling plugin: one of the classes uses the class org.eclipse.jdt.ui.JavaUI and it cannot be resolved. Similarly, the MANIFEST.MF includes a dependency towards 'org.eclipse.jdt.ui', but the 'Bundle 'org.eclipse.jdt.ui' cannot be resolved'.

为了测试,我使用向导创建了一个新的插件,我获得了一个非编译插件:其中一个类使用类org.eclipse.jdt.ui.JavaUI,无法解析。类似地,MANIFEST.MF包含对'org.eclipse.jdt.ui'的依赖,但'Bundle'org.eclipse.jdt.ui'无法解析'。

Now a summary of my platform:

现在我的平台摘要:

  • I'm running Mac OS X 10.4 Tiger and Java 1.5.0_19-138
  • 我正在运行Mac OS X 10.4 Tiger和Java 1.5.0_19-138

  • I'm running Eclipse Version: 3.4.1 Build id: M20080911-1700
  • 我正在运行Eclipse版本:3.4.1构建ID:M20080911-1700

  • I downloaded the modeling package, which comes in a file called 'eclipse-modeling-ganymede-SR1-incubation-macosx-carbon.tar.gz'
  • 我下载了一个名为'eclipse-modeling-ganymede-SR1-incubation-macosx-carbon.tar.gz'的文件包。

I've performed a fresh installation, in a new folder and using a new workspace.

我已在新文件夹中使用新工作区执行全新安装。

If I look at the Plug-in Registry view, I can find the 'org.eclipse.jdt.ui' plugin in there, and it appears to be running. By the way, if it is disabled, then the workbench breaks and stops working.

如果我查看Plug-in Registry视图,我可以在其中找到'org.eclipse.jdt.ui'插件,它似乎正在运行。顺便说一句,如果它被禁用,那么工作台就会中断并停止工作。

I cannot understand what is happening. Is my installation broken? I wonder if the Eclipse package that I downloaded has an error and they included the sources instead of the compiled files. But in that case, the plug-in shouldn't be working in the workbench, isn't it?

我无法理解发生了什么。我的装置坏了吗?我想知道我下载的Eclipse包是否有错误,它们包含源而不是编译文件。但在这种情况下,插件不应该在工作台中工作,不是吗?

In any case, why I cannot find the plug-in when I'm adding the dependencies, even if I see it in the Plug-in Registry?

在任何情况下,为什么我在添加依赖项时找不到插件,即使我在插件注册表中看到它?

Thanks for your help!

谢谢你的帮助!

1 个解决方案

#1


Problem solved: just restart the computer.

问题解决了:只需重启电脑即可。

I don't restart my computer very frequently, so it took me a lot of time to find out that this was the solution. After I restarted it, everything started to work perfectly again. It seems that either Eclipse leaves something in the memory after running, or that some of my initial failures had left something nasty behind. In any case, I had checked and there were no Eclipse related processes running .... weird, but at least now it's fixed!

我不经常重启我的电脑,所以我花了很多时间才发现这是解决方案。重新启动后,一切都恢复正常。似乎Eclipse运行后在内存中留下了一些东西,或者我最初的一些失败留下了一些令人讨厌的东西。在任何情况下,我都检查过并且没有运行Eclipse相关的进程......很奇怪,但至少现在已经修复了!

#1


Problem solved: just restart the computer.

问题解决了:只需重启电脑即可。

I don't restart my computer very frequently, so it took me a lot of time to find out that this was the solution. After I restarted it, everything started to work perfectly again. It seems that either Eclipse leaves something in the memory after running, or that some of my initial failures had left something nasty behind. In any case, I had checked and there were no Eclipse related processes running .... weird, but at least now it's fixed!

我不经常重启我的电脑,所以我花了很多时间才发现这是解决方案。重新启动后,一切都恢复正常。似乎Eclipse运行后在内存中留下了一些东西,或者我最初的一些失败留下了一些令人讨厌的东西。在任何情况下,我都检查过并且没有运行Eclipse相关的进程......很奇怪,但至少现在已经修复了!