diff options
author | apanchenk | 2010-09-16 12:40:47 +0000 |
---|---|---|
committer | apanchenk | 2010-09-16 12:40:47 +0000 |
commit | d76d8aebcb5c0e13b00192f2496a10cd6ddce772 (patch) | |
tree | cb5d4734d3f6ab99b467b0df9b2828751de66daa | |
parent | 49e72beadf0c1bc59a0c3b66b8761046487deb02 (diff) | |
download | org.eclipse.dltk.core-R2_0_maintenance.tar.gz org.eclipse.dltk.core-R2_0_maintenance.tar.xz org.eclipse.dltk.core-R2_0_maintenance.zip |
synchronized addedR2_0_maintenance
-rw-r--r-- | core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/ui/text/folding/DelegatingFoldingStructureProvider.java | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/ui/text/folding/DelegatingFoldingStructureProvider.java b/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/ui/text/folding/DelegatingFoldingStructureProvider.java index c69069c6f..bcf0e732f 100644 --- a/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/ui/text/folding/DelegatingFoldingStructureProvider.java +++ b/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/ui/text/folding/DelegatingFoldingStructureProvider.java @@ -633,7 +633,7 @@ public class DelegatingFoldingStructureProvider implements return EditorUtility.getEditorInputModelElement(fEditor, false); } - private void update(FoldingStructureComputationContext ctx) { + private synchronized void update(FoldingStructureComputationContext ctx) { if (ctx == null) return; Map<Annotation, Position> additions = new HashMap<Annotation, Position>(); @@ -705,8 +705,8 @@ public class DelegatingFoldingStructureProvider implements final Requestor requestor = new Requestor(content, ctx); for (IFoldingBlockProvider provider : blockProviders) { provider.setRequestor(requestor); - requestor.lineCountDelta = Math.max(1, provider - .getMinimalLineCount() - 1); + requestor.lineCountDelta = Math.max(1, + provider.getMinimalLineCount() - 1); provider.computeFoldableBlocks(content); provider.setRequestor(null); } @@ -788,8 +788,8 @@ public class DelegatingFoldingStructureProvider implements * @return a folding position corresponding to <code>aligned</code> */ protected static final Position createMemberPosition(IRegion aligned) { - return new ScriptElementPosition(aligned.getOffset(), aligned - .getLength()); + return new ScriptElementPosition(aligned.getOffset(), + aligned.getLength()); } /** @@ -918,8 +918,8 @@ public class DelegatingFoldingStructureProvider implements } } } - model.modifyAnnotations(null, null, modified - .toArray(new Annotation[modified.size()])); + model.modifyAnnotations(null, null, + modified.toArray(new Annotation[modified.size()])); } protected final IModelElement getModuleElement() { @@ -1055,9 +1055,9 @@ public class DelegatingFoldingStructureProvider implements if (position == null) { return; } - ctx.addProjectionRange(new ScriptProjectionAnnotation(ctx - .allowCollapsing() - && collapse, kind, element), position); + ctx.addProjectionRange( + new ScriptProjectionAnnotation(ctx.allowCollapsing() + && collapse, kind, element), position); } catch (StringIndexOutOfBoundsException e) { if (DLTKCore.DEBUG) { e.printStackTrace(); |