protected override bool OnGetNeedsBuilding (ConfigurationSelector configuration)
		{
			foreach (Package p in packages)
				if (p.NeedsBuilding)
					return true;
			return false;
		}
Example #2
0
		public async Task<BuildResult> Build (ProgressMonitor monitor, ConfigurationSelector configuration, bool buildReferencedTargets = false, OperationContext operationContext = null)
		{
			var res = new BuildResult { BuildCount = 0 };
			foreach (var bt in Items.OfType<IBuildTarget> ())
				res.Append (await bt.Build (monitor, configuration, operationContext:operationContext));
			return res;
		}
		static public void Deploy (AspNetAppProject project, ICollection<WebDeployTarget> targets, ConfigurationSelector configuration)
		{
			//project needs to be built before it can be deployed
			IdeApp.ProjectOperations.Build (project);
			
			//set up and launch a copying thread
			DeployThreadParams threadParams = new DeployThreadParams ();
			threadParams.Context = new DeployContext (new WebDeployResolver (), null, null);
			threadParams.Files = MonoDevelop.Deployment.DeployService.GetDeployFiles (threadParams.Context,
			                                                                          project, configuration);
			
			Dictionary<string, string> taskAliases = new Dictionary<string,string> ();
			foreach (WebDeployTarget target in targets) {
				threadParams.Targets.Add ((WebDeployTarget) target.Clone ());
				taskAliases.Add (target.LocationName, target.GetMarkup ());
			}
			
			MultiTaskDialogProgressMonitor monitor = new MultiTaskDialogProgressMonitor (true, true, true, taskAliases);
			monitor.SetDialogTitle (MonoDevelop.Core.GettextCatalog.GetString ("Web Deployment Progress"));
			monitor.SetOperationTitle (MonoDevelop.Core.GettextCatalog.GetString ("Deploying {0}...", project.Name));
			threadParams.Monitor = monitor;
			
			Thread deployThread = new Thread (new ParameterizedThreadStart (DoDeploy));
			deployThread.Name = "Web deploy";
			deployThread.Start (threadParams);
		}
		internal protected virtual Task Execute (ProgressMonitor monitor, ExecutionContext context, ConfigurationSelector configuration, SolutionRunConfiguration runConfiguration)
		{
			context.RunConfiguration = runConfiguration;
#pragma warning disable 618 // Type or member is obsolete
			return Execute (monitor, context, configuration);
#pragma warning restore 618 // Type or member is obsolete
		}
		protected async override Task<BuildResult> OnBuild (ProgressMonitor monitor, ConfigurationSelector configuration, OperationContext operationContext)
		{
			foreach (Package p in packages)
				if (!await p.Build (monitor))
					break;
			return BuildResult.CreateSuccess ();
		}
		public override DeployFileCollection GetDeployFiles (DeployContext ctx, SolutionItem entry, ConfigurationSelector configuration)
		{
			if (entry is IDeployable)
				return new DeployFileCollection (((IDeployable)entry).GetDeployFiles (configuration));
			
			return base.GetDeployFiles (ctx, entry, configuration);
		}
