Visual Studio - Extending a built-in windows - visual-studio-extensions

How can we execute a command which is not in the parameter list of DTE.ExecuteCommand(...)?
(s. for whole list: https://github.com/ligershark/VoiceExtension/blob/master/src/Resources/commands.txt )
For example, I have multiple bookmark folders and everytime when I start Visual Studio, it expands all the bookmark folders. I want to write a small extension which enables collapsing all bookmark folders at once.
I can access the Bookmarks window with "WindowKinds.vsWindowKindBookmarks", but dont know how to take any interaction on the window (in that particular case, collapsing a bookmark folder)

Related

How Use Shift With F2 in Vs2019

I updated Visual Studio 2019, but I can't use shift+F2 to create new folders and files.
I tried different methods but it didn't work. How is it work?
Thanks.
Not really aware that shift F2 ever worked in Visual Studio?
You can certainly highlight a object in the project exploer and hit f2 to re-name.
but, to add a folder, web page, files etc?
Then simple right click on the project like this:
So, right click on above, then choose add, and you get this:
From above, you can add new web pages, new folders, and even existing "items" (existing files).
So, I never used shift F2 - can't recall if it ever was used or worked.
but, you can as noted highlight any object in the project explorer and hit f2.
you need to install this extension to visual studio 2019:
AddNewFile Extension
After the install, you'll be able to press shift+ F2 to add new files of any type and folders with subfolders.
working extension

Is there a way to copy a complete page from one App to another in AppMaker

Is there a way to copy a complete page from one AppMaker application to another AppMaker application?
Unfortunately, at this time there is no easy way to do it:
Export source app (top left corner menu button -> Export(.zip))
Export target app
Insert extracted page file into target app zip archive in pages
folder
You may want to tag your last revision in target app before
re-importing to be able to revert to that revision easily (just in
case).
Import target app from modified zip (with additional page).
After importing you may also need to fix imported page: if it uses
datasource that doesn't exist in this app, CSS for this page isn't
imported, so you need to copy it manually from source app, etc.
Here is link to google groups discussion:
https://groups.google.com/forum/#!topic/appmaker-users/6IasuJWiA34

ASP.NET - copy existing project into solution - but cannot "Start Debugging" on any .ASPX?

In VS2015 I had an existing solution with one project ("projA").
Then, from another solution, I copied the files which make up four other projects to sit in the same directory as "projA".
I then opened the solution which has "projA" in it and used the "Add Existing Project" facility to add the four other projects.
The solution builds and everything looks happy.
However if, using Solution Explorer, I
go into one of the newly added projects (say 'projB')
select Foo.aspx from within 'projB' and
select 'Start Debugging'
then what I get served to the browser is not Foo.aspx from 'projB' but the 'Index.cshtml' from 'projA'.
I'm guessing (and 'guessing' is the word) this is related to the fact that 'projA' is marked as the startup project and 'projB' isn't ? So I read here https://msdn.microsoft.com/en-us/library/a1awth7y.aspx that I can have multiple startup projects but I'm not really clear on whether there's some negative aspect to that ? Would it make 'projB' visible in a way it currently isn't ?
Or maybe I've got all that wrong and there's some other reason for this ?
I think you can set the behavior you want from the solution property page. So go to the solution property page then common properties then Startup project and select Current selection so that when you select a document from a project it will be the startup project.

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.

Possilble to auto open a downloaded word document downloaded in browser

The requirement is sent a Word document from browser, and automatically open it on MS Word so that then can view and edit the Word document.
The only solution I can found require the end user to click a dialogue Window in order to open a Word document in Office when the document is download from browser.
Is this the only way, that the user has to click a dialogue Window before Office can open the downloaded Word document?
It kinds of make sense for security reason to not let browser automatically execute an local application (Word.exe) on the local machine, but I still want to confirm that.
If the answer is yes, then I would like to know how to do that?
Edit: I just found out that you have to use inline instead of Attachement, otherwise it will always ask for the option event the browsers are setup properly.
Response.AddHeader("Content-Disposition", "inline;filename=clientquotes.docx");
After made that change, browser will auto open the Word document without asking for action.
If I understand correctly, you want to change the behaviour of your browser to automatically open downloaded files. As far I'm aware its pretty painless process when it comes to Firefox and Google Chrome, however on IE it's not as simple.
Firefox
Changing download actions
This will not affect media embedded in a web page - only links to the files themselves.
Click the menu button Menu and choose Options
Select the Applications panel.
The Applications panel will display. Select the type of file for which you want to change the default action.
The Action column will give you a drop-down menu, with options on action to take, whenever you click that type of file.
Alwaysask: will prompt you to select what action you want Firefox to take when you click on that type of file. This can be useful if Firefox is automatically saving a file type or is always opening it with a certain program and you want to be asked what to do.
Save File: will always save the file to your computer using the Downloads window, whenever you click that type of file.
Open the file with an application or plugin of your choosing.
Click Ok to close the options window after making changes
Adding download actions
On the web, find a link to a file matching the type you want to add.
Click on the file link to download it.
Select how you want Firefox to handle the file:
Open with: Saves the file to a temporary folder and opens it in the default application for that file type. To select an application, click Browse....
Do not choose Firefox to always open a certain file type, as doing so can cause
a problem where Firefox repeatedly opens empty tabs or windows after you click on a link.
Save file: Saves the file to the download folder (specified in the Firefox General panel).
In the Opening file window, check mark Do this automatically for files like this from now on.
Click Ok.
Is Do this automatically for files like this from now on disabled?
This can happen if the website's server incorrectly specifies the
Internet Media type of the file. It also can happen if the server assigns
"Content-Disposition: attachment" to the file.
Reference
Google Chrome
If you want certain types of file always to open after they've finished downloading, click the arrow next to the file button in the downloads bar and select Always open files of this type.
Reference
IE
From what I can gather for IE you will have to change the registry keys. You can refer to this link for further information.
I hope this answers your question.

Resources