import org.eclipse.jface.text.reconciler.IReconcilingStrategyExtension;
/**
- * A reconciling strategy consisting of a sequence of internal reconciling strategies.
- * By default, all requests are passed on to the contained strategies.
+ * A reconciling strategy consisting of a sequence of internal reconciling
+ * strategies. By default, all requests are passed on to the contained
+ * strategies.
*
* @since 3.0
*/
-public class CompositeReconcilingStrategy implements IReconcilingStrategy, IReconcilingStrategyExtension {
-
+public class CompositeReconcilingStrategy implements IReconcilingStrategy,
+ IReconcilingStrategyExtension {
+
/** The list of internal reconciling strategies. */
private IReconcilingStrategy[] fStrategies;
-
+
/**
* Creates a new, empty composite reconciling strategy.
*/
public CompositeReconcilingStrategy() {
}
-
+
/**
* Sets the reconciling strategies for this composite strategy.
*
- * @param strategies the strategies to be set or <code>null</code>
+ * @param strategies
+ * the strategies to be set or <code>null</code>
*/
public void setReconcilingStrategies(IReconcilingStrategy[] strategies) {
- fStrategies= strategies;
+ fStrategies = strategies;
}
-
+
/**
* Returns the previously set stratgies or <code>null</code>.
*
* @return the contained strategies or <code>null</code>
*/
- public IReconcilingStrategy[] getReconcilingStrategies() {
- return fStrategies;
- }
+// public IReconcilingStrategy[] getReconcilingStrategies() {
+// return fStrategies;
+// }
/*
* @see org.eclipse.jface.text.reconciler.IReconcilingStrategy#setDocument(org.eclipse.jface.text.IDocument)
public void setDocument(IDocument document) {
if (fStrategies == null)
return;
-
- for (int i= 0; i < fStrategies.length; i++)
+
+ for (int i = 0; i < fStrategies.length; i++)
fStrategies[i].setDocument(document);
}
/*
- * @see org.eclipse.jface.text.reconciler.IReconcilingStrategy#reconcile(org.eclipse.jface.text.reconciler.DirtyRegion, org.eclipse.jface.text.IRegion)
+ * @see org.eclipse.jface.text.reconciler.IReconcilingStrategy#reconcile(org.eclipse.jface.text.reconciler.DirtyRegion,
+ * org.eclipse.jface.text.IRegion)
*/
public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) {
if (fStrategies == null)
return;
-
- for (int i= 0; i < fStrategies.length; i++)
+
+ for (int i = 0; i < fStrategies.length; i++)
fStrategies[i].reconcile(dirtyRegion, subRegion);
}
public void reconcile(IRegion partition) {
if (fStrategies == null)
return;
-
- for (int i= 0; i < fStrategies.length; i++)
+
+ for (int i = 0; i < fStrategies.length; i++)
fStrategies[i].reconcile(partition);
}
public void setProgressMonitor(IProgressMonitor monitor) {
if (fStrategies == null)
return;
-
- for (int i=0; i < fStrategies.length; i++) {
+
+ for (int i = 0; i < fStrategies.length; i++) {
if (fStrategies[i] instanceof IReconcilingStrategyExtension) {
- IReconcilingStrategyExtension extension= (IReconcilingStrategyExtension) fStrategies[i];
+ IReconcilingStrategyExtension extension = (IReconcilingStrategyExtension) fStrategies[i];
extension.setProgressMonitor(monitor);
}
}
public void initialReconcile() {
if (fStrategies == null)
return;
-
- for (int i=0; i < fStrategies.length; i++) {
+
+ for (int i = 0; i < fStrategies.length; i++) {
if (fStrategies[i] instanceof IReconcilingStrategyExtension) {
- IReconcilingStrategyExtension extension= (IReconcilingStrategyExtension) fStrategies[i];
+ IReconcilingStrategyExtension extension = (IReconcilingStrategyExtension) fStrategies[i];
extension.initialReconcile();
}
}