当前位置: 首页>>代码示例>>Java>>正文


Java TextFieldNavigationHandler类代码示例

本文整理汇总了Java中org.eclipse.jdt.internal.ui.dialogs.TextFieldNavigationHandler的典型用法代码示例。如果您正苦于以下问题:Java TextFieldNavigationHandler类的具体用法?Java TextFieldNavigationHandler怎么用?Java TextFieldNavigationHandler使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


TextFieldNavigationHandler类属于org.eclipse.jdt.internal.ui.dialogs包,在下文中一共展示了TextFieldNavigationHandler类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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


注:本文中的org.eclipse.jdt.internal.ui.dialogs.TextFieldNavigationHandler类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。