我创建了一个有一个*.product
文件的Eclipse插件应用程序。为了运行该应用程序,我必须右键单击该应用程序,然后以Eclipse应用程序的身份运行/调试,然后我的应用程序将打开并且其主题与Eclipse工作区相同。
要求是为此Eclipse插件应用程序(而不是工作区)设置类似Moonrise的Eclipse主题,因此我无法在哪里保存或更改此插件的主题。
任何帮助,将不胜感激。下面是产品文件的图像:
最佳答案
这是通过org.eclipse.core.runtime.products
扩展点和plugin.xml
文件中指定产品的产品属性cssTheme(在您的情况下为com.testlid.main.ui/plugin.xml
)完成的:
<extension id="product"
point="org.eclipse.core.runtime.products">
<product name="%product.name"
application="org.eclipse.ui.ide.workbench"
description="%product.description">
<!-- ... -->
<property name="cssTheme"
value="com.github.eclipseuitheme.themes.moonrise-ui.standalone"/>
<!-- ... -->
</product>
</extension>
也可以看看:
An example
Eclipse 4 CSS Styling - Tutorial
关于java - 在哪里为基于Eclipse的应用程序设置主题?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/47003337/