Writing Java Plugins for Total Commander

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: Hacker, petermad, Stefan2, white

kenchis
Junior Member
Junior Member
Posts: 53
Joined: 2006-02-04, 11:44 UTC
Location: Berlin
Contact:

SWT sounds good, but

Post by *kenchis »

Hi CoolWater,
The problem is not SWT itself, but to use it from native code.
I am familiar with SWT, because i write plugins for Eclipse at work.
I cannot find an example where native window and SWT window is combined together.

For example:
Create a SourceViewer and return the windows widget to native code.
Then, use it as a child window of the Total Commander lister plugin. So if the lister window position or size change, the SWT widget will change accordingly.

If you have some knowledge, please let me know.

Kind Regards,
Ken
CoolWater
Power Member
Power Member
Posts: 744
Joined: 2003-03-27, 16:33 UTC

Post by *CoolWater »

Hi Ken,

well, each SWT "window" (which is Shell, Tree, Button and so on) has a platform-dependant property handle which is under windows the same as the HWND of each window. With it, you have the "halbe miete" ;)

Resize events you can catch with the appropriate (shell) listeners... But I don't know if the lister window sends a WM_SIZE message to all of its child-windows...

Repositioning shouldn't be interessting since the parent window should do this.

HTH
CoolWater
User avatar
frenky
Senior Member
Senior Member
Posts: 250
Joined: 2005-07-30, 19:36 UTC

Post by *frenky »

Hi Ken, CoolWater!

CoolWater, you seam to know great deal about JNI/SWT, my experience here is somewhat limited. I'm more of a pure Java programmer...

