Java 从插件调用代码时出现问题:"org.eclipse.jface" when using Checkstyle Plugin
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/776334/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Problems occurred when invoking code from plug-in: "org.eclipse.jface" when using Checkstyle Plugin
提问by user64133
I am trying to use the eclipse-cs plugin on Rational Software Architect 7.0.0.4.
我正在尝试在 Rational Software Architect 7.0.0.4 上使用 eclipse-cs 插件。
I recently uninstalled the older beta2 version and installed beta3. The plug-in itself works as was previously configured. But whenever I attempt to re-configure the check rules via Windows->Preferences->Checkstyle, I get the following error:
我最近卸载了旧的 beta2 版本并安装了 beta3。插件本身按照之前的配置工作。但是每当我尝试通过 Windows->Preferences->Checkstyle 重新配置检查规则时,我都会收到以下错误:
Problems occurred when invoking code from plug-in: "org.eclipse.jface".
从插件调用代码时出现问题:“org.eclipse.jface”。
This occurs when I click the configure button and attempt to reconfigure a specific selected check rule on the UI.
当我单击配置按钮并尝试在 UI 上重新配置特定的选定检查规则时,就会发生这种情况。
Has anyone ever encountered this issue before and how can it be fixed?
有没有人以前遇到过这个问题,如何解决?
The full error listing and stack trace is shown below:
完整的错误列表和堆栈跟踪如下所示:
Stack trace:
java.lang.NoSuchMethodError: org/eclipse/swt/widgets/Text.setMessage(Ljava/lang/String;)V
at net.sf.eclipsecs.ui.config.RuleConfigurationEditDialog.createAdvancedSection(Unknown Source)
at net.sf.eclipsecs.ui.config.RuleConfigurationEditDialog.createDialogArea(Unknown Source)
at org.eclipse.jface.dialogs.TitleAreaDialog.createContents(Unknown Source)
at org.eclipse.jface.window.Window.create(Unknown Source)
at org.eclipse.jface.dialogs.Dialog.create(Unknown Source)
at net.sf.eclipsecs.ui.config.RuleConfigurationEditDialog.create(Unknown Source)
at org.eclipse.jface.window.Window.open(Unknown Source)
at net.sf.eclipsecs.ui.config.CheckConfigurationConfigureDialog$PageController.openModule(Unknown Source)
at net.sf.eclipsecs.ui.config.CheckConfigurationConfigureDialog$PageController.doubleClick(Unknown Source)
at org.eclipse.jface.viewers.StructuredViewer.run(Unknown Source)
at org.eclipse.core.runtime.SafeRunner.run(Unknown Source)
at org.eclipse.core.runtime.Platform.run(Unknown Source)
at org.eclipse.ui.internal.JFaceUtil.run(Unknown Source)
at org.eclipse.jface.util.SafeRunnable.run(Unknown Source)
at org.eclipse.jface.viewers.StructuredViewer.fireDoubleClick(Unknown Source)
at org.eclipse.jface.viewers.StructuredViewer.handleDoubleSelect(Unknown Source)
at org.eclipse.jface.viewers.StructuredViewer.widgetDefaultSelected(Unknown Source)
at org.eclipse.jface.util.OpenStrategy.fireDefaultSelectionEvent(Unknown Source)
at org.eclipse.jface.util.OpenStrategy.accessSession Data:
eclipse.buildId=unknown
java.fullversion=J2RE 1.5.0 IBM J9 2.3 Windows XP x86-32 j9vmwi3223ifx-20070323 (JIT enabled)
J9VM - 20070322_12058_lHdSMR
JIT - 20070109_1805ifx3_r8
GC - WASIFIX_2007
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_GB
Framework arguments: -product com.ibm.rational.rsa.product.ide
Command-line arguments: -os win32 -ws win32 -arch x86 -product com.ibm.rational.rsa.product.ide
(Unknown Source)
at org.eclipse.jface.util.OpenStrategy.handleEvent(Unknown Source)
at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
at org.eclipse.jface.window.Window.runEventLoop(Unknown Source)
at org.eclipse.jface.window.Window.open(Unknown Source)
at net.sf.eclipsecs.ui.config.CheckConfigurationWorkingSetEditor.configureCheckConfig(Unknown Source)
at net.sf.eclipsecs.ui.config.CheckConfigurationWorkingSetEditor.access(Unknown Source)
at net.sf.eclipsecs.ui.config.CheckConfigurationWorkingSetEditor$PageController.doubleClick(Unknown Source)
at org.eclipse.jface.viewers.StructuredViewer.run(Unknown Source)
at org.eclipse.core.runtime.SafeRunner.run(Unknown Source)
at org.eclipse.core.runtime.Platform.run(Unknown Source)
at org.eclipse.ui.internal.JFaceUtil.run(Unknown Source)
at org.eclipse.jface.util.SafeRunnable.run(Unknown Source)
at org.eclipse.jface.viewers.StructuredViewer.fireDoubleClick(Unknown Source)
at org.eclipse.jface.viewers.StructuredViewer.handleDoubleSelect(Unknown Source)
at org.eclipse.jface.viewers.StructuredViewer.widgetDefaultSelected(Unknown Source)
at org.eclipse.jface.util.OpenStrategy.fireDefaultSelectionEvent(Unknown Source)
at org.eclipse.jface.util.OpenStrategy.accessEclipse.exe -clean
(Unknown Source)
at org.eclipse.jface.util.OpenStrategy.handleEvent(Unknown Source)
at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
at org.eclipse.jface.window.Window.runEventLoop(Unknown Source)
at org.eclipse.jface.window.Window.open(Unknown Source)
at org.eclipse.ui.internal.OpenPreferencesAction.run(Unknown Source)
at org.eclipse.jface.action.Action.runWithEvent(Unknown Source)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(Unknown Source)
at org.eclipse.jface.action.ActionContributionItem.access(Unknown Source)
at org.eclipse.jface.action.ActionContributionItem.handleEvent(Unknown Source)
at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
at org.eclipse.ui.internal.Workbench.runEventLoop(Unknown Source)
at org.eclipse.ui.internal.Workbench.runUI(Unknown Source)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Unknown Source)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(Unknown Source)
at org.eclipse.ui.internal.ide.IDEApplication.run(Unknown Source)
at org.eclipse.core.internal.runtime.PlatformActivator.run(Unknown Source)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(Unknown Source)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(Unknown Source)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(Unknown Source)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.invokeFramework(Unknown Source)
at org.eclipse.core.launcher.Main.basicRun(Unknown Source)
at org.eclipse.core.launcher.Main.run(Unknown Source)
at org.eclipse.core.launcher.Main.main(Unknown Source)
And the session data:
和会话数据:
./eclipse -clean
回答by RefuX
My simple guess would be that the version of Eclipse that RSA 7.0 is based on is missing some methods that your version of check style is wanting. RSA 7.5 uses Eclipse 3.4, and I've been very happy with it.
我的简单猜测是 RSA 7.0 所基于的 Eclipse 版本缺少您的检查样式版本所需的某些方法。RSA 7.5 使用 Eclipse 3.4,我对它非常满意。
回答by Octavian A. Damiean
Try so start Eclipse from the console/terminal with the -clean
option.
尝试使用该-clean
选项从控制台/终端启动 Eclipse 。
On Windows:
在 Windows 上:
eclipse -clean
On *nix:
在 *nix 上:
##代码##or if Eclipse is in your PATH
或者如果 Eclipse 在您的 PATH 中
##代码##This will clear your plug-ins cache, maybe it solves the issue.
这将清除您的插件缓存,也许它可以解决问题。