简体   繁体   English

Java中的eclipse插件开发:如何从另一个正在运行的配置运行一个运行配置?

[英]eclipse plug-in development in java: how to run a run configuration from another running one?

I have created two views for eclipse. 我为月食创建了两个视图。 Each of this views is launched using a different run configuration (meaning a different one for each view). 使用不同的运行配置(每个视图意味着一个不同的配置)启动每个视图。

What I want to do: 我想做的事:

In the first view I have a list of elements. 在第一个视图中,我有一个元素列表。 When I double click one element I want to start the other view (maybe from its run configuration) and only then to start all the bundles. 当我双击一个元素时,我想启动另一个视图(也许从其运行配置),然后才启动所有捆绑包。

Any clue of how to do this? 有关如何执行此操作的任何线索?

Besides, I would like to send some parameters from the first view to the second one when launching. 此外,我想在启动时从第一个视图向第二个视图发送一些参数。

I hope anyone can help. 希望任何人都能提供帮助。

The Eclipse run configuration is list of complex settings including Main class, VM arguments, JRE paths, and Classpath. Eclipse运行配置是复杂设置的列表,其中包括Main类,VM参数,JRE路径和Classpath。 The Eclipse view, in your words, is the perspective which contains various window panes; 用您的话来说,Eclipse视图是包含各种窗格的透视图。 I think that's what you mean. 我想这就是你的意思。 The 2 concepts of run configuration and perspective/view are separate implementations of Eclipse, and not related. 运行配置和透视图/视图这2个概念是Eclipse的单独实现,并且不相关。 So…what you're asking seems impossible for Eclipse to do and not fitting to its design. 因此……您要问的是Eclipse不可能做到的事情,并且不适合其设计。

I propose you include your source folders into the Package Explorer workspace, which is basically just a file system. 我建议您将源文件夹包括在Package Explorer工作区中,该工作区基本上只是一个文件系统。 Afterwards, open/close the project folder when you want to change the views, using your words. 然后,当您想用文字更改视图时,打开/关闭项目文件夹。 I myself switch between 2 rather different projects between pure Java and Swing, and both contain their own Main function, for testing code in StackOverflow. 我本人在纯Java和Swing之间的2个截然不同的项目之间切换,并且都包含它们自己的Main函数,用于在StackOverflow中测试代码。 I think this is similar to your goal. 我认为这与您的目标相似。

I am not sure what you meant by “list of elements” in Eclipse. 我不确定Eclipse中“元素列表”是什么意思。 And I may not understand your exact problem. 而且我可能不明白您的确切问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM