Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Problem to integrate a 3rd-part plugin
Problem to integrate a 3rd-part plugin [message #437134] Thu, 22 September 2005 09:33 Go to next message
Eclipse UserFriend
Originally posted by: reg.sheng.clanfang.com

Hello,

I have integrated a 3rd-part plugin into my Eclipse-RCP-APP, it's like a
type of XML editor. But the plugin only accepts files which are attached
into the workspace with a proyect. The code of the editor is like the
following:

public void init(IEditorSite site, IEditorInput input) throws
PartInitException {
FileEditorInput fileInput = (FileEditorInput)input; // XXX
...
...
}

If I try to open a external file(away form the workspace, type of
"java.io.File"), it will throw an exception while doing the casting.

There are 2 ideas, which I have now in my mind. They are:

1. Attach the external file into the workspace while trying to open it.
2. Convert a external "java.io.File" into
"org.eclipse.ui.part.FileEditorInput".

I prefer the 2nd way, I think it's cleaner but I don't know if it's
viable, because I've seen that the FileEditorInput contains a a interfaz
IFile which contains at the same time, informations of the workspace.
Maybe the 1st way will be easier.

Would you give me any recomendation of which to choose and how to carry it
out? Or any more suggestion will be welcome also.

Thanks in advance.

ShEng
Re: Problem to integrate a 3rd-part plugin [message #437140 is a reply to message #437134] Thu, 22 September 2005 14:50 Go to previous messageGo to next message
Haris Peco is currently offline Haris PecoFriend
Messages: 1072
Registered: July 2009
Senior Member
Sheng Fang wrote:

> Hello,
>
> I have integrated a 3rd-part plugin into my Eclipse-RCP-APP, it's like a
> type of XML editor. But the plugin only accepts files which are attached
> into the workspace with a proyect. The code of the editor is like the
> following:
>
> public void init(IEditorSite site, IEditorInput input) throws
> PartInitException {
> FileEditorInput fileInput = (FileEditorInput)input; // XXX
> ...
> ...
> }
>
> If I try to open a external file(away form the workspace, type of
> "java.io.File"), it will throw an exception while doing the casting.
>
> There are 2 ideas, which I have now in my mind. They are:
>
> 1. Attach the external file into the workspace while trying to open it.
> 2. Convert a external "java.io.File" into
> "org.eclipse.ui.part.FileEditorInput".
>
> I prefer the 2nd way, I think it's cleaner but I don't know if it's
> viable, because I've seen that the FileEditorInput contains a a interfaz
> IFile which contains at the same time, informations of the workspace.
> Maybe the 1st way will be easier.
>
> Would you give me any recomendation of which to choose and how to carry it
> out? Or any more suggestion will be welcome also.
>
> Thanks in advance.
>
> ShEng

You can change File to IFile - search eclipse tips & tricks on
www.eclipsezone.com
Re: Problem to integrate a 3rd-part plugin [message #437217 is a reply to message #437140] Fri, 23 September 2005 10:14 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: reg.sheng.clanfang.com

Thank you snpe, this may guide me a little.


snpe wrote:

> Sheng Fang wrote:

>> Hello,
>>
>> I have integrated a 3rd-part plugin into my Eclipse-RCP-APP, it's like a
>> type of XML editor. But the plugin only accepts files which are attached
>> into the workspace with a proyect. The code of the editor is like the
>> following:
>>
>> public void init(IEditorSite site, IEditorInput input) throws
>> PartInitException {
>> FileEditorInput fileInput = (FileEditorInput)input; // XXX
>> ...
>> ...
>> }
>>
>> If I try to open a external file(away form the workspace, type of
>> "java.io.File"), it will throw an exception while doing the casting.
>>
>> There are 2 ideas, which I have now in my mind. They are:
>>
>> 1. Attach the external file into the workspace while trying to open it.
>> 2. Convert a external "java.io.File" into
>> "org.eclipse.ui.part.FileEditorInput".
>>
>> I prefer the 2nd way, I think it's cleaner but I don't know if it's
>> viable, because I've seen that the FileEditorInput contains a a interfaz
>> IFile which contains at the same time, informations of the workspace.
>> Maybe the 1st way will be easier.
>>
>> Would you give me any recomendation of which to choose and how to carry it
>> out? Or any more suggestion will be welcome also.
>>
>> Thanks in advance.
>>
>> ShEng

> You can change File to IFile - search eclipse tips & tricks on
> www.eclipsezone.com
Re: Problem to integrate a 3rd-part plugin [message #437232 is a reply to message #437134] Sun, 25 September 2005 13:35 Go to previous messageGo to next message
JavaJ Missing name is currently offline JavaJ Missing nameFriend
Messages: 45
Registered: July 2009
Member
I have a question. How did you integrate this 3rd party plugin with your RCP app. Do you have documentation or web links that helped you do this? I need to get an XML plugin working, which one did you use?

Thanks,
Jason
Re: Problem to integrate a 3rd-part plugin [message #437256 is a reply to message #437232] Mon, 26 September 2005 08:06 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: reg.sheng.clanfang.com

Jason Milliron wrote:

> I have a question. How did you integrate this 3rd party plugin with your
RCP app. Do you have documentation or web links that helped you do this? I
need to get an XML plugin working, which one did you use?

> Thanks,
> Jason

Integrate a 3td part plugin(for Eclipse) into a RCP app is trivial. You
only need to import the necesary official Eclipse plugins in your project,
then... nothing, it's all.
Re: Problem to integrate a 3rd-part plugin [message #437257 is a reply to message #437140] Mon, 26 September 2005 08:10 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: reg.sheng.clanfang.com

snpe wrote:

> Sheng Fang wrote:

>> Hello,
>>
>> I have integrated a 3rd-part plugin into my Eclipse-RCP-APP, it's like a
>> type of XML editor. But the plugin only accepts files which are attached
>> into the workspace with a proyect. The code of the editor is like the
>> following:
>>
>> public void init(IEditorSite site, IEditorInput input) throws
>> PartInitException {
>> FileEditorInput fileInput = (FileEditorInput)input; // XXX
>> ...
>> ...
>> }
>>
>> If I try to open a external file(away form the workspace, type of
>> "java.io.File"), it will throw an exception while doing the casting.
>>
>> There are 2 ideas, which I have now in my mind. They are:
>>
>> 1. Attach the external file into the workspace while trying to open it.
>> 2. Convert a external "java.io.File" into
>> "org.eclipse.ui.part.FileEditorInput".
>>
>> I prefer the 2nd way, I think it's cleaner but I don't know if it's
>> viable, because I've seen that the FileEditorInput contains a a interfaz
>> IFile which contains at the same time, informations of the workspace.
>> Maybe the 1st way will be easier.
>>
>> Would you give me any recomendation of which to choose and how to carry it
>> out? Or any more suggestion will be welcome also.
>>
>> Thanks in advance.
>>
>> ShEng

> You can change File to IFile - search eclipse tips & tricks on
> www.eclipsezone.com

I'a afraid that the ideas on www.eclipsezone.com do not work to change
File to IFile.

Anyone has more suggestion about this?

Thanx
ShEng
Re: Problem to integrate a 3rd-part plugin [message #437459 is a reply to message #437134] Wed, 28 September 2005 21:02 Go to previous messageGo to next message
JavaJ Missing name is currently offline JavaJ Missing nameFriend
Messages: 45
Registered: July 2009
Member
Which xml plugin did you use?
Re: Problem to integrate a 3rd-part plugin [message #437466 is a reply to message #437459] Thu, 29 September 2005 07:55 Go to previous message
Eclipse UserFriend
Originally posted by: reg.sheng.clanfang.com

It's Graphic Process Edtior for workflows by jbpm.org
Previous Topic:[PDE] preferred newsgroup for PDE questions?
Next Topic:Login Dialog and splash screen
Goto Forum:
  


Current Time: Wed Dec 04 15:56:15 GMT 2024

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

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

Back to the top