Can ImageJ resolve aliases?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Can ImageJ resolve aliases?

Norbert Vischer-2
Hello list members,

The only way I can use aliases (shortcuts) is:
-  drag & drop an alias onto the ImageJ microscope icon,
-  or choose menu File>Open ect.

However, both are manual operations. I didn't succeed to resolve an  
alias in an automated way such as via macro; also, drag & drop an  
alias onto the ImageJ main window does not work. I tried this on a Mac.

I'd like to organize my project folders so they partly contain aliases  
and would like to have full macro access to all items in the folder.

Has anyone experience with aliases and Java?

Norbert Vischer
Reply | Threaded
Open this post in threaded view
|

Re: Can ImageJ resolve aliases?

Wayne Rasband
> Hello list members,
>
> The only way I can use aliases (shortcuts) is:
> -  drag & drop an alias onto the ImageJ microscope icon,
> -  or choose menu File>Open ect.
>
> However, both are manual operations. I didn't succeed to resolve an
> alias in an automated way such as via macro; also, drag & drop an
> alias onto the ImageJ main window does not work. I tried this on a
> Mac.
>
> I'd like to organize my project folders so they partly contain aliases
> and would like to have full macro access to all items in the folder.
>
> Has anyone experience with aliases and Java?

This appears to be a Java problem. The File.getCanonicalPath() method,
which ImageJ calls when you drag a file or folder on the "ImageJ"
window, does not resolve alias and shortcuts. They are resolved if you
use File>Open, but not if you are using JFileChooser, which is written
in Java.

-wayne
Reply | Threaded
Open this post in threaded view
|

Re: Can ImageJ resolve aliases?

Justin McGrath
Mac is now a Unix-like OS isn't it?  Maybe you can use symbolic links
instead of aliases. I know Java can follow links on Linux.

Use "ln -s targetfile linkname"

Justin

On Fri, Jun 13, 2008 at 10:38 AM, Wayne Rasband <[hidden email]> wrote:

>> Hello list members,
>>
>> The only way I can use aliases (shortcuts) is:
>> -  drag & drop an alias onto the ImageJ microscope icon,
>> -  or choose menu File>Open ect.
>>
>> However, both are manual operations. I didn't succeed to resolve an alias
>> in an automated way such as via macro; also, drag & drop an alias onto the
>> ImageJ main window does not work. I tried this on a Mac.
>>
>> I'd like to organize my project folders so they partly contain aliases and
>> would like to have full macro access to all items in the folder.
>>
>> Has anyone experience with aliases and Java?
>
> This appears to be a Java problem. The File.getCanonicalPath() method, which
> ImageJ calls when you drag a file or folder on the "ImageJ" window, does not
> resolve alias and shortcuts. They are resolved if you use File>Open, but not
> if you are using JFileChooser, which is written in Java.
>
> -wayne
>
Reply | Threaded
Open this post in threaded view
|

Re: Can ImageJ resolve aliases?

Fco. Javier Merino Guardiola
I think symbolic links are possible in Windows too, but you need to  
you use NTFS partitions:

http://en.wikipedia.org/wiki/NTFS_symbolic_link


FJMG



El 13/06/2008, a las 17:59, Justin McGrath escribió:

> Mac is now a Unix-like OS isn't it?  Maybe you can use symbolic links
> instead of aliases. I know Java can follow links on Linux.
>
> Use "ln -s targetfile linkname"
>
> Justin
>
> On Fri, Jun 13, 2008 at 10:38 AM, Wayne Rasband <[hidden email]> wrote:
>>> Hello list members,
>>>
>>> The only way I can use aliases (shortcuts) is:
>>> -  drag & drop an alias onto the ImageJ microscope icon,
>>> -  or choose menu File>Open ect.
>>>
>>> However, both are manual operations. I didn't succeed to resolve  
>>> an alias
>>> in an automated way such as via macro; also, drag & drop an alias  
>>> onto the
>>> ImageJ main window does not work. I tried this on a Mac.
>>>
>>> I'd like to organize my project folders so they partly contain  
>>> aliases and
>>> would like to have full macro access to all items in the folder.
>>>
>>> Has anyone experience with aliases and Java?
>>
>> This appears to be a Java problem. The File.getCanonicalPath()  
>> method, which
>> ImageJ calls when you drag a file or folder on the "ImageJ" window,  
>> does not
>> resolve alias and shortcuts. They are resolved if you use  
>> File>Open, but not
>> if you are using JFileChooser, which is written in Java.
>>
>> -wayne
>>
Reply | Threaded
Open this post in threaded view
|

Re: Can ImageJ resolve aliases?

dscho
Hi,

On Fri, 13 Jun 2008, Fco. Javier Merino Guardiola wrote:

> I think symbolic links are possible in Windows too, but you need to you
> use NTFS partitions:
>
> http://en.wikipedia.org/wiki/NTFS_symbolic_link

Please do not promote NTFS "symbolic links".  They are so ridiculously
wrong on so many levels to everybody who has worked with proper symbolic
links.

Ciao,
Dscho
Reply | Threaded
Open this post in threaded view
|

Re: Can ImageJ resolve aliases?

Fco. Javier Merino Guardiola
El 13/06/2008, a las 22:27, Johannes Schindelin escribió:

>> http://en.wikipedia.org/wiki/NTFS_symbolic_link
>
> Please do not promote NTFS "symbolic links".  They are so ridiculously
> wrong on so many levels to everybody who has worked with proper  
> symbolic
> links.

Hi Johannes,

I didnt tested the NTFS symbolic links because I dont have Windows and  
I dont have NTFS partitions, but as the wikipedia link says it should  
work as in any Unix/POSIX operating system.

You should realize that I was talking about "real symbolic links" (you  
need to use the terminal)  and not the "shortcut links" that creates  
the explorer (obviously that kind of files will not work).

FJMG
Reply | Threaded
Open this post in threaded view
|

Re: Can ImageJ resolve aliases?

dscho
Hi,

On Sat, 14 Jun 2008, Fco. Javier Merino Guardiola wrote:

>
> El 13/06/2008, a las 22:27, Johannes Schindelin escribió:
>
> > >http://en.wikipedia.org/wiki/NTFS_symbolic_link
> >
> >Please do not promote NTFS "symbolic links".  They are so ridiculously
> >wrong on so many levels to everybody who has worked with proper
> >symbolic links.
>
> I didnt tested the NTFS symbolic links because I dont have Windows and I
> dont have NTFS partitions, but as the wikipedia link says it should work
> as in any Unix/POSIX operating system.
>
> You should realize that I was talking about "real symbolic links" (you
> need to use the terminal)  and not the "shortcut links" that creates the
> explorer (obviously that kind of files will not work).
I know that you did not talk about shortcuts, but symbolic links.

Yet, if they cannot point to another drive, or if they cannot be relative,
they do not deserve to be called "real symbolic links".  It might very
well be that the inventors realized that, too, because they did not even
dare to bundle programs to create them links.

Hth,
Dscho