示例#1
0
        public virtual StringTagModelDescription GetStringTagModelDescription()
        {
            StringTagModelDescription model = new StringTagModelDescription();

            model.Add(GetType());
            return(model);
        }
        public CustomCommandWidget(WorkspaceObject entry, CustomCommand cmd, ConfigurationSelector configSelector, CustomCommandType[] supportedTypes)
        {
            this.Build();

            // Turn these off so that their children can be focused
            CanFocus       = false;
            vbox1.CanFocus = false;
            // Turn this off because otherwise it creates a keyboard trap and the focus cannot move off it.
            comboType.CanFocus = false;

            this.supportedTypes = supportedTypes;
            this.cmd            = cmd;

            updating = true;

            if (cmd == null)
            {
                comboType.AppendText(GettextCatalog.GetString("(Select a project operation)"));
            }

            foreach (var ct in supportedTypes)
            {
                comboType.AppendText(commandNames [(int)ct]);
            }

            updating = false;

            this.entry = entry;
            UpdateControls();
            this.WidgetFlags |= Gtk.WidgetFlags.NoShowAll;

            StringTagModelDescription tagModel;

            if (entry is SolutionFolderItem)
            {
                tagModel = ((SolutionFolderItem)entry).GetStringTagModelDescription(configSelector);
            }
            else if (entry is WorkspaceItem)
            {
                tagModel = ((WorkspaceItem)entry).GetStringTagModelDescription();
            }
            else
            {
                tagModel = new StringTagModelDescription();
            }

            tagSelectorDirectory.TagModel    = tagModel;
            tagSelectorDirectory.TargetEntry = workingdirEntry;
            tagSelectorDirectory.Accessible.SetCommonAttributes("CustomCommand.TagSelectorDirectory",
                                                                GettextCatalog.GetString("Tag Selector"),
                                                                GettextCatalog.GetString("Insert a custom tag into the directory entry"));

            tagSelectorCommand.TagModel    = tagModel;
            tagSelectorCommand.TargetEntry = entryCommand;
            tagSelectorCommand.Accessible.SetCommonAttributes("CustomCommand.TagSelector",
                                                              GettextCatalog.GetString("Tag Selector"),
                                                              GettextCatalog.GetString("Insert a custom tag into the command entry"));

            SetupAccessibility();
        }
示例#3
0
        protected virtual StringTagModelDescription OnGetStringTagModelDescription(ConfigurationSelector conf)
        {
            var m = new StringTagModelDescription();

            m.Add(GetType());
            return(m);
        }
示例#4
0
        /// <summary>
        /// Gets the string tag model description for this solution item
        /// </summary>
        /// <returns>
        /// The string tag model description
        /// </returns>
        /// <param name='conf'>
        /// Configuration for which to get the string tag model description
        /// </param>
        public virtual StringTagModelDescription GetStringTagModelDescription(ConfigurationSelector conf)
        {
            StringTagModelDescription model = new StringTagModelDescription();

            model.Add(GetType());
            model.Add(typeof(Solution));
            return(model);
        }
示例#5
0
        public StringTagModelDescription GetStringTagModelDescription()
        {
            StringTagModelDescription model = new StringTagModelDescription();

            model.Add(typeof(Project));
            model.Add(typeof(Solution));
            model.Add(typeof(DotNetProjectConfiguration));
            model.Add(typeof(Workbench));
            return(model);
        }
示例#6
0
        public CustomCommandWidget(WorkspaceObject entry, CustomCommand cmd, ConfigurationSelector configSelector, CustomCommandType[] supportedTypes)
        {
            this.Build();
            this.supportedTypes = supportedTypes;
            this.cmd            = cmd;

            updating = true;

            if (cmd == null)
            {
                comboType.AppendText(GettextCatalog.GetString("(Select a project operation)"));
            }

            foreach (var ct in supportedTypes)
            {
                comboType.AppendText(commandNames [(int)ct]);
            }

            updating = false;

            this.entry = entry;
            UpdateControls();
            this.WidgetFlags |= Gtk.WidgetFlags.NoShowAll;

            StringTagModelDescription tagModel;

            if (entry is SolutionFolderItem)
            {
                tagModel = ((SolutionFolderItem)entry).GetStringTagModelDescription(configSelector);
            }
            else if (entry is WorkspaceItem)
            {
                tagModel = ((WorkspaceItem)entry).GetStringTagModelDescription();
            }
            else
            {
                tagModel = new StringTagModelDescription();
            }

            tagSelectorDirectory.TagModel    = tagModel;
            tagSelectorDirectory.TargetEntry = workingdirEntry;
            tagSelectorDirectory.ButtonAccessible.SetCommonAttributes("CustomCommand.TagSelectorDirectory",
                                                                      GettextCatalog.GetString("Tag Selector"),
                                                                      GettextCatalog.GetString("Insert a custom tag into the directory entry"));

            tagSelectorCommand.TagModel    = tagModel;
            tagSelectorCommand.TargetEntry = entryCommand;
            tagSelectorCommand.ButtonAccessible.SetCommonAttributes("CustomCommand.TagSelector",
                                                                    GettextCatalog.GetString("Tag Selector"),
                                                                    GettextCatalog.GetString("Insert a custom tag into the command entry"));
        }
        public override StringTagModelDescription GetStringTagModelDescription(ConfigurationSelector conf)
        {
            StringTagModelDescription model  = base.GetStringTagModelDescription(conf);
            SolutionItemConfiguration config = GetConfiguration(conf);

            if (config != null)
            {
                model.Add(config.GetType());
            }
            else
            {
                model.Add(typeof(SolutionItemConfiguration));
            }
            return(model);
        }
示例#8
0
        public CustomCommandWidget(IWorkspaceObject entry, CustomCommand cmd, ConfigurationSelector configSelector)
        {
            this.Build();
            this.cmd = cmd;
            if (cmd != null)
            {
                updating = true;
                comboType.RemoveText(0);
                updating = false;
            }

            this.entry = entry;
            UpdateControls();
            this.WidgetFlags |= Gtk.WidgetFlags.NoShowAll;

            StringTagModelDescription tagModel;

            if (entry is SolutionItem)
            {
                tagModel = ((SolutionItem)entry).GetStringTagModelDescription(configSelector);
            }
            else if (entry is WorkspaceItem)
            {
                tagModel = ((WorkspaceItem)entry).GetStringTagModelDescription();
            }
            else
            {
                tagModel = new StringTagModelDescription();
            }

            tagSelectorDirectory.TagModel    = tagModel;
            tagSelectorDirectory.TargetEntry = workingdirEntry;

            tagSelectorCommand.TagModel    = tagModel;
            tagSelectorCommand.TargetEntry = entryCommand;
        }