Skip to content

Commit

Permalink
added preview in the tile of the builder
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanmontt committed Nov 10, 2021
1 parent e7c6a02 commit daf6e4d
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions src/RewriteRuleBuilder/RewriteRuleBuilderPresenter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ RewriteRuleBuilderPresenter class >> iconName [
RewriteRuleBuilderPresenter class >> menuCommandOn: aBuilder [

<worldMenu>
(aBuilder item: 'RewriteRuleBuilder')
(aBuilder item: 'RewriteRuleBuilder (preview)')
parent: #Tools;
action: [ self open ];
order: 33;
Expand Down Expand Up @@ -253,7 +253,7 @@ RewriteRuleBuilderPresenter >> initializePresenters [
RewriteRuleBuilderPresenter >> initializeWindow: aWindowPresenter [

aWindowPresenter
title: self class title;
title: self class title, '(Preview version)';
initialExtent: 840 @ 650;
windowIcon: self class icon;
askOkToClose: false;
Expand Down Expand Up @@ -389,12 +389,15 @@ RewriteRuleBuilderPresenter >> rhs: aString [
{ #category : #actions }
RewriteRuleBuilderPresenter >> saveRule [

^ RTCustomRuleGenerator new
searchFor: self lhs;
replaceWith: self rhs;
inputCode: self inputCode;
outputCode: self outputCode;
storeRule: loadedRule className isForMethod: false
| ruleHolder |
ruleHolder := RTRuleHolder
lhs: self lhs
rhs: self rhs
isForMethod: false
inputCode: self inputCode
outputCode: self outputCode.

^ RTRuleSaver storeRuleOnDisk: ruleHolder
]

{ #category : #accessing }
Expand Down

0 comments on commit daf6e4d

Please sign in to comment.