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


Java TextComponentAccessor.TEXT_FIELD_WHOLE_TEXT属性代码示例

本文整理汇总了Java中com.intellij.openapi.ui.TextComponentAccessor.TEXT_FIELD_WHOLE_TEXT属性的典型用法代码示例。如果您正苦于以下问题:Java TextComponentAccessor.TEXT_FIELD_WHOLE_TEXT属性的具体用法?Java TextComponentAccessor.TEXT_FIELD_WHOLE_TEXT怎么用?Java TextComponentAccessor.TEXT_FIELD_WHOLE_TEXT使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在com.intellij.openapi.ui.TextComponentAccessor的用法示例。


在下文中一共展示了TextComponentAccessor.TEXT_FIELD_WHOLE_TEXT属性的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setupScriptPathField

private void setupScriptPathField(@NotNull final Project project) {
  final ComponentWithBrowseButton.BrowseFolderActionListener<JTextField> listener =
    new ComponentWithBrowseButton.BrowseFolderActionListener<JTextField>(
      "Select Script",
      "",
      myScriptPathField,
      project,
      FileChooserDescriptorFactory.createSingleFileDescriptor(TheRFileType.INSTANCE),
      TextComponentAccessor.TEXT_FIELD_WHOLE_TEXT
    ) {
      @Override
      protected void onFileChosen(@NotNull final VirtualFile chosenFile) {
        super.onFileChosen(chosenFile);

        TheRRunConfigurationUtils.setSuggestedWorkingDirectoryPathIfNotSpecified(TheRRunConfigurationForm.this);
      }
    };

  myScriptPathField.addActionListener(listener);
}
 
开发者ID:ktisha,项目名称:TheRPlugin,代码行数:20,代码来源:TheRRunConfigurationForm.java

示例2: MySourceCodeChooserActionListener

MySourceCodeChooserActionListener(final FileChooserDescriptor fileChooserDescriptor) {
    super(
        HybrisI18NBundleUtils.message("hybris.import.label.select.hybris.src.file"),
        "",
        HybrisWorkspaceRootStep.this.sourceCodeFilesInChooser,
        (Project) null,
        fileChooserDescriptor,
        TextComponentAccessor.TEXT_FIELD_WHOLE_TEXT
    );
}
 
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:10,代码来源:HybrisWorkspaceRootStep.java

示例3: PythonRunConfigurationForm

