blob: 5b94857c079ad6de4b0b0130f8986f661983a9b6 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2016 Red Hat Inc. and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* - Mickael Istria (Red Hat Inc.)
*******************************************************************************/
package org.eclipse.ui.genericeditor.tests.contributions;
import org.eclipse.jface.text.ITextViewer;
import org.eclipse.jface.text.contentassist.ICompletionProposal;
public class LongRunningBarContentAssistProcessor extends BarContentAssistProcessor {
public static final String PROPOSAL = "bars are also good for soft drink cocktails.";
public static final int DELAY = 2000;
public LongRunningBarContentAssistProcessor() {
super(PROPOSAL);
}
@Override
public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int offset) {
try {
Thread.sleep(DELAY);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return super.computeCompletionProposals(viewer, offset);
}
}