Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Force WSDL Editor on .wsdl entensions
Force WSDL Editor on .wsdl entensions [message #187485] Fri, 02 February 2007 00:54 Go to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Snjezana Peco is currently offline Snjezana PecoFriend
Messages: 789
Registered: July 2009
Senior Member
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 Go to previous message
Eclipse UserFriend
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.&nbsp; In EMF we open editors like this:<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; page.openEditor<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (new FileEditorInput(modelFile),<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;
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>&nbsp;&nbsp;&nbsp; /**<br>
&nbsp;&nbsp;&nbsp;&nbsp; * Returns the default editor for a given file name and with the
given content type.&nbsp; <br>
&nbsp;&nbsp;&nbsp;&nbsp; * &lt;p&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp; * The default editor is determined by taking the file extension
for the<br>
&nbsp;&nbsp;&nbsp;&nbsp; * file and obtaining the default editor for that extension.<br>
&nbsp;&nbsp;&nbsp;&nbsp; * &lt;/p&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp; *<br>
&nbsp;&nbsp;&nbsp;&nbsp; * @param fileName the file name in the system<br>
&nbsp;&nbsp;&nbsp;&nbsp; * @param contentType the content type or
&lt;code&gt;null&lt;/code&gt; for the unknown content type<br>
&nbsp;&nbsp;&nbsp;&nbsp; * @return the descriptor of the default editor, or
&lt;code&gt;null&lt;/code&gt; if not<br>
&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp; found<br>
&nbsp;&nbsp;&nbsp;&nbsp; * @since 3.1<br>
&nbsp;&nbsp;&nbsp;&nbsp; */<br>
&nbsp;&nbsp;&nbsp; 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&nbsp; 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.&nbsp; This can be manually
changed by setting the WSDL editor as the default editor in the file
associations preferences window.&nbsp; 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--
Previous Topic:Webdoclet + Websphere 6 - How to make Descriptors?
Next Topic:Instability - out of memory errors and freezing
Goto Forum:
  


Current Time: Wed Apr 24 19:02:31 GMT 2024

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

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

Back to the top