Keyboard shortcuts

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
38 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Keyboard shortcuts

Bernardo Clavijo
Hello,
Before my new help request, thank you all for the hints in my "stb fight"
after setting an exclusion & consistence politic, it seems to be in the
right way to a happy end.
Well, my question today is... are there any place where I can find all the
shortcuts (or keystrokes or whatever you call it) for the Dolphin IDE?
Since I hate to use the mouse (thinking it's a terrible waste of time and
energy most of the times) I usually study all keyboard combinations in the
IDEs I use, but can't find a list of those in Dolphin.

Thanks in Advance

Saludos

    BJ
Bernardo Clavijo


Reply | Threaded
Open this post in threaded view
|

Re: Keyboard shortcuts

Andy Bower-3
Bernardo,

> Well, my question today is... are there any place where I can find
> all the shortcuts (or keystrokes or whatever you call it) for the
> Dolphin IDE?  Since I hate to use the mouse (thinking it's a terrible
> waste of time and energy most of the times) I usually study all
> keyboard combinations in the IDEs I use, but can't find a list of
> those in Dolphin.

Try Help/Key Bindings. In each of the development tools (system folder,
browsers etc) this gives a list of the shortcut keys available in that
tool.

Best regards,

Andy Bower
Dolphin Support
www.object-arts.com


Reply | Threaded
Open this post in threaded view
|

Re: Keyboard shortcuts

Ian Bartholomew-18
In reply to this post by Bernardo Clavijo
Bernardo,

>                 I usually study all
> keyboard combinations in the IDEs I use, but can't find a list of
> those in Dolphin.

In addition to the menu option that Andy pointed out the following
script, when executed in a workspace, will dump a list of the key
bindings for the major tools into the Transcript.

#(TranscriptShell Debugger ClassBrowserShell
SystemBrowserShell PackageBrowserShell)
    do: [:class |
        shellView := (Smalltalk at: class) show view.
        accels := shellView combinedAcceleratorTable accelerators
            collect: [:each |
                each value acceleratorKeyString
                -> ((each value description) copyWithout: $&)].
        accels := accels asSet asSortedCollection: [:a :b |
            a key < b key].
        shellView close.

        Transcript print: class; cr.
        accels do: [:each |
            Transcript
                nextPutAll: ('%-30s' sprintfWith: each key);
                nextPutAll: each value; cr].
        Transcript cr; cr]
--
Ian


Reply | Threaded
Open this post in threaded view
|

Re: Keyboard shortcuts

Joseph Pelrine-6
In reply to this post by Andy Bower-3
Andy Bower wrote:

>Bernardo,
>
>>Well, my question today is... are there any place where I can find
>>all the shortcuts (or keystrokes or whatever you call it) for the
>>Dolphin IDE?  Since I hate to use the mouse (thinking it's a terrible
>>waste of time and energy most of the times) I usually study all
>>keyboard combinations in the IDEs I use, but can't find a list of
>>those in Dolphin.
>>
>
>Try Help/Key Bindings. In each of the development tools (system folder,
>browsers etc) this gives a list of the shortcut keys available in that
>tool.
>
Hi Andy

You guys included my Abbreviations hack a while back. IIRC, there's a
key combination that will also show all entries in the Abbreviations
dictionary. Shift+Space+A or something (sorry, I'm on the road and don't
have access to a Dolphin image to try it out).

Cheers

--
--
Joseph Pelrine [ | ]
MetaProg GmbH
Email: [hidden email]
Web:   http://www.metaprog.com

"If you don't live on the edge, you're taking up too much space" -
Doug Robinson


--
--
Joseph Pelrine [ | ]
MetaProg GmbH
Email: [hidden email]
Web:   http://www.metaprog.com

"If you don't live on the edge, you're taking up too much space" -
Doug Robinson


Reply | Threaded
Open this post in threaded view
|

Re: Keyboard shortcuts

Bill Schwab-2
In reply to this post by Andy Bower-3
Andy,

