Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ease-dev] Format source file from EASE Script

Hi Raphael,

If you are after Java formatting - consider the command line formatter directly:

${ECLIPSE} -consolelog -nosplash -application org.eclipse.jdt.core.JavaCodeFormatter \
    -config .settings/org.eclipse.jdt.core.prefs \
    $PWD -data format_code_workspace
rm -rf format_code_workspace

If you want to do Java code cleanups - that is a UI operation that can be somewhat scripted: Here is an example of doing that: https://git.eclipse.org/c/cdt/org.eclipse.cdt.git/tree/releng/scripts/cleanup.py - I do this semi-automatically as outlined in https://kichwacoders.com/2018/11/24/cdt-has-been-reformatted - but basic steps are:
- Open all files
- Run the EASE script - which will format and close each file

HTH,
Jonah



~~~
Jonah Graham
Kichwa Coders
www.kichwacoders.com


On Wed, 16 Feb 2022 at 01:50, Raphael Geissler <raphael.geissler@xxxxxxxxx> wrote:
Hi!

I want to format a source file with an EASE script. Does someone know how I can trigger formatting from code?

Thanks your ideas,

Raphael
_______________________________________________
ease-dev mailing list
ease-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/ease-dev

Back to the top