Author Topic: is there a way of associating a workspace to a given project?  (Read 5003 times)

Offline zlieb

  • Single posting newcomer
  • *
  • Posts: 3
is there a way of associating a workspace to a given project?
« on: December 25, 2009, 09:41:27 pm »

for example, if you open a given project file that it opens the similarly named workspace?  This is (I think) the default behaviour in VS2008 -- when I have a project and a solution in the same directory that references it, and I double click the project, it opens the appopriate solution (VS's version of a workspace).   At the moment, my when I double click the codeblocks project, it doesn't load any workspace (but creates a new, empty workspace).   my main problem is, it's very easy to trip up workspaces, to open multiple projects into a workspace, etc, and it seems a bit problematic for our end users --   if there was a way of somehow automating the relationship of a project to it's workspace, that would be great.

I know projects can belong to multiple workspaces, so this is not a totally cut and dry thing --  but I think the VS solution, which searches the same directory for a solution that references the project, seems pretty reasonable as it leads to alot less confusion.

thanks!
zach

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: is there a way of associating a workspace to a given project?
« Reply #1 on: December 25, 2009, 10:15:37 pm »
Where is the problem with double-clicking the workspace-file ?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: is there a way of associating a workspace to a given project?
« Reply #2 on: December 26, 2009, 01:14:50 am »
Where is the problem with double-clicking the workspace-file ?

By default windows does not show the file extension.
I call this the stupid windows give me a virus mode.

Edit: To disable the above

In a Computer window
Tools -> Folder Options
Tab View
Uncheck Option: Hide Extensions for Known File Types.

Tim S.
« Last Edit: December 26, 2009, 01:17:19 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: is there a way of associating a workspace to a given project?
« Reply #3 on: December 27, 2009, 11:53:19 am »
Where is the problem with double-clicking the workspace-file ?

By default windows does not show the file extension.
But the shown icon is (should be) different.

I call this the stupid windows give me a virus mode.

Edit: To disable the above

In a Computer window
Tools -> Folder Options
Tab View
Uncheck Option: Hide Extensions for Known File Types.

Tim S.

That's one of the first things I do on all my new windows installs.

Offline zlieb

  • Single posting newcomer
  • *
  • Posts: 3
Re: is there a way of associating a workspace to a given project?
« Reply #4 on: December 27, 2009, 02:39:58 pm »

Where is the problem with double-clicking the workspace-file ?

the problem is not with double clicking the workspace file (which I don't have a problem with), the problem is that there is no association (or implied association) from a project to a given workspace, which can lead to novices  making mistakes with a library of code that I make (openframeworks.cc).   Also, since the "adding a project" to a workspace is as simple as opening the project, it's *very* easy in CB to mistakenly add a project to a workspace it shouldn't be in.   

Having used xcode's project dependencies and VS solutions, I find CB's workspaces to be the most problematic for beginners.

I noticed that VS has a very nice behavior, which is to scan the folder of the given selected project for solutions (ie, workspaces) that reference that project and open them, and I wondered if CB had that behavior, or if it was one you could consider adding.

give it a try -- I think it greatly improves the overall usage of these kinds of files.

thanks
zach


Offline Seronis

  • Almost regular
  • **
  • Posts: 197
Re: is there a way of associating a workspace to a given project?
« Reply #5 on: January 08, 2010, 04:20:28 am »
Where is the problem with double-clicking the workspace-file ?
the problem is not with double clicking the workspace file (which I don't have a problem with), the problem is that there is no association (or implied association) from a project to a given workspace...

I would really get annoyed at your suggested behaviour personally as I have a lot of projects that are included in many workspaces.  A workspace is a collection of projects.  Those projects are NOT required to be unique to that workspace so having a project know (or care) about what workspace it has been used in seems like a bad idea.  Let the new people click the appropriate file or in the case of a complex project they should RTFM anyways and find out what they are supposed to open.

edit:  ok on 2nd thought opening a workspace in the exact same location with the exact same name would be somewhat reasonable but id personally still want to be able to disable that option completely if i choose (which i would).
« Last Edit: January 08, 2010, 04:26:51 am by Seronis »