Skip to main content



      Home
Home » Language IDEs » ServerTools (WTP) » Defina a Content Type so it opens up my specific MultiPageEditor ?
Defina a Content Type so it opens up my specific MultiPageEditor ? [message #95032] Tue, 26 April 2005 09:51 Go to next message
Eclipse UserFriend
Hi,

I know how to override/configure the xml editors source configuration
based on contentypes.
Can anyone tell me how via content-types to open a specific editor and not
just reconfigure
the xml editor ?

-max
Re: Defina a Content Type so it opens up my specific MultiPageEditor ? [message #95659 is a reply to message #95032] Wed, 27 April 2005 17:44 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: amywu.us.DELETETHISPART.ibm.com

I'm not sure what you mean and perhaps this question is more suited for the
general eclipse.platform newsgroup.

From a user's perspective:
The Content Types preference page allows you to associate content types with
certain file types.
The File Associations preference page allows you to associate certain file
types with different editors. In this preference page, you can also specify
the default editor to use on a file type.

From a developer's perspective:
When you define your editor in your plugin.xml, you can associate your
editor to a file type or content type. Here's what the JSP Source page
editor's definition looks like:
<extension point="org.eclipse.ui.editors">

<editor name="%JSP_Source_Page_Editor.name"

icon="icons/sourceEditor.gif" extensions="jsp, jsf, jspf, jspx, tag, tagf"

contributorClass="org.eclipse.jst.jsp.ui.internal.editor.ActionContributorJS
P"

class=" org.eclipse.jst.jsp.ui.internal.editor.StructuredTextEditorJ SP "

symbolicFontName="org.eclipse.wst.sse.ui.textfont"

id="org.eclipse.jst.jsp.core.jspsource.source">

<contentTypeBinding contentTypeId="org.eclipse.jst.jsp.core.jspsource" />

</editor>

</extension>

Hope that helped.

-amy

"Max Rydahl Andersen" <max.andersen@jboss.com> wrote in message
news:op.spud31qrsj49yt@xam.intranet.jboss.com...
> Hi,
>
> I know how to override/configure the xml editors source configuration
> based on contentypes.
> Can anyone tell me how via content-types to open a specific editor and not
> just reconfigure
> the xml editor ?
>
> -max
Re: Defina a Content Type so it opens up my specific MultiPageEditor ? [message #95740 is a reply to message #95659] Thu, 28 April 2005 04:12 Go to previous messageGo to next message
Eclipse UserFriend
Hi Amy,

I think it helped I will at least work through it and see if it does what
i want ,)

The biggest issue with the filetype association is that is not ready for
the 21th century
since it assumes all files only have one . in it ;)

so you can bind .xml, .jsp, .xxx but not .cfg.xml, .hbm.xml, .ant.xml,
..reveng.xml etc.

And what I would like is to have .reveng.xml bound to my editor but that
is not possible.
But what I can do is specify the content type for .reveng.xml so the xml
editor
is initialized correctly - but I didnt find a way to say: "Hey, yes I know
how the
xml editor should be enhanced BUT I would also like eclipse to use THIS
specific multipage
editor instead of the xml editor"

Did that make more sense ? ;)

/max

> I'm not sure what you mean and perhaps this question is more suited for
> the
> general eclipse.platform newsgroup.
>
> From a user's perspective:
> The Content Types preference page allows you to associate content types
> with
> certain file types.
> The File Associations preference page allows you to associate certain
> file
> types with different editors. In this preference page, you can also
> specify
> the default editor to use on a file type.
>
> From a developer's perspective:
> When you define your editor in your plugin.xml, you can associate your
> editor to a file type or content type. Here's what the JSP Source page
> editor's definition looks like:
> <extension point="org.eclipse.ui.editors">
>
> <editor name="%JSP_Source_Page_Editor.name"
>
> icon="icons/sourceEditor.gif" extensions="jsp, jsf, jspf, jspx, tag,
> tagf"
>
> contributorClass="org.eclipse.jst.jsp.ui.internal.editor.ActionContributorJS
> P"
>
> class=" org.eclipse.jst.jsp.ui.internal.editor.StructuredTextEditorJ SP "
>
> symbolicFontName="org.eclipse.wst.sse.ui.textfont"
>
> id="org.eclipse.jst.jsp.core.jspsource.source">
>
> <contentTypeBinding contentTypeId="org.eclipse.jst.jsp.core.jspsource" />
>
> </editor>
>
> </extension>
>
> Hope that helped.
>
> -amy
>
> "Max Rydahl Andersen" <max.andersen@jboss.com> wrote in message
> news:op.spud31qrsj49yt@xam.intranet.jboss.com...
>> Hi,
>>
>> I know how to override/configure the xml editors source configuration
>> based on contentypes.
>> Can anyone tell me how via content-types to open a specific editor and
>> not
>> just reconfigure
>> the xml editor ?
>>
>> -max
>
>



