Improvements to RBMedExtensions

VA Smalltalk is a "100% VisualAge compatible" IDE that includes the original VisualAge technology and the popular VA Assist and WidgetKit add-ons.

Moderators: Eric Clayberg, wembley, tc, Diane Engles, solveig

Improvements to RBMedExtensions

Postby jtuchel » Thu Nov 25, 2010 12:44 am

I mentioned it before: the refactoring tools in VAST could be improved a lot with little changes.

One thing that annoys me constantly is that the browsers always ask me for inst or class var names to rename or create Accessors for, even if I have a variable name selected in the class definition.

The solution is quite easy: change EtAbstractMethodsBrowser>>#createInstVarAccessors to:

Code: Select all
   | instVars |
   self changeRequest ifFalse: [^self].
   instVars := (self selectedText isNil or: [self selectedText isEmpty]) "Use the selection if available"
   ifTrue: [self selectInstanceVariables] ifFalse: [self selectedText subStrings]. "Even prepared for selection of multiple variable names"
   instVars isEmpty ifTrue: [^self].
   instVars do: [:each |
      self handleError: [
            variable: each
            class: self actualClass
            classVariable: false) execute]].
   self changedClass

With this fix in place the system asks no questions if I want to create an accessor for one selected inst var name.
Fixing renameInstVar:in: should be equally easy. The same goes for class variables.

I would like to go one step further: The "selection..." Menu is only active if only one variable name is selected. Why shouldn't this be also possible for multiple instVars?
Posts: 245
Joined: Fri Oct 05, 2007 1:05 am
Location: Ludwigsburg, Germany

Re: Improvements to RBMedExtensions

Postby tc » Fri Nov 26, 2010 8:35 am


I opened Case #47907 for this issue.


Posts: 304
Joined: Tue Oct 17, 2006 7:40 am
Location: Raleigh, NC

Return to VA Smalltalk 7.0, 7.5 & 8.0

Who is online

Users browsing this forum: Google [Bot] and 1 guest