Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 339355

Summary: DLTK indexes derived ressources
Product: [Technology] DLTK Reporter: Adrien <adrien.dupuis>
Component: CommonAssignee: dltk.common-inbox <dltk.common-inbox>
Status: CLOSED INVALID QA Contact:
Severity: minor    
Priority: P3 CC: alex.panchenko
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
PDT buildpath screenshot none

Description Adrien CLA 2011-03-09 09:20:04 EST
Could be an option somewhere but (from my point of view) there is no need for the DLTK Indexing Processus to work on derived files.
Comment 1 Adrien CLA 2011-03-09 09:27:03 EST
Concerned version is:

Eclipse Dynamic Languages Toolkit - Core Frameworks
Version: 2.0.0.v20100518-1923-7L-0EAAoOVMSUaEAZ8w_
Build id: 201009100629

Eclipse Dynamic Languages Toolkit - Index Frameworks
Version: 2.0.0.v20100616-2015-6-19oA5855S5U27J_B
Build id: 201009100629
Comment 2 Alex Panchenko CLA 2011-03-10 07:40:07 EST
Hi Adrien,

DLTK indexes all source files available via buildpath.

So, I see 2 ways here:
- your derived files are kind of compiler generated (like .class files generated by Java). In this case you should make them unavailable via buildpath 
a) put "/src" in buildbath (and use it for sources) while saving compiled files to "/bin"
b) add exclusion pattern(s) for the compiled folders/files

- you generate sources from some model, like Person.xml -> Person.java. In this case I see no reason to exclude derived files from indexing. Person class exists and DLTK should know about it.

Could you please share the details of your case?

Regards,
Alex
Comment 3 Adrien CLA 2011-03-10 08:07:54 EST
Eclipse is not a Java Developpement Plateform anymore. It's a global IDE. DLTK is provided with the PHP package: http://www.eclipse.org/downloads/packages/eclipse-php-developers/heliossr2

Actually DLTK is indexing on my web project local things like server cache or user content. Non engine parts are derived because there not the project, only its (test) usage. So, from a PHP project, I've to got to use Java only features? Potentially, DLTK Indexing Process will bother all non Java project.

The only solution I've found is to use Eclipse FileSync to not have my project runing in my workspace but in it's own box.

That why, I think that I should be able declare to DLTK to not index deriveds. Not having to add a Java BuildPath to a non Java Project.
Comment 4 Alex Panchenko CLA 2011-03-10 08:22:43 EST
Created attachment 190853 [details]
PDT buildpath screenshot
Comment 5 Alex Panchenko CLA 2011-03-10 08:23:51 EST
You are able to declare what should be indexed. Please look at the attached screenshot.
Comment 6 Adrien CLA 2011-03-10 09:20:08 EST
How did you get this long menu? I got only "Ressource" and "Run/Debug Settings" with PDT 2.2.1.

