eclipse-rcp

Add plugins with auto start to eclipse RCP application

旧街凉风 提交于 2019-12-04 17:22:20
I have an Eclipse RCP application, and I am trying with no luck to install a plugin I have created that should be deployed separately to the aforementioned application. To do so, I start the application as ./App -console , and when it has stopped loading, I type: install file://URLTOjAR/plugin.jar It returns me a plugin ID (lets say 288 ), so I type afterwards: start 288 After this, the plugin is working fine, but when I restart the application, by using ss I only can see that the plugin is only "Resolved", but I'd like it to be started. Is there a way to automate this? The installed and

Problem with Validating the Integer Value in Java

非 Y 不嫁゛ 提交于 2019-12-04 17:16:11
hi i am using Eclipse Rcp and i need to validate the textbox that only accept the integer value for that i have use the code txtCapacity.addKeyListener(new KeyAdapter() { public void keyPressed(KeyEvent EVT) { if((EVT.character>='0' && EVT.character<='9')){ txtCapacity.setEditable(true); txtCapacity.setEditable(true); } else { txtCapacity.setEditable(false); System.out.println("enter only the numeric number"); } } }); It validates But the Problem with this one is that i cannot use the Backspace key for deleteting the number. and please tell me idea for Validating the decimal too. thanks in

(Eclipse RCP) How to redirect the output to Console View?

狂风中的少年 提交于 2019-12-04 17:15:21
I have two viewers, one has a Text for user's input and the other viewer is the Eclipse's built_in Console View. And I will run an java program according user's input, and want to display the log information in the ConsoleView. Does anybody know How can I redirect the output to Console View ? Thanks VonC SO questions How to write a hyperlink to an eclipse console from a plugin and writing to the eclipse console give example of redirection to the Console. The blog post Displaying the console in your RCP application The ideas remain to create an OuputStream and open a New Console , or

How do I get the workbench window to open a modal dialog in an Eclipse based project?

爱⌒轻易说出口 提交于 2019-12-04 16:55:01
问题 In order to open a modal dialog, you need to pass a parent window, and pass the necessary flags for the dialog to be modal of course. Depending on where you are in the eclipse infrastructure, finding this parent window is not always easy. How can the parent window be accessed? 回答1: The piece of code from the previous answer will work. However, keep in mind you can only open your dialog from the UI thread. If you are opening the dialog from a different thread, e.g. a background process, you

Eclipse RCP application custom toolbar

戏子无情 提交于 2019-12-04 16:43:33
I am creating a custom toolbar for my RCP application. As shown in figure I want to have a drop down box with three other text boxes. These are basically the input box and are interdependent. Right now each of these boxes are in separate classes. I want to bring them together in one class so it is easier to create listeners for each other. protected void fillCoolBar(ICoolBarManager coolBar) { IToolBarManager toolbar = new ToolBarManager(coolBar.getStyle()); coolBar.add(toolbar); Toolbar extraToolBar = new Toolbar("Toolbar"); toolbar.add(extraToolBar); toolbar.add(new Separator()); toolbar.add

SWT/JFace or Eclipse RCP?

不羁岁月 提交于 2019-12-04 15:55:46
问题 Which are the reasons to choose the Eclipse Rich Client Platform as the base of my application, instead of just using SWT/JFace? 回答1: Eclipse RCP is not just a GUI (SWT/JFace), but an OSGi -based platform. So, you would choose the RCP framework in order to: have a better definition of your different modules manage their lifecycles, and versions compatibility isolate classloader issues. If your application is just one monolithic GUI font-end, RCP might be a bit overkill. 回答2: In additions to

Background color of widgets in JFace PopupDialog

巧了我就是萌 提交于 2019-12-04 15:53:17
I want to use the JFace PopupDialog as lightweight dialog for user input. But I have some problems with the background color of text widgets. As you can see below in 1 , a SWT.MULTI text widget has no background and border, a SWT.SINGLE text widget has no background. I tried to override the background color with: Text comment = new Text(composite, SWT.MULTI|SWT.BORDER); comment.setFocus(); comment.setBackground(new Color(Display.getDefault(), new RGB(000, 000, 000))); // method of PopupDialog applyBackgroundColor(new Color(Display.getDefault(), new RGB(000, 000, 000)), comment); Does anybody

How to programatically close a view in eclipse application?

一曲冷凌霜 提交于 2019-12-04 15:45:45
I want to programatically close a view in eclipse application. The view is a introPart with id: myProduct.intro I tried: IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); page.hideView(page.findView("myProduct.intro")); But it did not work, any other way to do this or what am i doing wrong? Try: IIntroPart introPart = PlatformUI.getWorkbench().getIntroManager().getIntro(); PlatformUI.getWorkbench().getIntroManager().closeIntro(introPart); You can also use more generic way : //Get current page IWorkbenchPage wp=PlatformUI.getWorkbench()

Eclipse RCP: org.eclipse.ui.views.showView Parameters

*爱你&永不变心* 提交于 2019-12-04 14:52:53
I want to show a specific view in my RCP application using a command. Using showView opens a dialog to select view. Is there any way to do without selection dialog? I tried parameters but didn't help. Related part of plugin.xml is below. com.dbtek.hyperbola.views.contactsView is my view ID Tonny Madsen You need to add a command parameter with the id of the view to show. E.g. <extension point="org.eclipse.ui.menus"> <menuContribution locationURI="menu:org.eclipse.ui.main.menu"> <menu id="window" label="Window"> <command commandId="org.eclipse.ui.views.showView" label="Show Progress" style="push

Eclipse RCP - add a Listener right after a View has been created

好久不见. 提交于 2019-12-04 14:22:20
Greetings fellow Stackoverflowians, I am developing an Eclipse RCP application, and must add a SelectionListener to the Project Explorer view the moment after it's created. I've realized that I cannot do this in the Activator of my contributing plug-in, whereas in order to get the SelectionService via PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService() I must have an active workbench window (which is null when the Activator start() is called) So my question: When can I get the SelectionService so that the Project Explorer view has been created and is visible, but the