1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-23 17:05:26 +02:00

Upgrade to latest platform APIs.

This commit is contained in:
Doug Schaefer 2004-05-17 18:44:14 +00:00
parent 787b5dfcc3
commit 2eba1f473e
7 changed files with 87 additions and 63 deletions

View file

@ -197,7 +197,7 @@ public class MakefileEditor extends TextEditor implements ISelectionChangedListe
if (len > 0) {
var = var.substring(0, len);
}
IRegion region = getFindRepalceDocumentAdapter().search(start, var, true, true, true, false);
IRegion region = getFindRepalceDocumentAdapter().find(start, var, true, true, true, false);
if (region != null) {
len = region.getOffset();

View file

@ -49,7 +49,7 @@ import org.eclipse.jface.text.source.IAnnotationModelListenerExtension;
import org.eclipse.jface.text.source.IAnnotationPresentation;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.FontMetrics;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Rectangle;
@ -187,7 +187,15 @@ public class CDocumentProvider extends TextFileDocumentProvider {
public void paint(GC gc, Canvas canvas, Rectangle r) {
initializeImages();
if (fImage != null) {
drawImage(fImage, gc, canvas, r, SWT.CENTER, SWT.TOP);
//drawImage(fImage, gc, canvas, r, SWT.CENTER, SWT.TOP);
Rectangle bounds = fImage.getBounds();
int x = (r.width - bounds.width) / 2;
FontMetrics fontMetrics = gc.getFontMetrics();
int y = (fontMetrics.getHeight() - bounds.height) / 2;
gc.drawImage(fImage, r.x + x, r.y + y);
}
}

View file

@ -7,7 +7,6 @@ package org.eclipse.cdt.internal.ui.editor.asm;
import java.lang.reflect.InvocationTargetException;
import java.text.MessageFormat;
import org.eclipse.cdt.internal.ui.editor.CEditorMessages;
import org.eclipse.cdt.ui.CUIPlugin;
import org.eclipse.core.resources.IFile;
@ -25,8 +24,8 @@ import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.actions.WorkspaceModifyOperation;
import org.eclipse.ui.dialogs.SaveAsDialog;
import org.eclipse.ui.part.FileEditorInput;
import org.eclipse.ui.texteditor.AbstractDecoratedTextEditor;
import org.eclipse.ui.texteditor.DefaultRangeIndicator;
import org.eclipse.ui.texteditor.ExtendedTextEditor;
import org.eclipse.ui.texteditor.ITextEditorActionConstants;
@ -36,7 +35,7 @@ import org.eclipse.ui.texteditor.ITextEditorActionConstants;
/**
* Assembly text editor
*/
public class AsmTextEditor extends ExtendedTextEditor {
public class AsmTextEditor extends AbstractDecoratedTextEditor {
//public class AsmTextEditor extends StatusTextEditor {
// FIXME: Should this editor have a different preference store ?
// For now we are sharing with the CEditor and any changes will in the

View file

@ -12,7 +12,6 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import org.eclipse.cdt.internal.ui.CPluginImages;
import org.eclipse.cdt.internal.ui.ICHelpContextIds;
import org.eclipse.cdt.internal.ui.dialogs.StatusInfo;
@ -60,8 +59,8 @@ import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.eclipse.ui.help.WorkbenchHelp;
import org.eclipse.ui.texteditor.AbstractDecoratedTextEditorPreferenceConstants;
import org.eclipse.ui.texteditor.AnnotationPreference;
import org.eclipse.ui.texteditor.ExtendedTextEditorPreferenceConstants;
import org.eclipse.ui.texteditor.MarkerAnnotationPreferences;
import org.eclipse.ui.texteditor.WorkbenchChainedTextFontFieldEditor;
@ -79,13 +78,13 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP
PreferencesMessages.getString("CEditorPreferencePage.cCommentTaskTags"), PreferenceConstants.EDITOR_TASK_TAG_COLOR } //$NON-NLS-1$
};
protected final String[][] fAppearanceColorListModel = new String[][] { { PreferencesMessages.getString("CEditorPreferencePage.behaviorPage.lineNumberColor"), ExtendedTextEditorPreferenceConstants.EDITOR_LINE_NUMBER_RULER_COLOR }, //$NON-NLS-1$
protected final String[][] fAppearanceColorListModel = new String[][] { { PreferencesMessages.getString("CEditorPreferencePage.behaviorPage.lineNumberColor"), AbstractDecoratedTextEditorPreferenceConstants.EDITOR_LINE_NUMBER_RULER_COLOR }, //$NON-NLS-1$
{
PreferencesMessages.getString("CEditorPreferencePage.behaviorPage.matchingBracketColor"), CEditor.MATCHING_BRACKETS_COLOR }, //$NON-NLS-1$
{
PreferencesMessages.getString("CEditorPreferencePage.behaviorPage.currentLineHighlightColor"), ExtendedTextEditorPreferenceConstants.EDITOR_CURRENT_LINE_COLOR }, //$NON-NLS-1$
PreferencesMessages.getString("CEditorPreferencePage.behaviorPage.currentLineHighlightColor"), AbstractDecoratedTextEditorPreferenceConstants.EDITOR_CURRENT_LINE_COLOR }, //$NON-NLS-1$
{
PreferencesMessages.getString("CEditorPreferencePage.behaviorPage.printMarginColor"), ExtendedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN_COLOR }, //$NON-NLS-1$
PreferencesMessages.getString("CEditorPreferencePage.behaviorPage.printMarginColor"), AbstractDecoratedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN_COLOR }, //$NON-NLS-1$
{
PreferencesMessages.getString("CEditorPreferencePage.behaviorPage.linkedPositionColor"), CEditor.LINKED_POSITION_COLOR }, //$NON-NLS-1$
};
@ -184,16 +183,16 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ICColorConstants.C_DEFAULT + "_bold")); //$NON-NLS-1$
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, CEditor.MATCHING_BRACKETS_COLOR));
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, CEditor.MATCHING_BRACKETS));
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, ExtendedTextEditorPreferenceConstants.EDITOR_CURRENT_LINE_COLOR));
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ExtendedTextEditorPreferenceConstants.EDITOR_CURRENT_LINE));
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, AbstractDecoratedTextEditorPreferenceConstants.EDITOR_CURRENT_LINE_COLOR));
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, AbstractDecoratedTextEditorPreferenceConstants.EDITOR_CURRENT_LINE));
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, CEditor.SPACES_FOR_TABS));
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, ExtendedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN_COLOR));
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.INT, ExtendedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN_COLUMN));
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ExtendedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN));
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, AbstractDecoratedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN_COLOR));
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.INT, AbstractDecoratedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN_COLUMN));
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, AbstractDecoratedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN));
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, CEditor.LINKED_POSITION_COLOR));
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, ExtendedTextEditorPreferenceConstants.EDITOR_LINE_NUMBER_RULER_COLOR));
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ExtendedTextEditorPreferenceConstants.EDITOR_LINE_NUMBER_RULER));
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ExtendedTextEditorPreferenceConstants.EDITOR_OVERVIEW_RULER));
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, AbstractDecoratedTextEditorPreferenceConstants.EDITOR_LINE_NUMBER_RULER_COLOR));
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, AbstractDecoratedTextEditorPreferenceConstants.EDITOR_LINE_NUMBER_RULER));
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, AbstractDecoratedTextEditorPreferenceConstants.EDITOR_OVERVIEW_RULER));
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.INT, ContentAssistPreference.AUTOACTIVATION_DELAY));
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ContentAssistPreference.AUTOINSERT));
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.INT, ContentAssistPreference.TIMEOUT_DELAY));
@ -246,12 +245,12 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP
color = display.getSystemColor(SWT.COLOR_GRAY);
PreferenceConverter.setDefault(store, CEditor.MATCHING_BRACKETS_COLOR, color.getRGB());
store.setDefault(ExtendedTextEditorPreferenceConstants.EDITOR_CURRENT_LINE, true);
PreferenceConverter.setDefault(store, ExtendedTextEditorPreferenceConstants.EDITOR_CURRENT_LINE_COLOR, new RGB(225, 235, 224));
store.setDefault(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_CURRENT_LINE, true);
PreferenceConverter.setDefault(store, AbstractDecoratedTextEditorPreferenceConstants.EDITOR_CURRENT_LINE_COLOR, new RGB(225, 235, 224));
store.setDefault(ExtendedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN, true);
store.setDefault(ExtendedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN_COLUMN, 80);
PreferenceConverter.setDefault(store, ExtendedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN_COLOR, new RGB(176, 180, 185));
store.setDefault(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN, true);
store.setDefault(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN_COLUMN, 80);
PreferenceConverter.setDefault(store, AbstractDecoratedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN_COLOR, new RGB(176, 180, 185));
WorkbenchChainedTextFontFieldEditor.startPropagate(store, JFaceResources.TEXT_FONT);
@ -287,10 +286,10 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP
PreferenceConverter.setDefault(store, CEditor.LINKED_POSITION_COLOR, new RGB(0, 200, 100));
store.setDefault(ExtendedTextEditorPreferenceConstants.EDITOR_LINE_NUMBER_RULER, false);
PreferenceConverter.setDefault(store, ExtendedTextEditorPreferenceConstants.EDITOR_LINE_NUMBER_RULER_COLOR, new RGB(0, 0, 0));
store.setDefault(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_LINE_NUMBER_RULER, false);
PreferenceConverter.setDefault(store, AbstractDecoratedTextEditorPreferenceConstants.EDITOR_LINE_NUMBER_RULER_COLOR, new RGB(0, 0, 0));
store.setDefault(ExtendedTextEditorPreferenceConstants.EDITOR_OVERVIEW_RULER, true);
store.setDefault(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_OVERVIEW_RULER, true);
store.setDefault(ContentAssistPreference.CURRENT_FILE_SEARCH_SCOPE, true);
store.setDefault(ContentAssistPreference.PROJECT_SEARCH_SCOPE, false);
@ -781,7 +780,7 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP
addTextField(behaviorComposite, label, CSourceViewerConfiguration.PREFERENCE_TAB_WIDTH, 2, 0, true);
label = PreferencesMessages.getString("CEditorPreferencePage.behaviorPage.marginColumn"); //$NON-NLS-1$
addTextField(behaviorComposite, label, ExtendedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN_COLUMN, 4, 0, true);
addTextField(behaviorComposite, label, AbstractDecoratedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN_COLUMN, 4, 0, true);
label = PreferencesMessages.getString("CEditorPreferencePage.behaviorPage.tabSpace"); //$NON-NLS-1$
addCheckBox(behaviorComposite, label, CEditor.SPACES_FOR_TABS, 0);
@ -790,16 +789,16 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP
fBracketHighlightButton = addCheckBox(behaviorComposite, label, CEditor.MATCHING_BRACKETS, 0);
label = PreferencesMessages.getString("CEditorPreferencePage.behaviorPage.showLineNumbers"); //$NON-NLS-1$
addCheckBox(behaviorComposite, label, ExtendedTextEditorPreferenceConstants.EDITOR_LINE_NUMBER_RULER, 0);
addCheckBox(behaviorComposite, label, AbstractDecoratedTextEditorPreferenceConstants.EDITOR_LINE_NUMBER_RULER, 0);
label = PreferencesMessages.getString("CEditorPreferencePage.behaviorPage.highlightLine"); //$NON-NLS-1$
fLineHighlightButton = addCheckBox(behaviorComposite, label, ExtendedTextEditorPreferenceConstants.EDITOR_CURRENT_LINE, 0);
fLineHighlightButton = addCheckBox(behaviorComposite, label, AbstractDecoratedTextEditorPreferenceConstants.EDITOR_CURRENT_LINE, 0);
label = PreferencesMessages.getString("CEditorPreferencePage.behaviorPage.showOverviewRuler"); //$NON-NLS-1$
addCheckBox(behaviorComposite, label, ExtendedTextEditorPreferenceConstants.EDITOR_OVERVIEW_RULER, 0);
addCheckBox(behaviorComposite, label, AbstractDecoratedTextEditorPreferenceConstants.EDITOR_OVERVIEW_RULER, 0);
label = PreferencesMessages.getString("CEditorPreferencePage.behaviorPage.printMargin"); //$NON-NLS-1$
addCheckBox(behaviorComposite, label, ExtendedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN, 0);
addCheckBox(behaviorComposite, label, AbstractDecoratedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN, 0);
Label l = new Label(behaviorComposite, SWT.LEFT);

