|
|
|
|
Re: Problem using activeEditorInput with Commands [message #505028 is a reply to message #504977] |
Thu, 24 December 2009 18:06 |
Michael Schmidt Messages: 45 Registered: July 2009 |
Member |
|
|
Thanks for the ideas. I did a debug with the tracings options and this provided interesting information. Still, the problem persists and I wonder if there is a bug.
From the tracings, the activePart and activeEditor values are from the editor's toString() method. I confirmed this with a dummy command using the following code in the execute method.
System.out.println("1 " + ISources.ACTIVE_EDITOR_ID_NAME + " " + HandlerUtil.getVariable(event, ISources.ACTIVE_EDITOR_ID_NAME));
System.out.println("2 " + ISources.ACTIVE_EDITOR_INPUT_NAME + " " + HandlerUtil.getVariable(event, ISources.ACTIVE_EDITOR_INPUT_NAME));
System.out.println("3 " + ISources.ACTIVE_EDITOR_NAME + " " + HandlerUtil.getVariable(event, ISources.ACTIVE_EDITOR_NAME));
System.out.println("4 " + ISources.ACTIVE_PART_ID_NAME + " " + HandlerUtil.getVariable(event, ISources.ACTIVE_PART_ID_NAME));
System.out.println("5 " + ISources.ACTIVE_PART_NAME + " " + HandlerUtil.getVariable(event, ISources.ACTIVE_PART_NAME));
This results in the following console output
1 activeEditorId us.mschmidt.akinoowin.dbeditors.DbEditor
2 activeEditorInput By Lead Author
3 activeEditor Table Editor By Lead Author
4 activePartId us.mschmidt.akinoowin.dbeditors.DbEditor
5 activePart Table Editor By Lead Author
I then create a visibleWhen <with> <equals> condition and cut-and-paste the values from the console into the xml (to avoid typos). The command is visible with conditions 1 and 4 but not 2, 3, or 5. So, apparently it evaluates correctly for the class references but not for the toString() values. Any thoughts?
|
|
|
|
Powered by
FUDForum. Page generated in 0.04980 seconds