在Eclipse RCP插件上加载DLL的首选方法是什么? [英] What is the preferred way to load a DLL on an Eclipse RCP plugin?

查看:163
本文介绍了在Eclipse RCP插件上加载DLL的首选方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Eclipse RCP插件,需要一个DLL。

I have an Eclipse RCP plugin that requires a DLL.

将DLL参考添加到MANIFEST中,推荐的最佳做法是什么? DLL应该放在哪里,推荐的目录名称是什么?

What is the recommended best practice to add the DLL reference to the MANIFEST? Where should the DLL be located, what is the recommended directory name?

我已经阅读了冲突的做法。有些人要求您创建一个具有架构和处理器类型的文件夹,有些要求在Manifest上设置一些平台过滤器。

I have read conflicting practices. Some ask you to create a folder with the architecture and processor type, some ask to set some platform filters on the Manifest....

推荐答案

eclipse应用程序中最好的方法是使用插件片段。一个标准的eclipse项目(具有dll)将为所有支持的平台提供多个片段。如果目标平台(在平台筛选器中指定),碎片将仅被激活。

The best way in an eclipse application is to use plug-in fragments. A standard eclipse project (with dlls) will have multiple fragments for all supported platforms. The fragments will only be activated if the target platforms (specified in the Platform Filter).

从eclipse文档(附带标准eclipse安装)

From the eclipse documentation (provided with a standard eclipse install)

平台过滤器是一个有效的LDAP字符串,必须在运行的系统中评估为true,以便插件运行。例如,以下过滤器表示插件被设计为仅在具有win32窗口系统的平台上运行:Eclipse-PlatformFilter:(ws = win32)。如果用户尝试在不符合此要求的平台上运行Eclipse,则该插件将被运行时默认忽略。

A Platform filter is a valid LDAP string that must evaluate to true in a running system for the the plug-in to run. For example, the following filter indicates that the plug-in is designed to only run on platforms with a win32 windowing system: Eclipse-PlatformFilter: (ws=win32). If a user attempts to run Eclipse on a platform that does not meet this requirement, the plug-in will be silently ignored by the runtime.

这篇关于在Eclipse RCP插件上加载DLL的首选方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