Author Topic: active project in workspace is not remembered  (Read 3356 times)

rowbearto

  • Senior Community Member
  • Posts: 1583
  • Hero Points: 115
active project in workspace is not remembered
« on: September 24, 2014, 08:05:40 pm »
Hi:

After closing a workspace and then reopening it, the active project does not seem to be preserved in beta 5.

I have a workspace with 6 projects.

If I make the 3rd project the active project, then close the workspace and reopen it, the 3rd project is no longer the active project - instead it is the 1st project that becomes the active one.

I think the proper behavior is to preserve the active project, as previous version of SE did.


Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 5010
  • Hero Points: 417
Re: active project in workspace is not remembered
« Reply #1 on: September 24, 2014, 11:03:41 pm »
I can't reproduce this (and I do this ALL the time). Double check that your <workspace>.vpwhist file has a section like the following which is getting updated on close:

[Global]
CurrentProject=reldir\myproject.vpj

I wonder if there is a permissions problem and SlickEdit can no longer write to the file?


rowbearto

  • Senior Community Member
  • Posts: 1583
  • Hero Points: 115
Re: active project in workspace is not remembered
« Reply #2 on: September 25, 2014, 01:05:08 am »
I looked at the .vpwhist file and things are very strange.

While I have the workspace open with the 3rd project as active, I see the "CurrentProject" set properly.

When I close the workspace, "CurrentProject" is still set properly to the 3rd project.

As soon as I reopen the worksapce, the "CurrentProject" changes to the first project in the list!

It is very strange behavior.

rowbearto

  • Senior Community Member
  • Posts: 1583
  • Hero Points: 115
Re: active project in workspace is not remembered
« Reply #3 on: September 25, 2014, 01:48:15 am »
Maybe we are opening the workspace a different way?

I use GUI, you use keyboard?

For GUI, I use the Project menu and find my workspace in the list of recent workspaces at the bottom of the menu.

Do you open the workspace differently?

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 5010
  • Hero Points: 417
Re: active project in workspace is not remembered
« Reply #4 on: September 25, 2014, 02:47:51 pm »
I typically use the Project menu history. For a project not in the list I typically use the GUI open dialog except on Mac. The Mac open dialog annoys me because I like to type in the file name instead of clicking with the mouse and it's still pretty bad at that. As some point, I would like to fix this but I think it will be hard to fix.

rowbearto

  • Senior Community Member
  • Posts: 1583
  • Hero Points: 115
Re: active project in workspace is not remembered
« Reply #5 on: September 28, 2014, 04:39:51 pm »
I found a way to reproduce this issue with default SlickEdit configuration.

I think I see this issue because my workspace and projects are in different directories.

I've attached to this message a .zip file with the .vpw and .vpj files in a directory structure that mirrors my directory structure.

Here are the instructions to reproduce the issue:

1) Unzip the attachment to the root of your c:\ drive to minic the directory structure. After unzipping, you should have directories c:\sync and c:\User
2) Next, open the workspace in c:\User\rbresali\slickproj\rbresali_l1misc_dev2.vpj
3) Now change the active project to a different one
4) Close the workspace
5) Reopen the workspace and observe the active project is not preserved

When I have the .vpw and all the .vpj in the same directory, I don't see the issue. But when I have them in different directories mirroring my directory structure, the issue occures.

Thanks,
Rob

Lee

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1299
  • Hero Points: 130
Re: active project in workspace is not remembered
« Reply #6 on: September 29, 2014, 02:02:52 pm »
How was this workspace created?  Was it edited by hand?  I am able to recreate the issue, the problem is that SlickEdit shouldn't have written the workspace file with absolute paths (drive letter included) to the project files , at least using the builtin methods.

rowbearto

  • Senior Community Member
  • Posts: 1583
  • Hero Points: 115
Re: active project in workspace is not remembered
« Reply #7 on: September 29, 2014, 02:20:13 pm »
This workspace file is created via script by modifying a template workspace. You can see my motivation for doing so in this thread:

http://community.slickedit.com/index.php/topic,4972.msg41600.html#msg41600

My script starts with a template of the workspace (workspace.vpwtemplate), and then modifies it to have the absolute paths which can be different depending on whether I work in Linux or Windows.

The template is taken from SE18 generated workspace file which has absolute paths in Linux.

The script also allows to create a workspace in both Windows and Linux from the template.

This worked perfectly fine in SE 18 and active project was always remembered.

I've attached my template and perl script to modify the template to this post.

The script creates a real workspace by performing the following search replaces:

1) In Windows, replaces "/enodeb_modem/..." with "c:/sync/$VIEW_NAME/enodeb_modem/..."
2) In Linux, replaces "/enodeb_modem/..." with "/view/$VIEW_NAME/enodeb_modem/..."

Why shouldn't the drive letter be included in the project file path in the workspace?

What if my workspace and project files are on different drive letters? How can you not have the drive letter in the workspace file if .vpw and .vpj are on different drive letters?

Seems like the problem of remembering the active project is only an issue in Windows. In my Linux generated workspace file, the active project is remembered.

I'd still like to use this script even if I can specify the location of the .vtg file, as other people in my group still use SE18 and it will take some time for them to migrate to SE19, and also take some time for me to figure out how to setup the workspace/projects by specifying the location of the vtg files.

rowbearto

  • Senior Community Member
  • Posts: 1583
  • Hero Points: 115
Re: active project in workspace is not remembered
« Reply #8 on: September 29, 2014, 02:25:06 pm »
Actually, a better link to my motivation for this script is here:

http://community.slickedit.com/index.php/topic,8007.msg41598.html#msg41598

Lee

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1299
  • Hero Points: 130
Re: active project in workspace is not remembered
« Reply #9 on: September 29, 2014, 07:40:23 pm »
I've added an extra check to take into account for restoring active project with absolute path in the workspace file.  This will be fixed in an upcoming drop, but will probably miss Beta 6 at this point.

rowbearto

  • Senior Community Member
  • Posts: 1583
  • Hero Points: 115
Re: active project in workspace is not remembered
« Reply #10 on: September 29, 2014, 07:41:43 pm »
Thanks Lee!