I'm writing an Eclipse plugin that creates an alternative IDetailPane
for the debugger.
我正在编写一个Eclipse插件,为调试器创建一个替代的IDetailPane。
I created an implementation of IDetailPaneFactory
that returns my IDetailPane
's ID and it's .getDetailPaneTypes(...)
method gets called.
我创建了一个IDetailPaneFactory的实现,它返回我的IDetailPane的ID,并调用它的.getDetailPaneTypes(...)方法。
However, now the field DetailPaneManager.fPreferredDetailPanes
is a Map<Set<String>, String>
with the content:
但是,现在,字段DetailPaneManager.fPreferredDetailPanes是一个Map
{
[DefaultDetailPane]=DefaultDetailPane
[DefaultDetailPane, MyDetailPane]=DefaultDetailPane
}
I want to change the 2nd item so that it'll map to "MyDetailPane" instead.
我想更改第二个项目,以便它将映射到“MyDetailPane”。
Is this a user setting that I can change somewhere in the settings? (tried finding it in the preferences but didn't see anything relevant). Is this hard coded somewhere? Can I change something in my plugin's Activator
to control this? (tried changing the value during my Activator.start(...)
, but at this point fPreferredDetailPanes
doesn't contain the 2nd item in the map)
这是一个用户设置,我可以在设置中的某处更改吗? (尝试在偏好中找到它但没有看到任何相关的内容)。这是硬编码吗?我可以在插件的Activator中更改某些内容来控制它吗? (尝试在我的Activator.start(...)期间更改值,但此时fPreferredDetailPanes不包含地图中的第二项)
1 个解决方案
#1
0
It looks like the chooseDetailsAreaIDInSet
method in DetailPaneManager
chooses the preferred pane by iterating through the detail pane factories calling getDefaultDetailPane(selection)
, the first factory to return a id from this wins.
貌似,DetailPaneManager中的chooseDetailsAreaIDInSet方法通过遍历详细窗格工厂调用getDefaultDetailPane(selection)来选择首选窗格,第一个工厂从此wins返回一个id。
The AvailableDetailPanesAction.SetDetailPaneAction
menu action can override this with the user's choice.
AvailableDetailPanesAction.SetDetailPaneAction菜单操作可以根据用户的选择覆盖它。
#1
0
It looks like the chooseDetailsAreaIDInSet
method in DetailPaneManager
chooses the preferred pane by iterating through the detail pane factories calling getDefaultDetailPane(selection)
, the first factory to return a id from this wins.
貌似,DetailPaneManager中的chooseDetailsAreaIDInSet方法通过遍历详细窗格工厂调用getDefaultDetailPane(selection)来选择首选窗格,第一个工厂从此wins返回一个id。
The AvailableDetailPanesAction.SetDetailPaneAction
menu action can override this with the user's choice.
AvailableDetailPanesAction.SetDetailPaneAction菜单操作可以根据用户的选择覆盖它。