Example #7
0
		protected override BuildResult DoBuild (IProgressMonitor monitor, ConfigurationSelector configuration)
		{
			useOriginalBasePath = true;
			var res = base.DoBuild (monitor, configuration);
			useOriginalBasePath = false;
			return res;
		}
        public CustomCommandWidget(IWorkspaceObject entry, CustomCommand cmd, ConfigurationSelector configSelector, CustomCommandType[] supportedTypes)
        {
            this.Build();
            this.supportedTypes = supportedTypes;
            this.cmd = cmd;

            updating = true;

            if (cmd == null)
                comboType.AppendText (GettextCatalog.GetString ("(Select a project operation)"));

            foreach (var ct in supportedTypes)
                comboType.AppendText (commandNames [(int)ct]);

            updating = false;

            this.entry = entry;
            UpdateControls ();
            this.WidgetFlags |= Gtk.WidgetFlags.NoShowAll;

            StringTagModelDescription tagModel;
            if (entry is SolutionItem)
                tagModel = ((SolutionItem)entry).GetStringTagModelDescription (configSelector);
            else if (entry is WorkspaceItem)
                tagModel = ((WorkspaceItem)entry).GetStringTagModelDescription ();
            else
                tagModel = new StringTagModelDescription ();

            tagSelectorDirectory.TagModel = tagModel;
            tagSelectorDirectory.TargetEntry = workingdirEntry;

            tagSelectorCommand.TagModel = tagModel;
            tagSelectorCommand.TargetEntry = entryCommand;
        }
		protected override BuildResult Build (IProgressMonitor monitor, SolutionEntityItem entry, ConfigurationSelector configuration)
		{
			DotNetProject project = (DotNetProject) entry;
			GtkDesignInfo info = GtkDesignInfo.FromProject (project);

			// The code generator must run in the GUI thread since it needs to
			// access to Gtk classes
			Generator gen = new Generator ();
			lock (gen) {
				Gtk.Application.Invoke (delegate { gen.Run (monitor, project, configuration); });
				Monitor.Wait (gen);
			}
					
			BuildResult res = base.Build (monitor, entry, configuration);

			if (gen.Messages != null) {
				foreach (string s in gen.Messages)
//					res.AddWarning (info.GuiBuilderProject.File, 0, 0, null, s);
// TODO:	Add gtkx file name in the Generator 
					res.AddWarning ("", 0, 0, null, s);
						
				if (gen.Messages.Length > 0)
					info.ForceCodeGenerationOnBuild ();
			}
			return res;
		}
		public override DeployFileCollection GetProjectDeployFiles (DeployContext ctx, Project project, 
		                                                            ConfigurationSelector configuration)
		{
			DeployFileCollection files = base.GetProjectDeployFiles (ctx, project, configuration);
			
			AspNetAppProject aspProj = project as AspNetAppProject;
			
			//none of this needs to happen if it's just happening during solution build
			if (aspProj == null || ctx.ProjectBuildOnly)
				return files;
			
			//audit the DeployFiles to make sure they're allowed and laid out for ASP.NET
			foreach (DeployFile df in files) {
				//rewrite ProgramFiles target to ASP.NET's "bin" target
				if (df.TargetDirectoryID == TargetDirectory.ProgramFiles) {
					df.RelativeTargetPath = Path.Combine ("bin", df.RelativeTargetPath);
				}
			}
			
			//add all ASP.NET files marked as content. They go relative to the application root, which we assume to be ProgramFiles
			foreach (ProjectFile pf in aspProj.Files) {
				if (pf.BuildAction == BuildAction.Content)
					files.Add (new DeployFile (aspProj, pf.FilePath, pf.ProjectVirtualPath, TargetDirectory.ProgramFiles));
			}
			
			return files;
		}
		internal protected override async Task<List<string>> OnGetReferencedAssemblies (ConfigurationSelector configuration)
		{
			var res = await base.OnGetReferencedAssemblies (configuration);
			var asms = Project.TargetRuntime.AssemblyContext.GetAssemblies (Project.TargetFramework).Where (a => a.Package.IsFrameworkPackage).Select (a => a.Location);
			res.AddRange (asms);
			return res;
		}
		public override DeployFileCollection GetProjectDeployFiles (DeployContext ctx, Project project, ConfigurationSelector config)
		{
			DeployFileCollection col = base.GetProjectDeployFiles (ctx, project, config);
			
			LinuxDeployData data = LinuxDeployData.GetLinuxDeployData (project);
			
			if (ctx.Platform == "Linux") {
				DotNetProject netProject = project as DotNetProject;
				if (netProject != null) {
					DotNetProjectConfiguration conf = netProject.GetConfiguration (config) as DotNetProjectConfiguration;
					if (conf != null) {
						if (conf.CompileTarget == CompileTarget.Exe || conf.CompileTarget == CompileTarget.WinExe) {
							if (data.GenerateScript) {
								col.Add (GenerateLaunchScript (ctx, netProject, data, conf));
							}
						}
						if (conf.CompileTarget == CompileTarget.Library || conf.CompiledOutputName.FileName.EndsWith (".dll")) {
							if (data.GeneratePcFile) {
								col.Add (GeneratePcFile (ctx, netProject, data, conf));
							}
						}
					}
				}
			}
			
			// If the project is deploying an app.desktop file, rename it to the name of the project.
			foreach (DeployFile file in col) {
				if (Path.GetFileName (file.RelativeTargetPath) == "app.desktop") {
					string dir = Path.GetDirectoryName (file.RelativeTargetPath);
					file.RelativeTargetPath = Path.Combine (dir, data.PackageName + ".desktop");
				}
			}
			
			return col;
		}
