Java 类org.eclipse.ui.fieldassist.ContentAssistCommandAdapter 实例源码
项目:eclipsensis
文件:NSISCommandView.java
private void createFilterContentAssist(Combo filterCombo, Label helpLabel)
{
// Create the find content assist field
ComboContentAdapter contentAdapter= new ComboContentAdapter();
FindReplaceDocumentAdapterContentProposalProvider findProposer= new FindReplaceDocumentAdapterContentProposalProvider(true);
mContentAssistFindField = new ContentAssistCommandAdapter(
filterCombo,
contentAdapter,
findProposer,
null,
new char[] {'\\', '[', '('},
true);
mContentAssistFindField.setEnabled(false);
GridData gd= (GridData)filterCombo.getLayoutData();
FieldDecoration dec= FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_CONTENT_PROPOSAL);
Rectangle bounds = dec.getImage().getBounds();
gd.horizontalIndent= bounds.width;
((GridData)helpLabel.getLayoutData()).horizontalIndent = bounds.width;
}
项目:eclipse-extras
文件:DynamicWorkingSetPage.java
private void installPatternContentAssist() {
ContentProposalAdapter contentAssist = new ContentAssistCommandAdapter(
patternText,
new TextContentAdapter(),
new FindReplaceDocumentAdapterContentProposalProvider( true ),
CONTENT_ASSIST_PROPOSALS,
new char[]{ '\\', '[', '(' },
true );
contentAssist.setEnabled( true );
}
项目:EasyShell
文件:CommandDataDialog.java
private ContentProposalAdapter addContentAssistExtended(Text textControl) {
char[] autoActivationCharacters = new char[] { '$', '{' };
Map<String, String> proposals = new LinkedHashMap<String, String>();
// add own variables
proposals.putAll(Variable.getVariableInfoMap());
// add eclipse variables
proposals.putAll(Variable.getEclipseVariableInfoMap());
ContentAssistCommandAdapter adapter = new ContentAssistCommandAdapter(textControl, new CommandVariableContentAdapter(),
new CommandVariableContentProposalProvider(proposals), null,
autoActivationCharacters, true);
adapter.setPropagateKeys(false);
adapter.setFilterStyle(ContentProposalAdapter.FILTER_NONE);
return adapter;
}
项目:EasyShell
文件:MenuDataDialog.java
private ContentProposalAdapter addContentAssistExtended(Text textControl) {
char[] autoActivationCharacters = new char[] { '$', '{' };
Map<String, String> proposals = new LinkedHashMap<String, String>();
// add internal variables
proposals.putAll(Variable.getInternalVariableInfoMap());
ContentAssistCommandAdapter adapter = new ContentAssistCommandAdapter(textControl, new CommandVariableContentAdapter(),
new CommandVariableContentProposalProvider(proposals), null,
autoActivationCharacters, true);
adapter.setPropagateKeys(false);
adapter.setFilterStyle(ContentProposalAdapter.FILTER_NONE);
return adapter;
}
项目:GrayTin
文件:SDKBundleUpdatePreferencePage.java
@Override
protected void createControl(Composite parent) {
super.createControl(parent);
new ContentAssistCommandAdapter(getTextControl(), new TextContentAdapter(), this, null, null, true);
}