Java Code Examples for com.intellij.ui.EditorTextField#setText()

The following examples show how to use com.intellij.ui.EditorTextField#setText() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: UIHelper.java    From PackageTemplates with Apache License 2.0 5 votes vote down vote up
public static EditorTextField getEditorTextField(String defValue, Project project, boolean isOneLineMode) {
    EditorTextField etfName = new EditorTextField();
    etfName.setAlignmentX(Component.LEFT_ALIGNMENT);
    etfName.setOneLineMode(isOneLineMode);

    addHighlightListener(project, etfName);

    etfName.setText(defValue);
    return etfName;
}
 
Example 2
Source File: ContextItemPanel.java    From intellij-xquery with Apache License 2.0 5 votes vote down vote up
public MyEditorTextFieldWithBrowseButton(final Project project, final EditorTextField editorTextField) {
    super(editorTextField, new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            editorTextField.setText(getValueFromMultilineInputDialog(project, editorTextField));
        }
    });
    getButton().setName(SHOW_EDITOR_BUTTON);

}