Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Koneki » LDT - How to stop the file tab, showing the full path text?
LDT - How to stop the file tab, showing the full path text? [message #1416859] Thu, 18 April 2013 12:42 Go to next message
Ian Smithers is currently offline Ian SmithersFriend
Messages: 8
Registered: April 2013
Junior Member
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 #1416860 is a reply to message #1416859] Thu, 18 April 2013 16:27 Go to previous messageGo to next message
Simon Bernard is currently offline Simon BernardFriend
Messages: 345
Registered: July 2009
Senior Member
Hi,
In theory LDT should display the "module" name for files which are in the sourcepath of a "Lua" project and just the filename (without extension) in the others cases.

Module name is for example : 'socket.core' if you have a file core.lua in a folder 'socket' in a folder which is a source folder (cf. buildpath management) of a Lua Project

I suppose you found a bug but I can reproduce it :/
Which version of LDT do you use ?
Re: LDT - How to stop the file tab, showing the full path text? [message #1416861 is a reply to message #1416860] Fri, 19 April 2013 01:15 Go to previous messageGo to next message
Ian Smithers is currently offline Ian SmithersFriend
Messages: 8
Registered: April 2013
Junior Member
Hi Simon,

Thanks for the reply. That sounds like what it's doing yes. Is there any way to simply have the file name displayed?

As I mentioned above if I have a lot of tabs open, and the Lua project has a reasonably deep hierarchy, I can't see any file names, only the initial paths/module name. It makes it really difficult to navigate and work effectively.

My LDT is 0.9.0.201212171109

Any help appreciated,
~Ian
Re: LDT - How to stop the file tab, showing the full path text? [message #1416862 is a reply to message #1416861] Tue, 23 April 2013 23:19 Go to previous messageGo to next message
Ian Smithers is currently offline Ian SmithersFriend
Messages: 8
Registered: April 2013
Junior Member
Hi Simon,

Any word on this?

Thanks,
Ian
Re: LDT - How to stop the file tab, showing the full path text? [message #1416863 is a reply to message #1416862] Wed, 24 April 2013 13:17 Go to previous messageGo to next message
Simon Bernard is currently offline Simon BernardFriend
Messages: 345
Registered: July 2009
Senior Member
Hi,
There no option to display only the file name.

I read again your post, and I believe I missunderstand your problem.

This is not the full path of the file which is displayed but a very long module name.(So this is not a bug)

Usually Module name should be short.

In your case the module name seems very very long, this is really what you want ?
I mean in your code when you 'require' your file you write :
require 'game.someplace.someotherplace.myfile.lua'

if not, you probably missconfigured your sourcepath (buildpath).
To do that see this documentation :
http://wiki.eclipse.org/Koneki/LDT/Developer_Area/User_Guides/User_Guide_0.9#Buildpath
http://wiki.eclipse.org/Koneki/LDT/Developer_Area/User_Guides/User_Guide_0.9#Configuring_Build_paths

Hope this Help.
Re: LDT - How to stop the file tab, showing the full path text? [message #1416871 is a reply to message #1416863] Tue, 30 April 2013 00:22 Go to previous messageGo to next message
Ian Smithers is currently offline Ian SmithersFriend
Messages: 8
Registered: April 2013
Junior Member
Hi Simon,

What if you have a Lua project where you have a structure like:

game/someaidata/someaisubfolders
game/somemodeldata/somemodelsubfolders
game/somesounddata/somesoundsubfolders
game/somemanagers/

If I have open aifile1 located in game/someaidata/someaisubfolders/aifile1.lua the tab at the top of the file open in LDT shows me "game.someaidata..."

Imagine you have are working on 10 files all in the someaisubfolders area of the project, you get 10 tabs with "game.someaidata..."

It makes it very difficult to work. I'm not building my project with LDT, I'm just using LDT as the editor, for it's highlighting and other features. I'm not entirely sure what you are saying in regards to the modules, unless the modules relate 1:1 to the file paths.

Either way though I would just like to not have anything displayed on the tab, or, if it is going to display something, have it be the pertinent data, like the filename. Not the entire path aligned to show only the start of the path.

Thanks,
~Ian
Re: LDT - How to stop the file tab, showing the full path text? [message #1416872 is a reply to message #1416871] Tue, 30 April 2013 13:24 Go to previous message
Simon Bernard is currently offline Simon BernardFriend
Messages: 345
Registered: July 2009
Senior Member
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 :)
Previous Topic:Can LDT debug Lua in a C app?
Next Topic:Run external program on save
Goto Forum:
  


Current Time: Sat Apr 20 03:51:02 GMT 2024

Powered by FUDForum. Page generated in 0.04566 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top