public ProjectConfigurationPlatformMatching(IProject pProject, string configuration, string platform, SolutionItem solutionItem) { project = pProject; this.Configuration = configuration; this.Platform = platform; this.SolutionItem = solutionItem; }
void RemoveItemFromSolution(SD.SolutionItem item) { SD.ProjectSection section = GetExtensibilityGlobalsSection(); section.Items.Remove(item); nonPersistedSolutionItems.Add(item); solution.Save(); }
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); }
internal void RemoveItemFromSolution(string name) { SD.SolutionItem item = GetItemFromSolution(name); if (item != null) { RemoveItemFromSolution(item); } }
SD.SolutionItem GetItemFromSolutionOrNonPersistedItems(string name) { SD.SolutionItem item = GetNonPersistedSolutionItem(name); if (item != null) { return(item); } return(GetItemFromSolution(name)); }
public void VariableValue_SetNewValueForVariableWhenExtensibilityGlobalsExistsButVariableDoesNotExist_SolutionNotUpdatedWithNewSolutionItem() { CreateSolution(); AddExtensibilityGlobalsSection(); globals.set_VariableValue("test", "new-value"); SD.SolutionItem item = GetExtensibilityGlobalsSolutionItem("test"); Assert.IsNull(item); }
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); }
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); }
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); }
public void VariablePersists_SetToFalseForVariableInSolutionButWithDifferentCase_VariableRemovedFromSolution() { CreateSolution(); AddExtensibilityGlobalsSection(); AddVariableToExtensibilityGlobals("test", "value"); globals.set_VariablePersists("TEST", false); SD.SolutionItem item = GetExtensibilityGlobalsSolutionItem("test"); Assert.IsNull(item); }
bool UpdateItemInSolution(string name, string value) { SD.SolutionItem item = GetItemFromSolution(name); if (item != null) { item.Location = value; solution.Save(); return(true); } return(false); }
void UpdateOrCreateNonPersistedSolutionItem(string name, string value) { SD.SolutionItem item = GetNonPersistedSolutionItem(name); if (item != null) { item.Location = value; } else { CreateNonPersistedSolutionItem(name, value); } }
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)); }
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); } }
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(); }
public void AddVariableToExtensibilityGlobals(string name, string value) { var solutionItem = new SD.SolutionItem(name, value); GetExtensibilityGlobalsSection().Items.Add(solutionItem); }
void CreateNonPersistedSolutionItem(string name, string value) { var item = new SD.SolutionItem(name, value); nonPersistedSolutionItems.Add(item); }
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; }