Use Commands
This commit is contained in:
parent
d55cbce2ad
commit
aa53ec31cb
|
@ -68,10 +68,17 @@ a {
|
|||
/* margin-right: 4px; */
|
||||
/* } */
|
||||
|
||||
.nav-pills > .active > a, .nav-pills > .active > a:hover {
|
||||
.nav-pills > .active > a {
|
||||
background: #ccc;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/* .focused .nav-pills{ */
|
||||
/* box-shadow: inset 0 0 4px #000AFF; */
|
||||
/* -webkit-box-shadow: inset 0 0 4px #000AFF; */
|
||||
/* -moz-box-shadow: inset 0 0 4px #000AFF; */
|
||||
/* } */
|
||||
|
||||
.focused .nav-pills > .active > a, .nav-pills > .active > a:hover {
|
||||
background: #08C;
|
||||
}
|
||||
|
@ -106,7 +113,7 @@ a {
|
|||
|
||||
#container .panes .pane .nav-pills {
|
||||
position: absolute;
|
||||
overflow-y: scroll;
|
||||
overflow-y: auto;
|
||||
top: 0;
|
||||
bottom: 37px;
|
||||
width: 100%;
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<script type='text/javascript'> loadAmber({packages: ['Spaces', 'Helios-Core', 'Helios-Layout','Helios-KeyBindings', 'Helios-Browser', 'Helios-Announcements']}) </script>
|
||||
<script type='text/javascript'> loadAmber({packages: ['Spaces', 'Helios-Core', 'Helios-Commands', 'Helios-Layout','Helios-KeyBindings', 'Helios-Browser', 'Helios-Announcements']}) </script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
File diff suppressed because it is too large
Load Diff
1410
js/Helios-Browser.js
1410
js/Helios-Browser.js
File diff suppressed because it is too large
Load Diff
|
@ -1,12 +1,51 @@
|
|||
smalltalk.addPackage('Helios-Commands', {});
|
||||
smalltalk.addClass('HLCommand', smalltalk.Object, [], 'Helios-Commands');
|
||||
smalltalk.addMethod(
|
||||
"_asBinding",
|
||||
smalltalk.method({
|
||||
selector: "asBinding",
|
||||
fn: function () {
|
||||
var self = this;
|
||||
var $1;
|
||||
$1 = smalltalk.send(smalltalk.send(smalltalk.HLBindingAction || HLBindingAction, "_on_labelled_", [smalltalk.send(self, "_key", []), smalltalk.send(self, "_label", [])]), "_callback_", [function () {return smalltalk.send(self, "_execute", []);}]);
|
||||
return $1;
|
||||
}
|
||||
}),
|
||||
smalltalk.HLCommand);
|
||||
|
||||
smalltalk.addMethod(
|
||||
"_documentation",
|
||||
smalltalk.method({
|
||||
selector: "documentation",
|
||||
fn: function () {
|
||||
var self = this;
|
||||
return "";
|
||||
var $1;
|
||||
$1 = smalltalk.send(smalltalk.send(self, "_class", []), "_documentation", []);
|
||||
return $1;
|
||||
}
|
||||
}),
|
||||
smalltalk.HLCommand);
|
||||
|
||||
smalltalk.addMethod(
|
||||
"_execute",
|
||||
smalltalk.method({
|
||||
selector: "execute",
|
||||
fn: function () {
|
||||
var self = this;
|
||||
return self;
|
||||
}
|
||||
}),
|
||||
smalltalk.HLCommand);
|
||||
|
||||
smalltalk.addMethod(
|
||||
"_key",
|
||||
smalltalk.method({
|
||||
selector: "key",
|
||||
fn: function () {
|
||||
var self = this;
|
||||
var $1;
|
||||
$1 = smalltalk.send(smalltalk.send(self, "_class", []), "_key", []);
|
||||
return $1;
|
||||
}
|
||||
}),
|
||||
smalltalk.HLCommand);
|
||||
|
@ -17,11 +56,348 @@ smalltalk.method({
|
|||
selector: "label",
|
||||
fn: function () {
|
||||
var self = this;
|
||||
smalltalk.send(self, "_subclassResponsibility", []);
|
||||
return self;
|
||||
var $1;
|
||||
$1 = smalltalk.send(smalltalk.send(self, "_class", []), "_label", []);
|
||||
return $1;
|
||||
}
|
||||
}),
|
||||
smalltalk.HLCommand);
|
||||
|
||||
|
||||
smalltalk.addMethod(
|
||||
"_bindingGroup",
|
||||
smalltalk.method({
|
||||
selector: "bindingGroup",
|
||||
fn: function () {
|
||||
var self = this;
|
||||
return nil;
|
||||
}
|
||||
}),
|
||||
smalltalk.HLCommand.klass);
|
||||
|
||||
smalltalk.addMethod(
|
||||
"_documentation",
|
||||
smalltalk.method({
|
||||
selector: "documentation",
|
||||
fn: function () {
|
||||
var self = this;
|
||||
return "";
|
||||
}
|
||||
}),
|
||||
smalltalk.HLCommand.klass);
|
||||
|
||||
smalltalk.addMethod(
|
||||
"_key",
|
||||
smalltalk.method({
|
||||
selector: "key",
|
||||
fn: function () {
|
||||
var self = this;
|
||||
return nil;
|
||||
}
|
||||
}),
|
||||
smalltalk.HLCommand.klass);
|
||||
|
||||
smalltalk.addMethod(
|
||||
"_label",
|
||||
smalltalk.method({
|
||||
selector: "label",
|
||||
fn: function () {
|
||||
var self = this;
|
||||
return "";
|
||||
}
|
||||
}),
|
||||
smalltalk.HLCommand.klass);
|
||||
|
||||
|
||||
smalltalk.addClass('HLBrowserCommand', smalltalk.HLCommand, ['model'], 'Helios-Commands');
|
||||
smalltalk.addMethod(
|
||||
"_model",
|
||||
smalltalk.method({
|
||||
selector: "model",
|
||||
fn: function () {
|
||||
var self = this;
|
||||
return self['@model'];
|
||||
}
|
||||
}),
|
||||
smalltalk.HLBrowserCommand);
|
||||
|
||||
smalltalk.addMethod(
|
||||
"_model_",
|
||||
smalltalk.method({
|
||||
selector: "model:",
|
||||
fn: function (aBrowserModel) {
|
||||
var self = this;
|
||||
self['@model'] = aBrowserModel;
|
||||
return self;
|
||||
}
|
||||
}),
|
||||
smalltalk.HLBrowserCommand);
|
||||
|
||||
|
||||
smalltalk.addMethod(
|
||||
"_on_",
|
||||
smalltalk.method({
|
||||
selector: "on:",
|
||||
fn: function (aBrowserModel) {
|
||||
var self = this;
|
||||
var $2, $3, $1;
|
||||
$2 = smalltalk.send(self, "_new", []);
|
||||
smalltalk.send($2, "_model_", [aBrowserModel]);
|
||||
$3 = smalltalk.send($2, "_yourself", []);
|
||||
$1 = $3;
|
||||
return $1;
|
||||
}
|
||||
}),
|
||||
smalltalk.HLBrowserCommand.klass);
|
||||
|
||||
|
||||
smalltalk.addClass('HLGoToCommand', smalltalk.HLBrowserCommand, [], 'Helios-Commands');
|
||||
|
||||
smalltalk.addMethod(
|
||||
"_bindingGroup",
|
||||
smalltalk.method({
|
||||
selector: "bindingGroup",
|
||||
fn: function () {
|
||||
var self = this;
|
||||
return "Go to";
|
||||
}
|
||||
}),
|
||||
smalltalk.HLGoToCommand.klass);
|
||||
|
||||
|
||||
smalltalk.addClass('HLGoToClassesCommand', smalltalk.HLGoToCommand, [], 'Helios-Commands');
|
||||
smalltalk.addMethod(
|
||||
"_execute",
|
||||
smalltalk.method({
|
||||
selector: "execute",
|
||||
fn: function () {
|
||||
var self = this;
|
||||
smalltalk.send(smalltalk.send(self, "_model", []), "_selectedClass_", [smalltalk.send(smalltalk.send(self, "_model", []), "_selectedClass", [])]);
|
||||
return self;
|
||||
}
|
||||
}),
|
||||
smalltalk.HLGoToClassesCommand);
|
||||
|
||||
|
||||
smalltalk.addMethod(
|
||||
"_key",
|
||||
smalltalk.method({
|
||||
selector: "key",
|
||||
fn: function () {
|
||||
var self = this;
|
||||
return 67;
|
||||
}
|
||||
}),
|
||||
smalltalk.HLGoToClassesCommand.klass);
|
||||
|
||||
smalltalk.addMethod(
|
||||
"_label",
|
||||
smalltalk.method({
|
||||
selector: "label",
|
||||
fn: function () {
|
||||
var self = this;
|
||||
return "Classes";
|
||||
}
|
||||
}),
|
||||
smalltalk.HLGoToClassesCommand.klass);
|
||||
|
||||
|
||||
smalltalk.addClass('HLGoToMethodsCommand', smalltalk.HLGoToCommand, [], 'Helios-Commands');
|
||||
smalltalk.addMethod(
|
||||
"_execute",
|
||||
smalltalk.method({
|
||||
selector: "execute",
|
||||
fn: function () {
|
||||
var self = this;
|
||||
smalltalk.send(smalltalk.send(self, "_model", []), "_selectedMethod_", [smalltalk.send(smalltalk.send(self, "_model", []), "_selectedMethod", [])]);
|
||||
return self;
|
||||
}
|
||||
}),
|
||||
smalltalk.HLGoToMethodsCommand);
|
||||
|
||||
|
||||
smalltalk.addMethod(
|
||||
"_key",
|
||||
smalltalk.method({
|
||||
selector: "key",
|
||||
fn: function () {
|
||||
var self = this;
|
||||
return 77;
|
||||
}
|
||||
}),
|
||||
smalltalk.HLGoToMethodsCommand.klass);
|
||||
|
||||
smalltalk.addMethod(
|
||||
"_label",
|
||||
smalltalk.method({
|
||||
selector: "label",
|
||||
fn: function () {
|
||||
var self = this;
|
||||
return "Methods";
|
||||
}
|
||||
}),
|
||||
smalltalk.HLGoToMethodsCommand.klass);
|
||||
|
||||
|
||||
smalltalk.addClass('HLGoToPackagesCommand', smalltalk.HLGoToCommand, [], 'Helios-Commands');
|
||||
smalltalk.addMethod(
|
||||
"_execute",
|
||||
smalltalk.method({
|
||||
selector: "execute",
|
||||
fn: function () {
|
||||
var self = this;
|
||||
smalltalk.send(smalltalk.send(self, "_model", []), "_selectedPackage_", [smalltalk.send(smalltalk.send(self, "_model", []), "_selectedPackage", [])]);
|
||||
return self;
|
||||
}
|
||||
}),
|
||||
smalltalk.HLGoToPackagesCommand);
|
||||
|
||||
|
||||
smalltalk.addMethod(
|
||||
"_key",
|
||||
smalltalk.method({
|
||||
selector: "key",
|
||||
fn: function () {
|
||||
var self = this;
|
||||
return 80;
|
||||
}
|
||||
}),
|
||||
smalltalk.HLGoToPackagesCommand.klass);
|
||||
|
||||
smalltalk.addMethod(
|
||||
"_label",
|
||||
smalltalk.method({
|
||||
selector: "label",
|
||||
fn: function () {
|
||||
var self = this;
|
||||
return "Packages";
|
||||
}
|
||||
}),
|
||||
smalltalk.HLGoToPackagesCommand.klass);
|
||||
|
||||
|
||||
smalltalk.addClass('HLGoToProtocolsCommand', smalltalk.HLGoToCommand, [], 'Helios-Commands');
|
||||
smalltalk.addMethod(
|
||||
"_execute",
|
||||
smalltalk.method({
|
||||
selector: "execute",
|
||||
fn: function () {
|
||||
var self = this;
|
||||
smalltalk.send(smalltalk.send(self, "_model", []), "_selectedProtocol_", [smalltalk.send(smalltalk.send(self, "_model", []), "_selectedProtocol", [])]);
|
||||
return self;
|
||||
}
|
||||
}),
|
||||
smalltalk.HLGoToProtocolsCommand);
|
||||
|
||||
|
||||
smalltalk.addMethod(
|
||||
"_key",
|
||||
smalltalk.method({
|
||||
selector: "key",
|
||||
fn: function () {
|
||||
var self = this;
|
||||
return 84;
|
||||
}
|
||||
}),
|
||||
smalltalk.HLGoToProtocolsCommand.klass);
|
||||
|
||||
smalltalk.addMethod(
|
||||
"_label",
|
||||
smalltalk.method({
|
||||
selector: "label",
|
||||
fn: function () {
|
||||
var self = this;
|
||||
return "Protocols";
|
||||
}
|
||||
}),
|
||||
smalltalk.HLGoToProtocolsCommand.klass);
|
||||
|
||||
|
||||
smalltalk.addClass('HLToggleCommand', smalltalk.HLBrowserCommand, [], 'Helios-Commands');
|
||||
|
||||
smalltalk.addMethod(
|
||||
"_bindingGroup",
|
||||
smalltalk.method({
|
||||
selector: "bindingGroup",
|
||||
fn: function () {
|
||||
var self = this;
|
||||
return "Toggle";
|
||||
}
|
||||
}),
|
||||
smalltalk.HLToggleCommand.klass);
|
||||
|
||||
|
||||
smalltalk.addClass('HLToggleClassSideCommand', smalltalk.HLToggleCommand, [], 'Helios-Commands');
|
||||
smalltalk.addMethod(
|
||||
"_execute",
|
||||
smalltalk.method({
|
||||
selector: "execute",
|
||||
fn: function () {
|
||||
var self = this;
|
||||
smalltalk.send(smalltalk.send(self, "_model", []), "_showInstance_", [false]);
|
||||
return self;
|
||||
}
|
||||
}),
|
||||
smalltalk.HLToggleClassSideCommand);
|
||||
|
||||
|
||||
smalltalk.addMethod(
|
||||
"_key",
|
||||
smalltalk.method({
|
||||
selector: "key",
|
||||
fn: function () {
|
||||
var self = this;
|
||||
return 67;
|
||||
}
|
||||
}),
|
||||
smalltalk.HLToggleClassSideCommand.klass);
|
||||
|
||||
smalltalk.addMethod(
|
||||
"_label",
|
||||
smalltalk.method({
|
||||
selector: "label",
|
||||
fn: function () {
|
||||
var self = this;
|
||||
return "Class side";
|
||||
}
|
||||
}),
|
||||
smalltalk.HLToggleClassSideCommand.klass);
|
||||
|
||||
|
||||
smalltalk.addClass('HLToggleInstanceSideCommand', smalltalk.HLToggleCommand, [], 'Helios-Commands');
|
||||
smalltalk.addMethod(
|
||||
"_execute",
|
||||
smalltalk.method({
|
||||
selector: "execute",
|
||||
fn: function () {
|
||||
var self = this;
|
||||
smalltalk.send(smalltalk.send(self, "_model", []), "_showInstance_", [true]);
|
||||
return self;
|
||||
}
|
||||
}),
|
||||
smalltalk.HLToggleInstanceSideCommand);
|
||||
|
||||
|
||||
smalltalk.addMethod(
|
||||
"_key",
|
||||
smalltalk.method({
|
||||
selector: "key",
|
||||
fn: function () {
|
||||
var self = this;
|
||||
return 73;
|
||||
}
|
||||
}),
|
||||
smalltalk.HLToggleInstanceSideCommand.klass);
|
||||
|
||||
smalltalk.addMethod(
|
||||
"_label",
|
||||
smalltalk.method({
|
||||
selector: "label",
|
||||
fn: function () {
|
||||
var self = this;
|
||||
return "Instance side";
|
||||
}
|
||||
}),
|
||||
smalltalk.HLToggleInstanceSideCommand.klass);
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,110 @@
|
|||
smalltalk.addPackage('Helios-Commands', {});
|
||||
smalltalk.addClass('HLCommand', smalltalk.Object, [], 'Helios-Commands');
|
||||
smalltalk.addMethod(
|
||||
"_asBinding",
|
||||
smalltalk.method({
|
||||
selector: "asBinding",
|
||||
category: 'converting',
|
||||
fn: function () {
|
||||
var self = this;
|
||||
var $1;
|
||||
$1 = smalltalk.send(smalltalk.send(smalltalk.HLBindingAction || HLBindingAction, "_on_labelled_", [smalltalk.send(self, "_key", []), smalltalk.send(self, "_label", [])]), "_callback_", [function () {return smalltalk.send(self, "_execute", []);}]);
|
||||
return $1;
|
||||
},
|
||||
args: [],
|
||||
source: "asBinding\x0a\x09^ (HLBindingAction on: self key labelled: self label)\x0a \x09callback: [ self execute ]",
|
||||
messageSends: ["callback:", "execute", "on:labelled:", "key", "label"],
|
||||
referencedClasses: ["HLBindingAction"]
|
||||
}),
|
||||
smalltalk.HLCommand);
|
||||
|
||||
smalltalk.addMethod(
|
||||
"_documentation",
|
||||
smalltalk.method({
|
||||
selector: "documentation",
|
||||
category: 'accessing',
|
||||
fn: function () {
|
||||
var self = this;
|
||||
var $1;
|
||||
$1 = smalltalk.send(smalltalk.send(self, "_class", []), "_documentation", []);
|
||||
return $1;
|
||||
},
|
||||
args: [],
|
||||
source: "documentation\x0a\x09^ self class documentation",
|
||||
messageSends: ["documentation", "class"],
|
||||
referencedClasses: []
|
||||
}),
|
||||
smalltalk.HLCommand);
|
||||
|
||||
smalltalk.addMethod(
|
||||
"_execute",
|
||||
smalltalk.method({
|
||||
selector: "execute",
|
||||
category: 'executing',
|
||||
fn: function () {
|
||||
var self = this;
|
||||
return self;
|
||||
},
|
||||
args: [],
|
||||
source: "execute\x0a\x09",
|
||||
messageSends: [],
|
||||
referencedClasses: []
|
||||
}),
|
||||
smalltalk.HLCommand);
|
||||
|
||||
smalltalk.addMethod(
|
||||
"_key",
|
||||
smalltalk.method({
|
||||
selector: "key",
|
||||
category: 'accessing',
|
||||
fn: function () {
|
||||
var self = this;
|
||||
var $1;
|
||||
$1 = smalltalk.send(smalltalk.send(self, "_class", []), "_key", []);
|
||||
return $1;
|
||||
},
|
||||
args: [],
|
||||
source: "key\x0a\x09^ self class key",
|
||||
messageSends: ["key", "class"],
|
||||
referencedClasses: []
|
||||
}),
|
||||
smalltalk.HLCommand);
|
||||
|
||||
smalltalk.addMethod(
|
||||
"_label",
|
||||
smalltalk.method({
|
||||
selector: "label",
|
||||
category: 'accessing',
|
||||
fn: function () {
|
||||
var self = this;
|
||||
var $1;
|
||||
$1 = smalltalk.send(smalltalk.send(self, "_class", []), "_label", []);
|
||||
return $1;
|
||||
},
|
||||
args: [],
|
||||
source: "label\x0a\x09^ self class label",
|
||||
messageSends: ["label", "class"],
|
||||
referencedClasses: []
|
||||
}),
|
||||
smalltalk.HLCommand);
|
||||
|
||||
|
||||
smalltalk.addMethod(
|
||||
"_bindingGroup",
|
||||
smalltalk.method({
|
||||
selector: "bindingGroup",
|
||||
category: 'accessing',
|
||||
fn: function () {
|
||||
var self = this;
|
||||
return nil;
|
||||
},
|
||||
args: [],
|
||||
source: "bindingGroup\x0a\x09^ nil",
|
||||
messageSends: [],
|
||||
referencedClasses: []
|
||||
}),
|
||||
smalltalk.HLCommand.klass);
|
||||
|
||||
smalltalk.addMethod(
|
||||
"_documentation",
|
||||
smalltalk.method({
|
||||
|
@ -14,7 +119,23 @@ source: "documentation\x0a\x09^ ''",
|
|||
messageSends: [],
|
||||
referencedClasses: []
|
||||
}),
|
||||
smalltalk.HLCommand);
|
||||
smalltalk.HLCommand.klass);
|
||||
|
||||
smalltalk.addMethod(
|
||||
"_key",
|
||||
smalltalk.method({
|
||||
selector: "key",
|
||||
category: 'accessing',
|
||||
fn: function () {
|
||||
var self = this;
|
||||
return nil;
|
||||
},
|
||||
args: [],
|
||||
source: "key\x0a\x09^ nil",
|
||||
messageSends: [],
|
||||
referencedClasses: []
|
||||
}),
|
||||
smalltalk.HLCommand.klass);
|
||||
|
||||
smalltalk.addMethod(
|
||||
"_label",
|
||||
|
@ -23,15 +144,420 @@ selector: "label",
|
|||
category: 'accessing',
|
||||
fn: function () {
|
||||
var self = this;
|
||||
smalltalk.send(self, "_subclassResponsibility", []);
|
||||
return "";
|
||||
},
|
||||
args: [],
|
||||
source: "label\x0a\x09^ ''",
|
||||
messageSends: [],
|
||||
referencedClasses: []
|
||||
}),
|
||||
smalltalk.HLCommand.klass);
|
||||
|
||||
|
||||
smalltalk.addClass('HLBrowserCommand', smalltalk.HLCommand, ['model'], 'Helios-Commands');
|
||||
smalltalk.addMethod(
|
||||
"_model",
|
||||
smalltalk.method({
|
||||
selector: "model",
|
||||
category: 'accessing',
|
||||
fn: function () {
|
||||
var self = this;
|
||||
return self['@model'];
|
||||
},
|
||||
args: [],
|
||||
source: "model\x0a\x09^ model",
|
||||
messageSends: [],
|
||||
referencedClasses: []
|
||||
}),
|
||||
smalltalk.HLBrowserCommand);
|
||||
|
||||
smalltalk.addMethod(
|
||||
"_model_",
|
||||
smalltalk.method({
|
||||
selector: "model:",
|
||||
category: 'accessing',
|
||||
fn: function (aBrowserModel) {
|
||||
var self = this;
|
||||
self['@model'] = aBrowserModel;
|
||||
return self;
|
||||
},
|
||||
args: ["aBrowserModel"],
|
||||
source: "model: aBrowserModel\x0a\x09model := aBrowserModel",
|
||||
messageSends: [],
|
||||
referencedClasses: []
|
||||
}),
|
||||
smalltalk.HLBrowserCommand);
|
||||
|
||||
|
||||
smalltalk.addMethod(
|
||||
"_on_",
|
||||
smalltalk.method({
|
||||
selector: "on:",
|
||||
category: 'instance creation',
|
||||
fn: function (aBrowserModel) {
|
||||
var self = this;
|
||||
var $2, $3, $1;
|
||||
$2 = smalltalk.send(self, "_new", []);
|
||||
smalltalk.send($2, "_model_", [aBrowserModel]);
|
||||
$3 = smalltalk.send($2, "_yourself", []);
|
||||
$1 = $3;
|
||||
return $1;
|
||||
},
|
||||
args: ["aBrowserModel"],
|
||||
source: "on: aBrowserModel\x0a\x09^ self new\x0a \x09model: aBrowserModel;\x0a yourself",
|
||||
messageSends: ["model:", "new", "yourself"],
|
||||
referencedClasses: []
|
||||
}),
|
||||
smalltalk.HLBrowserCommand.klass);
|
||||
|
||||
|
||||
smalltalk.addClass('HLGoToCommand', smalltalk.HLBrowserCommand, [], 'Helios-Commands');
|
||||
|
||||
smalltalk.addMethod(
|
||||
"_bindingGroup",
|
||||
smalltalk.method({
|
||||
selector: "bindingGroup",
|
||||
category: 'accessing',
|
||||
fn: function () {
|
||||
var self = this;
|
||||
return "Go to";
|
||||
},
|
||||
args: [],
|
||||
source: "bindingGroup\x0a\x09^ 'Go to'",
|
||||
messageSends: [],
|
||||
referencedClasses: []
|
||||
}),
|
||||
smalltalk.HLGoToCommand.klass);
|
||||
|
||||
|
||||
smalltalk.addClass('HLGoToClassesCommand', smalltalk.HLGoToCommand, [], 'Helios-Commands');
|
||||
smalltalk.addMethod(
|
||||
"_execute",
|
||||
smalltalk.method({
|
||||
selector: "execute",
|
||||
category: 'executing',
|
||||
fn: function () {
|
||||
var self = this;
|
||||
smalltalk.send(smalltalk.send(self, "_model", []), "_selectedClass_", [smalltalk.send(smalltalk.send(self, "_model", []), "_selectedClass", [])]);
|
||||
return self;
|
||||
},
|
||||
args: [],
|
||||
source: "label\x0a\x09self subclassResponsibility",
|
||||
messageSends: ["subclassResponsibility"],
|
||||
source: "execute\x0a\x09self model selectedClass: self model selectedClass",
|
||||
messageSends: ["selectedClass:", "selectedClass", "model"],
|
||||
referencedClasses: []
|
||||
}),
|
||||
smalltalk.HLCommand);
|
||||
smalltalk.HLGoToClassesCommand);
|
||||
|
||||
|
||||
smalltalk.addMethod(
|
||||
"_key",
|
||||
smalltalk.method({
|
||||
selector: "key",
|
||||
category: 'accessing',
|
||||
fn: function () {
|
||||
var self = this;
|
||||
return 67;
|
||||
},
|
||||
args: [],
|
||||
source: "key\x0a\x09\x22c\x22\x0a \x0a\x09^ 67",
|
||||
messageSends: [],
|
||||
referencedClasses: []
|
||||
}),
|
||||
smalltalk.HLGoToClassesCommand.klass);
|
||||
|
||||
smalltalk.addMethod(
|
||||
"_label",
|
||||
smalltalk.method({
|
||||
selector: "label",
|
||||
category: 'accessing',
|
||||
fn: function () {
|
||||
var self = this;
|
||||
return "Classes";
|
||||
},
|
||||
args: [],
|
||||
source: "label\x0a\x09^ 'Classes'",
|
||||
messageSends: [],
|
||||
referencedClasses: []
|
||||
}),
|
||||
smalltalk.HLGoToClassesCommand.klass);
|
||||
|
||||
|
||||
smalltalk.addClass('HLGoToMethodsCommand', smalltalk.HLGoToCommand, [], 'Helios-Commands');
|
||||
smalltalk.addMethod(
|
||||
"_execute",
|
||||
smalltalk.method({
|
||||
selector: "execute",
|
||||
category: 'executing',
|
||||
fn: function () {
|
||||
var self = this;
|
||||
smalltalk.send(smalltalk.send(self, "_model", []), "_selectedMethod_", [smalltalk.send(smalltalk.send(self, "_model", []), "_selectedMethod", [])]);
|
||||
return self;
|
||||
},
|
||||
args: [],
|
||||
source: "execute\x0a\x09self model selectedMethod: self model selectedMethod",
|
||||
messageSends: ["selectedMethod:", "selectedMethod", "model"],
|
||||
referencedClasses: []
|
||||
}),
|
||||
smalltalk.HLGoToMethodsCommand);
|
||||
|
||||
|
||||
smalltalk.addMethod(
|
||||
"_key",
|
||||
smalltalk.method({
|
||||
selector: "key",
|
||||
category: 'accessing',
|
||||
fn: function () {
|
||||
var self = this;
|
||||
return 77;
|
||||
},
|
||||
args: [],
|
||||
source: "key\x0a\x09\x22m\x22\x0a \x0a\x09^ 77",
|
||||
messageSends: [],
|
||||
referencedClasses: []
|
||||
}),
|
||||
smalltalk.HLGoToMethodsCommand.klass);
|
||||
|
||||
smalltalk.addMethod(
|
||||
"_label",
|
||||
smalltalk.method({
|
||||
selector: "label",
|
||||
category: 'accessing',
|
||||
fn: function () {
|
||||
var self = this;
|
||||
return "Methods";
|
||||
},
|
||||
args: [],
|
||||
source: "label\x0a\x09^ 'Methods'",
|
||||
messageSends: [],
|
||||
referencedClasses: []
|
||||
}),
|
||||
smalltalk.HLGoToMethodsCommand.klass);
|
||||
|
||||
|
||||
smalltalk.addClass('HLGoToPackagesCommand', smalltalk.HLGoToCommand, [], 'Helios-Commands');
|
||||
smalltalk.addMethod(
|
||||
"_execute",
|
||||
smalltalk.method({
|
||||
selector: "execute",
|
||||
category: 'executing',
|
||||
fn: function () {
|
||||
var self = this;
|
||||
smalltalk.send(smalltalk.send(self, "_model", []), "_selectedPackage_", [smalltalk.send(smalltalk.send(self, "_model", []), "_selectedPackage", [])]);
|
||||
return self;
|
||||
},
|
||||
args: [],
|
||||
source: "execute\x0a\x09self model selectedPackage: self model selectedPackage",
|
||||
messageSends: ["selectedPackage:", "selectedPackage", "model"],
|
||||
referencedClasses: []
|
||||
}),
|
||||
smalltalk.HLGoToPackagesCommand);
|
||||
|
||||
|
||||
smalltalk.addMethod(
|
||||
"_key",
|
||||
smalltalk.method({
|
||||
selector: "key",
|
||||
category: 'accessing',
|
||||
fn: function () {
|
||||
var self = this;
|
||||
return 80;
|
||||
},
|
||||
args: [],
|
||||
source: "key\x0a\x09\x22p\x22\x0a \x0a\x09^ 80",
|
||||
messageSends: [],
|
||||
referencedClasses: []
|
||||
}),
|
||||
smalltalk.HLGoToPackagesCommand.klass);
|
||||
|
||||
smalltalk.addMethod(
|
||||
"_label",
|
||||
smalltalk.method({
|
||||
selector: "label",
|
||||
category: 'accessing',
|
||||
fn: function () {
|
||||
var self = this;
|
||||
return "Packages";
|
||||
},
|
||||
args: [],
|
||||
source: "label\x0a\x09^ 'Packages'",
|
||||
messageSends: [],
|
||||
referencedClasses: []
|
||||
}),
|
||||
smalltalk.HLGoToPackagesCommand.klass);
|
||||
|
||||
|
||||
smalltalk.addClass('HLGoToProtocolsCommand', smalltalk.HLGoToCommand, [], 'Helios-Commands');
|
||||
smalltalk.addMethod(
|
||||
"_execute",
|
||||
smalltalk.method({
|
||||
selector: "execute",
|
||||
category: 'executing',
|
||||
fn: function () {
|
||||
var self = this;
|
||||
smalltalk.send(smalltalk.send(self, "_model", []), "_selectedProtocol_", [smalltalk.send(smalltalk.send(self, "_model", []), "_selectedProtocol", [])]);
|
||||
return self;
|
||||
},
|
||||
args: [],
|
||||
source: "execute\x0a\x09self model selectedProtocol: self model selectedProtocol",
|
||||
messageSends: ["selectedProtocol:", "selectedProtocol", "model"],
|
||||
referencedClasses: []
|
||||
}),
|
||||
smalltalk.HLGoToProtocolsCommand);
|
||||
|
||||
|
||||
smalltalk.addMethod(
|
||||
"_key",
|
||||
smalltalk.method({
|
||||
selector: "key",
|
||||
category: 'accessing',
|
||||
fn: function () {
|
||||
var self = this;
|
||||
return 84;
|
||||
},
|
||||
args: [],
|
||||
source: "key\x0a\x09\x22p\x22\x0a \x0a\x09^ 84",
|
||||
messageSends: [],
|
||||
referencedClasses: []
|
||||
}),
|
||||
smalltalk.HLGoToProtocolsCommand.klass);
|
||||
|
||||
smalltalk.addMethod(
|
||||
"_label",
|
||||
smalltalk.method({
|
||||
selector: "label",
|
||||
category: 'accessing',
|
||||
fn: function () {
|
||||
var self = this;
|
||||
return "Protocols";
|
||||
},
|
||||
args: [],
|
||||
source: "label\x0a\x09^ 'Protocols'",
|
||||
messageSends: [],
|
||||
referencedClasses: []
|
||||
}),
|
||||
smalltalk.HLGoToProtocolsCommand.klass);
|
||||
|
||||
|
||||
smalltalk.addClass('HLToggleCommand', smalltalk.HLBrowserCommand, [], 'Helios-Commands');
|
||||
|
||||
smalltalk.addMethod(
|
||||
"_bindingGroup",
|
||||
smalltalk.method({
|
||||
selector: "bindingGroup",
|
||||
category: 'accessing',
|
||||
fn: function () {
|
||||
var self = this;
|
||||
return "Toggle";
|
||||
},
|
||||
args: [],
|
||||
source: "bindingGroup\x0a\x09^ 'Toggle'",
|
||||
messageSends: [],
|
||||
referencedClasses: []
|
||||
}),
|
||||
smalltalk.HLToggleCommand.klass);
|
||||
|
||||
|
||||
smalltalk.addClass('HLToggleClassSideCommand', smalltalk.HLToggleCommand, [], 'Helios-Commands');
|
||||
smalltalk.addMethod(
|
||||
"_execute",
|
||||
smalltalk.method({
|
||||
selector: "execute",
|
||||
category: 'executing',
|
||||
fn: function () {
|
||||
var self = this;
|
||||
smalltalk.send(smalltalk.send(self, "_model", []), "_showInstance_", [false]);
|
||||
return self;
|
||||
},
|
||||
args: [],
|
||||
source: "execute\x0a\x09self model showInstance: false",
|
||||
messageSends: ["showInstance:", "model"],
|
||||
referencedClasses: []
|
||||
}),
|
||||
smalltalk.HLToggleClassSideCommand);
|
||||
|
||||
|
||||
smalltalk.addMethod(
|
||||
"_key",
|
||||
smalltalk.method({
|
||||
selector: "key",
|
||||
category: 'accessing',
|
||||
fn: function () {
|
||||
var self = this;
|
||||
return 67;
|
||||
},
|
||||
args: [],
|
||||
source: "key\x0a\x09\x22c\x22\x0a \x0a\x09^ 67",
|
||||
messageSends: [],
|
||||
referencedClasses: []
|
||||
}),
|
||||
smalltalk.HLToggleClassSideCommand.klass);
|
||||
|
||||
smalltalk.addMethod(
|
||||
"_label",
|
||||
smalltalk.method({
|
||||
selector: "label",
|
||||
category: 'accessing',
|
||||
fn: function () {
|
||||
var self = this;
|
||||
return "Class side";
|
||||
},
|
||||
args: [],
|
||||
source: "label\x0a\x09^ 'Class side'",
|
||||
messageSends: [],
|
||||
referencedClasses: []
|
||||
}),
|
||||
smalltalk.HLToggleClassSideCommand.klass);
|
||||
|
||||
|
||||
smalltalk.addClass('HLToggleInstanceSideCommand', smalltalk.HLToggleCommand, [], 'Helios-Commands');
|
||||
smalltalk.addMethod(
|
||||
"_execute",
|
||||
smalltalk.method({
|
||||
selector: "execute",
|
||||
category: 'executing',
|
||||
fn: function () {
|
||||
var self = this;
|
||||
smalltalk.send(smalltalk.send(self, "_model", []), "_showInstance_", [true]);
|
||||
return self;
|
||||
},
|
||||
args: [],
|
||||
source: "execute\x0a\x09self model showInstance: true",
|
||||
messageSends: ["showInstance:", "model"],
|
||||
referencedClasses: []
|
||||
}),
|
||||
smalltalk.HLToggleInstanceSideCommand);
|
||||
|
||||
|
||||
smalltalk.addMethod(
|
||||
"_key",
|
||||
smalltalk.method({
|
||||
selector: "key",
|
||||
category: 'accessing',
|
||||
fn: function () {
|
||||
var self = this;
|
||||
return 73;
|
||||
},
|
||||
args: [],
|
||||
source: "key\x0a\x09\x22i\x22\x0a \x0a\x09^ 73",
|
||||
messageSends: [],
|
||||
referencedClasses: []
|
||||
}),
|
||||
smalltalk.HLToggleInstanceSideCommand.klass);
|
||||
|
||||
smalltalk.addMethod(
|
||||
"_label",
|
||||
smalltalk.method({
|
||||
selector: "label",
|
||||
category: 'accessing',
|
||||
fn: function () {
|
||||
var self = this;
|
||||
return "Instance side";
|
||||
},
|
||||
args: [],
|
||||
source: "label\x0a\x09^ 'Instance side'",
|
||||
messageSends: [],
|
||||
referencedClasses: []
|
||||
}),
|
||||
smalltalk.HLToggleInstanceSideCommand.klass);
|
||||
|
||||
|
||||
|
|
|
@ -970,7 +970,8 @@ smalltalk.method({
|
|||
selector: "setupKeyBindings",
|
||||
fn: function (){
|
||||
var self=this;
|
||||
var $1,$2;
|
||||
var $1,$2,$3;
|
||||
var next;
|
||||
smalltalk.send(smalltalk.send(self["@hiddenInput"],"_asJQuery",[]),"_unbind_",["keydown"]);
|
||||
smalltalk.send(smalltalk.send(self["@hiddenInput"],"_asJQuery",[]),"_keydown_",[(function(e){
|
||||
var selected;
|
||||
|
@ -982,7 +983,16 @@ smalltalk.send(self,"_activateListItem_",[smalltalk.send(selected,"_prev",[])]);
|
|||
};
|
||||
$2=smalltalk.send(smalltalk.send(e,"_which",[]),"__eq",[(40)]);
|
||||
if(smalltalk.assert($2)){
|
||||
return smalltalk.send(self,"_activateListItem_",[smalltalk.send(selected,"_next",[])]);
|
||||
next=smalltalk.send(selected,"_next",[]);
|
||||
next;
|
||||
$3=smalltalk.send(next,"_get_",[(0)]);
|
||||
if(($receiver = $3) == nil || $receiver == undefined){
|
||||
next=smalltalk.send(window,"_jQuery_",[".focused .nav-pills li:first-child"]);
|
||||
next;
|
||||
} else {
|
||||
$3;
|
||||
};
|
||||
return smalltalk.send(self,"_activateListItem_",[next]);
|
||||
};
|
||||
})]);
|
||||
return self}
|
||||
|
|
|
@ -1216,7 +1216,7 @@ return $3;
|
|||
})]);
|
||||
return self},
|
||||
args: ["anObject", "html"],
|
||||
source: "renderItem: anObject on: html\x0a\x09| li |\x0a \x0a\x09li := html li.\x0a li\x0a \x09class: (self cssClassForItem: anObject);\x0a at: 'list-data' put: (self items indexOf: anObject) asString;\x0a with: [ \x0a \x09html a\x0a \x09with: [ \x0a \x09\x09(html tag: 'i') class: (self iconForItem: anObject).\x0a \x09\x09\x09\x09\x09self renderItemLabel: anObject on: html ];\x0a\x09\x09\x09\x09onClick: [\x0a \x09self activateListItem: li asJQuery.\x0a \x09\x22self selectItem: anObject\x22 ] ]",
|
||||
source: "renderItem: anObject on: html\x0a\x09| li |\x0a \x0a\x09li := html li.\x0a li\x0a \x09class: (self cssClassForItem: anObject);\x0a at: 'list-data' put: (self items indexOf: anObject) asString;\x0a with: [ \x0a \x09html a\x0a \x09with: [ \x0a \x09\x09(html tag: 'i') class: (self iconForItem: anObject).\x0a \x09\x09\x09\x09\x09self renderItemLabel: anObject on: html ];\x0a\x09\x09\x09\x09onClick: [\x0a \x09self activateListItem: li asJQuery ] ]",
|
||||
messageSends: ["li", "class:", "cssClassForItem:", "at:put:", "asString", "indexOf:", "items", "with:", "iconForItem:", "tag:", "renderItemLabel:on:", "a", "onClick:", "activateListItem:", "asJQuery"],
|
||||
referencedClasses: []
|
||||
}),
|
||||
|
@ -1311,7 +1311,8 @@ selector: "setupKeyBindings",
|
|||
category: 'events',
|
||||
fn: function (){
|
||||
var self=this;
|
||||
var $1,$2;
|
||||
var $1,$2,$3;
|
||||
var next;
|
||||
smalltalk.send(smalltalk.send(self["@hiddenInput"],"_asJQuery",[]),"_unbind_",["keydown"]);
|
||||
smalltalk.send(smalltalk.send(self["@hiddenInput"],"_asJQuery",[]),"_keydown_",[(function(e){
|
||||
var selected;
|
||||
|
@ -1323,13 +1324,22 @@ smalltalk.send(self,"_activateListItem_",[smalltalk.send(selected,"_prev",[])]);
|
|||
};
|
||||
$2=smalltalk.send(smalltalk.send(e,"_which",[]),"__eq",[(40)]);
|
||||
if(smalltalk.assert($2)){
|
||||
return smalltalk.send(self,"_activateListItem_",[smalltalk.send(selected,"_next",[])]);
|
||||
next=smalltalk.send(selected,"_next",[]);
|
||||
next;
|
||||
$3=smalltalk.send(next,"_get_",[(0)]);
|
||||
if(($receiver = $3) == nil || $receiver == undefined){
|
||||
next=smalltalk.send(window,"_jQuery_",[".focused .nav-pills li:first-child"]);
|
||||
next;
|
||||
} else {
|
||||
$3;
|
||||
};
|
||||
return smalltalk.send(self,"_activateListItem_",[next]);
|
||||
};
|
||||
})]);
|
||||
return self},
|
||||
args: [],
|
||||
source: "setupKeyBindings\x0a\x09hiddenInput asJQuery unbind: 'keydown'.\x0a\x0a\x09hiddenInput asJQuery keydown: [ :e | | selected |\x0a \x09selected := window jQuery: '.focused .nav-pills .active'.\x0a e which = 38 ifTrue: [ \x0a \x09self activateListItem: selected prev ].\x0a \x09e which = 40 ifTrue: [\x0a\x09\x09\x09self activateListItem: selected next ] ]",
|
||||
messageSends: ["unbind:", "asJQuery", "keydown:", "jQuery:", "ifTrue:", "activateListItem:", "prev", "=", "which", "next"],
|
||||
source: "setupKeyBindings\x0a\x09| next |\x0a\x09hiddenInput asJQuery unbind: 'keydown'.\x0a\x0a\x09hiddenInput asJQuery keydown: [ :e | | selected |\x0a \x09selected := window jQuery: '.focused .nav-pills .active'.\x0a e which = 38 ifTrue: [ \x0a \x09self activateListItem: selected prev ].\x0a \x09e which = 40 ifTrue: [\x0a \x09next := selected next.\x0a (next get: 0) ifNil: [ next := window jQuery: '.focused .nav-pills li:first-child' ].\x0a\x09\x09\x09self activateListItem: next ] ]",
|
||||
messageSends: ["unbind:", "asJQuery", "keydown:", "jQuery:", "ifTrue:", "activateListItem:", "prev", "=", "which", "next", "ifNil:", "get:"],
|
||||
referencedClasses: []
|
||||
}),
|
||||
smalltalk.HLListWidget);
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -27,7 +27,12 @@ registerBindingsOn: aBindingGroup
|
|||
aBindingGroup
|
||||
addGroupKey: 66 labelled: 'Browse';
|
||||
addGroupKey: 71 labelled: 'Go to';
|
||||
addGroupKey: 84 labelled: 'Toggle'
|
||||
addGroupKey: 84 labelled: 'Toggle'.
|
||||
|
||||
HLBrowserCommand withAllSubclasses do: [ :each |
|
||||
each key ifNotNil: [
|
||||
(aBindingGroup at: each bindingGroup)
|
||||
add: (each on: self model) asBinding ] ]
|
||||
! !
|
||||
|
||||
!HLBrowser methodsFor: 'rendering'!
|
||||
|
@ -114,24 +119,6 @@ model: aBrowserModel
|
|||
model subscribe: self
|
||||
! !
|
||||
|
||||
!HLBrowserListWidget methodsFor: 'actions'!
|
||||
|
||||
ensureSelection
|
||||
self selectedItem
|
||||
ifNil: [
|
||||
self items ifNotEmpty: [
|
||||
self selectItem: self items first.
|
||||
self refresh ] ]
|
||||
ifNotNil: [ self selectItem: self selectedItem ]
|
||||
! !
|
||||
|
||||
!HLBrowserListWidget methodsFor: 'events'!
|
||||
|
||||
focus
|
||||
super focus.
|
||||
self ensureSelection
|
||||
! !
|
||||
|
||||
!HLBrowserListWidget class methodsFor: 'instance creation'!
|
||||
|
||||
on: aModel
|
||||
|
@ -201,17 +188,9 @@ subscribeTo: anAnnouncer
|
|||
anAnnouncer on: HLPackageSelected do: [ :ann |
|
||||
self packageSelected: ann item ].
|
||||
anAnnouncer on: HLShowInstanceToggled do: [ :ann |
|
||||
self refresh ]
|
||||
! !
|
||||
|
||||
!HLClassesListWidget methodsFor: 'keybindings'!
|
||||
|
||||
registerBindingsOn: aBindingGroup
|
||||
(aBindingGroup at: 'Go to')
|
||||
addActionKey: 67 labelled: 'Classes' callback: [ self focus ].
|
||||
(aBindingGroup at: 'Toggle')
|
||||
addActionKey: 73 labelled: 'Instance side' callback: [ self showInstance: true ];
|
||||
addActionKey: 67 labelled: 'Class side' callback: [ self showInstance: false ]
|
||||
self refresh ].
|
||||
anAnnouncer on: HLClassSelected do: [ :ann |
|
||||
self focus ]
|
||||
! !
|
||||
|
||||
!HLClassesListWidget methodsFor: 'rendering'!
|
||||
|
@ -343,7 +322,7 @@ protocolSelected: aString
|
|||
self items: (self model selectedClass
|
||||
ifNil: [ #() ]
|
||||
ifNotNil: [ aString
|
||||
ifNil: [ self model selectedClass methods ]
|
||||
ifNil: [ #() ]
|
||||
ifNotNil: [ self methodsInProtocol: aString ] ]).
|
||||
|
||||
self refresh
|
||||
|
@ -351,7 +330,7 @@ protocolSelected: aString
|
|||
|
||||
selectItem: aCompiledMethod
|
||||
super selectItem: aCompiledMethod.
|
||||
self model selectedMethod: aCompiledMethod
|
||||
self model selectedMethod: aCompiledMethod
|
||||
! !
|
||||
|
||||
!HLMethodsListWidget methodsFor: 'announcements'!
|
||||
|
@ -360,7 +339,9 @@ subscribeTo: anAnnouncer
|
|||
anAnnouncer on: HLProtocolSelected do: [ :ann |
|
||||
self protocolSelected: ann item ].
|
||||
anAnnouncer on: HLShowInstanceToggled do: [ :ann |
|
||||
self protocolSelected: nil ]
|
||||
self protocolSelected: nil ].
|
||||
anAnnouncer on: HLMethodSelected do: [ :ann |
|
||||
self focus ]
|
||||
! !
|
||||
|
||||
!HLMethodsListWidget methodsFor: 'cache'!
|
||||
|
@ -376,13 +357,6 @@ initialize
|
|||
self flushSelectorsCache
|
||||
! !
|
||||
|
||||
!HLMethodsListWidget methodsFor: 'keybindings'!
|
||||
|
||||
registerBindingsOn: aBindingGroup
|
||||
(aBindingGroup at: 'Go to')
|
||||
addActionKey: 77 labelled: 'Methods' callback: [ self focus ]
|
||||
! !
|
||||
|
||||
!HLMethodsListWidget methodsFor: 'rendering'!
|
||||
|
||||
renderContentOn: html
|
||||
|
@ -432,11 +406,11 @@ selectItem: aPackage
|
|||
self model selectedPackage: aPackage
|
||||
! !
|
||||
|
||||
!HLPackagesListWidget methodsFor: 'keybindings'!
|
||||
!HLPackagesListWidget methodsFor: 'announcements'!
|
||||
|
||||
registerBindingsOn: aBindingGroup
|
||||
(aBindingGroup at: 'Go to')
|
||||
addActionKey: 80 labelled: 'Packages' callback: [ self focus ]
|
||||
subscribeTo: anAnnouncer
|
||||
anAnnouncer on: HLPackageSelected do: [ :ann |
|
||||
self focus ]
|
||||
! !
|
||||
|
||||
!HLPackagesListWidget methodsFor: 'rendering'!
|
||||
|
@ -473,7 +447,7 @@ allProtocol
|
|||
!
|
||||
|
||||
selectedItem
|
||||
^ super selectedItem ifNil: [ self allProtocol ]
|
||||
^ super selectedItem" ifNil: [ self allProtocol ]"
|
||||
! !
|
||||
|
||||
!HLProtocolsListWidget methodsFor: 'actions'!
|
||||
|
@ -502,14 +476,9 @@ subscribeTo: anAnnouncer
|
|||
anAnnouncer on: HLClassSelected do: [ :ann |
|
||||
self classSelected: ann item ].
|
||||
anAnnouncer on: HLShowInstanceToggled do: [ :ann |
|
||||
self classSelected: self model selectedClass ]
|
||||
! !
|
||||
|
||||
!HLProtocolsListWidget methodsFor: 'keybindings'!
|
||||
|
||||
registerBindingsOn: aBindingGroup
|
||||
(aBindingGroup at: 'Go to')
|
||||
addActionKey: 84 labelled: 'Protocols' callback: [ self focus ]
|
||||
self classSelected: self model selectedClass ].
|
||||
anAnnouncer on: HLProtocolSelected do: [ :ann |
|
||||
self focus ]
|
||||
! !
|
||||
|
||||
!HLProtocolsListWidget methodsFor: 'rendering'!
|
||||
|
@ -549,16 +518,17 @@ selectedClass
|
|||
!
|
||||
|
||||
selectedClass: aClass
|
||||
aClass
|
||||
ifNil: [ selectedClass := nil ]
|
||||
ifNotNil: [
|
||||
self showInstance
|
||||
ifTrue: [ selectedClass := aClass theNonMetaClass ]
|
||||
ifFalse: [ selectedClass := aClass theMetaClass ] ].
|
||||
selectedClass = aClass ifFalse: [
|
||||
aClass
|
||||
ifNil: [ selectedClass := nil ]
|
||||
ifNotNil: [
|
||||
self showInstance
|
||||
ifTrue: [ selectedClass := aClass theNonMetaClass ]
|
||||
ifFalse: [ selectedClass := aClass theMetaClass ] ].
|
||||
|
||||
self
|
||||
selectedMethod: nil;
|
||||
selectedProtocol: nil.
|
||||
self
|
||||
selectedMethod: nil;
|
||||
selectedProtocol: nil ].
|
||||
|
||||
self announcer announce: (HLClassSelected on: self selectedClass)
|
||||
!
|
||||
|
@ -568,7 +538,8 @@ selectedMethod
|
|||
!
|
||||
|
||||
selectedMethod: aCompiledMethod
|
||||
selectedMethod := aCompiledMethod.
|
||||
selectedMethod = aCompiledMethod ifFalse: [
|
||||
selectedMethod := aCompiledMethod ].
|
||||
|
||||
self announcer announce: (HLMethodSelected on: aCompiledMethod)
|
||||
!
|
||||
|
@ -578,9 +549,9 @@ selectedPackage
|
|||
!
|
||||
|
||||
selectedPackage: aPackage
|
||||
|
||||
selectedPackage := aPackage.
|
||||
self selectedClass: nil.
|
||||
selectedPackage = aPackage ifFalse: [
|
||||
selectedPackage := aPackage.
|
||||
self selectedClass: nil ].
|
||||
|
||||
self announcer announce: (HLPackageSelected on: aPackage)
|
||||
!
|
||||
|
@ -590,9 +561,9 @@ selectedProtocol
|
|||
!
|
||||
|
||||
selectedProtocol: aString
|
||||
selectedProtocol := aString.
|
||||
|
||||
self selectedMethod: nil.
|
||||
selectedProtocol = aString ifFalse: [
|
||||
selectedProtocol := aString.
|
||||
self selectedMethod: nil ].
|
||||
|
||||
self announcer announce: (HLProtocolSelected on: aString)
|
||||
!
|
||||
|
|
|
@ -6,10 +6,218 @@ Object subclass: #HLCommand
|
|||
!HLCommand methodsFor: 'accessing'!
|
||||
|
||||
documentation
|
||||
^ ''
|
||||
^ self class documentation
|
||||
!
|
||||
|
||||
key
|
||||
^ self class key
|
||||
!
|
||||
|
||||
label
|
||||
self subclassResponsibility
|
||||
^ self class label
|
||||
! !
|
||||
|
||||
!HLCommand methodsFor: 'converting'!
|
||||
|
||||
asBinding
|
||||
^ (HLBindingAction on: self key labelled: self label)
|
||||
callback: [ self execute ]
|
||||
! !
|
||||
|
||||
!HLCommand methodsFor: 'executing'!
|
||||
|
||||
execute
|
||||
! !
|
||||
|
||||
!HLCommand class methodsFor: 'accessing'!
|
||||
|
||||
bindingGroup
|
||||
^ nil
|
||||
!
|
||||
|
||||
documentation
|
||||
^ ''
|
||||
!
|
||||
|
||||
key
|
||||
^ nil
|
||||
!
|
||||
|
||||
label
|
||||
^ ''
|
||||
! !
|
||||
|
||||
HLCommand subclass: #HLBrowserCommand
|
||||
instanceVariableNames: 'model'
|
||||
package: 'Helios-Commands'!
|
||||
|
||||
!HLBrowserCommand methodsFor: 'accessing'!
|
||||
|
||||
model
|
||||
^ model
|
||||
!
|
||||
|
||||
model: aBrowserModel
|
||||
model := aBrowserModel
|
||||
! !
|
||||
|
||||
!HLBrowserCommand class methodsFor: 'instance creation'!
|
||||
|
||||
on: aBrowserModel
|
||||
^ self new
|
||||
model: aBrowserModel;
|
||||
yourself
|
||||
! !
|
||||
|
||||
HLBrowserCommand subclass: #HLGoToCommand
|
||||
instanceVariableNames: ''
|
||||
package: 'Helios-Commands'!
|
||||
|
||||
!HLGoToCommand class methodsFor: 'accessing'!
|
||||
|
||||
bindingGroup
|
||||
^ 'Go to'
|
||||
! !
|
||||
|
||||
HLGoToCommand subclass: #HLGoToClassesCommand
|
||||
instanceVariableNames: ''
|
||||
package: 'Helios-Commands'!
|
||||
|
||||
!HLGoToClassesCommand methodsFor: 'executing'!
|
||||
|
||||
execute
|
||||
self model selectedClass: self model selectedClass
|
||||
! !
|
||||
|
||||
!HLGoToClassesCommand class methodsFor: 'accessing'!
|
||||
|
||||
key
|
||||
"c"
|
||||
|
||||
^ 67
|
||||
!
|
||||
|
||||
label
|
||||
^ 'Classes'
|
||||
! !
|
||||
|
||||
HLGoToCommand subclass: #HLGoToMethodsCommand
|
||||
instanceVariableNames: ''
|
||||
package: 'Helios-Commands'!
|
||||
|
||||
!HLGoToMethodsCommand methodsFor: 'executing'!
|
||||
|
||||
execute
|
||||
self model selectedMethod: self model selectedMethod
|
||||
! !
|
||||
|
||||
!HLGoToMethodsCommand class methodsFor: 'accessing'!
|
||||
|
||||
key
|
||||
"m"
|
||||
|
||||
^ 77
|
||||
!
|
||||
|
||||
label
|
||||
^ 'Methods'
|
||||
! !
|
||||
|
||||
HLGoToCommand subclass: #HLGoToPackagesCommand
|
||||
instanceVariableNames: ''
|
||||
package: 'Helios-Commands'!
|
||||
|
||||
!HLGoToPackagesCommand methodsFor: 'executing'!
|
||||
|
||||
execute
|
||||
self model selectedPackage: self model selectedPackage
|
||||
! !
|
||||
|
||||
!HLGoToPackagesCommand class methodsFor: 'accessing'!
|
||||
|
||||
key
|
||||
"p"
|
||||
|
||||
^ 80
|
||||
!
|
||||
|
||||
label
|
||||
^ 'Packages'
|
||||
! !
|
||||
|
||||
HLGoToCommand subclass: #HLGoToProtocolsCommand
|
||||
instanceVariableNames: ''
|
||||
package: 'Helios-Commands'!
|
||||
|
||||
!HLGoToProtocolsCommand methodsFor: 'executing'!
|
||||
|
||||
execute
|
||||
self model selectedProtocol: self model selectedProtocol
|
||||
! !
|
||||
|
||||
!HLGoToProtocolsCommand class methodsFor: 'accessing'!
|
||||
|
||||
key
|
||||
"p"
|
||||
|
||||
^ 84
|
||||
!
|
||||
|
||||
label
|
||||
^ 'Protocols'
|
||||
! !
|
||||
|
||||
HLBrowserCommand subclass: #HLToggleCommand
|
||||
instanceVariableNames: ''
|
||||
package: 'Helios-Commands'!
|
||||
|
||||
!HLToggleCommand class methodsFor: 'accessing'!
|
||||
|
||||
bindingGroup
|
||||
^ 'Toggle'
|
||||
! !
|
||||
|
||||
HLToggleCommand subclass: #HLToggleClassSideCommand
|
||||
instanceVariableNames: ''
|
||||
package: 'Helios-Commands'!
|
||||
|
||||
!HLToggleClassSideCommand methodsFor: 'executing'!
|
||||
|
||||
execute
|
||||
self model showInstance: false
|
||||
! !
|
||||
|
||||
!HLToggleClassSideCommand class methodsFor: 'accessing'!
|
||||
|
||||
key
|
||||
"c"
|
||||
|
||||
^ 67
|
||||
!
|
||||
|
||||
label
|
||||
^ 'Class side'
|
||||
! !
|
||||
|
||||
HLToggleCommand subclass: #HLToggleInstanceSideCommand
|
||||
instanceVariableNames: ''
|
||||
package: 'Helios-Commands'!
|
||||
|
||||
!HLToggleInstanceSideCommand methodsFor: 'executing'!
|
||||
|
||||
execute
|
||||
self model showInstance: true
|
||||
! !
|
||||
|
||||
!HLToggleInstanceSideCommand class methodsFor: 'accessing'!
|
||||
|
||||
key
|
||||
"i"
|
||||
|
||||
^ 73
|
||||
!
|
||||
|
||||
label
|
||||
^ 'Instance side'
|
||||
! !
|
||||
|
||||
|
|
|
@ -393,6 +393,7 @@ selectItem: anObject
|
|||
!HLListWidget methodsFor: 'events'!
|
||||
|
||||
setupKeyBindings
|
||||
| next |
|
||||
hiddenInput asJQuery unbind: 'keydown'.
|
||||
|
||||
hiddenInput asJQuery keydown: [ :e | | selected |
|
||||
|
@ -400,7 +401,9 @@ setupKeyBindings
|
|||
e which = 38 ifTrue: [
|
||||
self activateListItem: selected prev ].
|
||||
e which = 40 ifTrue: [
|
||||
self activateListItem: selected next ] ]
|
||||
next := selected next.
|
||||
(next get: 0) ifNil: [ next := window jQuery: '.focused .nav-pills li:first-child' ].
|
||||
self activateListItem: next ] ]
|
||||
! !
|
||||
|
||||
!HLListWidget methodsFor: 'rendering'!
|
||||
|
@ -431,8 +434,7 @@ renderItem: anObject on: html
|
|||
(html tag: 'i') class: (self iconForItem: anObject).
|
||||
self renderItemLabel: anObject on: html ];
|
||||
onClick: [
|
||||
self activateListItem: li asJQuery.
|
||||
"self selectItem: anObject" ] ]
|
||||
self activateListItem: li asJQuery ] ]
|
||||
!
|
||||
|
||||
renderItemLabel: anObject on: html
|
||||
|
|
|
@ -97,6 +97,12 @@ addActionKey: anInteger labelled: aString callback: aBlock
|
|||
yourself)
|
||||
!
|
||||
|
||||
addActionKey: anInteger labelled: aString command: aCommand
|
||||
self add: ((HLBindingAction on: anInteger labelled: aString)
|
||||
command: aCommand;
|
||||
yourself)
|
||||
!
|
||||
|
||||
addGroupKey: anInteger labelled: aString
|
||||
self add: (HLBindingGroup on: anInteger labelled: aString)
|
||||
!
|
||||
|
|
Loading…
Reference in New Issue