Skip to content

Commit

Permalink
Merge branch 'dev' into feature/windowForPreview
Browse files Browse the repository at this point in the history
  • Loading branch information
speydril committed Jun 29, 2021
2 parents 3ee3d02 + 4a51fec commit 9d99e1f
Show file tree
Hide file tree
Showing 170 changed files with 759 additions and 65 deletions.
Binary file removed .DS_Store
Binary file not shown.
Binary file removed packages/.DS_Store
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,16 +1,42 @@
baseline
baseline: spec
<baseline>
spec
for: #'common'
do: [
spec
package: 'IconAPI-Core';
package: 'IconAPI-Tests' with: [spec requires: #('default')];
package: 'IconAPI-Debugging' with: [spec requires: #('default')];
yourself.
spec
group: 'default' with: #('IconAPI-Core' );
group: 'tests' with: #('IconAPI-Tests');
group: 'debugging' with: #('IconAPI-Debugging')];
yourself
spec for: #common do:[
spec
"requirements for SwaLint"
project: 'RefactoringBrowser' with: [
spec
className: 'ConfigurationOfRefactoringBrowser';
versionString: #'stable';
loads: #('Core' );
repository: 'http://www.squeaksource.com/MetacelloRepository' ];
"SwaLint setup"
package: 'SwaLint-Preferences' with: [
spec
file: 'SwaLint-Preferences-cypress.1';
repository: 'github://hpi-swa-teaching/SwaLint:main/packages'];
package: 'SwaLint-Core' with: [
spec
file: 'SwaLint-Core-cypress.1';
repository: 'github://hpi-swa-teaching/SwaLint:main/packages';
requires: #('RefactoringBrowser' 'SwaLint-Preferences')];
package: 'SwaLint-PlugIns' with: [
spec
file: 'SwaLint-PlugIns-cypress.1';
repository: 'github://hpi-swa-teaching/SwaLint:main/packages';
requires: 'SwaLint-Core'];

postLoadDoIt: #postLoad;

"IconAPI setup"
package: 'IconAPI-Core';
package: 'IconAPI-Debugging' with: [
spec
requires: #('IconAPI-Core')];
package: 'IconAPI-Tests' with: [
spec
requires: #('IconAPI-Core' 'SwaLint-Core' 'SwaLint-PlugIns' 'IconAPI-Debugging')].

spec
group: 'default' with: #('IconAPI-Core' 'IconAPI-Debugging');
group: 'tests' with: #('IconAPI-Tests')].
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
baseline
postLoad

(Smalltalk globals at: #SwaLint) perform: #install
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
"class" : {
},
"instance" : {
"baseline:" : "han 5/14/2021 12:08" } }
"baseline:" : "han 5/14/2021 12:08" ,
"postLoad" : "hw 5/14/2021 22:15"} }
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
as yet unclassified
extract: anID from: aDirectory

|subdirectories pic|
|subdirectories picture|

subdirectories := aDirectory directoryEntries.
pic := subdirectories last asFileDirectory fileEntries last.
pic copyTo: aDirectory.
subdirectories do: [:subdir | subdir asFileDirectory recursiveDelete].
aDirectory rename: pic name toBe: anID,'.png'
picture := subdirectories last asFileDirectory fileEntries last.
picture copyTo: aDirectory.
subdirectories do: [:subdirectory | subdirectory asFileDirectory recursiveDelete].
aDirectory rename: picture name toBe: anID,'.png'

Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
as yet unclassified
getIconForm: anID

|gzip archive|
|zip archive|

(self directory fileExists: anID,'.png') ifFalse: [
gzip := HTTPSocket httpGet: (self urlPrefix), anID, (self urlSuffix).
zip := HTTPSocket httpGet: (self urlPrefix), anID, (self urlSuffix).
archive := ZipArchive new.
archive readFrom: gzip.
archive readFrom: zip.
archive extractAllTo: self directory.

self extract: anID from: self directory.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"directory" : "hw 6/21/2021 14:00",
"extract:from:" : "hw 6/21/2021 14:03",
"formFrom:" : "hw 6/21/2021 14:37",
"getIconForm:" : "hw 6/21/2021 15:04",
"getIconForm:" : "han 6/24/2021 14:32",
"initialize" : "hw 6/21/2021 14:30",
"urlPrefix" : "hw 6/21/2021 14:00",
"urlSuffix" : "hw 6/21/2021 14:00" } }
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
as yet unclassified
geometry
extent: newExtent

super extent: newExtent.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
as yet unclassified
initialization
initialize

super initializeAllButLabel.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
as yet unclassified
accessing
updateLayout

self extent: self extent;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
as yet unclassified
helper methods
calculateAspectRatio

|gcd|
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
accessing
helper methods
clampToValidScaleFactor: aPoint

(aPoint x < IconMorph minimumScaleFactor) ifTrue: [aPoint setX: IconMorph minimumScaleFactor setY: aPoint y].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ colorWithTransparency: aColor
|bitmap|

bitmap := self originalForm bits.
1 to: bitmap size do: [:pixelIndex |
(1 to: bitmap size) do: [:pixelIndex |
|value alpha red green blue|
value := bitmap at: pixelIndex.
alpha := value bitShift: -24.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
accessing
colorWithoutTransparency: aColor

|colors|
|colors |

colors := self originalForm colorsUsed.
colors := colors reject: [:color | color isTranslucent].
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
accessing
drawing
drawOn: aCanvas

super drawOn: aCanvas.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
accessing
helper methods
generateScaledForm: aPoint

|pair validPoint|
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
as yet unclassified
helper methods
greatestCommonDivisor: aPoint

|valueX valueY helper|
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
accessing
initialization
initialize

super initialize.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ invertWithTransparency
|bitmap|

bitmap := self originalForm bits.
1 to: bitmap size do: [:pixelIndex |
(1 to: bitmap size) do: [:pixelIndex |
|value alpha red green blue|
value := bitmap at: pixelIndex.
alpha := value bitShift: -24.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@
"aspectRatio:" : "LH 5/25/2021 10:06",
"calculateAspectRatio" : "FM 6/15/2021 17:25",
"clampToValidScaleFactor:" : "han 6/8/2021 15:23",
"colorWithTransparency:" : "LH 6/8/2021 17:39",
"colorWithoutTransparency:" : "LH 6/8/2021 17:39",
"createListWindow" : "han 6/29/2021 16:19",
"colorWithTransparency:" : "han 6/24/2021 11:55",
"colorWithoutTransparency:" : "han 6/24/2021 11:46",
"createListWindow" : "FM 6/24/2021 10:42",
"drawOn:" : "LH 5/31/2021 14:46",
"extent:" : "LH 6/2/2021 14:51",
"fetcher" : "hw 6/21/2021 14:43",
Expand All @@ -24,7 +25,7 @@
"iconList:" : "han 6/29/2021 15:00",
"initialize" : "FM 6/24/2021 10:25",
"invert" : "TF 6/3/2021 15:44",
"invertWithTransparency" : "TF 6/3/2021 15:45",
"invertWithTransparency" : "han 6/24/2021 11:55",
"invertWithoutTransparency" : "TF 6/3/2021 15:45",
"openPreviewListWindow" : "han 6/29/2021 16:20",
"originalForm" : "LH 5/31/2021 14:13",
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
},
"instance" : {
"directory" : "hw 6/23/2021 14:31",
"initialize" : "hw 6/23/2021 14:35",
"urlPrefix" : "hw 6/23/2021 14:22",
"urlSuffix" : "hw 6/21/2021 14:39",
"useOutlined" : "hw 6/23/2021 14:35",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
as yet unclassified
building
buildWith: builder

^ builder buildPluggableIconButton: self
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
nil
building
buildWith: builder

^ builder buildPluggableIconMorph: self
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
accessing
initialize-release
initialize

super initialize.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
as yet unclassified
accessing
actionInvertColor

self iconColor: self iconColor inverted
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
as yet unclassified
accessing
actionSetColorBlue

self iconColor: Color blue.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
as yet unclassified
accessing
buildIconButtonSpecWith: aBuilder

^ aBuilder pluggableIconButtonSpec new
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
as yet unclassified
accessing
buildIconSpecWith: aBuilder

^ aBuilder pluggableIconSpec new
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
as yet unclassified
accessing
buildWith: aBuilder

|window|
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
as yet unclassified
accessing
iconColor

^ iconColor
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
as yet unclassified
initialize-release
initialize

super initialize.
Expand Down
4 changes: 4 additions & 0 deletions packages/IconAPI-Tests.package/IconAPILinter.class/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
CRLinter is a class that is used to test the package 'ChangesReloaded-Core' with the linting rules provided by SwaLint. Could be used for any package though.

Instance Variables
classes: A Collection of classes that are supposed to be checked by the linting rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
packages
iconAPICorePackage

^ self namedPackage: 'IconAPI-Core'
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
packages
iconAPITestsPackage

^ self namedPackage: 'IconAPI-Tests'
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
packages
namedPackage: aString

^ PackageOrganizer default packageNamed: aString ifAbsent: [self error: aString , ' package is missing']
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
testing-utils
assertAll: aCollectionOfNumbers areBelowThreshold: aNumber

self assert: (aCollectionOfNumbers allSatisfy: [:each | each < aNumber])
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
testing-utils
assertAll: aCollectionOfObjects areEqualTo: anObject

self assert: (aCollectionOfObjects allSatisfy: [:each | each = anObject])
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
testing-utils
assertAll: aCollectionOfNumbers areOverThreshold: aNumber

self assert: (aCollectionOfNumbers allSatisfy: [:each | each > aNumber])
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
testing-utils
assertAllAreFalse: aCollectionOfBooleans

self assertAll: aCollectionOfBooleans areEqualTo: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
testing-utils
assertAllAreZero: aCollectionOfNumbers

self assertAll: aCollectionOfNumbers areEqualTo: 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
test-for-disharmonies
brokenTestBrainMethod
"wrong SL Type"

self assertAllAreFalse: (self runLinterRule: #brainMethod:)
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
test-for-disharmonies
brokenTestDispersedCoupling
"wrong SL Type"

self assertAllAreFalse: (self runLinterRule: #dispersedCoupling:)
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
test-for-disharmonies
brokenTestFeatureEnvy
"wrong SL Type"

self assertAllAreFalse: (self runLinterRule: #featureEnvy:)
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
test-unnecessary-code
brokenTestInstanceVariablesNotReadAndWritten
"literally broken"

self assertAllAreZero: (self runLinterRule: #smallLintOnlyReadOrWrittenVariable)
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
test-for-disharmonies
brokenTestIntensiveCoupling
"wrong SL Type"

self assertAllAreFalse: (self runLinterRule: #intensiveCoupling:)
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
test-for-spelling
brokenTestLiteralValues
"literally inherently broken"

self assertAllAreZero: (self runLinterRule: #smallLintLiteralValuesSpelling)
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
test-for-spelling
brokenTestMethodSelectors
"literally inherently broken"

self assertAllAreZero: (self runLinterRule: #smallLintMethodSelectorsSpelling)
Loading

0 comments on commit 9d99e1f

Please sign in to comment.