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


Java Navigatable.navigate方法代码示例

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


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

示例1: navigate

import com.intellij.pom.Navigatable; //导入方法依赖的package包/类
@Override
public void navigate(final boolean requestFocus) {
  if (isPhysical()) {
    super.navigate(requestFocus);
    return;
  }
  final PsiNamedElement psiNamedElement = XmlUtil.findRealNamedElement(this);
  Navigatable navigatable = PsiNavigationSupport.getInstance().getDescriptor(psiNamedElement);

  if (psiNamedElement instanceof XmlEntityDecl) {
    navigatable = PsiNavigationSupport.getInstance().createNavigatable(
      psiNamedElement.getProject(),
      psiNamedElement.getContainingFile().getVirtualFile(),
      psiNamedElement.getTextRange().getStartOffset() + psiNamedElement.getText().indexOf(getName())
    );
  }
  if (navigatable != null) {
    navigatable.navigate(requestFocus);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:21,代码来源:XmlAttributeDeclImpl.java

示例2: navigate

import com.intellij.pom.Navigatable; //导入方法依赖的package包/类
@Override
public void navigate( boolean requestFocus )
{
  final Navigatable navigatable = PsiNavigationSupport.getInstance().getDescriptor( this );
  if( navigatable != null )
  {
    navigatable.navigate( requestFocus );
  }
}
 
开发者ID:manifold-systems,项目名称:manifold-ij,代码行数:10,代码来源:ManifoldPsiClass.java

示例3: navigate

import com.intellij.pom.Navigatable; //导入方法依赖的package包/类
@Override
public void navigate(boolean requestFocus) {
  final Navigatable navigatable = PsiNavigationSupport.getInstance().getDescriptor(this);
  if (navigatable != null) {
    navigatable.navigate(requestFocus);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:JavaStubPsiElement.java

示例4: navigate

import com.intellij.pom.Navigatable; //导入方法依赖的package包/类
public void navigate(final Project project) {
  DefaultPsiElementListCellRenderer renderer = new DefaultPsiElementListCellRenderer();

  final JList list = new JBList(myPsiFiles);
  list.setCellRenderer(renderer);

  final PopupChooserBuilder builder = new PopupChooserBuilder(list);
  renderer.installSpeedSearch(builder);

  final Runnable runnable = new Runnable() {
    public void run() {
      int[] ids = list.getSelectedIndices();
      if (ids == null || ids.length == 0) return;
      Object[] selectedElements = list.getSelectedValues();
      for (Object element : selectedElements) {
        Navigatable descriptor = EditSourceUtil.getDescriptor((PsiElement)element);
        if (descriptor != null && descriptor.canNavigate()) {
          descriptor.navigate(true);
        }
      }
    }
  };

  final Editor editor = CommonDataKeys.EDITOR.getData(DataManager.getInstance().getDataContext());

  builder.
    setTitle("Choose file").
    setItemChoosenCallback(runnable).
    createPopup().showInBestPositionFor(editor);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:31,代码来源:YourkitFilter.java

示例5: navigate

import com.intellij.pom.Navigatable; //导入方法依赖的package包/类
@Override
public void navigate(final boolean requestFocus) {
  Navigatable navigatable = getNavigatableInTemplateLanguageFile();
  if (navigatable != null) {
    navigatable.navigate(requestFocus);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:StructureViewElementWrapper.java

示例6: navigate

import com.intellij.pom.Navigatable; //导入方法依赖的package包/类
public static void navigate(final boolean requestFocus, final Navigatable...navigatables) {
  if (navigatables == null) return;
  for (Navigatable navigatable : navigatables) {
    if (navigatable.canNavigate()) {
      navigatable.navigate(requestFocus);
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:OpenSourceUtil.java

示例7: performEditAction

import com.intellij.pom.Navigatable; //导入方法依赖的package包/类
protected boolean performEditAction() {
  Navigatable data = CommonDataKeys.NAVIGATABLE.getData(DataManager.getInstance().getDataContext(myList));
  if (data != null && data.canNavigate()) {
    data.navigate(true);
  }
  return false;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:FinderRecursivePanel.java

示例8: navigateToSource

import com.intellij.pom.Navigatable; //导入方法依赖的package包/类
private void navigateToSource(final boolean focusEditor) {
  NavigatableMessageElement element = getSelectedMessageElement();
  if (element == null) {
    return;
  }
  final Navigatable navigatable = element.getNavigatable();
  if (navigatable.canNavigate()) {
    navigatable.navigate(focusEditor);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:NewErrorTreeViewPanel.java

示例9: navigate

import com.intellij.pom.Navigatable; //导入方法依赖的package包/类
@Override
public void navigate(boolean requestFocus) {
  final Navigatable descriptor = PsiNavigationSupport.getInstance().getDescriptor(this);
  if (descriptor != null) {
    descriptor.navigate(requestFocus);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:PsiElementBase.java

示例10: execute

import com.intellij.pom.Navigatable; //导入方法依赖的package包/类
@Override
protected void execute(@NotNull Project project) {
  VirtualFile projectFile = project.getProjectFile();
  if (projectFile == null) {
    // This is the default project. This will NEVER happen.
    return;
  }
  VirtualFile file = projectFile.getParent().getFileSystem().findFileByPath(myFilePath);
  if (file != null) {
    Navigatable openFile = new OpenFileDescriptor(project, file, myLineNumber, myColumn, false);
    if (openFile.canNavigate()) {
      openFile.navigate(true);
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:OpenFileHyperlink.java

示例11: navigate

import com.intellij.pom.Navigatable; //导入方法依赖的package包/类
@Override
public void navigate(boolean requestFocus) {
  Navigatable navigatable = myBreakpoint.getNavigatable();
  if (navigatable != null && navigatable.canNavigate()) {
    navigatable.navigate(requestFocus);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:XBreakpointItem.java

示例12: navigateToSource

import com.intellij.pom.Navigatable; //导入方法依赖的package包/类
private void navigateToSource(boolean focusEditor) {
  NavigatableMessageElement element = getSelectedMessageElement();
  if (element == null) {
    return;
  }
  Navigatable navigatable = element.getNavigatable();
  if (navigatable.canNavigate()) {
    navigatable.navigate(focusEditor);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:GradleBuildTreeViewPanel.java

示例13: scrollToSource

import com.intellij.pom.Navigatable; //导入方法依赖的package包/类
@Override
protected void scrollToSource(Component tree) {
  if (myAbstractTreeBuilder == null) return;
  myAutoscrollFeedback = true;

  Navigatable editSourceDescriptor = CommonDataKeys.NAVIGATABLE.getData(DataManager.getInstance().getDataContext(getTree()));
  if (myFileEditor != null && editSourceDescriptor != null && editSourceDescriptor.canNavigateToSource()) {
    editSourceDescriptor.navigate(false);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:StructureViewComponent.java

示例14: navigate

import com.intellij.pom.Navigatable; //导入方法依赖的package包/类
@Override
public void navigate(boolean b) {
    final Navigatable navigatable = ((Navigatable)myAttribute.getValueElement());
    if (navigatable != null) {
        navigatable.navigate(b);
    }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:ImplicitModeElement.java

示例15: navigate

import com.intellij.pom.Navigatable; //导入方法依赖的package包/类
@Override
public void navigate(boolean requestFocus) {
  Navigatable descriptor = PsiNavigationSupport.getInstance().getDescriptor(this);
  if (descriptor != null) {
    descriptor.navigate(requestFocus);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:XmlTokenImpl.java


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