• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java EditorTextFieldWithBrowseButton类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: createUIComponents

import com.intellij.ui.EditorTextFieldWithBrowseButton; //导入依赖的package包/类
private void createUIComponents() {
    myMainClass = new LabeledComponent<>();
    myMainClass.setComponent(new EditorTextFieldWithBrowseButton(myProject, true, (declaration, place) -> {

        if (declaration instanceof PsiClass) {
            final PsiClass aClass = (PsiClass) declaration;
            if (ConfigurationUtil.MAIN_CLASS.value(aClass) && PsiMethodUtil.findMainMethod(aClass) != null) {
                return JavaCodeFragment.VisibilityChecker.Visibility.VISIBLE;
            }
        }
        return JavaCodeFragment.VisibilityChecker.Visibility.NOT_VISIBLE;
    }
    ));
}
 
开发者ID:testIT-LivingDoc,项目名称:livingdoc-intellij,代码行数:15,代码来源:RunConfigurationEditor.java


示例2: createUIComponents

import com.intellij.ui.EditorTextFieldWithBrowseButton; //导入依赖的package包/类
private void createUIComponents() {
  myMainClass = new LabeledComponent<EditorTextFieldWithBrowseButton>();
  myMainClass.setComponent(new EditorTextFieldWithBrowseButton(myProject, true, new JavaCodeFragment.VisibilityChecker() {
    @Override
    public Visibility isDeclarationVisible(PsiElement declaration, PsiElement place) {
      if (declaration instanceof PsiClass) {
        final PsiClass aClass = (PsiClass)declaration;
        if (ConfigurationUtil.MAIN_CLASS.value(aClass) && PsiMethodUtil.findMainMethod(aClass) != null || place.getParent() != null && myModuleSelector.findClass(((PsiClass)declaration).getQualifiedName()) != null) {
          return Visibility.VISIBLE;
        }
      }
      return Visibility.NOT_VISIBLE;
    }
  }));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:ApplicationConfigurable.java


示例3: testEditJUnitConfiguration

import com.intellij.ui.EditorTextFieldWithBrowseButton; //导入依赖的package包/类
public void testEditJUnitConfiguration() throws ConfigurationException {
  if (PlatformTestUtil.COVERAGE_ENABLED_BUILD) return;

  PsiClass testA = findTestA(getModule2());
  JUnitConfiguration configuration = createConfiguration(testA);
  JUnitConfigurable editor = new JUnitConfigurable(myProject);
  try {
    Configurable configurable = new RunConfigurationConfigurableAdapter(editor, configuration);
    configurable.reset();
    final EditorTextFieldWithBrowseButton component =
      ((LabeledComponent<EditorTextFieldWithBrowseButton>)editor.getTestLocation(JUnitConfigurationModel.CLASS)).getComponent();
    assertEquals(testA.getQualifiedName(), component.getText());
    PsiClass otherTest = findClass(getModule2(), "test2.Test2");
    component.setText(otherTest.getQualifiedName());
    configurable.apply();
    assertEquals(otherTest.getName(), configuration.getName());
    String specialName = "My name";
    configuration.setName(specialName);
    configuration.setNameChangedByUser(true);
    configurable.reset();
    component.setText(testA.getQualifiedName());
    configurable.apply();
    assertEquals(specialName, configuration.getName());
  }
  finally {
    Disposer.dispose(editor);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:29,代码来源:ConfigurationsTest.java


示例4: TestRunParameters

import com.intellij.ui.EditorTextFieldWithBrowseButton; //导入依赖的package包/类
TestRunParameters(Project project, ConfigurationModuleSelector moduleSelector) {
  myProject = project;
  myModuleSelector = moduleSelector;

  myPackageComponent.setComponent(new EditorTextFieldWithBrowseButton(project, false));
  bind(myPackageComponent, new MyPackageBrowser());

  myClassComponent
    .setComponent(new EditorTextFieldWithBrowseButton(project, true, new AndroidTestClassVisibilityChecker(moduleSelector)));

  bind(myClassComponent,
       new AndroidTestClassBrowser(project, moduleSelector, AndroidBundle.message("android.browse.test.class.dialog.title"), false));

  myRunnerComponent.setComponent(new EditorTextFieldWithBrowseButton(project, true,
                                                                     new AndroidInheritingClassVisibilityChecker(myProject, moduleSelector,
                                                                                                       AndroidUtils.INSTRUMENTATION_RUNNER_BASE_CLASS)));
  bind(myRunnerComponent, new AndroidInheritingClassBrowser(project, moduleSelector, AndroidUtils.INSTRUMENTATION_RUNNER_BASE_CLASS,
                                                  AndroidBundle.message("android.browse.instrumentation.class.dialog.title"), true
  ));
  bind(myMethodComponent, new MyMethodBrowser());

  addTestingType(TEST_ALL_IN_MODULE, myAllInModuleButton);
  addTestingType(TEST_ALL_IN_PACKAGE, myAllInPackageButton);
  addTestingType(TEST_CLASS, myClassButton);
  addTestingType(TEST_METHOD, myTestMethodButton);

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


示例5: createUIComponents

import com.intellij.ui.EditorTextFieldWithBrowseButton; //导入依赖的package包/类
/**
 * Creates UI Components
 */
private void createUIComponents() {
    myMainClass = new LabeledComponent<>();
    myMainClass.setComponent(new EditorTextFieldWithBrowseButton(myProject, true, (declaration, place) -> {
        if (declaration instanceof PsiClass) {
            final PsiClass aClass = (PsiClass)declaration;
            if (ConfigurationUtil.MAIN_CLASS.value(aClass) && PsiMethodUtil.findMainMethod(aClass) != null || place.getParent() != null && myModuleSelector.findClass(((PsiClass)declaration).getQualifiedName()) != null) {
                return JavaCodeFragment.VisibilityChecker.Visibility.VISIBLE;
            }
        }
        return JavaCodeFragment.VisibilityChecker.Visibility.NOT_VISIBLE;
    }));
}
 
开发者ID:asebak,项目名称:embeddedlinux-jvmdebugger-intellij,代码行数:16,代码来源:RunConfigurationEditor.java


示例6: createUIComponents

import com.intellij.ui.EditorTextFieldWithBrowseButton; //导入依赖的package包/类
private void createUIComponents() {
  myMainClass = new LabeledComponent<EditorTextFieldWithBrowseButton>();
  myMainClass.setComponent(new EditorTextFieldWithBrowseButton(myProject, true, new JavaCodeFragment.VisibilityChecker() {
    @Override
    public Visibility isDeclarationVisible(PsiElement declaration, PsiElement place) {
      if (declaration instanceof PsiClass) {
        final PsiClass aClass = (PsiClass)declaration;
        if (ConfigurationUtil.MAIN_CLASS.value(aClass) && PsiMethodUtil.findMainMethod(aClass) != null) {
          return Visibility.VISIBLE;
        }
      }
      return Visibility.NOT_VISIBLE;
    }
  }));
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:16,代码来源:ApplicationConfigurable.java


示例7: testEditJUnitConfiguration

import com.intellij.ui.EditorTextFieldWithBrowseButton; //导入依赖的package包/类
public void testEditJUnitConfiguration() throws ConfigurationException {
  if (IdeaTestUtil.COVERAGE_ENABLED_BUILD) return;

  PsiClass testA = findTestA(getModule2());
  JUnitConfiguration configuration = createConfiguration(testA);
  JUnitConfigurable editor = new JUnitConfigurable(myProject);
  try {
    Configurable configurable = new RunConfigurationConfigurableAdapter(editor, configuration);
    configurable.reset();
    final EditorTextFieldWithBrowseButton component =
      ((LabeledComponent<EditorTextFieldWithBrowseButton>)editor.getTestLocation(JUnitConfigurationModel.CLASS)).getComponent();
    assertEquals(testA.getQualifiedName(), component.getText());
    PsiClass otherTest = findClass(getModule2(), "test2.Test2");
    component.setText(otherTest.getQualifiedName());
    configurable.apply();
    assertEquals(otherTest.getName(), configuration.getName());
    String specialName = "My name";
    configuration.setName(specialName);
    configuration.setNameChangedByUser(true);
    configurable.reset();
    component.setText(testA.getQualifiedName());
    configurable.apply();
    assertEquals(specialName, configuration.getName());
  }
  finally {
    Disposer.dispose(editor);
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:29,代码来源:ConfigurationsTest.java


示例8: isClassInProductionSources

import com.intellij.ui.EditorTextFieldWithBrowseButton; //导入依赖的package包/类
private static <T extends ComboBox<?>> boolean isClassInProductionSources(T moduleComboBox, Function<T, Module> getSelectedModule, EditorTextFieldWithBrowseButton classSelector)
{
	Module module = getSelectedModule.apply(moduleComboBox);
	if(module == null)
	{
		return false;
	}
	return ObjectUtil.notNull(JavaParametersUtil.isClassInProductionSources(classSelector.getText(), module), Boolean.FALSE);
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:10,代码来源:DefaultJreSelector.java


示例9: getMainClassField

import com.intellij.ui.EditorTextFieldWithBrowseButton; //导入依赖的package包/类
public EditorTextFieldWithBrowseButton getMainClassField() {
  return myMainClass.getComponent();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:ApplicationConfigurable.java


示例10: createClassTextField

import com.intellij.ui.EditorTextFieldWithBrowseButton; //导入依赖的package包/类
private void createClassTextField() {
    myClass = new LabeledComponent<EditorTextFieldWithBrowseButton>();
    EditorTextFieldWithBrowseButton myClassBrowseTextField = new EditorTextFieldWithBrowseButton(project, true, JavaCodeFragment.VisibilityChecker.PROJECT_SCOPE_VISIBLE);
    myClass.setComponent(myClassBrowseTextField);
}
 
开发者ID:bjorm,项目名称:PageObjectEvaluator,代码行数:6,代码来源:PageObjectConfigurable.java


示例11: createUIComponents

import com.intellij.ui.EditorTextFieldWithBrowseButton; //导入依赖的package包/类
private void createUIComponents() {
  myPackage = new LabeledComponent<EditorTextFieldWithBrowseButton>();
  myPackage.setComponent(new EditorTextFieldWithBrowseButton(myProject, false));

  myClass = new LabeledComponent<EditorTextFieldWithBrowseButton>();
  final TestClassBrowser classBrowser = new TestClassBrowser(myProject);
  myClass.setComponent(new EditorTextFieldWithBrowseButton(myProject, true, new JavaCodeFragment.VisibilityChecker() {
    @Override
    public Visibility isDeclarationVisible(PsiElement declaration, PsiElement place) {
      try {
        if (declaration instanceof PsiClass && classBrowser.getFilter().isAccepted(((PsiClass)declaration))) {
          return Visibility.VISIBLE;
        }
      }
      catch (ClassBrowser.NoFilterException e) {
        return Visibility.NOT_VISIBLE;
      }
      return Visibility.NOT_VISIBLE;
    }
  }));

  myMethod = new LabeledComponent<EditorTextFieldWithBrowseButton>();
  final EditorTextFieldWithBrowseButton textFieldWithBrowseButton = new EditorTextFieldWithBrowseButton(myProject, true, 
                                                                                                        JavaCodeFragment.VisibilityChecker.EVERYTHING_VISIBLE, 
                                                                                                        PlainTextLanguage.INSTANCE.getAssociatedFileType());
  new TextFieldCompletionProvider() {
    @Override
    protected void addCompletionVariants(@NotNull String text, int offset, @NotNull String prefix, @NotNull CompletionResultSet result) {
      final String className = getClassName();
      if (className.trim().length() == 0) {
        return;
      }
      final PsiClass testClass = getModuleSelector().findClass(className);
      if (testClass == null) return;
      final JUnitUtil.TestMethodFilter filter = new JUnitUtil.TestMethodFilter(testClass);
      for (PsiMethod psiMethod : testClass.getAllMethods()) {
        if (filter.value(psiMethod)) {
          result.addElement(LookupElementBuilder.create(psiMethod.getName()));
        }
      }
    }
  }.apply(textFieldWithBrowseButton.getChildComponent());
  myMethod.setComponent(textFieldWithBrowseButton);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:45,代码来源:JUnitConfigurable.java


示例12: getClassName

import com.intellij.ui.EditorTextFieldWithBrowseButton; //导入依赖的package包/类
private String getClassName() {
  return ((LabeledComponent<EditorTextFieldWithBrowseButton>)getTestLocation(JUnitConfigurationModel.CLASS)).getComponent().getText();
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:4,代码来源:JUnitConfigurable.java


示例13: setPackage

import com.intellij.ui.EditorTextFieldWithBrowseButton; //导入依赖的package包/类
private void setPackage(final PsiPackage aPackage) {
  if (aPackage == null) return;
  ((LabeledComponent<EditorTextFieldWithBrowseButton>)getTestLocation(JUnitConfigurationModel.ALL_IN_PACKAGE)).getComponent()
    .setText(aPackage.getQualifiedName());
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:6,代码来源:JUnitConfigurable.java


示例14: getMainClassField

import com.intellij.ui.EditorTextFieldWithBrowseButton; //导入依赖的package包/类
public EditorTextFieldWithBrowseButton getMainClassField()
{
	return myMainClassField;
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:5,代码来源:ApplicationConfigurable.java


示例15: SdkFromSourceRootDependencies

import com.intellij.ui.EditorTextFieldWithBrowseButton; //导入依赖的package包/类
public SdkFromSourceRootDependencies(T moduleComboBox, Function<T, Module> getSelectedModule, EditorTextFieldWithBrowseButton classSelector)
{
	super(moduleComboBox, getSelectedModule, () -> isClassInProductionSources(moduleComboBox, getSelectedModule, classSelector));
	myClassSelector = classSelector;
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:6,代码来源:DefaultJreSelector.java


示例16: fromSourceRootsDependencies

import com.intellij.ui.EditorTextFieldWithBrowseButton; //导入依赖的package包/类
@NotNull
public static DefaultJreSelector fromSourceRootsDependencies(ModulesComboBox modulesCombobox, EditorTextFieldWithBrowseButton classSelector)
{
	return new SdkFromSourceRootDependencies<>(modulesCombobox, ModulesComboBox::getSelectedModule, classSelector);
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:6,代码来源:DefaultJreSelector.java


示例17: getClassNameComponent

import com.intellij.ui.EditorTextFieldWithBrowseButton; //导入依赖的package包/类
private EditorTextFieldWithBrowseButton getClassNameComponent()
{
	return myClassName;
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:5,代码来源:AppletConfigurable.java


示例18: createUIComponents

import com.intellij.ui.EditorTextFieldWithBrowseButton; //导入依赖的package包/类
private void createUIComponents()
{
	myClassName = new EditorTextFieldWithBrowseButton(myProject, true);
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:5,代码来源:AppletConfigurable.java


示例19: getMainClassField

import com.intellij.ui.EditorTextFieldWithBrowseButton; //导入依赖的package包/类
/**
 * Gets the main class to execute java app against
 * @return
 */
public EditorTextFieldWithBrowseButton getMainClassField() {
    return myMainClass.getComponent();
}
 
开发者ID:asebak,项目名称:embeddedlinux-jvmdebugger-intellij,代码行数:8,代码来源:RunConfigurationEditor.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java El类代码示例发布时间:2022-05-22
下一篇:
Java BlockChain类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap