eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'VersionDiffBrowser':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: VersionDiffBrowser


Inheritance:

   Object
   |
   +--Model
      |
      +--ApplicationModel
         |
         +--VersionDiffBrowser

Package:
stx:libtool
Category:
Interface-Browsers
Version:
rev: 1.164 date: 2018/05/23 09:56:03
user: cg
file: VersionDiffBrowser.st directory: libtool
module: stx stc-classLibrary: libtool

Description:


This is not yet finished (work in progress).

A quickly hacked up browser to show differences between class versions,
allowing easy comparison; will also eventually add capabilities
to checkIn / load classes into / from the repository.


[instance variables:]

[class variables:]


Related information:



Class protocol:

interface specs
o  windowSpec
This resource specification was automatically generated
by the UIPainter of ST/X.
usage example(s):
     UIPainter new openOnClass:VersionDiffBrowser andSelector:#windowSpec
     VersionDiffBrowser new openInterface:#windowSpec
     VersionDiffBrowser open

o  windowSpecForMultipleVersions
This resource specification was automatically generated
by the UIPainter of ST/X.
usage example(s):
     UIPainter new openOnClass:VersionDiffBrowser andSelector:#windowSpecForMultipleVersions
     VersionDiffBrowser new openInterface:#windowSpecForMultipleVersions

menu specs
o  filterMenu
This resource specification was automatically generated
by the MenuEditor of ST/X.

o  mainMenu
This resource specification was automatically generated
by the MenuEditor of ST/X.
usage example(s):
     MenuEditor new openOnClass:VersionDiffBrowser andSelector:#mainMenu
     (Menu new fromLiteralArrayEncoding:(VersionDiffBrowser mainMenu)) startUp

o  menuA
This resource specification was automatically generated
by the MenuEditor of ST/X.

o  menuB
This resource specification was automatically generated
by the MenuEditor of ST/X.
usage example(s):
     MenuEditor new openOnClass:VersionDiffBrowser andSelector:#menuB
     (Menu new fromLiteralArrayEncoding:(VersionDiffBrowser menuB)) startUp

o  menuM
This resource specification was automatically generated
by the MenuEditor of ST/X.

o  versionsMenu
This resource specification was automatically generated
by the MenuEditor of ST/X.

o  viewMenu
This resource specification was automatically generated
by the MenuEditor of ST/X.

plugIn spec
o  aspectSelectors
This resource specification was automatically generated
by the UIPainter of ST/X.

startup
o  openOnAllVersionsOfClass: aClass
create a VersionDiffBrowser instance and set the class change set of the
browser. The class diff set is generated from aClasses current version against
the selected version in the top selection list
usage example(s):
     self openOnAllVersionsOfClass:Object

o  openOnClass: aClass againstVersion: aVersionA
create a VersionDiffBrowser instance and set the class change set of the
browser. The class diff set is generated from aClasses current against some version
via the source code manager.
usage example(s):
     self openOnClass:Array againstVersion:'1.116'
     self openOnClass:Array againstVersion:nil            - against the version on which Array is based upon
     self openOnClass:Array againstVersion:#newest        - against the newest repository version

     self openOnClass:VersionDiffBrowser againstVersion:nil
     self openOnClass:VersionDiffBrowser againstVersion:#newest

     (self openOnClass:ByteArray againstVersion:'1.116') includeExtensionsHolder value:true

o  openOnClass: classA labelA: aLabelA andClass: classB labelB: aLabelB title: title
create a VersionDiffBrowser instance and set the class change set of the
browser. The class diff set is generated from two classes.
usage example(s):
     self
        openOnClass:Array labelA:'Array'
        andClass:Collection labelB:'Collection'
        title:'Array vs. Collection'

o  openOnClass: classA labelA: aLabelA andClass: classB labelB: aLabelB title: title ifSame: sameAction
create a VersionDiffBrowser instance and set the class change set of the
browser. The class diff set is generated from two classes.

o  openOnClass: aClass labelA: aLabelA sourceA: aSourceA labelB: aLabelB sourceB: aSourceB
create a VersionDiffBrowser instance and set the class change set of the
browser. The class diff set is generated from two source files.

o  openOnClass: aClass labelA: aLabelA sourceA: aSourceA labelB: aLabelB sourceB: aSourceB title: ignoredTitle
create a VersionDiffBrowser instance and set the class change set of the
browser. The class diff set is generated from two source files.

o  openOnClass: aClass labelA: aLabelA sourceA: aSourceA labelB: aLabelB sourceB: aSourceB title: ignoredTitle ifSame: sameAction
create a VersionDiffBrowser instance and set the class change set of the
browser. The class diff set is generated from two source files.

o  openOnClass: aClass versionA: versionA versionB: versionB
create a VersionDiffBrowser instance and set the class change set of the
browser. The class diff set is generated from two versions of aClass via
the source code manager.
usage example(s):
     self openOnClass:Array versionA:'1.116' versionB:'1.113'
     self openOnClass:Array versionA:'1.113' versionB:'1.116'

o  openOnClassChangeSet: classChangeSet title: title
create a VersionDiffBrowser instance and set the class change set of the
browser. The class diff set is generated from two classes.

o  openOnDiffSet: diffSet labelA: aLabelA labelB: aLabelB title: ignoredTitle

o  openOnDiffSet: diffSet labelA: aLabelA labelB: aLabelB title: ignoredTitle ignoreExtensions: ignoreExtensionsBoolean

o  openOnDiffSet: diffSet labelA: aLabelA labelB: aLabelB title: ignoredTitle ignoreExtensions: ignoreExtensionsBoolean ignoreVersionMethods: ignoreVersionMethodsBoolean

o  openOnDiffsBetweenFile: file1 and: file2
VersionDiffBrowser
openOnDiffsBetweenFile:'/phys/exept/tmp/ws/Workflow::BlockDescription.st'
and:'/phys/exept/tmp/workflowClasses/Workflow::BlockDescription.st'


Instance protocol:

accessing
o  beMultipleVersionBrowser

o  canIncludeExtensions: something

o  changeSetA
gets the change set which contains only the new methods
in versionA of the class

<return: ChangeSet>

o  changeSetB
gets the change set which contains only the new methods
in versionB of the class

<return: ChangeSet>

o  class: aClass versionA: revA versionB: revB

o  classBeingCompared
returns the class from the change set which is compared.

<return: Class>

o  classChangeSet
returns the class change set which is the model of the version diff browser.

o  classChangeSet: aClassChangeSet
sets the class change set which is the model of the version diff browser.
The labels, the lists, the visibility and the selection of the lists must be reseted
when a new change set is given.

o  ignoreExtensions
if true, extension methods are suppressed.
Ignoring is useful when comparing for baseClass checkin,
as opposed to extension-checking, where extensions should not be ignored.
the default is false

o  ignoreExtensions: aBoolean
if true, extension methods are suppressed.
Ignoring is useful when comparing for baseClass checkin,
as opposed to extension-checking, where extensions should not be ignored.
the default is false

o  ignoreVersionMethods: aBoolean
if true, version methods (version and version_XXX) are suppressed.
Ignoring is useful when comparing for real code changes.
the default is false

o  isMultipleVersionBrowser

o  selectedChangeInA
gets the selected method change for the 'method only in version A'.

<return: MethodChange | nil>

o  selectedChangeInB
gets the selected method change for the 'method only in version B'.

<return: MethodChange | nil>

o  selectedChangesInM
get the two method changes for the selected 'changed method'.

<return: <Array with:MethodChange with:MethodChange | nil>>

o  versionA
gets the first class version to be compared

<return: String>

o  versionB
gets the second class version to be compared

<return: String>

actions
o  acceptInLeftView

o  acceptInRightView

o  acceptInSingleView

o  applyChange: change

o  applySelectedChangeInA

o  applySelectedChangeInB

o  methodInADoubleClicked: index
|change|

o  methodInBDoubleClicked: index
|change|

o  methodInChangedDoubleClicked: index

o  removeSelectedChangeInBFromImage

o  showLogMessages
the UI shows code-diffs if any change is selected, and version log entries otherwise.
But there is no way to deselect any of the method-change-lists, to go back to log-messages,
once a method has been looked at.
This view-menu entry helps.

aspects
o  boxAVisible

o  boxBVisible

o  boxMVisible

o  canIncludeExtensionsHolder
can include extensions ? (menu item enabler)

o  changedLabelHolder
aspect for the label of the changed method box.

<return: ValueHolder on: nil>

o  diffTextLabelA
aspect for the label for version A.

<return: ValueHolder on: nil>

o  diffTextLabelB
aspect for the label for version B.

<return: ValueHolder on: nil>

o  diffTextView
return the component for the diff text view.

<return: HVScrollableView>

o  hideDiffsWithCommentOrFormattingChangeOnly

o  hideDiffsWithCommentOrFormattingChangeOnlyHolder
hide changes which have no semantic effect?

o  includeCategoryChanges

o  includeCategoryChanges: aBoolean

o  includeCategoryChangesHolder

o  includeExtensions

o  includeExtensions: aBoolean

o  includeExtensionsHolder
only compare base-methods or include extensions ?

o  includeVersionMethods

o  includeVersionMethods: aBoolean

o  includeVersionMethodsHolder

o  infoHolder

o  methodText
aspect for the text in the method text view.

<return: ValueHolder on: nil>

o  methodsChanged
aspect for the 'changed method' list.

<return: List>

o  methodsChangedSelection
aspect for the selection holder of 'changed method'-list.

<return: ValueHolder on: nil>

o  methodsOnlyInA
aspect for the 'method only in version A' list.

o  methodsOnlyInASelection
aspect for the selection holder of 'method only in version A'-list.

o  methodsOnlyInB
aspect for the 'method only in version B' list

o  methodsOnlyInBSelection
aspect for the selection holder of 'method only in version B'-list.

o  onlyInALabelHolder
aspect for the label for 'method only in version A'.

o  onlyInBLabelHolder
aspect for the label for 'method only in version B'.

o  selectedSymbolicVersionHolder

o  selectedVersionHolder

o  selectedVersionIndex

o  selectedVersionIndexHolder

o  symbolicVersionList

o  versionEntriesList

o  versionList

aspects-exported
o  changedLabelHolder: aValueHolder

o  classHolder: aValueHolder

o  onlyInALabelHolder: aValueHolder

o  onlyInBLabelHolder: aValueHolder

o  versionAHolder: aValueHolder

o  versionBHolder: aValueHolder

aspects-menu
o  canAcceptInCodeView

o  hasChangeSelectedInA

o  hasChangeSelectedInB

o  hasChangeSelectedInM

o  hasNextVersionInVersionList
versions are sorted youngest first.
If the current selected one is the first, there is no next version

o  hasPreviousVersionInVersionList
versions are sorted youngest first.
If the current selected one is the last, there is no previous version

o  showingClassChangeSet

o  versionsMenu

change & update
o  filterChanged
remember selection and scroll positions

o  methodsChangedSelectionChanged
the selection in the list of the 'changed methods' changed.
Reset the selection of the two other lists and calc the method change.

<return: self>

o  methodsOnlyInASelectionChanged
the selection in the list of the 'method only in version A' changed.
Reset the selection of the two other lists and show the method in
the text view.

<return: self>

o  methodsOnlyInBSelectionChanged
the selection in the list of the 'method only in version B' changed.
Reset the selection of the two other lists and show the method in
the text view.

<return: self>

o  selectedSymbolicVersionHolderChanged

o  selectedVersionHolderChanged
remember the previous selected method

o  selectedVersionIndexHolderChanged

o  shortChangeInfoFor: changeA and: changeB
see if the semantics have changed (or only prettyPrinted)

o  update: something with: parameter from: changedObject
(comment from inherited method)
dependent is notified of some change -
Default is to try update:with:

o  updateLabels
update the labels of the diff text view. Show the version numbers
of the class.

o  updateLists
walk over the changeSet(s) and setup the 3 lists:
onlyInA, changed, onlyInB,
Optionally filter extensions, categoryChanges and versionMethods,
changes with same semantic (variable renames)
and changes which have been explicitly filtered by the user.

o  updateVersionList
asks the classes source code manager for a list of revisions;
construct versionInfoList (containing the full info), versionList (containing version numbers only)
and tagList (containing symbolic names only).
This is only used when comparing multiple versions.

initialization & release
o  postBuildWith: aBuilder
components which are invisible should be ignored by the panel.
Cannot be set via the interface builder.

<return: self>

o  postOpenWith: aBuilder

menu action
o  browseChange: aChange
browse the change in aChange

o  browseClassInA
browse the selected method.

o  browseClassInB
browse the selected method.

o  browseClassInM
browse the selected method.

o  createPatchFile
create a patchFile, to patch the old version (versionA) into the new version (versionB).
I.e. a little changeFile to transport those changes.

o  hideDiffsWithCommentOrFormattingChangeOnlyHolder: newValue
state of hide changes which have no semantic effect has changed

o  inspectSelectedChangeInA
inspect the selected method change for the 'method only in version A'.

o  inspectSelectedChangeInB
inspect the selected method change for the 'method only in version B'.

o  inspectSelectedChangeInM
inspect the two method changes for the selected 'changed method'.

o  mainMenu
if this application runs as an subapplication,
the menu bar should not be used.

o  menuAHolder

o  menuBHolder

o  menuMHolder

o  openDocumentation

o  removeClassFromChangeSet
only do if we compare a single class

o  versionMenuCompareAgainstNextVersion

o  versionMenuCompareAgainstPreviousVersion

menu action - filters
o  currentFilterParameters
get the current settings

o  exportFilterParameters
generate XML with the current settings
(to be pasted into Jabber for interchange)

o  filterClassInA
filter all changes for the selected change's class (don't show it).

o  filterClassInB
filter all changes for the selected change's class (don't show it).

o  filterClassInM
filter all changes for the selected change's class (don't show it).

o  filterClassesMatching
ask for a GLOB pattern;
filter all changes with matching classnames .

o  filterMethod: aChange
filter this change (don't show it).

o  filterMethodInA
filter this entry (don't show it).

o  filterMethodInB
filter this entry (don't show it).

o  filterMethodInM
filter this entry (don't show it).

o  filterSelectorFromA
filter all changes for the selected change's selector(don't show it).

o  filterSelectorFromB
filter all changes for the selected change's selector(don't show it).

o  filterSelectorFromChange: aChange
common to set a filter;
gets the change as argument,
takes its selector and adds it to the filters

o  filterSelectorFromM
filter all changes for the selected change's selector(don't show it).

o  filterSelectorFromSet: setOfChanges
common to set a filter;
get the sub-set (A,B,M as argument),
takes its first selection and adds it to the filters

o  filterSelectorsMatching
ask for a GLOB pattern;
filter all changes with matching selectors.

o  forgetFilterNamed
forget a remembered named filter

o  importFilterParameters
ask for XML representation as exported previously.
(to be pasted from Jabber for interchange)

o  inspectFilterParameters
inspect the current settings

o  loadFilterNamed
load a remembered named filter

o  rememberFilterAs
remember the current settings under a named filter

o  removeClassFilter
clear the current class filter (but not named ones)

o  removeSelectorFilter
clear the current selector filter (but not named ones)

o  setFilterParameters: filterParameters
setup from a remembered filter

menu action - searching
o  findNextChangeWithStringIn: listOfchanges selectionHolder: whichMethodSelectionHolder
common code to select the next change which contains some string

o  findNextChangeWithStringInA
select the next change which contains some string

o  findNextChangeWithStringInB
select the next change which contains some string

o  findNextChangeWithStringInM
select the next change which contains some string

o  findNextChangeWithStringInPairs: listOfchangePairs selectionHolder: whichMethodSelectionHolder
select the next change which contains some string

private
o  addAcceptToTextViewMenus
add to the standard diff text view or single text views menu an accept entry.
The acceptAction will fetch the corresponding change and apply it
(not the shown text)

<return: self>

o  information: msg
(comment from inherited method)
like Object's information, but translates the string via the
resourcePack, thus giving a translated string automatically

o  printStringForChange: aChange
generate a print string for a change.

o  resetSelectionHolders
reset all selection holders when a new change set is given.
First set the selection to nil.

<return: self>

o  showDiffTextView
if a method change is selected, then show the diff text view.
Add an accept entry to the popup menu.

<return: self>

o  showSingleTextView
if a method is selected which is only in version A or B of the class,
then show the text view.
Add an accept entry to the popup menu.

<return: self>

o  showVersionInfoIfNothingSelected
show the revision info (author, date, time and logMessage), if no method is selected

setup
o  setupForClass: aClass againstVersion: aVersionA
compute the class change set for the class aClass of its current version against the repository version A.
When setting the class change set, the labels, list etc. of the receiver
are updated.

o  setupForClass: classA labelA: aLabelA andClass: classB labelB: aLabelB
generate the class change set from the two classes A and B.
When setting the class change set, the labels, list etc. of the receiver
are updated.

o  setupForClass: aClass labelA: aLabelA sourceA: aSourceA labelB: aLabelB sourceB: aSourceB
generate the class change set from the two source files A and B.
When setting the class change set, the labels, list etc. of the receiver
are updated.

o  setupForClass: aClass versionA: aVersionA versionB: aVersionB
compute the class change set for the class aClass and the versions A and B.
When setting the class change set, the labels, list etc. of the receiver
are updated.

o  setupForDiffSet: diffSet labelA: aLabelA labelB: aLabelB


Private classes:

    ClassChangeSet
    FilterParameters


ST/X 7.1.0.0; WebServer 1.663 at exept.de:8081; Sat, 23 Mar 2019 08:28:11 GMT