Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Maetzel2004-06-18 18:46:30 +0000
committerKai Maetzel2004-06-18 18:46:30 +0000
commit344b112de4adfc25510996b989626e0731d9f8bf (patch)
tree4bf3bad609533d4da90b072db10e8f775d1672ef
parenta244577e5d53c70f4d12d5d7dc9ed1db719b5072 (diff)
downloadeclipse.platform.text-344b112de4adfc25510996b989626e0731d9f8bf.tar.gz
eclipse.platform.text-344b112de4adfc25510996b989626e0731d9f8bf.tar.xz
eclipse.platform.text-344b112de4adfc25510996b989626e0731d9f8bf.zip
#66234, #67334
-rw-r--r--org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionViewer.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionViewer.java b/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionViewer.java
index 6eb20f526..e4a9bd0f8 100644
--- a/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionViewer.java
+++ b/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionViewer.java
@@ -463,14 +463,14 @@ public class ProjectionViewer extends SourceViewer implements ITextViewerExtensi
* @return <code>true</code> if this viewer is in projection mode,
* <code>false</code> otherwise
*/
- private boolean isProjectionMode() {
+ public final boolean isProjectionMode() {
return getProjectionAnnotationModel() != null;
}
/**
* Disables the projection mode.
*/
- private void disableProjection() {
+ public final void disableProjection() {
if (isProjectionMode()) {
removeProjectionAnnotationModel(getVisualAnnotationModel());
fProjectionAnnotationModel.removeAllAnnotations();
@@ -482,7 +482,7 @@ public class ProjectionViewer extends SourceViewer implements ITextViewerExtensi
/**
* Enables the projection mode.
*/
- private void enableProjection() {
+ public final void enableProjection() {
if (!isProjectionMode()) {
addProjectionAnnotationModel(getVisualAnnotationModel());
fFindReplaceDocumentAdapter= null;
@@ -1063,7 +1063,7 @@ public class ProjectionViewer extends SourceViewer implements ITextViewerExtensi
return false;
}
- private void reinitializeProjection() throws BadLocationException {
+ public final void reinitializeProjection() throws BadLocationException {
ProjectionDocument projection= null;
@@ -1307,7 +1307,8 @@ public class ProjectionViewer extends SourceViewer implements ITextViewerExtensi
if (redraws()) {
try {
selection= getSelectedRange();
- if (selection.y == 0)
+ Point widgetSelection= textWidget.getSelectionRange();
+ if (selection.y == 0 || selection.y == widgetSelection.y)
deleteText();
else
deleteTextRange(selection.x, selection.y, textWidget);

Back to the top