export plugin from older version



  • to whom it my concern i have a problem with a plugin made by kawasaki robotics for an older version of notepad, the v5.7.
    this plugin allow me to connect to a robot via a lan connection in order to communicate with it.
    Kawasaki gave me this old portable notepad version with the plugin already installed and functional.
    i want to use this plugin with the latest notepad version so i started transfering the plugin dll
    putting it in right path and, as shown in the video at this link, the newer version of notepad see the plugin and allow me to connect to the robot .
    the problems are two: firs of all i don’t have anymore the plugin commands in the right click context menu (i edited the context menu xml file but it didn’t work).
    the next problem is that i can only save data from the robot to my pc but i can’t load my programs to the robot. i hope it is not a dll plugin problem but only some settings to be refined.



  • the contextmenu xml code of the newer version is this

    <?xml version="1.0" encoding="UTF-8" ?>
    <!--
    By modifying this file, you can customize your context menu popuped as right clicking on the edit zone.
    It may be more convinient to access to your frequent used commands via context menu than via the top menu.
    
    Please check "How to Customize the Context Menu" on:
    https://npp-user-manual.org/docs/config-files/#the-context-menu-contextmenu-xml
    -->
    <NotepadPlus>
        <ScintillaContextMenu>
    	<Item PluginEntryName="Kawasaki AS"   pluginCommandItemName="Load"/>
            <Item PluginEntryName="Kawasaki AS"   pluginCommandItemName="Load PG"/>
            <Item PluginEntryName="Kawasaki AS"   pluginCommandItemName="Save"/>
            <Item PluginEntryName="Kawasaki AS"   pluginCommandItemName="Indent"/>
            <Item PluginEntryName="Kawasaki AS"   pluginCommandItemName="Indent region"/>
            <Item PluginEntryName="Kawasaki AS"   pluginCommandItemName="Fold"/>
            <Item PluginEntryName="Kawasaki AS"   pluginCommandItemName="Syntax check"/>
    	<Item id="0"/>
    		<!-- 
    		Use MenuEntryName and MenuItemName to localize your commands to add. 
    		The values should be in English but not in translated language.
    		(You can set Notepad++ language back to English from Preferences dialog via menu "Settings->Preferences...")
    		-->
            <Item MenuEntryName="Edit" MenuItemName="Cut"/>
            <Item MenuEntryName="Edit" MenuItemName="Copy"/>
            <Item MenuEntryName="Edit" MenuItemName="Paste"/>
            <Item MenuEntryName="Edit" MenuItemName="Delete"/>
            <Item MenuEntryName="Edit" MenuItemName="Select all"/>
            <Item MenuEntryName="Edit" MenuItemName="Begin/End Select"/>
    		
    		<!-- id="0" is the separator -->
            <Item id="0"/>
    		
    		<!-- You can use command id to add the commands you want. 
    		Check english.xml to get commands id:
    		https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/PowerEditor/installer/nativeLang/english.xml
    		
    		Use FolderName (optional) to create sub-menu. FolderName can be used in any type of item.
    		FolderName value can be in any language.
    		-->
            <Item FolderName="Style token" id="43022"/>
            <Item FolderName="Style token" id="43024"/>
            <Item FolderName="Style token" id="43026"/>
            <Item FolderName="Style token" id="43028"/>
            <Item FolderName="Style token" id="43030"/>
    		
            <Item FolderName="Remove style" id="43023"/>
            <Item FolderName="Remove style" id="43025"/>
            <Item FolderName="Remove style" id="43027"/>
            <Item FolderName="Remove style" id="43029"/>
            <Item FolderName="Remove style" id="43031"/>
            <Item FolderName="Remove style" id="43032"/>
            <Item id="0"/>
    		
    		<!--
    		To add plugin commands, you have to use PluginEntryName and PluginCommandItemName to localize the plugin commands
    		-->
    		<Item FolderName="Plugin commands" PluginEntryName="MIME Tools" PluginCommandItemName="Base64 Encode" />
            <Item FolderName="Plugin commands" PluginEntryName="MIME Tools" PluginCommandItemName="Base64 Decode" />
    		
    		<!--
    		Use ItemNameAs (optional) to rename the menu item name in the context menu 
    		ItemNameAs can be used in any type of item. ItemNameAs value can be in any language.
    		-->
            <Item FolderName="Plugin commands" PluginEntryName="NppExport" PluginCommandItemName="Copy all formats to clipboard" ItemNameAs="Copy Text with Syntax Highlighting" />
            <Item id="0"/>
            <Item MenuEntryName="Edit" MenuItemName="UPPERCASE"/>
            <Item MenuEntryName="Edit" MenuItemName="lowercase"/>
            <Item id="0"/>
            <Item MenuEntryName="Edit" MenuItemName="Open File"/>
            <Item MenuEntryName="Edit" MenuItemName="Search on Internet"/>
            <Item id="0"/>
            <Item MenuEntryName="Edit" MenuItemName="Toggle Single Line Comment"/>
            <Item MenuEntryName="Edit" MenuItemName="Block Comment"/>
            <Item MenuEntryName="Edit" MenuItemName="Block Uncomment"/>
            <Item id="0"/>
            <Item MenuEntryName="View" MenuItemName="Hide lines"/>
        </ScintillaContextMenu>
    </NotepadPlus>
    
    

    the contextmenu xml of the older version is this

    <NotepadPlus>
        <ScintillaContextMenu>
            <Item PluginEntryName="Kawasaki AS"   pluginCommandItemName="Load"/>
            <Item PluginEntryName="Kawasaki AS"   pluginCommandItemName="Load PG"/>
            <Item PluginEntryName="Kawasaki AS"   pluginCommandItemName="Save"/>
            <Item PluginEntryName="Kawasaki AS"   pluginCommandItemName="Indent"/>
            <Item PluginEntryName="Kawasaki AS"   pluginCommandItemName="Indent region"/>
            <Item PluginEntryName="Kawasaki AS"   pluginCommandItemName="Fold"/>
            <Item PluginEntryName="Kawasaki AS"   pluginCommandItemName="Syntax check"/>
            <Item id="0"/>
            <Item MenuEntryName="Edit" MenuItemName="Cut"/>
            <Item MenuEntryName="Edit" MenuItemName="Copy"/>
            <Item MenuEntryName="Edit" MenuItemName="Paste"/>
            <Item MenuEntryName="Edit" MenuItemName="Delete"/>
            <Item MenuEntryName="Edit" MenuItemName="Select all"/>
            <Item id="0"/>
            <Item id="43022"/>
            <Item id="43024"/>
            <Item id="43026"/>
            <Item id="43028"/>
            <Item id="43030"/>
            <Item id="0"/>
            <Item id="43023"/>
            <Item id="43025"/>
            <Item id="43027"/>
            <Item id="43029"/>
            <Item id="43031"/>
            <Item id="43032"/>
            <Item id="0"/>
            <Item MenuEntryName="Edit" MenuItemName="UPPERCASE"/>
            <Item MenuEntryName="Edit" MenuItemName="lowercase"/>
            <Item id="0"/>
            <Item MenuEntryName="Edit" MenuItemName="Toggle block comment"/>
            <Item MenuEntryName="Edit" MenuItemName="Stream comment"/>
            <Item id="0"/>
            <Item MenuEntryName="View" MenuItemName="Hide lines"/>
        </ScintillaContextMenu>
    </NotepadPlus>
    
    


  • @Simone-Panada

    As for the context menu, which one did you change?
    Depending on your installation, it may be that this file is
    either in the installation directory of Npp or in the %APPDATA%\notepad++ directory.

    As for the loading function, if it works over LAN, does that mean it is communicating over IP?
    If so, Wireshark could be a good tool to see what is being sent and received.



  • @Simone-Panada said in export plugin from older version:

    the problems are two: firs of all i don’t have anymore the plugin commands in the right click context menu (i edited the context menu xml file but it didn’t work).

    The context menu settings you showed in your second post should have done that for you. Which copy of contextMenu.xml did you edit? (There is likely a copy in your program directory, and if you have a normal installation, also likely one in the %AppData%\Notepad++\ folder 🛈. With a normal installation, the one you need to edit is %AppData%\Notepad++\contextMenu.xml. If you show us ?-menu Debug Info contents, we can tell you whether you’ve got a normal installation or not.) AFAIK, Settings>Edit Popup ContextMenu should always open the right one

    the next problem is that i can only save data from the robot to my pc but i can’t load my programs to the robot. i hope it is not a dll plugin problem but only some settings to be refined.

    The communication with the robot is something that’s completely up to the plugin, as Notepad++ (and this Community) have no idea about what kind of communication the plugin is using. There might be a setting accessible in the Plugins > Kawasaki AS menu, but I know nothing about how you would set that up.



  • @Ekopalypse the older one and the newer one are both portable version so it should be the one in the folder i showed you in the video.

    referring to the connection yes, the robot controller is creating the network and i can access to the robot assigning an ip to my pc’s ethernet properties in the TCP/IPv4 ip field



  • @PeterJones

    newer notepad:

    Notepad++ v7.9.3 (32-bit)
    Build time : Feb 14 2021 - 03:12:31
    Path : C:\Users\simon\OneDrive\Desktop\npp.7.9.3.portable\notepad++.exe
    Admin mode : OFF
    Local Conf mode : ON
    OS Name : Windows 10 Home (64-bit)
    OS Version : 2009
    OS Build : 19042.844
    Current ANSI codepage : 1252
    Plugins : ComparePlugin.dll FTP_synchronize.dll KawasakiPlugin.dll mimeTools.dll NppConverter.dll NppExport.dll

    older notepad doesn’t have the debug info option into the “?” menu



  • @Simone-Panada said in export plugin from older version:

    OneDrive

    Is this a network drive? If so, can you try a local path?

    One difference I saw in the video is that you have a real, saved file with the old NPP version, but a “new” (aka unsaved) file with the new NPP version. Does the same problem occur when you try with a real, a saved file?



  • @Simone-Panada ,

    newer notepad:

    Thank you for the Debug Info. Your v7.9.3 edition recognizes it’s portable, so the context menu will be the one in C:\Users\simon\OneDrive\Desktop\npp.7.9.3.portable\contextMenu.xml.

    older notepad doesn’t have the debug info option into the “?” menu

    I think you can Alt+PrintScreen on the About menu… but I’m not sure it’s critical on the old version.

    My guesses as to what might be going wrong for you:

    1. As @Ekopalypse has hinted, maybe the plugin is sending different things (or not sending anything) when it’s supposed to be transmitting the file to the robot. As was suggested, an external tool like Wireshark could help look into that
    2. Maybe there’s some plugin setting that’s different between the instance in the v5.7 NPP and in the v7.9.3 NPP. There should be a plugins\Config directory in both the old and new NPP; if your robot plugin writes a config file, it may be there, and you might be able to compare those.
    3. v5.7 is an ancient Notepad++. That was back in the days when there was separate ANSI vs. UNICODE builds (or maybe even before the UNICODE build at all). This has a couple of implications
      1. If your portable v5.7 is an ANSI, then the plugin was probably written assuming that all characters will be stored in one byte per character. However, the v7.9.3 will be using Unicode under the hood (even if the file is stored as ANSI on disk)… in which case, the bytes that the plugin has access to might not be matching the bytes that you thought were in the file. Again, Wireshark will be able to show you if there’s a difference in the messages sent by the plugin from the v5.7 and the v7.9.3.
      2. The Scintilla editor component (NPP uses another open-source set of IP for handling a lot of the underlying tasks in the editor) has undergone a lot of changes since the version that was in NPP v5.7 – and that can mean that the API that Notepad++ (and NPP plugins) use to access the text inside of the Scintilla component might have changed, so maybe the plugin is calling an API function that is no longer supported in trying to grab the file and send it to the robot, so maybe the plugin cannot grab the data correctly.

    It looks like @Ekopalypse still has ideas, so I wouldn’t give up hope yet. But there is a not-insignificant chance that the plugin is just not compatible with the modern Notepad++ – if that ends up being the case, you’ll either have to communicate with whoever wrote or is in charge of maintaining the original plugin and see if they can upgrade it to work with v7.9.3, or you might have to live with the fact that you’ll have to use the old portable v5.7 for the robot, and use v7.9.3 or newer for all your other Notepad++ text-editing needs.



  • @Ekopalypse i put everything on my desktop and the drive was not the poroblem… it is gaving me the same issue



  • @Simone-Panada

    Can you use the menu option Settings->Edit PopUp Context Menu. Does this open the context menu with your configured entries?

    What about the test with a real, saved AS file?



  • @PeterJones

    1. yes i will trywireshark in order to understand what is going on
    2. i copied the plugin .config.ini from the old notepad to the new one
      3.1. maybe this could be why i can’t load to the robot my data
      3.2. which version do you think could be compatible with the plugin? notepad 6?


  • @Ekopalypse opening up Settings->Edit PopUp Context Menu it shows me the changes i made so it should be done right.
    i also tried opening AS files but nothing changed… i’m unable to upload to the robot even the program just saved to the robot.



  • @Simone-Panada

    contextMenu structure hasn’t changed since then, afaik.
    But what could be is that the plugin itself loads it and expects
    a certain layout. What happens if you just use the old contextMenu.xml?



  • @Ekopalypse i duplicated the v7 folder and copied and pasted there the old contextmenu.xml of notepad v5 but it didn’t show me the plugins options as you can see in the photo

    old context menu .xml file in new notepad
    Inkednotepad++_03_03_2021_LI.jpg

    old context menu in old notepad

    Inkednotepad++_03_03_2021__LI.jpg



  • Can you send me this plugin? BUT ONLY if you are allowed to do so!



  • @Ekopalypse tomorrow i will ask at work if i can… maybe in a private message i’m allowed to send it to you



  • @Simone-Panada said in export plugin from older version:

    the contextmenu xml code of the newer version is this
    <?xml version=“1.0” encoding=“UTF-8” ?>
    <!–
    By modifying this file, you can customize your context menu popuped as right clicking on the edit zone.
    It may be more convinient to access to your frequent used commands via context menu than via the top menu.

    Please check “How to Customize the Context Menu” on:
    https://npp-user-manual.org/docs/config-files/#the-context-menu-contextmenu-xml
    –>
    <NotepadPlus>
    <ScintillaContextMenu>
    <Item PluginEntryName=“Kawasaki AS” pluginCommandItemName=“Load”/>
    <Item PluginEntryName=“Kawasaki AS” pluginCommandItemName=“Load PG”/>
    <Item PluginEntryName=“Kawasaki AS” pluginCommandItemName=“Save”/>
    <Item PluginEntryName=“Kawasaki AS” pluginCommandItemName=“Indent”/>
    <Item PluginEntryName=“Kawasaki AS” pluginCommandItemName=“Indent region”/>
    <Item PluginEntryName=“Kawasaki AS” pluginCommandItemName=“Fold”/>
    <Item PluginEntryName=“Kawasaki AS” pluginCommandItemName=“Syntax check”/>

    Seems simple, but please try using a capital P in the pluginCommandItemName so it is PluginCommandItemName. Maybe the mixed case worked previously, but for me, a quick test with 7.9.3 using a lower case p made my context menu plugin items disappear.

    Cheers.



  • @Michael-Vincent

    Brilliant, Michael, brilliant. I can confirm that in my setup, using pluginCommandItemName also makes the menu item disappear.



  • @Ekopalypse said in export plugin from older version:

    I can confirm that in my setup, using pluginCommandItemName also makes the menu item disappear.

    Phew - I tried it like 5 times because I wasn’t sure - didn’t realize those tags were case sensitive, but looking through the rest of his context menu XML, they all had capital P, so it would make sense those others worked, but the “Kawasaki AS” one’s didn’t. Glad you could confirm.

    @Simone-Panada
    That still leaves the other issue:

    the next problem is that i can only save data from the robot to my pc but i can’t load my programs to the robot.

    Cheers.



  • @Michael-Vincent ,

    And another confirmation from me. That’s probably the OP’s issue for the context menu.


Log in to reply