jface

Eclipse RCP - ILazyTreeContentProvider implementation is unexpectedly eager

社会主义新天地 提交于 2019-11-30 14:11:37
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 ViewLabelProvider()); //viewer.setSorter(new NameSorter()); viewer.setInput(getViewSite()); // Create the help context

how to dynamically add swt widgets to a composite?

≡放荡痞女 提交于 2019-11-30 12:56:36
问题 I'm trying to add widgets like text boxes, buttons to a composite on click of a button. I've tried , but i could only add these widgets dynamically only up to the size of the composite. My jface dialog is such that, it has a scrolled composite in which it holds a composite. In the main composite i have 3 other composites where i have to achieve this functionality, so if i add dynamic widgets to a composite it might expand, but it should not overlap existing composites down to it, rather it

Eclipse: OSGI Preferences vs. PreferenceStore

扶醉桌前 提交于 2019-11-30 12:47:51
I'm working on an Eclipse plugin (or in fact, a plugin for an Eclipse-based application) which needs some configuration to be entered by the user. From looking at the documentation, there seem to be two preference APIs - one in org.eclipse.core.runtime.preferences , extending/implementing the OSGI prefererence API , another one, JFace specific, in org.eclipse.jface.preference . Then we have org.eclipse.ui.preferences , too. The OSGI API has a hierarchic Node tree - a preference node ( Preferences or IEclipsePreferences ) can have multiple subnodes, which themselves can contain both individual

hotkey/shortcut for: “Which plugin is this?”

别等时光非礼了梦想. 提交于 2019-11-30 08:51:16
Please forgive such a simple question, I've been away from RCP for about a year: What shortcut/hot-key combination can I use in Eclipse to discover the plugin that contributed/owns the current view? I remember it bringing up the plugin.xml of the plugin currently under the mouse. I should be very grateful for your clues .. M. Andrew Niefer The Plug-in Spy is mapped to Shift+Alt+F1 ( Shift+Option+F1 on Mac) by default. It shows information for whatever is currently selected. Mark Storer Best keyboard shortcut ever: Ctrl + Shift + L : it displays all current keyboard shortcuts. 来源: https:/

How to use log4j in an Eclipse RCP?

半世苍凉 提交于 2019-11-30 08:36:49
问题 How to use log4j logging API in an Eclipse RCP project? As a workaround U tried to create a new OSGI Bundle which has a log4j jars, below is the bundle structure: I've crated a basic RCP application with a view (template) named loggingtest .I've included the bundle log4j in the dependencies tab of loggingtest project.In the Activator start method i placed the following code Logger logger = Logger.getLogger(Activator.class); logger.info("Info starting"); logger.warn("Warning starting"); logger

SWT table: auto resize all columns

好久不见. 提交于 2019-11-30 01:28:39
问题 Qt solution is a single call to resizeColumnsToContent() , in .NET one can use TextRenderer.MeasureText() , JTable could use AUTO_RESIZE_ALL_COLUMNS . In SWT, is there a way to programmaticaly resize columns after populating them? Calling computeSize(SWT.DEFAULT, SWT.DEFAULT) returns the same value thus disregarding character left overs in columns. TableColumn has setWidth() , but how do I obtain the size hint for the current content taking into account font face, etc? 回答1: In many cases, the

Make JFace Window blink in taskbar or get users attention?

ぃ、小莉子 提交于 2019-11-29 19:08:31
问题 I wonder someone has any idea how to solve this: In my Java Eclipse plugin there are some processes which take some time. Therefore the user might minimize the window and let the process run in the background . Now, when the process is finished , I can force the window to come to the top again, but that is a no-no in usability. I'd rather want the process to blink in the taskbar instead. Is there any way to achieve this? I had a look at the org.eclipse.jface.window but could'nt find anything

How to remove views from Windows-->Show View list?

女生的网名这么多〃 提交于 2019-11-29 18:00:24
I have view which I am setting permanently on my perspective. This view can not be closed and can not be opened from Windows --> show views I struct to remove View from Windows --> view list. How would I achieve this? I tried your solution it is doing the things but it is also removing the view from perspective. Below are the steps I followed.. I have added the following view in plugin.XML <view allowMultiple="false" category="org.view.ui.IDECategory" class="org.view.ui.BannerInformationView" id="org.view.ui.BannerInformationView" name="BannerInfo" restorable="true"> </view> After this I have

How to stop JFace combo box from re sizing on a window re size?

陌路散爱 提交于 2019-11-29 17:52:12
I have a Java Eclipse RCP program in which I have a a long string inside a JFace combobox. Now when I am in the same view,The combobox attaches a scroll over it to show the full name. but as soon as I re size the window of the application, the combobox stretches itself to accommodate the lengthy string. How do i make the combobox stay the same size. Like the size of it should remain fixed even after I resize the window. Here are two screen shots to demonstrate the issue. P.S. I am using a comboViewer and inside it a comboBox. Thanks in advance. If you are using GridLayout and GridData as your

How to install source/javadoc for Eclipse PDE?

风流意气都作罢 提交于 2019-11-29 14:02:34
I have installed Plugin Development Environment on my Eclipse 3.8 via http://download.eclipse.org/releases/juno update site. Now in PDE projects under the "Plugin Dependencies" tree I see that all PDE JARs have attached source set to the same JARs. Yet, the JARs do not contain any sources - only class files. Because of this I see no Javadoc for PDE/JFace classes and get ugly arg0, arg1, etc for auto-generated code. Where and how can I get sources or Javadoc for PDE/JFace? First, I tried to reproduce your problem. downloaded Eclipse Platform Runtime Binary from the location you provided