blob: ef96d97d0ffeb54bda1f5e71558a6183f6df1d64 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
using System;
using MonoDevelop.Core;
using MonoDevelop.Projects;
using MonoDevelop.DesignerSupport;
namespace MonoDevelop.Autotools
{
public class PropertyProvider: IPropertyProvider
{
public bool SupportsObject (object obj)
{
ProjectFile file = obj as ProjectFile;
if (file != null && file.Project != null) {
MakefileData data = file.Project.ExtendedProperties ["MonoDevelop.Autotools.MakefileInfo"] as MakefileData;
if (data != null && data.IsFileIntegrationEnabled (file.BuildAction))
return true;
}
return false;
}
public object CreateProvider (object obj)
{
return new ProjectFileWrapper ((ProjectFile) obj);
}
}
class ProjectFileWrapper
{
ProjectFile file;
MakefileData data;
public ProjectFileWrapper (ProjectFile file)
{
this.file = file;
data = file.Project.ExtendedProperties ["MonoDevelop.Autotools.MakefileInfo"] as MakefileData;
}
[LocalizedCategory ("Makefile Integration")]
[LocalizedDisplayName ("Include in Makefile")]
[LocalizedDescription ("Include this file in the file list of the synchronized Makefile")]
public bool IncludeInMakefile {
get {
return !data.IsFileExcluded (file.FilePath);
}
set {
data.SetFileExcluded (file.FilePath, !value);
}
}
}
}
|