本文整理汇总了Java中org.eclipse.jdt.internal.ui.refactoring.contentassist.JavaTypeCompletionProcessor.setPackageFragment方法的典型用法代码示例。如果您正苦于以下问题:Java JavaTypeCompletionProcessor.setPackageFragment方法的具体用法?Java JavaTypeCompletionProcessor.setPackageFragment怎么用?Java JavaTypeCompletionProcessor.setPackageFragment使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.jdt.internal.ui.refactoring.contentassist.JavaTypeCompletionProcessor
的用法示例。
在下文中一共展示了JavaTypeCompletionProcessor.setPackageFragment方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createResourceTypeControls
import org.eclipse.jdt.internal.ui.refactoring.contentassist.JavaTypeCompletionProcessor; //导入方法依赖的package包/类
private void createResourceTypeControls(Composite parent, int nColumns) {
resourceTypeField = new StringButtonDialogField(fieldAdapter);
resourceTypeField.setLabelText("Resource type:");
resourceTypeField.setButtonLabel("Browse...");
resourceTypeField.doFillIntoGrid(parent, nColumns);
Text text = resourceTypeField.getTextControl(null);
LayoutUtil.setWidthHint(text, getMaxFieldWidth());
// Set up auto-completion
JavaTypeCompletionProcessor resourceTypeCompletionProcessor = new JavaTypeCompletionProcessorWithAutoActivation();
resourceTypeCompletionProcessor.setPackageFragment(pckgFragment);
ControlContentAssistHelper.createTextContentAssistant(text,
resourceTypeCompletionProcessor);
TextFieldNavigationHandler.install(text);
}
示例2: createIntermediaryTypeCombo
import org.eclipse.jdt.internal.ui.refactoring.contentassist.JavaTypeCompletionProcessor; //导入方法依赖的package包/类
private Combo createIntermediaryTypeCombo(Composite composite) {
final Combo textCombo= new Combo(composite, SWT.SINGLE | SWT.BORDER);
textCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
textCombo.setItems(fgIntermediaryTypes.toArray(new String[fgIntermediaryTypes.size()]));
textCombo.setVisibleItemCount(INTERMEDIARY_TYPE_COUNT);
JavaTypeCompletionProcessor processor= new JavaTypeCompletionProcessor(false, false, true);
processor.setPackageFragment(getIntroduceIndirectionRefactoring().getInvocationPackage());
ControlContentAssistHelper.createComboContentAssistant(textCombo, processor);
TextFieldNavigationHandler.install(textCombo);
return textCombo;
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:13,代码来源:IntroduceIndirectionInputPage.java