Do you have any idea how to hide the Set Encoding menu in the Edit Menu? I had spend some hard time looking for a way to hide this menu.
I try to dig the plugin.xml in many plugins with no luck to look for this Set Encoding action command.
I can't get the action definition id from plug-in spy that I can use to hide this menu in my developed plugin. I only get the info below:
The active contribution item class:
org.eclipse.ui.texteditor.RetargetTextEditorAction
The contributing plug-in:
org.eclipse.ui.workbench.texteditor (3.5.1.r352_v20100105)
The org.eclipse.ui.edit.text.changeEncoding action is usually added to the Edit menu dynamically by the IEditorActionBarContributor specified for the contriubutorClass attribute of the declared org.eclipse.ui.editors extension point.
E.g. the org.eclipse.ui.DefaultTextEditor gets declared by the org.eclipse.ui.editors plugin itself, and specifies the class TextEditorActionContributor as the contriubutorClass. TextEditorActionContributor does add the ChangeEncoding action like so:
public void init(IActionBars bars) {
super.init(bars);
IMenuManager menuManager= bars.getMenuManager();
IMenuManager editMenu= menuManager.findMenuUsingPath(IWorkbenchActionConstants.M_EDIT);
if (editMenu != null)
editMenu.add(fChangeEncodingAction);
}}
So to completely remove this action from the Edit menu, you would need to define your own editors by extending org.eclipse.ui.editors and providing you own implementation of IEditorActionBarContributor.
You must edit the perspective, right click on the toolbar in Eclipse and you should get a context menu with the alternative Customize perspective.... Then go to the tab Menu visibility and disable the menu item you want to hide.
Related
The new tab is missing from the browser context menu in Nuxt.js projects. I need to make sure my clients can freely open links in a new tab.
How can I add this feature globally in Nuxt.js?
Do you use the v-btn component with the link prop? https://vuetifyjs.com/en/api/v-btn/#props-link
If the generated HTML is not an actual Go to blog, you will not have it on the context menu.
You could inspect in the DOM and see how it is.
Buttons are for actions, links for navigation.
If it's a link, should be able to open it in a new tab, if it's a button with something like #click="$router.push('/blog')", this won't work with the context menu.
I already have a AutoCompleteTextView with custom layout and adapter. How can I control the visibility of a tick symbol next to each item to show if the item has already been added? By added I mean, it's compared with another list that's fetched from storage that I compare with the AutoCompleteTextView suggestions?
What do you mean is an Exposed Dropdown Menus, available in the latest material design library.
Please read the documentation about how to implement it: https://material.io/develop/android/components/menu/
What I needed to do was to have the tick icon in the custom layout be View.INVISIBLEby default. Then in the getView() method of the custom adapter, change the visibility according to the requirement for that specific situation. The point is, the getView() method is responsible for any changes to related to the UI of the items.
I am developing a webkit application for public release, and wondering how to deal with context menus.
The problem is there are items in Safari's default context menu that I don't want to show end users:
Reload
Inspect Element
Possibly others. So, question #1 is: Is it possible to remove items selectively from the default context menu?
Another option is to create my own context menu from scratch, but then comes a host of other problems:
I lose default functionality, for example spell-checking on textareas, or accessibility features.
I lose OSX's system-wide context menu handling behavior, so it will be a less-native UI behavior. I suppose for this I could implement the menu in the native host application.
So the main question is in general, What should I do to preserve default functionality in Safari's context menu, while restricting certain things like "reload", "Inspect Element"?
Couldn't you use the WebUIDelegate protocol method?
- (NSArray *)webView:(WebView *)sender contextMenuItemsForElement:(NSDictionary *)element defaultMenuItems:(NSArray *)defaultMenuItems
You should be able to take the defaultItems, add the ones you want to keep to a new array, and then return said array?
I'm trying to change the color of a tab in a tabpanel I have when my app goes online or offline. I have the online and offline events already setup but now I need to be able to change the color of the tab from these events.
How do I go about accessing an individual tab and setting it's CSS?
you could use ext component query to get the handle of the component and then add/remove class
Ext.ComponentQuery.query('yourselector')[0].addCls('yourclass')
You can get the individual tab from tabpanel by referring it as following inside the controller class (inside the refs):
myDesiredTab: '#myTabPanelId container[title=myDesiredTabTitle]'
and afterward you can try:
this.getMyDesiredTab().tab.setCls('myDesiredCssClass');
This idea hasn't been tested but might just work as the tabbar does have cls config and we have a way to access the individual tab.
When I launch rcp application some of the custom toolbar menus doesnot appear in my rcp application,if I change perspective then they appears.Any idea?
That's hard to say with no additional information. How do you create those toolbar items? Using some contributor class or in plugin.xml, using menu contributions? With the second option, check, that you have defined them in the proper plugin.xml (the one, which defines your perspective, in which you want to actually see them).
Ensure, that there are handlers for your commands/actions in your perspective.
If you are using associations, ensure, that those are correct:
<extension point="org.eclipse.ui.actionSetPartAssociations">
<actionSetPartAssociation targetID="YouractionSetId">
<part id="YourPartId"/>
</actionSetPartAssociation>