I have so few frustrations with Dolphin that the most notable of them
surrounds the insert key.  A few times a day, I look up to discover that
I've been overwriting instead of inserting text.  When on a roll, I type at
~100 words/min, so it can be painful :(   I would be perfectly willing to
disable the insert toggle, because I tend to select any text I want to
overwrite.  Is there a way to supress it from Dolphin?

There are things on the market to address the problem, but they give me DOS
TSR flashbacks.  The remapkey tool in the 2k resource kit will almost solve
the problem, but it's not ideal - I want to hobble the accelerator, not the
key itself (insert bad, shift/control-insert good).

Have a good one,

Bill

--
Wilhelm K. Schwab, Ph.D.
[hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: Keyboard shortcuts

Christopher J. Demers
"Bill Schwab" <[hidden email]> wrote in message
news:bpejr6$1muu51$[hidden email]...
> Andy,
>
> I have so few frustrations with Dolphin that the most notable of them
> surrounds the insert key.  A few times a day, I look up to discover that
> I've been overwriting instead of inserting text.  When on a roll, I type
at
> ~100 words/min, so it can be painful :(   I would be perfectly willing to
> disable the insert toggle, because I tend to select any text I want to
> overwrite.  Is there a way to supress it from Dolphin?
...

I second Bill's thoughts on this.  I have never had a use for the insert key
in the a Dolphin workspace, but it often messes me up.  I would be glad to
turn off the insert key in workspaces.

Chris


Reply | Threaded
Open this post in threaded view
|

Re: Keyboard shortcuts

Blair McGlashan-2
"Christopher J. Demers" <[hidden email]> wrote in
message news:bpeutj$1mk4lk$[hidden email]...
> "Bill Schwab" <[hidden email]> wrote in message
> news:bpejr6$1muu51$[hidden email]...
> > Andy,
> >
> > I have so few frustrations with Dolphin that the most notable of them
> > surrounds the insert key.  A few times a day, I look up to discover that
> > I've been overwriting instead of inserting text.  When on a roll, I type
> at
> > ~100 words/min, so it can be painful :(   I would be perfectly willing
to
> > disable the insert toggle, because I tend to select any text I want to
> > overwrite.  Is there a way to supress it from Dolphin?
> ...
>
> I second Bill's thoughts on this.  I have never had a use for the insert
key
> in the a Dolphin workspace, but it often messes me up.  I would be glad to
> turn off the insert key in workspaces.

Simple:
    bindings := SmalltalkWorkspace acceleratorKeyBindings.
    bindings at: 'INSERT' put: #dontPressMe.
    SmalltalkWorkspace acceleratorKeyBindings: bindings.

You have now effectively disabled the Insert key in all subsequently opened
workspaces (i.e. existing workspaces will be unaffected, so close all
existing tools). If you don't want the bell to be rung when you press
Insert, then define the binding to map to a command which is implemented but
which does nothing (e.g. #yourself). Alternatively you could bind it to some
useful command if you wish.

Happy?

Regards

Blair


Reply | Threaded
Open this post in threaded view
|

Re: Keyboard shortcuts

Blair McGlashan-2
In reply to this post by Andy Bower-3
"Andy Bower" <[hidden email]> wrote in message
news:[hidden email]...

> Bernardo,
>
> > Well, my question today is... are there any place where I can find
> > all the shortcuts (or keystrokes or whatever you call it) for the
> > Dolphin IDE?  Since I hate to use the mouse (thinking it's a terrible
> > waste of time and energy most of the times) I usually study all
> > keyboard combinations in the IDEs I use, but can't find a list of
> > those in Dolphin.
>
> Try Help/Key Bindings. In each of the development tools (system folder,
> browsers etc) this gives a list of the shortcut keys available in that
> tool.

I'll just add that this will only include the key bindings defined in
Dolphin itself, not any that are provided by the underlying control itself
unless these are duplicated by the Dolphin bindings. As far as we are aware
there is no standard way to query of a Windows control the key bindings that
it implements itself, so one has to rely on reading the documentation for
that particular control. On the whole though they implement the standard
Windows accelerator keys (e.g. Ctrl+V for Paste, Ctrl+A for Select All,
Ctrl+Y for redo, etc).

The shortcut keys for Microsoft's controls can be found in MSDN, e.g. for
the RichEdit control (used in current Dolphin versions for the source editor
windows):

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/richedit/richeditcontrols/aboutricheditcontrols.asp

Not all of the standard RichEdit shortcuts are useful in a source code
editor (a lot of them are to do with rich text editing, such as Ctrl+Shift+=
to convert selected text into a superscript), but those to do with selection
and cursor movement are or can be useful (e.g. Ctrl+Backspace to delete the
previous word).

Regards

Blair


Reply | Threaded
Open this post in threaded view
|

Re: Keyboard shortcuts

Bill Schwab-2
In reply to this post by Blair McGlashan-2
Blair,

> Simple:
>     bindings := SmalltalkWorkspace acceleratorKeyBindings.
>     bindings at: 'INSERT' put: #dontPressMe.
>     SmalltalkWorkspace acceleratorKeyBindings: bindings.
>
> You have now effectively disabled the Insert key in all subsequently
opened
> workspaces (i.e. existing workspaces will be unaffected, so close all
> existing tools). If you don't want the bell to be rung when you press
> Insert, then define the binding to map to a command which is implemented
but
> which does nothing (e.g. #yourself). Alternatively you could bind it to
some
> useful command if you wish.

The following is now in the post-install script of my base package:

SmalltalkWorkspace acceleratorKeyBindings:(
 SmalltalkWorkspace acceleratorKeyBindings
  at:'INSERT' put:#yourself;
  yourself
)


> Happy?

Very!  Thanks!!!!

Bill

--
Wilhelm K. Schwab, Ph.D.
[hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: Keyboard shortcuts

Bernardo Clavijo
Bill Schwab wrote:

> The following is now in the post-install script of my base package:
>
> SmalltalkWorkspace acceleratorKeyBindings:(
>  SmalltalkWorkspace acceleratorKeyBindings
>   at:'INSERT' put:#yourself;
>   yourself
> )

After a morning adding some key bindings (now my ClassBrowser can be used
without any mouse touch with some confort) I think the propper place to put
personal keyBindins is additionalAccelerators or something like that, an
instance method, sure about the additional part of name ;) -didn't have a
dolphin installed in my home linux box, so I can't check it.

Saludos

    BJ
Bernardo Clavijo


Reply | Threaded
Open this post in threaded view
|

Re: Keyboard shortcuts

Christopher J. Demers
In reply to this post by Blair McGlashan-2
"Blair McGlashan" <blair@no spam object-arts.com> wrote in message
news:3fbb3eb4$[hidden email]...
>
> "Christopher J. Demers" <[hidden email]> wrote in
> > I second Bill's thoughts on this.  I have never had a use for the insert
> key
> > in the a Dolphin workspace, but it often messes me up.  I would be glad
to
> > turn off the insert key in workspaces.
>
> Simple:
>     bindings := SmalltalkWorkspace acceleratorKeyBindings.
>     bindings at: 'INSERT' put: #dontPressMe.
>     SmalltalkWorkspace acceleratorKeyBindings: bindings.
>
> You have now effectively disabled the Insert key in all subsequently
opened

Thanks, this is great.
A side note to anyone using the Solution Software's Tools+ add-on product:
They will need to modify SSWSmalltalkWorkspace<<additionalAccelerators so
that it adds the Tools+ accelerators to the accelerators of the super class,
rather than returning a new collection.

Chris


Reply | Threaded
Open this post in threaded view
|

Re: Keyboard shortcuts

Blair McGlashan
In reply to this post by Bernardo Clavijo
"Bernardo Clavijo" <[hidden email]> wrote in message
news:bpgpo7$1nmd2n$[hidden email]...

> Bill Schwab wrote:
>
> > The following is now in the post-install script of my base package:
> >
> > SmalltalkWorkspace acceleratorKeyBindings:(
> >  SmalltalkWorkspace acceleratorKeyBindings
> >   at:'INSERT' put:#yourself;
> >   yourself
> > )
>
> After a morning adding some key bindings (now my ClassBrowser can be used
> without any mouse touch with some confort) ...

Just as a matter of interest, what key bindings did you add?

We like to know how people use the system so that we can improve its
usability in future releases.

>....I think the propper place to put
> personal keyBindins is additionalAccelerators or something like that, an
> instance method, sure about the additional part of name ;) -didn't have a
> dolphin installed in my home linux box, so I can't check it.

That is true to an extent, but where possible it is better to make personal
configuration changes as 'data' changes rather than as 'code' changes. This
is because if you modify system methods it is much more difficult to migrate
those changes forward into a future release.

It is a good feature of Smalltalk that you have the source code to the IDE
and can modify or extend it to your own taste. However configuration changes
that are commonly made should be possible without requiring the modification
of system methods. If you come across some personalisation change that you
have to make by modifying a system method then we are interested to know
about it so that we can consider making it possible to configure it in other
ways.

Regards

Blair


Reply | Threaded
Open this post in threaded view
|

Re: Keyboard shortcuts

Chris Uppal-3
Blair McGlashan wrote:

> If you come across some personalisation
> change that you have to make by modifying a system method then we are
> interested to know about it so that we can consider making it possible to
> configure it in other ways.

Right.

package>>savePAC
    Modified to prompt if it's overwriting a file that is newer than the
package
    and to remember the timestamp of the .pac file.

package>>load
    Modified to remember the timestamp of the .pac file.

DevelopmentSessionManager>>onQuit:
    Modifed so that the prompt warns me about any unsaved packages too.

Incidentally, these first three are absolutely vital to me (I could hardly use
Dolphin without them), but the mods to package>>save/load are extremely
delicate, and have to be re-written for just about every new version of
Dolphin.  I have asked several times over the years for this feature to be
added to the base image (and even posted code -- twice), but nobody has yet
replied.


Continuing...

CompiledMethod>>getColoredSource
    Modified to underline sends of undefined selectors.

MethodBrowser>>saveMethod:in:categories:package:
    Modified to add warning to status bar for undefined sends.

Object>>inspectorClass
    Modified to answer my own inspector.

SmalltalkSystem>>createVariableAccessors:in:classVariable:
    Modified to generate code adhering to my own conventions.

SmalltalkWorkspace>>showResultAt:
    Modified to show the result in a slightly different form.

Also keyboard accelerators added:
    Indent/outdent
    add/remove single/double quotes (properly doubling embedded quotes)
    add/remove round/square brackets
    Ctrl+Shift+D -- version of #displauIt that uses #displayString instead of
#printString.
    Ctrl+Shift+V -- mapped to #pastePlainText (very useful)

I've also modified various system resources to add these to the menus too -- I
tend to forget shortcuts unless I use them a Lot.  BTW, I realise that I could
modify the menus dynamically instead by hooking the #viewOpened event, but I've
never got around to setting up the necessary support code.

    -- chris


Reply | Threaded
Open this post in threaded view
|

Re: Keyboard shortcuts

Bernardo Clavijo
In reply to this post by Blair McGlashan
Blair McGlashan wrote:

>> After a morning adding some key bindings (now my ClassBrowser can be used
>> without any mouse touch with some confort) ...
>
> Just as a matter of interest, what key bindings did you add?
>
> We like to know how people use the system so that we can improve its
> usability in future releases.

Well, by now (but I'll still add a lot more, since my idea is to never touch
the mouse), in the class Browser:
Shift+Ctrl+[1-7] change the focus to: Class tree, Instance methods
categories, Class methods Categories, method selector, method source, class
definition & class comment.

It's a way to move thruogh object's code with keyboard, and, five minutes
using it made me totally addict to it. The "tab way" to change focus can't
be compared to this, as you all suspect.

Saludos

     BJ
Bernardo Clavijo


Reply | Threaded
Open this post in threaded view
|

Re: Keyboard shortcuts

Blair McGlashan
In reply to this post by Chris Uppal-3
"Chris Uppal" <[hidden email]> wrote in message
news:3fbcbedd$0$113$[hidden email]...
> Blair McGlashan wrote:
>
> > If you come across some personalisation
> > change that you have to make by modifying a system method then we are
> > interested to know about it so that we can consider making it possible
to
> > configure it in other ways.
>
> Right.

Chris, I think some of these go beyond what I would call personalisation
changes (and some of them don't really need to modify system methods because
of the recent additions such as the IDE extension framework), but ...

>
> package>>savePAC
>     Modified to prompt if it's overwriting a file that is newer than the
> package
>     and to remember the timestamp of the .pac file.
>
> package>>load
>     Modified to remember the timestamp of the .pac file.
>
> DevelopmentSessionManager>>onQuit:
>     Modifed so that the prompt warns me about any unsaved packages too.
>
> Incidentally, these first three are absolutely vital to me (I could hardly
use
> Dolphin without them), but the mods to package>>save/load are extremely
> delicate, and have to be re-written for just about every new version of
> Dolphin.  I have asked several times over the years for this feature to be
> added to the base image (and even posted code -- twice), but nobody has
yet
> replied.
>

Regarding the package load/save timestamps, we will try and put those in to
D6, and also the test for overwriting a new version of the package when
saving it  (#1397). If you'd like to send me your patches then I might be
able to release it in PL3 for 5.1.

As for the prompt you could already achieve what you want to do without
needing to modify any system methods by subclassing
DevelopmentSessionManager, overriding  and replacing the singleton instance.
I don't particular want to make this a standard feature because we firmly
believe that the image should be used as a temporary repository for work
that is in progress. If one always saves the image on exit (except when
aborting some modifications) then the changed packages can be written out at
any time. In fact we tend to regard saving a package as a much more
significant step than saving the image, something reinforced by them being
stored in a source code control system (using the PAX format) that makes
them read-only on the disk. Having saved out a package as all its
constituent files, we then check it into a traditional source code control
system.

I know this is a matter of personal working style, however, and
subclassing/replacing DevelopmentSessionManager is not a particularly
straightforward thing to do, so what I propose to do is to use the existing
#queryEndSession: mechanism for terminations resulting from Windows shutdown
(for which it is already used), and terminations initiated by closing the
system launcher window. The standard session manager will hook its own event
to prompt to save changes, and you can then replace this hook with one that
goes to your own handler and puts up whatever prompts you want.

>
> Continuing...
>
> CompiledMethod>>getColoredSource
>     Modified to underline sends of undefined selectors.

In D6 the compiler is no longer involved in syntax colouring* - it is
performed dynamically as you type. In addition there is some use of
underlining to highlight compilation errors and warnings (though this is not
yet dynamic). One such warning is generated on a supersend of an message not
implemented in the superclass. I'll record an enhancement request to have
the compiler also report unimplemented selectors as warnings, which would
then achieve that underlining through the generic mechanism.

*Incidentally it will be much easier to change the colours (and other
styles) used too.

>
> MethodBrowser>>saveMethod:in:categories:package:
>     Modified to add warning to status bar for undefined sends.

I've been using Ian's IDE extension for that, and I must admit that it is
more useful that I thought it would be. As I say, if unimplemented selectors
are considered to be compilation warnings, then they would pop up in the
status bar automatically.

>
> Object>>inspectorClass
>     Modified to answer my own inspector.

I intend to bounce that back to development system instance
(SmalltalkSystem) so that it can be configured through User Preferences in
the normal way (#1399).

>
> SmalltalkSystem>>createVariableAccessors:in:classVariable:
>     Modified to generate code adhering to my own conventions.

I think the best way to achieve that would be to subclass and replace
SmalltalkSystem's singleton instance - a straightforward process with none
of the trickyness of replacing the session manager.

>
> SmalltalkWorkspace>>showResultAt:
>     Modified to show the result in a slightly different form.

That should really be possible by subclassing just SmalltalkWorkspace, but
it isn't at present because it is one of the few remaining cases where of a
tool class that is referred to via a global name, rather than indirectly
through 'Smalltalk developmentSystem xxxClass'. I will get that fixed
(#1398).

>
> Also keyboard accelerators added:
>     Indent/outdent
>     add/remove single/double quotes (properly doubling embedded quotes)
>     add/remove round/square brackets
>     Ctrl+Shift+D -- version of #displauIt that uses #displayString instead
of
> #printString.
>     Ctrl+Shift+V -- mapped to #pastePlainText (very useful)
>
> I've also modified various system resources to add these to the menus
too -- I
> tend to forget shortcuts unless I use them a Lot.  BTW, I realise that I
could
> modify the menus dynamically instead by hooking the #viewOpened event, but
I've
> never got around to setting up the necessary support code.

As you say, you could add these without modifying any system methods, either
using the method discussed earlier in the thread, or by using the IDE
extensions framework. This is relatively straightforward, and there are a
few examples in the image, as well as the ones that Ian has done.

Commenting on them individually:

- Indent/Outdent are bound to Tab and Back tab in D6 when there is a
selection, following the convention of many other code editors (actually
this is a feature of the Scintilla control we are now using, and can be
turned off if desired).
- The quoting/bracketing I can add enhancement requests for if you feel they
are sufficiently useful (I can see that these would be useful for, e.g.,
commenting out blocks of code, or wrapping some statements up in a block).
- I quite like the idea of the display string shortcut, but do you really
find you do this often enough to make it worthwhile?
- Pasting of plain text is no longer necessary in the Scintilla based D6
workspaces since these don't accept richtext/HTML content anyway. The
redundant 'Paste Text' command will be removed from the workspace edit menu.

Thanks for your feedback

Blair


Reply | Threaded
Open this post in threaded view
|

Re: Keyboard shortcuts

Randy Coulman-2
In reply to this post by Chris Uppal-3
Chris Uppal wrote:
>
> Also keyboard accelerators added:
>     add/remove single/double quotes (properly doubling embedded quotes)
>     add/remove round/square brackets

Do you have goodies available for these?  I did this myself (but without
the proper doubling of embedded quotes - didn't think of that part) and
posted them here some time ago.

What do you use for accelerators?  I wanted to use the obvious Ctrl-',
Ctrl-", Ctrl-(, and Ctrl-[, but couldn't get all of those to work, so I
went with Ctrl-Q, Ctrl-Shift-Q, Ctrl-P, and Ctrl-K (Ctrl-B was already
taken).

Another option would be to use the Esc- prefix that VW uses, but I'm not
sure if you can do that easily with Windows controls and didn't bother
to take the time to find out.

Thanks,
Randy
--
Randy Coulman
NOTE: Reply-to: address is spam-guarded.  Reassemble the following to
reply directly:
rcoulman at charter dot net


Reply | Threaded
Open this post in threaded view
|

Re: Keyboard shortcuts

Randy Coulman-2
In reply to this post by Blair McGlashan
Blair McGlashan wrote:

>
> In D6 the compiler is no longer involved in syntax colouring* - it is
> performed dynamically as you type. In addition there is some use of
> underlining to highlight compilation errors and warnings (though this is not
> yet dynamic). One such warning is generated on a supersend of an message not
> implemented in the superclass. I'll record an enhancement request to have
> the compiler also report unimplemented selectors as warnings, which would
> then achieve that underlining through the generic mechanism.
>
> *Incidentally it will be much easier to change the colours (and other
> styles) used too.
>

Given that you're working in this area, I'll repeat a request I made
some time ago (not sure if it is in your master list of enhancements):

At my day job, I work in VW.  In the evening, I work on a side project
in Dolphin.  Other than really messing with my
keyboard-shortcut-muscle-memory, it gives me a clear impression of what
I like and dislike about each environment.

When I get back into Dolphin after doing VW, the things I miss the most are:

1) When saving a method, when VW encounters a variable-like symbol it
doesn't recognize, it pops up a list of potential actions.  The actions
are to define the symbol as a temporary variable, a class variable, a
global, leave it undeclared, or to correct it (see below) or cancel
(allowing me to fix things up).  In addition, we installed a patch to
add the choices of declaring it as an inst var, and a co-worker added an
option to define it as new class, popping up the class creation dialog.

I would dearly love to have this feature in Dolphin.  I just haven't had
time to go figure out how to add it myself, and it sounds like my work
could be invalidated by Dolphin 6 if I do get a chance to do it.  The
options I care most about would be temp, inst var, and new class.
Correct it would be nice as well, but of lower priority.  I don't
believe I've ever used the other choices.

I tend to write code using test-driven development.  If I'm about to
implement a new class, I write a test for it first.  Of course, the new
class is undefined, and I cannot save the test method until I rectify
that, which means opening a new browser to do it.

2) When saving a method, when VW encounters an unimplemented message, it
pops up a warning that allows you to proceed, correct it, or cancel.

3) There are times when VW's "show refactoring changes" option comes in
really handy.  Most of the time, it is just in the way.  I don't
generally care about seeing the changes (although it helps to understand
an unfamiliar refactoring).  When I really want it is when the RB gives
a warning like "This will change all N implementers.  Proceed?".  In VW
with "show refactoring changes" enabled, I can proceed and then remove
the changes that I actually don't want.  Dolphin's scoped refactorings
help a lot here, but there are still times I'd like to be more selective
than the scoping allows.

My ideal implementation would not be to have this as a global setting,
but instead to have it be an option whenever one of the warning dialogs
pops up.  So, instead of "Proceed" and "Cancel", you would have
"Proceed", "Show Changes", and "Cancel".

4) Multiple buffer support.

5) Keyboard shortcuts for surrounding text with single/double quotes,
parentheses, or brackets (see below).

The "correct it" choice above, basically pops up a dialog of choices
that are "close" to the symbol typed in error, allowing you to pick the
right one.  It's handy on occasion.

In priority order, I'd pick the following:
- the temp/instance/new class/undeclared dialog (from #1 above)
- #5 above, although I've done this for myself already
- #3 above
- #4 above
- "correct it" option from #1 and #2 above

I was planning to mention the things I miss from Dolphin when I work in
VW, but this message is long enough already, so I'll do that under
separate cover.

> - The quoting/bracketing I can add enhancement requests for if you feel they
> are sufficiently useful (I can see that these would be useful for, e.g.,
> commenting out blocks of code, or wrapping some statements up in a block).

As I said above, I really miss these when I get back to Dolphin.  Please
consider adding them, especially if you can get the proper shortcuts to
work (see my recent response to Chris Uppal for more information).

Thanks,
Randy
--
Randy Coulman
NOTE: Reply-to: address is spam-guarded.  Reassemble the following to
reply directly:
rcoulman at charter dot net


Reply | Threaded
Open this post in threaded view
|

Things I like about Dolphin (was Re: Keyboard shortcuts)

Randy Coulman-2
In reply to this post by Blair McGlashan
In a previous message, I submitted a list of things I miss in Dolphin
after working in VisualWorks.  There are also things I miss in VW after
working in Dolphin.  I wanted to mention them in the interest of fairness.

1) More keyboard shortcuts - F2 to rename anything; shortcuts for the
most popular refactorings; single shortcut for Format and Accept.

2) Scoped method renames.

3) The fact that the third top pane of the System Browser stays on
Variables when I put it there (VW feels the need to switch away from
that from time to time).

4) Icons for public/private, and context menu item for switching.

5) Allowing methods to be in multiple categories (although I find I
don't use categories much any more).

That's all I can think of for now.

Thanks for a great tool,
Randy
--
Randy Coulman
NOTE: Reply-to: address is spam-guarded.  Reassemble the following to
reply directly:
rcoulman at charter dot net


Reply | Threaded
Open this post in threaded view
|

Re: Keyboard shortcuts

Chris Uppal-3
In reply to this post by Randy Coulman-2
Randy,
> Chris Uppal wrote:
> >
> > Also keyboard accelerators added:
> >     add/remove single/double quotes (properly doubling embedded quotes)
> >     add/remove round/square brackets
>
> Do you have goodies available for these?  I did this myself (but without
> the proper doubling of embedded quotes - didn't think of that part) and
> posted them here some time ago.

To be honest I simplified a bit in my post -- I'm actually using the keyboad
accelerators that you originally posted here (for which, belatedly, thank-you)
plus my own code that's only invoked from the menu.

|'ve never bothered to try to merge the two (just never got around to it...).
The code's straightforward, but FWIW:

=====================
encomment
     "comment-out the currently selected text (if any)"

     | currentText newText start |

    #CUadded.
     (currentText := self selection) isEmpty ifTrue: [^ self].
     start := self selectionRange first.

     "have to deal with embedded comments"
     newText := currentText
                              copyReplaceAll: '"'
                              with: '""'.
     newText := '"' , newText , '"'.

     self replaceSelection: newText.
     self selectionRange: (start to: start + newText size).
=====================
decomment
     "undo the commenting-out of the currently selected text (if any)"

     | currentText newText start leadingWS trailingWS index body |
    #CUadded.

     (currentText := self selection) isEmpty ifTrue: [^ self].
     start := self selectionRange first.

     "reverse the doubling-up of embedded comments"
     newText := currentText
                               copyReplaceAll: '""'
                               with: '"'.

     "strip out the first and last non-whitespace quotes"
     body := newText trimBlanks.
     index := newText indexOfSubCollection: body.
     leadingWS := newText copyFrom: 1 to: index - 1.
     trailingWS := newText copyFrom: index + body size to: newText size.
     (body notEmpty and: [body first = $"])
                ifTrue: [body := body rightString: body size - 1].
     (body notEmpty and: [body last = $"])
                ifTrue: [body := body leftString: body size - 1].
     newText := leadingWS , body , trailingWS.

     self replaceSelection: newText.
     self selectionRange: (start to: start + newText size).
=====================

I think that code's based on something that Ian posted here years ago...

    -- chris


Reply | Threaded
Open this post in threaded view
|

Re: Keyboard shortcuts

Chris Uppal-3
In reply to this post by Blair McGlashan
Blair,

> Regarding the package load/save timestamps, we will try and put those in
> to D6, and also the test for overwriting a new version of the package when
> saving it  (#1397). If you'd like to send me your patches then I might be
> able to release it in PL3 for 5.1.

I'll send them to you later.   Oh, the other thing I didn't mention is that I
also try to hook image startup to warn of packages that are older than their
on-disk representation.  I'm still not happy about they way I'm doing that
(implementing DolphinSplash>>onViewClosed) but (as I've discussed here before)
there doesn't seem to be any better place to put it.  Is there any chance you
(someday) could add another startup hook that happens after all the windows are
re-opened and the splash screen (if any) has gone away ?  I seem to remember
Bill asking for something similar once too.


> As for the prompt you could already achieve what you want to do without
> needing to modify any system methods by subclassing
> DevelopmentSessionManager, overriding  and replacing the singleton
> instance. I don't particular want to make this a standard feature because
> we firmly believe that the image should be used as a temporary repository
> for work that is in progress. If one always saves the image on exit
> (except when aborting some modifications) then the changed packages can
> be written out at any time.

I think you miss the point.  I have no particular objection to having unsaved
packages in the image (except that my own development pattern calls for not
having unsaved packages at all), what the exit hook does is to ensure that I
know what's been changed when I decide *whether* to save the image on exit.  I
quite often exit without saving and I became very tired of accidentally loosing
work, and even tireder of having to stop and think (and check) to avoid
accidents.


> In fact we tend to regard saving a package as
> a much more significant step than saving the image, something reinforced
> by them being stored in a source code control system (using the PAX
> format) that makes them read-only on the disk. Having saved out a package
> as all its constituent files, we then check it into a traditional source
> code control system.

Yes, but I don't use a source code control system.   (Actually I do use STS,
but not to its full extent -- I don't regard it as the "real home" of my code).
I -- personally -- have no use whatsoever for the PAX format.

For me, the real home (the master copy, if you like) of my packages is as .PAC
files in my $HOME/source directory.  The code in the image is just a derived
copy; temporary, possibly even ephemeral.


> I know this is a matter of personal working style, however,

Fair enough; as long as you keep that in mind as you design/enhance the
tools....


> > Continuing...
> >
> > CompiledMethod>>getColoredSource
> >     Modified to underline sends of undefined selectors.
>
> In D6 the compiler is no longer involved in syntax colouring* - it is
> performed dynamically as you type.

Hmm..  I obviously haven't tried that yet, but I must admit I don't like the
sound of it.  Will it be possible to turn it off without loosing "static"
syntax colouring ?

BTW, have you been able to find a way to persuade Scintilla to distinguish
unary sends from other identifiers ?  I don't know about anyone else, but one
of my most common typos is to miss the : off the end of a keyword.  The
undefined-send underlining often catches that, but it'd be even better if
Dolphin could distinguish between unary sends and identifiers (I suggest "teal"
as a colour).


> In addition there is some use of
> underlining to highlight compilation errors and warnings (though this is
> not yet dynamic). One such warning is generated on a supersend of an
> message not implemented in the superclass. I'll record an enhancement
> request to have the compiler also report unimplemented selectors as
> warnings, which would then achieve that underlining through the generic
> mechanism.

Sounds good.  I depend rather heavily on the warnings/underlinings.


> *Incidentally it will be much easier to change the colours (and other
> styles) used too.

Cool.


> > Object>>inspectorClass
> >     Modified to answer my own inspector.
>
> I intend to bounce that back to development system instance
> (SmalltalkSystem) so that it can be configured through User Preferences in
> the normal way (#1399).

Wasn't that in the beta of D5 at one point ?


> > SmalltalkSystem>>createVariableAccessors:in:classVariable:
> >     Modified to generate code adhering to my own conventions.
>
> I think the best way to achieve that would be to subclass and replace
> SmalltalkSystem's singleton instance - a straightforward process with none
> of the trickyness of replacing the session manager.

Seems a rather heavyweight operation for such a simple task (SmalltalkSystem's
something of a "God class" which makes subclassing it feel almost blasphemous
;-), I think I'll stick to just modifying the method directly -- after all,
it's not going to break anything important if I screw up.


> - The quoting/bracketing I can add enhancement requests for if you feel
> they are sufficiently useful (I can see that these would be useful for,
> e.g., commenting out blocks of code, or wrapping some statements up in a
> block). - I quite like the idea of the display string shortcut, but do
> you really find you do this often enough to make it worthwhile?

Well, *I* find them useful.  I wouldn't add them to the base system just for
me, though.

I'm sorry, I should have made it clear that (with the exception of the package
timestamp stuff) I wasn't asking for you to adopt my changes, just trying to
provide a data-point for what one of your users is doing with Dolphin.

(BTW, on that subject, I'm also using various aspects of the configurability
you've built-in to substitute my own slightly modified CHB; to rearrange the
"tools folder"; to replace the default method categorisation policy; and to add
several virtual method categories.)

    -- chris


12