Is it possible somehow to add a menu item to the "File" > "New" menu of Visual Studio from within a VSIX extension?
There is probably a special GUID that we could use in the .vsct file, but where can we find that please?
You can use Command Explorer extension to find out where to place your command.
Related
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.
Following the instructions at this doc, I
Created a new "ASP.NET Core Web Application" and selected "API" from the follow on menu.
I made a small change to the provided "ValuesController.cs", then
clicked Project > Export Template.
Selected "Item template", clicked next
Selected "ValuesController.cs" from the controllers folder, clicked next.
Didn't check any dependencies, clicked next
Named it "MyControllerTemplate" and didn't add any icons. clicked finish
After all that, I ended up with "MyControllerTemplate.zip" in two places:
Visual Studio 2017 > My Exported Templates
Visual Studio 2017 > Templates > ItemTemplates
According to the doc, that should have been enough. After closing and reopening VS2017, I go to add a new item, and my installed choices are limited to Xamarin.Forms and ASP.NET Core, neither of which have my newly created template.
I also tried it again after extracting the zip file in both places.
Based on another stack overflow, I also tried changing <ProjectType>CSharp</ProjectType> to <ProjectType>DNX</ProjectType> in the .vstemplate file.
and adding
<TemplateGroupID>SharedDotNetAndDotNetWeb</TemplateGroupID>
as well as <TemplateGroupID>DotNetWeb</TemplateGroupID>
None of this has made the template visible to me.
Is there something else I need to do, or a step I am messing up?
Edit 1: Tried moving the zip file and extracted files into the Visual C# folder under ItemTemplates, neither worked.
My solution was extracting the zip file, editing the .vstemplate file to add
<TemplateGroupID>AspNetCore</TemplateGroupID> to the <TemplateData> section,
and leaving <ProjectType>CSharp</ProjectType> alone
I know in notepad ++ this can be done easy by just using the language menu item then selecting your language.
In Aptana Studio 3 say I am working with a .tpl file from Open Cart. The source is all "greyed" out as it doesn't know its PHP code. How can I tell Aptana Studio 3 its PHP code?
Is this even possible?
Ive been looking for hours and cannot find anything :/
Thanks in advance!
To fix the problem for just this file, you can right click on it in the File Explorer or App Explorer and choose Open with... > PHP Editor (you may have to click Other to get to the PHP Editor option).
To make all .tpl files open in the PHP Editor, go to Window > Preferences > General > Editors > File Associations and add *.tpl file and choose the editor you want it to use.
I wonder why I can't see my // TODO: descriptions in my Task View in Aptana.
When I rightclick at the line number and choose Add Task it works and I can see my task in the
Window > Show View > Tasks
But when I just write a comment like this //TODO: fix this line as soon as possible.
Then it doesn't show up in the Task list.
When I check my preferences Window > Preferences > Aptana Studio > Tasks, there's TODO, XXX and FIXME in that list, so it looks like it should work, but it doesn't.
The code I'm working at is an Aptana Project Aswell.
The problem were that I had to change the type of the project in aptana.
The project was a Web project first, and WEB projects doesn't support TODO's in default.
Change the project to a PHP project and it works.
Maybe you can fix this somehow to make Web projects support todo's but I fixed it by changing the project type.
My current project is web based and you can create comments like
/**
* TODO do some stuff here
*/
Aptana will recognize "TODO" keyword and will put colored rectangle(color is dependent on the editing theme set in preferences) on the right side of the screen next to the scrollbar.
To create task, right click on the line numbers vertical bar and context menu will appear. Click the Add task menu item. Once you do this it will appear in the tasks panel window.
Plus you can mark the task as completed or set priority, high, normal and low.
If you want to define your own task type, you must first add it in preferences Window > Preferences > Aptana Studio > Tasks, then you can add a new configuration on Configure content in task view.
Since a project can have hundreds of files inside dozens of directories (filters) shown on the "Project Navigator" panel, sometimes it's getting difficult to seek the file which is currently opened in the Editor (for example, when I jump from file to file via "CMD + clicking", etc).
Is there a way to automatically select currently opened file on the "Project Navigator" panel? I.e., automatically expand the directories (filters) and select the file there as I would have clicked on it? Maybe there's a shortcut or something?
Thanks.
The keyboard shortcut is ⌘-shift-J
Right-click the file in the editor and choose Reveal in Project Navigator.
Another option is to Right click anywhere within the Editor pane (with the source code) -> Navigate -> Reveal in Project Navigator.