In Goland, how can I hide test files underneath each non-test file? - goland

In Go, it is "idiomatic" to place test files next to the files containing the code under test.
Regardless of whether or not this is a good software engineering practice, in Goland IDE you can hide tests underneath the code under test as if it were a subdirectory.
Where is this setting?

You can follow the instructions from this help page.
A quick reference is to do the following:
under the project view window
click on the cogwheel
select File Nesting...
click on the "Child file suffix" under ".go" extension
add "_test.go" to the list and click OK
Here's the file nesting option:
Once chosen, add the following:

Related

SpecFlow Inserting New feature not working

I just have downloaded SpecFlow test project from bitbucket repository. Its working fine. Now I want to Add more features to it. It doesn't Automatically create feature cs file. and also test not appearing in test Explorer.
To Add a new Feature file
Right Click on your folder that you want to contain your feature files in the Solution Explorer.
Click add => New Item
In the Search box on the top right Type "Feature", an option for "Specflow Feature File" should show up. Rename the file how you like and click add.
To get the Feature files To display in the Test explorer try cleaning the solution and rebuilding. If this doesn't work we need
more info.

Getting GPS to display my package subfolders

My GPS does not display the subfolders under "src" although they exist and are non empty. When I try to create a new subfolder from within GPS, it gets created but does not show under "src". I am using (community) GPS version 20180523 on Windows 10.
I have tried the following.
(1) I fiddled around with the folder display options in the top right corner of the project tab with no success.
(2) I aggressively hit the refresh button.
(3) I created the subfolders I want in Windows explorer.
How can I get my folder-organised code to show correctly in GPS?
Thanks.
In your project properties GUI, go under Sources->Directories and check the "Include Subdirectories" checkbox. To add it manually to your GPR file, open it and add "/**" to the end of your Source_Dirs option:
for Source_Dirs use ("src/**");

Atom.io find in project not working

I am trying to use the "find in project" feature of Atom editor.
I am coming from sublime and assumed that opening a folder is the equivalent of opening a project. Is this assumption correct?
If so, then I have a project open. I then search from a string using "Find in project". I am certain the string exists, and the file type is not ignored, yet it still returns no result.
I ran into this issue, and it only affected one project - a project in a git repo.
I checked the settings of the search field.. they were fine.
My issue was, as #fab313 mentioned above, as the setting in Core > Exclude VCS ignored paths.
Once I unchecked that box (Atom menu, Preferences, Core).. all project searches worked fine!
I had this same problem and I found that I accidentally clicked some of the settings boxes in the bottom right.
You just want to make sure you know which boxes are checked.
If I check one of those boxes (making them blue) then my CTRL/Command + F will only find a single result.
The settings will look like this and cause the problems for me:

How to change working directory via extension in Adobe brackets

Given a file or path - I can use FileUtils (or similar) to work with files. I'd like to be able to alter the current working directory in my extension.
I see in node.js there is process.chdir(directory) but I am unable to access that object.
Is there any other way to change the current working directory.
I am trying to create a simple plugin that when you open the file dialog, the directory your file listing is the same as the currently opened file. The simple implementation being:
MainViewManager.on("currentFileChange", function (e, newFile) {
process.chdir(newFile.parentPath); // This is my FAIL
});
Brackets, like many GUI apps, doesn't use the current working directory very much once it's up and running. So there is probably a different way to accomplish what you're looking for.
When you say...
when you open the file dialog, the directory your file listing is the same as the currently opened file.
...do you mean you want the file tree on the left side of the window to change? If so, try the ProjectManager.openProject() API.
...or do you mean you want to open a file-picker dialog box (like what you see when you choose File > Open in the menu)? If so, you can use FileSystem.showOpenDialog() - the 4th argument is the directory to show when the dialog is first opened.

Sharepoint MasterPages/Templates customization

I am pretty new to Sharepoint.
I need to customize some Sharepoint Masterpages (the background color, the font type and a few other css requeriments).
Considering I have available the following files: v4.master, default.master and two more pages which are content pages of default.master, plus the COREv4.css file.
I know I should create a copy of one of those master pages (I am not sure which tho) and customize it changing the CSS linked to it). The following questions come in regards of this:
1) The custom CSS file should be a modified copy of the COREv4.CSS or just another CSS file with the desired styles?
2) How do I create/link the customized CSS file for the modified page via Site Settings?. How/Where should I save the new file?.
3) As for the copy of v4.master, How do I load it to "replace" the original one for the site?.
4) The system is built upon Sharepoint 2010. That ensures that the page to have the modified CSS would be a v4.master copy only?.
Thank you for the insight as always.
**Update**
Hi,
I managed to solve the problem getting a general idea with the pdf manual provided, your suggestions and some extra steps I will describe briefly:
1) To place my custom css file I put it in the folder: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\3082\STYLES
2) I opened the site to be customized with Sharepoint Designer 2010.
3) I clicked on the option Main Pages/Master Pages, and selected the page to be v4.master page, copied and pasted it. Then I renamed it right clicking on it, selecting "Rename" and typed the new name, after doing that I right clicked one more and selected "Set page as main default page".
4) To edit the contents of the page I right clicked once more and selected the option "Edit content in advanced mode", right before the head tag ended I copied and pasted:
<SharePoint:CssRegistration name="customname.css" runat="server" After="core4.css"/>
Note that "customname.css" is my css file. Then I clicked on the floppy disk icon on the upper left side of the screen to save.
5) After doing that I used Chrome HTML/CSS Analyzer, inspecting the original (and now copied) master page to browse on the zones that needed customization in order to identify the class names/ids/element types that managed the styles to be changed. Once identified I only added to them the properties that required change, EG:
//Webparts Alternate Highlighted Rows
div#ctl00_MSO_ContentDiv table.ms-viewlsts tbody
tr.ms-alternatingstrong{ background-color:#F7FAF4 }
table.ms-listviewtable.ms-basictable tbody
tr.ms-alternatingstrong.ms-itmhover{ background-color:#F7FAF4 }
I mostly did this by myself by trial and error with Chrome Analyzer but I also helped the task using the Chart found here (http://sharepointexperience.com/csschart/csschart.html), tho at some point going thru it turned a bit tricky and I decided to do it by myself as I mentioned. In the process I repeatedly added more styles to the custom file and then overwrote it on the server location to refresh the page/pages to see how it was looking, this till the end of the process.
Thanks for your help, I hope this serves as a guide for anyone that needs it. If you have questions let me know.
You can create a new master page from the scratch or modify the existing one.
Please have a look at this link it may help you to get answers of your questions
http://www.rdacorp.com/wp-content/uploads/ASP-NET-Master-Pages-and-SharePoint.pdf
It's not advised to modify files of SharePoint.
Better to create new master page file, specify all CSS and script you want inside and install this with feature.
What version of SharePoint do you have? SharePoint 2010 Server or Foundation? Cause with server version you can brand your master page in a cool way:
see this link
Microsoft has a good introductory article on how you can/should do this.
http://office.microsoft.com/en-us/sharepoint-designer-help/customize-a-master-page-to-brand-your-site-HA102449505.aspx

Resources