【问题标题】:ResourceBundle Editor disables basic functions in Spring Tool SuiteResourceBundle Editor 禁用 Spring Tool Suite 中的基本功能
【发布时间】:2014-09-09 21:50:05
【问题描述】:

我正在使用 Spring Tool Suite

  • 版本:3.6.0.RELEASE
  • 构建 ID:201407101106
  • 平台:Eclipse Luna (4.4)

由于 i18n 的要求,我已经安装了Eclipse ResourceBundle Editor

  • ResourceBundle Editor 1.0.3 com.essiembre.eclipse.rbe.feature.group Pascal Essiembre

插件完美运行。但是 IDE 有一个奇怪的情况,一旦在项目中创建了一个 .properties 文件,然后由 ResourceBundle 编辑器处理它,实际上对于 IDE 中的任何 java 类,“Ctrl + Space”停止工作,任何自动完成功能不再起作用,按下“点”的任何引用变量,让我看到方法列表,它也不再起作用了..

要解决这个问题,我必须重新启动 IDE……当然,如果我再次打开通过此插件管理的 .properties,一切都会再次出错

似乎是一个错误,或者我可能忘记进行额外的配置。

我已经向他们报告了这一点: ResourceBundle Editor disables basic functions in the IDE #12

还没有任何回复..

有解决这种情况的方法或特殊设置吗?

错误:

未处理的事件循环异常

的错误堆栈跟踪
org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.IllegalArgumentException: Argument not valid)
    at org.eclipse.swt.SWT.error(SWT.java:4441)
    at org.eclipse.swt.SWT.error(SWT.java:4356)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:139)
    at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3983)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3660)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:382)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:236)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
Caused by: java.lang.IllegalArgumentException: Argument not valid
    at org.eclipse.swt.SWT.error(SWT.java:4422)
    at org.eclipse.swt.SWT.error(SWT.java:4356)
    at org.eclipse.swt.SWT.error(SWT.java:4327)
    at org.eclipse.swt.widgets.Widget.error(Widget.java:783)
    at org.eclipse.swt.widgets.Control.setBackground(Control.java:3479)
    at org.eclipse.jface.text.contentassist.CompletionProposalPopup.createProposalSelector(CompletionProposalPopup.java:661)
    at org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$22(CompletionProposalPopup.java:588)
    at org.eclipse.jface.text.contentassist.CompletionProposalPopup$2.run(CompletionProposalPopup.java:515)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    at org.eclipse.jface.text.contentassist.CompletionProposalPopup.showProposals(CompletionProposalPopup.java:499)
    at org.eclipse.jface.text.contentassist.ContentAssistant$2.run(ContentAssistant.java:378)
    at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:136)
    ... 23 more

更新:Second Update

只是一个干净的或全新的 Eclipse 安装,几乎从头开始。

Eclipse Java EE IDE for Web Developers.

Version: Luna Release (4.4.0)
Build id: 20140612-0600

插件安装,同样悲惨的历史

消息:

Unhandled event loop exception

异常堆栈跟踪:

org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.IllegalArgumentException: Argument not valid)
    at org.eclipse.swt.SWT.error(SWT.java:4441)
    at org.eclipse.swt.SWT.error(SWT.java:4356)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:139)
    at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3983)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3660)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:382)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:236)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
Caused by: java.lang.IllegalArgumentException: Argument not valid
    at org.eclipse.swt.SWT.error(SWT.java:4422)
    at org.eclipse.swt.SWT.error(SWT.java:4356)
    at org.eclipse.swt.SWT.error(SWT.java:4327)
    at org.eclipse.swt.widgets.Widget.error(Widget.java:783)
    at org.eclipse.swt.widgets.Control.setBackground(Control.java:3479)
    at org.eclipse.jface.text.contentassist.CompletionProposalPopup.createProposalSelector(CompletionProposalPopup.java:661)
    at org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$22(CompletionProposalPopup.java:588)
    at org.eclipse.jface.text.contentassist.CompletionProposalPopup$2.run(CompletionProposalPopup.java:515)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    at org.eclipse.jface.text.contentassist.CompletionProposalPopup.showProposals(CompletionProposalPopup.java:499)
    at org.eclipse.jface.text.contentassist.ContentAssistant$2.run(ContentAssistant.java:378)
    at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:136)
    ... 23 more

