use of com.intellij.util.xml.DomElementNavigationProvider in project intellij-community by JetBrains.
the class GotoDomElementDeclarationAction method actionPerformed.
@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);
}
}
use of com.intellij.util.xml.DomElementNavigationProvider in project intellij-community by JetBrains.
the class GenerateDomElementProvider method navigate.
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(() -> {
if (!project.isDisposed()) {
doNavigate(navigateProvider, copy);
}
});
}
}
}
Aggregations