Example #13
0
		public virtual IEnumerable<AbstractDProject> GetReferencedDProjects(ConfigurationSelector configuration)
		{
			AbstractDProject p;
			foreach (var dep in References.ReferencedProjectIds)
				if ((p = ParentSolution.GetSolutionItem(dep) as AbstractDProject) != null)
					yield return p;
		}
 protected override FilePath OnGetOutputFileName (ConfigurationSelector configuration)
 {
   var output = base.OnGetOutputFileName (configuration);
   if (!disableOutputNameChange && IsSupportedProject)
     return output.ChangeExtension (PluginExtension);
   return output;
 }
    protected override Task OnExecute(ProgressMonitor monitor, ExecutionContext context, ConfigurationSelector configuration)
    {
      if (base.OnGetCanExecute(context, configuration))
      {
        return base.OnExecute(monitor, context, configuration);
      }

      try
      {
        var project = Project as DotNetProject;
        if (project != null && IsSupportedProject)
        {
          const string SoftDebuggerName = RhinoSoftDebuggerEngine.DebuggerName;
          var config = project.GetConfiguration(configuration) as DotNetProjectConfiguration;
          var cmd = new RhinoCommonExecutionCommand(project.GetOutputFileName(configuration), project);
          cmd.Arguments = config.CommandLineParameters;
          cmd.WorkingDirectory = Path.GetDirectoryName(config.CompiledOutputName);
          cmd.EnvironmentVariables = config.GetParsedEnvironmentVariables();
          cmd.TargetRuntime = project.TargetRuntime;
          cmd.UserAssemblyPaths = project.GetUserAssemblyPaths(configuration);

          var executionModes = Runtime.ProcessService.GetExecutionModes();
          var executionMode = executionModes.SelectMany(r => r.ExecutionModes).FirstOrDefault(r => r.Id == SoftDebuggerName);
          var console = context.ConsoleFactory.CreateConsole(new OperationConsoleFactory.CreateConsoleOptions(true));
          var operation = executionMode.ExecutionHandler.Execute(cmd, console);
          monitor.CancellationToken.Register(() => operation.Cancel());
          return operation.Task;
        }
      }
      catch (Exception ex)
      {
        monitor.ReportError($"An error occurred starting Rhino.\n{ex}", ex);
      }
      return null;
    }
		/// <summary>
		/// Flags Unity projects for debugging with this addin
		/// </summary>
		protected override bool CanExecute (SolutionEntityItem item, ExecutionContext context, ConfigurationSelector configuration)
		{
			if (CanExecuteProject (item as Project, context)) {
				return context.ExecutionHandler.CanExecute (new UnityExecutionCommand (item.BaseDirectory.FullPath));
			}
			return base.CanExecute (item, context, configuration);
		}
