Closed
Bug 683513
Opened 14 years ago
Closed 11 years ago
GCLI needs a 'scratchpad' command
Categories
(DevTools Graveyard :: Graphic Commandline and Toolbar, defect, P2)
DevTools Graveyard
Graphic Commandline and Toolbar
Tracking
(Not tracked)
RESOLVED
FIXED
Future
People
(Reporter: jwalker, Unassigned)
References
Details
(Whiteboard: [gclicommands])
Attachments
(1 file)
|
3.31 KB,
text/plain
|
Details |
This command allows the user to open and control the scratchpad
| Reporter | ||
Comment 1•14 years ago
|
||
Would benefit from bug 659268
| Reporter | ||
Comment 3•14 years ago
|
||
From https://bugzilla.mozilla.org/show_bug.cgi?id=636731#c0
We should be able to control Workspaces via Cockpit. Initial set of commands I can think of (feel free to add/remove/adjust as makes sense):
* open workspace
* load file into workspace
* select range of lines
* object view for that range of lines ("inspect?" overloaded word?)
* evaluate that range of lines
* close the workspace (what if there are multiple?)
Note also that I think in addition to a selected DOM node notion, I think we also want a selected object. it would be good to evaluate code in the workspace and then be able to do another operation on that same object.
Comment 4•14 years ago
|
||
To properly handle the notion of multiple Scratchpads, we need "handles". Something like:
open scratchpad into handle1
load file into handle1
select 10,40 in handle1
close handle1
... where handle1 or whatever the user picks refers to the scratchpad instance he opened. One can have multiple handles/Scratchpad instances. The GCLI commands need to be made easy to use with the notion of "handles".
Thoughts?
| Reporter | ||
Comment 5•14 years ago
|
||
We're not trying to be a scripting language - that's what JS is for, so GCLI is almost a write-only language :) - ease of typing trumps readability every time.
So rather than:
> open scratchpad into handle1
We can do:
> scratchpad --name handle1
The difference isn't really in characters typed, but in predictability. In effect we're doing most-significant-word-first to make subsequent words more predictable. You're right that the former is more readable, but the latter is more typable.
Makes sense?
Comment 6•14 years ago
|
||
(In reply to Joe Walker from comment #5)
> We're not trying to be a scripting language - that's what JS is for, so GCLI
> is almost a write-only language :) - ease of typing trumps readability every
> time.
>
> So rather than:
> > open scratchpad into handle1
>
> We can do:
> > scratchpad --name handle1
>
> The difference isn't really in characters typed, but in predictability. In
> effect we're doing most-significant-word-first to make subsequent words more
> predictable. You're right that the former is more readable, but the latter
> is more typable.
>
> Makes sense?
Sure, it does. My idea wasn't specifically about the syntax of the commands themselves, I was more aiming at the idea of having "handles" for every Scratchpad instance created from GCLI.
| Reporter | ||
Comment 7•14 years ago
|
||
OK - idea noted. Thanks.
| Reporter | ||
Updated•14 years ago
|
| Reporter | ||
Comment 8•14 years ago
|
||
| Reporter | ||
Updated•14 years ago
|
Assignee: nobody → fayearthur
| Reporter | ||
Comment 9•13 years ago
|
||
For what it's worth these are the strings to go with the example, which would live in /devtools/browser/locales/en-US/chrome/browser/devtools/gclicommands.properties
scratchpadDesc=Open a scratchpad
scratchpadManual=Scratchpad allows editing JavaScript in a smalltalk-like environment
scratchpadFileDesc=Initial file
scratchpadScriptDesc=Initial script
scratchpadChromeDesc=Chrome privilages
scratchpadOnesource=Only one of --file and --script should be used
scratchpadFilepretend=Pretend this is a scratchpad with the contents of %S
scratchpadScriptpretend=Pretend this is a scratchpad containing this text
scratchpadEmptypretend=Pretend this is an empty scratchpad
| Reporter | ||
Comment 10•13 years ago
|
||
Moving GCLI bugs to Developer Tools: Console. Filter on 'baked beans are off'.
Component: Developer Tools → Developer Tools: Console
| Reporter | ||
Comment 11•13 years ago
|
||
Consider adding a --template XXX to pre-fill the scratchpad with a custom template - for example to create a new GCLI command.
Add a separate bug to do this, if you don't do it in this bug.
| Reporter | ||
Comment 12•13 years ago
|
||
(In reply to Joe Walker from comment #11)
> Add a separate bug to do this, if you don't do it in this bug.
Sorry - that came across really didactic. If this feature doesn't fit, we can do it in another bug.
| Reporter | ||
Updated•13 years ago
|
Updated•13 years ago
|
Assignee: fayearthur → rcampbell
Status: NEW → ASSIGNED
Priority: -- → P1
| Reporter | ||
Updated•13 years ago
|
Target Milestone: Firefox 12 → Firefox 13
| Reporter | ||
Updated•13 years ago
|
Target Milestone: Firefox 13 → Firefox 14
| Reporter | ||
Updated•13 years ago
|
Target Milestone: Firefox 14 → Firefox 15
| Reporter | ||
Updated•13 years ago
|
Target Milestone: Firefox 15 → Firefox 16
Comment 14•13 years ago
|
||
Another potentially useful feature:
scratchpad --gist <url>
scratchpad --pastebin <url>
Populates a scratchpad with the contents of the specified gist or pastebin.
| Reporter | ||
Comment 15•13 years ago
|
||
Additional progress:
https://gist.github.com/2995780
Rob - what are the chances of you getting time to finish this off for 16?
Comment 17•13 years ago
|
||
(In reply to Joe Walker from comment #15)
> Additional progress:
> https://gist.github.com/2995780
>
> Rob - what are the chances of you getting time to finish this off for 16?
I should have a chance to work on it next week. Doesn't give us a lot of time for review and fixups though so feel free to steal it if anyone has the cycles.
Comment 18•13 years ago
|
||
still hoping...
| Reporter | ||
Updated•13 years ago
|
Target Milestone: Firefox 16 → Firefox 17
| Reporter | ||
Comment 19•13 years ago
|
||
Triage: Filter on the TRIAGE keyword.
Priority: P1 → P2
Target Milestone: Firefox 17 → Future
| Reporter | ||
Comment 20•12 years ago
|
||
New component triage. Filter on "Lobster Thermidor aux crevettes with a Mornay sauce"
Component: Developer Tools: Console → Developer Tools: Graphic Commandline and Toolbar
Comment 21•12 years ago
|
||
why am I still assigned to this?
Assignee: rcampbell → nobody
Status: ASSIGNED → NEW
| Reporter | ||
Updated•11 years ago
|
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Updated•7 years ago
|
Product: Firefox → DevTools
Updated•7 years ago
|
Product: DevTools → DevTools Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•