本文整理汇总了Java中org.eclipse.jdt.internal.ui.dialogs.TextFieldNavigationHandler类的典型用法代码示例。如果您正苦于以下问题:Java TextFieldNavigationHandler类的具体用法?Java TextFieldNavigationHandler怎么用?Java TextFieldNavigationHandler使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TextFieldNavigationHandler类属于org.eclipse.jdt.internal.ui.dialogs包,在下文中一共展示了TextFieldNavigationHandler类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createControl
import org.eclipse.jdt.internal.ui.dialogs.TextFieldNavigationHandler; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
public void createControl(Composite parent) {
final Composite composite= new Composite(parent, SWT.NONE);
final GridLayout layout= new GridLayout();
layout.numColumns= 2;
composite.setLayout(layout);
createEnumTypeNameField(composite);
createSpacer(composite);
createFieldTableLabel(composite);
createFieldTableComposite(composite);
createStatusLine(composite);
setControl(composite);
TextFieldNavigationHandler.install(fNameField);
}
开发者ID:ponder-lab,项目名称:Constants-to-Enum-Eclipse-Plugin,代码行数:19,代码来源:ConvertToEnumTypePage.java
示例2: addFieldNameField
import org.eclipse.jdt.internal.ui.dialogs.TextFieldNavigationHandler; //导入依赖的package包/类
private Text addFieldNameField(Composite result) {
Label nameLabel= new Label(result, SWT.NONE);
nameLabel.setText(RefactoringMessages.ConvertAnonymousToNestedInputPage_class_name);
nameLabel.setLayoutData(new GridData());
final Text classNameField= new Text(result, SWT.BORDER | SWT.SINGLE);
classNameField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
classNameField.addModifyListener(new ModifyListener(){
public void modifyText(ModifyEvent e) {
ConvertAnonymousToNestedInputPage.this.getConvertRefactoring().setClassName(classNameField.getText());
ConvertAnonymousToNestedInputPage.this.updateStatus();
}
});
TextFieldNavigationHandler.install(classNameField);
return classNameField;
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:17,代码来源:ConvertAnonymousToNestedWizard.java
示例3: addFieldNameField
import org.eclipse.jdt.internal.ui.dialogs.TextFieldNavigationHandler; //导入依赖的package包/类
private void addFieldNameField(Composite result) {
Label nameLabel= new Label(result, SWT.NONE);
nameLabel.setText(RefactoringMessages.PromoteTempInputPage_Field_name);
nameLabel.setLayoutData(new GridData());
String[] guessedFieldNames= getPromoteTempRefactoring().guessFieldNames();
String firstGuessedFieldName= guessedFieldNames[0];
fNameField = new Text(result, SWT.BORDER | SWT.SINGLE);
fNameField.setText(firstGuessedFieldName);
getPromoteTempRefactoring().setFieldName(firstGuessedFieldName);
fNameField.selectAll();
fNameField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
fNameField.addModifyListener(new ModifyListener(){
public void modifyText(ModifyEvent e) {
PromoteTempInputPage.this.getPromoteTempRefactoring().setFieldName(fNameField.getText());
PromoteTempInputPage.this.updateStatus();
}
});
IContentAssistProcessor processor= new FieldNameProcessor(guessedFieldNames, getPromoteTempRefactoring());
ControlContentAssistHelper.createTextContentAssistant(fNameField, processor);
TextFieldNavigationHandler.install(fNameField);
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:24,代码来源:PromoteTempWizard.java
示例4: createSuperTypeField
import org.eclipse.jdt.internal.ui.dialogs.TextFieldNavigationHandler; //导入依赖的package包/类
/**
* Creates the super type field.
*
* @param parent
* the parent control
*/
protected void createSuperTypeField(final Composite parent) {
final Label label= new Label(parent, SWT.NONE);
label.setText(RefactoringMessages.ExtractSupertypeMemberPage_name_label);
label.setLayoutData(new GridData());
fNameField= new Text(parent, SWT.BORDER);
fNameField.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
handleNameChanged(fNameField.getText());
}
});
fNameField.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
TextFieldNavigationHandler.install(fNameField);
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:22,代码来源:ExtractSupertypeMemberPage.java
示例5: createStaticQuery
import org.eclipse.jdt.internal.ui.dialogs.TextFieldNavigationHandler; //导入依赖的package包/类
private static INewNameQuery createStaticQuery(final IInputValidator validator, final String message, final String initial, final Shell shell){
return new INewNameQuery(){
public String getNewName() throws OperationCanceledException {
InputDialog dialog= new InputDialog(shell, ReorgMessages.ReorgQueries_nameConflictMessage, message, initial, validator) {
/* (non-Javadoc)
* @see org.eclipse.jface.dialogs.InputDialog#createDialogArea(org.eclipse.swt.widgets.Composite)
*/
@Override
protected Control createDialogArea(Composite parent) {
Control area= super.createDialogArea(parent);
TextFieldNavigationHandler.install(getText());
return area;
}
};
if (dialog.open() == Window.CANCEL)
throw new OperationCanceledException();
return dialog.getValue();
}
};
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:21,代码来源:NewNameQueries.java
示例6: createAccessorPart
import org.eclipse.jdt.internal.ui.dialogs.TextFieldNavigationHandler; //导入依赖的package包/类
private void createAccessorPart(Composite parent, final int nOfColumns, int textWidth) {
createLabel(parent, NLSUIMessages.NLSAccessorConfigurationDialog_resourceBundle_title, nOfColumns);
fAccessorPackage.createControl(parent, nOfColumns, textWidth);
fAccessorClassName.doFillIntoGrid(parent, nOfColumns);
Text accessorClassText= fAccessorClassName.getTextControl(null);
LayoutUtil.setWidthHint(accessorClassText, convertWidthInCharsToPixels(60));
TextFieldNavigationHandler.install(accessorClassText);
fSubstitutionPattern.doFillIntoGrid(parent, nOfColumns);
Text substitutionPatternText= fSubstitutionPattern.getTextControl(null);
LayoutUtil.setWidthHint(substitutionPatternText, convertWidthInCharsToPixels(60));
TextFieldNavigationHandler.install(substitutionPatternText);
fSubstitutionPattern.setEnabled(!fRefactoring.isEclipseNLS());
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:17,代码来源:NLSAccessorConfigurationDialog.java
示例7: doFillIntoGrid
import org.eclipse.jdt.internal.ui.dialogs.TextFieldNavigationHandler; //导入依赖的package包/类
public Control[] doFillIntoGrid(Composite parent, int nColumns, int textWidth) {
Control[] res= super.doFillIntoGrid(parent, nColumns);
final Text text= getTextControl(null);
text.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
updateListener();
}
});
LayoutUtil.setWidthHint(text, textWidth);
LayoutUtil.setHorizontalGrabbing(text);
ControlContentAssistHelper.createTextContentAssistant(text, fCurrPackageCompletionProcessor);
TextFieldNavigationHandler.install(text);
return res;
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:17,代码来源:PackageFragmentSelection.java
示例8: createEnclosingTypeControls
import org.eclipse.jdt.internal.ui.dialogs.TextFieldNavigationHandler; //导入依赖的package包/类
/**
* Creates the controls for the enclosing type name field. Expects a <code>GridLayout</code> with at
* least 4 columns.
*
* @param composite the parent composite
* @param nColumns number of columns to span
*/
protected void createEnclosingTypeControls(Composite composite, int nColumns) {
// #6891
Composite tabGroup= new Composite(composite, SWT.NONE);
GridLayout layout= new GridLayout();
layout.marginWidth= 0;
layout.marginHeight= 0;
tabGroup.setLayout(layout);
fEnclosingTypeSelection.doFillIntoGrid(tabGroup, 1);
Text text= fEnclosingTypeDialogField.getTextControl(composite);
SWTUtil.setAccessibilityText(text, NewWizardMessages.NewTypeWizardPage_enclosing_field_description);
GridData gd= new GridData(GridData.FILL_HORIZONTAL);
gd.widthHint= getMaxFieldWidth();
gd.horizontalSpan= 2;
text.setLayoutData(gd);
Button button= fEnclosingTypeDialogField.getChangeControl(composite);
gd= new GridData(GridData.HORIZONTAL_ALIGN_FILL);
gd.widthHint = SWTUtil.getButtonWidthHint(button);
button.setLayoutData(gd);
ControlContentAssistHelper.createTextContentAssistant(text, fEnclosingTypeCompletionProcessor);
TextFieldNavigationHandler.install(text);
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:33,代码来源:NewTypeWizardPage.java
示例9: createSuperClassControls
import org.eclipse.jdt.internal.ui.dialogs.TextFieldNavigationHandler; //导入依赖的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);
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:25,代码来源:NewTypeWizardPage.java
示例10: createDialogArea
import org.eclipse.jdt.internal.ui.dialogs.TextFieldNavigationHandler; //导入依赖的package包/类
@Override
protected Control createDialogArea(Composite parent) {
Composite composite= (Composite) super.createDialogArea(parent);
Composite inner= new Composite(composite, SWT.NONE);
LayoutUtil.doDefaultLayout(inner, new DialogField[] { fNameDialogField }, true, 0, 0);
int fieldWidthHint= convertWidthInCharsToPixels(60);
Text text= fNameDialogField.getTextControl(null);
LayoutUtil.setWidthHint(text, fieldWidthHint);
LayoutUtil.setHorizontalGrabbing(text);
BidiUtils.applyBidiProcessing(text, StructuredTextTypeHandlerFactory.JAVA);
TextFieldNavigationHandler.install(text);
fNameDialogField.postSetFocusOnDialogField(parent.getDisplay());
applyDialogFont(composite);
return composite;
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:20,代码来源:TypeFilterInputDialog.java
示例11: addFieldNameField
import org.eclipse.jdt.internal.ui.dialogs.TextFieldNavigationHandler; //导入依赖的package包/类
private void addFieldNameField(Composite result) {
Label nameLabel= new Label(result, SWT.NONE);
nameLabel.setText(RefactoringMessages.PromoteTempInputPage_Field_name);
nameLabel.setLayoutData(new GridData());
String[] guessedFieldNames= getPromoteTempRefactoring().guessFieldNames();
fNameField = new Text(result, SWT.BORDER | SWT.SINGLE);
fNameField.setText(guessedFieldNames[0]);
fNameField.selectAll();
fNameField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
fNameField.addModifyListener(new ModifyListener(){
public void modifyText(ModifyEvent e) {
PromoteTempInputPage.this.getPromoteTempRefactoring().setFieldName(fNameField.getText());
PromoteTempInputPage.this.updateStatus();
}
});
IContentAssistProcessor processor= new FieldNameProcessor(guessedFieldNames, getPromoteTempRefactoring());
ControlContentAssistHelper.createTextContentAssistant(fNameField, processor);
TextFieldNavigationHandler.install(fNameField);
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion-Juno38,代码行数:22,代码来源:PromoteTempWizard.java
示例12: createSuperClassControls
import org.eclipse.jdt.internal.ui.dialogs.TextFieldNavigationHandler; //导入依赖的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);
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion-Juno38,代码行数:24,代码来源:NewTypeWizardPage.java
示例13: createDialogArea
import org.eclipse.jdt.internal.ui.dialogs.TextFieldNavigationHandler; //导入依赖的package包/类
@Override
protected Control createDialogArea(Composite parent) {
Composite composite= (Composite) super.createDialogArea(parent);
Composite inner= new Composite(composite, SWT.NONE);
LayoutUtil.doDefaultLayout(inner, new DialogField[] { fNameDialogField }, true, 0, 0);
int fieldWidthHint= convertWidthInCharsToPixels(60);
Text text= fNameDialogField.getTextControl(null);
LayoutUtil.setWidthHint(text, fieldWidthHint);
LayoutUtil.setHorizontalGrabbing(text);
TextFieldNavigationHandler.install(text);
fNameDialogField.postSetFocusOnDialogField(parent.getDisplay());
applyDialogFont(composite);
return composite;
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion-Juno38,代码行数:19,代码来源:TypeFilterInputDialog.java
示例14: createDialogArea
import org.eclipse.jdt.internal.ui.dialogs.TextFieldNavigationHandler; //导入依赖的package包/类
@Override
protected Control createDialogArea(Composite parent) {
Composite composite= (Composite) super.createDialogArea(parent);
initializeDialogUnits(parent);
GridLayout layout= (GridLayout) composite.getLayout();
layout.numColumns= 2;
fNameDialogField.doFillIntoGrid(composite, 3);
LayoutUtil.setHorizontalSpan(fNameDialogField.getLabelControl(null), 2);
int fieldWidthHint= convertWidthInCharsToPixels(60);
Text text= fNameDialogField.getTextControl(null);
LayoutUtil.setWidthHint(text, fieldWidthHint);
LayoutUtil.setHorizontalGrabbing(text);
TextFieldNavigationHandler.install(text);
DialogField.createEmptySpace(composite, 1);
fBrowseTypeButton.doFillIntoGrid(composite, 1);
fNameDialogField.postSetFocusOnDialogField(parent.getDisplay());
applyDialogFont(composite);
return composite;
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion-Juno38,代码行数:27,代码来源:ImportOrganizeInputDialog.java
示例15: createAspectClassControls
import org.eclipse.jdt.internal.ui.dialogs.TextFieldNavigationHandler; //导入依赖的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);
}
开发者ID:diverse-project,项目名称:k3,代码行数:28,代码来源:NewXtendClassK3AspectWizardPage.java
示例16: createPackageControls
import org.eclipse.jdt.internal.ui.dialogs.TextFieldNavigationHandler; //导入依赖的package包/类
protected void createPackageControls(Composite composite, int nColumns) {
modulePackageField.doFillIntoGrid(composite, nColumns);
Text modulePackageText = modulePackageField.getTextControl(null);
LayoutUtil.setWidthHint(modulePackageText, getMaxFieldWidth());
ControlContentAssistHelper.createTextContentAssistant(modulePackageText,
modulePackageCompletionProcessor);
TextFieldNavigationHandler.install(modulePackageText);
}
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:9,代码来源:NewModuleWizardPage.java
示例17: createResourceTypeControls
import org.eclipse.jdt.internal.ui.dialogs.TextFieldNavigationHandler; //导入依赖的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);
}
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:16,代码来源:ClientBundleResourceDialog.java
示例18: createClientBundleTypeControls
import org.eclipse.jdt.internal.ui.dialogs.TextFieldNavigationHandler; //导入依赖的package包/类
private void createClientBundleTypeControls(Composite parent, int nColumns) {
clientBundleTypeField = new StringButtonDialogField(fieldAdapter);
clientBundleTypeField.setLabelText("ClientBundle:");
clientBundleTypeField.setButtonLabel("Browse...");
clientBundleTypeField.doFillIntoGrid(parent, nColumns);
Text text = clientBundleTypeField.getTextControl(null);
LayoutUtil.setWidthHint(text, getMaxFieldWidth());
// Set up auto-completion
resourceTypeCompletionProcessor = new JavaTypeCompletionProcessorWithAutoActivation();
ControlContentAssistHelper.createTextContentAssistant(text,
resourceTypeCompletionProcessor);
TextFieldNavigationHandler.install(text);
}
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:15,代码来源:AddResourcesToClientBundleDialog.java
示例19: createIntermediaryTypeCombo
import org.eclipse.jdt.internal.ui.dialogs.TextFieldNavigationHandler; //导入依赖的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
示例20: createReturnTypeControl
import org.eclipse.jdt.internal.ui.dialogs.TextFieldNavigationHandler; //导入依赖的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);
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:33,代码来源:ChangeSignatureWizard.java
注:本文中的org.eclipse.jdt.internal.ui.dialogs.TextFieldNavigationHandler类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论