void ConfigurationExtension_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e) { var view = e.NewValue as EnvironmentView; if (view != null) { var current = Subcontext.DataContext as ConfigurationEnvironmentView; if (current == null || current.EnvironmentView != view) { var cev = new ConfigurationEnvironmentView(view); _provider.ResetConfiguration(cev); Subcontext.DataContext = cev; } } }
public bool IsConfigurationChanged(ConfigurationEnvironmentView view) { if (_alwaysCreateNew) { return(true); } var factory = view.EnvironmentView.Factory; return(view.Description != factory.Configuration.Description || view.PrefixPath != factory.Configuration.GetPrefixPath() || view.InterpreterPath != factory.Configuration.InterpreterPath || view.WindowsInterpreterPath != factory.Configuration.GetWindowsInterpreterPath() || view.PathEnvironmentVariable != factory.Configuration.PathEnvironmentVariable || InterpreterArchitecture.TryParse(view.ArchitectureName) != factory.Configuration.Architecture || view.VersionName != factory.Configuration.Version.ToString()); }
public void ApplyConfiguration(ConfigurationEnvironmentView view) { var factory = view.EnvironmentView.Factory; if (view.Description != factory.Configuration.Description) { // We're renaming the interpreter, remove the old one... _interpreterOptions.RemoveConfigurableInterpreter(factory.Configuration.Id); } var newInterp = _interpreterOptions.AddConfigurableInterpreter( view.Description, new InterpreterConfiguration( "", view.Description, view.PrefixPath, view.InterpreterPath, view.WindowsInterpreterPath, view.PathEnvironmentVariable, InterpreterArchitecture.TryParse(view.ArchitectureName), Version.Parse(view.VersionName) ) ); }
public void RemoveConfiguration(ConfigurationEnvironmentView view) { var factory = view.EnvironmentView.Factory; _factoryProvider.RemoveInterpreter(factory.Id); }
public void RemoveConfiguration(ConfigurationEnvironmentView view) { var factory = view.EnvironmentView.Factory; _interpreterOptions.RemoveConfigurableInterpreter(factory.Configuration.Id); }
public void ResetConfiguration(ConfigurationEnvironmentView view) { var factory = view.EnvironmentView.Factory; view.Description = factory.Configuration.Description; view.PrefixPath = factory.Configuration.PrefixPath; view.InterpreterPath = factory.Configuration.InterpreterPath; view.WindowsInterpreterPath = factory.Configuration.WindowsInterpreterPath; view.PathEnvironmentVariable = factory.Configuration.PathEnvironmentVariable; view.ArchitectureName = factory.Configuration.Architecture.ToString(); view.VersionName = factory.Configuration.Version.ToString(); }
public bool IsConfigurationChanged(ConfigurationEnvironmentView view) { var factory = view.EnvironmentView.Factory; return view.Description != factory.Configuration.Description || view.PrefixPath != factory.Configuration.PrefixPath || view.InterpreterPath != factory.Configuration.InterpreterPath || view.WindowsInterpreterPath != factory.Configuration.WindowsInterpreterPath || view.PathEnvironmentVariable != factory.Configuration.PathEnvironmentVariable || InterpreterArchitecture.TryParse(view.ArchitectureName) != factory.Configuration.Architecture || view.VersionName != factory.Configuration.Version.ToString(); }
public void ApplyConfiguration(ConfigurationEnvironmentView view) { var factory = view.EnvironmentView.Factory; if (view.Description != factory.Configuration.Description) { // We're renaming the interpreter, remove the old one... _interpreterOptions.RemoveConfigurableInterpreter(factory.Configuration.Id); } var newInterp = _interpreterOptions.AddConfigurableInterpreter( view.Description, new InterpreterConfiguration( "", view.Description, view.PrefixPath, view.InterpreterPath, view.WindowsInterpreterPath, view.PathEnvironmentVariable, InterpreterArchitecture.TryParse(view.ArchitectureName), Version.Parse(view.VersionName) ) ); }
public void RemoveConfiguration(ConfigurationEnvironmentView view) { var factory = view.EnvironmentView.Factory; _interpreterOptions.RemoveConfigurableInterpreter(factory.Configuration.Id); }
public void RemoveConfiguration(ConfigurationEnvironmentView view) { var factory = view.EnvironmentView.Factory; _factoryProvider.RemoveInterpreter(factory.Id); }
public void ResetConfiguration(ConfigurationEnvironmentView view) { var factory = view.EnvironmentView.Factory; view.Description = factory.Description; view.PrefixPath = factory.Configuration.PrefixPath; view.InterpreterPath = factory.Configuration.InterpreterPath; view.WindowsInterpreterPath = factory.Configuration.WindowsInterpreterPath; view.LibraryPath = factory.Configuration.LibraryPath; view.PathEnvironmentVariable = factory.Configuration.PathEnvironmentVariable; view.ArchitectureName = factory.Configuration.Architecture == ProcessorArchitecture.Amd64 ? "64-bit" : "32-bit"; view.VersionName = factory.Configuration.Version.ToString(); }
public bool IsConfigurationChanged(ConfigurationEnvironmentView view) { var factory = view.EnvironmentView.Factory; var arch = factory.Configuration.Architecture == ProcessorArchitecture.Amd64 ? "64-bit" : "32-bit"; return view.Description != factory.Description || view.PrefixPath != factory.Configuration.PrefixPath || view.InterpreterPath != factory.Configuration.InterpreterPath || view.WindowsInterpreterPath != factory.Configuration.WindowsInterpreterPath || view.LibraryPath != factory.Configuration.LibraryPath || view.PathEnvironmentVariable != factory.Configuration.PathEnvironmentVariable || view.ArchitectureName != arch || view.VersionName != factory.Configuration.Version.ToString(); }
public void ApplyConfiguration(ConfigurationEnvironmentView view) { _factoryProvider.SetOptions(new InterpreterFactoryCreationOptions { Id = view.EnvironmentView.Factory.Id, Description = view.Description, PrefixPath = view.PrefixPath, InterpreterPath = view.InterpreterPath, WindowInterpreterPath = view.WindowsInterpreterPath, LibraryPath = view.LibraryPath, PathEnvironmentVariableName = view.PathEnvironmentVariable, Architecture = view.ArchitectureName == "64-bit" ? ProcessorArchitecture.Amd64 : ProcessorArchitecture.X86, LanguageVersionString = view.VersionName }); }
public void RemoveConfiguration(ConfigurationEnvironmentView view) { if (_alwaysCreateNew) { return; } var factory = view.EnvironmentView.Factory; _interpreterOptions.RemoveConfigurableInterpreter(factory.Configuration.Id); }
public bool CanApply(ConfigurationEnvironmentView view) { if (string.IsNullOrEmpty(view.Description) || string.IsNullOrEmpty(view.InterpreterPath)) { return false; } return true; }
public string ApplyConfiguration(ConfigurationEnvironmentView view) { if (!_alwaysCreateNew) { var factory = view.EnvironmentView.Factory; if (view.Description != factory.Configuration.Description) { // We're renaming the interpreter, remove the old one... _interpreterOptions.RemoveConfigurableInterpreter(factory.Configuration.Id); } } Version version; if (!Version.TryParse(view.VersionName, out version)) { version = null; } return _interpreterOptions.AddConfigurableInterpreter( view.Description, new InterpreterConfiguration( "", view.Description, view.PrefixPath, view.InterpreterPath, view.WindowsInterpreterPath, view.PathEnvironmentVariable, InterpreterArchitecture.TryParse(view.ArchitectureName ?? ""), version ) ); }