Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Help needed to Traverse a file from the cdt project

If you know where file is you don't need to traverse it, you need to find
Project object for you project and than find Resource based on relative name
using resource locator.
Focus mean select? To select anything in a view usually you can can call
setSelection of the view object and you give new
StructuredSelection(yourResourceFile) to this method.


hari babu wrote: 

I need to show the focus on a text file inside a C/C++ project. I have
created a project structure something like this, so i wanted to set focus on
def222.txt PROGRAMATICALLY(i know this file name and i am sure this file is
exist). 

to do this i need to traverse and focus on that text file(def222.txt). Can
any body give a code snippet to traverse a file inside C/C++ project. 

Example1
     + includes
     - src
        + form.h
        + form.c
           Makefile.am <http://Makefile.am> 
           abc111.txt
           def222.txt
           ght333.txt
      + imaget
        autogen.sh
        Makefile.sh



begin:vcard
fn:Elena Laskavaia
n:Laskavaia;Elena
tel;work:x2235
version:2.1
end:vcard


Back to the top