There is one problem with the lister plugin that maybe you could help (I've already sent something similar to this post to Ken).

Problem is with lister plugin:

List of handles TC has before the plugin is loaded:

Code: Select all

TOTALCMD.EXE pid: 3904 WW300\hr1ur084
   10: File          C:\WINNT\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9
   3C: File          C:\WINNT\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9
   6C: Section       \BaseNamedObjects\CiceroSharedMemDefaultS-1-5-21-1454471165-527237240-682003330-53279
   88: Section       \BaseNamedObjects\CTF.TimListCache.FMPDefaultS-1-5-21-1454471165-527237240-682003330-53279SFM.DefaultS-1-5-21-1454471165-527237240-682003330-53279
   F8: Section       \BaseNamedObjects\ShimSharedMemory
  140: File          D:\src
  154: Section       \BaseNamedObjects\MSCTF.Shared.SFM.ABN
  158: File          C:\WINNT\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9
List of loaded libraries TC has before the plugin is loaded:

Code: Select all

TOTALCMD.EXE pid: 3904
Command line: "C:\totalcmd\TOTALCMD.EXE" 

  Base        Size      Version	        Path
  0x00400000  0x262000  6.05.0004.0000  C:\totalcmd\TOTALCMD.EXE
  0x7c900000  0xb0000   5.01.2600.2180  C:\WINNT\system32\ntdll.dll
  0x7c800000  0xf4000   5.01.2600.2180  C:\WINNT\system32\kernel32.dll
  0x77dd0000  0x9b000   5.01.2600.2180  C:\WINNT\system32\advapi32.dll
  0x77e70000  0x91000   5.01.2600.2180  C:\WINNT\system32\RPCRT4.dll
  0x773d0000  0x102000  6.00.2900.2180  C:\WINNT\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll
  0x77c10000  0x58000   7.00.2600.2180  C:\WINNT\system32\msvcrt.dll
  0x77f10000  0x47000   5.01.2600.2818  C:\WINNT\system32\GDI32.dll
  0x77d40000  0x90000   5.01.2600.2622  C:\WINNT\system32\USER32.dll
  0x77f60000  0x76000   6.00.2900.2781  C:\WINNT\system32\SHLWAPI.dll
  0x763b0000  0x49000   6.00.2900.2180  C:\WINNT\system32\comdlg32.dll
  0x7c9c0000  0x815000  6.00.2900.2763  C:\WINNT\system32\SHELL32.dll
  0x71b20000  0x12000   5.01.2600.2180  C:\WINNT\system32\mpr.dll
  0x774e0000  0x13d000  5.01.2600.2726  C:\WINNT\system32\ole32.dll
  0x77120000  0x8c000   5.01.2600.2180  C:\WINNT\system32\oleaut32.dll
  0x77c00000  0x8000    5.01.2600.2180  C:\WINNT\system32\version.dll
  0x76b40000  0x2d000   5.01.2600.2180  C:\WINNT\system32\winmm.dll
  0x73000000  0x26000   5.01.2600.2180  C:\WINNT\system32\winspool.drv
  0x74720000  0x4b000   5.01.2600.2180  C:\WINNT\system32\MSCTF.dll
  0x5ad70000  0x38000   6.00.2900.2180  C:\WINNT\system32\UxTheme.dll
  0x77920000  0xf3000   5.01.2600.2180  C:\WINNT\system32\SETUPAPI.dll
  0x77b40000  0x22000   5.01.2600.2180  C:\WINNT\system32\appHelp.dll
  0x76fd0000  0x7f000   2001.12.4414.0308  C:\WINNT\system32\CLBCATQ.DLL
  0x77050000  0xc5000   2001.12.4414.0258  C:\WINNT\system32\COMRes.dll
  0x76990000  0x25000   5.01.2600.2180  C:\WINNT\system32\ntshrui.dll
  0x76b20000  0x11000   3.05.2284.0000  C:\WINNT\system32\ATL.DLL
  0x5b860000  0x54000   5.01.2600.2180  C:\WINNT\system32\NETAPI32.dll
  0x769c0000  0xb3000   5.01.2600.2180  C:\WINNT\system32\USERENV.dll

List of handles TC has after the plugin is loaded:

Code: Select all

TOTALCMD.EXE pid: 3904 WW300\hr1ur084
   10: File          C:\WINNT\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9
   3C: File          C:\WINNT\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9
   6C: Section       \BaseNamedObjects\CiceroSharedMemDefaultS-1-5-21-1454471165-527237240-682003330-53279
   88: Section       \BaseNamedObjects\CTF.TimListCache.FMPDefaultS-1-5-21-1454471165-527237240-682003330-53279SFM.DefaultS-1-5-21-1454471165-527237240-682003330-53279
   F8: Section       \BaseNamedObjects\ShimSharedMemory
  144: File          D:\src
  154: Section       \BaseNamedObjects\MSCTF.Shared.SFM.ABN
  158: File          C:\WINNT\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9
  24C: File          D:\temp\hsperfdata_hr1ur084\3904
  250: Section       \BaseNamedObjects\hsperfdata_hr1ur084_3904
  274: File          C:\Program Files\Java\jre1.5.0_06\lib\rt.jar
  27C: File          C:\Program Files\Java\jre1.5.0_06\lib\jsse.jar
  284: File          C:\Program Files\Java\jre1.5.0_06\lib\jce.jar
  28C: File          C:\Program Files\Java\jre1.5.0_06\lib\charsets.jar
  448: File          C:\Program Files\Java\jre1.5.0_06\lib\ext\dnsns.jar
  458: File          C:\Program Files\Java\jre1.5.0_06\lib\ext\localedata.jar
  460: File          C:\Program Files\Java\jre1.5.0_06\lib\ext\sunjce_provider.jar
  468: File          C:\Program Files\Java\jre1.5.0_06\lib\ext\sunpkcs11.jar
  470: File          C:\totalcmd\Plugins\wlx\java\disassembler\disassembler.jar
  478: File          C:\totalcmd\Plugins\wlx\java\tc-apis.jar
List of loaded libraries TC has after the plugin is loaded:

Code: Select all

TOTALCMD.EXE pid: 3904
Command line: "C:\totalcmd\TOTALCMD.EXE" 

  Base        Size      Version	        Path
  0x00400000  0x262000  6.05.0004.0000  C:\totalcmd\TOTALCMD.EXE
  0x7c900000  0xb0000   5.01.2600.2180  C:\WINNT\system32\ntdll.dll
  0x7c800000  0xf4000   5.01.2600.2180  C:\WINNT\system32\kernel32.dll
  0x77dd0000  0x9b000   5.01.2600.2180  C:\WINNT\system32\advapi32.dll
  0x77e70000  0x91000   5.01.2600.2180  C:\WINNT\system32\RPCRT4.dll
  0x773d0000  0x102000  6.00.2900.2180  C:\WINNT\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll
  0x77c10000  0x58000   7.00.2600.2180  C:\WINNT\system32\msvcrt.dll
  0x77f10000  0x47000   5.01.2600.2818  C:\WINNT\system32\GDI32.dll
  0x77d40000  0x90000   5.01.2600.2622  C:\WINNT\system32\USER32.dll
  0x77f60000  0x76000   6.00.2900.2781  C:\WINNT\system32\SHLWAPI.dll
  0x763b0000  0x49000   6.00.2900.2180  C:\WINNT\system32\comdlg32.dll
  0x7c9c0000  0x815000  6.00.2900.2763  C:\WINNT\system32\SHELL32.dll
  0x71b20000  0x12000   5.01.2600.2180  C:\WINNT\system32\mpr.dll
  0x774e0000  0x13d000  5.01.2600.2726  C:\WINNT\system32\ole32.dll
  0x77120000  0x8c000   5.01.2600.2180  C:\WINNT\system32\oleaut32.dll
  0x77c00000  0x8000    5.01.2600.2180  C:\WINNT\system32\version.dll
  0x76b40000  0x2d000   5.01.2600.2180  C:\WINNT\system32\winmm.dll
  0x73000000  0x26000   5.01.2600.2180  C:\WINNT\system32\winspool.drv
  0x74720000  0x4b000   5.01.2600.2180  C:\WINNT\system32\MSCTF.dll
  0x5ad70000  0x38000   6.00.2900.2180  C:\WINNT\system32\UxTheme.dll
  0x77920000  0xf3000   5.01.2600.2180  C:\WINNT\system32\SETUPAPI.dll
  0x77b40000  0x22000   5.01.2600.2180  C:\WINNT\system32\appHelp.dll
  0x76fd0000  0x7f000   2001.12.4414.0308  C:\WINNT\system32\CLBCATQ.DLL
  0x77050000  0xc5000   2001.12.4414.0258  C:\WINNT\system32\COMRes.dll
  0x76990000  0x25000   5.01.2600.2180  C:\WINNT\system32\ntshrui.dll
  0x76b20000  0x11000   3.05.2284.0000  C:\WINNT\system32\ATL.DLL
  0x5b860000  0x54000   5.01.2600.2180  C:\WINNT\system32\NETAPI32.dll
  0x769c0000  0xb3000   5.01.2600.2180  C:\WINNT\system32\USERENV.dll
  0x10000000  0x5d000   2.00.0004.0002  C:\totalcmd\Plugins\FileInfo\fileinfo.wlx
  0x76c90000  0x28000   5.01.2600.2180  C:\WINNT\system32\IMAGEHLP.dll
  0x73dd0000  0xfe000   6.02.4131.0000  C:\WINNT\system32\MFC42.DLL
  0x732e0000  0x5000    5.01.2600.0000  C:\WINNT\system32\RICHED32.DLL
  0x74e30000  0x6c000   5.30.0023.1221  C:\WINNT\system32\RICHED20.dll
  0x00f70000  0xf000                    C:\totalcmd\Plugins\ListDoc\listdoc.wlx
  0x01080000  0x4f000                   C:\totalcmd\Plugins\ArchView\ArchView.wlx
  0x011e0000  0xbb000   1.02.0000.0111  C:\totalcmd\Plugins\VisualDirSize\visualdirsize.wlx
  0x013b0000  0x27000                   C:\totalcmd\Plugins\wlx\java\listplug.wlx
  0x6d670000  0x194000  5.00.0060.0005  C:\Program Files\Java\jre1.5.0_06\bin\client\jvm.dll
  0x6d280000  0x8000    5.00.0060.0005  C:\Program Files\Java\jre1.5.0_06\bin\hpi.dll
  0x76bf0000  0xb000    5.01.2600.2180  C:\WINNT\system32\PSAPI.DLL
  0x6d640000  0xc000    5.00.0060.0005  C:\Program Files\Java\jre1.5.0_06\bin\verify.dll
  0x6d300000  0x1d000   5.00.0060.0005  C:\Program Files\Java\jre1.5.0_06\bin\java.dll
  0x6d660000  0xf000    5.00.0060.0005  C:\Program Files\Java\jre1.5.0_06\bin\zip.dll
  0x03a10000  0x3d000   2.04.0004.0000  C:\totalcmd\Plugins\mmedia\mmedia.wlx
  0x76080000  0x65000   6.02.3104.0000  C:\WINNT\system32\MSVCP60.dll

List of handles TC has after cm_UnloadPlugins is called:

Code: Select all

TOTALCMD.EXE pid: 3904 WW300\hr1ur084
   10: File          C:\WINNT\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9
   3C: File          C:\WINNT\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9
   6C: Section       \BaseNamedObjects\CiceroSharedMemDefaultS-1-5-21-1454471165-527237240-682003330-53279
   88: Section       \BaseNamedObjects\CTF.TimListCache.FMPDefaultS-1-5-21-1454471165-527237240-682003330-53279SFM.DefaultS-1-5-21-1454471165-527237240-682003330-53279
   F8: Section       \BaseNamedObjects\ShimSharedMemory
  144: File          D:\src
  154: Section       \BaseNamedObjects\MSCTF.Shared.SFM.ABN
  158: File          C:\WINNT\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9
  24C: File          D:\temp\hsperfdata_hr1ur084\3904
  250: Section       \BaseNamedObjects\hsperfdata_hr1ur084_3904
  274: File          C:\Program Files\Java\jre1.5.0_06\lib\rt.jar
  27C: File          C:\Program Files\Java\jre1.5.0_06\lib\jsse.jar
  284: File          C:\Program Files\Java\jre1.5.0_06\lib\jce.jar
  28C: File          C:\Program Files\Java\jre1.5.0_06\lib\charsets.jar
  448: File          C:\Program Files\Java\jre1.5.0_06\lib\ext\dnsns.jar
  458: File          C:\Program Files\Java\jre1.5.0_06\lib\ext\localedata.jar
  460: File          C:\Program Files\Java\jre1.5.0_06\lib\ext\sunjce_provider.jar
  468: File          C:\Program Files\Java\jre1.5.0_06\lib\ext\sunpkcs11.jar
  470: File          C:\totalcmd\Plugins\wlx\java\disassembler\disassembler.jar
  478: File          C:\totalcmd\Plugins\wlx\java\tc-apis.jar
  4A0: Section       \BaseNamedObjects\CCshmemV3_area
  4A8: Section       \BaseNamedObjects\CCshmemV3_area.S-1-5-21-1454471165-527237240-682003330-53279
  4B0: File          \Dfs
List of loaded libraries TC has after cm_UnloadPlugins is called:

Code: Select all

TOTALCMD.EXE pid: 3904
Command line: "C:\totalcmd\TOTALCMD.EXE" 

  Base        Size      Version	        Path
  0x00400000  0x262000  6.05.0004.0000  C:\totalcmd\TOTALCMD.EXE
  0x7c900000  0xb0000   5.01.2600.2180  C:\WINNT\system32\ntdll.dll
  0x7c800000  0xf4000   5.01.2600.2180  C:\WINNT\system32\kernel32.dll
  0x77dd0000  0x9b000   5.01.2600.2180  C:\WINNT\system32\advapi32.dll
  0x77e70000  0x91000   5.01.2600.2180  C:\WINNT\system32\RPCRT4.dll
  0x773d0000  0x102000  6.00.2900.2180  C:\WINNT\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll
  0x77c10000  0x58000   7.00.2600.2180  C:\WINNT\system32\msvcrt.dll
  0x77f10000  0x47000   5.01.2600.2818  C:\WINNT\system32\GDI32.dll
  0x77d40000  0x90000   5.01.2600.2622  C:\WINNT\system32\USER32.dll
  0x77f60000  0x76000   6.00.2900.2781  C:\WINNT\system32\SHLWAPI.dll
  0x763b0000  0x49000   6.00.2900.2180  C:\WINNT\system32\comdlg32.dll
  0x7c9c0000  0x815000  6.00.2900.2763  C:\WINNT\system32\SHELL32.dll
  0x71b20000  0x12000   5.01.2600.2180  C:\WINNT\system32\mpr.dll
  0x774e0000  0x13d000  5.01.2600.2726  C:\WINNT\system32\ole32.dll
  0x77120000  0x8c000   5.01.2600.2180  C:\WINNT\system32\oleaut32.dll
  0x77c00000  0x8000    5.01.2600.2180  C:\WINNT\system32\version.dll
  0x76b40000  0x2d000   5.01.2600.2180  C:\WINNT\system32\winmm.dll
  0x73000000  0x26000   5.01.2600.2180  C:\WINNT\system32\winspool.drv
  0x74720000  0x4b000   5.01.2600.2180  C:\WINNT\system32\MSCTF.dll
  0x5ad70000  0x38000   6.00.2900.2180  C:\WINNT\system32\UxTheme.dll
  0x77920000  0xf3000   5.01.2600.2180  C:\WINNT\system32\SETUPAPI.dll
  0x77b40000  0x22000   5.01.2600.2180  C:\WINNT\system32\appHelp.dll
  0x76fd0000  0x7f000   2001.12.4414.0308  C:\WINNT\system32\CLBCATQ.DLL
  0x77050000  0xc5000   2001.12.4414.0258  C:\WINNT\system32\COMRes.dll
  0x76990000  0x25000   5.01.2600.2180  C:\WINNT\system32\ntshrui.dll
  0x76b20000  0x11000   3.05.2284.0000  C:\WINNT\system32\ATL.DLL
  0x5b860000  0x54000   5.01.2600.2180  C:\WINNT\system32\NETAPI32.dll
  0x769c0000  0xb3000   5.01.2600.2180  C:\WINNT\system32\USERENV.dll
  0x76c90000  0x28000   5.01.2600.2180  C:\WINNT\system32\IMAGEHLP.dll
  0x73dd0000  0xfe000   6.02.4131.0000  C:\WINNT\system32\MFC42.DLL
  0x732e0000  0x5000    5.01.2600.0000  C:\WINNT\system32\RICHED32.DLL
  0x74e30000  0x6c000   5.30.0023.1221  C:\WINNT\system32\RICHED20.dll
  0x6d670000  0x194000  5.00.0060.0005  C:\Program Files\Java\jre1.5.0_06\bin\client\jvm.dll
  0x6d280000  0x8000    5.00.0060.0005  C:\Program Files\Java\jre1.5.0_06\bin\hpi.dll
  0x76bf0000  0xb000    5.01.2600.2180  C:\WINNT\system32\PSAPI.DLL
  0x6d640000  0xc000    5.00.0060.0005  C:\Program Files\Java\jre1.5.0_06\bin\verify.dll
  0x6d300000  0x1d000   5.00.0060.0005  C:\Program Files\Java\jre1.5.0_06\bin\java.dll
  0x6d660000  0xf000    5.00.0060.0005  C:\Program Files\Java\jre1.5.0_06\bin\zip.dll
  0x76080000  0x65000   6.02.3104.0000  C:\WINNT\system32\MSVCP60.dll
  0x03a50000  0xb000                    C:\Program Files\Rational\bin\ccasenp.dll
  0x75f60000  0x7000    5.01.2600.2180  C:\WINNT\System32\drprov.dll
  0x71c10000  0xe000    5.01.2600.2180  C:\WINNT\System32\ntlanman.dll
  0x71cd0000  0x17000   5.01.2600.2180  C:\WINNT\System32\NETUI0.dll
  0x71c90000  0x40000   5.01.2600.2180  C:\WINNT\System32\NETUI1.dll
  0x71c80000  0x7000    5.01.2600.2180  C:\WINNT\System32\NETRAP.dll
  0x71bf0000  0x13000   5.01.2600.2180  C:\WINNT\System32\SAMLIB.dll
  0x75f70000  0x9000    5.01.2600.2180  C:\WINNT\System32\davclnt.dll
  0x21400000  0x1b000                   C:\Program Files\Rational\bin\LIBATRIANT.dll
  0x71ab0000  0x17000   5.01.2600.2180  C:\WINNT\system32\WS2_32.dll
  0x71aa0000  0x8000    5.01.2600.2180  C:\WINNT\system32\WS2HELP.dll
Now the problem is that when cm_UnloadPlugins is called, listplug.wlx is in fact unloaded, but on the other hand, it is clearly visible that many java libraries and jar's are still locked and loaded by TC... Not sure if this is allowed??
Now when I call lister (F3) on any file again, I get following exception:

Code: Select all

---------------------------
Total Commander
---------------------------
Access violation at address 013A19F3. Read of address 00000000.
Please report this error to the Author,
with a description of what you were doing when this error occured!
Continue execution?
---------------------------
Yes   No   
---------------------------
I'm lost what is the reason of this behavior.
Any ideas? I guess this is a peace of cake for hardcore C/C++ programmer :D

FrenKy
CoolWater
Power Member
Power Member
Posts: 744
Joined: 2003-03-27, 16:33 UTC

Post by *CoolWater »

Uhh, that sounds like the plugin is not unloaded correctly. Is ListCloseWindow implemented in the plugin? If not, TC just uses DestroyWindow which (IMO!) does not fully unload the plugin and all of its dependencies...

Regards,
CoolWater
User avatar
frenky
Senior Member
Senior Member
Posts: 250
Joined: 2005-07-30, 19:36 UTC

Post by *frenky »

2CoolWater
SWT is cool...
It is realy best of both worlds. Inherit native widgets if they exist (AWT way) or implement own if they do not exist (SWING).

Me like :mrgreen:
kenchis
Junior Member
Junior Member
Posts: 53
Joined: 2006-02-04, 11:44 UTC
Location: Berlin
Contact:

Sorry!

Post by *kenchis »

Oh my god...
It seems it was very, very late last night (about 5 am) or too early
for me?

I made a mistake when i changed the download link at lycos.de
Uuuuuh what a shame
Thank you Frenky for your hint

:((

I hope you will test the new version for me pleeeease :?

A big sorry,
Ken

P.S. About the problem of not freeing the jar-resources i have to
do some tests.
The Upload of the source code is going on right now
Its about 7MB
User avatar
frenky
Senior Member
Senior Member
Posts: 250
Joined: 2005-07-30, 19:36 UTC

Post by *frenky »

2kenchis
Dl link is working Ok now.
I'll take a look, but I'm not sure when I'll have the time.. This week for sure.

Nice work!
Ambiguity succeeds where honesty dares not venture.
kenchis
Junior Member
Junior Member
Posts: 53
Joined: 2006-02-04, 11:44 UTC
Location: Berlin
Contact:

Next HEAD Version

Post by *kenchis »

Hi Frenky, Coolwater

I remade the WLX plugin using SWT right now.
It seems that everything works better than with Swing for now.
The Code looks pretty much simpler now (JNI and Java)
A XML WFX plugin i have also included (to traverse the contents of an
XML file, just for illustration).

But some things look strange:
- Stopping the JVM will not work until now (jar files are still blocked)
- Closing the WLX window and reopen it will close the SWT Shell forever

Kind Regards,
Ken
Gruß,
Kenchi
CoolWater
Power Member
Power Member
Posts: 744
Joined: 2003-03-27, 16:33 UTC

Post by *CoolWater »

Hi,

some hints for your ini files...

IMO, almost all people have the JRE installed not JDK. Therefore you should change the JVM_DLL entry, e.g.

Code: Select all

JVM_DLL=D:/Program Files/Java/jre1.5.0_06/bin/client/jvm.dll
Moreover, you should use relative paths in the java class path, IMO.

EDIT: I took a look at your disassembler plugin... Just a guess about the problem that the jar files won't be unloaded...

The creation of display, shell etc. is made in the Disassembler constructor... IMO, you should put it in listLoad! In listCloseWindow you should not only close the shell but dispose (shell.dispose() and display.dispose()) the shell AND the display! Only then, you ensure everything is to be unloaded. Since you cannot distinguish between "closed for the moment" and "closed forever", this is the only way to properly unload you plugin + all dependencies...

Regards,
CoolWater
kenchis
Junior Member
Junior Member
Posts: 53
Joined: 2006-02-04, 11:44 UTC
Location: Berlin
Contact:

Post by *kenchis »

Hi Coolwater,

For the DLL location:
JVM_DLL=D:/Program Files/Java/jre1.5.0_06/bin/client/jvm.dll

I will change it. Most people have an english installation, me not :-(
and i will use C as default drive.

About the Java classpath:
I thought something similar about that. The classpath grows bigger and bigger. Perhaps i should think of some other configuration technique.
Perhaps using an own classloader (containing all JAR-files of a certain directory)? Any other ideas?

For the lister window:
I wanted to change only the visibility (listLoad/listClose) of the window (is it a bad idea)?
This has a better performance. Only if the plugin will be destroyed, the SWT GUI should be disposed.

What do you think?
Regards,
Ken
CoolWater
Power Member
Power Member
Posts: 744
Joined: 2003-03-27, 16:33 UTC

Post by *CoolWater »

kenchis wrote:I wanted to change only the visibility (listLoad/listClose) of the window (is it a bad idea)?
This has a better performance. Only if the plugin will be destroyed, the SWT GUI should be disposed.
No, it's the best idea ;) But the problem is listClose is called, when the Lister/Quickview is closed. A call for unload/destroy is not implemented in the wlx plugin interface.

So your plugin/dependencies never get(s) unloaded (not considering 3rd party tools) as long as TC is opened.

May you should try to apply my suggestions so you can see how bad/good the performance will be...

Regards,
CoolWater
kenchis
Junior Member
Junior Member
Posts: 53
Joined: 2006-02-04, 11:44 UTC
Location: Berlin
Contact:

New Version

Post by *kenchis »

Hi Frenky, Coolwater and all others,

Since i had too much time at work to work on the plugin ;-)
i made further progress.
I made some error corrections and enhancements.

The classpath is no more absolute, the default JVM path is changed.
The plugin installation dir is changed (%COMMANDER_PATH%/plugins/java).

I included several very nice demo classes that show the power of Java :-)
Just uncoment the desired class in the INI file. Included is a HTML browser plugin :P

I updated the information on my homepage, so have a look, if something is not understood.

No more crashes have been seen by me. The lister window is better integrated in the lister window.

The jar-files will not be disposed from memory until the TC will be closed. This is fact for now :roll:

Please test only the new Version (0.4)

Thank you for your support.
Regards, Ken

P.S. The uploading process will be completed in an hour (damn FTP speed)
Gruß,
Kenchi
djorge
Senior Member
Senior Member
Posts: 422
Joined: 2003-07-03, 12:48 UTC
Location: Portugal

Post by *djorge »

Hi.

You should show some screenshots of some of your lister examples in your home page. An image is better than thousand words :D
______________________
David Jorge
Personal License #117854
kenchis
Junior Member
Junior Member
Posts: 53
Joined: 2006-02-04, 11:44 UTC
Location: Berlin
Contact:

Screenshots available

Post by *kenchis »

Hi Djorge,

thank you for the Tip,
i added some lister plugin screenshots.
Filesystem screenshots (display local Hard disk drives) are too boring to show. I will wait for more spectacular examples.

Regards,
Ken
kenchis
Junior Member
Junior Member
Posts: 53
Joined: 2006-02-04, 11:44 UTC
Location: Berlin
Contact:

disabled menu

Post by *kenchis »

Hi folks,

i found a problem, that i cannot fix at the moment.
If a lister window is opened in a separate window (F3 instead of Control+Q), the menus are disabled and the window wont close anymore.
Total Commander process must be killed.
I think that this must have been something to do with the Java shell i created.
I wanted to implement ListSearchText but cannot test it for this reason.

Please can anyone help me out?
Kind regards,
Ken
Gruß,
Kenchi
Post Reply