Author Topic: Option export writes to project  (Read 7080 times)

dunkers

  • Senior Community Member
  • Posts: 774
  • Hero Points: 36
Option export writes to project
« on: August 24, 2009, 02:35:23 AM »
I have a project open, which happens to have multiple sub-directories (but I don't think this is important). If I do a File|New the active directory is 'config', which is a sub-directory of my project.

I now do an export of all config items. There is a bug here where after browsing for the destination filename, the export dialog shows a very truncated version of same, but the right file gets written all the same.

Now, I check my 'config' directory and SE has written vusrmacs.e in there!

This is very worrying and is strikingly similar to: http://community.slickedit.com/index.php?topic=4754

chrisant

  • Senior Community Member
  • Posts: 1410
  • Hero Points: 131
Re: Option export writes to project
« Reply #1 on: August 24, 2009, 03:21:26 AM »
Can you share more detailed repro steps?

dunkers

  • Senior Community Member
  • Posts: 774
  • Hero Points: 36
Re: Option export writes to project
« Reply #2 on: August 24, 2009, 10:36:29 AM »
Ummm... seems simple enough to me: with an open project export all your options, then find the file dropped in the currently active directory for the project. I can do a video if you like :)

Graeme

  • Senior Community Member
  • Posts: 2793
  • Hero Points: 347
Re: Option export writes to project
« Reply #3 on: August 24, 2009, 01:10:25 PM »
Ummm... seems simple enough to me: with an open project export all your options, then find the file dropped in the currently active directory for the project. I can do a video if you like :)


Can you reproduce the problem yourself?  I tried and couldn't, but I didn't do the File -> new thing and didn't browse for the destination folder.  If you can reproduce it, can you repro the problem when the active folder is something other than "config".

I also couldn't repro the "truncated destination folder path" problem you mention.  (using slick 14.0.2.2)

chrisant

  • Senior Community Member
  • Posts: 1410
  • Hero Points: 131
Re: Option export writes to project
« Reply #4 on: August 24, 2009, 01:34:56 PM »
Config settings may be relevant as well; for example def_switchbuf_cd or similar settings may play a role in the repro steps.

dunkers

  • Senior Community Member
  • Posts: 774
  • Hero Points: 36
Re: Option export writes to project
« Reply #5 on: August 24, 2009, 01:52:15 PM »
OK. Try this:

1/ In SE do Project|Open workspace... and browse to the SE installation directory, SampleProjects/ucpp then pick cpp.vpw.

2/ Use explorer or whatever to browse to that directory and verify that the only files are cpp.*.

3/ Open the options dialog (Tools|Options...) then select Eport/Import Options from the left tree and click the Export All Options... button.

4/ Browse to some safe directory. My mistake here: the result isn't truncated but the view is. That is, when the new filename/path is shorter than the pre-filled document and setting path (surely nearly always!) only the last few characters of the filename are visible. You can manually click the edit field and cursor left to show the rest. I think this is still a bug though.

4a/ Having browsed to wherever, or left alone if you want to mess with your config directory!, hit OK and the options zip will be created.

5/ Check the SampleProjects/ucpp directory - on mine there is now a vusrmacs.e file which contains:
Code: [Select]
#include "slick.sh"

Sandra

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 754
  • Hero Points: 36
Re: Option export writes to project
« Reply #6 on: August 24, 2009, 02:03:46 PM »
I see what you mean by the truncated path and filename.  That is annoying and will be fixed.

However, I can't reproduce the other issue - the vusrmacs file appearing in the project dir.  I tried first with a clean config and then again after having recorded a macro (to make sure that I had a vusrmacs file in my config).  Are you able to reproduce it with a clean config or "nearly" clean (recorded macro only) config?

dunkers

  • Senior Community Member
  • Posts: 774
  • Hero Points: 36
Re: Option export writes to project
« Reply #7 on: August 24, 2009, 07:23:15 PM »
It doesn't happen with a clean config. Nor if I import my config (which doesn't bring SE up to the same config, actually - my preview window isn't the right colour, for instance). However, this is how you can make it happen:

1/ Start with a clean SE config. Close SE.

2/ Copy to attached vusrmacs.e to the SE config directory.

3/ Now start SE, open the project, export all options. The vusrmacs.e file is now written to the project directory.

If the exported options file is importet into SE, SE generates an error saying there's a problem with the vusrmacs.e file.

Sandra

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 754
  • Hero Points: 36
Re: Option export writes to project
« Reply #8 on: August 24, 2009, 08:45:26 PM »
Okay, I reproduced it now.  I'll see about fixing it.  Since there doesn't seem to be anything actually in that file, you could probably get away with just deleting it as a temporary workaround.

Do you notice anything else besides your preview window color that doesn't get imported properly?  I wasn't able to reproduce that at first try.  You're talking about the bottom part that looks like an editor window, correct?

dunkers

  • Senior Community Member
  • Posts: 774
  • Hero Points: 36
Re: Option export writes to project
« Reply #9 on: August 24, 2009, 10:02:24 PM »
I was mistaken - the colours are OK, but the preview window is arranged such that the colour isn't really visible. I've taken a screenshot of my normal SE (original.jpg) and SE with a new config then the exported options imported. I ran a new export after removing vusrmacs.e as you suggested, in case it was screwing things up.

You can see that the preview window doesn't have the divider set correctly, and that the left toolbar thingy (can't remember the name!) has a bunch of toolbars that shouldn't be there. The main toolbar across the file tabs is incorrect (as in wrong toolbar - mine is a custom one), and the icons are the wrong size.

A quick check indicates that the debugger is set to the SE default, whereas my normal one has a gdb built for remote debug of a PPC system. Some debugging options are different ("Allow editing of source files during debugging").

F1 help index file didn't make it across. Not sure about this one: on the one hand an import on a different system may have different compilers and stuff, but on the other the user may use this import/export as a backup. Also, on my completely new system I kept everything where they are on the old system so this kind of thing wouldn't break. (And, actually, I chose to use the method Scott suggested and just copied my config directory across - worked very well.)

One more thing: I've just been stepping through the options on each to compare them, but haven't changed anything. On both, when closing the options dialog with cancel I was prompted to save or discard my changes. It looks like the cause of this prompt is the symbol colouring - when I dropped into that option it was showing "(None)" and I changed that to show my custom setup so I could see how it was set. I think you should be able to do this (check settings of the various schemes) without changing which one gets to be used.

Sandra

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 754
  • Hero Points: 36
Re: Option export writes to project
« Reply #10 on: August 25, 2009, 05:31:33 PM »
Thanks for all the fantastic feedback.

We already know that all the toolbar and tool window stuff hasn't been exporting/importing properly.  I'll add your findings to the defect and look at them all together.

Debugging options are not included in the export, even when you export all options.  I think this was done because some of these options aren't even visible when you don't have a particular kind of project open.  However, I think we can safely add export/import of these options.

F1 Index File is not included in an export, for the exact reason you listed.  That may change in the future.

Thanks for letting us know about the symbol coloring issue.  I'll see if we can get that fixed.

dunkers

  • Senior Community Member
  • Posts: 774
  • Hero Points: 36
Re: Option export writes to project
« Reply #11 on: August 25, 2009, 06:08:43 PM »
Glad to be of help :)