Share My Creation [B4X] [TOOL][SOURCE] lm Snippets Manager

I definitely want to speed up the development of my softwares; I decided to develop a very useful snippets manager.

Although the main purpose is to have all your snippets at your fingertips, saved in a local db, cataloged and easy to find, I have also added the possibility of inserting those that are on b4x.com and also a link to their page.

I am sure that it will also be of use to all the members of our beautiful community.

I'll fill it with my own snippets, as I'm sure you will too, but also the best and most useful ones that are on site.


NEW Version 3.0.0 - 07/19/2022 - Replaced the import-export part.

Version 2.3.0 - 03/29/2022 - Added import-export.

Version 2.2.0 - Added "wildcards" to filter for snippet name. Also added ToolTipTexts. See post #86.

Version 2.1.0 - Added a very useful list of most recent snippets used (window always on top). See post #40.

Ready 2.0.0 version, which implements the feature shown in
post #34, code highlighting (which had a hard to solve bug).

Source code - Min. donation: 16 euros.
Obviously you are not allowed to publish/sell the lmSnippetManager source code.

NOTE: to create the stand-alone (exe) version, use:
Download OpenJDK 14.0.1
EDIT: see this post. You have to add javafx folder to that OpenJDK 14.0.1.




Made with love in B4X... of course!!!
 
Last edited:

aidymp

Well-Known Member
Licensed User
Longtime User
I have v. 8 in Paths (using it in debug mode) and in code, as you can see in Main:
#JavaCompilerPath: 14, C:\jdk-14.0.1\bin\javac.exe

Do I have to install javaFX or something also ??
 

LucaMs

Expert
Licensed User
Longtime User
no, it is part of v. 14.0.1
I've just checked. On my PC that version, 14.0.1 contains javafx, but the download indicated in the first post of this thread does not! :oops:

I don't know how this is possible; I'm searching...
 

LucaMs

Expert
Licensed User
Longtime User
That's right, that download doesn't include javafx. I don't know where I got it! And it is necessary.
 

aidymp

Well-Known Member
Licensed User
Longtime User
I've just checked. On my PC that version, 14.0.1 contains javafx, but the download indicated in the first post of this thread does not! :oops:

I don't know how this is possible; I'm searching...

Yes this is my problem lol, I see images (in the forum) of folders that just dont exist in my Java folder even though I am using the links provided. Im looking more stupid than usual! :rolleyes:
 

LucaMs

Expert
Licensed User
Longtime User
All I can do is put javafx on my GDrive, hoping not to break any laws!

But now I should have dinner and cry in watching Turkey-Italy (football).
 

aidymp

Well-Known Member
Licensed User
Longtime User
So the .zip you sent me i copied it into the C:\jdk-14.0.1\ folder and it compiles & works correctly!

I now have about 10 Java versions installed or unzipped to various locations! lol This is obviously not your fault, It appears many people have just decided to create Java packages and bundles, with no exlaination as to WHY! lol

Solved thank you.
 

aeric

Expert
Licensed User
Longtime User
Hi LucaMS ... I have an error message

B4X:
Waiting for debugger to connect...
Program started.
Fehler in Zeile: 547 (Main)
java.lang.RuntimeException: Method: reorderingProperty not found in: javafx.scene.control.skin.TableHeaderRow
    at anywheresoftware.b4j.object.JavaObject$MethodCache.getMethod(JavaObject.java:363)
    at anywheresoftware.b4j.object.JavaObject.RunMethod(JavaObject.java:120)
    at com.snippetsmanager.lm.main._disablereordering(main.java:519)
    at com.snippetsmanager.lm.main._appstart(main.java:395)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:632)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:237)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:167)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:108)
    at anywheresoftware.b4a.shell.ShellBA.raiseEvent2(ShellBA.java:98)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:95)
    at com.snippetsmanager.lm.main.start(main.java:38)
    at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:846)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:455)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
    at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
    at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
    at java.base/java.lang.Thread.run(Thread.java:834)
I solved this by (works with openJDk11):
B4X:
Private Sub DisableReordering
    Dim Jo As JavaObject = tbvSearch
    Dim Header As JavaObject = Jo.RunMethod("lookup", Array("TableHeaderRow"))
    'Dim Prop As JavaObject = Header.RunMethod("reorderingProperty", Null)
    'Dim o As Object = Prop.CreateEventFromUI("javafx.beans.value.ChangeListener", "HeaderOrder", Null)
    'Prop.RunMethod("addListener",Array(o))
    Header.RunMethod("setMouseTransparent", Array(True))
End Sub
Reference: https://stackoverflow.com/questions...-the-reordering-of-table-columns-in-tableview (second answer)
 

JakeBullet70

Well-Known Member
Licensed User
Longtime User
Thinking a new feature would be to add file attachments to snippets!
I just added some custom Button code snippet - now I really would need to add a zip file of images with it.
 

JakeBullet70

Well-Known Member
Licensed User
Longtime User
And if you do... DO NOT store attachments in the DB! lol... I would do it but neck deep in another project at the moment.
 

LucaMs

Expert
Licensed User
Longtime User
I replaced the whole "Import & Export" part.

I uploaded right now the new version (3.0.0) to my Google Drive but I don't know if this will cause the notification to be sent to you automatically or I will have to manually send it :confused: to the many hundreds of members 😁 who have requested this wonderful tool :)

Let me know.
 

toby

Active Member
Licensed User
Longtime User
Please send me a download link of the new version. I can't wait to use the exciting feature.
 

toby

Active Member
Licensed User
Longtime User
B4J Version: 9.80
Parsing code. (0.21s)
Java Version: 14
Building folders structure. (0.01s)
Compiling code. (0.34s)
Compiling layouts code. (0.01s)
Organizing libraries. (0.00s)
Compiling generated Java code. Error
error: module not found: javafx.swing
1 error
only showing the first 1 errors, of 6 total; use -Xmaxerrs if you would like to see more

javac 14.0.1
I got the above error while trying to compile v3.00. I've installed both jdk14.01 and 14.0.2 and none of them contains any folder starting with javafx. Please zip them and put them in your Google Drive for me and other to download, please.

I use 64 bit windows 10, by the way.
 
Last edited:

aidymp

Well-Known Member
Licensed User
Longtime User
Any link? lol - Thunderbird deleted all my old emails! and I haven't had any notification from Google! So can't try it, I'm very happy with the current version though, Saves a lot of time! Thanks
 

LucaMs

Expert
Licensed User
Longtime User
Any link? lol - Thunderbird deleted all my old emails! and I haven't had any notification from Google! So can't try it, I'm very happy with the current version though, Saves a lot of time! Thanks
I replaced the whole "Import & Export" part.

I uploaded right now the new version (3.0.0) to my Google Drive but I don't know if this will cause the notification to be sent to you automatically or I will have to manually send it :confused: to the many hundreds of members 😁 who have requested this wonderful tool :)

Let me know.
So the automatic "distribution" from Google Drive didn't work :(
Tomorrow I will send it to everyone... manually :confused:

[There should also be a way to create a group and share the file with it; I'll try better]
 

LucaMs

Expert
Licensed User
Longtime User
Top