Java Code Examples for org.eclipse.jface.text.contentassist.IContentAssistantExtension2#setStatusLineVisible()

The following examples show how to use org.eclipse.jface.text.contentassist.IContentAssistantExtension2#setStatusLineVisible() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ContentAssistProcessor.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 6 votes vote down vote up
public void assistSessionEnded(ContentAssistEvent event) {
	if (event.processor != ContentAssistProcessor.this)
		return;

	for (CompletionProposalCategory cat : getCategoriesToNotify()) {
		cat.sessionEnded();
	}

	fCategoryIteration= null;
	fRepetition= -1;
	fIterationGesture= null;
	if (event.assistant instanceof IContentAssistantExtension2) {
		IContentAssistantExtension2 extension= (IContentAssistantExtension2) event.assistant;
		extension.setShowEmptyList(false);
		extension.setRepeatedInvocationMode(false);
		extension.setStatusLineVisible(false);
		if (extension instanceof IContentAssistantExtension3) {
			IContentAssistantExtension3 ext3= (IContentAssistantExtension3) extension;
			((ContentAssistant) ext3).setRepeatedInvocationTrigger(null);
		}
	}
}
 
Example 2
Source File: ContentAssistProcessor.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
public void assistSessionStarted(ContentAssistEvent event) {
	if (event.processor != ContentAssistProcessor.this)
		return;

	fIterationGesture= getIterationGesture();
	KeySequence binding= getIterationBinding();

	// This may show the warning dialog if all categories are disabled
	setCategoryIteration();
	for (CompletionProposalCategory cat : getCategoriesToNotify()) {
		cat.sessionStarted();
	}

	fRepetition= 0;
	if (event.assistant instanceof IContentAssistantExtension2) {
		IContentAssistantExtension2 extension= (IContentAssistantExtension2) event.assistant;

		if (fCategoryIteration.size() == 1) {
			extension.setRepeatedInvocationMode(false);
			extension.setShowEmptyList(false);
		} else {
			extension.setRepeatedInvocationMode(true);
			extension.setStatusLineVisible(true);
			extension.setStatusMessage(createIterationMessage());
			extension.setShowEmptyList(true);
			if (extension instanceof IContentAssistantExtension3) {
				IContentAssistantExtension3 ext3= (IContentAssistantExtension3) extension;
				((ContentAssistant) ext3).setRepeatedInvocationTrigger(binding);
			}
		}

	}
}
 
Example 3
Source File: LangContentAssistProcessor.java    From goclipse with Eclipse Public License 1.0 5 votes vote down vote up
protected void setRepeatedModeStatus(IContentAssistantExtension2 caExt2, boolean enabled, KeySequence binding) {
	caExt2.setShowEmptyList(enabled);
	
	caExt2.setRepeatedInvocationMode(enabled);
	caExt2.setStatusLineVisible(enabled);
	if(enabled) {
		caExt2.setStatusMessage(createIterationMessage());
	}
	if (caExt2 instanceof IContentAssistantExtension3) {
		IContentAssistantExtension3 ext3 = (IContentAssistantExtension3) caExt2;
		ext3.setRepeatedInvocationTrigger(binding);
	}
}