Bug 480759 - Create TraitDeclarationContexts
Summary: Create TraitDeclarationContexts
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: PHP Core CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-27 07:14 EDT by Dawid Pakula CLA
Modified: 2020-05-14 10:16 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dawid Pakula CLA 2015-10-27 07:14:57 EDT
ClassStatementContext have very simple detection. It check enclosingElement and if it's non-namespace IType returns true. 
Because it's exclusive,  will be auto disabled in case when any other exists, for example ClassImplementsContext.

For this cases, contexts not exists:
interface | {}
interface T| {}
trait | {} 
trait T| {}
 
So constants (bug 477260) or public/private.. keywords will be reported.

We should create contexts similar to ClassDeclarationContext for such cases.
Comment 1 Dawid Pakula CLA 2020-01-11 08:20:49 EST
Situation has been changed a little bit.

For now exists specialised contexts for class/interface declaration header body is covered via one context for everything: TypeStatementContext

For traits we haven't special CA in declaration, we should have:
1. support for "extends" keyword in header (similar to InterfaceDeclarationKeywordContext)
2. trait list CA after "extends'