1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-03-28 14:56:28 +01:00

Initial cleanups to remove classes that were pulled from 2.0

This commit is contained in:
Sebastien Marineau 2002-06-26 21:53:41 +00:00
parent 3170ee99a0
commit bde0626535
20 changed files with 17 additions and 1419 deletions

View file

@ -10,9 +10,11 @@ import org.eclipse.core.resources.IStorage;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.text.AbstractDocument;
import org.eclipse.jface.text.DefaultLineTracker;
import org.eclipse.jface.text.GapTextStore;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IDocumentExtension;
import org.eclipse.jface.text.IDocumentListener;
import org.eclipse.jface.text.IDocumentPartitioner;
import org.eclipse.jface.text.source.IAnnotationModel;
@ -23,8 +25,6 @@ import org.eclipse.ui.IStorageEditorInput;
import org.eclipse.ui.editors.text.FileDocumentProvider;
import org.eclipse.cdt.internal.ui.CPlugin;
import org.eclipse.cdt.internal.ui.text.eclipse2.CAbstractDocument;
import org.eclipse.cdt.internal.ui.text.eclipse2.IDocumentExtension;
public class CDocumentProvider extends FileDocumentProvider {
@ -40,7 +40,7 @@ public class CDocumentProvider extends FileDocumentProvider {
/**
* Bundle of all required informations to allow working copy management.
*/
protected class CDocument extends CAbstractDocument {
protected class CDocument extends AbstractDocument {
/**
* Creates a new empty document.

View file

@ -41,6 +41,7 @@ import org.eclipse.jface.text.DocumentCommand;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.ITextOperationTarget;
import org.eclipse.jface.text.ITextSelection;
import org.eclipse.jface.text.ITextViewerExtension;
import org.eclipse.jface.text.Position;
import org.eclipse.jface.text.source.Annotation;
import org.eclipse.jface.text.source.IAnnotationModel;
@ -101,7 +102,6 @@ import org.eclipse.cdt.internal.ui.CPlugin;
import org.eclipse.cdt.internal.ui.IContextMenuConstants;
import org.eclipse.cdt.internal.ui.text.CSourceViewerConfiguration;
import org.eclipse.cdt.internal.ui.text.CTextTools;
import org.eclipse.cdt.internal.ui.text.eclipse2.ITextViewerExtension;
import org.eclipse.cdt.ui.ICDTConstants;
import org.eclipse.cdt.ui.ICEditorContextMenuAction;
import org.eclipse.cdt.ui.ICEditorRulerAction;

View file

@ -9,7 +9,6 @@ package org.eclipse.cdt.internal.ui.editor.asm;
import org.eclipse.cdt.internal.ui.text.AbstractCScanner;
import org.eclipse.cdt.internal.ui.text.ICColorConstants;
import org.eclipse.cdt.internal.ui.text.IColorManager;
import org.eclipse.cdt.internal.ui.text.eclipse2.Token;
import java.util.ArrayList;
import java.util.List;
@ -20,6 +19,7 @@ import org.eclipse.jface.text.rules.IRule;
import org.eclipse.jface.text.rules.IToken;
import org.eclipse.jface.text.rules.IWordDetector;
import org.eclipse.jface.text.rules.SingleLineRule;
import org.eclipse.jface.text.rules.Token;
import org.eclipse.jface.text.rules.WordPatternRule;
import org.eclipse.jface.text.rules.WordRule;
import org.eclipse.jface.util.PropertyChangeEvent;

View file

@ -17,7 +17,6 @@ import org.eclipse.cdt.internal.ui.editor.CEditor;
import org.eclipse.cdt.internal.ui.text.CSourceViewerConfiguration;
import org.eclipse.cdt.internal.ui.text.CTextTools;
import org.eclipse.cdt.internal.ui.text.ContentAssistPreference;
import org.eclipse.cdt.internal.ui.text.eclipse2.ITextViewerExtension;
import org.eclipse.cdt.internal.ui.text.template.TemplateVariableProcessor;
import org.eclipse.cdt.internal.ui.util.SWTUtil;
import java.util.ArrayList;
@ -69,6 +68,7 @@ import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.ITextListener;
import org.eclipse.jface.text.ITextOperationTarget;
import org.eclipse.jface.text.ITextViewer;
import org.eclipse.jface.text.ITextViewerExtension;
import org.eclipse.jface.text.TextEvent;
import org.eclipse.jface.text.contentassist.ContentAssistant;
import org.eclipse.jface.text.contentassist.IContentAssistProcessor;

View file

@ -5,7 +5,6 @@ package org.eclipse.cdt.internal.ui.text;
* All Rights Reserved.
*/
import org.eclipse.cdt.internal.ui.text.eclipse2.Token;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@ -20,6 +19,7 @@ import org.eclipse.jface.text.TextAttribute;
import org.eclipse.jface.text.rules.BufferedRuleBasedScanner;
import org.eclipse.jface.text.rules.IRule;
import org.eclipse.jface.text.rules.IToken;
import org.eclipse.jface.text.rules.Token;
import org.eclipse.jface.util.PropertyChangeEvent;

View file

@ -6,7 +6,6 @@ package org.eclipse.cdt.internal.ui.text;
*/
import org.eclipse.cdt.internal.ui.text.eclipse2.Token;
import org.eclipse.cdt.internal.ui.text.util.CWordDetector;
import java.util.ArrayList;
import java.util.HashMap;
@ -20,6 +19,7 @@ import org.eclipse.jface.text.rules.IToken;
import org.eclipse.jface.text.rules.IWordDetector;
import org.eclipse.jface.text.rules.PatternRule;
import org.eclipse.jface.text.rules.SingleLineRule;
import org.eclipse.jface.text.rules.Token;
import org.eclipse.jface.util.Assert;
import org.eclipse.jface.util.PropertyChangeEvent;

View file

@ -6,10 +6,11 @@ package org.eclipse.cdt.internal.ui.text;
*/
import org.eclipse.cdt.internal.ui.text.eclipse2.Token;
import org.eclipse.jface.text.rules.ICharacterScanner;
import org.eclipse.jface.text.rules.IRule;
import org.eclipse.jface.text.rules.IToken;
import org.eclipse.jface.text.rules.Token;
import org.eclipse.jface.util.Assert;

View file

@ -5,7 +5,6 @@ package org.eclipse.cdt.internal.ui.text;
* All Rights Reserved.
*/
import org.eclipse.cdt.internal.ui.text.eclipse2.Token;
import org.eclipse.cdt.internal.ui.text.util.CWordDetector;
import java.util.ArrayList;
import java.util.HashMap;
@ -19,6 +18,7 @@ import org.eclipse.jface.text.rules.IToken;
import org.eclipse.jface.text.rules.IWordDetector;
import org.eclipse.jface.text.rules.PatternRule;
import org.eclipse.jface.text.rules.SingleLineRule;
import org.eclipse.jface.text.rules.Token;
import org.eclipse.jface.util.Assert;
import org.eclipse.jface.util.PropertyChangeEvent;

View file

@ -5,11 +5,11 @@ package org.eclipse.cdt.internal.ui.text;
* All Rights Reserved.
*/
import org.eclipse.cdt.internal.ui.text.eclipse2.Token;
import java.util.List;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.rules.IToken;
import org.eclipse.jface.text.rules.Token;
/**

View file

@ -16,6 +16,7 @@ import org.eclipse.jface.text.DocumentEvent;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IDocumentListener;
import org.eclipse.jface.text.IDocumentPartitioningListener;
import org.eclipse.jface.text.IDocumentPartitioningListenerExtension;
import org.eclipse.jface.text.IPositionUpdater;
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.ITextInputListener;

View file

@ -19,6 +19,7 @@ import org.eclipse.jface.text.presentation.IPresentationDamager;
import org.eclipse.jface.text.presentation.IPresentationRepairer;
import org.eclipse.jface.text.rules.IToken;
import org.eclipse.jface.text.rules.RuleBasedScanner;
import org.eclipse.jface.text.rules.Token;
import org.eclipse.jface.util.Assert;

View file

@ -14,6 +14,7 @@ import org.eclipse.jface.text.DefaultPositionUpdater;
import org.eclipse.jface.text.DocumentEvent;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IDocumentPartitioner;
import org.eclipse.jface.text.IDocumentPartitionerExtension;
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.ITypedRegion;
import org.eclipse.jface.text.Position;

View file

@ -1,57 +0,0 @@
package org.eclipse.cdt.internal.ui.text.eclipse2;
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IDocumentListener;
/**
* For internal use only. Not API. <p>
* A document extension is for extending
* <code>IDocument</code> instances with new functionality.
*/
public interface IDocumentExtension {
/**
* Interface for a post notification document change.
*/
interface IReplace {
/**
* Executes the replace operation of the given document.
* @param document the document to be changed
* @param owner the owner of this replace object
*/
void perform(IDocument document, IDocumentListener owner);
};
/**
* Callback for document listeners to achieve a post notification
* change of the document notifying them.
*
* @param owner the owner of the replace object
* @param the replace to be executed
* @exception UnsupportedOperationException if <code>registerPostNotificationReplace</code>
* is not supported by this document
*/
void registerPostNotificationReplace(IDocumentListener owner, IReplace replace) throws UnsupportedOperationException;
/**
* Stops the processing of registered post notification replaces until
* <code>resumePostNotificationProcessing</code> is called.
*/
void stopPostNotificationProcessing();
/**
* Resumes the processing of post notification replaces. If the queue of registered
* <code>IReplace</code> objects is not empty, they are immediately processed
* if the document is not inside a replace operation or directly after the replace
* operation otherwise.
*/
void resumePostNotificationProcessing();
}

View file

@ -1,34 +0,0 @@
package org.eclipse.cdt.internal.ui.text.eclipse2;
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
import org.eclipse.jface.text.DocumentEvent;
import org.eclipse.jface.text.IRegion;
/**
* For internal use only. Not API. <p>
* A document partitioner extension is for extending
* <code>IDocumentPartitioner</code> instances with new
* or revised functionality.
*/
public interface IDocumentPartitionerExtension {
/**
* The document has been changed. The partitioner updates
* the document's partitioning and returns in which region the
* partition type has been changed. This method always returns
* the surrounding region. Will be called by the connected document
* and is not intended to be used by clients other than the connected
* document.
*
* @param event the event describing the document change
* @return the region of the document in which the partition type changed
*/
IRegion documentChanged2(DocumentEvent event);
}

View file

@ -1,31 +0,0 @@
package org.eclipse.cdt.internal.ui.text.eclipse2;
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IRegion;
/**
* For internal use only. Not API. <p>
* A document partitioning listener extension is for extending
* <code>IDocumentPartitioningListener</code> instances with new
* or revised functionality.
*/
public interface IDocumentPartitioningListenerExtension {
/**
* The partitioning of the given document changed in the given range.
*
* @param document the document whose partitioning changed
* @param region the range in which the partition type changed
*
* @see IDocument#addDocumentPartitioningListener
*/
void documentPartitioningChanged(IDocument document, IRegion region);
}

View file

@ -1,52 +0,0 @@
package org.eclipse.cdt.internal.ui.text.eclipse2;
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
import org.eclipse.swt.custom.VerifyKeyListener;
/**
* A text viewer extension is for extending
* <code>ITextViewer</code> instances with new functionality.
*/
public interface ITextViewerExtension {
/*
* All subsequent methods dealing with verify key listeners
* are indended to allow clients a fine grained management of
* key event consumption. Will be merged/ will replace
* the event consumer mechanism available on ITextViewer.
*/
/**
* Inserts the verify key listener at the beginning of the viewer's
* list of verify key listeners. If the listener is already registered
* with the viewer this call moves the listener to the beginnng of
* the list.
*
* @param listener the listener to be inserted
*/
void prependVerifyKeyListener(VerifyKeyListener listener);
/**
* Appends a verify key listener to the viewer's list of verify
* key listeners. If the listener is already registered with the viewer
* this call moves the listener to the end of the list.
*
* @param listener the listener to be added
*/
void appendVerifyKeyListener(VerifyKeyListener listener);
/**
* Removes the verify key listener from the viewer's list of verify key listeners.
* If the listener is not registered with this viewer, this call has no effect.
*
* @param listener the listener to be removed
*/
void removeVerifyKeyListener(VerifyKeyListener listener);
}

View file

@ -1,113 +0,0 @@
package org.eclipse.cdt.internal.ui.text.eclipse2;
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
import org.eclipse.jface.text.rules.IToken;
import org.eclipse.jface.util.Assert;
/**
* Standard implementation of <code>IToken</code>.
*/
public class Token implements IToken {
private static final int T_UNDEFINED= 0;
private static final int T_EOF= 1;
private static final int T_WHITESPACE= 2;
private static final int T_OTHER= 3;
/**
* Standard undefined token
*/
public static final IToken UNDEFINED= new Token(T_UNDEFINED);
/**
* Standard End Of File token
*/
public static final IToken EOF= new Token(T_EOF);
/**
* Standard whitespace token
*/
public static final IToken WHITESPACE= new Token(T_WHITESPACE);
/**
* Standard token neither undefine, whitespace, nor whitespace
* @deprecated will be removed
*/
public static final IToken OTHER= new Token(T_OTHER);
private int fType;
private Object fData;
/**
* Creates a new token according to the given specification which does not
* have any data attached to it.
*
* @param type the type of the token
*/
private Token(int type) {
fType= type;
fData= null;
}
/**
* Creates a new token which represents neither undefined, whitespace, nor EOF.
* The newly created token has the given data attached to it.
*
* @param data the data attached to the newly created token
*/
public Token(Object data) {
fType= T_OTHER;
fData= data;
}
/**
* Reinitializes the data of this token. The token may not represent
* undefined, whitepsace, or EOF.
*
* @param the data to be attached to the token
*/
public void setData(Object data) {
Assert.isTrue(isOther());
fData= data;
}
/*
* @see IToken#getData()
*/
public Object getData() {
return fData;
}
/*
* @see IToken#isOther()
*/
public boolean isOther() {
return (fType == T_OTHER);
}
/*
* @see IToken#isEOF()
*/
public boolean isEOF() {
return (fType == T_EOF);
}
/*
* @see IToken#isWhitespace()
*/
public boolean isWhitespace() {
return (fType == T_WHITESPACE);
}
/*
* @see IToken#isUndefined()
*/
public boolean isUndefined() {
return (fType == T_UNDEFINED);
}
}

View file

@ -6,7 +6,6 @@ package org.eclipse.cdt.internal.ui.text.link;
*/
import org.eclipse.cdt.internal.ui.CPlugin;
import org.eclipse.cdt.internal.ui.text.eclipse2.IDocumentExtension;
import java.util.Arrays;
import java.util.Comparator;
import java.util.HashMap;
@ -16,6 +15,7 @@ import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.BadPositionCategoryException;
import org.eclipse.jface.text.DocumentEvent;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IDocumentExtension;
import org.eclipse.jface.text.IDocumentListener;
import org.eclipse.jface.text.IPositionUpdater;
import org.eclipse.jface.text.Position;

View file

@ -23,7 +23,6 @@ import org.eclipse.swt.widgets.Shell;
import org.eclipse.cdt.internal.ui.CPlugin;
import org.eclipse.cdt.internal.ui.editor.CEditor;
import org.eclipse.cdt.internal.ui.text.eclipse2.ITextViewerExtension;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.preference.PreferenceConverter;
@ -35,6 +34,7 @@ import org.eclipse.jface.text.IPositionUpdater;
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.ITextInputListener;
import org.eclipse.jface.text.ITextViewer;
import org.eclipse.jface.text.ITextViewerExtension;
import org.eclipse.jface.text.Position;
import org.eclipse.jface.text.Region;
import org.eclipse.jface.util.Assert;