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: | Default keymap is always "Netbeans" | ||
---|---|---|---|
Product: | editor | Reporter: | SirIntellegence |
Component: | Key bindings | Assignee: | Svata Dedic <sdedic> |
Status: | NEW --- | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | 8.0.2 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | ENHANCEMENT | Exception Reporter: |
Description
SirIntellegence
2015-06-04 23:26:49 UTC
Even then, it looks like it gets set in KeymapModel$PL.run to "Netbeans"... One could work around it with this: try{ ClassLoader allLoader = Lookup.getDefault().lookup(ClassLoader.class); Class<?> layerBridgeClass = Class.forName("org.netbeans.modules." + "options.keymap.LayersBridge", true, allLoader); Object instance = Lookup.getDefault().lookup(layerBridgeClass); Method getCurProfile = layerBridgeClass.getMethod("getCurrentProfile"); Object curProfile = getCurProfile.invoke(instance); if (curProfile == null){ Method setCurProfile = layerBridgeClass.getMethod("setCurrentProfile", String.class); setCurProfile.invoke(instance, "Fluency"); } } catch (InvocationTargetException ite){ //it's a simple getter/seter, it shouldn't explode throw new AssertionError(ite); } catch (IllegalAccessException iae){ //All items are public... throw new AssertionError(iae); } catch (ReflectiveOperationException e){ //ClassNotFound and NoSuchMethod //It should exist... throw new AssertionError(e); } catch (IllegalArgumentException e){ // The arguments should be right throw new AssertionError(e); } It appears I forgot to remove the name of the product I am working on... Could an admin remove it please? re-assigning to correct component. Please evaluate. thank you A question: do you need a [default] profile with a different ID, or a profile with a different display name ? If the latter, you can brand the NetBeans keymap folder in the XML layer (Keymaps/NetBeans) according to your product just as any other filename: org.netbeans.modules.defaults.Bundle_product[_locale].properties: Keymaps/NetBeans=FancyProduct |