Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: PB 12.1 Refactoring support (infrastructure)

11 views
Skip to first unread message

jwayt

unread,
Sep 4, 2010, 9:12:26 AM9/4/10
to
In article <4c814e7f$1@forums-1-dub>, jNOsSPA...@yahoo.com says...
>
> <mental image of wide-eyed kid shaking presents under the tree> ;-))
>
<recollection of said wide-eyed kid submitting the request to ISUG>

Following Mark Maslow's posted link Eclipse says it is:

----------------------------------------------------------------
Types of refactoring in Eclipse

Eclipse's refactoring tools can be grouped into three broad categories
(and this is the order in which they appear in the Refactoring menu):

1. Changing the name and physical organization of code, including
renaming fields, variables, classes, and interfaces, and moving packages
and classes
2. Changing the logical organization of code at the class level,
including turning anonymous classes into nested classes, turning nested
classes into top-level classes, creating interfaces from concrete
classes, and moving methods or fields from a class to a subclass or
superclass
3. Changing the code within a class, including turning local
variables into class fields, turning selected code in a method into a
separate method, and generating getter and setter methods for fields

Several refactorings don't fit neatly into these three categories,
particularly Change Method Signature, which is included in the third
category here.
---------------------------------------------------------------------


Sue's Techwave PB Road-map presentation merely mentioned it among many
things. Talk about burying the lead, if SHE (meaning Sybase) means the
above, this might be the very thing that legacy application developers
will need to better fit migrated apps into the WPF classes.

Mr. Strano will have Christmas in September. Me, too.

I write some window with a bunch of functionality and it inspires
another similar window. Suddenly I'm faced with the choice to refactor
as ancestor and instance classes, to polymorph, or clone and tailor. As
a human being under pressure to reduce costs and delivery time, I weigh
the effort required to do any of the strategies. Clone and Tailor
usually has the least cost--short term. Long term, it is a poor choice
if a third instance appears. A refactoring tool could tip the balance.

Jason 'Bug' Fenter [TeamSybase]

unread,
Sep 3, 2010, 1:01:39 PM9/3/10
to
That's what I was referring to with "Create Method from Selected Script"

It's probably the hardest to implement, though. How do you make sure the
method has access to the required variables from the original script?
How do you decide what the method arguments are? Return type?


On 9/3/2010 11:44 AM, John Strano[Sybase] wrote:
>>> ...Select a bunch of code in the middle of a really large script and click
>>> a
> button. It creates a new function within the object with the selected code
> in it and replaces the code in the original script with a call to the new
> function...<<
>
> Hey, _I_ want that.
>

Roland Smith [TeamSybase]

unread,
Sep 3, 2010, 12:26:51 PM9/3/10
to
Here is one that would be nice:

Select a bunch of code in the middle of a really large script and click a
button. It creates a new function within the object with the selected code
in it and replaces the code in the original script with a call to the new
function.

"Jason 'Bug' Fenter [TeamSybase]" <jason....@teamsybase.com> wrote in
message news:4c8116b3@forums-1-dub...
>I can only speculate, but I know what I'd *like* to see.
>
> "Promote method/event to ancestor"
> "Demote method/event to descendants"
> "Rename method/event/object"


> "Create Method from Selected Script"
>

> ... just to name a few.
>
>
>
> On 9/3/2010 9:36 AM, jwayt wrote:
>> Just what does that mean? Is that removal of descendant code if it was
>> inherited from an ancestor that removed it?
>>


John Strano[Sybase]

unread,
Sep 3, 2010, 3:41:34 PM9/3/10
to
To borrow from Reed Shilts...

<Standard-Disclaimers-Apply/>

>> But what does _SYBASE_ mean when it says that?...

Sybase does announce features when they've been committed to
in our review and approval process.

Customers are informed of that upcoming fuctionality shortly
after we're certain it will be in the designated release.

That being said, I want to thank Jason for a great new
item on my personal wish list.

--
John Strano - Sybase Technology Evangelist


"jwayt" <jwayt_...@iobar.com> wrote in message
news:MPG.26eb074dc...@forums.sybase.com...
> In article <4c813dc0@forums-1-dub>, nichtspa...@johnstrano.com
> says...
>>
>> >>How do you...How do you...
>>
>> Exactly. That's why I want it. It'd be killer though.
>
> But what does _SYBASE_ mean when it says that? If it's due this month,
> somebody ought to know what they are about to deliver!


Mark Maslow

unread,
Sep 3, 2010, 3:05:03 PM9/3/10
to
"Mark Maslow" <mark....@sierraclub.org> wrote in message
news:4c8145fb$1@forums-1-dub...
> Java developers who use Eclipse have had this functionality since at least
> 2003. Below is an article from 9/2003 describing the major refactoring
> features in Eclipse. Note the "Extracting and inlining" section. Eclipse
> does some prompting to make some of the decisions that need to be made.
>
Forgot to add link:

http://www.ibm.com/developerworks/library/os-ecref/


