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

Any plans to add the editor function? I still have the original Scintilla source code editor plugin in a folder somewhere and it was SO handy when needing to make minor changes to a whole bunch of files.

@gdobin
Want to come back here and.. o)

Are you still poking around in that code? o) Do you consider to add one of these things? o)

  • Possibility to set a tab-width somewhere (I find a default tab-width of 8 blanks much to wide for browsing code).
  • Possibility to scroll the text by mousewheel, though focus is still within the find textbox at the bottom.
  • Possibility to reset the zoom to 100%

Another thing I struggle with is viewing files greater than about 300kb. I already played with that filesize tag, but whatever I insert, it seems to get worse. Only much smaller files can be opened after changing that setting on my system.

If the tab-width and filesize issues could be addessed at least, I'd be very glad! o)) I'd also be fine with donating some bucks, maybe others join in and we can keep you motivated? Paypal address? o)

Long time DOPUS user. Just came across this plugin. Very nice job!

One note. the Font list doesn't quite populate right. I use HACK for my font, and there are actually several fonts in the HACK group, but when the font list comes up, only one of this is available to select from. Odd, but not insurmountable.

At any rate, just wanted to say thanks and very well done!

@gdobin
Are you still there?

@gdobin
In case you read this, would you mind to give some indication of being out there?

Many months have passed since your last response, looking forward to hear from you.
You just can't pop in from out of nowhere, gift us with the plugin and move on! o)

v0.0.0.4

Scintilla 3.6.5 Tab width customization. Config dialog will open correct parser settings. Zoom integration with dopus. A few small bugfixes.

This version seems to work with current v12 beta.
Is v12 compiled with Scintilla?
dosv_0_0_0_4.zip (1.83 MB)

Yes, Scintilla is compiled into Opus 12, and it can now be used without any additional DLLs.

We plan to use it ourselves in the future, but it's there for plugins already if any want to use it.

The control window can be created in the usual way, specifying NULL or the main exe as the HINSTANCE.

Hello @gdobin, what a nice surprise to see you again! o) I hope you're doing alright!

Thanks for the new version, the previous one had issues with slightly bigger files, I would have been happy to try and fix some things for us by myself, but you left without the sources, so could you include them in the next upload or put them anywhere separatly? That would be an awesome move! o)

What version did you use? Can you add correct headers to SDK (after beta)?

Seriously, you should just refactor them. What issues do you have? Screenshot and sample file would be nice.

3.6.3 or 3.6.4, but we'll be updating it as time goes on.

The headers are part of the Scintilla SDK and I don't think we'd gain anything by copying them into our SDK.

If you do not freeze Scintilla version after release, you risk some compatibility problems. For example, I now use 3.6.5 ...

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>