rcp

Handle the closing of the workbench window in Java RCP application

[亡魂溺海] 提交于 2019-12-05 08:04:15
I'm writing an Eclipse RCP and I want to ask the user whether to backup the database when the application is closed. Doing it from the File>Exit menu was easy as I defined a command exit: public class ExitCommand extends AbstractHandler implements IHandler { @Override public Object execute(ExecutionEvent event) throws ExecutionException { final IWorkbench workbench = PlatformUI.getWorkbench(); if (workbench == null) return null; // Ask whether the user wants to back up the information Shell shell = new Shell(workbench.getDisplay()); MessageBox messageBox = new MessageBox(shell, SWT.ICON

Eclipse 3.5 and Java 7

久未见 提交于 2019-12-05 06:01:42
Is there any way where I can increase the Java Compiler Compliance level of Eclipse 3.5 to 1.7. (i.e.) By adding a plugin/add-on. Since by default this will not support the JDK 1.7 compliance. We have a constraint in Eclipse upgrade, since it's an RCP application. Any thoughts on this will be greatly appreciated. Thank You. Old eclipse version doesn't support java 7. You will have to download at least eclipse-3.8M1 version. To conclude, there is no way to enable Java 7 Compliance in Eclipse 3.5. Have to migrate to 3.7 at least. Thanks a lot for your responses. Windows --> Preferences --> Java

Eclipse RCP app: How to disable specific extensions?

一笑奈何 提交于 2019-12-04 23:44:56
问题 I'm using Eclipse HELIOS to code a Rich Client app. The following entries are added automatically to my APP "PERSPECTIVES MENU": "Java, Java Browsing, Java Type Hierarchy, Team Synchronizing". I need to get rid of them. i'm using the extension point="org.eclipse.ui.activities" to disable unwanted extensions (like the editor and search options that appear on the coolbar) I managed to get rid of "Debug" by adding "org.eclipse.debug.ui.*" This is my actual config: <extension point="org.eclipse

Failed to write core dump. Minidumps are not enabled by default on client versions of Windows

亡梦爱人 提交于 2019-12-04 22:39:59
问题 I was working on Eclipse RCP and I got this error A fatal error has been detected by the Java Runtime Environment: EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000007fef54b88ee, pid=3192, tid=5324 JRE version: 7.0_02-b13 Java VM: Java HotSpot(TM) 64-Bit Server VM (22.0-b10 mixed mode windows-amd64 compressed oops) Problematic frame: C [jscript9.dll+0x888ee] Failed to write core dump. Minidumps are not enabled by default on client versions of Windows An error report file with more

Project specific preference page in Eclipse RCP application

大城市里の小女人 提交于 2019-12-04 17:39:01
I want to enable project-based Preference-dialogs for our product. I stumble upon 2 different problems: How do I store those project related informations. As an educated guess I would try this one: IPreferenceStore store = new ScopedPreferenceStore(new ProjectScope(project.getIProject()), Activator.PLUGIN_ID) ; Afterwards set the "project store" as I want (for example inside a preference page as store) How do I enable a Preference Page only for a project? I know I can call a preference dialog with some preselected pages using the PreferenceUtils.createPreferenceDialogOn(…) . Unfortunately the

Rich client platforms versus JavaFX 2 versus Swing

混江龙づ霸主 提交于 2019-12-04 17:03:46
问题 Pretty soon now, we're gonna need to develop a GUI for creating configurations (more like scripts, to be honest) for our EAI solution at work. Think of a typical workflow editor. The visualization of the actual flows will most likely be a completely custom job, either in Swing, SWT or JavaFX 2. What I have trouble with choosing is whether to do everything else by ourselves or using a rich client platform. In particular, I've noticed that JavaFX 2 is getting a lot of attention and seems to be

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

Print using SWT Browser Widget

帅比萌擦擦* 提交于 2019-12-04 15:22:25
I want to print the contents of a SWT Browser Widget. but it prints the only the visible part of the browser not the full content of it. Please help. I've modified the SWT Browser snippet to selected code, and it work for me like a charm.. import org.eclipse.swt.*; import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; import org.eclipse.swt.browser.*; public class BrowserPrintTest { public static void main(String [] args) { Display display = new Display(); final Shell shell = new Shell(display); GridLayout gridLayout = new GridLayout(); gridLayout.numColumns = 3; shell.setLayout

Eclipse RCP: Making use of configuration directory

浪子不回头ぞ 提交于 2019-12-04 04:34:30
My Eclipse RCP application requires a configuration file that contains some information to connect to a remote database. Where is the best location to store this configuration file? Can I use the default configuration directory (where 'config.ini' is usually stored) for this purpose? If so, how can I get a File instance to this location programmatically? I also note that this directory does not exist in my Eclipse IDE. Thanks. You have, as always, a number of options, depending on your requirements. use the Runtime Preferences to store in a PreferenceStore with a suitable PreferenceInitializer