[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [cdt-dev] Re: FW: [Bug 183757]org.eclipse.cdt.core.languageextension point does not appear to work
|
> Specifying cSource as the base type does seem to allow the CEditor to
> open cn files, but when I then try to bind my cnLanguage with the
> cnSource type, I get an unexpected exception error when the editor
> starts.
Please post the exception to bug 183757
https://bugs.eclipse.org/bugs/show_bug.cgi?id=183757
> Also, it seems as though org.eclipse.core.runtime.contentTypes and
> org.eclipse.core.contenttypes.contentTypes both serve exactly the same
> purpose?
Right. I did'nt even realize that there are duplicates.
Toni
> -----Original Message-----
> From: cdt-dev-bounces@xxxxxxxxxxx
> [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Michael Wrighton
> Sent: Thursday, April 26, 2007 2:52 PM
> To: CDT General developers list.
> Subject: RE: [cdt-dev] Re: FW: [Bug
> 183757]org.eclipse.cdt.core.languageextension point does not
> appear to work
>
>
> Specifying cSource as the base type does seem to allow the CEditor to
> open cn files, but when I then try to bind my cnLanguage with the
> cnSource type, I get an unexpected exception error when the editor
> starts.
>
> Also, it seems as though org.eclipse.core.runtime.contentTypes and
> org.eclipse.core.contenttypes.contentTypes both serve exactly the same
> purpose?
>
> Mike
>
>
> -----Original Message-----
> From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx]
> On Behalf Of Leherbauer, Anton
> Sent: 25 April 2007 13:23
> To: CDT General developers list.
> Subject: RE: [cdt-dev] Re: FW: [Bug 183757]
> org.eclipse.cdt.core.languageextension point does not appear to work
>
> Hi,
>
> it should be sufficient to make the Cn content type
> "derive" from the cSource content type, eg.
>
> <extension
> point="org.eclipse.core.contenttype.contentTypes">
> <content-type
> base-type="org.eclipse.cdt.core.cSource"
> file-extensions="cn"
> id="com.clearspeed.eclipse.cnSource"
> name="Cn Source File"
> priority="normal">
> </content-type>
> </extension>
>
> That way, the CEditor is autmatically associated
> with .cn files, too.
>
> HTH,
> Toni
>
> > -----Original Message-----
> > From: cdt-dev-bounces@xxxxxxxxxxx
> > [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Jason Montojo
> > Sent: Tuesday, April 24, 2007 7:24 PM
> > To: Michael Wrighton
> > Cc: CDT General developers list.
> > Subject: [cdt-dev] Re: FW: [Bug 183757]
> > org.eclipse.cdt.core.language extension point does not
> appear to work
> >
> > Hi Mike,
> >
> > The mailing list would be the best place to discuss questions
> > involving
> > extending CDT such as this.
> >
> > If you want to take that route, you'd probably need to
> > disassociate the
> > cSource content type from GCCLanguage in the
> > org.eclipse.cdt.core.language
> > extension in the core plugin and map that to your
> CnLanguage. That's
> > because the CEditor expects the file it's working with to
> > have either the
> > cSource/Header or cxxSource/Header content type.
> >
> > One alternative is to have your plugin programmatically
> > associate your Cn
> > content type with cSource and cHeader when a project is
> > created. You can
> > do this using a combination of MBS Custom Pages and LanguageManager.
> > However, the APIs for LanguageManager are changing quite a
> > bit right now
> > since we are adding support for build configuration-level language
> > mappings. They should be stable after the feature freeze
> > this Friday. I
> > can give you a code sample to illustrate how to set your
> > CnLanguage to use
> > CEditor through that mechanism once those changes are in place.
> >
> > Hope this helps,
> >
> > Jason Montojo
> > IBM CDT Team
> > IBM Toronto Lab
> > 905-413-5228
> > jmontojo@xxxxxxxxxx
> >
> >
> > |------------>
> > | From: |
> > |------------>
> >
> > >-------------------------------------------------------------
> > --------------------------------------------------------------
> > -----------------------|
> > |"Michael Wrighton" <mikew@xxxxxxxxxxxxxx>
> >
> > |
> >
> > >-------------------------------------------------------------
> > --------------------------------------------------------------
> > -----------------------|
> > |------------>
> > | To: |
> > |------------>
> >
> > >-------------------------------------------------------------
> > --------------------------------------------------------------
> > -----------------------|
> > |Jason Montojo/Toronto/IBM@IBMCA
> >
> > |
> >
> > >-------------------------------------------------------------
> > --------------------------------------------------------------
> > -----------------------|
> > |------------>
> > | Date: |
> > |------------>
> >
> > >-------------------------------------------------------------
> > --------------------------------------------------------------
> > -----------------------|
> > |04/24/2007 12:48 PM
> >
> > |
> >
> > >-------------------------------------------------------------
> > --------------------------------------------------------------
> > -----------------------|
> > |------------>
> > | Subject: |
> > |------------>
> >
> > >-------------------------------------------------------------
> > --------------------------------------------------------------
> > -----------------------|
> > |FW: [Bug 183757] org.eclipse.cdt.core.language extension
> > point does not appear to work
> > |
> >
> > >-------------------------------------------------------------
> > --------------------------------------------------------------
> > -----------------------|
> >
> >
> >
> >
> >
> > Thanks,
> >
> > (I don't know whether this reply needs posting on the
> bugzilla page or
> > mailing list?)
> >
> > Actually we're using a different file extension anyway (.cn), so it
> > seems I need to create a cn content type, associate the cn
> > language with
> > this content type, and create a org.eclipse.ui.editors
> extension point
> > which mirrors the CEditor extension but with
> contentTypeBinding id set
> > to my cn content type, in order to re-use the CEditor?
> >
> > Mike
> >
> > -----Original Message-----
> > From: bugzilla-daemon@xxxxxxxxxxx
> [mailto:bugzilla-daemon@xxxxxxxxxxx]
> > Sent: 24 April 2007 14:37
> > To: Michael Wrighton
> > Subject: [Bug 183757] org.eclipse.cdt.core.language extension
> > point does
> > not appear to work
> >
> > https://bugs.eclipse.org/bugs/show_bug.cgi?id=183757
> > Product/Component: CDT / cdt-core
> >
> >
> > jmontojo@xxxxxxxxxx changed:
> >
> > What |Removed |Added
> > --------------------------------------------------------------
> > ----------
> > ----
> > CC| |jmontojo@xxxxxxxxxx
> >
> >
> >
> >
> > ------- Comment #2 from jmontojo@xxxxxxxxxx 2007-04-24
> 09:35 -------
> > Hi Mike,
> >
> > In Eclipse, you can only specify one content type per file
> > extension or
> > file
> > name pattern. This doesn't work for C/C++ source files
> because foo.h
> > may be a
> > C header file or a C++ header file. For that reason, we
> have added a
> > layer on
> > top of the Eclipse Platform to dynamically assign different content
> > types to
> > files.
> >
> > This means you'll need to ensure your CnLanguage has its own unique
> > content
> > type id, otherwise, you'll run into conflicts with CDT's
> GCCLanguage.
> > And as
> > Toni mentioned, you can assign your CnLanguage as the default
> > C language
> > in the
> > mappings page.
> >
> >
> >
> > --
> > Configure bugzilla e-mail:
> > https://bugs.eclipse.org/bugs/userprefs.cgi?tab=email
> > ------- You are receiving this mail because: -------
> > You reported the bug, or are watching the reporter.
> >
> >
> >
> > _______________________________________________
> > cdt-dev mailing list
> > cdt-dev@xxxxxxxxxxx
> > https://dev.eclipse.org/mailman/listinfo/cdt-dev
> >
> _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/cdt-dev
> _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/cdt-dev
>