Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » change file path to IFile object
change file path to IFile object [message #459627] Tue, 05 December 2006 02:40 Go to next message
Eclipse UserFriend
Originally posted by: bestxiaogui.sohu.com

1.
how can i change the file path(String) to IFile object

or how to get the project with the folder path(String)?

2.
i create some Marker of IFile object, but the editor is not
refreshed immediately, what should i do to refresh the editor?
Re: change file path to IFile object [message #459666 is a reply to message #459627] Wed, 06 December 2006 01:22 Go to previous messageGo to next message
Eclipse UserFriend
Freshwind wrote:

> 1.
> how can i change the file path(String) to IFile object
>
> or how to get the project with the folder path(String)?
>

IWorkspace workspace = ResourcesPlugin.getWorkspace();
IWorkspaceRoot root = workspace.getRoot();
IFile file = root.getFile(path);

> 2.
> i create some Marker of IFile object, but the editor is not
> refreshed immediately, what should i do to refresh the editor?

You could catch IResourceChangeEvent which is fired by "Set marker" event.

--
With best regards, Michael Spector
Re: change file path to IFile object [message #459672 is a reply to message #459666] Wed, 06 December 2006 05:29 Go to previous message
Eclipse UserFriend
Originally posted by: bestxiaogui.sohu.com

Michael Spector wrote:

> Freshwind wrote:

>> 1.
>> how can i change the file path(String) to IFile object
>>
>> or how to get the project with the folder path(String)?
>>

> You could catch IResourceChangeEvent which is fired by "Set marker" event.

Thank you, Michael.

i have finished the 1st and i'm trying the 2nd.
Previous Topic:Automatic build for rcp product
Next Topic:How to show stack trace with error dialog in eclipse workbench
Goto Forum:
  


Current Time: Fri Jul 04 12:11:57 EDT 2025

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

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

Back to the top