Example #17
0
		public static BuildResult BuildProject(DubProject prj, IProgressMonitor mon, ConfigurationSelector sel)
		{
			var br = new BuildResult();

			// Skip building sourceLibraries
			string targetType = null;
			var cfg = prj.GetConfiguration (sel) as DubProjectConfiguration;
			if (cfg != null){
				cfg.BuildSettings.TryGetTargetTypeProperty (prj, sel, ref targetType);
				if(string.IsNullOrWhiteSpace(targetType))
					prj.CommonBuildSettings.TryGetTargetTypeProperty (prj, sel, ref targetType);

				if (targetType != null && targetType.ToLower ().Contains("sourcelibrary")) {
					br.BuildCount = 1;
					return br;
				}
			}

			var args = new StringBuilder("build");

			BuildCommonArgAppendix(args, prj, sel);

			string output;
			string errDump;

			int status = ProjectBuilder.ExecuteCommand(DubSettings.Instance.DubCommand, args.ToString(), prj.BaseDirectory, 
				mon, out errDump, out output);
			br.CompilerOutput = output;

			ErrorExtracting.HandleReturnCode (mon, br, status);
			ErrorExtracting.HandleCompilerOutput(prj, br, output);
			ErrorExtracting.HandleCompilerOutput(prj, br, errDump);

			return br;
		}
		public virtual DeployFileCollection GetCombineDeployFiles (DeployContext ctx, SolutionFolder combine, ConfigurationSelector configuration)
		{
			if (Next != null)
				return Next.GetDeployFiles (ctx, combine, configuration);
			else
				return new DeployFileCollection ();
		}
		public virtual DeployFileCollection GetProjectDeployFiles (DeployContext ctx, Project project, ConfigurationSelector configuration)
		{
			if (Next != null)
				return Next.GetDeployFiles (ctx, project, configuration);
			else
				return new DeployFileCollection ();
		}
Example #20
0
		public static IAsyncOperation Package (MonoMacProject project, ConfigurationSelector configSel,
			MonoMacPackagingSettings settings, FilePath target)
		{
			IProgressMonitor mon = IdeApp.Workbench.ProgressMonitors.GetOutputProgressMonitor (
				GettextCatalog.GetString ("Packaging Output"),
				MonoDevelop.Ide.Gui.Stock.RunProgramIcon, true, true);
			
			 var t = new System.Threading.Thread (() => {
				try {
					using (mon) {
						BuildPackage (mon, project, configSel, settings, target);
					}	
				} catch (Exception ex) {
					mon.ReportError ("Unhandled error in packaging", null);
					LoggingService.LogError ("Unhandled exception in packaging", ex);
				} finally {
					mon.Dispose ();
				}
			}) {
				IsBackground = true,
				Name = "Mac Packaging",
			};
			t.Start ();
			
			return mon.AsyncOperation;
		}
