On 05/21/2012 04:40 PM, Olivier Relot wrote: > > i'm using the XMLmind XML Editor Professional Edition 5.2.0 and i would > like to customize it writting my own commands in java. > According to your Developer's Guide, i have a java project named SE with > the classes from your samples (then i'm sure the code inside is good) in > a package called commands; > > i declared this project in the xmlmind's classpath (file xxe.jstart) : > C:\Users\orelot\workspace\SE\bin
It does not work like this. XMLmind XML Editor can automatically discover newly created extensions. Please restore our stock xxe.jstart. > > i copied the CustomCommands.jar in the directory containing my > configuration's file .xxe; > > finally i declared my command in my configuration's file : > <command name="ConvertCaseCmd"> > <class>commands/ConvertCaseCmd</class> > </command> > > when i open my document on xmlmind, an error is generated : > 'cannot register command "ConvertCaseCmd": commands/ConvertCaseCmd' > Let's assume that: [1] Your .xxe configuration file is OK. [2] CustomCommands.jar indeed contains a class called "ConvertCaseCmd" found in package "commands". Then: [a] Declare the command as follows: --- <command name="ConvertCaseCmd"> <class>commands.ConvertCaseCmd</class> </command> --- in your .xxe configuration file. Note than the separator character for qualified Java class names is '.' and not '/'. [b] Add CustomCommands.jar to the directory containing your configuration file. [c] Clear or disable the quick start cache, otherwise XMLmind XML Editor will not attempt to discover newly installed extensions (in your case, it's CustomCommands.jar). How to clear or disable the quick start cache is explained here: http://www.xmlmind.com/xmleditor/_distrib/doc/help/advancedOptions.html#cacheOptions ---- TIP: If you prefer, you can also completely delete directory (i.e. by using the equivalent of "rm -rf <XXE_user_preferences_dir>/cache"): <XXE_user_preferences_dir>/cache/ where <XXE_user_preferences_dir> is: * $HOME/.xxe5/ on Linux. * $HOME/Library/Application Support/XMLmind/XMLEditor5/ on the Mac. * %APPDATA%\XMLmind\XMLEditor5\ on Windows XP, Vista and 7. Example: C:\Documents and Settings\john\Application Data\XMLmind\XMLEditor5\ on Windows XP. C:\Users\john\AppData\Roaming\XMLmind\XMLEditor5\ on Windows Vista and 7. If you cannot see the "Application Data" directory using Microsoft Windows File Manager, turn on Tools>Folder Options>View>File and Folders>Show hidden files and folders. -- XMLmind XML Editor Support List [email protected] http://www.xmlmind.com/mailman/listinfo/xmleditor-support

