[英]Visual Studio Express, How to hide object properties like functions
I hope my question is clear enough. 我希望我的问题很清楚。 I am using free version of visual studio express.
我正在使用Visual Studio Express的免费版本。
When I create a function, there is that "-" or "+" sign next to line number where function is created, which allow me to hide it. 创建函数时,在创建函数的行号旁边有“-”或“ +”符号,这使我可以将其隐藏。
I want to do same thing for my object which is really long because it is storing alot of items. 我想为我的对象做同样的事情,因为它存储了很多项目,所以它确实很长。 All items are sorted by area, and group which looks like this:
所有项目均按区域和组排序,如下所示:
var itemTable = {
groupA: {
BanditHideout: {
itemDrop: [
//Weapons
{
After all items are listed, there is next area and inside it another item list. 在列出所有项目之后,有一个下一个区域,在其中另一个是项目列表。
Once all areas are done, we move on to groupB and do the same thing, and there are like 10 groups in total each having 5 areas. 完成所有区域后,我们移至groupB并执行相同的操作,总共共有10个组,每个组有5个区域。
I managed to do it manually using "outlining" option in visual studio, where I mark a whole text and press "Ctrl + M" and then "Ctrl + H" which hide the content and create "+" sign next to line number. 我设法使用Visual Studio中的“大纲”选项手动完成此操作,在该选项中标记了整个文本,然后按“ Ctrl + M”,然后按“ Ctrl + H”,这会隐藏内容并在行号旁边创建“ +”符号。
I do that for every part i want to hide, and it works well. 我要隐藏的每个部分都这样做,而且效果很好。 My problem is that, I have to do it manually which is bad, because for some reason, sometimes all "+" dissapear, and I am forced to do it all over again.
我的问题是,我必须手动执行,这样做很不好,因为出于某种原因,有时所有“ +”都消失了,我不得不重新做一遍。
I hope that I am clear enough and you can help me out somehow :) Let me know if you need more information. 我希望我足够清楚,您可以以某种方式帮助我:)如果您需要更多信息,请告诉我。 I can give you a screenshoot if that will help.
如果可以的话,我可以给您截图。 Thanks for help in advance
预先感谢您的帮助
You can always use regions :) 您可以随时使用地区:)
#region RegionName
[some of your code]
#endregion
PS. PS。 Well, apparently not always ;]
好吧,显然并非总是如此 ;]
PS2. PS2。 Since Visual Studio Community edition has been released, there really is no need for VS Express anymore - it lacks wayy too many features compared to the standard version.
自从Visual Studio Community版本发布以来,实际上不再需要VS Express-与标准版本相比,它缺少太多功能。 BUT - if you're coding only in JavaScript, I'd consider some other, "lighter" IDEs than Visual Studio (off the top of my head - Eclipse or NetBeans, but there's tons of other free IDEs out there).
但是-如果您仅使用JavaScript进行编码,那么我会考虑使用比Visual Studio其他“更轻便”的IDE(在我的头上-Eclipse或NetBeans,但还有很多其他免费的IDE)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.