2009-04-22 15 views
18

Sto tentando di utilizzare il plug-in eclipse-cs su Rational Software Architect 7.0.0.4.Problemi durante il richiamo del codice dal plug-in: "org.eclipse.jface" quando si utilizza il plug-in Checkstyle

Recentemente ho disinstallato la versione beta2 precedente e installato beta3. Il plug-in stesso funziona come precedentemente configurato. Ma ogni volta che tento di riconfigurare le regole di controllo tramite Windows-> Preferenze-> Stile di controllo, viene visualizzato il seguente errore:

Si sono verificati problemi durante il richiamo del codice dal plug-in: "org.eclipse.jface".

Ciò si verifica quando faccio clic sul pulsante Configura e tento di riconfigurare una specifica regola di controllo selezionata nell'interfaccia utente.

Qualcuno ha mai riscontrato questo problema prima e come può essere risolto?

L'errore lista completa e analisi dello stack è il seguente:

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$1.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$1.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$4.widgetDefaultSelected(Unknown Source) 
at org.eclipse.jface.util.OpenStrategy.fireDefaultSelectionEvent(Unknown Source) 
at org.eclipse.jface.util.OpenStrategy.access$0(Unknown Source) 
at org.eclipse.jface.util.OpenStrategy$1.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$6(Unknown Source) 
at net.sf.eclipsecs.ui.config.CheckConfigurationWorkingSetEditor$PageController.doubleClick(Unknown Source) 
at org.eclipse.jface.viewers.StructuredViewer$1.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$1.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$4.widgetDefaultSelected(Unknown Source) 
at org.eclipse.jface.util.OpenStrategy.fireDefaultSelectionEvent(Unknown Source) 
at org.eclipse.jface.util.OpenStrategy.access$0(Unknown Source) 
at org.eclipse.jface.util.OpenStrategy$1.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$2(Unknown Source) 
at org.eclipse.jface.action.ActionContributionItem$5.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$1.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) 

E i dati di sessione:

Session 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 
+0

http://stackoverflow.com/questions/13085534/problems-occurred- when-invoking-code-da-plug-in-org-eclipse-jface – abdelhady

risposta

0

La mia semplice ipotesi è che la versione di Eclipse che RSA 7.0 si basa su mancano alcuni metodi che la tua versione di stile di controllo sta volendo. RSA 7.5 utilizza Eclipse 3.4 e ne sono stato molto contento.

+0

Grazie, -clean ha funzionato per me nel correggere lo stesso errore. –

31

Provare a iniziare Eclipse dalla console/terminale con l'opzione -clean.

Su Windows:

Eclipse.exe -clean 

Su * nix:

./eclipse -clean 

o se Eclipse è nel vostro PATH

eclipse -clean 

Ciò svuotare la cache dei plug-in, forse risolve il problema

+0

ha funzionato per me. anche se ho dovuto rimuovere manualmente una cartella di plugin in quanto la pulizia non ha avuto successo. – Achow

0

Prima errore: java.lang.IllegalArgumentException: Argomento non può essere nullo, Problemi verificato quando invocando codice plug-in: "org.eclipse.jface".

public class Preference_Page_Dialog extends FieldEditorPreferencePage implements IWorkbenchPreferencePage { 
    @Override 
    public void init(IWorkbench workbench) { 
     addField(new StringFieldEditor("Number", "A Number is ",getFieldEditorParent()));   
    } 

    @Override 
    protected void createFieldEditors() { 
     setPreferenceStore(Activator.getDefault().getPreferenceStore()); 
    } 
} 

Il mio problema risolvere in questo modo (dopo)

createFieldEditors() includono addField(new StringFieldEditor(..)),addField(new RadioGroupFieldEditor()),addField(new BooleanFieldEditor()) e addField(new DirectoryFieldEditor(..)) ecc ...

public class Preference_Page_Dialog extends FieldEditorPreferencePage implements IWorkbenchPreferencePage { 
    @Override 
    public void init(IWorkbench workbench) { 
     setPreferenceStore(Activator.getDefault().getPreferenceStore()); 
    } 

    @Override 
    protected void createFieldEditors() { 
     addField(new StringFieldEditor("Number", "A Number is ",getFieldEditorParent())); 
    } 
}