View file

@ -20,6 +20,8 @@ import org.eclipse.core.resources.IProject;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.search.ui.ISearchQuery;
import org.eclipse.search.ui.text.AbstractTextSearchResult;
import org.eclipse.search.ui.text.IEditorMatchAdapter;
import org.eclipse.search.ui.text.IFileMatchAdapter;
import org.eclipse.search.ui.text.Match;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
@ -153,4 +155,20 @@ public class CSearchResult extends AbstractTextSearchResult {
return MessageFormat.format(label, new Object[]{new Integer(matches)});
}
/* (non-Javadoc)
* @see org.eclipse.search.ui.text.AbstractTextSearchResult#getEditorMatchAdapter()
*/
public IEditorMatchAdapter getEditorMatchAdapter() {
// TODO Auto-generated method stub
return null;
}
/* (non-Javadoc)
* @see org.eclipse.search.ui.text.AbstractTextSearchResult#getFileMatchAdapter()
*/
public IFileMatchAdapter getFileMatchAdapter() {
// TODO Auto-generated method stub
return null;
}
}

View file

@ -35,12 +35,13 @@ import org.eclipse.jface.text.contentassist.ICompletionProposalExtension;
import org.eclipse.jface.text.contentassist.ICompletionProposalExtension2;
import org.eclipse.jface.text.contentassist.ICompletionProposalExtension3;
import org.eclipse.jface.text.contentassist.IContextInformation;
import org.eclipse.jface.text.link.ILinkedListener;
import org.eclipse.jface.text.link.LinkedEnvironment;
import org.eclipse.jface.text.link.ILinkedModeListener;
import org.eclipse.jface.text.link.LinkedModeModel;
import org.eclipse.jface.text.link.LinkedModeUI;
import org.eclipse.jface.text.link.LinkedPosition;
import org.eclipse.jface.text.link.LinkedPositionGroup;
import org.eclipse.jface.text.link.LinkedUIControl;
import org.eclipse.jface.text.link.LinkedUIControl.ExitFlags;
import org.eclipse.jface.text.link.LinkedUIControl.IExitPolicy;
import org.eclipse.jface.text.link.LinkedModeUI.ExitFlags;
import org.eclipse.jface.text.link.LinkedModeUI.IExitPolicy;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.StyleRange;
import org.eclipse.swt.custom.StyledText;
@ -49,11 +50,10 @@ import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.ui.texteditor.link.EditorHistoryUpdater;
import org.eclipse.ui.texteditor.link.EditorLinkedModeUI;
public class CCompletionProposal implements ICCompletionProposal, ICompletionProposalExtension, ICompletionProposalExtension2, ICompletionProposalExtension3 {
private String fDisplayString;
private String fReplacementString;
private int fReplacementOffset;
@ -118,7 +118,7 @@ public class CCompletionProposal implements ICCompletionProposal, ICompletionPro
/**
* Sets the context information.
* @param contentInformation The context information associated with this proposal
* @param contextInformation The context information associated with this proposal
*/
public void setContextInformation(IContextInformation contextInformation) {
fContextInformation= contextInformation;
@ -135,7 +135,7 @@ public class CCompletionProposal implements ICCompletionProposal, ICompletionPro
/**
* Sets the proposal info.
* @param additionalProposalInfo The additional information associated with this proposal or <code>null</code>
* @param proposalInfo The additional information associated with this proposal or <code>null</code>
*/
public void setAdditionalProposalInfo(String proposalInfo) {
fProposalInfo= proposalInfo;
@ -191,22 +191,22 @@ public class CCompletionProposal implements ICCompletionProposal, ICompletionPro
int index= string.indexOf("()"); //$NON-NLS-1$
if (index != -1 && index + 1 == fCursorPosition) {
IPreferenceStore preferenceStore= CUIPlugin.getDefault().getPreferenceStore();
//if (preferenceStore.getBoolean(PreferenceConstants.EDITOR_CLOSE_BRACKETS)) {
// if (preferenceStore.getBoolean(PreferenceConstants.EDITOR_CLOSE_BRACKETS)) {
if(true){
int newOffset= fReplacementOffset + fCursorPosition;
LinkedPositionGroup group= new LinkedPositionGroup();
group.createPosition(document, newOffset, 0);
group.addPosition(new LinkedPosition(document, newOffset, 0, LinkedPositionGroup.NO_STOP));
LinkedEnvironment env= new LinkedEnvironment();
env.addGroup(group);
env.forceInstall();
LinkedModeModel model= new LinkedModeModel();
model.addGroup(group);
model.forceInstall();
LinkedUIControl ui= new LinkedUIControl(env, fTextViewer);
ui.setPositionListener(new EditorHistoryUpdater());
LinkedModeUI ui= new EditorLinkedModeUI(model, fTextViewer);
ui.setSimpleMode(true);
ui.setExitPolicy(new ExitPolicy(')'));
ui.setExitPosition(fTextViewer, newOffset + 1, 0, Integer.MAX_VALUE);
ui.setCyclingMode(LinkedUIControl.CYCLE_NEVER);
ui.setCyclingMode(LinkedModeUI.CYCLE_NEVER);
ui.enter();
}
}
@ -278,18 +278,18 @@ public class CCompletionProposal implements ICCompletionProposal, ICompletionPro
/*
* @see org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI.ExitPolicy#doExit(org.eclipse.jdt.internal.ui.text.link.LinkedPositionManager, org.eclipse.swt.events.VerifyEvent, int, int)
*/
public ExitFlags doExit(LinkedEnvironment environment, VerifyEvent event, int offset, int length) {
public ExitFlags doExit(LinkedModeModel environment, VerifyEvent event, int offset, int length) {
if (event.character == fExitCharacter) {
if (environment.anyPositionContains(offset))
return new ExitFlags(ILinkedListener.UPDATE_CARET, false);
return new ExitFlags(ILinkedModeListener.UPDATE_CARET, false);
else
return new ExitFlags(ILinkedListener.UPDATE_CARET, true);
return new ExitFlags(ILinkedModeListener.UPDATE_CARET, true);
}
switch (event.character) {
case ';':
return new ExitFlags(ILinkedListener.NONE, true);
return new ExitFlags(ILinkedModeListener.NONE, true);
default:
return null;
@ -343,10 +343,10 @@ public class CCompletionProposal implements ICCompletionProposal, ICompletionPro
* @see ICompletionProposal#getAdditionalProposalInfo()
*/
public String getAdditionalProposalInfo() {
// if (fProposalInfo != null) {
// return fProposalInfo.getInfo();
// }
return fProposalInfo;
if (fProposalInfo != null) {
return fProposalInfo;
}
return null;
}
/*
@ -374,7 +374,7 @@ public class CCompletionProposal implements ICCompletionProposal, ICompletionPro
/*
* @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension3#getCompletionOffset()
*/
public int getCompletionOffset() {
public int getPrefixCompletionStart(IDocument document, int completionOffset) {
return getReplacementOffset();
}
@ -415,7 +415,7 @@ public class CCompletionProposal implements ICCompletionProposal, ICompletionPro
/*
* @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension3#getReplacementText()
*/
public CharSequence getCompletionText() {
public CharSequence getPrefixCompletionText(IDocument document, int completionOffset) {
String string= getReplacementString();
int pos= string.indexOf('(');
if (pos > 0)

View file

@ -79,10 +79,10 @@ import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IWorkbenchActionConstants;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.internal.editors.text.EditorsPlugin;
import org.eclipse.ui.texteditor.AbstractDecoratedTextEditorPreferenceConstants;
import org.eclipse.ui.texteditor.AnnotationPreference;
import org.eclipse.ui.texteditor.DefaultMarkerAnnotationAccess;
import org.eclipse.ui.texteditor.DefaultRangeIndicator;
import org.eclipse.ui.texteditor.ExtendedTextEditorPreferenceConstants;
import org.eclipse.ui.texteditor.ITextEditorActionConstants;
import org.eclipse.ui.texteditor.IUpdate;
import org.eclipse.ui.texteditor.MarkerAnnotationPreferences;
@ -179,12 +179,12 @@ public class DisassemblyView extends AbstractDebugEventHandlerView
/**
* Preference key for highlighting current line.
*/
private final static String CURRENT_LINE = ExtendedTextEditorPreferenceConstants.EDITOR_CURRENT_LINE;
private final static String CURRENT_LINE = AbstractDecoratedTextEditorPreferenceConstants.EDITOR_CURRENT_LINE;
/**
* Preference key for highlight color of current line.
*/
private final static String CURRENT_LINE_COLOR = ExtendedTextEditorPreferenceConstants.EDITOR_CURRENT_LINE_COLOR;
private final static String CURRENT_LINE_COLOR = AbstractDecoratedTextEditorPreferenceConstants.EDITOR_CURRENT_LINE_COLOR;
/**
* The view's context menu id.