eclipse-rcp

How to perform an action after eclipse plugin is opened

☆樱花仙子☆ 提交于 2019-12-01 11:36:18
I have an eclipse plugin and I want to perform certain action inside this plugin but after eclipse application is opened. I tried to do it through overriding public void postWindowCreate() but it seems that I can't get inside this function when launching the application Any ideas ? Do you use e4? Then maybe the following link may help: http://www.eclipse.org/forums/index.php/m/886197/ Edit: OK, do you define your own application? Are the methods provided by org.eclipse.ui.application.WorkbenchWindowAdvisor the ones you need? (e.g. preWindowOpen() , preWindowShellClose() , postWindowRestore() ,

how to add tooltip on the entries and NOT on the combo in JFace ComboViewer

血红的双手。 提交于 2019-12-01 10:39:20
I am loading my ComboViewer with over one thousand elements. Some elements are longer than the width of underlying combo . I want to add tooltip on the entries and NOT on the combo . I want it in such a way that, when the list drops down and the user places the mouse pointer over one of the value, the entire text should be displayable via tooltip similar to the tooltip shown for a JFace TableViewer . If you are using a ComboViewer and you provide your own CCombo instance, you can get children of the CCombo and one of them should be a List control that it shows as a dropdown menu. You can add

Detect tab close in Eclipse editor

亡梦爱人 提交于 2019-12-01 09:44:02
I have an Eclipse RCP application with own editor. Class editor extends from org.eclipse.ui.texteditor.AbstractTextEditor and it is added in extension in plugin.xml -> org.eclipse.ui.editors . How can I detect when the user closes document? Favonius For editor close event do something like this: IWorkbenchPage page = ...; //adding a listener IPartListener2 pl = new IPartListener2() { // ... Other methods public void partClosed(IWorkbenchPartReference partRef) { //if(partRef.getId().equals(youreditor.id){ /* do something*/ } } }; page.addPartListener(pl); Have a look at these links: How to add

How to set the Caret of the IOConsole

做~自己de王妃 提交于 2019-12-01 09:32:01
I'm writing an eclipse-plugin which creating a new Console. Please see my source code: CliConsoleFactory.java import java.io.IOException; import org.eclipse.jface.text.DocumentEvent; import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.IDocumentListener; import org.eclipse.ui.IWorkbenchPage; import org.eclipse.ui.PartInitException; import org.eclipse.ui.PlatformUI; import org.eclipse.ui.console.ConsolePlugin; import org.eclipse.ui.console.IConsole; import org.eclipse.ui.console.IConsoleConstants; import org.eclipse.ui.console.IConsoleFactory; import org.eclipse.ui.console

How to perform an action after eclipse plugin is opened

情到浓时终转凉″ 提交于 2019-12-01 09:05:59
问题 I have an eclipse plugin and I want to perform certain action inside this plugin but after eclipse application is opened. I tried to do it through overriding public void postWindowCreate() but it seems that I can't get inside this function when launching the application Any ideas ? 回答1: Do you use e4? Then maybe the following link may help: http://www.eclipse.org/forums/index.php/m/886197/ Edit: OK, do you define your own application? Are the methods provided by org.eclipse.ui.application

Detect tab close in Eclipse editor

被刻印的时光 ゝ 提交于 2019-12-01 08:19:30
问题 I have an Eclipse RCP application with own editor. Class editor extends from org.eclipse.ui.texteditor.AbstractTextEditor and it is added in extension in plugin.xml -> org.eclipse.ui.editors . How can I detect when the user closes document? 回答1: For editor close event do something like this: IWorkbenchPage page = ...; //adding a listener IPartListener2 pl = new IPartListener2() { // ... Other methods public void partClosed(IWorkbenchPartReference partRef) { //if(partRef.getId().equals

How to set the Caret of the IOConsole

巧了我就是萌 提交于 2019-12-01 07:59:23
问题 I'm writing an eclipse-plugin which creating a new Console. Please see my source code: CliConsoleFactory.java import java.io.IOException; import org.eclipse.jface.text.DocumentEvent; import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.IDocumentListener; import org.eclipse.ui.IWorkbenchPage; import org.eclipse.ui.PartInitException; import org.eclipse.ui.PlatformUI; import org.eclipse.ui.console.ConsolePlugin; import org.eclipse.ui.console.IConsole; import org.eclipse.ui

Use Navigation History in Eclipse RCP

人盡茶涼 提交于 2019-12-01 06:23:29
I like to use the navigation history provided by Eclipse in my RCP Application. Unfortunately this feature isn't well documented. In fact I only found this Wiki entry: http://wiki.eclipse.org/FAQ_How_do_I_hook_my_editor_to_the_Back_and_Forward_buttons%3F It mentions that every editor can be marked in the navigation history, without having to specify a location. This is exactly what I want. Regardless of whether the specific editor has any support for navigation history, markLocation will work. If the editor doesn’t implement INavigationLocationProvider, a history entry will be added, allowing

Using the 64bit XulRunner in Eclipse SWT under Windows

一曲冷凌霜 提交于 2019-12-01 06:16:49
Is it possible to use the 64bit XulRunner for Windows ( available from here ) with the Eclipse browser widget? It works fine under 32bit Windows and the answer to this question explains how this works. But when I try this under 64bit Windows I get the following exception: org.eclipse.swt.SWTError: No more handles (java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: no swt-xulrunner-win32-3834 in java.library.path no swt-xulrunner-win32 in java.library.path Can't load library: C:\Users\...\.swt\lib\win32\x86_64\swt-xulrunner-win32- 3834.dll Can't load library: C:\Users\...\.swt

How do I toggle the menu button icon and tooltip text for an Eclipse plugin?

自作多情 提交于 2019-12-01 05:40:39
问题 I'm developing an Eclipse plugin that has a toolbar menu item that will be enabling/disabling a feature. I know how to set the icon and tooltip text for it using the plugin.xml file, but I want to be able to change the icon and especially the tooltip text for it depending on the state of the project being worked on. I.e., if the feature is not enabled, I want an icon that shows turning the feature on along with tooltip text that says "enable feature", but if the feature is enabled, I want an