summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Lindo2012-03-01 16:34:25 (EST)
committer Vivian Kong2012-03-01 16:34:25 (EST)
commitec1fcd11cb83060dec21e061e450cadb677d0ebd (patch)
tree0c78e9482806e482366e3333c1c4043502af71c6
parentbb871b2868a4434a46eded7398cd3845611cc676 (diff)
downloadorg.eclipse.cdt-ec1fcd11cb83060dec21e061e450cadb677d0ebd.zip
org.eclipse.cdt-ec1fcd11cb83060dec21e061e450cadb677d0ebd.tar.gz
org.eclipse.cdt-ec1fcd11cb83060dec21e061e450cadb677d0ebd.tar.bz2
Bug 372899 - A few changes needed to CEditor in order to implement
remote code folding in the Remote C Editor in ptp
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CEditor.java16
1 files changed, 10 insertions, 6 deletions
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CEditor.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CEditor.java
index 20644b8..39d9cbb 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CEditor.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CEditor.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2011 IBM Corporation and others.
+ * Copyright (c) 2005, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -2016,6 +2016,13 @@ public class CEditor extends TextEditor implements ISelectionChangedListener, IC
return CCorePlugin.SPACE.equals(option);
}
+ protected void uninstallProjectionModelUpdater() {
+ if (fProjectionModelUpdater != null) {
+ fProjectionModelUpdater.uninstall();
+ fProjectionModelUpdater = null;
+ }
+ }
+
/**
* @see org.eclipse.ui.IWorkbenchPart#dispose()
*/
@@ -2026,10 +2033,7 @@ public class CEditor extends TextEditor implements ISelectionChangedListener, IC
if (sourceViewer instanceof ITextViewerExtension)
((ITextViewerExtension) sourceViewer).removeVerifyKeyListener(fBracketInserter);
- if (fProjectionModelUpdater != null) {
- fProjectionModelUpdater.uninstall();
- fProjectionModelUpdater = null;
- }
+ uninstallProjectionModelUpdater();
if (fProjectionSupport != null) {
fProjectionSupport.dispose();
@@ -2351,7 +2355,7 @@ public class CEditor extends TextEditor implements ISelectionChangedListener, IC
* Determines if folding is enabled.
* @return <code>true</code> if folding is enabled, <code>false</code> otherwise.
*/
- boolean isFoldingEnabled() {
+ protected boolean isFoldingEnabled() {
return CUIPlugin.getDefault().getPreferenceStore().getBoolean(PreferenceConstants.EDITOR_FOLDING_ENABLED);
}