GavriYashar / Matlab-Editor-Plugin

Extends features for the matlab editor, Bookmarks, FileStructure, Clipboard stack
MIT License
74 stars 12 forks source link

Can't open MEP-> Settings in Preferences #53

Closed michaelkonecny closed 7 years ago

michaelkonecny commented 7 years ago

When I go Home->Preferences->MEP and click no Settings, nothing happens and I get this in the console:

PrefsDialog: java.lang.IllegalArgumentException invoking at.justin.matlab.prefs.PrefsPanel.createPrefsPanel: Key ExtendedCommand is not found or not boolean
java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.mathworks.mlwidgets.prefs.PrefsPanelWrapper.createPanel(PrefsPanelWrapper.java:140)
    at com.mathworks.mlwidgets.prefs.PrefsPanelWrapper.getComponent(PrefsPanelWrapper.java:95)
    at com.mathworks.widgets.prefs.PrefsUtils$2.getComponent(PrefsUtils.java:91)
    at com.mathworks.widgets.prefs.DefaultPrefsContainer.display(DefaultPrefsContainer.java:180)
    at com.mathworks.widgets.prefs.GenericPrefsDialog$6.nodeDisplayed(GenericPrefsDialog.java:404)
    at com.mathworks.widgets.prefs.AbstractPrefsNavigator.fireNodeDisplayed(AbstractPrefsNavigator.java:47)
    at com.mathworks.widgets.prefs.PrefsNavigationTree.changeNode(PrefsNavigationTree.java:270)
    at com.mathworks.widgets.prefs.PrefsNavigationTree.access$400(PrefsNavigationTree.java:39)
    at com.mathworks.widgets.prefs.PrefsNavigationTree$4.valueChanged(PrefsNavigationTree.java:208)
    at javax.swing.JTree.fireValueChanged(Unknown Source)
    at javax.swing.JTree$TreeSelectionRedirector.valueChanged(Unknown Source)
    at javax.swing.tree.DefaultTreeSelectionModel.fireValueChanged(Unknown Source)
    at javax.swing.tree.DefaultTreeSelectionModel.notifyPathChange(Unknown Source)
    at javax.swing.tree.DefaultTreeSelectionModel.setSelectionPaths(Unknown Source)
    at javax.swing.tree.DefaultTreeSelectionModel.setSelectionPath(Unknown Source)
    at javax.swing.JTree.setSelectionPath(Unknown Source)
    at javax.swing.plaf.basic.BasicTreeUI.selectPathForEvent(Unknown Source)
    at javax.swing.plaf.basic.BasicTreeUI$Handler.handleSelection(Unknown Source)
    at javax.swing.plaf.basic.BasicTreeUI$Handler.mousePressed(Unknown Source)
    at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
    at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
    at java.awt.Component.processMouseEvent(Unknown Source)
    at javax.swing.JComponent.processMouseEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    at java.awt.EventQueue.access$200(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue$4.run(Unknown Source)
    at java.awt.EventQueue$4.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.IllegalArgumentException: Key ExtendedCommand is not found or not boolean
    at at.justin.matlab.prefs.Settings.getPropertyBoolean(Settings.java:114)
    at at.justin.matlab.prefs.PrefsPanelUtil.getCheckBox(PrefsPanelUtil.java:148)
    at at.justin.matlab.prefs.PrefsPanelUtil.getComponentsForSetting(PrefsPanelUtil.java:22)
    at at.justin.matlab.prefs.PrefsPanel.addPropsToPanel(PrefsPanel.java:150)
    at at.justin.matlab.prefs.PrefsPanel.addOtherProps(PrefsPanel.java:199)
    at at.justin.matlab.prefs.PrefsPanel.setLayout(PrefsPanel.java:115)
    at at.justin.matlab.prefs.PrefsPanel.<init>(PrefsPanel.java:29)
    at at.justin.matlab.prefs.PrefsPanel.<init>(PrefsPanel.java:33)
    at at.justin.matlab.prefs.PrefsPanel.createPrefsPanel(PrefsPanel.java:37)
    ... 56 more
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    at java.awt.Container.addImpl(Unknown Source)
    at java.awt.Container.add(Unknown Source)
    at com.mathworks.widgets.prefs.DefaultPrefsContainer.display(DefaultPrefsContainer.java:197)
    at com.mathworks.widgets.prefs.GenericPrefsDialog$6.nodeDisplayed(GenericPrefsDialog.java:404)
    at com.mathworks.widgets.prefs.AbstractPrefsNavigator.fireNodeDisplayed(AbstractPrefsNavigator.java:47)
    at com.mathworks.widgets.prefs.PrefsNavigationTree.changeNode(PrefsNavigationTree.java:270)
    at com.mathworks.widgets.prefs.PrefsNavigationTree.access$400(PrefsNavigationTree.java:39)
    at com.mathworks.widgets.prefs.PrefsNavigationTree$4.valueChanged(PrefsNavigationTree.java:208)
    at javax.swing.JTree.fireValueChanged(Unknown Source)
    at javax.swing.JTree$TreeSelectionRedirector.valueChanged(Unknown Source)
    at javax.swing.tree.DefaultTreeSelectionModel.fireValueChanged(Unknown Source)
    at javax.swing.tree.DefaultTreeSelectionModel.notifyPathChange(Unknown Source)
    at javax.swing.tree.DefaultTreeSelectionModel.setSelectionPaths(Unknown Source)
    at javax.swing.tree.DefaultTreeSelectionModel.setSelectionPath(Unknown Source)
    at javax.swing.JTree.setSelectionPath(Unknown Source)
    at javax.swing.plaf.basic.BasicTreeUI.selectPathForEvent(Unknown Source)
    at javax.swing.plaf.basic.BasicTreeUI$Handler.handleSelection(Unknown Source)
    at javax.swing.plaf.basic.BasicTreeUI$Handler.mousePressed(Unknown Source)
    at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
    at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
    at java.awt.Component.processMouseEvent(Unknown Source)
    at javax.swing.JComponent.processMouseEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    at java.awt.EventQueue.access$200(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue$4.run(Unknown Source)
    at java.awt.EventQueue$4.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)

On Matlab R2016b.

GavriYashar commented 7 years ago

Sorry forgot to remove deprecated fields... A workaround is to create this field(s) in the property file and set them to false.

If others are thrown afterwords similar to this bug the property types are found here

@me try catch it

michaelkonecny commented 7 years ago

OK, thanks.

For anyone else, you need to add this to your DefaultProps.properties before this bug gets resolved:

# deprecated properties
ExtendedCommand = false
LoadMessDaten_Shortener = false
AutoLoadShortcuts = false
EnableStartup = false
EnableMethodsView = false
UseLDS = false
showQuotes = false
FreeCommander = false
DefaultFigureGraphicsSmoothing = false
LoadMessDaten_Shortener = false
LoadMessDaten_NoExprManipulate = false
LoadMessDaten_EnableSimpleView = false
GavriYashar commented 7 years ago

is it possible that isPublicUser is set to false instead of true?

michaelkonecny commented 7 years ago

It was, actually, (sorry about that... side note: it would be nice to change it to true in DefaultProps.properties, so people don't have to worry about it...).

But even if I change it to true, the error still appears.

GavriYashar commented 7 years ago

good to know, thanks