Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Koneki » LDT - How to stop the file tab, showing the full path text?(The text in the file tab shows the full path rather than just the filename.)
LDT - How to stop the file tab, showing the full path text? [message #1043734] Thu, 18 April 2013 00:04 Go to next message
Ian Smithers is currently offline Ian Smithers
Messages: 4
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 #1044223 is a reply to message #1043734] Thu, 18 April 2013 12:27 Go to previous messageGo to next message
Simon Bernard is currently offline Simon Bernard
Messages: 164
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 not reproduce it :/ (I forgot the not)
Which version of LDT do you use ?

[Updated on: Wed, 24 April 2013 09:18]

Report message to a moderator

Re: LDT - How to stop the file tab, showing the full path text? [message #1044488 is a reply to message #1044223] Thu, 18 April 2013 21:15 Go to previous messageGo to next message
Ian Smithers is currently offline Ian Smithers
Messages: 4
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 #1047987 is a reply to message #1044488] Tue, 23 April 2013 19:19 Go to previous messageGo to next message
Ian Smithers is currently offline Ian Smithers
Messages: 4
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 #1048439 is a reply to message #1047987] Wed, 24 April 2013 09:17 Go to previous messageGo to next message
Simon Bernard is currently offline Simon Bernard
Messages: 164
Registered: July 2009
Senior Member
Hi,
There is no option to display only the file name.

I read again your post, and I believe I missunderstood 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' 


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.

[Updated on: Tue, 30 April 2013 09:28]

Report message to a moderator

Re: LDT - How to stop the file tab, showing the full path text? [message #1052330 is a reply to message #1048439] Mon, 29 April 2013 20:22 Go to previous messageGo to next message
Ian Smithers is currently offline Ian Smithers
Messages: 4
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.

I only see this issue in LDT. Other IDEs simply show the filename.

Thanks,
~Ian

[Updated on: Mon, 29 April 2013 23:39]

Report message to a moderator

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 Go to previous message
Simon Bernard is currently offline Simon Bernard
Messages: 164
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 Smile
Previous Topic:Can LDT debug Lua in a C app?
Next Topic:Run external program on save
Goto Forum:
  


Current Time: Sat Aug 23 01:42:49 EDT 2014

Powered by FUDForum. Page generated in 0.11704 seconds