Files
libadalang/extensions/java_api/jni_funcs
Pierre-Marie de Rodat 859f5701dd C/Python/OCaml/Java: bind all GPR loading options
(cherry picked from commit f39ebe979e)
2025-10-23 12:23:52 +00:00

84 lines
2.4 KiB
Plaintext

## vim: ft=makojava
<%
nat = c_api.get_name
%>
// --- Project manager functions
${java_doc("libadalang.gpr_options_create", 4)}
public static native PointerWrapper ${nat("gpr_options_create")}();
${java_doc("libadalang.gpr_options_add_switch", 4)}
public static native void ${nat("gpr_options_add_switch")}(
ProjectOptions options,
int switchKind,
String param,
String index,
boolean overwrite
);
${java_doc("libadalang.gpr_options_free", 4)}
public static native void ${nat("gpr_options_free")}(
ProjectOptions options
);
/**
* Function to load a GPR project.
*
* @param diagnostics The list of diagnostics emitted during the project
* opening. Will be filled by this function call.
*/
@CompilerDirectives.TruffleBoundary
public static native PointerWrapper ${nat("gpr_project_load")}(
ProjectOptions options,
boolean adaOnly,
List<String> diagnostics
);
/** Free the given project */
@CompilerDirectives.TruffleBoundary
public static native void ${nat("gpr_project_free")}(
ProjectManager project
);
/** Get the unit provider for the given project */
@CompilerDirectives.TruffleBoundary
public static native UnitProvider ${nat("gpr_project_create_unit_provider")}(
ProjectManager project,
String subproject
);
/** Get the source file array for the given project */
@CompilerDirectives.TruffleBoundary
public static native String[] ${nat("gpr_project_source_files")}(
ProjectManager project,
int mode,
String[] subprojects
);
${java_doc("libadalang.gpr_project_create_context", 4)}
public static native AnalysisContext ${nat("gpr_project_create_context")}(
ProjectManager project,
String subproject,
EventHandler eventHandler,
boolean withTrivia,
int tabStop
);
/** Create an auto provider reference */
@CompilerDirectives.TruffleBoundary
public static native UnitProvider ${nat("create_auto_provider")}(
String[] sourceFiles,
String charset
);
// --- Config pragmas
@CompilerDirectives.TruffleBoundary
public static native void ${nat("set_config_pragmas_mapping")}(
AnalysisContext context,
AnalysisUnit globalPragmas,
AnalysisUnit[] localPragmas
);