summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/NativesGenerator.java
diff options
context:
space:
mode:
authorSilenio Quarti <silenio>2004-04-30 18:43:41 +0000
committerSilenio Quarti <silenio>2004-04-30 18:43:41 +0000
commitda5cf917349de8db2168742a71988f436cc912a9 (patch)
tree698033a7ca547f9b0a15789021a1a9b20fde28af /bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/NativesGenerator.java
parentd979bbf230ff3a3ba0e2b006af933ffbe8cd30c5 (diff)
downloadeclipse.platform.swt-da5cf917349de8db2168742a71988f436cc912a9.tar.gz
eclipse.platform.swt-da5cf917349de8db2168742a71988f436cc912a9.tar.xz
eclipse.platform.swt-da5cf917349de8db2168742a71988f436cc912a9.zip
stats
Diffstat (limited to 'bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/NativesGenerator.java')
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/NativesGenerator.java24
1 files changed, 14 insertions, 10 deletions
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/NativesGenerator.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/NativesGenerator.java
index 436d908d91..bbc41096a4 100644
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/NativesGenerator.java
+++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/NativesGenerator.java
@@ -229,19 +229,23 @@ void genereateSetParameter(int i, Class paramType, ParameterData paramData) {
}
}
-void generateExitMacro(String function) {
+void generateExitMacro(Method method, String function) {
if (!enterExitMacro) return;
- output("\tNATIVE_EXIT(env, that, \"");
+ output("\t");
+ output(getClassName(method.getDeclaringClass()));
+ output("_NATIVE_EXIT(env, that, ");
output(function);
- output("\\n\")");
+ output("_FUNC);");
outputDelimiter();
}
-void generateEnterMacro(String function) {
+void generateEnterMacro(Method method, String function) {
if (!enterExitMacro) return;
- output("\tNATIVE_ENTER(env, that, \"");
+ output("\t");
+ output(getClassName(method.getDeclaringClass()));
+ output("_NATIVE_ENTER(env, that, ");
output(function);
- output("\\n\")");
+ output("_FUNC);");
outputDelimiter();
}
@@ -501,7 +505,7 @@ void generateReturn(Method method, Class returnType, boolean needsReturn) {
}
void generateGTKmemmove(Method method, String function, Class[] paramTypes) {
- generateEnterMacro(function);
+ generateEnterMacro(method, function);
output("\t");
boolean get = paramTypes[0].isPrimitive();
String className = getClassName(paramTypes[get ? 1 : 0]);
@@ -512,7 +516,7 @@ void generateGTKmemmove(Method method, String function, Class[] paramTypes) {
output(get ? " *)arg0)" : " *)arg1)");
output(";");
outputDelimiter();
- generateExitMacro(function);
+ generateExitMacro(method, function);
}
void generateFunctionBody(Method method, MethodData methodData, String function, Class[] paramTypes, Class returnType) {
@@ -527,7 +531,7 @@ void generateFunctionBody(Method method, MethodData methodData, String function,
generateGTKmemmove(method, function, paramTypes);
} else {
boolean needsReturn = generateLocalVars(method, paramTypes, returnType);
- generateEnterMacro(function);
+ generateEnterMacro(method, function);
generateGetters(method, paramTypes);
if (methodData.getFlag("dynamic")) {
generateDynamicFunctionCall(method, methodData, paramTypes, returnType, needsReturn);
@@ -535,7 +539,7 @@ void generateFunctionBody(Method method, MethodData methodData, String function,
generateFunctionCall(method, methodData, paramTypes, returnType, needsReturn);
}
generateSetters(method, paramTypes);
- generateExitMacro(function);
+ generateExitMacro(method, function);
generateReturn(method, returnType, needsReturn);
}