public PythonRunConfigurationForm(PythonRunConfiguration configuration) {
  myCommonOptionsForm = PyCommonOptionsFormFactory.getInstance().createForm(configuration.getCommonOptionsFormData());
  myCommonOptionsPlaceholder.add(myCommonOptionsForm.getMainPanel(), BorderLayout.CENTER);

  myProject = configuration.getProject();

  FileChooserDescriptor chooserDescriptor = new FileChooserDescriptor(true, false, false, false, false, false) {
    @Override
    public boolean isFileVisible(VirtualFile file, boolean showHiddenFiles) {
      return file.isDirectory() || file.getExtension() == null || Comparing.equal(file.getExtension(), "py");
    }
  };
  //chooserDescriptor.setRoot(s.getProject().getBaseDir());

  ComponentWithBrowseButton.BrowseFolderActionListener<JTextField> listener =
    new ComponentWithBrowseButton.BrowseFolderActionListener<JTextField>("Select Script", "", myScriptTextField, myProject,
                                                                         chooserDescriptor, TextComponentAccessor.TEXT_FIELD_WHOLE_TEXT) {

      @Override
      protected void onFileChosen(@NotNull VirtualFile chosenFile) {
        super.onFileChosen(chosenFile);
        myCommonOptionsForm.setWorkingDirectory(chosenFile.getParent().getPath());
      }
    };

  myScriptTextField.addActionListener(listener);

  setAnchor(myCommonOptionsForm.getAnchor());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:29,代码来源:PythonRunConfigurationForm.java

示例4: LocalAndServerPathsForm

public LocalAndServerPathsForm() {
  Disposer.register(this, myServerPathForm);

  myServerPathForm.addListener(new TfsTreeForm.SelectionListener() {
    @Override
    public void selectionChanged() {
      myEventDispatcher.getMulticaster().stateChanged(new ChangeEvent(this));
    }
  });

  myLocalPathLabel.setLabelFor(myLocalPathField.getChildComponent());
  myLocalPathField.getChildComponent().getDocument().addDocumentListener(new DocumentAdapter() {
    protected void textChanged(final DocumentEvent e) {
      myEventDispatcher.getMulticaster().stateChanged(new ChangeEvent(this));
    }
  });

  FileChooserDescriptor descriptor = FileChooserDescriptorFactory.createSingleFolderDescriptor();
  ComponentWithBrowseButton.BrowseFolderActionListener<JTextField> listener =
    new ComponentWithBrowseButton.BrowseFolderActionListener<JTextField>(TFSBundle.message("choose.local.path.title"),
                                                                         TFSBundle.message("choose.local.path.description"),
                                                                         myLocalPathField, null, descriptor,
                                                                         TextComponentAccessor.TEXT_FIELD_WHOLE_TEXT);

  myServerPathLabel.setLabelFor(myServerPathForm.getPreferredFocusedComponent());
  myLocalPathField.addActionListener(listener);
  myMessageLabel.setIcon(UIUtil.getBalloonWarningIcon());
}
 
开发者ID:Microsoft,项目名称:vso-intellij,代码行数:28,代码来源:LocalAndServerPathsForm.java

示例5: ImageFileBrowserFolderActionListener

public ImageFileBrowserFolderActionListener(String title,
                                            Project project,
                                            ComponentWithBrowseButton<JTextField> componentWithBrowseButton,
                                            FileChooserDescriptor fileChooserDescriptor) {
    super(title, null, componentWithBrowseButton, project, fileChooserDescriptor, TextComponentAccessor.TEXT_FIELD_WHOLE_TEXT);
    this.title = title;
    this.project = project;
}
 
开发者ID:sayedyousef,项目名称:plgin,代码行数:8,代码来源:ImageFileBrowserFolderActionListener.java

示例6: addSourcePath

private void addSourcePath(SettingsStep settingsStep) {
  Project project = settingsStep.getContext().getProject();
  ComponentWithBrowseButton.BrowseFolderActionListener<JTextField> listener =
    new ComponentWithBrowseButton.BrowseFolderActionListener<JTextField>(
      IdeBundle.message("prompt.select.source.directory"), null, mySourcePath, project, BrowseFilesListener.SINGLE_DIRECTORY_DESCRIPTOR,
      TextComponentAccessor.TEXT_FIELD_WHOLE_TEXT)
    {
      @Override
      protected void onFileChoosen(VirtualFile chosenFile) {
        String contentEntryPath = myModuleBuilder.getContentEntryPath();
        String path = chosenFile.getPath();
        if (contentEntryPath != null) {

          int i = StringUtil.commonPrefixLength(contentEntryPath, path);
          mySourcePath.setText(path.substring(i));
        }
        else {
          mySourcePath.setText(path);
        }
      }
    };
  mySourcePath.addBrowseFolderListener(project, listener);
  myCreateSourceRoot.addActionListener(new ActionListener() {
    @Override
    public void actionPerformed(ActionEvent e) {
      mySourcePath.setEnabled(myCreateSourceRoot.isSelected());
    }
  });
  settingsStep.addExpertPanel(myPanel);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:30,代码来源:JavaSettingsStep.java

示例7: LocationNameFieldsBinding

public LocationNameFieldsBinding(@Nullable Project project,
                                 final TextFieldWithBrowseButton locationField,
                                 final JTextField nameField,
                                 String baseDir,
                                 String title) {
  myBaseDir = baseDir;
  File suggestedProjectDirectory = FileUtil.findSequentNonexistentFile(new File(baseDir), "untitled", "");
  locationField.setText(suggestedProjectDirectory.toString());
  nameField.setDocument(new NameFieldDocument(nameField, locationField));
  mySuggestedProjectName = suggestedProjectDirectory.getName();
  nameField.setText(mySuggestedProjectName);
  nameField.selectAll();

  FileChooserDescriptor descriptor = FileChooserDescriptorFactory.createSingleFolderDescriptor();
  BrowseFolderActionListener<JTextField> listener =
    new BrowseFolderActionListener<JTextField>(title, "", locationField, project, descriptor, TextComponentAccessor.TEXT_FIELD_WHOLE_TEXT) {
      @Override
      protected void onFileChosen(@NotNull VirtualFile chosenFile) {
        myBaseDir = chosenFile.getPath();
        if (isProjectNameChanged(nameField.getText()) && !nameField.getText().equals(chosenFile.getName())) {
          myExternalModify = true;
          locationField.setText(new File(chosenFile.getPath(), nameField.getText()).toString());
          myExternalModify = false;
        }
        else {
          myExternalModify = true;
          locationField.setText(chosenFile.getPath());
          nameField.setText(chosenFile.getName());
          myExternalModify = false;
        }
      }
    };
  locationField.addActionListener(listener);
  locationField.getTextField().getDocument().addDocumentListener(new DocumentAdapter() {
    @Override
    protected void textChanged(DocumentEvent e) {
      if (myExternalModify) {
        return;
      }
      myModifyingLocation = true;
      String path = locationField.getText().trim();
      if (path.endsWith(File.separator)) {
        path = path.substring(0, path.length() - File.separator.length());
      }
      int ind = path.lastIndexOf(File.separator);
      if (ind != -1) {
        String projectName = path.substring(ind + 1, path.length());
        if (!nameField.getText().trim().isEmpty()) {
          myBaseDir = path.substring(0, ind);
        }
        if (!projectName.equals(nameField.getText())) {
          if (!myModifyingProjectName) {
            nameField.setText(projectName);
          }
        }
      }
      myModifyingLocation = false;
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:60,代码来源:LocationNameFieldsBinding.java

示例8: MyBrowseFolderListener

public MyBrowseFolderListener(@NotNull FileChooserDescriptor descriptor) {
    super(SquirrelBundle.message("squirrel.sdk.select.root.dir"), "", mySdkPathField, myProject, descriptor, TextComponentAccessor
            .TEXT_FIELD_WHOLE_TEXT);
}
 
开发者ID:shvetsgroup,项目名称:squirrel-lang-idea-plugin,代码行数:4,代码来源:SquirrelSdkConfigurable.java

示例9: LocationNameFieldsBinding

public LocationNameFieldsBinding(@Nullable Project project, final TextFieldWithBrowseButton locationTextField,
                                 final JTextField nameTextField, String baseDir, final String browseFolderTitle) {

  myBaseDir = baseDir;
  File suggestedProjectDirectory = FileUtil.findSequentNonexistentFile(new File(baseDir), "untitled", "");
  locationTextField.setText(suggestedProjectDirectory.toString());
  nameTextField.setDocument(new NameFieldDocument(nameTextField, locationTextField));
  mySuggestedProjectName = suggestedProjectDirectory.getName();
  nameTextField.setText(mySuggestedProjectName);
  nameTextField.selectAll();

  FileChooserDescriptor descriptor = FileChooserDescriptorFactory.createSingleFolderDescriptor();
  ComponentWithBrowseButton.BrowseFolderActionListener<JTextField> listener =
    new ComponentWithBrowseButton.BrowseFolderActionListener<JTextField>(browseFolderTitle, "", locationTextField,
                                                                         project,
                                                                         descriptor,
                                                                         TextComponentAccessor.TEXT_FIELD_WHOLE_TEXT) {
      protected void onFileChoosen(VirtualFile chosenFile) {
        myBaseDir = chosenFile.getPath();
        if (isProjectNameChanged(nameTextField.getText()) && !nameTextField.getText().equals(chosenFile.getName())) {
          myExternalModify = true;
          locationTextField.setText(new File(chosenFile.getPath(), nameTextField.getText()).toString());
          myExternalModify = false;
        }
        else {
          myExternalModify = true;
          locationTextField.setText(chosenFile.getPath());
          nameTextField.setText(chosenFile.getName());
          myExternalModify = false;
        }
      }
    };
  locationTextField.addActionListener(listener);
  locationTextField.getTextField().getDocument().addDocumentListener(new DocumentAdapter() {
    @Override
    protected void textChanged(DocumentEvent e) {
      if (myExternalModify) {
        return;
      }
      myModifyingLocation = true;
      String path = locationTextField.getText().trim();
      if (path.endsWith(File.separator)) {
        path = path.substring(0, path.length() - File.separator.length());
      }
      int ind = path.lastIndexOf(File.separator);
      if (ind != -1) {
        String projectName = path.substring(ind + 1, path.length());
        if (!nameTextField.getText().trim().isEmpty()) {
          myBaseDir = path.substring(0, ind);
        }
        if (!projectName.equals(nameTextField.getText())) {
          if (!myModifyingProjectName) {
            nameTextField.setText(projectName);
          }
        }
      }
      myModifyingLocation = false;
    }
  });
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:60,代码来源:LocationNameFieldsBinding.java

示例10: ProjectSourcesChosen

public ProjectSourcesChosen(@Nullable String title, @Nullable String description, FileChooserDescriptor fileChooserDescriptor) {
    super(title, description, projectSourcesText, null, fileChooserDescriptor, TextComponentAccessor.TEXT_FIELD_WHOLE_TEXT);
}
 
开发者ID:cefolger,项目名称:needsmoredojo,代码行数:3,代码来源:DojoSettingsConfigurable.java

示例11: DojoSourcesChosen

public DojoSourcesChosen(@Nullable String title, @Nullable String description, FileChooserDescriptor fileChooserDescriptor) {
    super(title, description, dojoSourcesText, null, fileChooserDescriptor, TextComponentAccessor.TEXT_FIELD_WHOLE_TEXT);
}
 
开发者ID:cefolger,项目名称:needsmoredojo,代码行数:3,代码来源:DojoSettingsConfigurable.java


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