我发现很难很好地表达这个问题,因为有很多通用术语(运行,配置,启动等).开始:
您可以将运行配置保存在.launch
文件中.(在"运行配置"对话框的"公用"选项卡下,另存为共享文件.
我们检查这些到SVN.开发人员可以传递它们,它有助于让新的开发人员更快地运行工作应用程序.
我想将这些作为构建的一部分进行检查,并使用它们以编程方式运行应用程序,测试等,而无需启动整个IDE.
.launch
在UI之外运行文件的最佳方法是什么?
编辑:我试图统一在构建服务器和IDE上运行的测试.我并不特别想放弃集成调试,这是运行测试的ant脚本的情况.
对于使用多个捆绑包进行集成测试,或者对整个捆绑包进行单元测试,这可能是一个问题,您可能希望模拟扩展.
我有一个带有视图的Eclipse RCP应用程序的插件.在RCP应用程序中发生事件后,插件被实例化,调用其方法来填充插件的模型,但是我无法找到如何在不进入"Show View ..."菜单的情况下显示视图.
我认为工作台单例中会有一些东西可以处理这个问题,但我还没有发现任何地方.
在我们的Eclipse插件应用程序中,Eclipse启动时需要很长时间,用户在应用程序的左下角看到"Initialize Java tooling"消息.因为我们的用户与java没有任何关系,我想知道是否可以禁用Initialize Java工具.
另一个问题:什么是Initialize Java工具?
我需要在一组eclipse插件测试中使用JUnit 4.4(或更新版本),但我遇到了以下问题:
使用springsource(junit44和junit45)中的junit 4.4或4.5 bundle运行时,未检测到测试.可以使用eclipse获得的org.junit4包提供junit 4.3(从Ganymead/Eclipse 3.4开始).org.junit4包确实可以识别并运行测试,但它与最新版本的JMock不兼容,我需要使用模拟库.
这是一个示例测试:
package testingplugin;
import static org.junit.Assert.*;
import org.junit.Test;
public class ActivatorTest {
@Test
public final void testDoaddTest() {
fail("Not yet implemented");
}
}
Run Code Online (Sandbox Code Playgroud)
运行此测试时,我收到以下异常:
java.lang.Exception: No runnable methods
at org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:33)
at org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunner.main(RemotePluginTestRunner.java:62)
at org.eclipse.pde.internal.junit.runtime.CoreTestApplication.run(CoreTestApplication.java:23)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:574)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:195)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) …
Run Code Online (Sandbox Code Playgroud) 我编写了一个Eclpise插件(CDT的Error Parser),它在eclipse的调试版中运行得很好.但是我不能为我的生活弄清楚如何将插件安装到eclipse中.我可以将插件导出为jar文件,它似乎导出没有错误.我把插件jar文件放到了eclipse\dropins中,并没有被eclipse加载.如果我将它添加到插件目录,没有运气.功能目录似乎也忽略了我的插件.
所以我想,好吧,我会尝试通过GUI安装它.所以我浏览到插件存档的位置并将其添加为本地更新站点,但是eclipse抱怨那里没有插件.
我很沮丧.请帮忙.
我有一堆Eclipse插件和功能,我想构建它作为夜间(无头)构建的一部分.我设法使用一个复杂的设置,包括手动指定Eclipse插件jar的路径,复制customTargets.xml等.
真的没有更简单的解决方案吗?有没有办法只指出我的更新站点的site.xml并说"build"; 即相当于点击更新站点项目中的"全部构建"?
为了打开模式对话框,您需要传递父窗口,并将对话框的必要标志传递给模态.
根据您在eclipse基础架构中的位置,找到这个父窗口并不总是那么容易.
如何访问父窗口?
我最近从Eclipse Kepler升级到Luna.我一直在处理的插件现在显示构建错误而没有任何源被更改.
这是我的MANIFEST.MF的摘录,
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
org.eclipse.ui;bundle-version="3.7.0",
org.eclipse.ui.ide;bundle-version="3.7.0",
org.eclipse.core.resources;bundle-version="3.7.0",
org.eclipse.ui.forms;bundle-version="3.6.0",
org.eclipse.wst.sse.ui;bundle-version="1.3.0",
org.eclipse.jface.text;bundle-version="3.8.100",
org.eclipse.ui.workbench.texteditor;bundle-version="3.8.101",
org.eclipse.ui.views;bundle-version="3.6.0"
Run Code Online (Sandbox Code Playgroud)
没有解决任何问题core
或ui
捆绑问题.我不认为Eclipse甚至可以在没有它们的情况下运行,并且它们的等效.jar文件存在且可读且未作为升级的一部分进行修改,因此它们实际上并未丢失.当我尝试在"依赖关系"选项卡上添加依赖项时,问题包不会显示.
Eclipse由Linux Linux包管理器升级.我提到它的完整性,但相信它可能与任何其他升级机制相同.我也试过创建一个新的插件项目,但同样的情况发生,我想这意味着它是一个全局设置.我对PDE比较新,到目前为止还没有必要更改任何设置.
我正在开发Eclipse插件,我需要能够为每个插件自动构建和执行测试套件.(使用Junit)
测试是在Eclipse中工作,并按照上述方法我可以打破插件到实际的插件和片段插件单元测试在这里,这里和在几个地方在这里.
但是,上述每种方法都会导致相同的问题:发出构建或应触发测试的java ant task/commandline命令,不会产生可观察到的副作用,并返回值"13".我已经尝试了所有我能找到的东西,并且我已经了解了Eclipse如何启动(例如:从v3.3开始,你不能再使用startup.jar - 它不存在 - 但你应该使用org.eclipse.equinox.launcher).不幸的是,虽然这显然是必要的信息,但远远不够.
我正在使用Eclipse 3.4,Junit 4.3.1(org.junit4包,但我更喜欢使用JUnit 4.4.请看这里.)
所以,我的问题是:你如何自动化Eclipse插件的构建和测试?
编辑:为了澄清,我想使用像ant +巡航控制这样的东西,但我甚至无法让单元测试在 Eclipse之外运行.我说"类似的东西",因为有其他技术可以实现同样的目标,而且我不会那么挑剔,因为它丢弃了一个解决方案,只是因为它使用了say,Maven或Buckminster,如果这些技术使这变得更容易.
Edit2:上面提到的'Java Result 13'似乎是由于无法找到coretestrunner造成的.从日志中:
java.lang.RuntimeException: Application "org.eclipse.test.coretestapplication" could not be found in the registry. The applications available are: org.eclipse.equinox.app.error, com.rcpquickstart.helloworld.application.
at org.eclipse.equinox.internal.app.EclipseAppContainer.startDefaultApp(EclipseAppContainer.java:242)
at org.eclipse.equinox.internal.app.MainApplicationLauncher.run(MainApplicationLauncher.java:29)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:382)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
at org.eclipse.equinox.launcher.Main.main(Main.java:1212) …
Run Code Online (Sandbox Code Playgroud) 自升级到Eclipse 3.7以来,Eclipse PDE插件希望我为所有Eclipse插件项目指定"API Baseline".
然而,似乎没有文件实际上解释了什么'API Baseline'在这里代表什么,以及它用于什么.
有人可以解释一下吗?
eclipse-pde ×10
eclipse ×8
java ×4
eclipse-rcp ×3
junit ×2
eclipse-3.4 ×1
pde ×1
rcp ×1
testing ×1
unit-testing ×1