當前位置: 首頁>>代碼示例>>Java>>正文


Java ContentAssistant.setProposalSelectorBackground方法代碼示例

本文整理匯總了Java中org.eclipse.jface.text.contentassist.ContentAssistant.setProposalSelectorBackground方法的典型用法代碼示例。如果您正苦於以下問題:Java ContentAssistant.setProposalSelectorBackground方法的具體用法?Java ContentAssistant.setProposalSelectorBackground怎麽用?Java ContentAssistant.setProposalSelectorBackground使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.eclipse.jface.text.contentassist.ContentAssistant的用法示例。


在下文中一共展示了ContentAssistant.setProposalSelectorBackground方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getContentAssistant

import org.eclipse.jface.text.contentassist.ContentAssistant; //導入方法依賴的package包/類
@Override
public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
	ContentAssistant assistant = new ContentAssistant();
	IContentAssistProcessor processor = new EiffelContentAssistantProcessor();
	assistant.setContentAssistProcessor(processor, IDocument.DEFAULT_CONTENT_TYPE);
	assistant.setInformationControlCreator(getInformationControlCreator(sourceViewer));
	
	assistant.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));
	assistant.setContentAssistProcessor(new EiffelContentAssistantProcessor(),
			IDocument.DEFAULT_CONTENT_TYPE);
	
	assistant.setAutoActivationDelay(100);
	assistant.enableAutoActivation(true);
	assistant.enableAutoInsert(true);
	
	assistant.setProposalSelectorBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
	
	return assistant;
}
 
開發者ID:Imhotup,項目名稱:LibertyEiffel-Eclipse-Plugin,代碼行數:20,代碼來源:EiffelSourceViewerConfiguration.java

示例2: getContentAssistant

import org.eclipse.jface.text.contentassist.ContentAssistant; //導入方法依賴的package包/類
@Override
public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
	ContentAssistant assistant = new ContentAssistant();
	
	assistant.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));
	assistant.setContentAssistProcessor(new EiffelContentAssistantProcessor(),
			IDocument.DEFAULT_CONTENT_TYPE);
	
	assistant.setAutoActivationDelay(0);
	assistant.enableAutoActivation(true);
	
	assistant.setProposalSelectorBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
	
	return assistant;
}
 
開發者ID:Imhotup,項目名稱:LibertyEiffel-Eclipse-Plugin,代碼行數:16,代碼來源:EiffelSourceViewerConfiguration.java

示例3: getContentAssistant

import org.eclipse.jface.text.contentassist.ContentAssistant; //導入方法依賴的package包/類
public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
	ContentAssistant assistant = new ContentAssistant();
	IContentAssistProcessor nclCompletionProcessor = new NCLCompletionProposal();
	assistant
			.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));

	// set nclCompletionProposal to XML_START_TAG
	assistant.setContentAssistProcessor(nclCompletionProcessor,
			XMLPartitionScanner.XML_START_TAG);
	assistant.setContentAssistProcessor(nclCompletionProcessor,
			XMLPartitionScanner.XML_END_TAG);
	// set nclCompletionProposal to DEFAULT_CONTENT
	assistant.setContentAssistProcessor(nclCompletionProcessor,
			IDocument.DEFAULT_CONTENT_TYPE);

	assistant
			.setContextInformationPopupOrientation(IContentAssistant.CONTEXT_INFO_ABOVE);
	assistant
			.setInformationControlCreator(getInformationControlCreator(sourceViewer));
	// Enable AutoActivation
	assistant.enableAutoActivation(true);
	assistant.setAutoActivationDelay(500);

	Color bgColor = colorManager.getColor(new RGB(255, 255, 255));
	assistant.setProposalSelectorBackground(bgColor);
	return assistant;
}
 
開發者ID:ncleclipse,項目名稱:ncl30-eclipse,代碼行數:28,代碼來源:NCLConfiguration.java

示例4: getContentAssistant

