This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | [jVi] EditorRegistry doesn't contain all JEditorPanes | ||
---|---|---|---|
Product: | editor | Reporter: | err <err> |
Component: | Settings | Assignee: | Vitezslav Stejskal <vstejskal> |
Status: | RESOLVED WORKSFORME | ||
Severity: | blocker | ||
Priority: | P3 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
err
2008-07-19 23:01:40 UTC
I think this is actually not a problem. Or is it? The tabs are not fully initialized until you click on them. The TC registry will obviously list them all, but they are dormant until you touch them somehow. And when you do they should get initialized and hook itself in the EditorRegistry. This is done from BaseKit install, which also installs the keymap. In other words, any JEP that you get from EditorRegistry has already had its keymap installed and the DefaultKeyTypedAction set. All others have not. I think you could test it by listing JEPs from EditorRegistry [1], then JEPs from TopComponent registry [2] and then again JEPs from EditorRegistry [3]. The number of JEPs that you get in each step should look like [1] < [2] == [3]. This situation arises around the use of the jVi disable/enable checkbox. When jVi goes from disabled to enabled it needs
to save the old DefaultKeyTypedAction and install its own. It needs to find all the JEPs that won't get kit install
actions.
There was a recommendation to use EditorRegistry to find the editors, rather than TopComponent Registry. It looks like
the semantics of ER are not quite right to entirely replace the old TCR based algorithm. jVi can use a hybrid
approach; the TCR will provide any missing TC JEPs and the ER provides any nomadic editors, such as evaluate expression.
There's some confusion because the KitInstall actions have fired, but in fact the kit has not been installed and the JEP
does not appear in the ER. There will be a problem if the nomadic editors are dormant, i.e. they are not in ER but their
kit-install actions have already fired.
If the nomadic editors can be found, then there is no issue. I was just confused and this can be closed.
Actually, I guess I'm still a little confused
> initialized and hook itself in the EditorRegistry. This is done from BaseKit install, which also installs the keymap.
Ahhh, is only the DKTA installed in the JEP when the kit-install action is invoked? And none of the other stuff?
> Ahhh, is only the DKTA installed in the JEP when the kit-install action is invoked? And none of the other stuff?
The DKTA is created as part of the BaseKit.createActions() which is called lazily from EditorKit.getActions().
kit-install actions are called during EditorKit.install() which happens once the UI gets installed into an editor pane.
The ER should include all the panes using our kits (ER.register() is called in BaseTextUI.installUI()).
Closing as worksforme. Please reopen if necessary.
|