Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » File Association (--launcher.openFile)
File Association (--launcher.openFile) [message #739509] Mon, 17 October 2011 14:54
raffaello  is currently offline raffaello Friend
Messages: 5
Registered: June 2011
Junior Member

I'm developing an eclipse product and i need to associate a file extension to my editor.
I followed several examples ( and but it seems that the editor ever receives the SWT OpenDocument event.

As described in the fileAssociation example i created an eventListener class to process SWT.OpenDocument events and i added this in my Application class to the display before that the PlatformUI.createAndRunWorkbench() method gets called

public Object start(IApplicationContext context) throws Exception {
Object args = context.getArguments().get(IApplicationContext.APPLICATION_ARGS);	
OpenDocumentEventProcessor eProc = new OpenDocumentEventProcessor();
Display display = PlatformUI.createDisplay();
display.addListener(SWT.OpenDocument, eProc);
		return IApplication.EXIT_OK;
int returnCode = PlatformUI.createAndRunWorkbench(display, new XVRWorkbenchAdvisor(args, eProc));

In the product file i added the following program arguments:
XVR Studio Developer

If I use the same code in a new empty RCP project it works like a charm..

I can't figured out which could be the problem..

can you help me?

Thanks a lot!!


[Updated on: Wed, 19 October 2011 09:53]

Report message to a moderator

Previous Topic:Making the e4 pojo programming model accessible from org.eclipse.ui extension points
Next Topic:common navigator framework: adding popup menu entry under New Submenu
Goto Forum:

Current Time: Tue Jun 19 14:52:39 GMT 2018

Powered by FUDForum. Page generated in 0.01931 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top