本文整理汇总了Java中com.intellij.util.OpenSourceUtil.navigate方法的典型用法代码示例。如果您正苦于以下问题:Java OpenSourceUtil.navigate方法的具体用法?Java OpenSourceUtil.navigate怎么用?Java OpenSourceUtil.navigate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.util.OpenSourceUtil
的用法示例。
在下文中一共展示了OpenSourceUtil.navigate方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doClickAction
import com.intellij.util.OpenSourceUtil; //导入方法依赖的package包/类
static void doClickAction(AnActionEvent e, Collection<Define> set, String title) {
if (set.size() == 1) {
final Navigatable n = (Navigatable)set.iterator().next().getPsiElement();
OpenSourceUtil.navigate(true, n);
} else {
final Define[] array = set.toArray(new Define[set.size()]);
NavigationUtil.getPsiElementPopup(ContainerUtil.map(array, new Function<Define, PsiElement>() {
@Override
public PsiElement fun(Define define) {
return define.getPsiElement();
}
}, PsiElement.EMPTY_ARRAY), title).show(new RelativePoint((MouseEvent)e.getInputEvent()));
}
}
示例2: doClickAction
import com.intellij.util.OpenSourceUtil; //导入方法依赖的package包/类
static void doClickAction(AnActionEvent e, Collection<Define> set, String title) {
if (set.size() == 1) {
final Navigatable n = (Navigatable)set.iterator().next().getPsiElement();
OpenSourceUtil.navigate(true, n);
} else {
final Define[] array = set.toArray(new Define[set.size()]);
NavigationUtil.getPsiElementPopup(ContainerUtil.map(array, new Function<Define, PsiElement>() {
public PsiElement fun(Define define) {
return define.getPsiElement();
}
}, PsiElement.EMPTY_ARRAY), title).show(new RelativePoint((MouseEvent)e.getInputEvent()));
}
}
示例3: doClickAction
import com.intellij.util.OpenSourceUtil; //导入方法依赖的package包/类
static void doClickAction(AnActionEvent e, Collection<Define> set, String title) {
if (set.size() == 1) {
final Navigatable n = (Navigatable)set.iterator().next().getPsiElement();
OpenSourceUtil.navigate(true, n);
} else {
final Define[] array = set.toArray(new Define[set.size()]);
NavigationUtil.getPsiElementPopup(ContainerUtil.map(array, define -> define.getPsiElement(), PsiElement.EMPTY_ARRAY), title).show(new RelativePoint((MouseEvent)e.getInputEvent()));
}
}
示例4: actionPerformed
import com.intellij.util.OpenSourceUtil; //导入方法依赖的package包/类
public void actionPerformed(AnActionEvent e) {
DataContext dataContext = e.getDataContext();
OpenSourceUtil.navigate(myFocusEditor, getNavigatables(dataContext));
}
示例5: actionPerformed
import com.intellij.util.OpenSourceUtil; //导入方法依赖的package包/类
public void actionPerformed(AnActionEvent e) {
final Navigatable[] navigatableArray = e.getData(CommonDataKeys.NAVIGATABLE_ARRAY);
if (navigatableArray != null && navigatableArray.length > 0) {
OpenSourceUtil.navigate(navigatableArray);
}
}
示例6: actionPerformed
import com.intellij.util.OpenSourceUtil; //导入方法依赖的package包/类
@Override
public void actionPerformed(AnActionEvent event) {
MavenProject project = MvnModuleContextAction.getProject(event.getDataContext());
VirtualFile pomFile = LocalFileSystem.getInstance().findFileByPath(project.getDirectory() + "/pom.xml");
OpenSourceUtil.navigate(true, MavenNavigationUtil.createNavigatableForPom(event.getProject(), pomFile));
}
示例7: actionPerformed
import com.intellij.util.OpenSourceUtil; //导入方法依赖的package包/类
public void actionPerformed(AnActionEvent e) {
final Navigatable[] navigatableArray = e.getData(PlatformDataKeys.NAVIGATABLE_ARRAY);
if (navigatableArray != null && navigatableArray.length > 0) {
OpenSourceUtil.navigate(navigatableArray);
}
}