Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
@Deprecated
public abstract class AbstractControlContentAssistSubjectAdapter implements IContentAssistSubjectControl {

@Deprecated
protected static final boolean DEBUG= "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.jface.text/debug/ContentAssistSubjectAdapters")); //$NON-NLS-1$//$NON-NLS-2$

/**
Expand Down Expand Up @@ -87,14 +88,17 @@ public abstract class AbstractControlContentAssistSubjectAdapter implements ICon
/**
* Creates a new {@link AbstractControlContentAssistSubjectAdapter}.
*/
@Deprecated
public AbstractControlContentAssistSubjectAdapter() {
fVerifyKeyListeners= new ArrayList<>(1);
fKeyListeners= new HashSet<>(1);
}

@Deprecated
@Override
public abstract Control getControl();

@Deprecated
@Override
public void addKeyListener(KeyListener keyListener) {
fKeyListeners.add(keyListener);
Expand All @@ -106,6 +110,7 @@ public void addKeyListener(KeyListener keyListener) {
installControlListener();
}

@Deprecated
@Override
public void removeKeyListener(KeyListener keyListener) {
boolean deleted= fKeyListeners.remove(keyListener);
Expand All @@ -120,11 +125,13 @@ public void removeKeyListener(KeyListener keyListener) {
uninstallControlListener();
}

@Deprecated
@Override
public boolean supportsVerifyKeyListener() {
return true;
}

@Deprecated
@Override
public boolean appendVerifyKeyListener(final VerifyKeyListener verifyKeyListener) {
fVerifyKeyListeners.add(verifyKeyListener);
Expand All @@ -137,6 +144,7 @@ public boolean appendVerifyKeyListener(final VerifyKeyListener verifyKeyListener
return true;
}

@Deprecated
@Override
public boolean prependVerifyKeyListener(final VerifyKeyListener verifyKeyListener) {
fVerifyKeyListeners.add(0, verifyKeyListener);
Expand All @@ -149,6 +157,7 @@ public boolean prependVerifyKeyListener(final VerifyKeyListener verifyKeyListene
return true;
}

@Deprecated
@Override
public void removeVerifyKeyListener(VerifyKeyListener verifyKeyListener) {
fVerifyKeyListeners.remove(verifyKeyListener);
Expand All @@ -160,6 +169,7 @@ public void removeVerifyKeyListener(VerifyKeyListener verifyKeyListener) {
uninstallControlListener();
}

@Deprecated
@Override
public void setEventConsumer(IEventConsumer eventConsumer) {
// this is not supported
Expand All @@ -168,6 +178,7 @@ public void setEventConsumer(IEventConsumer eventConsumer) {
}
}

@Deprecated
@Override
public String getLineDelimiter() {
return System.lineSeparator();
Expand Down Expand Up @@ -329,6 +340,7 @@ private void uninstallControlListener() {
* @param labelProvider a {@link ILabelProvider}, or <code>null</code>
* if no visual feedback should be shown
*/
@Deprecated
public void setContentAssistCueProvider(final ILabelProvider labelProvider) {
if (fCueLabelProvider != null) {
fCueLabelProvider.dispose();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,27 +88,32 @@ public void replace(int pos, int length, String text) throws BadLocationExceptio
*
* @param combo the combo to adapt
*/
@Deprecated
public ComboContentAssistSubjectAdapter(Combo combo) {
Assert.isNotNull(combo);
fCombo= combo;
fModifyListeners= new HashMap<>();
}

@Deprecated
@Override
public Control getControl() {
return fCombo;
}

@Deprecated
@Override
public int getLineHeight() {
return fCombo.getTextHeight();
}

@Deprecated
@Override
public int getCaretOffset() {
return fCombo.getCaretPosition();
}

@Deprecated
@Override
public Point getLocationAtOffset(int offset) {
String comboString= fCombo.getText();
Expand All @@ -124,16 +129,19 @@ public Point getLocationAtOffset(int offset) {
return new Point(x, fCombo.getClientArea().y);
}

@Deprecated
@Override
public Point getWidgetSelectionRange() {
return new Point(fCombo.getSelection().x, Math.abs(fCombo.getSelection().y - fCombo.getSelection().x));
}

@Deprecated
@Override
public Point getSelectedRange() {
return new Point(fCombo.getSelection().x, Math.abs(fCombo.getSelection().y - fCombo.getSelection().x));
}

@Deprecated
@Override
public IDocument getDocument() {
IDocument document= (IDocument)fCombo.getData("document"); //$NON-NLS-1$
Expand All @@ -144,17 +152,20 @@ public IDocument getDocument() {
return document;
}

@Deprecated
@Override
public void setSelectedRange(int i, int j) {
fCombo.setSelection(new Point(i, i+j));
}

@Deprecated
@Override
public void revealRange(int i, int j) {
// XXX: this should be improved
fCombo.setSelection(new Point(i, i+j));
}

@Deprecated
@Override
public boolean addSelectionListener(final SelectionListener selectionListener) {
fCombo.addSelectionListener(selectionListener);
Expand All @@ -164,6 +175,7 @@ public boolean addSelectionListener(final SelectionListener selectionListener) {
return true;
}

@Deprecated
@Override
public void removeSelectionListener(SelectionListener selectionListener) {
fCombo.removeSelectionListener(selectionListener);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public interface ISubjectControlContentAssistProcessor extends IContentAssistPro
* @return an array of completion proposals or <code>null</code> if no
* proposals are possible
*/
@Deprecated
ICompletionProposal[] computeCompletionProposals(IContentAssistSubjectControl contentAssistSubjectControl, int documentOffset);

/**
Expand All @@ -55,5 +56,6 @@ public interface ISubjectControlContentAssistProcessor extends IContentAssistPro
* @return an array of context information objects or <code>null</code>
* if no context could be found
*/
@Deprecated
IContextInformation[] computeContextInformation(IContentAssistSubjectControl contentAssistSubjectControl, int documentOffset);
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,6 @@ public interface ISubjectControlContentAssistant extends IContentAssistant {
*
* @param contentAssistSubjectControl the one who requests content assist
*/
@Deprecated
void install(IContentAssistSubjectControl contentAssistSubjectControl);
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,6 @@ public interface ISubjectControlContextInformationPresenter extends IContextInfo
* @param contentAssistSubjectControl the content assist subject control
* @param offset the document offset for which the information has been computed
*/
@Deprecated
void install(IContextInformation info, IContentAssistSubjectControl contentAssistSubjectControl, int offset);
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@ public interface ISubjectControlContextInformationValidator extends IContextInfo
* @param offset the document offset for which the information
* has been computed
*/
@Deprecated
void install(IContextInformation info, IContentAssistSubjectControl contentAssistSubjectControl, int offset);
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
@Deprecated
public class SubjectControlContentAssistant extends org.eclipse.jface.text.contentassist.ContentAssistant implements ISubjectControlContentAssistant {

@Deprecated
@Override
public void install(IContentAssistSubjectControl contentAssistSubjectControl) {
Assert.isNotNull(contentAssistSubjectControl);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,25 @@ public final class SubjectControlContextInformationValidator implements ISubject
*
* @param processor the processor to be used for validation
*/
@Deprecated
public SubjectControlContextInformationValidator(IContentAssistProcessor processor) {
fProcessor= processor;
}

@Deprecated
@Override
public void install(IContextInformation contextInformation, ITextViewer viewer, int offset) {
throw new UnsupportedOperationException();
}

@Deprecated
@Override
public void install(IContextInformation contextInformation, IContentAssistSubjectControl contentAssistSubjectControl, int offset) {
fContextInformation= contextInformation;
fContentAssistSubjectControl= contentAssistSubjectControl;
}

@Deprecated
@Override
public boolean isContextInformationValid(int offset) {
if (fContentAssistSubjectControl != null && fProcessor instanceof ISubjectControlContentAssistProcessor) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,26 +77,31 @@ public void replace(int pos, int length, String text) throws BadLocationExceptio
*
* @param text the text widget to adapt
*/
@Deprecated
public TextContentAssistSubjectAdapter(Text text) {
Assert.isNotNull(text);
fText= text;
}

@Deprecated
@Override
public Control getControl() {
return fText;
}

@Deprecated
@Override
public int getLineHeight() {
return fText.getLineHeight();
}

@Deprecated
@Override
public int getCaretOffset() {
return fText.getCaretPosition();
}

@Deprecated
@Override
public Point getLocationAtOffset(int offset) {
Point caretLocation= fText.getCaretLocation();
Expand All @@ -107,16 +112,19 @@ public Point getLocationAtOffset(int offset) {
return caretLocation;
}

@Deprecated
@Override
public Point getWidgetSelectionRange() {
return new Point(fText.getSelection().x, Math.abs(fText.getSelection().y - fText.getSelection().x));
}

@Deprecated
@Override
public Point getSelectedRange() {
return new Point(fText.getSelection().x, Math.abs(fText.getSelection().y - fText.getSelection().x));
}

@Deprecated
@Override
public IDocument getDocument() {
IDocument document= (IDocument)fText.getData("document"); //$NON-NLS-1$
Expand All @@ -127,17 +135,20 @@ public IDocument getDocument() {
return document;
}

@Deprecated
@Override
public void setSelectedRange(int i, int j) {
fText.setSelection(new Point(i, i+j));
}

@Deprecated
@Override
public void revealRange(int i, int j) {
// XXX: this should be improved
fText.setSelection(new Point(i, i+j));
}

@Deprecated
@Override
public boolean addSelectionListener(final SelectionListener selectionListener) {
fText.addSelectionListener(selectionListener);
Expand All @@ -147,6 +158,7 @@ public boolean addSelectionListener(final SelectionListener selectionListener) {
return true;
}

@Deprecated
@Override
public void removeSelectionListener(SelectionListener selectionListener) {
fText.removeSelectionListener(selectionListener);
Expand Down
Loading
Loading