Bug 280164 - [Code Assist] Static methods/fields are not proposed
Summary: [Code Assist] Static methods/fields are not proposed
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: PHP Core CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2009-06-13 04:38 EDT by Roy Ganor CLA
Modified: 2020-05-14 11:18 EDT (History)
2 users (show)

See Also:


Attachments
patch for code assist behavior (160.55 KB, patch)
2009-06-21 10:14 EDT, Vadim Punski CLA
jacek.pospychala: iplog+
Details | Diff
changes description for patch (31.50 KB, application/vnd.ms-excel)
2009-06-21 10:15 EDT, Vadim Punski CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roy Ganor CLA 2009-06-13 04:38:17 EDT
Code assist doesn't propose static methods/fields in an object trigger context.

For example:

<?php
class Example {
  public static function publicsf() { echo "publicsf"; }
  public static $publicsf = "publicsf";

  protected static function protectedsf() { echo "protectedsf"; }
  protected static $protectedsf = "protectedsf";

  private static function privatest() { echo "privatest"; }
  private static $privatest = "privatest";

  function foo() {
     $this->|
  }
}

$e = new Example();
$e->|
Example::|

?>

In this example only the last code assist works as expected.
the first two should propose the static functions/fields (depending on the visibility allowed)
Comment 1 Vadim Punski CLA 2009-06-21 10:14:28 EDT
Created attachment 139708 [details]
patch for code assist behavior

This patch solves the issue described.
It also fixes a number of wrong code assist behaviors, that described in the  spreadsheet attached.

A lot of pdtt test files changes.
Comment 2 Vadim Punski CLA 2009-06-21 10:15:21 EDT
Created attachment 139709 [details]
changes description for patch
Comment 3 Michael Spector CLA 2009-06-21 14:42:03 EDT
Applied to HEAD.
Comment 4 Gadi Goldbarg CLA 2010-01-22 08:14:17 EST
Re-tested at PDT 2.2.0.v20100118 - Static method and field are shown for content assist proposal at static invocation

-- Verified by Teodor Kirkov --
-- teodor.k@zend.com --