Renaming resource file [message #297235] |
Tue, 10 January 2006 19:39 |
Eclipse User |
|
|
|
Originally posted by: maxime.cailloux.cea.fr
Hi,
I want to rename a resource file programmatically. I don't find method
which allows that.Is there such a method?
Else,I tried file.move(new_path,true,null) ,it works (the file is
correctly moved in the navigator), but the editor part is not updated(so,
for example, I don't rename again the file, the file must be closed
manually and reopened so that it works).
How do you do that programmatically?
Thanks in advance,
Maxime
|
|
|
Re: Renaming resource file [message #297238 is a reply to message #297235] |
Tue, 10 January 2006 20:57 |
Haris Peco Messages: 1072 Registered: July 2009 |
Senior Member |
|
|
M.Cailloux wrote:
> Hi,
>
> I want to rename a resource file programmatically. I don't find method
> which allows that.Is there such a method?
>
> Else,I tried file.move(new_path,true,null) ,it works (the file is
> correctly moved in the navigator), but the editor part is not updated(so,
> for example, I don't rename again the file, the file must be closed
> manually and reopened so that it works).
> How do you do that programmatically?
>
> Thanks in advance,
> Maxime
do refresh porject after move
|
|
|
Re: Renaming resource file [message #297243 is a reply to message #297238] |
Tue, 10 January 2006 21:15 |
Eclipse User |
|
|
|
Originally posted by: spotlight07.free.fr
Although the original file is deleted, the editor corresponding to the
original file (before the renaming)remains opened.
By refreshing the project, it does not change anything.
I want that the renaming acts directly on the editor.
Please, help me.
Maxime
|
|
|
Re: Renaming resource file [message #297245 is a reply to message #297235] |
Tue, 10 January 2006 21:18 |
Eclipse User |
|
|
|
Originally posted by: john.eclipsefaq.org
IResource#move is the correct method. The editor should be listening
for resource changes and react accordingly. This sounds like a bug in
the particular editor you are using. Refresh local is NOT required.
--
M.Cailloux wrote:
> Hi,
>
> I want to rename a resource file programmatically. I don't find method
> which allows that.Is there such a method?
>
> Else,I tried file.move(new_path,true,null) ,it works (the file is
> correctly moved in the navigator), but the editor part is not
> updated(so, for example, I don't rename again the file, the file must be
> closed manually and reopened so that it works).
> How do you do that programmatically?
>
> Thanks in advance,
> Maxime
>
|
|
|
Re: Renaming resource file [message #297250 is a reply to message #297245] |
Tue, 10 January 2006 21:32 |
Eclipse User |
|
|
|
Originally posted by: maxime.cailloux.cea.fr
So, I will try to close and reopen() the file.
How do you close and open a file programatically?
Manually, this corrects the problem.
Thanks,
Maxime
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.08408 seconds