/// <summary>Snippet for GetTagTemplate</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void GetTagTemplateResourceNames() { // Create client DataCatalogClient dataCatalogClient = DataCatalogClient.Create(); // Initialize request argument(s) TagTemplateName name = TagTemplateName.FromProjectLocationTagTemplate("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]"); // Make the request TagTemplate response = dataCatalogClient.GetTagTemplate(name); }
/// <summary>Snippet for GetTagTemplate</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void GetTagTemplate() { // Create client DataCatalogClient dataCatalogClient = DataCatalogClient.Create(); // Initialize request argument(s) string name = "projects/[PROJECT]/locations/[LOCATION]/tagTemplates/[TAG_TEMPLATE]"; // Make the request TagTemplate response = dataCatalogClient.GetTagTemplate(name); }
/// <summary>Snippet for UpdateTagTemplate</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void UpdateTagTemplate1() { // Create client DataCatalogClient dataCatalogClient = DataCatalogClient.Create(); // Initialize request argument(s) TagTemplate tagTemplate = new TagTemplate(); // Make the request TagTemplate response = dataCatalogClient.UpdateTagTemplate(tagTemplate); }
/// <summary>Snippet for UpdateTagTemplateAsync</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public async Task UpdateTagTemplate1Async() { // Create client DataCatalogClient dataCatalogClient = await DataCatalogClient.CreateAsync(); // Initialize request argument(s) TagTemplate tagTemplate = new TagTemplate(); // Make the request TagTemplate response = await dataCatalogClient.UpdateTagTemplateAsync(tagTemplate); }
/// <summary>Snippet for UpdateTagTemplate</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void UpdateTagTemplate2() { // Create client DataCatalogClient dataCatalogClient = DataCatalogClient.Create(); // Initialize request argument(s) TagTemplate tagTemplate = new TagTemplate(); FieldMask updateMask = new FieldMask(); // Make the request TagTemplate response = dataCatalogClient.UpdateTagTemplate(tagTemplate, updateMask); }
/// <summary>Snippet for CreateTagTemplate</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void CreateTagTemplateResourceNames() { // Create client DataCatalogClient dataCatalogClient = DataCatalogClient.Create(); // Initialize request argument(s) LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"); string tagTemplateId = ""; TagTemplate tagTemplate = new TagTemplate(); // Make the request TagTemplate response = dataCatalogClient.CreateTagTemplate(parent, tagTemplateId, tagTemplate); }
/// <summary>Snippet for CreateTagTemplate</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void CreateTagTemplate() { // Create client DataCatalogClient dataCatalogClient = DataCatalogClient.Create(); // Initialize request argument(s) string parent = "projects/[PROJECT]/locations/[LOCATION]"; string tagTemplateId = ""; TagTemplate tagTemplate = new TagTemplate(); // Make the request TagTemplate response = dataCatalogClient.CreateTagTemplate(parent, tagTemplateId, tagTemplate); }
/// <summary>Snippet for GetTagTemplate</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void GetTagTemplateRequestObject() { // Create client DataCatalogClient dataCatalogClient = DataCatalogClient.Create(); // Initialize request argument(s) GetTagTemplateRequest request = new GetTagTemplateRequest { TagTemplateName = TagTemplateName.FromProjectLocationTagTemplate("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]"), }; // Make the request TagTemplate response = dataCatalogClient.GetTagTemplate(request); }
/// <summary>Snippet for UpdateTagTemplate</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void UpdateTagTemplateRequestObject() { // Create client DataCatalogClient dataCatalogClient = DataCatalogClient.Create(); // Initialize request argument(s) UpdateTagTemplateRequest request = new UpdateTagTemplateRequest { TagTemplate = new TagTemplate(), UpdateMask = new FieldMask(), }; // Make the request TagTemplate response = dataCatalogClient.UpdateTagTemplate(request); }
/// <summary>Snippet for UpdateTagTemplateAsync</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public async Task UpdateTagTemplateRequestObjectAsync() { // Create client DataCatalogClient dataCatalogClient = await DataCatalogClient.CreateAsync(); // Initialize request argument(s) UpdateTagTemplateRequest request = new UpdateTagTemplateRequest { TagTemplate = new TagTemplate(), UpdateMask = new FieldMask(), }; // Make the request TagTemplate response = await dataCatalogClient.UpdateTagTemplateAsync(request); }
/// <summary>Snippet for CreateTagTemplate</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void CreateTagTemplateRequestObject() { // Create client DataCatalogClient dataCatalogClient = DataCatalogClient.Create(); // Initialize request argument(s) CreateTagTemplateRequest request = new CreateTagTemplateRequest { ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"), TagTemplate = new TagTemplate(), TagTemplateId = "", }; // Make the request TagTemplate response = dataCatalogClient.CreateTagTemplate(request); }
private void initializeView() { createSelectionTexture(); _tags = new List<TagTemplate>(); TagTemplate tpl = new TagTemplate("#All", "#All"); tpl.isAllTag = true; _tags.Add(tpl); TCore.view = this; initTags (); TCore.init(); minSize = new Vector2(700, 320); }
private void initializeView() { createSelectionTexture(); _tags = new List <TagTemplate>(); TagTemplate tpl = new TagTemplate("#All", "#All"); tpl.isAllTag = true; _tags.Add(tpl); TCore.view = this; initTags(); TCore.init(); minSize = new Vector2(700, 320); }
private void LeftMouseClick() { float RECT_H = 46f; if (TCore.size == TODOListSize.SMALL) { RECT_H = 29f; } TNode selectedNode = null; Vector2 pos = Event.current.mousePosition; pos.y += scrollPos.y; //pos.x = position.width - pos.x; pos.x -= TAGS_PANLE_WIDTH; foreach (TNode node in TCore.nodes) { Rect r = node.rect; r.y += RECT_H; if (r.Contains(pos)) { if (!node.isSelected) { selectedNode = node; } else { OpenClass(node.filePath, node.line); } } } foreach (TNode node in TCore.nodes) { node.isSelected = false; } if (selectedNode != null) { selectedNode.isSelected = true; } pos.x += TAGS_PANLE_WIDTH; TagTemplate selectedTag = null; foreach (TagTemplate tag in tags) { Rect r = tag.rect; r.y += RECT_H; if (r.Contains(pos)) { selectedTag = tag; } } if (selectedTag != null) { foreach (TagTemplate tag in tags) { tag.isSelected = false; } selectedTag.isSelected = true; } Repaint(); }
private static void AddTag(string patern, string name) { TagTemplate tpl = new TagTemplate (patern, name); _tags.Add (tpl); }
private static void AddTag(string patern, string name) { TagTemplate tpl = new TagTemplate(patern, name); _tags.Add(tpl); }
//-------------------------------------- // INITIALIZE //-------------------------------------- //-------------------------------------- // PUBLIC METHODS //-------------------------------------- public static void renderTag(TagTemplate tpl, int index) { int FONT_SIZE = 12; int d = 30; int m = 40; int l = 25; int w = 40; int x = 15; int mx = 15; if (TCore.size == TODOListSize.SMALL) { FONT_SIZE = 9; m = 25; d = 20; w = 25; x = 5; l = 18; mx = 18; } tpl.rect = new Rect(0, index * m - d - x, TODOMainView.TAGS_PANLE_WIDTH, w); if (tpl.isSelected) { Rect r = tpl.rect; r.x += 1f; r.y += 1f; r.height -= 1f; if (TCore.view.selectionTexture == null) { TCore.view.createSelectionTexture(); } GUI.DrawTexture(r, TCore.view.selectionTexture); } GUILayout.BeginArea(new Rect(mx, index * m - d, TODOMainView.TAGS_PANLE_WIDTH, 50), ""); { GUIStyle s = new GUIStyle(EditorStyles.boldLabel); s.fontSize = FONT_SIZE; if (TCore.size == TODOListSize.SMALL) { s.fontStyle = FontStyle.Normal; } int count = TCore.getTagCount(tpl.name); if (tpl.isAllTag) { foreach (TagTemplate t in TCore.view.tags) { count += TCore.getTagCount(t.name); } } GUILayout.Label(tpl.name + " (" + count.ToString() + ")", s); } GUILayout.EndArea(); //Drawing.DrawLine(new Vector2(0, index * m - d + l) TODOMainView.TAGS_PANLE_WIDTH); Drawing.DrawDashLine(new Vector2(0, index * m - d + l), 10, TODOMainView.TAGS_PANLE_WIDTH); }