Description:

Awesome replacement for IDEA's 'Show directory in editor tabs for non-unique filenames'. If you have same named files in different directories this plugin will allow you to have directory names added to tab labels. It only shows path differences so if you have "blog/controllers/index" and "news/controllers/index" it will add either [blog] or [news]. In setting tab 'Tabdir' you can control how prefixes will be formatted.

Per-project configuration allow specify different formatting rules for each directory in project. To enable per-project configuration enable "Use per project configuration" checkbox(see screenshot №3) and reopen settings window(need close with Ok or Apply buttons). After this you will find 'Tabdir' configuration in project section(screenshot №4) in which different configurations can be specified.

Note: that you should turn off IDE Settings → Editor tabs → Show directory in editor tabs for non-unique filenames.

General usage instructions:

1. Install 2. Configure name reducing and processed file extensions 3. Open file with non-unique(in project) short name and see editor tab label Plugin create prefix of differences in pathes of opened files with non-unique names

Hi, thanks for the plugin. I was wondering... I'd love to have an option that adds so many parent folders to the name just enough to make the tabs unique. So, if I have these files open: src/modules/breadcrumbs/main.js src/modules/serviceOverview/main.js src/modules/serviceBrowser/main.js I want them like this in the tabs: breadcrumbs/main.js serviceOverview/main.js serviceBrowser/main.js I know you can set Max number of dirs but that is not the same. E.g. if I have these files open: src/modules/breadcrumbs/modules/main.js src/modules/serviceOverview/main.js src/modules/serviceBrowser/modules/main.js The tabs should be like this: breadcrumbs/modules/main.js serviceOverview/main.js serviceBrowser/modules/main.js So, as you can see, the first and the third show more parents otherwise you would get this (with number of dirs set to 1): modules/main.js serviceOverview/main.js modules/main.js Which makes the first and the third equal. Or is this already possible? Cheers, Danny

First of all - it is great replacement for built in functionality. Thanks for your work! Secondly - still have some issues. It seems for me that per project functionality does not work in PHPStorm 5.0.3 on Windows 7 with Java 1.7.09. I defined some settings for a directory I open files from and it still uses global configuration. I have D:\Server\WWW directory opened in IDE and configuration defined for D:\Server\WWW\apps. Last, I would like to have an option to always display all subdirectories relative to project path in tab, not only for duplicates.

Tabdir doesnt work with Phpstorm 5. If i enable the plugin i cant open any files. I get an error message: org/apache/commons/collections/Predicate: org/apache/commons/collections/Predicate Details: org/apache/commons/collections/Predicate: org/apache/commons/collections/Predicate java.lang.NoClassDefFoundError: org/apache/commons/collections/Predicate at ru.crazycoder.plugins.tabdir.SameFilenameTitleProvider.titleWithDiffs(SameFilenameTitleProvider.java:130) at ru.crazycoder.plugins.tabdir.SameFilenameTitleProvider.getEditorTabTitleInternal(SameFilenameTitleProvider.java:74) at ru.crazycoder.plugins.tabdir.SameFilenameTitleProvider.getEditorTabTitle(SameFilenameTitleProvider.java:59) at com.intellij.openapi.fileEditor.impl.EditorTabbedContainer.calcTabTitle(EditorTabbedContainer.java:346) at com.intellij.openapi.fileEditor.impl.EditorTabbedContainer.insertTab(EditorTabbedContainer.java:302) at com.intellij.openapi.fileEditor.impl.EditorWindow.setEditor(EditorWindow.java:660) at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileImpl4(FileEditorManagerImpl.java:768) at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileImpl3(FileEditorManagerImpl.java:687) at com.intellij.openapi.fileEditor.impl.EditorsSplitters.a(EditorsSplitters.java:318) at com.intellij.openapi.fileEditor.impl.EditorsSplitters.openFiles(EditorsSplitters.java:268) at com.intellij.openapi.fileEditor.impl.OpenFilesActivity$1.run(OpenFilesActivity.java:38) at com.intellij.openapi.fileEditor.impl.OpenFilesActivity.runActivity(OpenFilesActivity.java:43) at com.intellij.ide.startup.impl.StartupManagerImpl$2.run(StartupManagerImpl.java:134) at com.intellij.ide.startup.impl.StartupManagerImpl.a(StartupManagerImpl.java:203) at com.intellij.ide.startup.impl.StartupManagerImpl.runPostStartupActivitiesFromExtensions(StartupManagerImpl.java:145) at com.intellij.openapi.project.impl.ProjectManagerImpl$5.run(ProjectManagerImpl.java:434) at com.intellij.openapi.progress.impl.ProgressManagerImpl$5.run(ProgressManagerImpl.java:279) at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:472) at com.intellij.openapi.progress.impl.ProgressManagerImpl$6.run(ProgressManagerImpl.java:291) at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:181) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:221) at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:172) at com.intellij.openapi.application.impl.ApplicationImpl$8$1.run(ApplicationImpl.java:684) at com.intellij.openapi.application.impl.ApplicationImpl$6.run(ApplicationImpl.java:457) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:148) Caused by: java.lang.ClassNotFoundException: org.apache.commons.collections.Predicate PluginClassLoader[ru.crazycoder.plugins.tabdir, 1.6] at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:77) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) ... 31 more

>>>Directories show anyhow (that 2, that 5, or for some files no dirs to show), If you have some problems or find a bug, PLEASE make issue in issue tracker and describe problem more precisely(provide some information of your environment). Do not post it here. >>>and if I need to show only 2-3 last (not first) directories no way for do this... This will be possible in next release, sorry I have problems with free time, so release is delayed.

.

Anonymous

2012-06-14 14:45:54

I want this plug-in but it does not work :( Directories show anyhow (that 2, that 5, or for some files no dirs to show), and if I need to show only 2-3 last (not first) directories no way for do this...

@Yuvalik: thanks, nice to hear this. Unfortunately html styling is disabled in IntelliJ Platform editor tabs, so making some styling is not possible without reimplementing very huge part of IntelliJ code. Feel free to submit issue into Tabdir issue tracker and I will try to do something.

This plugin helps me a lot to keep me from messing up the wrong file. It is way better than the built in version. I have one idea that would make it even better (for me at least).Would it be possible to give the directory a different color (e.g. grey). That way the contrast between file name and directory (location) is greater and results in faster recognition.

Thanks for feedback!Functionality that you ask is present in latest version, but was broken from some build. I just reopened issue for this feature - https://github.com/crazyproger/Tabdir/issues/4Will update plugin after issue fix.