Example #21
0
		public override IEnumerable<string> GetSourcePaths (ConfigurationSelector sel)
		{
			useOriginalBasePath = true;
			var en = base.GetSourcePaths (sel).ToList();
			useOriginalBasePath = false;
			return en;
		}
		protected override BuildResult Build (IProgressMonitor monitor, SolutionEntityItem entry, ConfigurationSelector configuration)
		{
			BuildResult res = base.Build (monitor, entry, configuration);
			if (res.ErrorCount > 0 || !(entry is DotNetProject))
				return res;
			
			DotNetProject project = (DotNetProject) entry;
			AddinData data = AddinData.GetAddinData (project);
			if (data == null)
				return res;
			
			monitor.Log.WriteLine (AddinManager.CurrentLocalizer.GetString ("Verifying add-in description..."));
			string fileName = data.AddinManifestFileName;
			ProjectFile file = data.Project.Files.GetFile (fileName);
			if (file == null)
				return res;
			
			string addinFile;
			if (file.BuildAction == BuildAction.EmbeddedResource)
				addinFile = project.GetOutputFileName (ConfigurationSelector.Default);
			else
				addinFile = file.FilePath;
			
			AddinDescription desc = data.AddinRegistry.GetAddinDescription (new ProgressStatusMonitor (monitor), addinFile);
			StringCollection errors = desc.Verify ();
			
			foreach (string err in errors) {
				res.AddError (data.AddinManifestFileName, 0, 0, "", err);
				monitor.Log.WriteLine ("ERROR: " + err);
			}
			
			return res;
		}
        protected override void DoExecute(IProgressMonitor monitor, ExecutionContext context, ConfigurationSelector configuration)
        {
            IodineConfiguration config = (IodineConfiguration)GetConfiguration (configuration);
            IConsole console = config.ExternalConsole ?
                context.ExternalConsoleFactory.CreateConsole (!config.PauseConsoleOutput) :
                context.ConsoleFactory.CreateConsole (!config.PauseConsoleOutput);

            AggregatedOperationMonitor aggregatedMonitor = new AggregatedOperationMonitor (monitor);
            try {
                string param = string.Format ("\"{0}\" {1}", config.MainFile, config.CommandLineParameters);

                IProcessAsyncOperation op = Runtime.ProcessService.StartConsoleProcess ("iodine",
                        param, BaseDirectory,
                        config.EnvironmentVariables, console, null);

                monitor.CancelRequested += delegate {
                    op.Cancel ();
                };

                aggregatedMonitor.AddOperation (op);
                op.WaitForCompleted ();
                monitor.Log.WriteLine ("Iodine exited with code: " + op.ExitCode);

            } catch (Exception e) {
                monitor.ReportError (GettextCatalog.GetString ("Cannot execute \"{0}\"", config.MainFile), e);
            } finally {
                console.Dispose ();
                aggregatedMonitor.Dispose ();
            }
        }
		public CustomCommandWidget (IWorkspaceObject entry, CustomCommand cmd, ConfigurationSelector configSelector)
		{
			this.Build();
			this.cmd = cmd;
			if (cmd != null) {
				updating = true;
				comboType.RemoveText (0);
				updating = false;
			}
			
			this.entry = entry;
			UpdateControls ();
			this.WidgetFlags |= Gtk.WidgetFlags.NoShowAll;
			
			StringTagModelDescription tagModel;
			if (entry is SolutionItem)
				tagModel = ((SolutionItem)entry).GetStringTagModelDescription (configSelector);
			else if (entry is WorkspaceItem)
				tagModel = ((WorkspaceItem)entry).GetStringTagModelDescription ();
			else
				tagModel = new StringTagModelDescription ();

			tagSelectorDirectory.TagModel = tagModel;
			tagSelectorDirectory.TargetEntry = workingdirEntry;
			
			tagSelectorCommand.TagModel = tagModel;
			tagSelectorCommand.TargetEntry = entryCommand;
		}
		protected override void Clean (MonoDevelop.Core.IProgressMonitor monitor, SolutionEntityItem item, ConfigurationSelector configuration)
		{
			var proj = item as MonoGameContentProject;
			MonoGameContentProjectConfiguration cfg = null;
			if (proj != null)
				cfg = proj.GetConfiguration (configuration) as MonoGameContentProjectConfiguration;
			if (proj == null) {
				monitor.Log.WriteLine("Cleaning for Unknown MonoGame Project");
				base.Clean (monitor, item, configuration);
			}
			var manager = new PipelineManager(proj.BaseDirectory.FullPath,
			                                  Path.Combine(cfg.OutputDirectory, cfg.MonoGamePlatform),
			                                  cfg.IntermediateOutputDirectory);
			monitor.Log.WriteLine("Detected {0} MonoGame Platform", cfg.MonoGamePlatform);                              
			foreach(var file in proj.Files)
			{
				if (file.BuildAction == "Compile") {
					try {
						monitor.Log.WriteLine("Cleaning {0}", file.FilePath.FileName);
						manager.CleanContent(file.FilePath.FullPath, null);
					}
					catch(Exception ex)
					{
						monitor.Log.WriteLine(ex.Message);
					}
				}
			}
			base.Clean (monitor, item, configuration);
		}
        /// <summary>
        ///   Builds the specified solution item.
        /// </summary>
        /// <param name = "monitor">The monitor.</param>
        /// <param name = "item">The item.</param>
        /// <param name = "configuration">The configuration.</param>
        /// <returns>The build result.</returns>
        protected override BuildResult Build(IProgressMonitor monitor, SolutionEntityItem item, ConfigurationSelector configuration)
        {
            BuildResult result = new BuildResult ();

            // Pre-build
            monitor.BeginTask (GettextCatalog.GetString ("Pre-Building..."), 1);
            this.PreBuild (result, monitor, item, configuration);
            monitor.EndTask();
            if (result.ErrorCount > 0) {
                return result;
            }

            // Build
            monitor.BeginTask (GettextCatalog.GetString ("Building"), 1);
            result.Append (base.Build (monitor, item, configuration));
            monitor.EndTask();
            if (result.ErrorCount > 0) {
                return result;
            }

            // Post-build
            monitor.BeginTask (GettextCatalog.GetString ("Post-Building..."), 1);
            this.PostBuild (result, monitor, item, configuration);
            monitor.EndTask();

            return result;
        }
