A "workspace" tip for C7
Here's a tip Russ Eggen posted in the beta newsgroup on setting up workspaces in C7 (reproduced here with Russ's permission):
My editor of choice (until recently <g>) is Textpad. It has one very nice feature I found I can't live without - workspaces. What this is you have a bunch of source files open (even if in different folders). You save the workspace like a regular file. When you open a workspace, all files opened are opened again. A marvelous shortcut to opening one file at a time. I use this for template coding, web sources (site code and shopping cart code), etc.
You could open each file in C7 on the start page, its opening one file at a time and you still have to contend with tab switching since the start page is no longer the current tab. Its slower than opening one file to open many files.
So this is how you can create a "workspace" in C7:
- Choose File/New/solution, project or application (or press Ctrl-Shift-N).
- Select SharpDevelop as the solution, for the type, select "empty solution".
- Fill in the name of the "workspace", in the folder you wish.
- You have only one item in the solution explorer. Expand this to show "solution items" - it is empty.
- Right-click and choose Add/Add item...
- Navigate to the folder you want, select one or multiple files and press open. The files are added there.
- Repeat #6 until you have loaded all the sources you want.
The "solution" is now on the Start page. When you restart or select the start page again, just open the "solution" and you can then open any file in it as you wish. You don't have to worry about build state since there is nothing to build, so nothing to change there.
There are limitations:
- It won't remember where in the file you were editing.
- The files won't open as the default, you have to open them.
If you are using code folding, it does remember that setting.
A few additional points came up in the ensuing discussion. You can run multiple instances of the IDE, so you can keep a workspace handy while you work on another app. The only issue I've noticed with multiple instances of the IDE is that the last one closed writes the recent projects list. So let's say you do the following:
- Run an instance of the IDE (instance A)
- Run another instance (instance B)
- Create a new solution with B
- Exit B
- Exit A
Instance B will add the just-created solution to the recent projects list. In fact, before you exit instance A you can restart the IDE and see that project in the list. Now close B, then close A. Open the IDE again. The solution added by B will not be in the projects list, because instance A overwrite the list with what it had in memory.
Finally, you can always add files to your solution without necessarily compiling them. Just select the source file in the solution explorer, go to the Properties pad, and set the Build Action to None. Recent versions of C7 let you add "solution folders" to projects, and when you add files to these folders you are creating links to those files. I've used this feature to set up a Templates folder with links to template files I regularly edit. And since you can have multiple projects in a solution, it's easy to set up a project just for, say, frequently-edited templates which can then be attached to any solution where they are needed.
Posted: March 30 2009
Talk To Us!
Search ClarionMag
From the archives
Aussie DevCon Day 1 Notes
10/12/2009 12:00:00 AM
The first training day of the Aussie DevCon is in the books, with Bob Foreman providing training Bruce Johnson showing a preview of NetTalk 5, and ClarionLive! providing a video link.
