Rick Brewster

CodeLab v2.24 (for advanced users) Released August 31, 2017

Recommended Posts

14 minutes ago, PaxonJollock said:

Wait, I need to have an image on my clipboard while I am developing the plugin?! Never thought of that.

Well, your code is trying to fetch an image from the clipboard, so yes, in this case you do. ;)

Share this post


Link to post
Share on other sites

Nullcheck added, square root added (oopsy), and plugin is working now! Thanks a million! Just wishing PDN had plugins for blend modes between layers, so I didn't have to use the clipboard as an intermediary

Edited by PaxonJollock

Share this post


Link to post
Share on other sites

PaxonJollock though you should have an image in the clipboard while writing the plugin, your code needs to handle the case when there isn't an image in the clipboard. You don't want it crashing if someone forgets to load an image before running it.

Share this post


Link to post
Share on other sites

Just a little observation about CodeLab: if the file name begins with a digit, the dll file is not build.
 

Spoiler

cSvObwI.png

 

Share this post


Link to post
Share on other sites
9 minutes ago, xod said:

if the file name begins with a digit

 

Yeah, don't do that.

  • Upvote 1

Share this post


Link to post
Share on other sites

I response to a CodeLab plugin I posted, ReMake suggested it would be better for double-slider step size to track the precision, so clicking the arrows always changes the low digit. I agree. Though it's always possible to type in the full-precision value, that isn't convenient for making fine adjustments. There may be cases when it makes sense to use some other step size, but if there can only be one choice, I think it should be to increment and decrement the low digit by one.

Share this post


Link to post
Share on other sites

CodeLab 2.19 Released

This is only for Paint.NET 4.0.6+!

 

Small update today...

 

Changes:

Fixed the crash that could be caused by the error tooltips. (toe_head2001)

▪ HiDPI fixes to all forms. (toe_head2001)

▪ IntelliBox items now filter as you type. (toe_head2001)

▪ Checkbox for Show Errors turns red if there are errors. (BoltBait)

 

Grab the CodeLab DLL here:

http://www.boltbait.com/pdn/CodeLab/

 

  • Upvote 6

Share this post


Link to post
Share on other sites

To expound on the IntelliBox filtering, here are two example scenarios.

 

You want to find all ColorBgra(s) that are a variation of 'Gold'.

filter1.png

 

 

You want to use "that Hex method", but can't remember what letter it starts with.

filter2.png

 

Basically, it now works more like the IntelliBox in Visual Studio.

  • Upvote 4

Share this post


Link to post
Share on other sites
45 minutes ago, Ego Eram Reputo said:

CodeLab has come a long way.

 

Yes, if you compare the screenshots on the first page of this thread... and you think of the capabilities it has now vs. then...

 

Amazing.

 

All made possible by Tom Jackson's original code.

Share this post


Link to post
Share on other sites

I read on the first page that the original release of CodeLab came bundled with some sample Effects. Using the Wayback Machine, I dug up that old fossil from 11 years ago.

 

I went through each one, and made them all compatible with paint.net v4.

:RightArrowBlue:  Tom's Samples.zip

  • Upvote 2

Share this post


Link to post
Share on other sites

CodeLab 2.19 in Russian

 

You can find the new version of CodeLab in Russian here.

Вы можете найти новую версию CodeLab на русском языке здесь.

  • Upvote 1

Share this post


Link to post
Share on other sites

I have an error when starting CodeLab : 

Spoiler

File: C:\Program Files\Paint.NET\Effects\CodeLab.dll
      Name: PaintDotNet.Effects.CodeLab
      Version: 2.19.6314.36155
      Author: Copyright ©2017 BoltBait
      Copyright: C# Code Editor for Paint.NET Plugin Development
      Website: http://www.boltbait.com/pdn/CodeLab/
      Full error message: System.ComponentModel.Win32Exception (0x80004005): Could not load the Scintilla module at the path 'C:\Users\FAMILY\AppData\Local\Temp\ScintillaNET\2.19.6314\x86\SciLexer.dll'. ---> System.ComponentModel.Win32Exception (0x80004005): Access is denied
   at ScintillaNET.Scintilla.get_CreateParams()
   at System.Windows.Forms.Control..ctor(Boolean autoInstallSyncContext)
   at ScintillaNET.Scintilla..ctor()
   at PaintDotNet.Effects.CodeTextBox..ctor()
   at PaintDotNet.Effects.CodeLabConfigDialog.InitializeComponent()
   at PaintDotNet.Effects.CodeLabConfigDialog..ctor()
   at PaintDotNet.Effects.CodeLab.CreateConfigDialog()
   at PaintDotNet.Menus.EffectMenuBase.RunEffectImpl(Type effectType) in D:\src\pdn\src\PaintDotNet\Menus\EffectMenuBase.cs:line 911
 

 