Example #27
0
		public override IEnumerable<SolutionItem> GetReferencedItems(ConfigurationSelector configuration)
		{
			SolutionItem p;
			foreach (var dep in References.ReferencedProjectIds)
				if ((p = ParentSolution.GetSolutionItem(dep)) != null)
					yield return p;
		}
		protected override BuildResult OnBuild (MonoDevelop.Core.IProgressMonitor monitor, ConfigurationSelector configuration)
		{
			var restResult = RestClient.CompileScripts ();
			var result = new BuildResult ();

			foreach (var message in restResult.Messages)
			{
				var file = BaseDirectory + "/" + message.File;
				var msg = message.Message;
				var errorNum = "";
				
				var messageStrings = message.Message.Split(':');

				if (messageStrings.Length == 3)
				{
					var errorNumStrings = messageStrings[1].Split(' ');

					if (errorNumStrings.Length > 1)
						errorNum = errorNumStrings[errorNumStrings.Length - 1];

					msg = messageStrings[2];
				}

				if(message.Type == "warning")
					result.AddWarning(file, message.Line, message.Column, errorNum, msg);
				else
					result.AddError(file, message.Line, message.Column, errorNum, msg);
			}
			
			return result;
		}
Example #29
0
		protected override ExecutionCommand CreateExecutionCommand (ConfigurationSelector configSel,
		                                                            DotNetProjectConfiguration configuration)
		{
			var conf = (MeeGoProjectConfiguration) configuration;
			return new MeeGoExecutionCommand (conf) {
				UserAssemblyPaths = GetUserAssemblyPaths (configSel),
			};
		}
		public override BuildResult RunTarget (IProgressMonitor monitor, IBuildTarget item, string target, ConfigurationSelector configuration)
		{
			var solutionItem = item as SolutionItem;
			if (solutionItem == null)
				return base.RunTarget (monitor, item, target, configuration);

			return solutionItem.ParentSolution.Build (monitor, configuration);
		}
 public bool CanExecute(ExecutionContext context, ConfigurationSelector configuration)
 {
     return(false);
 }
 public bool NeedsBuilding(ConfigurationSelector configuration)
 {
     return(false);
 }
Example #33
0
 public virtual SolutionConfiguration GetConfiguration(ConfigurationSelector configuration)
 {
     return((SolutionConfiguration)configuration.GetConfiguration(this) ?? DefaultConfiguration);
 }
 protected virtual IEnumerable <ExecutionTarget> GetExecutionTargets(SolutionEntityItem item, ConfigurationSelector configuration)
 {
     return(GetNext(item).GetExecutionTargets((IBuildTarget)item, configuration));
 }
 protected virtual IEnumerable <ExecutionTarget> GetExecutionTargets(Solution solution, ConfigurationSelector configuration)
 {
     return(GetNext(solution).GetExecutionTargets((IBuildTarget)solution, configuration));
 }
 protected virtual bool GetNeedsBuilding(Solution item, ConfigurationSelector configuration)
 {
     return(GetNext(item).GetNeedsBuilding((IBuildTarget)item, configuration));
 }
 public virtual IEnumerable <string> GetReferencedAssemblies(DotNetProject project, ConfigurationSelector configuration, bool includeProjectReferences)
 {
     return(GetNext(project).GetReferencedAssemblies(project, configuration, includeProjectReferences));
 }
Example #38
0
        void GetBuildableReferencedItems(List <SolutionItem> referenced, SolutionItem item, ConfigurationSelector configuration)
        {
            if (referenced.Contains(item))
            {
                return;
            }

            if (item.NeedsBuilding(configuration))
            {
                referenced.Add(item);
            }

            foreach (SolutionItem ritem in item.GetReferencedItems(configuration))
            {
                GetBuildableReferencedItems(referenced, ritem, configuration);
            }
        }
Example #39
0
        protected internal override void OnExecute(IProgressMonitor monitor, ExecutionContext context, ConfigurationSelector configuration)
        {
            ProjectConfiguration config = GetConfiguration(configuration) as ProjectConfiguration;

            if (config == null)
            {
                monitor.ReportError(GettextCatalog.GetString("Configuration '{0}' not found in project '{1}'", configuration, Name), null);
                return;
            }
            DoExecute(monitor, context, configuration);
        }
Example #40
0
 /// <summary>
 /// Executes the project
 /// </summary>
 /// <param name='monitor'>
 /// Progress monitor.
 /// </param>
 /// <param name='context'>
 /// Execution context.
 /// </param>
 /// <param name='configuration'>
 /// Configuration to execute.
 /// </param>
 protected virtual void DoExecute(IProgressMonitor monitor, ExecutionContext context, ConfigurationSelector configuration)
 {
 }
Example #41
0
 /// <summary>
 /// Gets the absolute path to the output file generated by this project.
 /// </summary>
 /// <returns>
 /// Absolute path the the output file.
 /// </returns>
 /// <param name='configuration'>
 /// Build configuration.
 /// </param>
 public virtual FilePath GetOutputFileName(ConfigurationSelector configuration)
 {
     return(FilePath.Null);
 }
Example #42
0
 protected internal override void OnSetNeedsBuilding(bool value, ConfigurationSelector configuration)
 {
     isDirty = value;
 }
 public virtual IEnumerable <ExecutionTarget> GetExecutionTargets(IBuildTarget item, ConfigurationSelector configuration)
 {
     if (item is SolutionEntityItem)
     {
         return(GetExecutionTargets((SolutionEntityItem)item, configuration));
     }
     else if (item is WorkspaceItem)
     {
         return(GetExecutionTargets((WorkspaceItem)item, configuration));
     }
     else
     {
         return(GetNext(item).GetExecutionTargets(item, configuration));
     }
 }
 public void Execute(IProgressMonitor monitor, ExecutionContext context, ConfigurationSelector configuration)
 {
     throw new System.NotImplementedException();
 }
 public BuildResult RunTarget(IProgressMonitor monitor, string target, ConfigurationSelector configuration)
 {
     return(new BuildResult());
 }
Example #46
0
 protected virtual void DoClean(IProgressMonitor monitor, ConfigurationSelector configuration)
 {
     ItemHandler.RunTarget(monitor, "Clean", configuration);
 }
 protected virtual void SetNeedsBuilding(Solution item, bool val, ConfigurationSelector configuration)
 {
     GetNext(item).SetNeedsBuilding((IBuildTarget)item, val, configuration);
 }
