mnasyrov/wordlight

Cannot save WordLight setting

GoogleCodeExporter opened this issue · 9 comments

What steps will reproduce the problem?
1. Go to Tools->Wordlight setting.
2. Change any parameter, e.g.  Frozen search 1 colour to red. 
3. Click OK.
4. Exit VS2008.
5. Start it again and check out the current WordLight settings.


What is the expected output? 
The value I previously had set up.
What do you see instead?
I'll always find the default values, (i.e. by personal settings are gone).

What version of the product are you using? WordLight 0.3.2.109.zip
On what operating system? Win7-64 bit, Visual Studio 2008.

What do I wrong? Can you help me?

Please provide any additional information below.

Another problem: Despite I choose the "Match whole word"=TRUE option,
clicking e.g. "max" will also highlight "max" in also in words like 
"max_absolute_value", "max_tolerance" etc.

It'll be much better, if it work the same way as VS2008 editor and its "whole 
word" search option, (i.e. in this case "max_tolerance" would not be picked up).

Thanks for help. (Otherwise I like this add-in very much) !  


Original issue reported on code.google.com by Libor.Je...@gmail.com on 4 Nov 2010 at 5:16

Separated "Whole word search" problem to an issue 4.

Original comment by streambot@gmail.com on 6 Nov 2010 at 2:22

Could you please to make a few checks for Visual studio and WordLight?

1. Please look for ExtGlobals.dat file, where VS stores global values. The file 
can be found on a next path at Win7: 
C:\Users\%USERNAME%\AppData\Roaming\Microsoft\VisualStudio\9.0\ExtGlobals.dat. 
It's an internal binary file of VS. However, names of settings and its values 
can be found there as unicode strings.
Are there some WordLight's settings? Their names have "WordLight_" prefix.

2. If the first check is successful, please do a next one.
The aim is to run the add-in manually when VS has loaded, and check WordLight's 
settings in its dialog.
To disable auto-loading, go "Tools > Add-in Manager" in Visual studio and set 
off a "Startup" checkbox for WordLight. After that, restart the studio, go to 
the manager and set on a checkbox in the first column to start WordLight. Does 
it help to load stored WordLight's settings?

Original comment by streambot@gmail.com on 8 Nov 2010 at 3:41

I did as you asked for, see the attached file. In the meantime, however, I 
think I already found the problem:
A new Wordlight's settings is saved only, if you (within the studio) close any 
solution and then explicitly press Menu->File->SaveAll. Otherwise it is not.
If you do SaveAll with a solution opened, the Wordlight's settings are not 
saved.
Confirmed also in ExtGlobals.dat. 
This is a bit weird, as any settings in the Studio are either saved 
immediately, (Menu->Tools->Options/Customized)) or before you exit you are 
warned to save your data, (a solution related stuff). But I can imagine that 
what is the Studio doing smoothly is not that simple to achieve for a third 
party add-in...

A one more question: why is it necessary to reload the files in order to 
recognize a change in Wordlights' settings, (e.g. "Match whole words" on/off). 
Any chance to remove the reloading requirement? It is not very handy... 
Please take it as a suggestion further improve your very your nice SW. I had no 
idea what kind of things can be done in he Studio!

Original comment by Libor.Je...@gmail.com on 10 Nov 2010 at 7:50

Attachments:

Indeed, it's a strange behaviour for saving settings. MSDN says, global 
settings are saved to a disk when SaveAll occurs or the studio is shut down. 
Settings for a sollution are stored at any time .slf file is saved. I'll 
investigate it further.

By the way, there are an error and a warning in your ActivityLog.xml, that are 
not from WoldLight:

  <entry>
    <record>10</record>
    <time>2010/11/10 07:05:04.127</time>
    <type>Error</type>
    <source>Microsoft Visual Studio</source>
    <description>Error checking App Path</description>
    <hr>80070005 - E_ACCESSDENIED</hr>
  </entry>

and 

 <entry>
    <record>15</record>
    <time>2010/11/10 07:05:04.158</time>
    <type>Warning</type>
    <source>Microsoft Visual Studio Appid Stub</source>
    <description>CheckPackageSignature failed; invalid Package Load Key</description>
    <guid>{133240D5-FAFA-4868-8FD7-5190A259E676}</guid>
  </entry>

The warning conserns VisualSVN plugin, please try to update it to the latest 
version.

What about the error, it might be a result of some access restriction for VS's 
directories.  You can try to run the studio as Administrator to check if the 
error is gone. Also there are some discussion, that may be related to it, a one 
of them: 
http://social.msdn.microsoft.com/forums/en-US/vssetup/thread/b9ffed45-14a7-4c61-
ba61-cacabc4bf643/.

About reloading files to apply settings. I have a one refactoring in mind, that 
can help to remove this restriction.

Original comment by streambot@gmail.com on 10 Nov 2010 at 10:10

Add1:
I didn't find any Wordlight's setting in the file you mentioned. I'm enclosing 
its copy.
Add2. 
I didn't try manual loading because add.1 was not successful.

At the moment I changed Wordlight's default setting to match a setting I like. 
It's a bit dirty solution, but it works for me... Nevertheless, I'm happy to 
help to fix the problem. 

Original comment by Libor.Je...@gmail.com on 9 Nov 2010 at 7:21

Attachments:

I'm going to add error logging to the add-in, it'll allow to see what's wrong.

Original comment by streambot@gmail.com on 10 Nov 2010 at 4:15

Ok, here is a test build with logging for settings saving.
Please copy the attached files to your directory for Visual Studio add-ins, and 
start the studio by "devenv /log" commang. It enables activity logging for the 
studio and WordLight. After that, try to save WordLight's settings and close 
the studio. A result log file can be found by a next path: 
C:\Users\%USERNAME%\AppData\Roaming\Microsoft\VisualStudio\9.0\ActivityLog.xml. 
Please attach it to the issue.

Original comment by streambot@gmail.com on 10 Nov 2010 at 5:49

Attachments:

Thanks for info. The warnings in VisualSVN are probably because my solution 
root directery points to a directory without the sln file. This is done 
intentionally, because, in fact, I'm combining two solutions. What I'd need is 
that VisualStudio can have two root directories or I can create a virtual 
directory with two descending directories in it. However, something like that 
is possible in Unix FS and Win7 does not support it.
Anyway, thanks for warning.

Original comment by Libor.Je...@gmail.com on 15 Nov 2010 at 8:45

Storing of settings to Windows registry will be in a next release. It's 
available in the trunk at the moment.

Original comment by streambot@gmail.com on 23 Nov 2010 at 4:02

  • Changed state: Fixed