public ProjectConfigurationPlatformMatching(IProject pProject, string configuration, string platform, SolutionItem solutionItem)
		{
            project = pProject;
			this.Configuration = configuration;
			this.Platform = platform;
			this.SolutionItem = solutionItem;
		}
コード例 #2
0
 void RemoveItemFromSolution(SD.SolutionItem item)
 {
     SD.ProjectSection section = GetExtensibilityGlobalsSection();
     section.Items.Remove(item);
     nonPersistedSolutionItems.Add(item);
     solution.Save();
 }
コード例 #3
0
		public void AddItem(string fileName)
		{
			string relativeFileName = FileUtility.GetRelativePath(solution.Directory, fileName);
			SolutionItem newItem = new SolutionItem(relativeFileName, relativeFileName);
			folder.SolutionItems.Items.Add(newItem);
			new SolutionItemNode(solution, newItem).InsertSorted(this);
		}
コード例 #4
0
 internal void RemoveItemFromSolution(string name)
 {
     SD.SolutionItem item = GetItemFromSolution(name);
     if (item != null)
     {
         RemoveItemFromSolution(item);
     }
 }
コード例 #5
0
 SD.SolutionItem GetItemFromSolutionOrNonPersistedItems(string name)
 {
     SD.SolutionItem item = GetNonPersistedSolutionItem(name);
     if (item != null)
     {
         return(item);
     }
     return(GetItemFromSolution(name));
 }
コード例 #6
0
        public void VariableValue_SetNewValueForVariableWhenExtensibilityGlobalsExistsButVariableDoesNotExist_SolutionNotUpdatedWithNewSolutionItem()
        {
            CreateSolution();
            AddExtensibilityGlobalsSection();

            globals.set_VariableValue("test", "new-value");

            SD.SolutionItem item = GetExtensibilityGlobalsSolutionItem("test");
            Assert.IsNull(item);
        }
コード例 #7
0
        public void VariablePersists_NoExistingExtensibilityGlobalsAndVariableSetToTrueAfterNewVariableAdded_VariableAddedToSolution()
        {
            CreateSolution();
            globals.set_VariableValue("test", "new-value");

            globals.set_VariablePersists("test", true);

            SD.SolutionItem item = GetExtensibilityGlobalsSolutionItem("test");
            Assert.AreEqual("new-value", item.Location);
        }
コード例 #8
0
        public void VariableValue_AddNewVariableAndPersistThenUpdateVariableValue_SolutionValueUpdated()
        {
            CreateSolution();
            globals.set_VariableValue("test", "one");
            globals.set_VariablePersists("test", true);

            globals.set_VariableValue("test", "two");

            SD.SolutionItem item = GetExtensibilityGlobalsSolutionItem("test");
            Assert.AreEqual("two", item.Location);
        }
コード例 #9
0
        public void VariableValue_SetNewValueForVariableAddedToExtensibilityGlobalsSection_SolutionItemUpdated()
        {
            CreateSolution();
            AddExtensibilityGlobalsSection();
            AddVariableToExtensibilityGlobals("test", "value");

            globals.set_VariableValue("test", "new-value");

            SD.SolutionItem item = GetExtensibilityGlobalsSolutionItem("test");
            Assert.AreEqual("new-value", item.Location);
        }
コード例 #10
0
        public void VariablePersists_SetToFalseForVariableInSolutionButWithDifferentCase_VariableRemovedFromSolution()
        {
            CreateSolution();
            AddExtensibilityGlobalsSection();
            AddVariableToExtensibilityGlobals("test", "value");

            globals.set_VariablePersists("TEST", false);

            SD.SolutionItem item = GetExtensibilityGlobalsSolutionItem("test");
            Assert.IsNull(item);
        }
コード例 #11
0
 bool UpdateItemInSolution(string name, string value)
 {
     SD.SolutionItem item = GetItemFromSolution(name);
     if (item != null)
     {
         item.Location = value;
         solution.Save();
         return(true);
     }
     return(false);
 }
コード例 #12
0
 void UpdateOrCreateNonPersistedSolutionItem(string name, string value)
 {
     SD.SolutionItem item = GetNonPersistedSolutionItem(name);
     if (item != null)
     {
         item.Location = value;
     }
     else
     {
         CreateNonPersistedSolutionItem(name, value);
     }
 }
コード例 #13
0
		public SolutionItemNode(Solution solution, SolutionItem item)
		{
			sortOrder = 2;
			canLabelEdit = true;
			
			ContextmenuAddinTreePath = "/SharpDevelop/Pads/ProjectBrowser/ContextMenu/SolutionItemNode";
			
			this.solution = solution;
			this.item = item;
			this.Text = Path.GetFileName(FileName);
			SetIcon(IconService.GetImageForFile(FileName));
		}
コード例 #14
0
 public object this[string name] {
     get {
         SD.SolutionItem item = GetItemFromSolutionOrNonPersistedItems(name);
         if (item == null)
         {
             ThrowNoVariableExistsException(name);
         }
         return(item.Location);
     }
     set {
         UpdateOrCreateSolutionItem(name, value as string);
     }
 }
コード例 #15
0
        internal void AddItemToSolution(string name)
        {
            if (ItemExistsInSolution(name))
            {
                return;
            }

            SD.SolutionItem item = GetNonPersistedSolutionItem(name);
            nonPersistedSolutionItems.Remove(item);
            SD.ProjectSection section = GetOrCreateExtensibilityGlobalsSection();
            section.Items.Add(item);
            solution.Save();
        }
コード例 #16
0
		public void AddVariableToExtensibilityGlobals(string name, string value)
		{
			var solutionItem = new SD.SolutionItem(name, value);
			GetExtensibilityGlobalsSection().Items.Add(solutionItem);
		}
コード例 #17
0
		void CreateNonPersistedSolutionItem(string name, string value)
		{
			var item = new SD.SolutionItem(name, value);
			nonPersistedSolutionItems.Add(item);
		}
コード例 #18
0
ファイル: Solution.cs プロジェクト: lisiynos/pascalabcnet
		internal SolutionItem CreateMatchingItem(string solutionConfiguration, string solutionPlatform, IProject project, string initialLocation)
		{
			SolutionItem item = new SolutionItem(project.IdGuid + "." + solutionConfiguration + "|"
			                                     + solutionPlatform + ".Build.0", initialLocation);
			GetProjectConfigurationsSection().Items.Add(item);
			GetProjectConfigurationsSection().Items.Add(new SolutionItem(project.IdGuid + "." + solutionConfiguration + "|"
			                                                             + solutionPlatform + ".ActiveCfg", initialLocation));
			return item;
		}
コード例 #19
0
        public void AddVariableToExtensibilityGlobals(string name, string value)
        {
            var solutionItem = new SD.SolutionItem(name, value);

            GetExtensibilityGlobalsSection().Items.Add(solutionItem);
        }
コード例 #20
0
        void CreateNonPersistedSolutionItem(string name, string value)
        {
            var item = new SD.SolutionItem(name, value);

            nonPersistedSolutionItems.Add(item);
        }