Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bundles/org.eclipse.jface.text/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.jface.text
Bundle-Version: 3.31.100.qualifier
Bundle-Version: 3.32.0.qualifier
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Export-Package:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,27 @@ private void initializeImages(Display display) {
}
}

/**
* Whether this annotation should be included in the "Collapse All" action of the editor.
*
* @return {@code true} if the annotation participates in "Collapse All" actions
* @since 3.32
*/
protected boolean includeInCollapseAll() {
return true;
}

/**
* Whether this annotation should be included in the "Expand All" action of the editor.
*
* @return {@code true} if this annotation participates in "Expand All" actions
* @since 3.32
*/
protected boolean includeInExpandAll() {
return true;
}


/**
* Returns the state of this annotation.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public boolean collapseAll(int offset, int length) {
Iterator<Annotation> iterator= getAnnotationIterator();
while (iterator.hasNext()) {
ProjectionAnnotation annotation= (ProjectionAnnotation) iterator.next();
if (!annotation.isCollapsed()) {
if (!annotation.isCollapsed() && annotation.includeInCollapseAll()) {
Position position= getPosition(annotation);
if (position != null && position.overlapsWith(offset, length) /* || is a delete at the boundary */ ) {
annotation.markCollapsed();
Expand Down Expand Up @@ -154,7 +154,7 @@ protected boolean expandAll(int offset, int length, boolean fireModelChanged) {
Iterator<Annotation> iterator= getAnnotationIterator();
while (iterator.hasNext()) {
ProjectionAnnotation annotation= (ProjectionAnnotation) iterator.next();
if (annotation.isCollapsed()) {
if (annotation.isCollapsed() && annotation.includeInExpandAll()) {
Position position= getPosition(annotation);
if (position != null && position.overlapsWith(offset, length) /* || is a delete at the boundary */ ) {
annotation.markExpanded();
Expand Down
Loading
Loading