Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Leherbauer2007-01-19 11:09:55 +0000
committerAnton Leherbauer2007-01-19 11:09:55 +0000
commitfa38de345672caf46d9afe0750684b52d7d930cb (patch)
tree5150edeb3fd4a4b4f7411e6097d9358da7cd7f9c
parent7439c3eb387b7181bdb9f53cd63f7a7d5b3008e9 (diff)
downloadorg.eclipse.cdt-fa38de345672caf46d9afe0750684b52d7d930cb.tar.gz
org.eclipse.cdt-fa38de345672caf46d9afe0750684b52d7d930cb.tar.xz
org.eclipse.cdt-fa38de345672caf46d9afe0750684b52d7d930cb.zip
Fix for Bug 170921 - Makefile editor does not respect tab width setting
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileEditor.java4
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileSourceConfiguration.java11
2 files changed, 9 insertions, 6 deletions
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileEditor.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileEditor.java
index 135ab69314..7885758e89 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileEditor.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileEditor.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
+ * Copyright (c) 2000, 2007 QNX Software Systems 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
@@ -103,7 +103,6 @@ public class MakefileEditor extends TextEditor implements ISelectionChangedListe
* @see org.eclipse.ui.texteditor.AbstractDecoratedTextEditor#initializeEditor()
*/
protected void initializeEditor() {
- setSourceViewerConfiguration(new MakefileSourceConfiguration(this));
setRangeIndicator(new DefaultRangeIndicator());
setEditorContextMenuId("#MakefileEditorContext"); //$NON-NLS-1$
setRulerContextMenuId("#MakefileRulerContext"); //$NON-NLS-1$
@@ -113,6 +112,7 @@ public class MakefileEditor extends TextEditor implements ISelectionChangedListe
stores[1] = EditorsUI.getPreferenceStore();
ChainedPreferenceStore chainedStore = new ChainedPreferenceStore(stores);
setPreferenceStore(chainedStore);
+ setSourceViewerConfiguration(new MakefileSourceConfiguration(chainedStore, this));
}
/* (non-Javadoc)
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileSourceConfiguration.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileSourceConfiguration.java
index 3128873e6d..d2ffcbd7be 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileSourceConfiguration.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileSourceConfiguration.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
+ * Copyright (c) 2000, 2007 QNX Software Systems 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
@@ -7,6 +7,7 @@
*
* Contributors:
* QNX Software Systems - Initial API and implementation
+ * Anton Leherbauer (Wind River Systems)
*******************************************************************************/
package org.eclipse.cdt.make.internal.ui.editor;
@@ -18,6 +19,7 @@ import org.eclipse.cdt.make.internal.ui.text.makefile.MakefilePartitionScanner;
import org.eclipse.cdt.make.internal.ui.text.makefile.MakefileReconcilingStrategy;
import org.eclipse.cdt.make.internal.ui.text.makefile.MakefileTextHover;
import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.ITextHover;
import org.eclipse.jface.text.TextAttribute;
@@ -35,8 +37,9 @@ import org.eclipse.jface.text.source.ISourceViewer;
import org.eclipse.jface.text.source.SourceViewerConfiguration;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.swt.graphics.RGB;
+import org.eclipse.ui.editors.text.TextSourceViewerConfiguration;
-public class MakefileSourceConfiguration extends SourceViewerConfiguration {
+public class MakefileSourceConfiguration extends TextSourceViewerConfiguration {
private ColorManager colorManager;
MakefileCodeScanner codeScanner;
@@ -54,8 +57,8 @@ public class MakefileSourceConfiguration extends SourceViewerConfiguration {
/**
* Constructor for MakeConfiguration
*/
- public MakefileSourceConfiguration(MakefileEditor editor) {
- super();
+ public MakefileSourceConfiguration(IPreferenceStore preferenceStore, MakefileEditor editor) {
+ super(preferenceStore);
fEditor = editor;
colorManager = ColorManager.getDefault();
}

Back to the top