[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
| 
Re: AW: [jdt-ui-dev] Extract Method Refactoring
 | 
Hi Jens,
one that has higher proiority is to finish Self Encapsulate Field ;-))
Although with your contribution it now handles more cases, there are still
open issues:
- compound assignments
- all the cases currently rejected in  AccessAnalyzer.checkParent(). One
simple soultion is to return the value from the setter method. But I think
that in 90% of the cases
  this isn't needed. So we should only return it if needed. We should use
the same strategy for inc and dec methods too.
- the UI needs some fields for the inc and dec method names.
- the inc and dec method generate code with this.field. This is not
necessary and isn't normal Java style.
- test cases. Here you have to wait until the test cases are also open
source. But I think this will happen in the next days.
I also comment on your code. See the attachment.
Regarding try/catch block. I don't think that you should start implementing
it, since it is already implemented in extract method. The only thing we
have to do is to refactor the code a little bit and then we will get
surround with try/catch block for free.
Dirk
|------------------------+------------------------+------------------------|
|                        |   "Jens Lukowski"      |                        |
|                        |   <jens.lukowski@xxxxxx|           To:          |
|                        |   >                    |   <jdt-ui-dev@eclipse.o|
|                        |   Sent by:             |   rg>                  |
|                        |   jdt-ui-dev-admin@ecli|           cc:          |
|                        |   pse.org              |           Subject:     |
|                        |                        |   AW: [jdt-ui-dev]     |
|                        |   10.12.2001 16:09     |   Extract Method       |
|                        |   Please respond to    |   Refactoring          |
|                        |   jdt-ui-dev           |                        |
|                        |                        |                        |
|------------------------+------------------------+------------------------|
-----Ursprüngliche Nachricht-----
Von: jdt-ui-dev-admin@xxxxxxxxxxx
[mailto:jdt-ui-dev-admin@xxxxxxxxxxx]Im Auftrag von Scott Stanchfield
Gesendet: Montag, 10. Dezember 2001 15:48
An: jdt-ui-dev@xxxxxxxxxxx
Betreff: RE: [jdt-ui-dev] Extract Method Refactoring
<[How to extract method]
1) Select the code you want
2) Choose Refactor->Extract Method
I assume you were looking for a popup menu choice in the editor (I know I
was ;)>
yes, that`s it! silly me! ;-(
sorry, ok what about other refactorings which need to be done ?
I think I'll first start with try/catch
but are there others which are high in priority (or preferred) ?
<There should be a refactor submenu on the popup menu in the editor to make
it more obvious.>
would be a good idea
thanx
 Jens
_______________________________________________
jdt-ui-dev mailing list
jdt-ui-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/jdt-ui-dev
Attachment:
AccessAnalyzer.java
Description: Binary data
Attachment:
EncapsulateIncAccess.java
Description: Binary data
Attachment:
EncapsulateReadAccess.java
Description: Binary data
Attachment:
EncapsulateWriteAccess.java
Description: Binary data
Attachment:
SelfEncapsulateFieldRefactoring.java
Description: Binary data