--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Re: Defina a Content Type so it opens up my specific MultiPageEditor ? [message #98041 is a reply to message #95740] Tue, 03 May 2005 13:31 Go to previous message
Eclipse UserFriend
Originally posted by: amywu.us.DELETETHISPART.ibm.com

The one . limitation sounds like it could be a bug. Like I said, you might
want to ask your question in the general eclipse.platform newsgroup. But it
sounds like if you want to associate your editor with a particular
extension, you should add something like the following in your plugin.xml.
<extension point="org.eclipse.ui.editors">
<editor name="%JSP_Source_Page_Editor.name"
icon="icons/sourceEditor.gif"
===> extensions="reveng.xml"

contributorClass="org.eclipse.jst.jsp.ui.internal.editor.ActionContributorJS
P"
class=" org.eclipse.jst.jsp.ui.internal.editor.StructuredTextEditorJ SP "
symbolicFontName="org.eclipse.wst.sse.ui.textfont"
id="org.eclipse.jst.jsp.core.jspsource.source">
</editor>
</extension>

"Max Rydahl Andersen" <max.andersen@jboss.com> wrote in message
news:op.spxnqeg8sj49yt@xam.intranet.jboss.com...
>
> Hi Amy,
>
> I think it helped I will at least work through it and see if it does what
> i want ,)
>
> The biggest issue with the filetype association is that is not ready for
> the 21th century
> since it assumes all files only have one . in it ;)
>
> so you can bind .xml, .jsp, .xxx but not .cfg.xml, .hbm.xml, .ant.xml,
> .reveng.xml etc.
>
> And what I would like is to have .reveng.xml bound to my editor but that
> is not possible.
> But what I can do is specify the content type for .reveng.xml so the xml
> editor
> is initialized correctly - but I didnt find a way to say: "Hey, yes I know
> how the
> xml editor should be enhanced BUT I would also like eclipse to use THIS
> specific multipage
> editor instead of the xml editor"
>
> Did that make more sense ? ;)
>
> /max
>
> > I'm not sure what you mean and perhaps this question is more suited for
> > the
> > general eclipse.platform newsgroup.
> >
> > From a user's perspective:
> > The Content Types preference page allows you to associate content types
> > with
> > certain file types.
> > The File Associations preference page allows you to associate certain
> > file
> > types with different editors. In this preference page, you can also
> > specify
> > the default editor to use on a file type.
> >
> > From a developer's perspective:
> > When you define your editor in your plugin.xml, you can associate your
> > editor to a file type or content type. Here's what the JSP Source page
> > editor's definition looks like:
> > <extension point="org.eclipse.ui.editors">
> >
> > <editor name="%JSP_Source_Page_Editor.name"
> >
> > icon="icons/sourceEditor.gif" extensions="jsp, jsf, jspf, jspx, tag,
> > tagf"
> >
> >
contributorClass="org.eclipse.jst.jsp.ui.internal.editor.ActionContributorJS
> > P"
> >
> > class=" org.eclipse.jst.jsp.ui.internal.editor.StructuredTextEditorJ SP "
> >
> > symbolicFontName="org.eclipse.wst.sse.ui.textfont"
> >
> > id="org.eclipse.jst.jsp.core.jspsource.source">
> >
> > <contentTypeBinding contentTypeId="org.eclipse.jst.jsp.core.jspsource"
/>
> >
> > </editor>
> >
> > </extension>
> >
> > Hope that helped.
> >
> > -amy
> >
> > "Max Rydahl Andersen" <max.andersen@jboss.com> wrote in message
> > news:op.spud31qrsj49yt@xam.intranet.jboss.com...
> >> Hi,
> >>
> >> I know how to override/configure the xml editors source configuration
> >> based on contentypes.
> >> Can anyone tell me how via content-types to open a specific editor and
> >> not
> >> just reconfigure
> >> the xml editor ?
> >>
> >> -max
> >
> >
>
>
>
> --
> Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Previous Topic:project location
Next Topic:For everyone who is having trouble with the new Project Structure
Goto Forum:
  


Current Time: Thu Jul 24 03:42:07 EDT 2025

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

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

Back to the top