How to listen is context menu open in vscode extension api - vscode-extensions

I want to change context menu items in my vscode extension dynamically.
So, when the user triggers right-click I want to make some checks and generate some items in the context menu.
How can I do this?

Related

Re-use the context menu from explorer view in another tree view in VSCode extension

I'm writing a VSCode extension that adds a new file explorer view to the Explorer activity.
Is it possible to make my new view re-use the context menu (ie. right-click menu) from the file explorer view? And if so, how?
This is not possible, as discussed in this GitHub issue: How to apply File Explorer context menu to custom tree view?.
There are no plans to support file explorer context menu items in custom tree view context menu.

How to add buttons linked to your external tool in IntelliJ IDEA

I created some batch work and integrated it as ExternalTool to the IntelliJ IDEA. as described here: Configure Intellij IDEA to run batch file
But how can I add buttons to my toolbar that will activate the batch that defined as external tool?
It is quite easy.
Assuming that you already have an External Tool configured just right click on the menu bar and choose Customize Menus and Toolbars...:
Next step is to mark the last item (whatever that is in your setup) in Main Toolbar and select Add After...:
Now you can select your external tool from the Choose Actions To Add window (here you can also select an icon to use):
Action has been added:
And your button has been added to the toolbar:

Add NSMenuItems to other Apications' Menus

I use an application called Afloat that adds a few buttons to the "Window" menu of every application that uses windows. It adds the Afloat icon and options like "Keep Afloat" which will leave the active window as the window that stays the furthest forward even if the user clicks a different window. I would like to add an item to the "Edit" menu and to all contextual menus on a text editor. I can't find how to do this in the documentation.
Quote by Apple:
The CFPlugIn provides a standard architecture for application extensions. A contextual menu plug-in, which is CFPlugIn bundle installed in a Library/Contextual Menu Items directory at the appropriate level of the system, enables applications and other forms of software to extend the list of commands found on contextual menus such as the Finder’s.
Alternatively, you can use Services to integrate with other applications.

How to launch an SP 2010 Dialog Window Maximized

I have modified EditForm.aspx of a list in SharePoint 2010. I need to launch the dialog window (that's what EditForm.aspx seems to be launched as) maximized, but I haven't been able to find the correct setting to tweak.
A quick web search suggests to use the showMaximized:true style setting, but I am unable to find the element in EditForm.aspx to apply this attribute to.
If you want to remove ALL dialogs from a list, go to:
list settings -> advanced -> dialog -> turn them off
But if you just want to change the edit button, you will probably have to create a new edit <CustomAction> that uses javascript, see this example:
http://www.chakkaradeep.com/post/Using-the-SharePoint-2010-Modal-Dialog.aspx
Its for a different button, but you should get the idea.
And then you will need to build a <HideCustomAction> to hide the original edit button
Check this : http://www.wawawum.com/blog/post.aspx?id=66a5aed2-f530-4687-bd42-1ef0fb379544
Add a Content Editor WebPart to your EditForm, then put the code found in this blog to maximize the Dialog when opening it.
Works very well for me.

Enablement of retarget action in eclipse

I have a popup menu and a main menu item to enable when a variable got selected.I have implemented the particular enable action for popup menu. But I was unable to do it in menu item since I have used ActionSet.
So how do I handle enable disable of menu item.
style="push"
tooltip="%ConvertConstantsToEnumToolTip">
Try using <enablement>. The link below might help
http://help.eclipse.org/indigo/index.jsptopic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fextension-points%2Forg_eclipse_ui_actionSets.html