Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format resulting C code #2

Open
jonpas opened this issue Nov 30, 2019 · 0 comments
Open

Format resulting C code #2

jonpas opened this issue Nov 30, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@jonpas
Copy link
Owner

jonpas commented Nov 30, 2019

var options = new Hashtable<String, String>()
options.put("org.eclipse.jdt.core.compiler.codegen.targetPlatform", "1.8")
options.put("org.eclipse.jdt.core.compiler.compliance", "1.8")
options.put("org.eclipse.jdt.core.compiler.source", "1.8")
var codeFormatter = ToolFactory.createCodeFormatter(options)
var textEdit = codeFormatter.format(CodeFormatter.K_COMPILATION_UNIT, result, 0, result.length(), 0, "");

.format is for some reason unavailable except on deprecated createCodeFormatter() method.

@jonpas jonpas added the enhancement New feature or request label Nov 30, 2019
@jonpas jonpas changed the title Format resulting (C) code Format resulting C code Nov 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant