Force WSDL Editor on .wsdl entensions [message #187485] |
Fri, 02 February 2007 00:54  |
Eclipse User |
|
|
|
Originally posted by: hcurtis.xaware.com
When are plug-in programmatically opens a .wsdl file it opens up in the WTP
XML editor. This can be manually changed by setting the WSDL editor as the
default editor in the file associations preferences window. However, I
would like to make this a default configuration for our installed Eclipse
application.
Can this be done in our plugin.xml?
Can it be forced programmatically when a new workspace is created?
Any suggestions would be appreciated.
--
Bud Curtis
XAware, Inc.
719-884-5443
|
|
|
Re: Force WSDL Editor on .wsdl entensions [message #187518 is a reply to message #187485] |
Fri, 02 February 2007 17:08   |
Eclipse User |
|
|
|
WSDL files are opened with the WSDL editor in the standard WTP.
You have probably changed something. You can see the definition of the
WSDL content type in the org.eclipse.wst.wsdl/plugin.xml file. The
association of the WSDL content type to the WSDL editor is defined in
the org.eclipse.wst.wsdl.ui/plugin.xml file.
Snjeza
Bud Curtis wrote:
> When are plug-in programmatically opens a .wsdl file it opens up in the WTP
> XML editor. This can be manually changed by setting the WSDL editor as the
> default editor in the file associations preferences window. However, I
> would like to make this a default configuration for our installed Eclipse
> application.
>
> Can this be done in our plugin.xml?
>
> Can it be forced programmatically when a new workspace is created?
>
> Any suggestions would be appreciated.
>
>
|
|
|
Re: Force WSDL Editor on .wsdl entensions [message #187526 is a reply to message #187518] |
Fri, 02 February 2007 17:26  |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
This is a multi-part message in MIME format.
--------------060307070300030701040907
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Snjeza,
Not necessarily. In EMF we open editors like this:
page.openEditor
(new FileEditorInput(modelFile),
workbench.getEditorRegistry().getDefaultEditor(modelFile.get FullPath().toString()).getId());
but if the editor is no longer registered against an extension, then
we'd have to call this version:
/**
* Returns the default editor for a given file name and with the
given content type.
* <p>
* The default editor is determined by taking the file extension
for the
* file and obtaining the default editor for that extension.
* </p>
*
* @param fileName the file name in the system
* @param contentType the content type or <code>null</code> for
the unknown content type
* @return the descriptor of the default editor, or
<code>null</code> if not
* found
* @since 3.1
*/
public IEditorDescriptor getDefaultEditor(String fileName,
IContentType contentType);
So changing from extension based registration to content type based
registration can affect existing clients.
I suppose a guy could always hard code the editor ID, assuming that will
never change, but then you would not pick up whatever editor is
available in the environment...
Snjezana Peco wrote:
> WSDL files are opened with the WSDL editor in the standard WTP.
> You have probably changed something. You can see the definition of
> the WSDL content type in the org.eclipse.wst.wsdl/plugin.xml file. The
> association of the WSDL content type to the WSDL editor is defined in
> the org.eclipse.wst.wsdl.ui/plugin.xml file.
>
> Snjeza
>
> Bud Curtis wrote:
>> When are plug-in programmatically opens a .wsdl file it opens up in
>> the WTP XML editor. This can be manually changed by setting the WSDL
>> editor as the default editor in the file associations preferences
>> window. However, I would like to make this a default configuration
>> for our installed Eclipse application.
>>
>> Can this be done in our plugin.xml?
>>
>> Can it be forced programmatically when a new workspace is created?
>>
>> Any suggestions would be appreciated.
>>
>>
--------------060307070300030701040907
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Snjeza,<br>
<br>
Not necessarily. In EMF we open editors like this:<br>
<br>
page.openEditor<br>
(new FileEditorInput(modelFile),<br>
workbench.getEditorRegistry().getDefaultEditor(modelFile.get FullPath().toString()).getId()); <br>
<br>
but if the editor is no longer registered against an extension, then
we'd have to call this version:<br>
<blockquote><small> /**<br>
* Returns the default editor for a given file name and with the
given content type. <br>
* <p><br>
* The default editor is determined by taking the file extension
for the<br>
* file and obtaining the default editor for that extension.<br>
* </p><br>
*<br>
* @param fileName the file name in the system<br>
* @param contentType the content type or
<code>null</code> for the unknown content type<br>
* @return the descriptor of the default editor, or
<code>null</code> if not<br>
* found<br>
* @since 3.1<br>
*/<br>
public IEditorDescriptor getDefaultEditor(String fileName,
IContentType contentType);</small><br>
</blockquote>
So changing from extension based registration to content type based
registration can affect existing clients.<br>
<br>
I suppose a guy could always hard code the editor ID, assuming that
will never change, but then you would not pick up whatever editor is
available in the environment...<br>
<br>
<br>
Snjezana Peco wrote:
<blockquote cite="midepvr5g$m1e$1@utils.eclipse.org" type="cite">WSDL
files are opened with the WSDL editor in the standard WTP.
<br>
You have probably changed something. You can see the definition of the
WSDL content type in the org.eclipse.wst.wsdl/plugin.xml file. The
association of the WSDL content type to the WSDL editor is defined in
the org.eclipse.wst.wsdl.ui/plugin.xml file.
<br>
<br>
Snjeza
<br>
<br>
Bud Curtis wrote:
<br>
<blockquote type="cite">When are plug-in programmatically opens a
..wsdl file it opens up in the WTP XML editor. This can be manually
changed by setting the WSDL editor as the default editor in the file
associations preferences window. However, I would like to make this a
default configuration for our installed Eclipse application.
<br>
<br>
Can this be done in our plugin.xml?
<br>
<br>
Can it be forced programmatically when a new workspace is created?
<br>
<br>
Any suggestions would be appreciated.
<br>
<br>
<br>
</blockquote>
</blockquote>
<br>
</body>
</html>
--------------060307070300030701040907--
|
|
|
Powered by
FUDForum. Page generated in 0.02861 seconds