japplet open second window - applet

is it possible to open a new window from a japplet? right now i'm using getAppletContext().showDocument() to open a document, but it closes my applet. anyone know how to open a second window without interfering with the applet?
Thanks.

Try using the version that takes a target as well and pass "_blank" as the target:
getAppletContext().showDocument(new URL("http://www.google.com"), "_blank");

Related

How to open a project from CLI using native tabs

Recently I found out about native tabs and I'd like to know if there is any way to open a project from the terminal using native tabs as I used to do with code . but instead of open a new window, open a new tab.
I'm using macOS just in case it will be necessary to know.
Thanks in advance
Another option is to change your tab preferences in mac os. Go to the preferences app -> general -> Prefer Tabs: "Always". This obviously will have an effect on other apps as well
I found a way to achieve it.
You have to use the next option:
-r --reuse-window
Force to open a file or folder in an already opened window.
Example:
code -r my-folder

Closing VS Code welcome screen after opening a folder/workspace

My VS Code used to automatically close the welcome screen after opening a folder or workspace. After upgrading to the latest version, it no longer closes it and the welcome screen stays open.
I'm not sure what version I was using before upgrade but I think there's a setting somewhere to control this behavior.
Does anyone know where I can change this setting so that welcome screen automatically opens when I start VS Code but auto-closes after opening a folder or workspace.
Yes. There s a way.
Open VS Code and move to the settings page.
File Menu/Preferences/Settings
And then type welcome to search option key. After that you could see select option for welcome page when IDE loads.
Now choose your favorite one.
Your choice)

Refresh windows in netbeans RCP

I am creatng an netbeans RCP Application.
But i have one problem when opening the windows.
I have dynamicly data from the database, in different tables.
When i first open the window, the data is correct, but when i open it again, then the data has duplicated.
I even tested it with an buttonaction to change an label name, and when i close and open the window, then the new name will be displayed. How can i get it to work to show only the correct data.
I have tried different methodes to repaint an panel, updateui etc. but nothing changes.
Can somebody point me in the right direction?
Thanx in advance!
can you send some pieces of code?
If you use "open action" via annotation, then only one instance of the topcomponent will be created.
IF you use new TopComponent direct, then all is on your hand.
May be, you should use swingworker or utilities.attachInitJob
Jirka

Eclipse Plugin: How to modify the extension "org.eclipse.ui.newWizards"?

I have a wizard that should be launched in different ways: from the menu (org.eclipse.ui.menus + org.eclipse.ui.actionSets) and from the New context menu. For the later I used the extension org.eclipse.ui.newWizards to add the wizard into the context menu. So far, so good...
For some reasons I had to subclass the wizard dialog (changed the finish button text in the dialog). If the wizard is launched from the menu, the action (defined in org.eclipse.ui.actionSets) creates and opens this special wizard dialog and everything is fine.
If the wizard is launched from the context menu (org.eclipse.ui.newWizards), the internal class NewWizardShortcutAction is taken that creates the "normal" wizard dialog (and not my subclass) to open the wizard.
Is there any way to modify the implementation of the extension point that only my subclassed wizard dialog is used?
By default the command uses org.eclipse.ui.internal.handlers.WizardHandler.New to launch the new wizard dialog, and that's the default handler provided to the command.
It would be possible to register a different handler at the Workbench Window level, and that would override the default handler while a Workbench Window was active. It could be done in the plugin.xml or in your application ActionBarAdvisor:
IHandlerService hs = (IHandlerService) window.getService(IHandlerService.class);
hs.activateHandler(IWorkbenchCommandConstants.FILE_NEW, new MyNewHandler());
But you would have to implement whatever support was needed in the handler to launch the wizard with the correct selection.
I'm also trying to do the same. The way I will be doing this is to register my own custom action, by removing the old action, will post back the solution if it works !
Update: I ended up using a different approach. If you see the run method in NewWizardShortcutAction, it is just calling init, creating the WizardDialog and opening it. So in my override of the init in MyWizard class, I just used my own MyWizardDialog extending from WizardDialog and opened it. Subsequently, I need to make that the run function will not re-open the WizardDialog, so I track that using a boolean in MyWizard that will disallow getting any pages so that the WizardDialog in the run method will not be displayed.
This is a hacky solution but works !

GWT open a site/html?

In GWT MenuBar/MenuItem, how do you open a page/html file in another panel. Like when you set the target in
Though this should be in Java code...
Thanks in advance
Regards
Chrsitian
I'm not sure what you mean by opening things in another panel. Do you mean in another tab or part of an HTML panel?
GWT has a Window.open() method that operates close to the javascript equivalent. By specifying the correct url, target name, and features, you can ask the browser to open something in the appropriate location.
I solved this by using the HTML Widget - and just called
HTMLWidget.setHTML(myResourceFile.getHTML());
From the MenuItem command execute()
Happy GWT'ing