Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How can I update property file in other plug-in?
How can I update property file in other plug-in? [message #726960] Tue, 20 September 2011 04:25
dean3514 is currently offline dean3514Friend
Messages: 10
Registered: July 2011
Junior Member
Hello, Thank you for your attention.
Sorry for my poor English.

As title, I want to update property file in other plug-in.

In attached file 1.png, you can see structure of project which has property files.
In attached file 2.png, you can see main program "Plan".

As you know, there is information for connection to database in client.properties.
The file is used in applicationContext.xml for spring framework.

I want to change the connection information as dialog in Plan.

I tried to use below code in core plug-in :

IWorkspace workspace = ResourcesPlugin.getWorkspace();
IWorkspaceRoot root = workspace.getRoot() ;
IProject project = root.getProject("com.clt.client.core");
IFile file = project.getFile("properties/client.properties");

and so on.

But, I couldn't access client.properties file.

How can I access the file and update it?

If I have to change structure of core plug-in, please advice me about that.

It is difficult to access some resource in eclipse as beginner.

Please help me.

Thank in advance.

Have a nice day.




  • Attachment: 1.png
    (Size: 4.62KB, Downloaded 114 times)
  • Attachment: 2.png
    (Size: 4.14KB, Downloaded 83 times)
Previous Topic:Can't see other jobs in progress dialog
Next Topic:how to disable the "Other..." action in Menu "Window" or change the action text
Goto Forum:
  


Current Time: Wed Nov 26 15:13:34 GMT 2014

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

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