Java Code Examples for org.eclipse.jface.text.IEditingSupportRegistry#unregister()

The following examples show how to use org.eclipse.jface.text.IEditingSupportRegistry#unregister() . 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: RenameLinkedMode.java    From xtext-eclipse with Eclipse Public License 2.0 6 votes vote down vote up
/**
 * PopUp gets closed and the focus goes back to the editor. Linked mode stays active and can be reenabled, i.e. by
 * putting the caret back into a linked editing position.
 */
public void linkedModeLeft() {
	if (linkedModeModel != null) {
		linkedModeModel.exit(ILinkedModeListener.NONE);
	}
	if (popup != null) {
		popup.close();
	}

	if (editor != null) {
		ISourceViewer viewer = editor.getInternalSourceViewer();
		if (viewer instanceof IEditingSupportRegistry) {
			IEditingSupportRegistry registry = (IEditingSupportRegistry) viewer;
			registry.unregister(focusEditingSupport);
		}
	}
}
 
Example 2
Source File: CompletionProposalPopup.java    From APICloud-Studio with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Hides this popup.
 */
public void hide()
{
	bufferString = "";
	selectedProposal = null;
	fLastKeyPressed = '\0';
	unregister();

	if (fViewer instanceof IEditingSupportRegistry)
	{
		IEditingSupportRegistry registry = (IEditingSupportRegistry) fViewer;
		registry.unregister(fFocusHelper);
	}

	if (Helper.okToUse(fProposalShell))
	{
		fContentAssistant.removeContentAssistListener(this, ContentAssistant.PROPOSAL_SELECTOR);
		// TISTUD-913: moved the 'fPopupCloser.uninstall();' to disposePopup()
		if (fAdditionalInfoController != null)
		{
			fAdditionalInfoController.disposeInformationControl();
		}

		if (Helper.okToUse(fProposalTable))
		{
			fProposalTable.removeAll();
			fProposalTable.update();
		}
                       // TISTUD-1550: Call to dispose, instead of fProposalShell.setVisible(false);
		fProposalShell.setVisible(false);
	}
	}
 
Example 3
Source File: RenameLinkedMode.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
private void linkedModeLeft() {
	fgActiveLinkedMode= null;
	if (fInfoPopup != null) {
		fInfoPopup.close();
	}

	ISourceViewer viewer= fEditor.getViewer();
	if (viewer instanceof IEditingSupportRegistry) {
		IEditingSupportRegistry registry= (IEditingSupportRegistry) viewer;
		registry.unregister(fFocusEditingSupport);
	}
}
 
Example 4
Source File: OrganizeImportsAction.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
private void deregisterHelper(IEditingSupport helper, JavaEditor editor) {
	ISourceViewer viewer= editor.getViewer();
	if (viewer instanceof IEditingSupportRegistry) {
		IEditingSupportRegistry registry= (IEditingSupportRegistry) viewer;
		registry.unregister(helper);
	}
}
 
Example 5
Source File: AddImportOnSelectionAction.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
private void deregisterHelper(IEditingSupport helper) {
	ISourceViewer viewer= fEditor.getViewer();
	if (viewer instanceof IEditingSupportRegistry) {
		IEditingSupportRegistry registry= (IEditingSupportRegistry) viewer;
		registry.unregister(helper);
	}
}