Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo Ufimtsev2016-08-26 20:59:45 +0000
committerAlexander Kurtakov2016-09-08 07:19:58 +0000
commit0302f7be79e97cd7830c11c0d6e8ababa18167b6 (patch)
treef9e35e911524b326fa6d5cbd6e0138fea86abf6e /bundles/org.eclipse.swt.tools
parent064b7951f64dfa7c0006d42ed2edc3782eb005dd (diff)
downloadeclipse.platform.swt-0302f7be79e97cd7830c11c0d6e8ababa18167b6.tar.gz
eclipse.platform.swt-0302f7be79e97cd7830c11c0d6e8ababa18167b6.tar.xz
eclipse.platform.swt-0302f7be79e97cd7830c11c0d6e8ababa18167b6.zip
Bug 500363: Native auto generated files should mention that they are
auto generated When doing work with native files, it's not clear as to which files are auto generated and which files are written manually. Especially when you are just starting to work with native C code. I added a method to JNIGenerator.java that inserts a note to every generated file about the file being auto-generated. [Update Patchset 3] - The updated patchset updates contains auto-generated files for all platforms. - Fixed typo and added name of generator class. Change-Id: I7fdac972eb2cb829316d0e970601ed4c87e6008b Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=500363 Signed-off-by: Leo Ufimtsev <lufimtse@redhat.com>
Diffstat (limited to 'bundles/org.eclipse.swt.tools')
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIGenerator.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIGenerator.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIGenerator.java
index c5f90bc143..cf73b9c395 100644
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIGenerator.java
+++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIGenerator.java
@@ -203,12 +203,19 @@ public abstract void generate(JNIClass clazz);
public void generateCopyright() {
}
+public void generateAutoGenNote() {
+ outputln("/* Note: This file was auto-generated by " + JNIGenerator.class.getName() + " */");
+ outputln("/* DO NOT EDIT - your changes will be lost. */");
+ outputln();
+}
+
public void generateIncludes() {
}
public void generate() {
if (classes == null) return;
generateCopyright();
+ generateAutoGenNote();
generateIncludes();
sort(classes);
for (int i = 0; i < classes.length; i++) {

Back to the top