protected internal override void BindProperties() { base.BindProperties(); this.chkXMLDocumentationFile.Checked = !string.IsNullOrEmpty(ParentPropertyPage.GetProperty(XSharpProjectFileConstants.DocumentationFile)); var platform = ParentPropertyPage.GetProperty(XSharpProjectFileConstants.PlatformTarget) ?? "anycpu"; if (string.Compare(platform, "anycpu", true) == 0) { this.chkPrefer32Bit.Enabled = true; } else { this.chkPrefer32Bit.Enabled = false; this.chkPrefer32Bit.Checked = false; } if (!string.IsNullOrEmpty(txtSpecificWarnings.Text)) { rbWarningSpecific.Checked = true; rbWarningAll.Checked = false; rbWarningNone.Checked = false; txtSpecificWarnings.Enabled = true; } else { var warn = ParentPropertyPage.GetProperty(XSharpProjectFileConstants.TreatWarningsAsErrors) ?? "false"; warn = warn.ToLower(); rbWarningSpecific.Checked = false; rbWarningAll.Checked = warn == "true"; rbWarningNone.Checked = warn != "true"; txtSpecificWarnings.Enabled = false; } }
protected internal override void BindProperties() { base.BindProperties(); ThreadHelper.ThrowIfNotOnUIThread(); SetDialectOptions(ParentPropertyPage.GetProperty(XSharpProjectFileConstants.Dialect) ?? "Core"); EnabledisableStandardDefs(); }
protected virtual void OnControlValidating(object sender, CancelEventArgs e) { ValidateControl(sender, e); if (!e.Cancel) { ParentPropertyPage.UpdateStatus(); } }
private void EnabledisableStandardDefs() { ThreadHelper.ThrowIfNotOnUIThread(); btnStandardHeader.Enabled = !this.chkNoStandardDefs.Checked; if (this.chkNoStandardDefs.Checked && !string.IsNullOrEmpty(this.tbStandardDefs.Text)) { ParentPropertyPage.SetProperty(XSharpProjectFileConstants.StandardDefs, ""); this.tbStandardDefs.Text = null; } }
internal void RefreshCommandLine() { CommandLineBuilder commandLine = new CommandLineBuilder(); string javacPath = null; if (ParentPropertyPage.ProjectManager != null && ParentPropertyPage.ProjectManager.SharedBuildOptions.General != null) { javacPath = ParentPropertyPage.ProjectManager.SharedBuildOptions.General.JavacPath; } if (javacPath == null) { javacPath = ParentPropertyPage.GetConfigProperty(DartConfigConstants.JavacPath, _PersistStorageType.PST_PROJECT_FILE); } string fullucc = javacPath; try { if (!string.IsNullOrEmpty(fullucc) && !Path.IsPathRooted(fullucc) && ParentPropertyPage.ProjectManager != null) { fullucc = Path.Combine(ParentPropertyPage.ProjectManager.ProjectFolder, javacPath); } } catch (ArgumentException) { fullucc = javacPath; } if (string.IsNullOrEmpty(fullucc)) { var projectConfigs = ParentPropertyPage.Configurations; DartProjectConfig projectConfig = projectConfigs != null && projectConfigs.Count == 1 ? (DartProjectConfig)projectConfigs[0] : null; fullucc = "javac.exe"; } commandLine.AppendFileNameIfNotNull(fullucc); commandLine.AppendSwitchIfNotNullOrEmpty("-encoding ", Encoding); switch (DebuggingInformation) { case DebuggingInformation.All: commandLine.AppendSwitch("-g"); break; case DebuggingInformation.Specific: if (!string.IsNullOrEmpty(SpecificDebuggingInformation)) { commandLine.AppendSwitchIfNotNull("-g:", SpecificDebuggingInformation); } else { commandLine.AppendSwitch("-g:none"); } break; case DebuggingInformation.None: commandLine.AppendSwitch("-g:none"); break; case DebuggingInformation.Default: default: break; } if (!string.IsNullOrEmpty(SourceRelease) && !string.Equals(SourceRelease, "Default", StringComparison.OrdinalIgnoreCase)) { commandLine.AppendSwitchIfNotNull("-source ", SourceRelease); } if (!string.IsNullOrEmpty(TargetRelease) && !string.Equals(TargetRelease, "Default", StringComparison.OrdinalIgnoreCase)) { commandLine.AppendSwitchIfNotNull("-target ", TargetRelease); } commandLine.AppendSwitchIfNotNullOrEmpty("-d ", OutputPath); if (!ShowWarnings) { commandLine.AppendSwitch("-nowarn"); } else if (ShowAllWarnings) { commandLine.AppendSwitch("-Xlint"); commandLine.AppendSwitch("-deprecation"); } if (!string.IsNullOrEmpty(ExtraArguments)) { commandLine.AppendTextUnquoted(" " + ExtraArguments); } txtBuildCommandLine.Text = commandLine.ToString(); }