1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-01 21:35:40 +02:00

Fix for 160278: Tab Conversion in Assembly editor

This commit is contained in:
Anton Leherbauer 2007-03-23 13:59:43 +00:00
parent 61b5b5bc26
commit 0e0113adf1
2 changed files with 10 additions and 6 deletions

View file

@ -12,6 +12,7 @@
package org.eclipse.cdt.internal.ui.editor.asm; package org.eclipse.cdt.internal.ui.editor.asm;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.presentation.IPresentationReconciler; import org.eclipse.jface.text.presentation.IPresentationReconciler;
import org.eclipse.jface.text.presentation.PresentationReconciler; import org.eclipse.jface.text.presentation.PresentationReconciler;
@ -32,8 +33,8 @@ public class AsmSourceViewerConfiguration extends TextSourceViewerConfiguration
/** /**
* Constructor for AsmSourceViewerConfiguration * Constructor for AsmSourceViewerConfiguration
*/ */
public AsmSourceViewerConfiguration(AsmTextTools tools) { public AsmSourceViewerConfiguration(AsmTextTools tools, IPreferenceStore store) {
super(); super(store);
fAsmTextTools = tools; fAsmTextTools = tools;
} }

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2005 IBM Corporation and others. * Copyright (c) 2005, 2007 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -12,10 +12,12 @@
package org.eclipse.cdt.internal.ui.editor.asm; package org.eclipse.cdt.internal.ui.editor.asm;
import org.eclipse.cdt.ui.CUIPlugin; import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.util.PropertyChangeEvent; import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.ui.editors.text.TextEditor; import org.eclipse.ui.editors.text.TextEditor;
import org.eclipse.cdt.ui.CUIPlugin;
/** /**
* Assembly text editor * Assembly text editor
@ -32,12 +34,13 @@ public class AsmTextEditor extends TextEditor {
*/ */
protected void initializeEditor() { protected void initializeEditor() {
AsmTextTools textTools= CUIPlugin.getDefault().getAsmTextTools(); AsmTextTools textTools= CUIPlugin.getDefault().getAsmTextTools();
setSourceViewerConfiguration(new AsmSourceViewerConfiguration(textTools)); IPreferenceStore store= CUIPlugin.getDefault().getCombinedPreferenceStore();
setSourceViewerConfiguration(new AsmSourceViewerConfiguration(textTools, store));
setDocumentProvider(CUIPlugin.getDefault().getDocumentProvider()); setDocumentProvider(CUIPlugin.getDefault().getDocumentProvider());
// FIXME: Should this editor have a different preference store ? // FIXME: Should this editor have a different preference store ?
// For now we are sharing with the CEditor and any changes will in the // For now we are sharing with the CEditor and any changes will in the
// setting of the CEditor will be reflected in this editor. // setting of the CEditor will be reflected in this editor.
setPreferenceStore(CUIPlugin.getDefault().getCombinedPreferenceStore()); setPreferenceStore(store);
setEditorContextMenuId("#ASMEditorContext"); //$NON-NLS-1$ setEditorContextMenuId("#ASMEditorContext"); //$NON-NLS-1$
setRulerContextMenuId("#ASMEditorRulerContext"); //$NON-NLS-1$ setRulerContextMenuId("#ASMEditorRulerContext"); //$NON-NLS-1$
//setOutlinerContextMenuId("#ASMEditorOutlinerContext"); //$NON-NLS-1$ //setOutlinerContextMenuId("#ASMEditorOutlinerContext"); //$NON-NLS-1$