The directories to get the task files

27 views
Skip to first unread message

Jingjie Jiang

unread,
Mar 21, 2014, 3:43:36 PM3/21/14
to workspac...@googlegroups.com
Hi everyone, I am checking the source code and trying to figure out where did you get the directories to read task files like .epf. If I don't make any mistake, do you get the directories from the class "
FileTaskProvider"?? Thank you for answering my question:)

Robert Konigsberg

unread,
Mar 21, 2014, 5:40:38 PM3/21/14
to workspacemechanic
I think you're looking for the PreferenceFileTaskScanner.

If you use a debugger it will help you answer some of these questions.


On Fri, Mar 21, 2014 at 3:43 PM, Jingjie Jiang <chygo...@gmail.com> wrote:
Hi everyone, I am checking the source code and trying to figure out where did you get the directories to read task files like .epf. If I don't make any mistake, do you get the directories from the class "
FileTaskProvider"?? Thank you for answering my question:)

--
You received this message because you are subscribed to the Google Groups "Workspace Mechanic for Eclipse" group.
To unsubscribe from this group and stop receiving emails from it, send an email to workspacemecha...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Robert Konigsberg

Jingjie Jiang

unread,
Mar 21, 2014, 5:49:21 PM3/21/14
to workspac...@googlegroups.com
If I don't misunderstand the code, PreferenceFileTaskScanner is to get all the *.epf file under a certain directory, right? I meant there must be something pass the directory to PreferenceFileTaskScanner, right?

Robert Konigsberg

unread,
Mar 21, 2014, 5:57:12 PM3/21/14
to workspacemechanic
What does the code say?

Jingjie Jiang

unread,
Mar 21, 2014, 6:02:32 PM3/21/14
to workspac...@googlegroups.com
The comments of the class PreferenceFileTaskScanner said: 

 * Provides support for treating Elipse "epf" files as first class

 * {@link Task}s. Each EPF file can have a recommended header section

 * consisting of comments with javadoc like tags specifying information

 * about the task to be performed for this file.

I have checked the methods of the PreferenceFileTaskScanner, I think it gets the directory by using methods from another class. And there is not comments for class FileTaskProvider. That is why I post the question :)

Robert Konigsberg

unread,
Mar 21, 2014, 6:12:24 PM3/21/14
to workspacemechanic
The code says:

protected void scan(IResourceTaskProvider source, TaskCollector collector) {
    /**
     * Scan our source. Add a new Task for each EPF found.
     */
    for (IResourceTaskReference taskRef : source.getTaskReferences(".epf")) {
  So, the epf files are listed in the IResourceTaskProvider. Look for something that implements that interface, and go from there.

Jingjie, I hope you are successful, but I'm just too busy to spend a lot of time on the Workspace Mechanic code base, particularly for questions that can be answered by reading the code. I suggest you spend some time learning how to navigate a small Java code base, and save your questions for more sophisticated ones.

Jingjie Jiang

unread,
Mar 21, 2014, 7:00:55 PM3/21/14
to workspac...@googlegroups.com
Hi Roberta,

Thanks very much for your time.I did exactly the same thing, and I found FileTaskProvider. I am a Java and Eclipse plug-in dev beginner, I didn't quite understand the code of FileTaskProvider ,so I posted the question to make sure. Again, really appreciate your time :)
Reply all
Reply to author
Forward
0 new messages