本文整理汇总了Java中org.eclipse.jdt.internal.ui.refactoring.contentassist.JavaTypeCompletionProcessor类的典型用法代码示例。如果您正苦于以下问题:Java JavaTypeCompletionProcessor类的具体用法?Java JavaTypeCompletionProcessor怎么用?Java JavaTypeCompletionProcessor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
JavaTypeCompletionProcessor类属于org.eclipse.jdt.internal.ui.refactoring.contentassist包,在下文中一共展示了JavaTypeCompletionProcessor类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createSuperClassControls
import org.eclipse.jdt.internal.ui.refactoring.contentassist.JavaTypeCompletionProcessor; //导入依赖的package包/类
/**
* Creates the controls for the superclass name field. Expects a <code>GridLayout</code>
* with at least 3 columns.
*
* @param composite the parent composite
* @param nColumns number of columns to span
*/
protected void createSuperClassControls(Composite composite, int nColumns) {
fSuperClassDialogField.doFillIntoGrid(composite, nColumns);
Text text= fSuperClassDialogField.getTextControl(null);
LayoutUtil.setWidthHint(text, getMaxFieldWidth());
BidiUtils.applyBidiProcessing(text, StructuredTextTypeHandlerFactory.JAVA);
JavaTypeCompletionProcessor superClassCompletionProcessor= new JavaTypeCompletionProcessor(false, false, true);
superClassCompletionProcessor.setCompletionContextRequestor(new CompletionContextRequestor() {
@Override
public StubTypeContext getStubTypeContext() {
return getSuperClassStubTypeContext();
}
});
ControlContentAssistHelper.createTextContentAssistant(text, superClassCompletionProcessor);
TextFieldNavigationHandler.install(text);
}
示例2: createSuperClassControls
import org.eclipse.jdt.internal.ui.refactoring.contentassist.JavaTypeCompletionProcessor; //导入依赖的package包/类
/**
* Creates the controls for the superclass name field. Expects a <code>GridLayout</code>
* with at least 3 columns.
*
* @param composite the parent composite
* @param nColumns number of columns to span
*/
protected void createSuperClassControls(Composite composite, int nColumns) {
fSuperClassDialogField.doFillIntoGrid(composite, nColumns);
Text text= fSuperClassDialogField.getTextControl(null);
LayoutUtil.setWidthHint(text, getMaxFieldWidth());
JavaTypeCompletionProcessor superClassCompletionProcessor= new JavaTypeCompletionProcessor(false, false, true);
superClassCompletionProcessor.setCompletionContextRequestor(new CompletionContextRequestor() {
@Override
public StubTypeContext getStubTypeContext() {
return getSuperClassStubTypeContext();
}
});
ControlContentAssistHelper.createTextContentAssistant(text, superClassCompletionProcessor);
TextFieldNavigationHandler.install(text);
}
示例3: createAspectClassControls
import org.eclipse.jdt.internal.ui.refactoring.contentassist.JavaTypeCompletionProcessor; //导入依赖的package包/类
/**
* Creates the controls for the superclass name field. Expects a <code>GridLayout</code>
* with at least 3 columns.
*
* @param composite the parent composite
* @param nColumns number of columns to span
*/
protected void createAspectClassControls(Composite composite, int nColumns) {
fAspectClassDialogField.doFillIntoGrid(composite, nColumns);
Text text= fAspectClassDialogField.getTextControl(null);
LayoutUtil.setWidthHint(text, getMaxFieldWidth());
BidiUtils.applyBidiProcessing(text, StructuredTextTypeHandlerFactory.JAVA);
JavaTypeCompletionProcessor aspectClassCompletionProcessor= new JavaTypeCompletionProcessor(false, false, true);
aspectClassCompletionProcessor.setCompletionContextRequestor(new CompletionContextRequestor() {
@Override
public StubTypeContext getStubTypeContext() {
return getAspectClassStubTypeContext();
}
});
ControlContentAssistHelper.createTextContentAssistant(text, aspectClassCompletionProcessor);
TextFieldNavigationHandler.install(text);
}
示例4: 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);
}
示例5: installParameterTypeContentAssist
import org.eclipse.jdt.internal.ui.refactoring.contentassist.JavaTypeCompletionProcessor; //导入依赖的package包/类
private SubjectControlContentAssistant installParameterTypeContentAssist(Text text) {
JavaTypeCompletionProcessor processor= new JavaTypeCompletionProcessor(true, false);
if (fTypeContext == null)
processor.setCompletionContext(null, null, null);
else
processor.setCompletionContext(fTypeContext.getCuHandle(), fTypeContext.getBeforeString(), fTypeContext.getAfterString());
SubjectControlContentAssistant contentAssistant= ControlContentAssistHelper.createJavaContentAssistant(processor);
ContentAssistHandler.createHandlerForText(text, contentAssistant);
return contentAssistant;
}
示例6: 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
示例7: createReturnTypeControl
import org.eclipse.jdt.internal.ui.refactoring.contentassist.JavaTypeCompletionProcessor; //导入依赖的package包/类
private void createReturnTypeControl(Composite parent) {
Composite returnType= new Composite(parent, SWT.NONE);
returnType.setLayoutData(new GridData(GridData.FILL_BOTH));
GridLayout layout= new GridLayout(1, false);
layout.marginHeight= 0;
layout.marginWidth= 0;
returnType.setLayout(layout);
Label label= new Label(returnType, SWT.NONE);
label.setText(RefactoringMessages.ChangeSignatureInputPage_return_type);
final Text text= new Text(returnType, SWT.BORDER);
text.setText(getChangeMethodSignatureProcessor().getReturnTypeString());
text.setLayoutData((new GridData(GridData.FILL_HORIZONTAL)));
TextFieldNavigationHandler.install(text);
if (getChangeMethodSignatureProcessor().canChangeNameAndReturnType()) {
text.addModifyListener(new ModifyListener(){
public void modifyText(ModifyEvent e) {
getChangeMethodSignatureProcessor().setNewReturnTypeName(text.getText());
update(true);
}
});
} else {
text.setEnabled(false);
}
JavaTypeCompletionProcessor processor= new JavaTypeCompletionProcessor(true, true);
StubTypeContext stubTypeContext= getChangeMethodSignatureProcessor().getStubTypeContext();
processor.setCompletionContext(stubTypeContext.getCuHandle(), stubTypeContext.getBeforeString(), stubTypeContext.getAfterString());
ControlContentAssistHelper.createTextContentAssistant(text, processor);
}
示例8: getSuperClassStubTypeContext
import org.eclipse.jdt.internal.ui.refactoring.contentassist.JavaTypeCompletionProcessor; //导入依赖的package包/类
private StubTypeContext getSuperClassStubTypeContext() {
if (fSuperClassStubTypeContext == null) {
String typeName;
if (fCurrType != null) {
typeName= getTypeName();
} else {
typeName= JavaTypeCompletionProcessor.DUMMY_CLASS_NAME;
}
fSuperClassStubTypeContext= TypeContextChecker.createSuperClassStubTypeContext(typeName, getEnclosingType(), getPackageFragment());
}
return fSuperClassStubTypeContext;
}
示例9: getSuperInterfacesStubTypeContext
import org.eclipse.jdt.internal.ui.refactoring.contentassist.JavaTypeCompletionProcessor; //导入依赖的package包/类
private StubTypeContext getSuperInterfacesStubTypeContext() {
if (fSuperInterfaceStubTypeContext == null) {
String typeName;
if (fCurrType != null) {
typeName= getTypeName();
} else {
typeName= JavaTypeCompletionProcessor.DUMMY_CLASS_NAME;
}
fSuperInterfaceStubTypeContext= TypeContextChecker.createSuperInterfaceStubTypeContext(typeName, getEnclosingType(), getPackageFragment());
}
return fSuperInterfaceStubTypeContext;
}
示例10: createContentAssistProcessor
import org.eclipse.jdt.internal.ui.refactoring.contentassist.JavaTypeCompletionProcessor; //导入依赖的package包/类
protected JavaTypeCompletionProcessor createContentAssistProcessor() {
return new JavaTypeCompletionProcessor(false, false, true);
}