Eclipse Plug-in Development-implement external programs to modify the file after the Refresh function __eclipse

Source: Internet
Author: User

Eclipse caches a file when it loads the project, so if you don't edit the file in eclipse, you can modify the file in the project by calling an external program, such as a text editor with your system, to reload it manually in Eclipse.

If you need to modify the file with an external program when developing the Eclipse plug-in, you need a way to automatically refresh the file after the external program is executed, as follows:

IFile f = resourcesplugin.getworkspace (). Getroot (). GetFile (New Path ("Itart/src/helloworld.java"));
F.refreshlocal (Iresource.depth_zero, NULL);

"Itart/src/helloworld.java": The relative path of the file, Itart is the project name

Iresource.depth_zero: Indicates that only the file is refreshed.


Source: It Art blog (http://www.itart.cn)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.