簡體   English   中英

Eclipse 插件開發:擴展點 org.eclipse.ui.bindings 上的上下文菜單不包含 New -> Key

[英]Eclipse Plugin Development: Context menu on extension point org.eclipse.ui.bindings does not contain New -> Key

我正在關注本教程,它告訴我“添加擴展點“org.eclipse.ui.bindings”,然后“右鍵單擊此擴展點,select New→ Key”。正如您在我的屏幕截圖中看到的那樣在我的上下文菜單中沒有“新建-> 鍵”。

上下文菜單中沒有“新建 --> 鍵”

那么我錯過了什么?

在您的目標平台中,缺少org.eclipse.ui.source插件,以及org.eclipse.ui.binding擴展點的源和架構。

因為這個 Eclipse 不知道擴展點有哪些子元素並且只提供這個Generic元素。 Open Schema也不起作用,您也不會得到驗證,例如,當您將元素命名為<keys.../>而不是<key.../>時,您不會收到錯誤消息。

To fix this, you can install Eclipse PDE Plug-in Developer Resources containing the missing sources and schemas, eg from the update site http://download.eclipse.org/eclipse/updates/4.16 for - assuming you do not use an outdated Z32F72222026696F307889194DEE83E5Z-當前Z32F72F72222022022026696F3078788919194DEE83E5Z3E5E5Z版本2020-a版本2020-AS版本2020-16(4.16)(4.16)通過幫助安裝新軟件>未安裝新軟件... (當時不使用跑步平台和目標plastame intak in targe Platferal proppart at targe Platferal platch.ch) <unit id="org.eclipse.pde.source.feature.group" version="0.0.0"/> )

解決此問題的一種方法是簡單地將plugin.xml編輯為 xml 文件。 然后鍵綁定的部分可能看起來像這樣:

<extension point="org.eclipse.ui.bindings">
  <key
        commandId="Test4.commands.sampleCommand"
        contextId="org.eclipse.ui.contexts.window"
        schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
        sequence="M1+6">
  </key>
</extension>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM