问题标签 [plugin.xml]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
75 浏览

plugins - Eclipse CDT 插件 - 仅限于函数名称的操作

目前我正在为 Eclipse CDT 开发一个插件。我已经在我的 plugin.xml 文件中成功地做了一个动作声明。

当我右键单击编辑器并且我可以选择该操作时,这成功地声明了一个弹出操作。

但是,我想要实现的是,只有当我右键单击函数名称/函数声明时才会出现该操作。有没有办法实现这一目标?我一直在 plugin.xml 中尝试过滤XML 标记,但没有成功。

谢谢。

0 投票
1 回答
120 浏览

java - 在插件的处理程序中调用命令 id

我有一个触发 Run( Ctrl + F11)的菜单

但我想做比跑步更多的动作。

我想在处理程序中调用 run 的命令 id

到目前为止,我只是在plugin.xml中调用了命令 id来执行它。

0 投票
0 回答
92 浏览

java - Eclipse plugin - issue passing empty command arguments from option preference in plugin.xml

I need to send empty command argument from an option preference implemented in plugin.xml when building the eclipse project.

My approach is the addition of commandGenerator option attribute, very similar implementation as applicabilityCalculator I implemented before and working fine, where you intercept the implementation of the argument in plugin.xml and add your own java code to play around with it, the attribute commandGenerator supposed to override the option commands in case you need to override them. The problem is that after implementing the functionality it doesn’t react as expected, actually it doesn’t even care about it and it doesn’t take into account its implementation, it ignores it, so the question is:

Why is commandGenerator attribute in plugin.xml ignored therefore not executing its java class implementation? Am I missing something else or mixing up some order of execution?

If option is disabled from preferences then it takes the defaultValue="" which is empty and that is perfect, it builds with no errors, but if the option is enabled --> I do apply and close --> and build project then fails as it takes the value form the option and passes that value to the command arguments, which is not supported, so my guess is that I need to pass an empty argument.

I tried to validationMessage.setCommand(""); , validationMessage.setCommandFalse(""); , validationMessage.setValue(""); and validationMessage.setDefaultValue(""); from the IOption variable and still sending the value of the IOption variable to the command line arguments when building the project, therefore failing when building project.

Any idea of what the issue could be and how could it be resolved? Thanks. Please feel free to ask if extra information is needed to find the issue. (jus to mention OptionCommandGenerator.java Path is fine)

0 投票
0 回答
121 浏览

eclipse - 如何在 Eclipse 中将自定义操作集添加到我的自定义透视图中?

有没有办法定义只有当我切换到我的自定义透视图时才可见的自定义操作集?

0 投票
1 回答
98 浏览

java - Eclipse 插件开发 - 自定义编辑器首选项

我正在开发eclipse插件。在我的编辑器插件中右键单击并选择“首选项”时,它会在“常规”下显示两棵树“外观”和“编辑器”。我想从 Window-->preference 添加更多节点,它显示代码模板、内容辅助等等。我怎样才能做到这一点?我尝试从 AbstractDecoratedTextEditor 覆盖 collectContextMenuPreferencePages 并尝试添加与代码模板相关的扩展,但它没有显示在首选项页面中。

如何将窗口中存在的常规节点添加到编辑器首选项中?谢谢你。

0 投票
0 回答
116 浏览

eclipse - 如何在 eclipse plugin.xml 文件中添加条件检查?

我需要隐藏一个与我无关的菜单项(文件 -> 退出)。我可以使用org.eclipse.ui.activities扩展来做到这一点。以下代码效果很好:

现在我需要根据一些条件来完成这项工作。我有一个程序参数(或命令行参数)“targetEnv=FDK”。仅当此参数可用时才应隐藏菜单。我尝试了下面的代码片段,但无论我在参数中提供什么,菜单项都会继续隐藏。

这是在 plugin.xml 中使用程序参数的正确方法吗?

0 投票
0 回答
23 浏览

eclipse - Eclipse 快捷方式应仅适用于包资源管理器中选定的文件或项目

我想为我的产品添加一些快捷方式,只有在我选择 DSL 文件或项目时才能激活这些快捷方式。没有可以使用的 contextID,所以我想定义自己的上下文。问题是是否可以定义一个仅在选择 DSL 文件或项目时才被激活的上下文。因为我在同一个项目中使用 DSL 文件和 Java 文件,所以我为 DSL 文件创建了一个格式化程序,但我希望这两个格式化程序使用相同的快捷方式。我需要一个取决于文件类型的 contextID。

如果您需要更多信息,请告诉我。

我希望你们能帮助我,我希望有一个解决方案。

0 投票
0 回答
17 浏览

java - Eclipse 插件/RCP:通过处理程序显示菜单

我希望创建一个工具栏,其下拉菜单与控制台视图中 Eclipse 的“打开控制台”按钮基本相同。

我可以通过以编程方式添加操作(这是控制台视图所做的)来做到这一点,但是我希望通过 plugin.xml 中的命令和处理程序来做到这一点。

https://wiki.eclipse.org/Menu_Contributions/Dropdown_Command上的说明非常好,但是我希望在单击按钮本身时显示下拉菜单(IE:单击按钮的行为与单击按钮右侧的下拉菜单三角形)。再次:与“打开控制台”按钮的工作方式相同。

但是我不知道如何在“plugin.xml 土地”中做到这一点。我在处理程序中尝试了以下内容:

...但是t.getMenu()返回一个空...

0 投票
1 回答
21 浏览

java - 自定义图标未显示在 Intellij 操作中

我正在向我的 intellij 插件操作添加自定义图标。

videoicon 是一个 16*16 的自定义图标。

我的操作工具栏没有显示图标,我做错了什么?(显示空白的第一张图像是我要显示图标的位置。

我可以通过按命令+单击来访问图标,不知道出了什么问题。

操作工具栏图片