I need to add dynamic content inside about menu in eclipse application.
Any idea about the About menu plugin??
In the Branding tab inside product file i am adding static content in the About dialog. Now i need to add some dynamic content that will be decided in the run time of the application.
Is there any method to override to get the dynamic content inside the About menu???
Please can anyone help me.
The about dialog org.eclipse.ui.internal.dialogs.AboutDialog does not support any dynamic context.
The main text comes from the aboutText property defined in the org.eclipse.core.runtime.products product definition.
The images come from the installed bundle groups.
The data on the branding / feature dialog just comes from the feature and branding plugin and is also not dynamic.
Related
I'm using "Netbeans platform 8.1" to develop a rich client application.
It has default menus and actions inside it. I want to hide "Menu/Tools/Plugins" and open the Plugin Window programmatically from my code.
My question is: if I hide the menu from "layer.xml" and change its name to "Plugin_hidden", how can I open that window programmatically?
Use the following code.
Action action = FileUtil.getConfigObject("Actions/System/org-netbeans-modules-autoupdate-ui-actions-PluginManagerAction.instance", Action.class);
action.actionPerformed(new ActionEvent(this, ActionEvent.ACTION_PERFORMED, ""));
I determined the path for the action by expanding Important Files/XML Layer/<this layer in context>/Menu Bar/Tools under my project in the Projects window and double clicking on Plugins. This will open a generated layer XML that contains the Plugin manager action. From there you can figure out what the action path is.
If you don't have an XML Layer in important files, you can add an empty one using the New File wizard. Just select Module Development/XML Layer. An XML layer isn't required for the above code to work; it just makes it possible to browse the available actions so that you can determine the path for the action.
For more information see DevFaqInvokeActionProgrammatically
I've been trying develop my custom plugin for Eclipse, and basically I want to make is a "richer" version on the current TextHover. I don't know what widget(?) Eclipse uses to display the hovering text, but I want to use something different, like SWT Image or SWT Browser.
Most of the tutorials that I've read suggest that I have to implement my own Java Editor to do this, but I don't want the user to switch to my custom editor just for a simple feature (and I don't want to implement a whole editor).
Some Tests:
I've already created two Eclipse Plugin Projects. The first one is a extension for the JavaEditorTextHovers, and with this project I managed to show some custom Strings when hovering some random texts, but wasn't able to change the hover appearance. The second project was a editor plugin. With this last one I managed to get a Browser to appear when hovering a random text(this tutorial helped me), but again, this editor had nothing, no syntax coloring, no rules, etc., and for the previous reasons, I couldn't accept this has a solution.
Maybe if there was way to change the (or set a new) SourceViewerConfiguration of the current editor I could pass my custom SourceViewerConfiguration, but I'm not sure if this is possible.
I am trying to create a view in eclipse. I want my view to contain a Textfield and a button. the action is triggered by clicking on the button and some processing will be done on the inserted query in the textfield. can anyone suggest me a link to a tutorial or example doing that?
Thanks
You can create two quick samples that together show you what you've asked for. You do that by using the new project wizard to create a plugin project. One of the last wizard pages has a list of templates to choose from. If you create a plugin using the "with a view" template, you'll see how to create a view. Go back and create a second plugin with the "multi-page editor" template and you'll see examples of buttons, their event handlers and text fields. It should be easy to see how to code up the buttons and texts in the view.
I have a question in regards to a Java GUI I'm creating at the moment, it's an application that runs offsite backups.
When the application initially loads you are presented with this screen:
After loading the configuration file it fills out each field in the tabs below; at this stage it is staying on the "Run" tab after I load the configuration file, but I'd like it (after filling out each field) to bring the "Configuration" tab to the screen.
How do I go about doing this? In the method I've written to load config after the JFileChooser window is closed, I'd imagine I'll need to add something to tell it to select the Configuration tab.
I can provide the classes if necessary.
Exposing the component, then using the method:
CTabFolder#setSelection(int);
worked fine.
Thanks #MadProgrammer and #Vulcan
I'm writing a plugin to eclipse and as part of my scenario, I'm generating a html file. After the file had been generated, a web browser is been opened within eclipse, hosted by an editor.
What I'd like to do is to extend this web browser context menu (when I'm right clicking on it, I'd like to add another functionality which is called "copy URL", which will copy the URL of the web page.
Could you please assist in how this can be achieved?
I must point out and say that this is not an eclipse editor, which can be extended by adding an extension.
This web page that is been opened is a web page and not an eclipse editor. it's just been hosted by it by the following:
IWebBrowser browser = support.createBrowser(IWorkbenchBrowserSupport.AS_EDITOR, null, "RDLEditor", "tooltip");
Please assist.
Thank you,
Ido
I have tried to do this in the past and the issue is the embedded browser is not part of the eclipse framework and there are no extensions or API's available on the SWT browser object to extend the context menu. The next best thing I can think of is to create your own eclipse view that embeds a SWT browser object and then create an action in the view tool bar that will get a reference to the browser object in the Action class and copy the current URL to the clip board like you are trying to do. - Duncan Krebs
I was able to add a button to the WebBrowserView toolbar, if that is what you are looking to do. I declared an extension of WebBrowserView and then did the following.
public void createPartControl(Composite parent) {
super.createPartControl(parent);
browserViewer = this.viewer;
Composite toolbarComp = (Composite) browserViewer.getChildren()[0];
browserToolBar = (ToolBar) toolbarComp.getChildren()[0];
// add new ToolItems to that