Skip to content
This repository was archived by the owner on Oct 16, 2020. It is now read-only.

Commit 58f0ba8

Browse files
committed
Solution: mark properties as [Browsable(false)] when they are not intended to be shown in the property grid
1 parent 2b0c751 commit 58f0ba8

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

src/Main/SharpDevelop/Project/Solution.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ public override string Name {
126126

127127
IProject startupProject;
128128

129+
[Browsable(false)]
129130
public IProject StartupProject {
130131
get {
131132
if (startupProject == null) {
@@ -231,6 +232,7 @@ internal void ReportAddedItem(ISolutionItem newItem)
231232
}
232233
#endregion
233234

235+
[Browsable(false)]
234236
public IEnumerable<ISolutionItem> AllItems {
235237
get {
236238
return this.Items.Flatten(i => i is ISolutionFolder ? ((ISolutionFolder)i).Items : null);
@@ -274,12 +276,14 @@ public ISolutionItem GetItemByGuid(Guid guid)
274276
#region Preferences
275277
Properties preferences = new Properties();
276278

279+
[Browsable(false)]
277280
public Properties Preferences {
278281
get { return preferences; }
279282
}
280283

281284
Properties globalPreferences = new Properties();
282285

286+
[Browsable(false)]
283287
public Properties GlobalPreferences {
284288
get { return globalPreferences; }
285289
}
@@ -369,6 +373,7 @@ SolutionFormatVersion ComputeSolutionVersion()
369373
#region MSBuildProjectCollection
370374
readonly Microsoft.Build.Evaluation.ProjectCollection msBuildProjectCollection = new Microsoft.Build.Evaluation.ProjectCollection();
371375

376+
[Browsable(false)]
372377
public Microsoft.Build.Evaluation.ProjectCollection MSBuildProjectCollection {
373378
get { return msBuildProjectCollection; }
374379
}
@@ -467,7 +472,9 @@ public ConfigurationAndPlatform ActiveConfiguration {
467472

468473
public event EventHandler ActiveConfigurationChanged = delegate { };
469474

475+
[Browsable(false)]
470476
public IConfigurationOrPlatformNameCollection ConfigurationNames { get; private set; }
477+
[Browsable(false)]
471478
public IConfigurationOrPlatformNameCollection PlatformNames { get; private set; }
472479

473480
void CreateDefaultConfigurationsIfMissing()
@@ -498,6 +505,7 @@ void ValidateConfiguration()
498505

499506
bool isDirty;
500507

508+
[Browsable(false)]
501509
public bool IsDirty {
502510
get { return isDirty; }
503511
set {

src/Main/SharpDevelop/Project/SolutionFolder.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,24 +114,30 @@ protected override void OnCollectionChanged(IReadOnlyCollection<ISolutionItem> r
114114

115115
readonly SolutionItemsCollection items;
116116

117+
[Browsable(false)]
117118
public IMutableModelCollection<ISolutionItem> Items {
118119
get { return items; }
119120
}
120121
#endregion
121122

123+
[ReadOnly(true)]
122124
public virtual string Name { get; set; }
123125

126+
[Browsable(false)]
124127
public ISolutionFolder ParentFolder { get; set; }
125128

129+
[Browsable(false)]
126130
public ISolution ParentSolution {
127131
get { return parentSolution; }
128132
}
129133

134+
[Browsable(false)]
130135
public Guid IdGuid {
131136
get { return idGuid; }
132137
set { idGuid = value; }
133138
}
134139

140+
[Browsable(false)]
135141
public Guid TypeGuid {
136142
get { return ProjectTypeGuids.SolutionFolder; }
137143
}

0 commit comments

Comments
 (0)