mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-26 18:35:32 +02:00
Bugzilla 220446. Changed the spelling of excercises to exercises throuhgout the code/examples and build processes.
This commit is contained in:
parent
c27cddf3c7
commit
7586dfa95a
12 changed files with 49 additions and 49 deletions
|
@ -37,7 +37,7 @@
|
||||||
<delete dir="src/@{packagedir}"/>
|
<delete dir="src/@{packagedir}"/>
|
||||||
<mkdir dir="src/@{packagedir}"/>
|
<mkdir dir="src/@{packagedir}"/>
|
||||||
<mkdir dir="src/@{packagedir}/answers"/>
|
<mkdir dir="src/@{packagedir}/answers"/>
|
||||||
<preprocess destdir="src/@{packagedir}" symbols="excercises">
|
<preprocess destdir="src/@{packagedir}" symbols="exercises">
|
||||||
<fileset dir="src_preprocess/@{packagedir}"/>
|
<fileset dir="src_preprocess/@{packagedir}"/>
|
||||||
</preprocess>
|
</preprocess>
|
||||||
<preprocess destdir="src/@{packagedir}/answers" symbols="answers">
|
<preprocess destdir="src/@{packagedir}/answers" symbols="answers">
|
||||||
|
|
|
@ -24,8 +24,8 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationCont
|
||||||
* IDMContext.getAdapter() and IVMContext.getAdapter() methods,
|
* IDMContext.getAdapter() and IVMContext.getAdapter() methods,
|
||||||
* which both call {@link DsfSession#getModelAdapter(Class)}.
|
* which both call {@link DsfSession#getModelAdapter(Class)}.
|
||||||
* <p>
|
* <p>
|
||||||
* The adapter implementation for this excercise is hard-coded to provide
|
* The adapter implementation for this exercise is hard-coded to provide
|
||||||
* contents for only one view. In turn the view contens are determined using
|
* contents for only one view. In turn the view contents are determined using
|
||||||
* the configurable ViewModelProvider. For demonstration purposes, this model
|
* the configurable ViewModelProvider. For demonstration purposes, this model
|
||||||
* adapter has two different layout configurations that can be used. These
|
* adapter has two different layout configurations that can be used. These
|
||||||
* layout configurations can be set by calling the {@link #setViewLayout} method.
|
* layout configurations can be set by calling the {@link #setViewLayout} method.
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Wind River Systems - initial API and implementation
|
* Wind River Systems - initial API and implementation
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
//#ifdef excercises
|
//#ifdef exercises
|
||||||
package org.eclipse.dd.examples.dsf.dataviewer;
|
package org.eclipse.dd.examples.dsf.dataviewer;
|
||||||
//#else
|
//#else
|
||||||
//#package org.eclipse.dd.examples.dsf.dataviewer.answers;
|
//#package org.eclipse.dd.examples.dsf.dataviewer.answers;
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Wind River Systems - initial API and implementation
|
* Wind River Systems - initial API and implementation
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
//#ifdef excercises
|
//#ifdef exercises
|
||||||
package org.eclipse.dd.examples.dsf.dataviewer;
|
package org.eclipse.dd.examples.dsf.dataviewer;
|
||||||
//#else
|
//#else
|
||||||
//#package org.eclipse.dd.examples.dsf.dataviewer.answers;
|
//#package org.eclipse.dd.examples.dsf.dataviewer.answers;
|
||||||
|
@ -49,7 +49,7 @@ import org.eclipse.dd.examples.dsf.DsfExamplesPlugin;
|
||||||
* be accessed while running in the executor thread.
|
* be accessed while running in the executor thread.
|
||||||
* </p>
|
* </p>
|
||||||
*/
|
*/
|
||||||
//#ifdef excercises
|
//#ifdef exercises
|
||||||
//TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
|
//TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
|
||||||
//indicating allowed thread access to this class/method/member
|
//indicating allowed thread access to this class/method/member
|
||||||
//#else
|
//#else
|
||||||
|
@ -59,8 +59,8 @@ public class DataGeneratorWithExecutor implements IDataGenerator {
|
||||||
|
|
||||||
// Request objects are used to serialize the interface calls into objects
|
// Request objects are used to serialize the interface calls into objects
|
||||||
// which can then be pushed into a queue.
|
// which can then be pushed into a queue.
|
||||||
//#ifdef excercises
|
//#ifdef exercises
|
||||||
// TODO Excercise 4 - Add an annotationindicating allowed concurrency access
|
// TODO Ecercise 4 - Add an annotationindicating allowed concurrency access
|
||||||
// Hint: Request and its subclasses have all their fields declared as final.
|
// Hint: Request and its subclasses have all their fields declared as final.
|
||||||
//#else
|
//#else
|
||||||
//# @Immutable
|
//# @Immutable
|
||||||
|
@ -73,7 +73,7 @@ public class DataGeneratorWithExecutor implements IDataGenerator {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//#ifdef excercises
|
//#ifdef exercises
|
||||||
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
|
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
|
||||||
// indicating allowed thread access to this class/method/member
|
// indicating allowed thread access to this class/method/member
|
||||||
//#else
|
//#else
|
||||||
|
@ -85,7 +85,7 @@ public class DataGeneratorWithExecutor implements IDataGenerator {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//#ifdef excercises
|
//#ifdef exercises
|
||||||
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
|
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
|
||||||
// indicating allowed thread access to this class/method/member
|
// indicating allowed thread access to this class/method/member
|
||||||
//#else
|
//#else
|
||||||
|
@ -100,7 +100,7 @@ public class DataGeneratorWithExecutor implements IDataGenerator {
|
||||||
}
|
}
|
||||||
|
|
||||||
// The executor used to access all internal data of the generator.
|
// The executor used to access all internal data of the generator.
|
||||||
//#ifdef excercises
|
//#ifdef exercises
|
||||||
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
|
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
|
||||||
// indicating allowed thread access to this class/method/member
|
// indicating allowed thread access to this class/method/member
|
||||||
// Hint: If a member does not have an annotation, the programmer can assume
|
// Hint: If a member does not have an annotation, the programmer can assume
|
||||||
|
@ -113,7 +113,7 @@ public class DataGeneratorWithExecutor implements IDataGenerator {
|
||||||
// and shutdown() methods write into the queue, while the serviceQueue()
|
// and shutdown() methods write into the queue, while the serviceQueue()
|
||||||
// method reads from it.
|
// method reads from it.
|
||||||
// The executor used to access all internal data of the generator.
|
// The executor used to access all internal data of the generator.
|
||||||
//#ifdef excercises
|
//#ifdef exercises
|
||||||
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
|
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
|
||||||
// indicating allowed thread access to this class/method/member
|
// indicating allowed thread access to this class/method/member
|
||||||
//#else
|
//#else
|
||||||
|
@ -123,7 +123,7 @@ public class DataGeneratorWithExecutor implements IDataGenerator {
|
||||||
|
|
||||||
// List of listeners is not synchronized, it also has to be accessed
|
// List of listeners is not synchronized, it also has to be accessed
|
||||||
// using the executor.
|
// using the executor.
|
||||||
//#ifdef excercises
|
//#ifdef exercises
|
||||||
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
|
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
|
||||||
// indicating allowed thread access to this class/method/member
|
// indicating allowed thread access to this class/method/member
|
||||||
//#else
|
//#else
|
||||||
|
@ -132,7 +132,7 @@ public class DataGeneratorWithExecutor implements IDataGenerator {
|
||||||
private List<Listener> fListeners = new LinkedList<Listener>();
|
private List<Listener> fListeners = new LinkedList<Listener>();
|
||||||
|
|
||||||
// Current number of elements in this generator.
|
// Current number of elements in this generator.
|
||||||
//#ifdef excercises
|
//#ifdef exercises
|
||||||
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
|
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
|
||||||
// indicating allowed thread access to this class/method/member
|
// indicating allowed thread access to this class/method/member
|
||||||
//#else
|
//#else
|
||||||
|
@ -141,7 +141,7 @@ public class DataGeneratorWithExecutor implements IDataGenerator {
|
||||||
private int fCount = MIN_COUNT;
|
private int fCount = MIN_COUNT;
|
||||||
|
|
||||||
// Counter used to determine when to reset the element count.
|
// Counter used to determine when to reset the element count.
|
||||||
//#ifdef excercises
|
//#ifdef exercises
|
||||||
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
|
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
|
||||||
// indicating allowed thread access to this class/method/member
|
// indicating allowed thread access to this class/method/member
|
||||||
//#else
|
//#else
|
||||||
|
@ -150,7 +150,7 @@ public class DataGeneratorWithExecutor implements IDataGenerator {
|
||||||
private int fCountResetTrigger = 0;
|
private int fCountResetTrigger = 0;
|
||||||
|
|
||||||
// Elements which were modified since the last reset.
|
// Elements which were modified since the last reset.
|
||||||
//#ifdef excercises
|
//#ifdef exercises
|
||||||
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
|
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
|
||||||
// indicating allowed thread access to this class/method/member
|
// indicating allowed thread access to this class/method/member
|
||||||
//#else
|
//#else
|
||||||
|
@ -159,7 +159,7 @@ public class DataGeneratorWithExecutor implements IDataGenerator {
|
||||||
private Set<Integer> fChangedIndexes = new HashSet<Integer>();
|
private Set<Integer> fChangedIndexes = new HashSet<Integer>();
|
||||||
|
|
||||||
// Flag used to ensure that requests are processed sequentially.
|
// Flag used to ensure that requests are processed sequentially.
|
||||||
//#ifdef excercises
|
//#ifdef exercises
|
||||||
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
|
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
|
||||||
// indicating allowed thread access to this class/method/member
|
// indicating allowed thread access to this class/method/member
|
||||||
//#else
|
//#else
|
||||||
|
@ -167,7 +167,7 @@ public class DataGeneratorWithExecutor implements IDataGenerator {
|
||||||
//#endif
|
//#endif
|
||||||
private boolean fServiceQueueInProgress = false;
|
private boolean fServiceQueueInProgress = false;
|
||||||
|
|
||||||
//#ifdef excercises
|
//#ifdef exercises
|
||||||
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
|
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
|
||||||
// indicating allowed thread access to this class/method/member
|
// indicating allowed thread access to this class/method/member
|
||||||
//#endif
|
//#endif
|
||||||
|
@ -187,7 +187,7 @@ public class DataGeneratorWithExecutor implements IDataGenerator {
|
||||||
TimeUnit.MILLISECONDS);
|
TimeUnit.MILLISECONDS);
|
||||||
}
|
}
|
||||||
|
|
||||||
//#ifdef excercises
|
//#ifdef exercises
|
||||||
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
|
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
|
||||||
// indicating allowed thread access to this class/method/member
|
// indicating allowed thread access to this class/method/member
|
||||||
//#endif
|
//#endif
|
||||||
|
@ -214,7 +214,7 @@ public class DataGeneratorWithExecutor implements IDataGenerator {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//#ifdef excercises
|
//#ifdef exercises
|
||||||
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
|
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
|
||||||
// indicating allowed thread access to this class/method/member
|
// indicating allowed thread access to this class/method/member
|
||||||
//#endif
|
//#endif
|
||||||
|
@ -232,7 +232,7 @@ public class DataGeneratorWithExecutor implements IDataGenerator {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//#ifdef excercises
|
//#ifdef exercises
|
||||||
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
|
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
|
||||||
// indicating allowed thread access to this class/method/member
|
// indicating allowed thread access to this class/method/member
|
||||||
//#endif
|
//#endif
|
||||||
|
@ -250,7 +250,7 @@ public class DataGeneratorWithExecutor implements IDataGenerator {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//#ifdef excercises
|
//#ifdef exercises
|
||||||
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
|
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
|
||||||
// indicating allowed thread access to this class/method/member
|
// indicating allowed thread access to this class/method/member
|
||||||
//#endif
|
//#endif
|
||||||
|
@ -264,7 +264,7 @@ public class DataGeneratorWithExecutor implements IDataGenerator {
|
||||||
} catch (RejectedExecutionException e) {}
|
} catch (RejectedExecutionException e) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
//#ifdef excercises
|
//#ifdef exercises
|
||||||
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
|
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
|
||||||
// indicating allowed thread access to this class/method/member
|
// indicating allowed thread access to this class/method/member
|
||||||
//#endif
|
//#endif
|
||||||
|
@ -279,7 +279,7 @@ public class DataGeneratorWithExecutor implements IDataGenerator {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Main processing function of this generator.
|
// Main processing function of this generator.
|
||||||
//#ifdef excercises
|
//#ifdef exercises
|
||||||
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
|
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
|
||||||
// indicating allowed thread access to this class/method/member
|
// indicating allowed thread access to this class/method/member
|
||||||
//#else
|
//#else
|
||||||
|
@ -287,8 +287,8 @@ public class DataGeneratorWithExecutor implements IDataGenerator {
|
||||||
//#endif
|
//#endif
|
||||||
private void serviceQueue() {
|
private void serviceQueue() {
|
||||||
|
|
||||||
//#ifdef excercises
|
//#ifdef exercises
|
||||||
// TODO Excercise 3 - Add logic to discard requests from queue.
|
// TODO Exercise 3 - Add logic to discard cancelled requests from queue.
|
||||||
// Hint: Since serviceQueue() is called using the executor, and the
|
// Hint: Since serviceQueue() is called using the executor, and the
|
||||||
// fQueue list can only be modified when running in the executor
|
// fQueue list can only be modified when running in the executor
|
||||||
// thread. This method can safely iterate and modify fQueue without
|
// thread. This method can safely iterate and modify fQueue without
|
||||||
|
@ -335,7 +335,7 @@ public class DataGeneratorWithExecutor implements IDataGenerator {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//#ifdef excercises
|
//#ifdef exercises
|
||||||
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
|
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
|
||||||
// indicating allowed thread access to this class/method/member
|
// indicating allowed thread access to this class/method/member
|
||||||
//#else
|
//#else
|
||||||
|
@ -349,7 +349,7 @@ public class DataGeneratorWithExecutor implements IDataGenerator {
|
||||||
rm.done();
|
rm.done();
|
||||||
}
|
}
|
||||||
|
|
||||||
//#ifdef excercises
|
//#ifdef exercises
|
||||||
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
|
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
|
||||||
// indicating allowed thread access to this class/method/member
|
// indicating allowed thread access to this class/method/member
|
||||||
//#else
|
//#else
|
||||||
|
@ -370,7 +370,7 @@ public class DataGeneratorWithExecutor implements IDataGenerator {
|
||||||
/**
|
/**
|
||||||
* This method simulates changes in the supplier's data set.
|
* This method simulates changes in the supplier's data set.
|
||||||
*/
|
*/
|
||||||
//#ifdef excercises
|
//#ifdef exercises
|
||||||
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
|
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
|
||||||
// indicating allowed thread access to this class/method/member
|
// indicating allowed thread access to this class/method/member
|
||||||
//#else
|
//#else
|
||||||
|
@ -389,7 +389,7 @@ public class DataGeneratorWithExecutor implements IDataGenerator {
|
||||||
/**
|
/**
|
||||||
* Calculates new size for provider's data set.
|
* Calculates new size for provider's data set.
|
||||||
*/
|
*/
|
||||||
//#ifdef excercises
|
//#ifdef exercises
|
||||||
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
|
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
|
||||||
// indicating allowed thread access to this class/method/member
|
// indicating allowed thread access to this class/method/member
|
||||||
//#else
|
//#else
|
||||||
|
@ -412,7 +412,7 @@ public class DataGeneratorWithExecutor implements IDataGenerator {
|
||||||
/**
|
/**
|
||||||
* Invalidates a random range of indexes.
|
* Invalidates a random range of indexes.
|
||||||
*/
|
*/
|
||||||
//#ifdef excercises
|
//#ifdef exercises
|
||||||
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
|
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
|
||||||
// indicating allowed thread access to this class/method/member
|
// indicating allowed thread access to this class/method/member
|
||||||
//#else
|
//#else
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Wind River Systems - initial API and implementation
|
* Wind River Systems - initial API and implementation
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
//#ifdef excercises
|
//#ifdef exercises
|
||||||
package org.eclipse.dd.examples.dsf.dataviewer;
|
package org.eclipse.dd.examples.dsf.dataviewer;
|
||||||
//#else
|
//#else
|
||||||
//#package org.eclipse.dd.examples.dsf.dataviewer.answers;
|
//#package org.eclipse.dd.examples.dsf.dataviewer.answers;
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Wind River Systems - initial API and implementation
|
* Wind River Systems - initial API and implementation
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
//#ifdef excercises
|
//#ifdef exercises
|
||||||
package org.eclipse.dd.examples.dsf.dataviewer;
|
package org.eclipse.dd.examples.dsf.dataviewer;
|
||||||
//#else
|
//#else
|
||||||
//#package org.eclipse.dd.examples.dsf.dataviewer.answers;
|
//#package org.eclipse.dd.examples.dsf.dataviewer.answers;
|
||||||
|
@ -29,7 +29,7 @@ import org.eclipse.dd.dsf.concurrent.RequestMonitor;
|
||||||
* view to receive events indicating when the data supplied by the generator
|
* view to receive events indicating when the data supplied by the generator
|
||||||
* is changed.
|
* is changed.
|
||||||
*/
|
*/
|
||||||
//#ifdef excercises
|
//#ifdef exercises
|
||||||
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
|
// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor)
|
||||||
// indicating allowed thread access to this class/method/member
|
// indicating allowed thread access to this class/method/member
|
||||||
//#else
|
//#else
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Wind River Systems - initial API and implementation
|
* Wind River Systems - initial API and implementation
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
//#ifdef excercises
|
//#ifdef exercises
|
||||||
package org.eclipse.dd.examples.dsf.dataviewer;
|
package org.eclipse.dd.examples.dsf.dataviewer;
|
||||||
//#else
|
//#else
|
||||||
//#package org.eclipse.dd.examples.dsf.dataviewer.answers;
|
//#package org.eclipse.dd.examples.dsf.dataviewer.answers;
|
||||||
|
@ -122,8 +122,8 @@ public class SyncDataViewer
|
||||||
}
|
}
|
||||||
|
|
||||||
private void refreshViewer() {
|
private void refreshViewer() {
|
||||||
//#ifdef excercises
|
//#ifdef exercises
|
||||||
// TODO Excercise 5 - Add a call to getElements() to force a deadlock.
|
// TODO Exercise 5 - Add a call to getElements() to force a deadlock.
|
||||||
//#else
|
//#else
|
||||||
//# getElements(null);
|
//# getElements(null);
|
||||||
//#endif
|
//#endif
|
||||||
|
@ -154,8 +154,8 @@ public class SyncDataViewer
|
||||||
tableViewer.getControl().setLayoutData(data);
|
tableViewer.getControl().setLayoutData(data);
|
||||||
|
|
||||||
// Create the data generator.
|
// Create the data generator.
|
||||||
//#ifdef excercises
|
//#ifdef exercises
|
||||||
// TODO Excercise 5 - Use the DataGeneratorWithExecutor() instead.
|
// TODO Exercise 5 - Use the DataGeneratorWithExecutor() instead.
|
||||||
final IDataGenerator generator = new DataGeneratorWithThread();
|
final IDataGenerator generator = new DataGeneratorWithThread();
|
||||||
//#else
|
//#else
|
||||||
//# final IDataGenerator generator = new DataGeneratorWithExecutor();
|
//# final IDataGenerator generator = new DataGeneratorWithExecutor();
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Wind River Systems - initial API and implementation
|
* Wind River Systems - initial API and implementation
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
//#ifdef excercises
|
//#ifdef exercises
|
||||||
package org.eclipse.dd.examples.dsf.requestmonitor;
|
package org.eclipse.dd.examples.dsf.requestmonitor;
|
||||||
//#else
|
//#else
|
||||||
//#package org.eclipse.dd.examples.dsf.requestmonitor.answers;
|
//#package org.eclipse.dd.examples.dsf.requestmonitor.answers;
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Wind River Systems - initial API and implementation
|
* Wind River Systems - initial API and implementation
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
//#ifdef excercises
|
//#ifdef exercises
|
||||||
package org.eclipse.dd.examples.dsf.requestmonitor;
|
package org.eclipse.dd.examples.dsf.requestmonitor;
|
||||||
//#else
|
//#else
|
||||||
//#package org.eclipse.dd.examples.dsf.requestmonitor.answers;
|
//#package org.eclipse.dd.examples.dsf.requestmonitor.answers;
|
||||||
|
@ -37,7 +37,7 @@ public class AsyncHelloWorld {
|
||||||
|
|
||||||
static void asyncHelloWorld(RequestMonitor rm) {
|
static void asyncHelloWorld(RequestMonitor rm) {
|
||||||
System.out.println("Hello world");
|
System.out.println("Hello world");
|
||||||
//#ifdef excercises
|
//#ifdef exercises
|
||||||
// TODO Exercise 1: - Call the second async. "Hello world 2" method.
|
// TODO Exercise 1: - Call the second async. "Hello world 2" method.
|
||||||
// Hint: Calling an asynchronous method requires passing to it a
|
// Hint: Calling an asynchronous method requires passing to it a
|
||||||
// request monitor. A new request monitor can be constructed with
|
// request monitor. A new request monitor can be constructed with
|
||||||
|
@ -51,7 +51,7 @@ public class AsyncHelloWorld {
|
||||||
//#endif
|
//#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
//#ifdef excercises
|
//#ifdef exercises
|
||||||
// TODO: Exercise 1 - Add a second async. "Hello world 2" method.
|
// TODO: Exercise 1 - Add a second async. "Hello world 2" method.
|
||||||
//#else
|
//#else
|
||||||
//# static void asyncHelloWorld2(RequestMonitor rm) {
|
//# static void asyncHelloWorld2(RequestMonitor rm) {
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Wind River Systems - initial API and implementation
|
* Wind River Systems - initial API and implementation
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
//#ifdef excercises
|
//#ifdef exercises
|
||||||
package org.eclipse.dd.examples.dsf.requestmonitor;
|
package org.eclipse.dd.examples.dsf.requestmonitor;
|
||||||
//#else
|
//#else
|
||||||
//#package org.eclipse.dd.examples.dsf.requestmonitor.answers;
|
//#package org.eclipse.dd.examples.dsf.requestmonitor.answers;
|
||||||
|
@ -51,7 +51,7 @@ public class AsyncQuicksort {
|
||||||
{
|
{
|
||||||
if (right > left) {
|
if (right > left) {
|
||||||
int pivot = left;
|
int pivot = left;
|
||||||
//#ifdef excercises
|
//#ifdef exercises
|
||||||
// TODO: Exercise 2 - Convert the call to partition into an
|
// TODO: Exercise 2 - Convert the call to partition into an
|
||||||
// asynchronous call to asyncPartition().
|
// asynchronous call to asyncPartition().
|
||||||
// Hint: The rest of the code below should be executed inside
|
// Hint: The rest of the code below should be executed inside
|
||||||
|
@ -84,7 +84,7 @@ public class AsyncQuicksort {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//#ifdef excercises
|
//#ifdef exercises
|
||||||
// TODO Exercise 2 - Convert partition to an asynchronous method.
|
// TODO Exercise 2 - Convert partition to an asynchronous method.
|
||||||
// Hint: a DataRequestMonitor<Integer> should be used to carry the
|
// Hint: a DataRequestMonitor<Integer> should be used to carry the
|
||||||
// return value to the caller.
|
// return value to the caller.
|
||||||
|
@ -108,7 +108,7 @@ public class AsyncQuicksort {
|
||||||
array[right] = array[store];
|
array[right] = array[store];
|
||||||
array[store] = pivotValue;
|
array[store] = pivotValue;
|
||||||
|
|
||||||
//#ifdef excercises
|
//#ifdef exercises
|
||||||
// TODO: Request Monitors Exercise 2 - Return the data to caller using
|
// TODO: Request Monitors Exercise 2 - Return the data to caller using
|
||||||
// a request monitor.
|
// a request monitor.
|
||||||
return store;
|
return store;
|
||||||
|
|
|
@ -31,7 +31,7 @@ import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests that excercise the Query object.
|
* Tests that exercise the Query object.
|
||||||
*/
|
*/
|
||||||
public class DsfQueryTests {
|
public class DsfQueryTests {
|
||||||
TestDsfExecutor fExecutor;
|
TestDsfExecutor fExecutor;
|
||||||
|
|
|
@ -30,7 +30,7 @@ import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests that excercise the Sequence object.
|
* Tests that exercise the Sequence object.
|
||||||
*/
|
*/
|
||||||
public class DsfSequenceTests {
|
public class DsfSequenceTests {
|
||||||
TestDsfExecutor fExecutor;
|
TestDsfExecutor fExecutor;
|
||||||
|
|
Loading…
Add table
Reference in a new issue