Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Associating editors with file types(Associating editors using IDocumentSetupParticipant)
Associating editors with file types [message #1062702] Mon, 10 June 2013 12:26 Go to next message
Claus-Dieter Barth is currently offline Claus-Dieter BarthFriend
Messages: 4
Registered: June 2013
Junior Member
In my Editor the PartitioningDocumentSetupParticipant is working well for files with *.my.
Using General > Editors > File Associations preference page i added a new File Association *.myx for the same Associated Editor.

The Editor now opens for *.myx Files but the partitioning from PartitioningDocumentSetupParticipant is not running.

eclipse 3.6 plugin.xml
<extension
point="org.eclipse.ui.editors">
<editor
name="My Editor"
extensions="my"
...
</editor>
</extension>
<extension
...
<participant
class="ui.PartitioningDocumentSetupParticipant"
extensions="my">
</participant>
</extension>
Re: Associating editors with file types [message #1062789 is a reply to message #1062702] Mon, 10 June 2013 18:00 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4435
Registered: July 2009
Senior Member

Which document provider are you using/getting?

_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Associating editors with file types [message #1062794 is a reply to message #1062789] Mon, 10 June 2013 18:52 Go to previous messageGo to next message
Claus-Dieter Barth is currently offline Claus-Dieter BarthFriend
Messages: 4
Registered: June 2013
Junior Member
I'm using
setDocumentProvider(new TextFileDocumentProvider());

Eclipse SDK
Version: 3.6.2
Build id: M20110210-1200
Re: Associating editors with file types [message #1062836 is a reply to message #1062794] Tue, 11 June 2013 03:40 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4435
Registered: July 2009
Senior Member

If You're extending the base TextEditor class, what happens if you don't manually set the document provider instance?

_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Associating editors with file types [message #1062850 is a reply to message #1062836] Tue, 11 June 2013 06:02 Go to previous messageGo to next message
Claus-Dieter Barth is currently offline Claus-Dieter BarthFriend
Messages: 4
Registered: June 2013
Junior Member
without setting documentprovider
- editor and partitioning works for *.my
- but partitioning dont work for *.myx files as before.
Re: Associating editors with file types [message #1062981 is a reply to message #1062850] Tue, 11 June 2013 15:06 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4435
Registered: July 2009
Senior Member

*.my and *.myx will be treated as entirely unrelated filename extensions--*.my doesn't also match *.myx. Does that clear anything up?

_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Associating editors with file types [message #1063075 is a reply to message #1062981] Wed, 12 June 2013 07:32 Go to previous message
Claus-Dieter Barth is currently offline Claus-Dieter BarthFriend
Messages: 4
Registered: June 2013
Junior Member
< *.my doesn't also match *.myx > was not the problem.
But it seems that i found the solution in your [message #115679 is a reply to message #115532]
When partitioning is not running there is no color coding for elements in my samples too.
Therefore i will add *.myx as a filename extension on the Content Types preference page.

Thanks a lot, Nitin
Previous Topic:Using JNA in Rhino Javascript
Next Topic:Eclipse RCP APPlication
Goto Forum:
  


Current Time: Wed Apr 24 14:05:09 GMT 2024

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

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

Back to the top