Erreur "Workbench n'a pas encore été créé" dans la programmation du plug-in eclipse

Avec mon plugin eclipse lancement, j'ai eu Root exception:java.lang.IllegalStateException: Workbench has not been created yet. erreur.

Et il semble provoquer des effets secondaires pour faire quelques bundle erreur d'exception. Je ne pense pas que mon code utilise egit module.

org.osgi.framework.BundleException: Exception in org.eclipse.egit.ui.Activator.start() of bundle org.eclipse.egit.ui.
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:734)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
    at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
    at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:300)

Comment puis-je supprimer cette erreur? C'est le code qui accède à l'espace de travail. J'ai trouvé cet article - Débogage de l'échec d'un lancement d'Eclipse disant que c'est une condition de course, mais je ne sais pas pourquoi j'ai condition de course, et si oui, comment l'enlever.

public void renameClassRefactor() throws CoreException {
    //get the project information with ResourcesPlugin
    IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
    //1. The name of the project in the workspace

    System.out.println(ResourcesPlugin.getWorkspace().toString());
    java.io.File workspaceDirectory = root.getLocation().toFile();
    System.out.println(workspaceDirectory.toString());

source d'informationauteur prosseek