Java 类com.intellij.util.xml.DomElementNavigationProvider 实例源码

项目:intellij-ce-playground    文件:GenerateDomElementProvider.java   
public void navigate(final DomElement element) {
  if (element != null && element.isValid()) {
    final DomElement copy = element.createStableCopy();
    final Project project = element.getManager().getProject();
    final DomElementNavigationProvider navigateProvider = getNavigationProviderName(project);

    if (navigateProvider != null && navigateProvider.canNavigate(copy)) {
      ApplicationManager.getApplication().invokeLater(new Runnable() {
        @Override
        public void run() {
          if (!project.isDisposed()) {
            doNavigate(navigateProvider, copy);
          }
        }
      });
    }
  }
}
项目:tools-idea    文件:GenerateDomElementProvider.java   
public void navigate(final DomElement element) {
  if (element != null && element.isValid()) {
    final DomElement copy = element.createStableCopy();
    final Project project = element.getManager().getProject();
    final DomElementNavigationProvider navigateProvider = getNavigationProviderName(project);

    if (navigateProvider != null && navigateProvider.canNavigate(copy)) {
      ApplicationManager.getApplication().invokeLater(new Runnable() {
        public void run() {
          if (!project.isDisposed()) {
            doNavigate(navigateProvider, copy);
          }
        }
      });
    }
  }
}
项目:consulo-xml    文件:GenerateDomElementProvider.java   
public void navigate(final DomElement element) {
  if (element != null && element.isValid()) {
    final DomElement copy = element.createStableCopy();
    final Project project = element.getManager().getProject();
    final DomElementNavigationProvider navigateProvider = getNavigationProviderName(project);

    if (navigateProvider != null && navigateProvider.canNavigate(copy)) {
      ApplicationManager.getApplication().invokeLater(new Runnable() {
        public void run() {
          if (!project.isDisposed()) {
            doNavigate(navigateProvider, copy);
          }
        }
      });
    }
  }
}
项目:hybris-integration-intellij-idea-plugin    文件:TSStructureTreeElement.java   
public <T extends DomElement> TSStructureTreeElement(
    final T stableCopy,
    final Function<DomElement, DomService.StructureViewMode> myDescriptor,
    final DomElementNavigationProvider myNavigationProvider
) {
    super(stableCopy, myDescriptor, myNavigationProvider);
    this.myDescriptor = myDescriptor;
    this.myNavigationProvider = myNavigationProvider;
}
项目:intellij-ce-playground    文件:GotoDomElementDeclarationAction.java   
@Override
public void actionPerformed(AnActionEvent e, DomModelTreeView treeView) {
  final SimpleNode simpleNode = treeView.getTree().getSelectedNode();

  if(simpleNode instanceof BaseDomElementNode) {
    final DomElement domElement = ((BaseDomElementNode)simpleNode).getDomElement();
    final DomElementNavigationProvider provider =
      DomElementsNavigationManager.getManager(domElement.getManager().getProject()).getDomElementsNavigateProvider(DomElementsNavigationManager.DEFAULT_PROVIDER_NAME);

    provider.navigate(domElement, true);

  }
}
项目:intellij-ce-playground    文件:AbstractDomGenerateProvider.java   
@Override
@SuppressWarnings({"unchecked"})
protected void doNavigate(final DomElementNavigationProvider navigateProvider, final DomElement copy) {
  final DomElement element = getElementToNavigate((T)copy);
  if (element != null) {
    super.doNavigate(navigateProvider, element);
  }
}
项目:tools-idea    文件:GotoDomElementDeclarationAction.java   
public void actionPerformed(AnActionEvent e, DomModelTreeView treeView) {
  final SimpleNode simpleNode = treeView.getTree().getSelectedNode();

  if(simpleNode instanceof BaseDomElementNode) {
    final DomElement domElement = ((BaseDomElementNode)simpleNode).getDomElement();
    final DomElementNavigationProvider provider =
      DomElementsNavigationManager.getManager(domElement.getManager().getProject()).getDomElementsNavigateProvider(DomElementsNavigationManager.DEFAULT_PROVIDER_NAME);

    provider.navigate(domElement, true);

  }
}
项目:tools-idea    文件:AbstractDomGenerateProvider.java   
@SuppressWarnings({"unchecked"})
protected void doNavigate(final DomElementNavigationProvider navigateProvider, final DomElement copy) {
  final DomElement element = getElementToNavigate((T)copy);
  if (element != null) {
    super.doNavigate(navigateProvider, element);
  }
}
项目:consulo-xml    文件:DomStructureViewTreeModel.java   
public DomStructureViewTreeModel(
        @NotNull XmlFile file,
        final DomElementNavigationProvider navigationProvider,
        @NotNull Function<DomElement, DomService.StructureViewMode> descriptor,
        @Nullable Editor editor)
{
    super(file, editor);
    myNavigationProvider = navigationProvider;
    myDescriptor = descriptor;
}
项目:consulo-xml    文件:GotoDomElementDeclarationAction.java   
public void actionPerformed(AnActionEvent e, DomModelTreeView treeView) {
  final SimpleNode simpleNode = treeView.getTree().getSelectedNode();

  if(simpleNode instanceof BaseDomElementNode) {
    final DomElement domElement = ((BaseDomElementNode)simpleNode).getDomElement();
    final DomElementNavigationProvider provider =
      DomElementsNavigationManager.getManager(domElement.getManager().getProject()).getDomElementsNavigateProvider(DomElementsNavigationManager.DEFAULT_PROVIDER_NAME);

    provider.navigate(domElement, true);

  }
}
项目:consulo-xml    文件:AbstractDomGenerateProvider.java   
@SuppressWarnings({"unchecked"})
protected void doNavigate(final DomElementNavigationProvider navigateProvider, final DomElement copy) {
  final DomElement element = getElementToNavigate((T)copy);
  if (element != null) {
    super.doNavigate(navigateProvider, element);
  }
}
项目:intellij-ce-playground    文件:GenerateDomElementProvider.java   
protected void doNavigate(final DomElementNavigationProvider navigateProvider, final DomElement copy) {
  navigateProvider.navigate(copy, true);
}
项目:intellij-ce-playground    文件:GenerateDomElementProvider.java   
protected static DomElementNavigationProvider getNavigationProviderName(Project project) {
  return DomElementsNavigationManager.getManager(project)
    .getDomElementsNavigateProvider(DomElementsNavigationManager.DEFAULT_PROVIDER_NAME);
}
项目:tools-idea    文件:GenerateDomElementProvider.java   
protected void doNavigate(final DomElementNavigationProvider navigateProvider, final DomElement copy) {
  navigateProvider.navigate(copy, true);
}
项目:tools-idea    文件:GenerateDomElementProvider.java   
protected static DomElementNavigationProvider getNavigationProviderName(Project project) {
  return DomElementsNavigationManager.getManager(project)
    .getDomElementsNavigateProvider(DomElementsNavigationManager.DEFAULT_PROVIDER_NAME);
}
项目:consulo-xml    文件:DomStructureViewTreeModel.java   
protected DomElementNavigationProvider getNavigationProvider()
{
    return myNavigationProvider;
}
项目:consulo-xml    文件:GenerateDomElementProvider.java   
protected void doNavigate(final DomElementNavigationProvider navigateProvider, final DomElement copy) {
  navigateProvider.navigate(copy, true);
}
项目:consulo-xml    文件:GenerateDomElementProvider.java   
protected static DomElementNavigationProvider getNavigationProviderName(Project project) {
  return DomElementsNavigationManager.getManager(project)
    .getDomElementsNavigateProvider(DomElementsNavigationManager.DEFAULT_PROVIDER_NAME);
}