~ubuntu-branches/ubuntu/vivid/monodevelop/vivid-proposed

« back to all changes in this revision

Viewing changes to src/core/MonoDevelop.Core/MonoDevelop.Projects/Project.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2014-10-09 14:09:23 UTC
  • mfrom: (10.3.5)
  • Revision ID: package-import@ubuntu.com-20141009140923-s0d22u5f9kg8jvds
Tags: 5.5.0.227-1
* [b2c8331] Imported Upstream version 5.5.0.227 (Closes: #754316)
* [d210995] Delete obsolete patches
* [1b59ae1] Clear patch fizz, via quilt refresh
* [3dd147d] Fix error in configure.in which applies for tarball builds but 
  not git builds when running autoreconf
* [21c2a57] Remove Metacity references for good
* [3331661] Ensure NUnit 2.6.3 is installed
* [fd85c88] Build-depend on NuGet
* [a1ae116] Add WebKit to build dependencies, for Xwt moduleref resolution
* [9b4cf12] Since the GDB addin is integrated now, declare it in 
  debian/control
* [6231562] Correct NUnit links
* [3d2b693] Fix NuGet addin, by copying libs locally
* [74bf9a8] Don't symlink unused Mocks NUnit assembly
* [ade52b2] Ensure IKVM.Reflection is built with default (4.5) profile

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
 
42
42
namespace MonoDevelop.Projects
43
43
{
44
 
        public enum NewFileSearch
45
 
        {
46
 
                None,
47
 
                OnLoad,
48
 
                OnLoadAutoInsert
49
 
        }
50
 
        
51
44
        /// <summary>
52
45
        /// A project
53
46
        /// </summary>
61
54
        {
62
55
                string[] buildActions;
63
56
 
64
 
                public Project ()
 
57
                protected Project ()
65
58
                {
66
59
                        FileService.FileChanged += OnFileChanged;
67
60
                        files = new ProjectFileCollection ();
103
96
                        get { return files; }
104
97
                }
105
98
                private ProjectFileCollection files;
106
 
                
107
 
                
108
 
                [ItemProperty("newfilesearch", DefaultValue = NewFileSearch.None)]
109
 
                protected NewFileSearch newFileSearch = NewFileSearch.None;
110
 
                public NewFileSearch NewFileSearch {
111
 
                        get { return newFileSearch; }
112
 
 
113
 
                        set {
114
 
                                newFileSearch = value;
115
 
                                NotifyModified ("NewFileSearch");
116
 
                        }
117
 
                }
118
99
 
119
100
                [ProjectPathItemProperty ("BaseIntermediateOutputPath")]
120
101
                FilePath baseIntermediateOutputPath;
140
121
                /// <value>
141
122
                /// The type of the project.
142
123
                /// </value>
143
 
                public abstract string ProjectType {
144
 
                        get;
 
124
                [Obsolete ("Use GetProjectTypes")]
 
125
                public virtual string ProjectType {
 
126
                        get { return GetProjectTypes ().First (); }
145
127
                }
146
128
 
147
129
                /// <summary>
 
130
                /// Gets the project type and its base types.
 
131
                /// </summary>
 
132
                public abstract IEnumerable<string> GetProjectTypes ();
 
133
 
 
134
                /// <summary>
148
135
                /// Gets or sets the icon of the project.
149
136
                /// </summary>
150
137
                /// <value>
405
392
                
406
393
                //HACK: the build code is structured such that support file copying is in here instead of the item handler
407
394
                //so in order to avoid doing them twice when using the msbuild engine, we special-case them
408
 
                bool UsingMSBuildEngine ()
 
395
                bool UsingMSBuildEngine (ConfigurationSelector sel)
409
396
                {
410
397
                        var msbuildHandler = ItemHandler as MonoDevelop.Projects.Formats.MSBuild.MSBuildProjectHandler;
411
 
                        return msbuildHandler != null && msbuildHandler.UseMSBuildEngine;
 
398
                        return msbuildHandler != null && msbuildHandler.UseMSBuildEngineForItem (this, sel);
412
399
                }
413
400
 
414
401
                protected override BuildResult OnBuild (IProgressMonitor monitor, ConfigurationSelector configuration)
423
410
                        
424
411
                        StringParserService.Properties["Project"] = Name;
425
412
                        
426
 
                        if (UsingMSBuildEngine ()) {
 
413
                        if (UsingMSBuildEngine (configuration)) {
427
414
                                return DoBuild (monitor, configuration);
428
415
                        }
429
416
                        
645
632
                {
646
633
                        ProjectConfiguration config = GetConfiguration (configuration) as ProjectConfiguration;
647
634
                        if (config == null) {
648
 
                                monitor.ReportError (GettextCatalog.GetString ("Configuration '{0}' not found in project '{1}'", config.Id, Name), null);
 
635
                                monitor.ReportError (GettextCatalog.GetString ("Configuration '{0}' not found in project '{1}'", configuration, Name), null);
649
636
                                return;
650
637
                        }
651
638
                        
652
 
                        if (UsingMSBuildEngine ()) {
 
639
                        if (UsingMSBuildEngine (configuration)) {
653
640
                                DoClean (monitor, config.Selector);
654
641
                                return;
655
642
                        }
1006
993
                public event ProjectFileRenamedEventHandler FileRenamedInProject;
1007
994
        }
1008
995
 
1009
 
        public class UnknownProject : Project
1010
 
        {
1011
 
                public override string ProjectType {
1012
 
                        get { return ""; }
1013
 
                }
1014
 
 
1015
 
                public override SolutionItemConfiguration CreateConfiguration (string name)
1016
 
                {
1017
 
                        return null;
1018
 
                }
1019
 
                
1020
 
                internal protected override bool OnGetCanExecute (ExecutionContext context, ConfigurationSelector configuration)
1021
 
                {
1022
 
                        return false;
1023
 
                }
1024
 
                
1025
 
                protected override BuildResult OnBuild (IProgressMonitor monitor, ConfigurationSelector configuration)
1026
 
                {
1027
 
                        BuildResult res = new BuildResult ();
1028
 
                        res.AddError ("Unknown project type");
1029
 
                        return res;
1030
 
                }
1031
 
        }
1032
 
 
1033
996
        public delegate void ProjectEventHandler (Object sender, ProjectEventArgs e);
1034
997
        public class ProjectEventArgs : EventArgs
1035
998
        {