eclipse-rcp

How to Add Text and Image Both in a SWT LABEL

a 夏天 提交于 2019-12-19 06:46:26
问题 Is there any way to add Text and Image in SWT label in a single line. Once I add image, text goes off. 回答1: No you can't have an image and text simultaneously in a Label (unless you custom draw it). Else use org.eclipse.swt.custom.CLabel : Code: import org.eclipse.swt.SWT; import org.eclipse.swt.custom.CLabel; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; public class LabelTest {

Eclipse RCP let two views communicate

别说谁变了你拦得住时间么 提交于 2019-12-19 04:20:47
问题 I am currently building a RCP application based on Eclipse. In one of my plugins I am adding two views via code: layout.addView("dev.asd.tableviewer.tree", IPageLayout.LEFT, 0.25f, IPageLayout.ID_EDITOR_AREA); layout.addView("dev.asd.tableviewer.view", IPageLayout.RIGHT, 0.75f, IPageLayout.ID_EDITOR_AREA); The first view contains a treeviewer, the second one a tableviewer. Now I want to update the tableviewer's content according to the selection of the treeviewer. My question is, how can I

Eclipse: create preference page programmatically

喜你入骨 提交于 2019-12-19 03:56:45
问题 I'm trying to create a preference page programmatically, I need to work with preference pages without define preferencePage extension point in plugin.xml I'm very close to solution, I'm able to load page and save the value the first time application loads, the core of my code is PreferenceManager pmngr= PlatformUI.getWorkbench().getPreferenceManager(); //this come from other plugins that implements my personal IPreferences PreferencePageRCP page =new PreferencePageRCP((IPreferences) element

Plugin product VS Feature product

≡放荡痞女 提交于 2019-12-19 03:22:59
问题 In the context of an RCP application I am wondering if I should base my product on plugins or on features. The main difference I can see for now is about the content of the exported application. Using plugins as product base result in an exported (with GUi or headless build, it's the same) with ALL the required plugins (computed I guess through plugins manifest). On the opposite, when using feature as bases the exported product only contain the listed features in the product file. Thus I have

Eclipse v4.5 without delta-pack: How to perform a multiplatform headless PDE build?

我怕爱的太早我们不能终老 提交于 2019-12-19 02:56:07
问题 Now that eclipse 4.5 is out and the eclipse team decided to not build the so-called "delta-pack" anymore, I don'tknow how to perform a PDE headless build with ant.. Official PDE build documentation here http://help.eclipse.org/mars/index.jsp?nav=%2F4_2_0 states that variable "baseLocation" should point to "the location of an eclipse install containing all the pre-built features and plug-ins that your product requires in features/ and plugins/ subdirectories" With v4.4, it was easy, this

Eclipse RCP - ILazyTreeContentProvider implementation is unexpectedly eager

前提是你 提交于 2019-12-18 16:52:40
问题 I am developing an Eclipse RCP application, and am trying to use a ILazyTreeContentProvider implementation in order to show only the visible items at a certain time. The code: Inside the class extending ViewPart: public void createPartControl(Composite parent) { viewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.VIRTUAL); drillDownAdapter = new DrillDownAdapter(viewer); viewer.setContentProvider(new ViewContentProvider()); viewer.setLabelProvider(new

How do I stop an Eclipse Editor from closing in an RCP

心已入冬 提交于 2019-12-18 13:36:54
问题 I am working on an Eclipse based RCP. We have a need to prevent one of the opened editors from being closed by the user. The desired behavior is: the user clicks the X in the editor window or "CTRL+W" a dialog pops up saying: "If you close this editor, your activity will stop. Do you want to?" if they click yes, it closes, if no, it stays open. Oh yeah, and is this even possible? Thanks, gk 回答1: You could use a org.eclipse.ui.ISaveablePart2, more specifically the method promptToSaveOnClose()

How to Inject EPartService

微笑、不失礼 提交于 2019-12-18 13:35:46
问题 I am developing e4 application. I want to inject EPartService outside the Part and Handler when i am injecting EPartService then i will get null pointer error public class DisplayRuntimePart { @Inject EPartService partService; private void displayPart(){ MPart part=partService.findPart("com.rcpe4.myproject.part.datapart"); mpart.setVisible(true); partService.showPart(mpart, PartState.CREATE); } } I am also read this question but till not solve my problem E4 EPartService findPart() throwing

Tycho and Eclipse: How to resolve OSGI dependencies to my own bundles at development time within Eclipse, without opening all of them in the IDE

巧了我就是萌 提交于 2019-12-18 10:56:18
问题 Background My Eclipse RCP application is built using Tycho. It consists of multiple components (in the form of OSGi bundles/Eclipse plug-ins). One of these component contains the product file and materializes the product. There is a reactor POM at the application root, which builds all components in order, but I also want to build other components independently (using mvn deploy ) . Building such a single component works as follows: Retrieve the latest versions of all the component's

Delete rows from Nattable

偶尔善良 提交于 2019-12-18 09:23:25
问题 I want to implement a row deletion logic in a Nebula Nattable. This is what I plan to do: Add context menu to the Nattable which is described in http://blog.vogella.com/2015/02/03/nattable-context-menus-with-eclipse-menus/ Add an SWT Action to the menu which will implement the delete my question is, which is the best way to accomplish this: Should I delete the corresponding value from my data model and the table view is refreshed when I execute this.natview.refresh(); ? OR Should I get the