会话数据:

eclipse.buildId=4.4.0.I20140606-1215
java.version=1.8.0_05
java.vendor=Oracle Corporation
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.jee.product -keyring /Users/manueljordan/.eclipse_keyring -showlocation
Command-line arguments:  -os macosx -ws cocoa -arch x86_64 -product org.eclipse.epp.package.jee.product -keyring /Users/manueljordan/.eclipse_keyring -showlocation

如何重现错误:

  1. 是否已创建任何项目
  2. 文件 -> 新建 -> 其他 -> ResourceBundle -> ResourceBundle
  3. 接下来按照i18n的要求创建.properties文件,完成
  4. 找到并选择主要或默认的 .properties 文件(即 messages.properties)
  5. 右键 -> 打开方式 -> ResourceBundle Editor

【问题讨论】:

  • 您在错误日志中看到什么了吗?如果没有,您是否查看过 Java -> Editor -> Content-Assist 设置?也许某些东西以一种奇怪的方式配置。
  • Do you see anything in the Error Log? 我应该在哪里阅读这些信息?如果在控制台中,则不会出现任何内容,在 STS 目录中我找不到log 目录。我完成了进入Content Assist的步骤,我在使用插件打开一个.properties文件之前和之后拍了一张照片,我看不出有什么区别。我很困惑,有什么想法吗?
  • 在 Eclipse/STS 中有一个可以打开的视图,称为“错误日志”,其中记录了 Eclipse/STS 内部发生的问题。看看该视图中是否显示某些内容会很有趣(可能包括上述问题的堆栈跟踪)。
  • 有趣的是,我打开了那个视图,列出了一长串错误,想发送一张只有 expected 错误的照片用于演示目的,我已经删除了列表项,我打开了一个由插件处理的 .properties 文件,view 中没有出现任何内容,我编辑了 .properties 文件,保存了它和 view仍然是空的……有什么好笑的?现在这些类一直在工作,我可以使用 autocomplete 功能并且 dot 行为现在可以工作了。如果有什么变化,我将分享图像。谢谢。
  • 第二次观察:之前的评论是真的,编译项目后,就那么,错误信息已经列在视图中,现在怎么都报错了。图片已附在帖子中,请在新窗口中打开以更好地查看它

标签: java eclipse eclipse-plugin internationalization spring-tool-suite


【解决方案1】:

我可以重现这一点,这似乎确实是在 STS 中安装和使用 ResourceBundleEditor 时发生的问题。在普通的 Eclipse Luna Java EE 发行版中(在安装 ResourceBundleEditor 之后)执行完全相同的操作时,不会抛出异常。因此我打开了:https://issuetracker.springsource.com/browse/STS-3917 来调查这个问题。

【讨论】:

  • 想知道为什么Eclipse Luna JEE distribution 中没有相同的错误,因为我在Eclipse Luna JEE distribution 中有相同的错误,在第一篇文章中报告(添加),请查看Second Update 部分。跨度>
  • 如果它发生在普通的 Eclipse Luna 版本中,你应该像你一样向 ResourceBundleEditor 作者报告。
  • 会搞定的,问题是,我原来的问题还没覆盖。没有 cmets..
  • 这是 ResourceBundle Editor 插件的问题。 UI 组件之一是处理灰色系统颜色,它被各种 Eclipse UI 组件使用,不能被处理。我在 GitHub 上为 Eclipse-RBE 创建了一个 PR:github.com/essiembre/eclipse-rbe/pull/16 这不是 STS 问题,因此需要通过上面的 PR 进行跟踪。
猜你喜欢
  • 2015-05-14
  • 1970-01-01
  • 1970-01-01
  • 2019-04-16
  • 1970-01-01
  • 2014-03-13
  • 1970-01-01
  • 2019-02-28
  • 2015-02-14
相关资源
最近更新 更多