Share this post


Link to post
Share on other sites
3 hours ago, Eli said:

Could not load the Scintilla module at the path 'C:\Users\FAMILY\AppData\Local\Temp\ScintillaNET\2.19.6314\x86\SciLexer.dll'. ---> System.ComponentModel.Win32Exception (0x80004005): Access is denied

Access is being Denied to the tmp directory? That's odd.

 

Are you running with limited permissions in Windows? i.e. non-administrator account?

Do you have any extra "security" software on your system?

Share this post


Link to post
Share on other sites

My suggestion is to go into your temp directory and delete everything...

 

Try this in a DOS box:

 

c:

cd \Users\FAMILY\AppData\Local\Temp\

rmdir /S ScintillaNET

 

 

Share this post


Link to post
Share on other sites

Thanks BoltBait and Toe_head2001,

 

It was working about a month ago. I deleted everything from the Temp directory. Rebooted the PC and it still showed the same error. I saw that the SciLexer.dll was created. I went to see its properties and found that some of the permissions were unchecked.  I edited and now it works. I did not make those modifications. Perhaps AVAST did it for me. :) 

 

error-codelab-522913f.png

Share this post


Link to post
Share on other sites

I'm in the process of refactoring a lot of the "Intellisense" stuff in CodeLab. Here's are some fun teaser screenshots for all of you.

 

Spoiler

This is a composite of two screenshots.

autocomplete.png

 

ooh la la! Look at that! IntelliBox for non-TypeMembers. Mash that Tab key!

 

 

Spoiler

Highlight for the object under the cursor.

usageHiLite0.png

usageHiLite1.png

It doesn't just match spelling; it also makes sure the it's the same kind of object (Type, Property, Field, Method, Variable).

usageHiLite2.png

^^^ The BrushWidth variable doesn't cause Highlighting on the BrushWidth Property.

 

 

 

Other good stuff too:

- Ctrl + J support

- It will remember the last used item from the IntelliBox, and will automatically select it the next time, if it's listed.

  • Upvote 4

Share this post


Link to post
Share on other sites

More Work-in-Progress screenshots.

 

Previously, Constants and Enum Items would be shown generically as Fields, but they are now further differentiated.

I even have them show their values in the ToolTip (if they're static).

 

Spoiler

In the IntelliBox:

CodeLab-const.png

 

CodeLab-enumItem.png

 

CodeLab-staticField.png

 

and an Editor IntelliTip

CodeLab-constTip.png

 

 

I've also added Snippets for the following: if, else, switch, while, for, foreach, using.

Place the text caret on the right side of the word and press the Tab key (or press Tab twice when in the IntelliBox).

Spoiler

Here's what the Snippet for 'foreach' looks like:

 

CodeLab-foreach.png

 

The selection (or just the caret position in some cases) is automatically set, so you can start typing in the correct place within the Snippet.

 

 

  • Upvote 4

Share this post


Link to post
Share on other sites

CodeLab 2.20 Released

This is only for Paint.NET 4.0.6+!

 

Small update today...

 

Changes:

Intelligent Assistance updates (see previous posts above for description). (toe_head2001)

▪ Frosted Glass added to list of Template effects (Ctrl+N) (BoltBait)

 

Grab the CodeLab DLL here:

http://www.boltbait.com/pdn/CodeLab/

  • Upvote 5

Share this post


Link to post
Share on other sites

CodeLab 2.20 in Russian

 

You can find the new version of CodeLab in Russian here.

Вы можете найти новую версию CodeLab на русском языке здесь.

  • Upvote 3

Share this post


Link to post
Share on other sites

CodeLab 2.21 Released

This is only for Paint.NET 4.0.6+!

 

Small update today...

 

Changes:

Fixed bug in the Build to DLL screen when using Rich Text help files. (toe_head2001)

▪ Modified updater code to defeat caching. (BoltBait)

 

Grab the CodeLab DLL here:

http://www.boltbait.com/pdn/CodeLab/

 

Thanks to ReMake for the bug report!

  • Upvote 1

Share this post


Link to post
Share on other sites

CodeLab 2.21 in Russian

 

You can find the new version of CodeLab in Russian here.

Вы можете найти новую версию CodeLab на русском языке здесь.

  • Upvote 2

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now