GetOptionSet() private method

private GetOptionSet ( ) : Mono.Options.OptionSet
return Mono.Options.OptionSet
Example #1
0
        public static MonoDevelopOptions Parse(string[] args)
        {
            var opt    = new MonoDevelopOptions();
            var optSet = opt.GetOptionSet();

            try {
                opt.RemainingArgs = optSet.Parse(args);
            } catch (Mono.Options.OptionException ex) {
                opt.Error = ex.ToString();
            }

            if (opt.Error != null)
            {
                Console.WriteLine("ERROR: {0}", opt.Error);
                Console.WriteLine("Pass --help for usage information.");
            }

            if (opt.ShowHelp)
            {
                Console.WriteLine(BrandingService.ApplicationName + " " + BuildInfo.VersionLabel);
                Console.WriteLine("Options:");
                optSet.WriteOptionDescriptions(Console.Out);
                const string openFileText = "      file.ext;line;column";
                Console.Write(openFileText);
                Console.Write(new string (' ', 29 - openFileText.Length));
                Console.WriteLine("Opens a file at specified integer line and column");
            }

            return(opt);
        }
Example #2
0
        public static MonoDevelopOptions Parse(string[] args)
        {
            var opt    = new MonoDevelopOptions();
            var optSet = opt.GetOptionSet();

            try {
                opt.RemainingArgs = optSet.Parse(args);
            } catch (Mono.Options.OptionException ex) {
                opt.Error = ex.ToString();
            }

            if (opt.Error != null)
            {
                Console.WriteLine("ERROR: {0}", opt.Error);
                Console.WriteLine("Pass --help for usage information.");
            }

            if (opt.ShowHelp)
            {
                Console.WriteLine(BrandingService.ApplicationName + " " + BuildVariables.PackageVersionLabel);
                Console.WriteLine("Options:");
                optSet.WriteOptionDescriptions(Console.Out);
            }

            return(opt);
        }
Example #3
0
		public static MonoDevelopOptions Parse (string[] args)
		{
			var opt = new MonoDevelopOptions ();
			var optSet = opt.GetOptionSet ();
			
			try {
				opt.RemainingArgs = optSet.Parse (args);
			} catch (Mono.Options.OptionException ex) {
				opt.Error = ex.ToString ();
			}
			
			if (opt.Error != null) {
				Console.WriteLine ("ERROR: {0}", opt.Error);
				Console.WriteLine ("Pass --help for usage information.");
			}
			
			if (opt.ShowHelp) {
				Console.WriteLine (BrandingService.ApplicationName + " " + BuildInfo.VersionLabel);
				Console.WriteLine ("Options:");
				optSet.WriteOptionDescriptions (Console.Out);
			}
			
			return opt;
		}
Example #4
0
		public static MonoDevelopOptions Parse (string[] args)
		{
			var opt = new MonoDevelopOptions ();
			var optSet = opt.GetOptionSet ();
			
			try {
				opt.RemainingArgs = optSet.Parse (args);
			} catch (Mono.Options.OptionException ex) {
				opt.Error = ex.ToString ();
			}
			
			if (opt.Error != null) {
				Console.WriteLine ("ERROR: {0}", opt.Error);
				Console.WriteLine ("Pass --help for usage information.");
			}
			
			if (opt.ShowHelp) {
				Console.WriteLine (BrandingService.ApplicationName + " " + BuildInfo.VersionLabel);
				Console.WriteLine ("Options:");
				optSet.WriteOptionDescriptions (Console.Out);
				const string openFileText = "      file.ext;line;column";
				Console.Write (openFileText);
				Console.Write (new string (' ', 29 - openFileText.Length));
				Console.WriteLine ("Opens a file at specified integer line and column");
			}
			
			return opt;
		}