Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我为 Eclipse 创建了一个无头插件,需要访问工作区。有人有 API 文档或其他信息吗?
ResourcesPlugin.getWorkspace()会给你IWorkspace。
ResourcesPlugin.getWorkspace()
IWorkspace
您需要为-data <workspacelocation>无头应用指定参数。您可以检查是否已使用以下内容指定:
-data <workspacelocation>
final Location instanceLoc = Platform.getInstanceLocation(); if (instanceLoc == null || !instanceLoc.isSet()) { // handle error here }