Well, I use Options > Editor > Autosave > Save files when focus is lost

for similar purpose.

On 9/14/25 01:09, Patrik Karlström wrote:
Thanks Laszlo, it works perfectly!
With this simple plugin I'm now able to save all files in the IDE first thing in my external build script.
So no more waiting for a build to fail (due to unsaved files at least...)

public class Handler implements ArgsProcessor {

    @Arg(longName = "save-all")
    @Description(
            shortDescription = "Save all files"
    )
    public boolean mSaveAllOption;

    public Handler() {
    }

    @Override
    public void process(Env env) throws CommandException {
        if (mSaveAllOption) {
            LifecycleManager.getDefault().saveAll();
        }
    }

}


Den lör 13 sep. 2025 kl 18:50 skrev Laszlo Kishalmi <[email protected]>:

    You can call the platform application with different command line
    parameters. If the application is already running those can be
    processed
    by the opened application.


    That's how Open project/file works through CLI arguments.

    On 9/12/25 21:44, Patrik Karlström wrote:
    > Does the platform have some kind of support for communicating
    with the
    > application from the outside by files in the userdir or similar?
    >
    > /Patrik

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: [email protected]
    For additional commands, e-mail: [email protected]

    For further information about the NetBeans mailing lists, visit:
    https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to