我已经编写了一个简单的Eclipse插件来从命令行导入首选项,这看起来效果很好。该插件使用$scope.selected = "Tutorial";
$scope.setTutorial = function(value) {
$scope.selected = value;
}
执行,但在插件执行后,eclipse在我的Activator中调用eclipsec.exe -consoleLog -console -noSplash -application headless.prefs.import preferences.epf
方法,执行另一个插件中断:
堆栈跟踪:(前两行是我的插件退出)
stop()
应该注意的是插件正在运行,而早些时候我得到了#34;无法瞬态启动捆绑.. ..捆绑包的起始等级未达到"。
有没有办法配置我的plugin.xml或激活器来尝试清除这些错误,或强制从Preferences Imported.
Importer exit.
!ENTRY org.eclipse.core.resources 4 2 2015-07-07 14:06:49.300
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.core.resources".
!STACK 0
java.lang.IllegalStateException: BundleContext is no longer valid
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.checkValid(BundleContextImpl.java:931)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.createFilter(BundleContextImpl.java:917)
at org.osgi.util.tracker.ServiceTracker.<init>(ServiceTracker.java:197)
at org.eclipse.pde.internal.core.PDERegistryStrategy.getXMLParser(PDERegistryStrategy.java:167)
at org.eclipse.core.internal.registry.ExtensionRegistry.addContribution(ExtensionRegistry.java:1062)
at org.eclipse.pde.internal.core.PDERegistryStrategy.addBundle(PDERegistryStrategy.java:209)
at org.eclipse.pde.internal.core.PDERegistryStrategy.addBundles(PDERegistryStrategy.java:179)
at org.eclipse.pde.internal.core.PDERegistryStrategy.processBundles(PDERegistryStrategy.java:174)
at org.eclipse.pde.internal.core.PDERegistryStrategy.onStart(PDERegistryStrategy.java:154)
at org.eclipse.core.internal.registry.ExtensionRegistry.<init>(ExtensionRegistry.java:725)
at org.eclipse.core.runtime.RegistryFactory.createRegistry(RegistryFactory.java:58)
at org.eclipse.pde.internal.core.PDEExtensionRegistry.createRegistry(PDEExtensionRegistry.java:85)
at org.eclipse.pde.internal.core.PDEExtensionRegistry.getRegistry(PDEExtensionRegistry.java:77)
at org.eclipse.pde.internal.core.PDEExtensionRegistry.getExtensionPoint(PDEExtensionRegistry.java:134)
at org.eclipse.pde.internal.core.PDEExtensionRegistry.findExtensions(PDEExtensionRegistry.java:205)
at org.eclipse.pde.internal.core.SourceLocationManager.processExtensions(SourceLocationManager.java:342)
at org.eclipse.pde.internal.core.SourceLocationManager.getExtensionLocations(SourceLocationManager.java:192)
at org.eclipse.pde.internal.core.SourceLocationManager.searchExtensionLocations(SourceLocationManager.java:273)
at org.eclipse.pde.internal.core.SourceLocationManager.findSourcePath(SourceLocationManager.java:60)
at org.eclipse.pde.internal.core.ClasspathUtilCore.getSourceAnnotation(ClasspathUtilCore.java:154)
at org.eclipse.pde.internal.core.PDEClasspathContainer.addExternalPlugin(PDEClasspathContainer.java:66)
at org.eclipse.pde.internal.core.RequiredPluginsClasspathContainer.addPlugin(RequiredPluginsClasspathContainer.j
ava:256)
at org.eclipse.pde.internal.core.RequiredPluginsClasspathContainer.addDependency(RequiredPluginsClasspathContain
er.java:230)
at org.eclipse.pde.internal.core.RequiredPluginsClasspathContainer.addDependency(RequiredPluginsClasspathContain
er.java:214)
at org.eclipse.pde.internal.core.RequiredPluginsClasspathContainer.computePluginEntries(RequiredPluginsClasspath
Container.java:129)
at org.eclipse.pde.internal.core.RequiredPluginsClasspathContainer.getClasspathEntries(RequiredPluginsClasspathC
ontainer.java:88)
at org.eclipse.jdt.internal.core.JavaModelManager.containerPutIfInitializingWithSameEntries(JavaModelManager.jav
a:645)
at org.eclipse.jdt.internal.core.SetContainerOperation.executeOperation(SetContainerOperation.java:49)
at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:728)
at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:788)
at org.eclipse.jdt.internal.core.JavaModelManager.getClasspathContainer(JavaModelManager.java:1879)
at org.eclipse.jdt.core.JavaCore.getClasspathContainer(JavaCore.java:2811)
at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:2689)
at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:2853)
at org.eclipse.jdt.internal.core.JavaProject.getResolvedClasspath(JavaProject.java:1958)
at org.eclipse.jdt.internal.core.ExternalFoldersManager.refreshReferences(ExternalFoldersManager.java:361)
at org.eclipse.jdt.internal.core.DeltaProcessor.resourceChanged(DeltaProcessor.java:2004)
at org.eclipse.jdt.internal.core.DeltaProcessingState.resourceChanged(DeltaProcessingState.java:470)
at org.eclipse.core.internal.events.NotificationManager$1.run(NotificationManager.java:291)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:285)
at org.eclipse.core.internal.events.NotificationManager.handleEvent(NotificationManager.java:267)
at org.eclipse.core.internal.resources.Workspace.broadcastEvent(Workspace.java:390)
at org.eclipse.core.internal.resources.Resource.refreshLocal(Resource.java:1662)
at org.eclipse.core.internal.refresh.RefreshJob.runInWorkspace(RefreshJob.java:167)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
方法退出eclipse?之后不需要调用任何其他东西这一点。