Register plugin to handle filetype

I am trying to develop a plugin to handle a filetype. Essentially, all I need to do is to be told that file sample.foo is selected and have a JPanel added to render it into.

Is there an example showing how to do this?

MArkee

0

Try the image plugin that comes with IDEA.

Rick

0
Avatar
Permanently deleted user

You will want to register a custom editor for the foo type. You should
look for FileTypeManager. I'm not sure how to register custom editors,
someone else can probably help you here.

mark stephens wrote:

I am trying to develop a plugin to handle a filetype. Essentially, all I need to do is to be told that file sample.foo is selected and have a JPanel added to render it into.

Is there an example showing how to do this?

MArkee

0
Avatar
Permanently deleted user

Already pointed above :)

0

I've been wokring through the example. I found the src in the examples but had to decompile the jat to get the plugin.xml file. This is rather critical to figuring out the code!

Did I miss it or should it be with the source code?

I also found that I had to include classes in the JDK settings to get it to run, but probably missed this in the documentation

MArkee

0
Avatar
Permanently deleted user

Yes, plugin.xml is located in plugin jar. You must get Plugin Development pack, then setup IDEA JDK, and maybe you need to add manualy idea.jar into classpath of this JDK.

0

I'll jot down things that I notice which might help other people and post the code on our website when I have finished.

The api makes a refreshing change to the Eclipse API!!

MArk

0

It works :)

Are then any look and feel guidelines as to how to whether to add functions as menu options or buttons and how plugins should look?

MArk

0
Avatar
Permanently deleted user

Hello mark,

ms> Are then any look and feel guidelines as to how to whether to add
ms> functions as menu options or buttons and how plugins should look?

No, we don't have any written guidelines for this. Just look at IDEA itself
and try to fit in. :)

--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com
"Develop with pleasure!"


0

Thats quite a challenge. I'm not sure I'm that good ;)

0

I've got the editor up and running but it seems to be called for any filetype. Any suggestions what might be the problem?

MArkee

0
Avatar
Permanently deleted user

FileEditorProvider.accept

0

I am displaying a panel which can take some time to render. Is it going to cause problems if I populate the panel in a Swing thread so I can bring the panel up as quickly as possible.

Markee

0

请先登录再写评论。