/[pkgs]/rpms/eclipse/devel/eclipse-ecj-rpmdebuginfo.patch
ViewVC logotype

Diff of /rpms/eclipse/devel/eclipse-ecj-rpmdebuginfo.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.2 Revision 1.3
1--- plugins/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java.orig 2006-02-07 13:50:13.000000000 -0500 1### Eclipse Workspace Patch 1.0
2+++ plugins/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java 2006-02-07 13:55:29.000000000 -0500 2#P org.eclipse.jdt.core
3@@ -2405,6 +2405,28 @@ 3Index: batch/org/eclipse/jdt/internal/compiler/batch/Main.java
4 this.times = new long[this.repetitions]; 4===================================================================
5 this.timesCounter = 0; 5RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java,v
6retrieving revision 1.327
7diff -u -r1.327 Main.java
8--- batch/org/eclipse/jdt/internal/compiler/batch/Main.java 21 Apr 2008 15:00:59 -0000 1.327
9+++ batch/org/eclipse/jdt/internal/compiler/batch/Main.java 20 Nov 2008 19:26:57 -0000
10@@ -268,22 +268,22 @@
11 if ((startPosition > endPosition)
12 || ((startPosition < 0) && (endPosition < 0))
13 || length == 0)
14- return Messages.problem_noSourceInformation;
15+ return Messages.problem_noSourceInformation;
16
17 StringBuffer errorBuffer = new StringBuffer();
18 if ((bits & Main.Logger.EMACS) == 0) {
19- errorBuffer.append(' ').append(Messages.bind(Messages.problem_atLine, String.valueOf(problem.getSourceLineNumber())));
20+ errorBuffer.append(' ').append(Messages.bind(Messages.problem_atLine, String.valueOf(problem.getSourceLineNumber())));
21 errorBuffer.append(Util.LINE_SEPARATOR);
22 }
23 errorBuffer.append('\t');
24-
25+
26 char c;
27 final char SPACE = '\u0020';
28 final char MARK = '^';
29 final char TAB = '\t';
30 //the next code tries to underline the token.....
31 //it assumes (for a good display) that token source does not
32- //contain any \r \n. This is false on statements !
33+ //contain any \r \n. This is false on statements !
34 //(the code still works but the display is not optimal !)
35
36 // expand to line limits
37@@ -295,11 +295,11 @@
38 for (end = endPosition >= length ? length - 1 : endPosition ; end+1 < length; end++) {
39 if ((c = unitSource[end + 1]) == '\r' || c == '\n') break;
40 }
41-
42+
43 // trim left and right spaces/tabs
44 while ((c = unitSource[begin]) == ' ' || c == '\t') begin++;
45 //while ((c = unitSource[end]) == ' ' || c == '\t') end--; TODO (philippe) should also trim right, but all tests are to be updated
46-
47+
48 // copy source
49 errorBuffer.append(unitSource, begin, end-begin+1);
50 errorBuffer.append(Util.LINE_SEPARATOR).append("\t"); //$NON-NLS-1$
51@@ -424,7 +424,7 @@
52 String.valueOf(generateTime),
53 String.valueOf(((int) (generateTime * 1000.0 / time)) / 10.0),
54 }));
55- }
56+ }
6 } 57 }
7+ { 58 public void logClassFile(boolean generatePackagesStructure, String outputPath, String relativeFileName) {
8+ // If we're building an RPM, force full debugging info to 59 if ((this.tagBits & Logger.XML) != 0) {
9+ // be generated, no matter what options have been passed 60@@ -916,7 +916,7 @@
10+ // by Ant. This is something of a kludge, but it is far 61 this.main.bind("compile.totalTime", //$NON-NLS-1$
11+ // better than the alternative, which is having class 62 new String[] {
12+ // files with debug info mysteriously missing. 63 String.valueOf(time),
64- }));
65+ }));
66 }
67 if ((this.main.timing & Main.TIMING_DETAILED) != 0) {
68 this.printlnOut(
69@@ -1119,7 +1119,7 @@
70 this.endTag(Logger.STATS);
71 }
72 }
73-
13+ 74+
14+ String RpmPackageName = System.getenv("RPM_PACKAGE_NAME"); 75 private void printTag(String name, HashMap params, boolean insertNewLine, boolean closeTag) {
15+ String RpmArch = System.getenv("RPM_ARCH"); 76 if (this.log != null) {
16+ String RpmBuildRoot = System.getenv("RPM_BUILD_ROOT"); 77 ((GenericXMLWriter) this.log).printTag(name, parameters, true, insertNewLine, closeTag);
17+ if (RpmPackageName != null && RpmArch != null && RpmBuildRoot != null) { 78@@ -1245,12 +1245,12 @@
18+ this.options.put( 79
19+ CompilerOptions.OPTION_LocalVariableAttribute, 80 boolean warnJavadocOn;
20+ CompilerOptions.GENERATE); 81 boolean warnAllJavadocOn;
21+ this.options.put( 82-
22+ CompilerOptions.OPTION_LineNumberAttribute, 83+
23+ CompilerOptions.GENERATE); 84 public Compiler batchCompiler;
24+ this.options.put( 85 /* Bundle containing messages */
25+ CompilerOptions.OPTION_SourceFileAttribute, 86 public ResourceBundle bundle;
26+ CompilerOptions.GENERATE); 87 protected FileSystem.Classpath[] checkedClasspaths;
27+ } 88-
28+ } 89+
90 public Locale compilerLocale;
91 public CompilerOptions compilerOptions; // read-only
92 public CompilationProgress progress;
93@@ -1299,7 +1299,7 @@
94 public static final int TIMING_DISABLED = 0;
95 public static final int TIMING_ENABLED = 1;
96 public static final int TIMING_DETAILED = 2;
97-
98+
99 public int timing = TIMING_DISABLED;
100 public CompilerStats[] compilerStats;
101 public boolean verbose = false;
102@@ -1312,7 +1312,7 @@
103 // two uses: recognize 'none' in options; code the singleton none
104 // for the '-d none' option (wherever it may be found)
105 public static final int DEFAULT_SIZE_CLASSPATH = 4;
106-
107+
108 public static final String NONE = "none"; //$NON-NLS-1$
109
110 /**
111@@ -1562,7 +1562,7 @@
112 }
113 /**
114 * Return true if and only if the running VM supports the given minimal version.
115- *
116+ *
117 * <p>This only checks the major version, since the minor version is always 0 (at least for the useful cases).</p>
118 * <p>The given minimalSupportedVersion is one of the constants:</p>
119 * <ul>
120@@ -2536,8 +2536,8 @@
121 mode = DEFAULT;
122 continue;
123 }
124-
125- // set DocCommentSupport, with appropriate side effects on defaults if
126+
127+ // set DocCommentSupport, with appropriate side effects on defaults if
128 // javadoc is not enabled
129 if (this.enableJavadocOn) {
130 this.options.put(
131@@ -2601,7 +2601,7 @@
132 this.logger.logVersion(printVersionRequired);
133
134 validateOptions(didSpecifyCompliance);
135-
136+
137 // Enable annotation processing by default in batch mode when compliance is at least 1.6
138 // see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=185768
139 if (!didSpecifyDisabledAnnotationProcessing
140@@ -2609,6 +2609,29 @@
141 this.options.put(CompilerOptions.OPTION_Process_Annotations, CompilerOptions.ENABLED);
29 } 142 }
30 143
31 private void addNewEntry(final int InsideClasspath, final int InsideSourcepath, ArrayList bootclasspaths, ArrayList classpaths,ArrayList sourcepathClasspaths, String currentClasspathName, ArrayList currentRuleSpecs, int mode, String customEncoding) { 144+ {
145+ // If we're building an RPM, force full debugging info to
146+ // be generated, no matter what options have been passed
147+ // by Ant. This is something of a kludge, but it is far
148+ // better than the alternative, which is having class
149+ // files with debug info mysteriously missing.
150+
151+ String RpmPackageName = System.getenv("RPM_PACKAGE_NAME");
152+ String RpmArch = System.getenv("RPM_ARCH");
153+ String RpmBuildRoot = System.getenv("RPM_BUILD_ROOT");
154+ if (RpmPackageName != null && RpmArch != null && RpmBuildRoot != null) {
155+ this.options.put(
156+ CompilerOptions.OPTION_LocalVariableAttribute,
157+ CompilerOptions.GENERATE);
158+ this.options.put(
159+ CompilerOptions.OPTION_LineNumberAttribute,
160+ CompilerOptions.GENERATE);
161+ this.options.put(
162+ CompilerOptions.OPTION_SourceFileAttribute,
163+ CompilerOptions.GENERATE);
164+ }
165+ }
166+
167 this.logger.logCommandLineArguments(newCommandLineArgs);
168 this.logger.logOptions(this.options);
169
170@@ -2636,7 +2659,7 @@
171 0,
172 classCount);
173 }
174-
175+
176 setPaths(bootclasspaths,
177 sourcepathClasspathArg,
178 sourcepathClasspaths,
179@@ -2644,7 +2667,7 @@
180 extdirsClasspaths,
181 endorsedDirClasspaths,
182 customEncoding);
183-
184+
185 if (this.pendingErrors != null) {
186 for (Iterator iterator = this.pendingErrors.iterator(); iterator.hasNext(); ) {
187 String message = (String) iterator.next();
188@@ -3376,7 +3399,7 @@
189 } else if (token.equals("unusedTypeArgs")) { //$NON-NLS-1$
190 this.options.put(
191 CompilerOptions.OPTION_ReportUnusedTypeArgumentsForMethodInvocation,
192- isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
193+ isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
194 } else {
195 addPendingErrors(this.bind("configure.invalidWarning", token)); //$NON-NLS-1$
196 }

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

admin@fedoraproject.org
ViewVC Help
Powered by ViewVC 1.1.2