根据选择的工作区更改 Eclipse 的图标

发布于 2024-07-20 09:53:32 字数 132 浏览 6 评论 0原文

是否可以通过某种方式根据所选工作区更改 Eclipse 工作区的图标? 我在不同的 Eclipse 实例中打开了多个运行的工作区,识别起来变得很复杂。 我尝试了位置参数,它显示了位置,但它根据包资源管理器/导航器中目录的选择而变化。 有小费吗?

Is it possible in some way to change icon of the Eclipse workspace based on the workspace chosen? I have multiple workspace open running in different Eclipse instances and it becomes complex to recognize. I tried the location argument, which shows the location, but it changes based on selection of directory in the Package Explorer/Navigator. Any tips?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

只有一腔孤勇 2024-07-27 09:53:32

在 Eclipse 中,产品是使用 产品扩展点。 除此之外,这个扩展点定义了品牌图标。 这些会影响 Windows 任务栏以及 alt-tab 列表中的图标。

您可以做的是创建自己的插件来定义每个使用不同图标的新产品,然后这些产品就可以运行常规的 eclipse 应用程序。 您可以在命令行上在产品之间切换。

产品扩展点将是这样的:

  <extension id="my_product_1" point="org.eclipse.core.runtime.products">
      <product application="org.eclipse.ui.ide.workbench" name="My Product">
         <property name="windowImages" value="icons/sample2.gif" />
         <property name="appName"      value="My Product"/>
         <property name="aboutImage"   value="product_lg.gif"/>
         <property name="aboutText"    value="My Product"/>
      </product>
   </extension>

您可以在同一个插件中创建多个扩展点,每个扩展点引用不同的图标。 您可以通过使用 RCP 邮件模板创建新插件来查看示例。

您可以在命令行上使用“-product [插件 ID].[产品 ID]”引用此产品。 因此,您可以使用不同的命令行创建多个窗口快捷方式,指定不同的产品和工作空间:

eclipse -product org.my.plugin.my_product_1 -data /path/workspace1
eclipse -product org.my.plugin.my_product_2 -data /path/workspace2 

在 Eclipse 3.3 及更早版本中,您只需将插件复制到 eclipse/plugins 目录即可使用。 在 3.5 中,插件导出期间有一个选项“安装到主机”。 在 3.4(和 3.5)中,有 dropins 文件夹。

In Eclipse, products are define using the products extension point. Among other things, this extension point defines branding icons. These affect the windows task bar, and also the icons in the alt-tab list.

What you could do is create your own plug-in that defines new products that each use a different icon, these products can then just run the regular eclipse application. You can switch between products on the command line.

The product extension point would be like this:

  <extension id="my_product_1" point="org.eclipse.core.runtime.products">
      <product application="org.eclipse.ui.ide.workbench" name="My Product">
         <property name="windowImages" value="icons/sample2.gif" />
         <property name="appName"      value="My Product"/>
         <property name="aboutImage"   value="product_lg.gif"/>
         <property name="aboutText"    value="My Product"/>
      </product>
   </extension>

You can create several in the same plug-in, each referring to a different icon. You can see an example by creating a new plug-in using the RCP Mail Template.

You refer to this product on the command line with "-product [plug-in id].[product-id]". So you can create several windows shortcuts with different command lines, specifying different products and workspaces:

eclipse -product org.my.plugin.my_product_1 -data /path/workspace1
eclipse -product org.my.plugin.my_product_2 -data /path/workspace2 

In Eclipse 3.3 and earlier, you can just copy your plug-in into the eclipse/plugins directory for it to be used. In 3.5 there is an option during plug-in export to "Install into host". In 3.4 (and 3.5) there is the dropins folder.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文