Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 322720 - Syntax errors are not properly indicated in the "PHP Explorer" view
Summary: Syntax errors are not properly indicated in the "PHP Explorer" view
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P1 normal (vote)
Target Milestone: ---   Edit
Assignee: PHP UI CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 315403 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-08-15 09:35 EDT by Daniel Alvarez Arribas CLA
Modified: 2020-05-14 11:08 EDT (History)
4 users (show)

See Also:


Attachments
patch (1.09 KB, patch)
2010-08-15 21:44 EDT, Zhongwei Zhao CLA
jacek.pospychala: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Alvarez Arribas CLA 2010-08-15 09:35:47 EDT
Build Identifier: 20100617-1415

If have created a project with a source tree that's multiple levels deep.

There are several syntax errors in various PHP source files.

The PHP Explorer view correctly marks the top-level project directory, each of the source files that contain syntax errors, and the directories directly containing those files with a red 'x' icon.

The intermediate directories (3rd level, 4th level etc, down to the directory directly containing the file) are sometimes, BUT NOT ALWAYS, marked with a red 'x' icon.

This means that after clicking through all 2nd-level directories that have been marked, there are still syntax errors remaining, and from the PHP Explorer view there's no way to tell which subdirectories contain the remaining broken source files - you have to click through each of the directories or use a different view.

You can reduce this to a scenario where there is a single source file with syntax errors, and all the 3rd- and 4th-level directories containing that file are not marked.

I think the 'x'-ing feature is supposed to work differently (correctly marking all levels) and is broken. 


I tried refreshing the view, validating the view and each of the directories,
and manually rebuilding (Build all), but it did not change the marking.


Something that might be relevant: I imported a source tree into the project by copying files into the workspace and adding the source directory under "Project -> Properties -> PHP Build path".

Reproducible: Always

Steps to Reproduce:
1. Take any source tree with various levels of subdirectories (in my example there are four levels of directories below the top-level project directory. That's five levels including the top-level project directory)
2. Willingly cripple the code at random places to contain syntax errors
3. Watch the effect on the red x'es in the tree in the Project Explorer View
   At least some of the 3rd- and 4th-level directories containing errors will 
   not have been marked correctly.
4. Rebuild, refresh, revalidate - whatever. It won't help.
Comment 1 Zhongwei Zhao CLA 2010-08-15 10:32:04 EDT
it is a duplicate of Bug 315403,and there is a patch for dltk.
Comment 2 Zhongwei Zhao CLA 2010-08-15 21:43:01 EDT
*** Bug 315403 has been marked as a duplicate of this bug. ***
Comment 3 Zhongwei Zhao CLA 2010-08-15 21:44:04 EDT
Created attachment 176646 [details]
patch
Comment 4 Roy Ganor CLA 2010-08-16 02:16:15 EDT
Committed to head (seems like a trivial fix)
Alex please review if you have time.

thanks Zhao!
Comment 5 Roy Ganor CLA 2010-08-16 02:16:27 EDT
fixed
Comment 6 Gadi Goldbarg CLA 2010-08-27 01:27:34 EDT
[Petyo Tanchev]

Tested on 2.2.1 SR1
Fixed.