Epicea vs RB refactorings

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Epicea vs RB refactorings

Peter Uhnak
Hi,

I'm under the impression that Epicea is supposed to replace RB refactorings at some point.

If that is true, is it currently possible to build refactorings by hand?

For example in RB I often do:

```
model := RBNamespace new.

model defineClass: ('<1s> subclass: #<2s><n><t>instanceVariableNames: <3p><n><t>classVariableNames: ''''<n><t>poolDictionaries: ''''<n><t>category: <4p>' expandMacrosWith: 'Object' with: 'MySomething' with: 'var1 var2' with: 'MyPackage').
cls := model classNamed: #MySomething.
cls compile: 'var1
        ^ var1' classified: 'accessing'.

(ChangesBrowser changes: model changes changes) open
```

or

(removing a method from a class)
```
model := RBNamespace new.
model removeMethod: #testTrimRight from: StringTest.
(ChangesBrowser changes: model changes changes) open
```

Thanks,
Peter

Reply | Threaded
Open this post in threaded view
|

Re: Epicea vs RB refactorings

Peter Uhnak
anyone?

On Wed, Apr 26, 2017 at 11:19:07AM +0200, Peter Uhnak wrote:

> Hi,
>
> I'm under the impression that Epicea is supposed to replace RB refactorings at some point.
>
> If that is true, is it currently possible to build refactorings by hand?
>
> For example in RB I often do:
>
> ```
> model := RBNamespace new.
>
> model defineClass: ('<1s> subclass: #<2s><n><t>instanceVariableNames: <3p><n><t>classVariableNames: ''''<n><t>poolDictionaries: ''''<n><t>category: <4p>' expandMacrosWith: 'Object' with: 'MySomething' with: 'var1 var2' with: 'MyPackage').
> cls := model classNamed: #MySomething.
> cls compile: 'var1
> ^ var1' classified: 'accessing'.
>
> (ChangesBrowser changes: model changes changes) open
> ```
>
> or
>
> (removing a method from a class)
> ```
> model := RBNamespace new.
> model removeMethod: #testTrimRight from: StringTest.
> (ChangesBrowser changes: model changes changes) open
> ```
>
> Thanks,
> Peter

Reply | Threaded
Open this post in threaded view
|

Re: Epicea vs RB refactorings

Denis Kudriashov
In reply to this post by Peter Uhnak

2017-04-26 11:19 GMT+02:00 Peter Uhnak <[hidden email]>:
Hi,

I'm under the impression that Epicea is supposed to replace RB refactorings at some point.

I think it was never the goal and not supposed to happen. Epicea is only changes logger. Maybe Martin will correct me. 
 

If that is true, is it currently possible to build refactorings by hand?

For example in RB I often do:

```
model := RBNamespace new.

model defineClass: ('<1s> subclass: #<2s><n><t>instanceVariableNames: <3p><n><t>classVariableNames: ''''<n><t>poolDictionaries: ''''<n><t>category: <4p>' expandMacrosWith: 'Object' with: 'MySomething' with: 'var1 var2' with: 'MyPackage').
cls := model classNamed: #MySomething.
cls compile: 'var1
        ^ var1' classified: 'accessing'.

(ChangesBrowser changes: model changes changes) open
```

or

(removing a method from a class)
```
model := RBNamespace new.
model removeMethod: #testTrimRight from: StringTest.
(ChangesBrowser changes: model changes changes) open

I use directly RBRefactoring subclasses:

ref := RBRemoveMethodRefactoring removeMethods: #(testTrimRight) from: StringTest.
ref execute."perform complete changes without preview"
ref primitiveExecute. "for preview"
(ChangesBrowser changes: {ref}) open.



Reply | Threaded
Open this post in threaded view
|

Re: Epicea vs RB refactorings

tinchodias


On Wed, May 3, 2017 at 5:22 AM, Denis Kudriashov <[hidden email]> wrote:

2017-04-26 11:19 GMT+02:00 Peter Uhnak <[hidden email]>:
Hi,

I'm under the impression that Epicea is supposed to replace RB refactorings at some point.

I think it was never the goal and not supposed to happen. Epicea is only changes logger. Maybe Martin will correct me. 

Yes, Epicea uses RB refactorings and doesn't pretend replacing it.
 
 

If that is true, is it currently possible to build refactorings by hand?

For example in RB I often do:

```
model := RBNamespace new.

model defineClass: ('<1s> subclass: #<2s><n><t>instanceVariableNames: <3p><n><t>classVariableNames: ''''<n><t>poolDictionaries: ''''<n><t>category: <4p>' expandMacrosWith: 'Object' with: 'MySomething' with: 'var1 var2' with: 'MyPackage').
cls := model classNamed: #MySomething.
cls compile: 'var1
        ^ var1' classified: 'accessing'.

(ChangesBrowser changes: model changes changes) open
```

or

(removing a method from a class)
```
model := RBNamespace new.
model removeMethod: #testTrimRight from: StringTest.
(ChangesBrowser changes: model changes changes) open

I use directly RBRefactoring subclasses:

ref := RBRemoveMethodRefactoring removeMethods: #(testTrimRight) from: StringTest.
ref execute."perform complete changes without preview"
ref primitiveExecute. "for preview"
(ChangesBrowser changes: {ref}) open.




Reply | Threaded
Open this post in threaded view
|

Re: Epicea vs RB refactorings

Stephane Ducasse-3
In reply to this post by Peter Uhnak
Nonsense
Epicea has nothing to do with RB goals.

Epicea is to replace the changes file because we want a better change file and separate
the code management from the version recording (micro commits). 

Source code could be managed in a separate database and microchanges 
can be managed to recover changes but not actually showing the latest version of a method.

Stef

Stef

On Wed, Apr 26, 2017 at 11:19 AM, Peter Uhnak <[hidden email]> wrote:
Hi,

I'm under the impression that Epicea is supposed to replace RB refactorings at some point.

If that is true, is it currently possible to build refactorings by hand?

For example in RB I often do:

```
model := RBNamespace new.

model defineClass: ('<1s> subclass: #<2s><n><t>instanceVariableNames: <3p><n><t>classVariableNames: ''''<n><t>poolDictionaries: ''''<n><t>category: <4p>' expandMacrosWith: 'Object' with: 'MySomething' with: 'var1 var2' with: 'MyPackage').
cls := model classNamed: #MySomething.
cls compile: 'var1
        ^ var1' classified: 'accessing'.

(ChangesBrowser changes: model changes changes) open
```

or

(removing a method from a class)
```
model := RBNamespace new.
model removeMethod: #testTrimRight from: StringTest.
(ChangesBrowser changes: model changes changes) open
```

Thanks,
Peter