Exemplo n.º 1
0
 private boolean isNavigatableLibraryRoot() {
   VirtualFile jarRoot = getJarRoot();
   final Project project = getProject();
   if (jarRoot != null && ProjectRootsUtil.isLibraryRoot(jarRoot, project)) {
     final OrderEntry orderEntry = LibraryUtil.findLibraryEntry(jarRoot, project);
     return orderEntry != null
         && ProjectSettingsService.getInstance(project).canOpenLibraryOrSdkSettings(orderEntry);
   }
   return false;
 }
Exemplo n.º 2
0
  @Override
  public void navigate(boolean requestFocus) {
    final VirtualFile jarRoot = getJarRoot();
    final Project project = getProject();
    if (requestFocus && jarRoot != null && ProjectRootsUtil.isLibraryRoot(jarRoot, project)) {
      final OrderEntry orderEntry = LibraryUtil.findLibraryEntry(jarRoot, project);
      if (orderEntry != null) {
        ProjectSettingsService.getInstance(project).openLibraryOrSdkSettings(orderEntry);
        return;
      }
    }

    super.navigate(requestFocus);
  }