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
Hi LucaMS,
I have just sent 16 € to you. You should receive it from vecchicristina@hotmail.com, my wife.
If I understand right you send me the code too? I hope to have it to study a real application....
Thank a lot in advance
Yes, the source code (not "too", since you can compile it yourself; if you need help... I'm here)

"Sent".

Thank you so much.
 
Last edited:

abonvici

Member
Licensed User
I am sorry , i had access on email you sent for sharing But when i click Open it ask for another autorization request
So what i have to do ? is this normal behavior, every time i shared something in google drive i only sent the link to download.
May you please authorize allebonvi@gmail.com cause the other email, vecchicristina@hotmail.com, is one of my wife....that bites if i open her mailbox...:)
thank a lot
Alessandro
 

LucaMs

Expert
Licensed User
Longtime User
Update: v. 2.1.3

I changed the way a snippet is added to the recent list.
In the previous version this happened when a snippet was opened but it is not certain that it would then be used. Now the addition occurs when the Copy button or the Save button are pressed.

I haven't uploaded this version to my Google Drive yet because you might disagree, although it seems a lot more logical to me that way; I wait your opinion.
 

LucaMs

Expert
Licensed User
Longtime User
Update: v. 2.1.3

I changed the way a snippet is added to the recent list.
In the previous version this happened when a snippet was opened but it is not certain that it would then be used. Now the addition occurs when the Copy button or the Save button are pressed.

I haven't uploaded this version to my Google Drive yet because you might disagree, although it seems a lot more logical to me that way; I wait your opinion.
I have already changed my mind; the snippet will be added to the list only when the Copy button is pressed. The Save button could be used when creating many new snippets, especially initially, so better not put it here too.


EDIT:
I haven't uploaded this version to my Google Drive yet because
Uploaded.
 
Last edited:

gmoriwaki

Member
Licensed User
When it tries to run I get the following error:

B4X:
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:522)
    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: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)
 

LucaMs

Expert
Licensed User
Longtime User
As you can see, in Main I have this line:
B4X:
'#JavaCompilerPath: 14, C:\jdk-14.0.1\bin\javac.exe
This because if I want to create a stand-alone exe I use that version of the jdk (this means that I have both jdk version on my PC).
I use Launch4j 3.13, free tool.

You can find other info on this site on how to create stand-alone B4J applications.
 

Colin Evans

Active Member
Licensed User
Longtime User
Hi, I get the same error as #49 and being a complete novice with B4J and Java I'm a little, well a lot, confused on what I need to do to create a standalone executable, any simple instructions would be gratefully received

I did download Launch4J but completely confused :)

Update:
Downloaded Java 8 and working in B4J could you explain how I get it to run standalone, many thanks, brilliant tool by the way
 
Last edited:

Colin Evans

Active Member
Licensed User
Longtime User
Hi, Sorry to bother you again but I can run in B4J using java version 8 but when I try to create a standalone program it states I need java 11 or later, I downloaded java 14 and amended the Paths but when I try to run in B4J I get the following error, and it's the same with trying to create a standalone program, any idea's where I'm going wrong

B4J Version: 8.90
Parsing code. (0.15s)
Java Version: 14
Building folders structure. (0.07s)
Compiling code. (0.35s)
Compiling layouts code. (0.00s)
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.2

So I install java 11 from the link on the site and it goes through the process of both running in B4J and creating a standalone, in B4J it just flashes up and disappears and trying to run the created jar file does nothing
 
Last edited:

LucaMs

Expert
Licensed User
Longtime User
Please, Colin (and anyone else), open a new thread on how to get a stand-alone sw with B4J or search the topic on site (already discussed), because otherwise other members might think that the problem is in my tool, which has no bugs :)

Thank you.
 

LucaMs

Expert
Licensed User
Longtime User
Hi, Sorry to bother you again but I can run in B4J using java version 8 but when I try to create a standalone program it states I need java 11 or later,
Just compile it in Release mode, after setting the Java 8 path:
1617724377779.png

(You might have a different version of java 8, it's ok).

1617724227134.png
 
Last edited:

Colin Evans

Active Member
Licensed User
Longtime User
Thanks, brilliant tool and I realise the problem is with trying to get a stanalone via B4J and Java, it won't work with Java 8 as it states you need version 11+ I will search the forum and if not post another thread, thanks again
 
Top