LDT - How to stop the file tab, showing the full path text? [message #1043734] |
Thu, 18 April 2013 00:04  |
Eclipse User |
|
|
|
Hi,
The text in the file tab shows the full path rather than just the filename. This means if your file is located in: game/someplace/someotherplace/myfile.lua when you open that file in LDT the tab at the top of the editor shows: game.someplace.someotherplace.myfile.lua
It's also left-aligned, so if you have 10 files open, from myfile1.lua to myfile10.lua, all in the same main directory, then your tabs only show: game.somepla...
Meaning to find out which tab is which file, you have to hover over it, until the hover text appears.
Is there any way to disable that? I see in the screenshots on the Koneki website, that their tabs don't show the path, only the filename which is what I want.
Any help appreciated!
Thanks,
~Ian
|
|
|
|
|
|
|
|
Re: LDT - How to stop the file tab, showing the full path text? [message #1052742 is a reply to message #1052330] |
Tue, 30 April 2013 09:24   |
Eclipse User |
|
|
|
Hi,
I understand your problem and I'm pretty sure you misconfigured your sourcepath (buildpath).
In your sample perhaps the real source folder is not './' but './gamesomeaidata/someaisubfolders/', you see what I mean ?
You say "you are not building your project with LDT", but buildpath is not use to "compile" or "build application", it is used for tooling (building a model of your code to provide tooling).
I will try to explain the sourcepath meaning with an example :
if you have a structure like this :
MyProject
|_ folder1
|_folder2
|_file.lua
1) if you load file.lua with : local file = require 'folder1.folder2.file'
MyProject <- you must set this folder as source folder
|_ folder1
|_folder2
|_file.lua
The editor will show : 'folder1.folder2.file'
2) if you load file.lua with : local file = require 'folder2.file'
MyProject
|_ folder1 <- you set must this folder as source folder
|_folder2
|_file.lua
The editor will show : 'folder2.file'
A well sourcepath/buildpath configuration is when the editor shows the same thing you write when you want to load your file with "require".
Quote:I only see this issue in LDT. Other IDEs simply show the filename.
We decide to show the module name to manage the 'init.lua' use case :
It's an unspoken standard to consider a file 'mymodule/init.lua' as a module called 'mymodule' (This is done by adding '?/init.lua' to luapath).
In this case, If you just display the filename, all modules will have the save name : 'init.lua'.
By experience, we think a module name is short and we don't imagine your problem (perhaps we are wrong... :/)
for the init.lua case :
MyProject
|_ folder1 <- you set must this folder as source folder
|_folder2
|_init.lua
the editor will show 'folder2'
In all case, If you do not defined sourcefolders, the editor will show only 'filename' (without extension) but you will not have access to all LDT feature.
Hope this is clearer
|
|
|
|
Powered by
FUDForum. Page generated in 0.04576 seconds