Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonah Graham2018-11-24 06:09:50 -0500
committerJonah Graham2018-11-24 06:22:15 -0500
commitf869a3f247afc6030a6d559996cd9e3ffb920a12 (patch)
treebc6df7ff6db8234a1ce885f6ffd911e88b4dca0c
parent37ed2c406d0a019c18b65ecd418addf7af808f1f (diff)
downloadorg.eclipse.cdt-f869a3f247afc6030a6d559996cd9e3ffb920a12.tar.gz
org.eclipse.cdt-f869a3f247afc6030a6d559996cd9e3ffb920a12.tar.xz
org.eclipse.cdt-f869a3f247afc6030a6d559996cd9e3ffb920a12.zip
Bug 540373: Post code-cleanup for DSF examples
The DSF Examples contains some commented out source that is enabled via a script so this commit cleans that up for new formatting rules. Change-Id: I82c5e195cc3746415c659b2c0fc72b8118cdc56c
-rw-r--r--dsf-gdb/org.eclipse.cdt.examples.dsf.gdb/.settings/org.eclipse.jdt.core.prefs2
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda.ui/.settings/org.eclipse.jdt.core.prefs2
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/.settings/org.eclipse.jdt.core.prefs2
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/.settings/org.eclipse.jdt.core.prefs2
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/src_ant/org/eclipse/cdt/examples/ant/tasks/PreProcessor.java16
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/src_preprocess/org/eclipse/cdt/examples/dsf/dataviewer/DataGeneratorWithExecutor.java48
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/src_preprocess/org/eclipse/cdt/examples/dsf/dataviewer/SyncDataViewer.java4
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/src_preprocess/org/eclipse/cdt/examples/dsf/requestmonitor/AsyncHelloWorld.java12
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/src_preprocess/org/eclipse/cdt/examples/dsf/requestmonitor/AsyncQuicksort.java36
-rwxr-xr-xreleng/scripts/check_code_cleanliness.sh6
10 files changed, 65 insertions, 65 deletions
diff --git a/dsf-gdb/org.eclipse.cdt.examples.dsf.gdb/.settings/org.eclipse.jdt.core.prefs b/dsf-gdb/org.eclipse.cdt.examples.dsf.gdb/.settings/org.eclipse.jdt.core.prefs
index 2b6ecff8a0..1e4fd5e53f 100644
--- a/dsf-gdb/org.eclipse.cdt.examples.dsf.gdb/.settings/org.eclipse.jdt.core.prefs
+++ b/dsf-gdb/org.eclipse.cdt.examples.dsf.gdb/.settings/org.eclipse.jdt.core.prefs
@@ -87,7 +87,7 @@ org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning
org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
diff --git a/dsf/org.eclipse.cdt.examples.dsf.pda.ui/.settings/org.eclipse.jdt.core.prefs b/dsf/org.eclipse.cdt.examples.dsf.pda.ui/.settings/org.eclipse.jdt.core.prefs
index 2b6ecff8a0..1e4fd5e53f 100644
--- a/dsf/org.eclipse.cdt.examples.dsf.pda.ui/.settings/org.eclipse.jdt.core.prefs
+++ b/dsf/org.eclipse.cdt.examples.dsf.pda.ui/.settings/org.eclipse.jdt.core.prefs
@@ -87,7 +87,7 @@ org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning
org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
diff --git a/dsf/org.eclipse.cdt.examples.dsf.pda/.settings/org.eclipse.jdt.core.prefs b/dsf/org.eclipse.cdt.examples.dsf.pda/.settings/org.eclipse.jdt.core.prefs
index 2b6ecff8a0..1e4fd5e53f 100644
--- a/dsf/org.eclipse.cdt.examples.dsf.pda/.settings/org.eclipse.jdt.core.prefs
+++ b/dsf/org.eclipse.cdt.examples.dsf.pda/.settings/org.eclipse.jdt.core.prefs
@@ -87,7 +87,7 @@ org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning
org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
diff --git a/dsf/org.eclipse.cdt.examples.dsf/.settings/org.eclipse.jdt.core.prefs b/dsf/org.eclipse.cdt.examples.dsf/.settings/org.eclipse.jdt.core.prefs
index 2b6ecff8a0..1e4fd5e53f 100644
--- a/dsf/org.eclipse.cdt.examples.dsf/.settings/org.eclipse.jdt.core.prefs
+++ b/dsf/org.eclipse.cdt.examples.dsf/.settings/org.eclipse.jdt.core.prefs
@@ -87,7 +87,7 @@ org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning
org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
diff --git a/dsf/org.eclipse.cdt.examples.dsf/src_ant/org/eclipse/cdt/examples/ant/tasks/PreProcessor.java b/dsf/org.eclipse.cdt.examples.dsf/src_ant/org/eclipse/cdt/examples/ant/tasks/PreProcessor.java
index d5b87cb08e..c5feb12f07 100644
--- a/dsf/org.eclipse.cdt.examples.dsf/src_ant/org/eclipse/cdt/examples/ant/tasks/PreProcessor.java
+++ b/dsf/org.eclipse.cdt.examples.dsf/src_ant/org/eclipse/cdt/examples/ant/tasks/PreProcessor.java
@@ -157,9 +157,9 @@ public class PreProcessor extends Task {
}
String contents = null;
if (fileName.endsWith(".java")) {
- contents = preProcessFile(srcFile, "//#");
+ contents = preProcessFile(srcFile);
} else if (fileName.equals("plugin.xml")) {
- contents = preProcessFile(srcFile, null);
+ contents = preProcessFile(srcFile);
}
if (contents == null) {
// no change, just copy file
@@ -186,10 +186,9 @@ public class PreProcessor extends Task {
* Preprocesses a file
*
* @param srcFile the file to process
- * @param strip chars to stip off lines in a true condition, or <code>null</code>
* @return
*/
- public String preProcessFile(File srcFile, String strip) {
+ public String preProcessFile(File srcFile) {
try (BufferedReader reader = new BufferedReader(new FileReader(srcFile))) {
StringBuilder buffer = new StringBuilder();
String line = reader.readLine();
@@ -262,10 +261,8 @@ public class PreProcessor extends Task {
}
if (!commandLine) {
if (state == STATE_OUTSIDE_CONDITION || state == STATE_TRUE_CONDITION) {
- if (state == STATE_TRUE_CONDITION && strip != null) {
- if (line.startsWith(strip)) {
- line = line.substring(strip.length());
- }
+ if (state == STATE_TRUE_CONDITION) {
+ line = line.replaceFirst("^(\t*)//#", "$1");
}
buffer.append(line);
buffer.append("\n");
@@ -288,8 +285,7 @@ public class PreProcessor extends Task {
PreProcessor processor = new PreProcessor();
processor.setSymbols("ex2");
String string = processor.preProcessFile(new File(
- "c:\\eclipse3.1\\dev\\example.debug.core\\src\\example\\debug\\core\\launcher\\PDALaunchDelegate.java"),
- "//#");
+ "c:\\eclipse3.1\\dev\\example.debug.core\\src\\example\\debug\\core\\launcher\\PDALaunchDelegate.java"));
//String string = processor.preProcessFile(new File("c:\\eclipse3.1\\dev\\example.debug.core\\plugin.xml"), null);
System.out.println(string);
}
diff --git a/dsf/org.eclipse.cdt.examples.dsf/src_preprocess/org/eclipse/cdt/examples/dsf/dataviewer/DataGeneratorWithExecutor.java b/dsf/org.eclipse.cdt.examples.dsf/src_preprocess/org/eclipse/cdt/examples/dsf/dataviewer/DataGeneratorWithExecutor.java
index 52260b4330..e0d52b5735 100644
--- a/dsf/org.eclipse.cdt.examples.dsf/src_preprocess/org/eclipse/cdt/examples/dsf/dataviewer/DataGeneratorWithExecutor.java
+++ b/dsf/org.eclipse.cdt.examples.dsf/src_preprocess/org/eclipse/cdt/examples/dsf/dataviewer/DataGeneratorWithExecutor.java
@@ -67,7 +67,7 @@ public class DataGeneratorWithExecutor implements IDataGenerator {
// TODO Exercise 4 - Add an annotationindicating allowed concurrency access
// Hint: Request and its subclasses have all their fields declared as final.
//#else
- //# @Immutable
+ //#@Immutable
//#endif
abstract class Request {
final RequestMonitor fRequestMonitor;
@@ -93,7 +93,7 @@ public class DataGeneratorWithExecutor implements IDataGenerator {
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
// indicating allowed thread access to this class/method/member
//#else
- //# @Immutable
+ //#@Immutable
//#endif
class CountRequest extends Request {
CountRequest(DataRequestMonitor<Integer> rm) {
@@ -105,7 +105,7 @@ public class DataGeneratorWithExecutor implements IDataGenerator {
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
// indicating allowed thread access to this class/method/member
//#else
- //# @Immutable
+ //#@Immutable
//#endif
class ItemRequest extends Request {
final int fIndex;
@@ -134,7 +134,7 @@ public class DataGeneratorWithExecutor implements IDataGenerator {
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
// indicating allowed thread access to this class/method/member
//#else
- //# @ConfinedToDsfExecutor("fExecutor")
+ //#@ConfinedToDsfExecutor("fExecutor")
//#endif
private List<Request> fQueue = new LinkedList<Request>();
@@ -144,7 +144,7 @@ public class DataGeneratorWithExecutor implements IDataGenerator {
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
// indicating allowed thread access to this class/method/member
//#else
- //# @ConfinedToDsfExecutor("fExecutor")
+ //#@ConfinedToDsfExecutor("fExecutor")
//#endif
private List<Listener> fListeners = new LinkedList<Listener>();
@@ -153,7 +153,7 @@ public class DataGeneratorWithExecutor implements IDataGenerator {
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
// indicating allowed thread access to this class/method/member
//#else
- //# @ConfinedToDsfExecutor("fExecutor")
+ //#@ConfinedToDsfExecutor("fExecutor")
//#endif
private int fCount = MIN_COUNT;
@@ -162,7 +162,7 @@ public class DataGeneratorWithExecutor implements IDataGenerator {
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
// indicating allowed thread access to this class/method/member
//#else
- //# @ConfinedToDsfExecutor("fExecutor")
+ //#@ConfinedToDsfExecutor("fExecutor")
//#endif
private int fCountResetTrigger = 0;
@@ -171,7 +171,7 @@ public class DataGeneratorWithExecutor implements IDataGenerator {
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
// indicating allowed thread access to this class/method/member
//#else
- //# @ConfinedToDsfExecutor("fExecutor")
+ //#@ConfinedToDsfExecutor("fExecutor")
//#endif
private Map<Integer, Integer> fChangedValues = new HashMap<Integer, Integer>();
@@ -306,7 +306,7 @@ public class DataGeneratorWithExecutor implements IDataGenerator {
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
// indicating allowed thread access to this class/method/member
//#else
- //# @ConfinedToDsfExecutor("fExecutor")
+ //#@ConfinedToDsfExecutor("fExecutor")
//#endif
private void serviceQueue() {
fExecutor.schedule(new DsfRunnable() {
@@ -321,7 +321,7 @@ public class DataGeneratorWithExecutor implements IDataGenerator {
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
// indicating allowed thread access to this class/method/member
//#else
- //# @ConfinedToDsfExecutor("fExecutor")
+ //#@ConfinedToDsfExecutor("fExecutor")
//#endif
private void doServiceQueue() {
//#ifdef exercises
@@ -331,15 +331,15 @@ public class DataGeneratorWithExecutor implements IDataGenerator {
// thread. This method can safely iterate and modify fQueue without
// risk of race conditions or concurrent modification exceptions.
//#else
- //# for (Iterator<Request> requestItr = fQueue.iterator(); requestItr.hasNext();) {
- //# Request request = requestItr.next();
- //# if (request.fRequestMonitor.isCanceled()) {
- //# request.fRequestMonitor.setStatus(
- //# new Status(IStatus.CANCEL, DsfExamplesPlugin.PLUGIN_ID, "Request canceled"));
- //# request.fRequestMonitor.done();
- //# requestItr.remove();
- //# }
- //# }
+ //#for (Iterator<Request> requestItr = fQueue.iterator(); requestItr.hasNext();) {
+ //# Request request = requestItr.next();
+ //# if (request.fRequestMonitor.isCanceled()) {
+ //# request.fRequestMonitor.setStatus(
+ //# new Status(IStatus.CANCEL, DsfExamplesPlugin.PLUGIN_ID, "Request canceled"));
+ //# request.fRequestMonitor.done();
+ //# requestItr.remove();
+ //# }
+ //#}
//#endif
while (fQueue.size() != 0) {
@@ -359,7 +359,7 @@ public class DataGeneratorWithExecutor implements IDataGenerator {
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
// indicating allowed thread access to this class/method/member
//#else
- //# @ConfinedToDsfExecutor("fExecutor")
+ //#@ConfinedToDsfExecutor("fExecutor")
//#endif
private void processCountRequest(CountRequest request) {
@SuppressWarnings("unchecked") // Suppress warning about lost type info.
@@ -373,7 +373,7 @@ public class DataGeneratorWithExecutor implements IDataGenerator {
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
// indicating allowed thread access to this class/method/member
//#else
- //# @ConfinedToDsfExecutor("fExecutor")
+ //#@ConfinedToDsfExecutor("fExecutor")
//#endif
private void processItemRequest(ItemRequest request) {
@SuppressWarnings("unchecked") // Suppress warning about lost type info.
@@ -394,7 +394,7 @@ public class DataGeneratorWithExecutor implements IDataGenerator {
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
// indicating allowed thread access to this class/method/member
//#else
- //# @ConfinedToDsfExecutor("fExecutor")
+ //#@ConfinedToDsfExecutor("fExecutor")
//#endif
private void randomChanges() {
// Once every number of changes, reset the count, the rest of the
@@ -413,7 +413,7 @@ public class DataGeneratorWithExecutor implements IDataGenerator {
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
// indicating allowed thread access to this class/method/member
//#else
- //# @ConfinedToDsfExecutor("fExecutor")
+ //#@ConfinedToDsfExecutor("fExecutor")
//#endif
private void randomCountReset() {
// Calculate the new count.
@@ -436,7 +436,7 @@ public class DataGeneratorWithExecutor implements IDataGenerator {
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
// indicating allowed thread access to this class/method/member
//#else
- //# @ConfinedToDsfExecutor("fExecutor")
+ //#@ConfinedToDsfExecutor("fExecutor")
//#endif
private void randomDataChange() {
// Calculate the indexes to change.
diff --git a/dsf/org.eclipse.cdt.examples.dsf/src_preprocess/org/eclipse/cdt/examples/dsf/dataviewer/SyncDataViewer.java b/dsf/org.eclipse.cdt.examples.dsf/src_preprocess/org/eclipse/cdt/examples/dsf/dataviewer/SyncDataViewer.java
index 0e671d5f62..cd86d2e515 100644
--- a/dsf/org.eclipse.cdt.examples.dsf/src_preprocess/org/eclipse/cdt/examples/dsf/dataviewer/SyncDataViewer.java
+++ b/dsf/org.eclipse.cdt.examples.dsf/src_preprocess/org/eclipse/cdt/examples/dsf/dataviewer/SyncDataViewer.java
@@ -144,7 +144,7 @@ public class SyncDataViewer implements IStructuredContentProvider, IDataGenerato
//#ifdef exercises
// TODO Exercise 5 - Add a call to getElements() to force a deadlock.
//#else
- //# getElements(null);
+ //#getElements(null);
//#endif
// This method may be called on any thread, switch to the display
@@ -182,7 +182,7 @@ public class SyncDataViewer implements IStructuredContentProvider, IDataGenerato
// TODO Exercise 5 - Use the DataGeneratorWithExecutor() instead.
final IDataGenerator generator = new DataGeneratorWithThread();
//#else
- //# final IDataGenerator generator = new DataGeneratorWithExecutor();
+ //#final IDataGenerator generator = new DataGeneratorWithExecutor();
//#endif
// Create the content provider which will populate the viewer.
diff --git a/dsf/org.eclipse.cdt.examples.dsf/src_preprocess/org/eclipse/cdt/examples/dsf/requestmonitor/AsyncHelloWorld.java b/dsf/org.eclipse.cdt.examples.dsf/src_preprocess/org/eclipse/cdt/examples/dsf/requestmonitor/AsyncHelloWorld.java
index 512e501339..d5ac854439 100644
--- a/dsf/org.eclipse.cdt.examples.dsf/src_preprocess/org/eclipse/cdt/examples/dsf/requestmonitor/AsyncHelloWorld.java
+++ b/dsf/org.eclipse.cdt.examples.dsf/src_preprocess/org/eclipse/cdt/examples/dsf/requestmonitor/AsyncHelloWorld.java
@@ -50,17 +50,17 @@ public class AsyncHelloWorld {
// completed.
rm.done();
//#else
- //# RequestMonitor rm2 = new RequestMonitor(ImmediateExecutor.getInstance(), rm);
- //# asyncHelloWorld2(rm2);
+ //#RequestMonitor rm2 = new RequestMonitor(ImmediateExecutor.getInstance(), rm);
+ //#asyncHelloWorld2(rm2);
//#endif
}
//#ifdef exercises
// TODO: Exercise 1 - Add a second async. "Hello world 2" method.
//#else
- //# static void asyncHelloWorld2(RequestMonitor rm) {
- //# System.out.println("Hello world 2");
- //# rm.done();
- //# }
+ //#static void asyncHelloWorld2(RequestMonitor rm) {
+ //# System.out.println("Hello world 2");
+ //# rm.done();
+ //#}
//#endif
}
diff --git a/dsf/org.eclipse.cdt.examples.dsf/src_preprocess/org/eclipse/cdt/examples/dsf/requestmonitor/AsyncQuicksort.java b/dsf/org.eclipse.cdt.examples.dsf/src_preprocess/org/eclipse/cdt/examples/dsf/requestmonitor/AsyncQuicksort.java
index ecf83a9022..71012dbdfa 100644
--- a/dsf/org.eclipse.cdt.examples.dsf/src_preprocess/org/eclipse/cdt/examples/dsf/requestmonitor/AsyncQuicksort.java
+++ b/dsf/org.eclipse.cdt.examples.dsf/src_preprocess/org/eclipse/cdt/examples/dsf/requestmonitor/AsyncQuicksort.java
@@ -64,20 +64,20 @@ public class AsyncQuicksort {
asyncQuicksort(array, newPivot + 1, right, countingRm);
countingRm.setDoneCount(2);
//#else
- //# asyncPartition(
- //# array, left, right, pivot,
- //# new DataRequestMonitor<Integer>(fgExecutor, rm) {
- //# @Override
- //# protected void handleCompleted() {
- //# int newPivot = getData();
- //# printArray(array, left, right, newPivot);
+ //#asyncPartition(
+ //# array, left, right, pivot,
+ //# new DataRequestMonitor<Integer>(fgExecutor, rm) {
+ //# @Override
+ //# protected void handleCompleted() {
+ //# int newPivot = getData();
+ //# printArray(array, left, right, newPivot);
//#
- //# CountingRequestMonitor countingRm = new CountingRequestMonitor(fgExecutor, rm);
- //# asyncQuicksort(array, left, newPivot - 1, countingRm);
- //# asyncQuicksort(array, newPivot + 1, right, countingRm);
- //# countingRm.setDoneCount(2);
- //# }
- //# });
+ //# CountingRequestMonitor countingRm = new CountingRequestMonitor(fgExecutor, rm);
+ //# asyncQuicksort(array, left, newPivot - 1, countingRm);
+ //# asyncQuicksort(array, newPivot + 1, right, countingRm);
+ //# countingRm.setDoneCount(2);
+ //# }
+ //#});
//#endif
} else {
rm.done();
@@ -90,7 +90,7 @@ public class AsyncQuicksort {
// return value to the caller.
static int partition(int[] array, int left, int right, int pivot)
//#else
- //# static void asyncPartition(int[] array, int left, int right, int pivot, DataRequestMonitor<Integer> rm)
+ //#static void asyncPartition(int[] array, int left, int right, int pivot, DataRequestMonitor<Integer> rm)
//#endif
{
int pivotValue = array[pivot];
@@ -113,10 +113,10 @@ public class AsyncQuicksort {
// a request monitor.
return store;
//#else
- //# // Java 5 automatically converts the int type of the store variable
- //# // to an Integer object.
- //# rm.setData(store);
- //# rm.done();
+ //#// Java 5 automatically converts the int type of the store variable
+ //#// to an Integer object.
+ //#rm.setData(store);
+ //#rm.done();
//#endif
}
diff --git a/releng/scripts/check_code_cleanliness.sh b/releng/scripts/check_code_cleanliness.sh
index 29952c4f7e..c83b4d9e84 100755
--- a/releng/scripts/check_code_cleanliness.sh
+++ b/releng/scripts/check_code_cleanliness.sh
@@ -74,7 +74,11 @@ git ls-files -- \*\*/.project ':!core/org.eclipse.cdt.core/.project' | while re
sed -i \
'-es@compilers.p.not-externalized-att=1@compilers.p.not-externalized-att=2@' \
$d/.settings/org.eclipse.pde.prefs
-
+ fi
+ if echo $i | grep 'org.eclipse.cdt.examples.dsf' > /dev/null; then
+ sed -i \
+ '-es@org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning@org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore@' \
+ $d/.settings/org.eclipse.jdt.core.prefs
fi
fi
done

Back to the top