Example #48
0
        /// <summary>
        /// Builds the project.
        /// </summary>
        /// <returns>
        /// The build result.
        /// </returns>
        /// <param name='monitor'>
        /// Progress monitor.
        /// </param>
        /// <param name='configuration'>
        /// Configuration to build.
        /// </param>
        /// <remarks>
        /// This method is invoked to build the project. Support files such as files with the Copy to Output flag will
        /// be copied before calling this method.
        /// </remarks>
        protected virtual BuildResult DoBuild(IProgressMonitor monitor, ConfigurationSelector configuration)
        {
            BuildResult res = ItemHandler.RunTarget(monitor, "Build", configuration);

            return(res ?? new BuildResult());
        }
 protected virtual IEnumerable <ExecutionTarget> GetExecutionTargets(WorkspaceItem item, ConfigurationSelector configuration)
 {
     if (item is Solution)
     {
         return(GetExecutionTargets((Solution)item, configuration));
     }
     else
     {
         return(GetNext(item).GetExecutionTargets((IBuildTarget)item, configuration));
     }
 }
Example #50
0
 internal protected override bool OnGetCanExecute(ExecutionContext context, ConfigurationSelector configuration)
 {
     return(false);
 }
Example #51
0
 internal protected override BuildResult OnRunTarget(IProgressMonitor monitor, string target, ConfigurationSelector configuration)
 {
     if (target == ProjectService.BuildTarget)
     {
         SolutionItemConfiguration conf = GetConfiguration(configuration) as SolutionItemConfiguration;
         if (conf != null && conf.CustomCommands.HasCommands(CustomCommandType.Build))
         {
             conf.CustomCommands.ExecuteCommand(monitor, this, CustomCommandType.Build, configuration);
             return(new BuildResult());
         }
     }
     else if (target == ProjectService.CleanTarget)
     {
         SolutionItemConfiguration config = GetConfiguration(configuration) as SolutionItemConfiguration;
         if (config != null && config.CustomCommands.HasCommands(CustomCommandType.Clean))
         {
             config.CustomCommands.ExecuteCommand(monitor, this, CustomCommandType.Clean, configuration);
             return(new BuildResult());
         }
     }
     return(base.OnRunTarget(monitor, target, configuration));
 }
 public void SetNeedsBuilding(bool needsBuilding, ConfigurationSelector configuration)
 {
 }
 protected virtual bool CanExecute(Solution solution, ExecutionContext context, ConfigurationSelector configuration)
 {
     return(GetNext(solution).CanExecute((IBuildTarget)solution, context, configuration));
 }
Example #54
0
 public ReadOnlyCollection <T> GetAllSolutionItemsWithTopologicalSort <T> (ConfigurationSelector configuration) where T : SolutionItem
 {
     return(RootFolder.GetAllItemsWithTopologicalSort <T> (configuration));
 }
 protected virtual void Execute(IProgressMonitor monitor, WorkspaceItem item, ExecutionContext context, ConfigurationSelector configuration)
 {
     if (item is Solution)
     {
         Execute(monitor, (Solution)item, context, configuration);
     }
     else
     {
         GetNext(item).Execute(monitor, (IBuildTarget)item, context, configuration);
     }
 }
 protected virtual bool CanExecute(WorkspaceItem item, ExecutionContext context, ConfigurationSelector configuration)
 {
     if (item is Solution)
     {
         return(CanExecute((Solution)item, context, configuration));
     }
     else
     {
         return(GetNext(item).CanExecute((IBuildTarget)item, context, configuration));
     }
 }
 protected virtual void Execute(IProgressMonitor monitor, SolutionEntityItem item, ExecutionContext context, ConfigurationSelector configuration)
 {
     GetNext(item).Execute(monitor, (IBuildTarget)item, context, configuration);
 }
 protected virtual bool CanExecute(SolutionEntityItem item, ExecutionContext context, ConfigurationSelector configuration)
 {
     return(GetNext(item).CanExecute((IBuildTarget)item, context, configuration));
 }
Example #59
0
 public ReadOnlyCollection <Project> GetAllProjectsWithTopologicalSort(ConfigurationSelector configuration)
 {
     return(RootFolder.GetAllProjectsWithTopologicalSort(configuration));
 }
 protected virtual void Execute(IProgressMonitor monitor, Solution solution, ExecutionContext context, ConfigurationSelector configuration)
 {
     GetNext(solution).Execute(monitor, (IBuildTarget)solution, context, configuration);
 }