(In reply to comment #5)
> You are able to declare what should be indexed. Please look at the attached
> screenshot.
Comment 7 Alex Panchenko CLA 2011-03-10 09:21:55 EST
It was the project properties dialog.
Comment 8 Adrien CLA 2011-03-10 09:52:41 EST
I was editing derived folder properties...
Ok, thanks.

Now I ask myself why there is a "derived" property on resources. Why excluding a resource from the project repository is differing so much from excluding from LTDK indexing? But more immediately important: what is the exact scope of 'derived'?

But for now, there is no RFE anymore.

Thank you again.

(In reply to comment #7)
> It was the project properties dialog.
Comment 9 Alex Panchenko CLA 2011-03-10 09:59:55 EST
Btw, there are VCS specific ways to mark ignored files:
- .cvsignore, .hgignore, .gitignore files
- svn:ignore property
Team providers usually provide convenient UI to mark ignored files.
Comment 10 Adrien CLA 2011-03-15 05:36:57 EDT
DLTK also indexing project's .metadata folder. Actualy, right in front of me, it is working on .metada/plugins/org.eclipse.php.core
So what, I've really got to explain all to DLTK?
Comment 11 Alex Panchenko CLA 2011-03-15 05:52:52 EDT
(In reply to comment #10)
> DLTK also indexing project's .metadata folder. Actualy, right in front of me,
> it is working on .metada/plugins/org.eclipse.php.core
> So what, I've really got to explain all to DLTK?

You can specify included folders or excluded, just use what works better for you.

In eclipse predefined .metadata folder is created only in the workspace folder, i.e. at the same level as project folders. It shouldn't be inside project. I am not sure if it was accidentally copied to or PDT created it. But anyway, it's not something well-known.
Comment 12 Adrien CLA 2011-03-15 06:03:35 EDT
(In reply to comment #11)
DLTK was indexing my workspace root .metadata, not an inside project one, I haven't got any .metadata in my projects folders.

> (In reply to comment #10)
> > DLTK also indexing project's .metadata folder. Actualy, right in front of me,
> > it is working on .metada/plugins/org.eclipse.php.core
> > So what, I've really got to explain all to DLTK?
> 
> You can specify included folders or excluded, just use what works better for
> you.
> 
> In eclipse predefined .metadata folder is created only in the workspace folder,
> i.e. at the same level as project folders. It shouldn't be inside project. I am
> not sure if it was accidentally copied to or PDT created it. But anyway, it's
> not something well-known.
Comment 13 Alex Panchenko CLA 2011-03-15 06:32:33 EDT
(In reply to comment #12)
> (In reply to comment #11)
> DLTK was indexing my workspace root .metadata, not an inside project one, I
> haven't got any .metadata in my projects folders.

I don't think it's possible, as DLTK read only project files. .metadata is not exposed as IResource. What make you think so?
Comment 14 Adrien CLA 2011-03-15 06:44:28 EDT
In the Progress window, DLTK shows the path to the file is working on. When I wrote here, it was treating Workspace\.metadata\.plugins\org.eclipse.php.core\__language__\fb34ec0c\pdo_sqlite.php

(In reply to comment #13)
> (In reply to comment #12)
> > (In reply to comment #11)
> > DLTK was indexing my workspace root .metadata, not an inside project one, I
> > haven't got any .metadata in my projects folders.
> 
> I don't think it's possible, as DLTK read only project files. .metadata is not
> exposed as IResource. What make you think so?
Comment 15 Alex Panchenko CLA 2011-03-15 06:50:50 EDT
(In reply to comment #14)
> In the Progress window, DLTK shows the path to the file is working on. When I
> wrote here, it was treating
> Workspace\.metadata\.plugins\org.eclipse.php.core\__language__\fb34ec0c\pdo_sqlite.php
> 

I think you've managed to create external project in such a way, that those files are occurred it. Probably you have a few workspaces, starting from different points in directory tree.

Like first you create it in C:/Users/<your-id>/A/B/C/D then in C:/Users/<your-id>/A/B/C

I would like to know if you can reproduce the issue in clear workspace.
Comment 16 Adrien CLA 2011-03-15 07:39:50 EDT
But I've got only one Workspace with two team-synchronized projects.

I'll try to re-install all from clean scratch and let you know.

(In reply to comment #15)
> (In reply to comment #14)
> > In the Progress window, DLTK shows the path to the file is working on. When I
> > wrote here, it was treating
> > Workspace\.metadata\.plugins\org.eclipse.php.core\__language__\fb34ec0c\pdo_sqlite.php
> > 
> 
> I think you've managed to create external project in such a way, that those
> files are occurred it. Probably you have a few workspaces, starting from
> different points in directory tree.
> 
> Like first you create it in C:/Users/<your-id>/A/B/C/D then in
> C:/Users/<your-id>/A/B/C
> 
> I would like to know if you can reproduce the issue in clear workspace.