Bug 224333 - Refactoring support
Summary: Refactoring support
Status: RESOLVED WONTFIX
Alias: None
Product: JSDT
Classification: WebTools
Component: General (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.0 M7   Edit
Assignee: Phil Berkland CLA
QA Contact: Phil Berkland CLA
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2008-03-27 06:46 EDT by Etienne Pfister CLA
Modified: 2010-03-03 11:18 EST (History)
0 users

See Also:


Attachments
Patch (735 bytes, patch)
2008-03-27 06:46 EDT, Etienne Pfister CLA
bjorn.freeman-benson: iplog+
Details | Diff
patch to solve MISSING simple name bug (709 bytes, patch)
2008-04-08 07:09 EDT, Etienne Pfister CLA
bjorn.freeman-benson: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Etienne Pfister CLA 2008-03-27 06:46:18 EDT
Created attachment 93780 [details]
Patch

as discussed in email with phil berkland:

for our refactoring support plug-in we need the sourceEnd information in the MethodDeclaration node.
Comment 1 Phil Berkland CLA 2008-03-27 15:58:00 EDT
Patch applied, thank you for your contribution.
Comment 2 Etienne Pfister CLA 2008-04-08 07:09:18 EDT
Created attachment 95183 [details]
patch to solve MISSING simple name bug
Comment 3 Etienne Pfister CLA 2008-04-08 07:10:06 EDT
description of the problem: An assignment with a unnamed function on the right side of the "=", this case can't be handled by the AST. An unknown SimpleName must be named as "" instead of "MISSING". 

The following code can't be handled by the AST:
function f1() {
    this.x = function() {
      ...
    };
}

The result without this patch:
function f1() {
    this.x = function MISSING() {
      ...
    };
}
Comment 4 Phil Berkland CLA 2008-05-05 17:37:21 EDT
The correct thing to to is set the function name to null (instead of an empty SimpleName).  When SimpleName is used, it's name is always mandatory.