Browse Source

Solution: mark properties as [Browsable(false)] when they are not intended to be shown in the property grid

pull/478/head
Daniel Grunwald 12 years ago
parent
commit
58f0ba864e
  1. 8
      src/Main/SharpDevelop/Project/Solution.cs
  2. 6
      src/Main/SharpDevelop/Project/SolutionFolder.cs

8
src/Main/SharpDevelop/Project/Solution.cs

@ -126,6 +126,7 @@ namespace ICSharpCode.SharpDevelop.Project
IProject startupProject; IProject startupProject;
[Browsable(false)]
public IProject StartupProject { public IProject StartupProject {
get { get {
if (startupProject == null) { if (startupProject == null) {
@ -231,6 +232,7 @@ namespace ICSharpCode.SharpDevelop.Project
} }
#endregion #endregion
[Browsable(false)]
public IEnumerable<ISolutionItem> AllItems { public IEnumerable<ISolutionItem> AllItems {
get { get {
return this.Items.Flatten(i => i is ISolutionFolder ? ((ISolutionFolder)i).Items : null); return this.Items.Flatten(i => i is ISolutionFolder ? ((ISolutionFolder)i).Items : null);
@ -274,12 +276,14 @@ namespace ICSharpCode.SharpDevelop.Project
#region Preferences #region Preferences
Properties preferences = new Properties(); Properties preferences = new Properties();
[Browsable(false)]
public Properties Preferences { public Properties Preferences {
get { return preferences; } get { return preferences; }
} }
Properties globalPreferences = new Properties(); Properties globalPreferences = new Properties();
[Browsable(false)]
public Properties GlobalPreferences { public Properties GlobalPreferences {
get { return globalPreferences; } get { return globalPreferences; }
} }
@ -369,6 +373,7 @@ namespace ICSharpCode.SharpDevelop.Project
#region MSBuildProjectCollection #region MSBuildProjectCollection
readonly Microsoft.Build.Evaluation.ProjectCollection msBuildProjectCollection = new Microsoft.Build.Evaluation.ProjectCollection(); readonly Microsoft.Build.Evaluation.ProjectCollection msBuildProjectCollection = new Microsoft.Build.Evaluation.ProjectCollection();
[Browsable(false)]
public Microsoft.Build.Evaluation.ProjectCollection MSBuildProjectCollection { public Microsoft.Build.Evaluation.ProjectCollection MSBuildProjectCollection {
get { return msBuildProjectCollection; } get { return msBuildProjectCollection; }
} }
@ -467,7 +472,9 @@ namespace ICSharpCode.SharpDevelop.Project
public event EventHandler ActiveConfigurationChanged = delegate { }; public event EventHandler ActiveConfigurationChanged = delegate { };
[Browsable(false)]
public IConfigurationOrPlatformNameCollection ConfigurationNames { get; private set; } public IConfigurationOrPlatformNameCollection ConfigurationNames { get; private set; }
[Browsable(false)]
public IConfigurationOrPlatformNameCollection PlatformNames { get; private set; } public IConfigurationOrPlatformNameCollection PlatformNames { get; private set; }
void CreateDefaultConfigurationsIfMissing() void CreateDefaultConfigurationsIfMissing()
@ -498,6 +505,7 @@ namespace ICSharpCode.SharpDevelop.Project
bool isDirty; bool isDirty;
[Browsable(false)]
public bool IsDirty { public bool IsDirty {
get { return isDirty; } get { return isDirty; }
set { set {

6
src/Main/SharpDevelop/Project/SolutionFolder.cs

@ -114,24 +114,30 @@ namespace ICSharpCode.SharpDevelop.Project
readonly SolutionItemsCollection items; readonly SolutionItemsCollection items;
[Browsable(false)]
public IMutableModelCollection<ISolutionItem> Items { public IMutableModelCollection<ISolutionItem> Items {
get { return items; } get { return items; }
} }
#endregion #endregion
[ReadOnly(true)]
public virtual string Name { get; set; } public virtual string Name { get; set; }
[Browsable(false)]
public ISolutionFolder ParentFolder { get; set; } public ISolutionFolder ParentFolder { get; set; }
[Browsable(false)]
public ISolution ParentSolution { public ISolution ParentSolution {
get { return parentSolution; } get { return parentSolution; }
} }
[Browsable(false)]
public Guid IdGuid { public Guid IdGuid {
get { return idGuid; } get { return idGuid; }
set { idGuid = value; } set { idGuid = value; }
} }
[Browsable(false)]
public Guid TypeGuid { public Guid TypeGuid {
get { return ProjectTypeGuids.SolutionFolder; } get { return ProjectTypeGuids.SolutionFolder; }
} }

Loading…
Cancel
Save