Property Manager Updated - New Version 1.0.0.3
posted on Thursday, May 25, 2006 by bobby @ 4:13 pm
This new version addresses the issue when attempting to create a property from a field that uses generics w/ more than 1 type.

Example:
private Dictionary<Guid, string> myDictionary

This also fixes the bug which affected local fields starting w/ an underscore.

Click here to download Property Manager 1.0.0.3

CommentsComments
posted on Tuesday, May 30, 2006  by Travis @ 2:04 AM

This looks like a cool addin...but the download link doesnt work...is it still available?
posted on Tuesday, May 30, 2006  by bobby @ 2:39 AM

Oops, my bad. Link fixed.
posted on Tuesday, May 30, 2006  by Skware @ 4:54 PM

Thanks for this, certainly makes implementing business objects a little more sane.
A couple of things though:
When the field starts with an uppercase letter it produces bad code
Could you consider making the properties look like

Copy code to clipboard in IE or select code for Firefox
public int Foo {
{
  get { return foo; }
  set { foo = value; }
}


rather than
Copy code to clipboard in IE or select code for Firefox
...
get
{
  return foo;
}
...


for a neat saving of 4 lines of code per prop and generally easier to read source code.
posted on Wednesday, May 31, 2006  by Anonymous @ 1:16 AM

ahh, a simple replace regex cures this ill.
find:
Copy code to clipboard in IE or select code for Firefox
{[gs]et}\n:b*{.*;}\n:b*\}
replace with:
\1 { \2; }

posted on Wednesday, May 31, 2006  by bobby @ 2:20 AM

Yeah, I will play around w/ some different options for formatting. I'd like to give the user the ability to specify formatting options, but I don't want to go as far as adding a Tool Options form (since Property Manager is so simple). It'd be nice if it formatted the property based on your IDE settings.

I'll spend some time messing w/ some options. Check back in a week or so; hopefully will have a new version by then.

Cheers.
posted on Wednesday, May 31, 2006  by Skware @ 9:51 AM

Cheers,
btw, the regex was posted by me
posted on Thursday, June 01, 2006  by bobby @ 3:08 AM

I was playing around w/ the formatting features of Visual Studio. I think I can leave the new property data all on one line, then let Visual Studio sort out how to format it based on your settings in the "Text Editor" section of the options.

I'll update the add-in a day or so.

Cheers
posted on Sunday, June 04, 2006  by bobby @ 6:33 AM

OK, I've updated the add-in to allow for internal formatting based on your IDE settings. This also fixes an issue w/ local static fields.

The download link is still 1.0.0.3, but the actual version of the dll will be .31
posted on Wednesday, June 21, 2006  by Stan @ 1:13 PM

Hi,
I recently stumbled across your excellent Add-In for VS2005. However, I have a little suggestion for an improvement.

The thing is, that I personally like my variables aligned, i.e. their names beginning at the same column. For this I use Tabs. So, it would be nice, if your Add-In was capable of parsing field definitions correctly despite that Tabs, and not Spaces, is used as white-characters.

Thanks
posted on Wednesday, June 21, 2006  by bobby @ 1:17 PM

Gotcha. Will add this to the list of features for the next release.

Cheers,
Bobby
posted on Thursday, July 13, 2006  by Truth @ 7:27 PM

Is it just me that can't get this working? I've installed it, if I right click in my class on a private string, I see the Create Property menu item, but clicking it does nothing at all.

I've restarted, etc... no luck.
posted on Thursday, July 13, 2006  by bobby @ 7:40 PM

The property code that is generated is copied to the cliboard. The status bar in Visual Studio should display a message confirming this. Have you tried using ctrl+alt+p to generate the property? That should have the same effect as clicking the menu item in the code context menu.
posted on Thursday, July 13, 2006  by truth @ 7:46 PM

All that I get is "No local fields found" and nothing in the clipboard.

Here are a couple local variables from my class...

private string _orderKey;
private string _customer;
posted on Thursday, July 13, 2006  by bobby @ 7:51 PM

I'm beginning to think it might just be you, heh. I copied your fields and generated properties w/ no problems.
posted on Thursday, July 13, 2006  by truth @ 7:55 PM

For reference, I have Microsoft Visual Studio 2005 Team Suite running on Win2003 Server.
posted on Thursday, July 13, 2006  by truth @ 8:08 PM

I created a brand new class and was able to get it working. However my existing classes still fail.

Here is the top of my existing class for you to test:

using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SqlClient;
using Csla;
using Csla.Data;

namespace XYZ.Library
{
[Serializable()]
public class OrderInfo : ReadOnlyBase<OrderInfo>
{

#region Business Methods

private string _orderKey;
private string _customer;
posted on Tuesday, August 29, 2006  by Edwin @ 3:06 AM

I always use comments for my fields:

/// <summary>
/// My Value
/// </summary>
private int _value;


1. Property Manager does now work when I select the comments.
2. Additionally I want the comments to be 'copied' to the properties:
Property comment = "Gets or sets " + FirstCharachterToLowerCase(field comment)
posted on Tuesday, August 29, 2006  by bobby @ 9:28 AM

Valid and useful feature requests. Not sure when the next release will be, but those will be on the list of enhancements.
posted on Wednesday, October 18, 2006  by Anonymous @ 2:30 AM

Hi !

If someone is interested, I made the same Add-In for Vb.Net code.

Buy
posted on Wednesday, October 18, 2006  by Anonymous @ 5:51 AM

Oups....I wouldn't say buy....but bye ;)
Sorry
posted on Wednesday, November 29, 2006  by BryanHood @ 2:46 PM

I love the Encapsulation App.

However (doesn't everyone have one of these howevers?) I like to name my private variables m_VariableName.

Would there be a way to have your add-in remove the m_ part of the name to create the public variables?

(I guess the source code would be what I need.)

Thanks for this WAY cool Add-In.

Bryan
posted on Saturday, April 28, 2007  by Igor @ 7:01 AM

I couldn't find the regex string to modify.
And I found with ildasm that the string is hard-coded to the dll. This is no good


New Post Notification

Search Posts

Recent Posts


About Meeself
People call me Bobby DeRosa
I live somewhere in San Diego, CA
MCSD, MCAD, MCP

This theme was adapted from fUnique by fahlstad        Icons by FamFamFam        XHTML 1.0 Strict; tuned for Mozilla-powered browsers

Admin Login Administrator Login
Invalid login attempts are logged.
  Username:
  Password: