Open konsole tool with the single project's root directory
ClosedPublic

Authored by amhndu on Jun 21 2018, 12:45 PM.

Details

Summary

The default behavior is retained if there are more than one projects.
It is generally more useful to have the konsole opened with the project root,
instead of the default which is kdevelop's working directory.

Diff Detail

Repository
R32 KDevelop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
amhndu created this revision.Jun 21 2018, 12:45 PM
Restricted Application added a project: KDevelop. · View Herald TranscriptJun 21 2018, 12:45 PM
Restricted Application added a subscriber: kdevelop-devel. · View Herald Transcript
amhndu requested review of this revision.Jun 21 2018, 12:45 PM
croick added a subscriber: croick.Jun 23 2018, 11:26 AM

I thinks that's a good idea, although it is only a matter of typing s! to access the current file's working directory.

Could you think of a way to start in the project directory of the currently viewed file (if it's local)? The feature would then be useful with multiple opened projects.

brauch added inline comments.Jun 23 2018, 11:29 AM
plugins/konsole/kdevkonsoleview.cpp
75

Hm, does this make sense? I very rarely have sessions with just one project open. Maybe instead use the current document's path or, if you think that is better, the root path of the project in which the current document is?

amhndu updated this revision to Diff 36565.Jun 23 2018, 2:20 PM

Open konsole with the active document's project root or it's directory

If the active document is associated with any opened projects,
that project's root directory is used, otherwise the document's directory is
used.
If there is no active directory, default behavior is retained.

I missed checking if it's local. Any other suggestions before I add that ?

brauch accepted this revision.Jun 23 2018, 2:27 PM

No, this looks good to me. Thanks!

This revision is now accepted and ready to land.Jun 23 2018, 2:27 PM
amhndu updated this revision to Diff 36566.Jun 23 2018, 2:39 PM

Check if the project/document url is local

amhndu updated this revision to Diff 36567.Jun 23 2018, 2:43 PM

Still missed checking if the document is local at one place, sorry about that.

This should be the final change.

Looks reasonable to me. Can you submit the patch yourself or should I do it?

I can't submit it myself.
You can use this comment as the commit message: https://phabricator.kde.org/D13654#282183
Thanks

This revision was automatically updated to reflect the committed changes.