[jbosside-dev] Fwd: [Bug 166274] Opening external file in xml editor fails

Max Rydahl Andersen max.andersen at jboss.com
Fri Dec 1 01:23:39 EST 2006


> So I think it is simply named improperly, or misleading. It is not an  
> editor
> input for java files, but rather, an editor input for java.io.File.

ah - ok ;)

/max

> - Rob
>
> On 11/30/06, Max Rydahl Andersen <max.andersen at jboss.com> wrote:
>>
>> Hi Rob,
>>
>> how come you are using JavaFileEditorInput for an xml file ?
>>
>> just curious.
>>
>> /max
>>
>> ------- Forwarded message -------
>> From: bugzilla-daemon at eclipse.org
>> To: max.andersen at jboss.com
>> Cc:
>> Subject: [Bug 166274] Opening external file in xml editor fails
>> Date: Thu, 30 Nov 2006 18:20:23 +0100
>>
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=166274
>> Product/Component: Web Tools / wst.xml
>>
>>
>>
>>
>>
>> ------- Comment #4 from rob.stryker at jboss.com  2006-11-30 12:22 -------
>> I've switched my code to use that which the file -> open uses. Namely:
>>
>>     IWorkbench wb = PlatformUI.getWorkbench();
>>     IWorkbenchWindow win = wb.getActiveWorkbenchWindow();
>>     IWorkbenchPage page = win.getActivePage();
>>     File file = new File("C:\\some\\file.xml");
>>     IFileStore fileStore= EFS.getLocalFileSystem().fromLocalFile(file);
>>     if( fileStore != null ) {
>>             IEditorInput input = new JavaFileEditorInput(fileStore);
>>             IEditorDescriptor desc = PlatformUI.getWorkbench().
>>                getEditorRegistry().getDefaultEditor(file.getName());
>>             page.openEditor(input, desc.getId());
>>     }
>>
>> This seems to work fine. Thanks for the help though =]
>>
>>
>>
>> --
>> --
>> Max Rydahl Andersen
>> callto://max.rydahl.andersen
>>
>> Hibernate
>> max at hibernate.org
>> http://hibernate.org
>>
>> JBoss a division of Red Hat
>> max.andersen at jboss.com
>>
>> _______________________________________________
>> jbosside-dev mailing list
>> jbosside-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/jbosside-dev
>>



-- 
--
Max Rydahl Andersen
callto://max.rydahl.andersen

Hibernate
max at hibernate.org
http://hibernate.org

JBoss a division of Red Hat
max.andersen at jboss.com




More information about the jbosstools-dev mailing list