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); } } }); } } }
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); } } }); } } }
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; }
@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); } }
@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); } }
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); } }
@SuppressWarnings({"unchecked"}) protected void doNavigate(final DomElementNavigationProvider navigateProvider, final DomElement copy) { final DomElement element = getElementToNavigate((T)copy); if (element != null) { super.doNavigate(navigateProvider, element); } }
public DomStructureViewTreeModel( @NotNull XmlFile file, final DomElementNavigationProvider navigationProvider, @NotNull Function<DomElement, DomService.StructureViewMode> descriptor, @Nullable Editor editor) { super(file, editor); myNavigationProvider = navigationProvider; myDescriptor = descriptor; }
protected void doNavigate(final DomElementNavigationProvider navigateProvider, final DomElement copy) { navigateProvider.navigate(copy, true); }
protected static DomElementNavigationProvider getNavigationProviderName(Project project) { return DomElementsNavigationManager.getManager(project) .getDomElementsNavigateProvider(DomElementsNavigationManager.DEFAULT_PROVIDER_NAME); }
protected DomElementNavigationProvider getNavigationProvider() { return myNavigationProvider; }