jwayt

unread,
Sep 3, 2010, 10:36:03 AM9/3/10
to

evan

unread,
Sep 3, 2010, 5:10:10 PM9/3/10
to
Sorry to apply the pin to the balloon, but the title means we're working on
the internals required to support refactoring...the work is not
user-visible. Refactoring support will (hopefully) come in PB.NET 15.
Unfortunately, the VS shell does not provide language support for
refactoring, so this is one arena for which we have to completely roll our
own implementation.
We welcome the suggestions for what will go into the very broad category of
refactoring. We will also look at support in other IDEs, such as Eclipse
and VS.

Evan


"jwayt" <jwayt_...@iobar.com> wrote in message

news:MPG.26eac3d19...@forums.sybase.com...

Jerry Siegel [TeamSybase]

unread,
Sep 3, 2010, 3:37:35 PM9/3/10
to
<mental image of wide-eyed kid shaking presents under the tree> ;-))

Report Bugs to Sybase: http://case-express.sybase.com/cx/welcome.do
Product Enhancement Requests:
http://my.isug.com/cgi-bin/1/c/submit_enhancement

John Strano[Sybase]

unread,
Sep 3, 2010, 12:44:24 PM9/3/10
to
>>...Select a bunch of code in the middle of a really large script and click
>>a
button. It creates a new function within the object with the selected code
in it and replaces the code in the original script with a call to the new
function...<<

Hey, _I_ want that.

--

John Strano - Sybase Technology Evangelist


"Roland Smith [TeamSybase]" <rsmith_at_trusthss_dot_com> wrote in message
news:4c8121cb@forums-1-dub...

Mark Maslow

unread,
Sep 3, 2010, 6:48:36 PM9/3/10
to
<Evan [Sybase]> wrote in message news:4c816432$1@forums-1-dub...

> Unfortunately, the VS shell does not provide language support for
> refactoring, so this is one arena for which we have to completely roll our
> own implementation.

Can you really do this completely on your own and compete with existing
IDEs?

I guess it's not really relevant, but I notice that Eclipse came out long
ago with an "infrastructure for language-independent refactorings"

http://wiki.eclipse.org/FAQ_What_is_LTK%3F

Reuse is the best productivity tool there is. Too bad if you really have to
completely reinvent the wheel from scratch.


John Strano[Sybase]

unread,
Sep 3, 2010, 2:26:08 PM9/3/10
to
>>How do you...How do you...

Exactly. That's why I want it. It'd be killer though.

--

John Strano - Sybase Technology Evangelist

"Jason 'Bug' Fenter [TeamSybase]" <jason....@teamsybase.com> wrote in

message news:4c8129f3$1@forums-1-dub...

Brad Wery [TeamSybase]

unread,
Sep 3, 2010, 2:43:27 PM9/3/10
to
VS and ReSharper already do this. If the folks over at Sybase can create
compilers, datawindow painters and UI designers... they are smart enough
to be able to create a refactor tool that can turn a chunk of code into
a method.

---

Q. How do you make sure the method has access to the required variables
from the original script?

A. It doesn't need access, they get passed in as parameters. If they are
referenced passed the new method call, they are passed in by reference.

---

Q. How do you decide what the method arguments are?

A. Anything that's used in the chunk of code that is not declared in the
chunk of code.

----

Q. Return type?

A. Some thought would have to be put into this. In most cases there may
not even be a return value.

jwayt

unread,
Sep 3, 2010, 3:24:01 PM9/3/10
to
In article <4c813dc0@forums-1-dub>, nichtspa...@johnstrano.com
says...
>
> >>How do you...How do you...
>
> Exactly. That's why I want it. It'd be killer though.

But what does _SYBASE_ mean when it says that? If it's due this month,

Jason 'Bug' Fenter [TeamSybase]

unread,
Sep 3, 2010, 11:39:31 AM9/3/10
to
I can only speculate, but I know what I'd *like* to see.

"Promote method/event to ancestor"
"Demote method/event to descendants"
"Rename method/event/object"

"Create Method from Selected Script"

... just to name a few.

On 9/3/2010 9:36 AM, jwayt wrote:

Mark Maslow

unread,
Sep 3, 2010, 3:01:15 PM9/3/10
to
"Jason 'Bug' Fenter [TeamSybase]" <jason....@teamsybase.com> wrote in
message news:4c8129f3$1@forums-1-dub...

> That's what I was referring to with "Create Method from Selected Script"
>
> It's probably the hardest to implement, though. How do you make sure the
> method has access to the required variables from the original script? How
> do you decide what the method arguments are? Return type?

Java developers who use Eclipse have had this functionality since at least

jwayt

unread,
Sep 6, 2010, 3:52:15 PM9/6/10
to
POP! There goes Christmas. Thanks for clearing that up, Evan.

It must be like the tip of the iceberg. You can only see 10% of what is
there.

In article <4c816432$1@forums-1-dub>, <Evan [Sybase]> says...

0 new messages