I'd like to dynamically change the text of a Command depending on some state, so normally I went to Google and LWUIT blogs said that using refreshTheme() on MenuBar should do the trick.
So I used the following code, but it sadly didn't work
if (isPlaying) {
playButton.setCommandName("Pause");
}else{
playButton.setCommandName("Play");
}
this.getMenuBar().refreshTheme();
Is there something wrong with my code? Or did I misunderstand something?
It won't refresh. The text of the button is set when the command is placed so you can't do that.
You will need to use removeCommand(cmd) followed by addCommand(newCmd).
Furthermore, refreshTheme() has absolutely nothing to do with anything.
Related
I'm curious about the vscode function,
is it possible to add custom command shortcut by any idea including extensions and so on?
For example, I want to put these codes with simple keyboard action like 'Ctrl+Shift+1'.
if (canvas.getContext){
let ctx = canvas.getContext("2d");
//console.log("canvas supported!");
}
else {
//console.log("canvas unsupported.");
}
and when I put 'Ctrl+Shift+1', the code that I saved past appears and able to use it.
If you know the answer, please spare your time.
Thanks a lot in advance.
Anyone have an idea of how I can remove the white back arrow that is rendered in the top left of the screen by default. Google is not turning anything up and the only thing I can find in the newest unitypackage is a call to DrawBackButton() in GvrPostRender under the legacy stuff.
Thanks!
I don't think this is possible right now. I have tried to do this, and while searching in sdk i found this in GvrPostRender:
if (vrMode) {
DrawVRBackButton();
}
but then I checke this function and it looks like this:
private void DrawVRBackButton() {
}
I aleso tried to simply remove this function from if(vrMode), but this didn't work as well, so I guess we have to use it until they make it possible to turn off.
I am using GWT in my projects, when I use the open.window the window opens in the back not in the front. I can find nothing to fix this. I've tried something called the z-index, but there is next to no documentation about this. And it didn't work.
Set focus on a new window. Probably via some kind of JSNI method which will contain something like this $wnd.focus().
I have an eclipse plugin and I would like to programmatically disable help content TOC's based on a variable I define. In a nut shell, I want to prevent some help docs from showing up in the help contents if a specific type of user is accessing the plugin.
Preferably I would like to do this in the ApplicationWorkbenchAdvisor somewhere.
One thought would be to modify the "primary" value to be false if the variable were set.
Not sure if it would work, but try using the org.eclipse.ui.activities extension point. The tutorial from Vogella tells it is possible to hide only UI elements like wizards, views and so on, but it is from 2009.. Not sure if hiding TOC is now possible. If you try it out, would be nice to give a feedback ;)
I'm doing a plugin in Eclipse IDE in order to do a refactoring. I'm using LTK, the point is: I don't know how I can disabled the back button after the preview. I've tried to create the RefactoringWizard using some flags like 'NO_BACK_BUTTON_ON_STATUS_DIALOG', but I think it is not the rigth way to do it.
The poblem I have in the background is that when I push preview and then push back, and preview again, the preview box shows the change related with the refactoring twice!.
I think the best solution is disabling the back button after the preview because this is the solution I have seen in others plugins.
Sorry because of my English and thanks beforehand.
The method org.eclipse.jface.wizard.WizardDialog#updateButtons disables the back button when currentPage.getPreviousPage() returns null. So, I suggest you to override the method org.eclipse.ltk.ui.refactoring.RefactoringWizard#getPreviousPage to return null.