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.1.0 (see this post).

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:

LucaMs

Expert
Licensed User
Longtime User
it won't work with Java 8 as it states you need version 11+
This happens if you click on "Build Standalone Package".
1617787892397.png


If you compile (run - F5) the project after selecting Release:
1617788032023.png

lmSnippetManager.jar will be created in sub-folder Objects. This file will run by just double-clicking on it.
 

BigBoss123

Member
Licensed User
Longtime User
Hi Lucas

Just sent money for the Snippets Manager.
Thanks for your great program.

Kind regards
David Donohue
 

omarruben

Active Member
Licensed User
Longtime User
I got it, looks like I did not press the button Donate...
2021-04-16 21_57_33-Window.jpg
I did it again , this time I have a confirmation number
 

omarruben

Active Member
Licensed User
Longtime User
I have a runtime error :

Waiting for debugger to connect...
Program started.
Error occurred on line: 552 (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:523)
at com.snippetsmanager.lm.main._appstart(main.java:396)
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:91)
at anywheresoftware.b4a.shell.ShellBA.raiseEvent2(ShellBA.java:98)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:78)
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)


on line

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))
End Sub

after reading the forum, I copiled on release mode and still the error, after I did Stand Alone Package and after finish compiling no error, but after a double click on the exe file opens and closes immediately
 
Last edited:

LucaMs

Expert
Licensed User
Longtime User
I have a runtime error :

Waiting for debugger to connect...
Program started.
Error occurred on line: 552 (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:523)
at com.snippetsmanager.lm.main._appstart(main.java:396)
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:91)
at anywheresoftware.b4a.shell.ShellBA.raiseEvent2(ShellBA.java:98)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:78)
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)


on line

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))
End Sub

after reading the forum, I copiled on release mode and still the error, after I did Stand Alone Package and after finish compiling no error, but after a double click on the exe file opens and closes immediately
https://www.b4x.com/android/forum/threads/b4x-tool-source-lm-snippets-manager.127714/post-811470
 

jackymb

Member
Licensed User
hello lucas

I had a power cut on the second payment. I checked my paypal account there are 2 payments. 🤔
it is a mistake.🙁
can you made a refund.
thank you in advance.

best regards

Jacky
 
Top