eclipse-rcp

How to enable autoscroll for a StyledText Component

こ雲淡風輕ζ 提交于 2019-12-11 13:16:49
问题 I'm using StyledText component which behaves somewhat similar to the popular eclipse IDE console view, (which appends the log), but here, in my StyledText component the scroll-lock is enabled. I mean for each line appended to the StyledText , the vertical scroll bar position remains constant. Below image reflects the behavior: As an attempt I tried like this: StyledText declaration StyledText styledText = new StyledText(parent, SWT.V_SCROLL); //other relevant code here styledText.addListener

Eclipse RCP Can't Contribute to Main Toolbar

那年仲夏 提交于 2019-12-11 12:42:48
问题 My RCP app has the coolbar visible by setting configurer.setShowCoolBar(true) in WorkbenchWindowAdvisor#preWindowOpen . But when I contribute a toolbar to the main toolbar, it never shows up. Here's my contribution code: <extension point="org.eclipse.ui.menus"> <menuContribution allPopups="true" locationURI="toolbar:org.eclipse.ui.main.toolbar"> <toolbar id="toolbar.perspectivesDynamic"> <dynamic class="my.package.PerspectiveSwitcherToolbar" id="perspectiveSwitcherToolbar"> </dynamic> <

How to read opened file and display content in Eclipse Master Details block?

為{幸葍}努か 提交于 2019-12-11 11:32:27
问题 I have generated a sample Multi-page Editor through the Eclipse wizard. Then, I have modified the sample plugin in order to have two pages: Text Editor Master Details Block For the Master Details Block, I have used this tutorial. I can open the Master Details Block page and I am also able to view the initialized objects in the list and display the corresponding details page. Now, I want to replace the static object with entries from the loaded file. My problem is, that I don't know how I can

java thread: Thread.interrupt() not working

ぐ巨炮叔叔 提交于 2019-12-11 11:12:44
问题 I need to kill a thread that is not created in my code. In other words, the thread object is created by api (Eclipse JFace). Here is my code ProgressMonitorDialog dialog = new ProgressMonitorDialog(null); try { IRunnableWithProgress rp = new IRunnableWithProgress(){ @Override public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { Thread.sleep(3000); Thread t = Thread.currentThread(); t.getThreadGroup().list(); t.interrupt(); } }; dialog.run(true,

Open Editor at Start in an EclipseRCP application

我只是一个虾纸丫 提交于 2019-12-11 10:51:32
问题 I'm currently programming on an eclipse RCP application in Java for an university project. My problem is that I want an editor loaded at application start, but I don't know which method is the right one to start with. In the perspective I can only add views and set my editor space, but I can't set any editors. I tried overwrite the WorkbenchWindowAdvisor.postWindowOpen() method, but this only got me an exception... 回答1: You say you got an exception.. what was it? How did you overwrite

SWT Table and Hyperlink widget integration

天大地大妈咪最大 提交于 2019-12-11 10:39:38
问题 I fight with SWT Table and Hyperlink for too long time. I've read all of the topics on stackoverflow and JFace Snippets and Eclipse SWT Snippets and I couldn't find an answer to my problem. I try to create SWT Table with column that contains "DELETE" hyperlink in every row. My problem is that I can't make it look ok. Maybe I will put my code first: import java.util.ArrayList; import java.util.List; import org.eclipse.jface.layout.TableColumnLayout; import org.eclipse.jface.viewers

Eclipse RCP - Wrong plugin version gets exported

心不动则不痛 提交于 2019-12-11 10:36:37
问题 I have a eclipse 4 application project with a plug-in based product configuration. All necessary plugins are added into the dependencies tab on the .product file & generating a run configuration out of this .product file works flawless. But when exporting the .product as eclipse product, it's not working - the cause it probably, that the wrong versions from a few plugins are exported. The error log contains messages like this: org.osgi.framework.BundleException: Could not resolve module: org

Passing parameters while showing a view in Eclipse RCP

依然范特西╮ 提交于 2019-12-11 10:29:29
问题 I am creating eclipse RCP application and I am stuck with passing parameter while showing a view. As the first approach, I tried setting a static variable in View2 from View1 and opened that view (as below). It works. IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); String viewIdToClose = studentListView.ID; IViewPart viewToClose = activePage.findView(viewIdToClose); TableItem item = studentTable.getItem(studentTable.getSelectionIndex());

Eclipse RCP 3.x draggable Toolbar

天大地大妈咪最大 提交于 2019-12-11 10:23:56
问题 In addition to my previous question, since there are some issues with Drag and Drop on E4: The DND addon is found in the org.eclipse.e4.ui.workbench.addons.swt plugin . However it requires the compatibility layer and is not available for native E4AP applications. Question Is it possible to create an old-style Eclipse 3.x application, that runs on the current Eclipse 4.5.1 platform and uses the nice toolbar from the Eclipse IDE with Drag and Drop functionality? Starting with a fresh

What's a good way to move an Eclipse Plug-in from one Feature to another?

允我心安 提交于 2019-12-11 09:34:14
问题 Lets assume we have an update site with 2 Eclipse features (each has it's own plug-in): Main Feature Optional Feature (depends on the main one) In the new version, I want to fold the plug-ins of the Optional Feature into the Main Feature. I don't want to show the Optional Feature any more. If I do the move just like I said, this is fine for new installs, but for updates it is problematic because the old feature that depends on an exact version of it's plug-in will stick around and cause a