import org.eclipse.jface.text.contentassist.ContentAssistant; //導入方法依賴的package包/類
public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {

		IPreferenceStore store= JavaScriptPlugin.getDefault().getPreferenceStore();
		JavaScriptTextTools textTools= JavaScriptPlugin.getDefault().getJavaTextTools();
		IColorManager manager= textTools.getColorManager();					
		

		ContentAssistant assistant= new ContentAssistant();
		assistant.setContentAssistProcessor(fProcessor, IDocument.DEFAULT_CONTENT_TYPE);
			// Register the same processor for strings and single line comments to get code completion at the start of those partitions.
		assistant.setContentAssistProcessor(fProcessor, IJavaScriptPartitions.JAVA_STRING);
		assistant.setContentAssistProcessor(fProcessor, IJavaScriptPartitions.JAVA_CHARACTER);
		assistant.setContentAssistProcessor(fProcessor, IJavaScriptPartitions.JAVA_SINGLE_LINE_COMMENT);
		assistant.setContentAssistProcessor(fProcessor, IJavaScriptPartitions.JAVA_MULTI_LINE_COMMENT);
		assistant.setContentAssistProcessor(fProcessor, IJavaScriptPartitions.JAVASCRIPT_TEMPLATE_LITERAL);
		assistant.setContentAssistProcessor(fProcessor, IJavaScriptPartitions.JAVA_DOC);

		assistant.enableAutoInsert(store.getBoolean(PreferenceConstants.CODEASSIST_AUTOINSERT));
		assistant.enableAutoActivation(store.getBoolean(PreferenceConstants.CODEASSIST_AUTOACTIVATION));
		assistant.setAutoActivationDelay(store.getInt(PreferenceConstants.CODEASSIST_AUTOACTIVATION_DELAY));
		assistant.setProposalPopupOrientation(IContentAssistant.PROPOSAL_OVERLAY);
		assistant.setContextInformationPopupOrientation(IContentAssistant.CONTEXT_INFO_ABOVE);
		assistant.setInformationControlCreator(new IInformationControlCreator() {
			public IInformationControl createInformationControl(Shell parent) {
				return new DefaultInformationControl(parent, SWT.NONE, new HTMLTextPresenter(true));
			}
		});

		Color background= getColor(store, PreferenceConstants.CODEASSIST_PROPOSALS_BACKGROUND, manager);			
		assistant.setContextInformationPopupBackground(background);
		assistant.setContextSelectorBackground(background);
		assistant.setProposalSelectorBackground(background);

		Color foreground= getColor(store, PreferenceConstants.CODEASSIST_PROPOSALS_FOREGROUND, manager);
		assistant.setContextInformationPopupForeground(foreground);
		assistant.setContextSelectorForeground(foreground);
		assistant.setProposalSelectorForeground(foreground);
		
		return assistant;
	}
 
開發者ID:angelozerr,項目名稱:typescript.java,代碼行數:41,代碼來源:CodeTemplateSourceViewerConfiguration.java

示例5: getContentAssistant

import org.eclipse.jface.text.contentassist.ContentAssistant; //導入方法依賴的package包/類
/**
 * Setup the content assistant (provides suggestions to complete code) and 
 * the PopupManager (helps users edit parameters for function calls)
 */
/* Override */
public IContentAssistant getContentAssistant( ISourceViewer sourceViewer )
{
   // Setup the content assistant
   ContentAssistant assistant = new ContentAssistant();
         
   assistant.setContentAssistProcessor(
      new TrafficScriptAssistantProcessor( editor ), 
      IDocument.DEFAULT_CONTENT_TYPE
   
   );
   
   ColourManager colourManager = ZXTMPlugin.getDefault().getColourManager();
   
   assistant.setProposalSelectorBackground( colourManager.getColour( Colour.TS_ASSIST_BG ) );
   assistant.enableAutoActivation( true );
   assistant.setAutoActivationDelay( 300 );
   assistant.setProposalPopupOrientation( IContentAssistant.PROPOSAL_STACKED );
   assistant.setContextInformationPopupOrientation( IContentAssistant.CONTEXT_INFO_ABOVE );

   // For info boxes when you select an option
   assistant.setInformationControlCreator( createInfoControlPresenter() );
   
   editor.setAssistant( assistant );
   
   // Setup the pop-up manager
   new PopupManager( editor );
   
   return assistant;
}
 
開發者ID:brocade,項目名稱:vTM-eclipse,代碼行數:35,代碼來源:TrafficScriptConf.java


注:本文中的org.eclipse.jface.text.contentassist.ContentAssistant.setProposalSelectorBackground方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。