本文整理汇总了Java中com.intellij.ide.util.TreeClassChooser.selectDirectory方法的典型用法代码示例。如果您正苦于以下问题:Java TreeClassChooser.selectDirectory方法的具体用法?Java TreeClassChooser.selectDirectory怎么用?Java TreeClassChooser.selectDirectory使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.ide.util.TreeClassChooser
的用法示例。
在下文中一共展示了TreeClassChooser.selectDirectory方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: actionPerformed
import com.intellij.ide.util.TreeClassChooser; //导入方法依赖的package包/类
public void actionPerformed(ActionEvent e) {
TreeClassChooser chooser = TreeClassChooserFactory.getInstance(myProject).createWithInnerClassesScopeChooser(myChooserTitle,
GlobalSearchScope.projectScope(myProject),
new ClassFilter() {
public boolean isAccepted(PsiClass aClass) {
return aClass.getParent() instanceof PsiJavaFile || aClass.hasModifierProperty(PsiModifier.STATIC);
}
}, null);
if (mySelectedClass != null) {
chooser.selectDirectory(mySelectedClass.getContainingFile().getContainingDirectory());
}
chooser.showDialog();
mySelectedClass = chooser.getSelected();
if (mySelectedClass != null) {
setText(mySelectedClass.getQualifiedName());
}
}
示例2: configureDialog
import com.intellij.ide.util.TreeClassChooser; //导入方法依赖的package包/类
private void configureDialog(final TreeClassChooser dialog) {
final String className = getText();
final PsiClass psiClass = findClass(className);
if (psiClass == null) return;
final PsiDirectory directory = psiClass.getContainingFile().getContainingDirectory();
if (directory != null) dialog.selectDirectory(directory);
dialog.select(psiClass);
}
示例3: actionPerformed
import com.intellij.ide.util.TreeClassChooser; //导入方法依赖的package包/类
public void actionPerformed(ActionEvent e) {
TreeClassChooser chooser = TreeClassChooserFactory.getInstance(getProject()).createProjectScopeChooser(
RefactoringBundle.message("choose.destination.class"));
chooser.selectDirectory(myContainingClass.getContainingFile().getContainingDirectory());
chooser.showDialog();
PsiClass aClass = chooser.getSelected();
if (aClass != null) {
myTfTargetClassName.setText(aClass.getQualifiedName());
}
}
示例4: init
import com.intellij.ide.util.TreeClassChooser; //导入方法依赖的package包/类
private void init(TreeClassChooser chooser) {
String s = getText();
PsiClass psiclass = findClass(s);
if (psiclass == null)
return;
com.intellij.psi.PsiDirectory psidirectory = psiclass.getContainingFile().getContainingDirectory();
if (psidirectory != null)
chooser.selectDirectory(psidirectory);
chooser.select(psiclass);
}