Plugins: New source code editor based on Scintilla for W7 and x64?

The Scintilla API doesn't change drastically between versions, from what I have seen.

If you want a particular version, then you have to use your own one as before. But the option is there to use the version baked into Opus if you want, too.

I understand that. However, unless I am missing something it is not that simple as you say. You register the Scintilla window class, hence, LoadLibrary in v12 fails. To use my own version, I would have to change class name in my dlls or unregister the Opus version. Neither option seems very appealing.
For now I will just keep it as it is.

I still cannot get bigger files to display. I used the config file you put into the zip and only changed default fontsize to "9" in the config file directly, since using the DOSV config dialog did not work out to correctly set the font sizes. "fontsize" attributes ended up being blank ="" in the config file e.g., but let's concentrate on the filesize issue for now.

This is the default FileSizeLimit, it means 300.000 bytes, right? Used Calc.exe to convert hex to dec.
0x493e0
With the default being at around 290kbyte, obviously it's no wonder I cannot get bigger files to make use of the viewer..
So, I changed the FileSizeLimit to the following (again using Calc.exe to convert 3.000.000 to hex (2,9mbyte approx.).
0x2DC6C0
But this does not make a difference, I have a 330kb jscript/javascript file here, that just will not show in DOSV, while smaller files of same type will. I attached a demo *.js file (please remove *.txt extension).cgsw.js.txt (331 KB)Any idea what I'm doing wrong, since you sound as its me being to stupid? o)

Thank you!

Btw01: Javascript (*.js) syntax highlighting is not working here, other filetypes are fine. IIRC, we already had that?! o)
Btw02: I saw, the tab-width can be set now in the config, this is new isn't it? It's very good! Another major issue cleared! o)

There should not be any reason that the Scintilla DLL cannot register its window classes even when other versions of them are registered by the main exe. I had a quick look at the Scintilla code and can't see anything that should fail. (If there is something then it's a bug in Scintilla which could probably be fixed.)

RegisterWindow and CreateWindow both take HINSTANCE arguments for this exact reason, and the main program/exe uses its HINSTANCE (dopus.exe) while the Scintilla DLL uses the DLL's hinstance. Code which then wants to create a window also passes the HINSTANCE along with the class name, so that the OS knows which of the two identically-named classes it wants to create.

See blogs.msdn.microsoft.com/oldnew ... 9/?p=35873

Scratch that, I looked again and Scintilla is passing CS_GLOBALCLASS which breaks things. Hmm. We could rename our copy of the classes, I guess. (Another option is to static-link your own copy of the code and do the same with that.)

But is there a history of problems with the Scintilla API and backward compatibility which makes you not want to use the versions we ship? Is the worry theoretical or from past experience?

I just fixed that.

It should work correctly. Did you reset DOPUS after changing config file? What version do you have (11/12, 64/32-bit)?

Sorry for that. I uploaded old config file.

Yes.

Actually I prefer to use your version. I am just little worried, that it may break the plugin after some mirror update.

You mean, you just fixed the blank fontsize thing? For what version? 0.0.0.4 or 0.0.0.? (not available) yet?
Regarding the filesize thing, what do you mean with "reset DOPUS after changing config"? Shall I restart DO?
I'm running v12 x64.

0.0.0.5 (coming soon...)

Sorry... Yes, you should restart DOPUS ("Exit Directory Opus" option from main menu).

Can you check, if this line will reduce maximum file size to 32kB?

<FileSizeLimit>0x8000</FileSizeLimit>

Hi,

Why this wonderful plugin is not in the Interactive list of Opus Plugins & Media Capabilities? It should be there!

Regards.

It hasn't been posted to the plugins area of the forum yet, only here in the development area, so I've been waiting, assuming the author doesn't feel it is ready for general consumption yet.

@ gdobin

Really nice work, my new favorite plug-in.

v12 x64

I'm actually one error report response behind, sorry! But to show my general appreciation and support for this, I did a little installer to easify handling for all of us. Digging through this thread to find out where the files belong is quite inconvenient and error prone, isn't it? o)

Download:
InstallPlugin_v0.1.dcf (4.93 KB)
Usage:

  • download dosv_0_0_0_4.zip (the plugin itself)
  • download the InstallPlugin_*.dcf file from above and place it next to dosv_0_0_0_4.zip file
  • double click the *.dcf file (it is a DOpus button).
  • restart DO or refresh the list of viewer plugins via DO prefs

Output in the "Other Logs" utility panel is something like this.

Plugin Installer..
    TabPath        : C:
    TmpDirPath     : C:\dosv_0_0_0_4.zip.tmp
    64bit          : true
    Run Command    : COPY EXTRACT WHENEXISTS=replace COPYFILETIMES=yes COPYDIRTIMES=yes COPYATTR=yes FILE="C:\dosv_0_0_0_4.zip"..
    ZipInnerDirName: 0.0.0.4
    Run Command    : COPY WHENEXISTS=replace COPYFILETIMES=yes COPYDIRTIMES=yes COPYATTR=yes EXTRACT FILE="C:\dosv_0_0_0_4.zip.tmp..
    Run Command    : COPY WHENEXISTS=replace COPYFILETIMES=yes COPYDIRTIMES=yes COPYATTR=yes EXTRACT FILE="C:\dosv_0_0_0_4.zip.tmp..
    Run Command    : COPY WHENEXISTS=replace COPYFILETIMES=yes COPYDIRTIMES=yes COPYATTR=yes FILE="C:\dosv_0_0_0_4.zip.tmp\0.0.0.4\..
    Run Command    : DELETE NOFROMFOCUS QUIET FILE="C:\dosv_0_0_0_4.zip.tmp"
Done!

Expect this:

  • support for 32 and 64bit installations
  • USB export (if I did everything correct according to the information spread here from you Leo)
  • will ask if existing files are to be replaced (which is DO magic)

Here's a link to the post with the dsov_0_0_0_4.zip attachment. It took me a bit of time to find it.

Thanks DesertDwarf! o)

Now what about cleaning/updating/splitting this thread into something useful for all the people not curious enough to read through 4 pages to find the hidden treasures within? o)

Great idea tbone!
To open prefs dialog you can add:

Run(&apos; PREFS page = plugins&apos;);

Sadly, only VFS plugins can be enabled by commands.

You can use the Show command to enable/disable viewer plugins.

It can also be used to open a plugin's config dialog directly, without opening Preferences, if that is of interest.

You are right. I didn't check the Show command.
What about the precedence of plugins?

Precedence can only be set through Preferences, although I think commands can specify a particular plugin to use on a particular file (I'd need to check that to be sure).

Gosh darn it! I forgot about this plugin. I need to reinstall it.

Please try the little installer! o)