Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [pde-ui-dev] Regarding Multi Page Editor

Hi Norbert,

Thanks a lot for providing this logical approach. I will try to implement it.

Alex has already provided sample code to resolute the problem which I was facing and it did work out for me. J

His lines are as follows

In the editor you should have the FileEditorInput.

fileEditorInput.getFile().getLocation().toOSString() should return the file path of the input file.

 

Thanks a lot

Partha


From: pde-ui-dev-bounces@xxxxxxxxxxx [mailto:pde-ui-dev-bounces@xxxxxxxxxxx] On Behalf Of Ploett Norbert
Sent: Thursday, June 02, 2005 11:32 AM
To: Eclipse PDE UI developers list.
Subject: AW: [pde-ui-dev] Regarding Multi Page Editor

 

Real tricky.

The part I already came across is this: If you have an eclipse-internal path in the form of an URL (java.net.URL) you can use org.eclipse.core.runtime.Platform.resolve() to convert it to an URL which contains an absolute path  in your filesystem. So the trick is to get the URL from your editor.

 

Now if you editor implements org.eclipse.ui.IFileEditorInput then you can call getFile() to get an org.eclipse.core.resources.IFile object

which in turn has a getFullPath() method returning a org.eclipse.core.runtime.IPath object.

IPath.toString() gives you a String representation from which you can construct the URL.

 

Does that help?

 

 

 

Norbert

 


Von: pde-ui-dev-bounces@xxxxxxxxxxx [mailto:pde-ui-dev-bounces@xxxxxxxxxxx] Im Auftrag von Ranjan, Partha S
Gesendet: Mittwoch, 1. Juni 2005 11:37
An: Eclipse PDE UI developers list.
Betreff: RE: [pde-ui-dev] Regarding Multi Page Editor

Yes that’s precisely what my requirement is. I want to know the exact file path on which the

Editor is invoked. J

 

Thanks

Partha


From: pde-ui-dev-bounces@xxxxxxxxxxx [mailto:pde-ui-dev-bounces@xxxxxxxxxxx] On Behalf Of Ploett Norbert
Sent: Tuesday, May 31, 2005 2:47 PM
To: Eclipse PDE UI developers list.
Subject: AW: [pde-ui-dev] Regarding Multi Page Editor

 

Hi Partha,

 

a point I am puzzled about is this: What do you do to "get the absolute path"? Do you have something like an editor or file object and call a method?

 

Greets

 

 

Norbert

 


Von: pde-ui-dev-bounces@xxxxxxxxxxx [mailto:pde-ui-dev-bounces@xxxxxxxxxxx] Im Auftrag von Ranjan, Partha S
Gesendet: Dienstag, 31. Mai 2005 11:05
An: Cherie Wong; Eclipse PDE UI developers list.; sumit panchasara
Betreff: RE: [pde-ui-dev] Regarding Multi Page Editor

Hi All,

I am facing a bit tricky issue and the problem statement goes like this.

I developed a multi-page editor plug-in based on Eclipse 3.0 and by selecting

A file with extension of “WSDD” it supposed to be invoked.

 

The editor is invoking as expected when user selects a file with that particular extension,

But when I am trying to get the absolute path of that selected file I am getting some

Different path and not the exact path.

Even I just want to know the project under which that file is in.

How to locate these?

 

For example I have a project named “Sample project” present in my

System’s file system at “D:\ Sample project”.

A file is there named “test.wsdd” under that project.

My eclipse path is “E:\eclipse-sdk\eclipse

 

Whenever I am trying to locate the absolute path of the file when user selects

The particular “server-config.wsdd” it’s trying to locate under

“E:\eclipse-sdk\eclipse”, but which is not the exact path of the file.

 

So how to get rid of the issue?

Thanks and Regards

Partha P. S. Ranjan

Computer Associates

Software Engineer

tel: +91 40 556 70323

fax: +91 40 556 70000

partha.ranjan@xxxxxx

-----Original Message-----
From: pde-ui-dev-bounces@xxxxxxxxxxx [mailto:pde-ui-dev-bounces@xxxxxxxxxxx] On Behalf Of Cherie Wong
Sent: Sunday, May 29, 2005 12:05 AM
To: sumit panchasara; Eclipse PDE UI developers list.
Subject: Re: [pde-ui-dev] regarding dependencies

 

Hi Sumit,

 

I'm not sure why you need to add any dependencies at all actually.  Is

there a problem compiling if you only put Plugin Y in the java

buildpath of Plugin X and not make either dependent on the other?

 

On another note, the newsgroups are the best places for questions on

using Eclipse.  Definitely try the newsgroups next time; they're nice

and helpful people too :)

http://eclipse.org/newsgroups/main.html#eclipse

 

-Cherie.

 

On 5/28/05, sumit panchasara <sumit.panchasara@xxxxxxxxxxxxxx> wrote:

> Hi Cherie,

> Thanks for your kinid response,

> What I done now is,  I have added Plugin X as Dependency to Plugin Y. And

> other side (Plugin X side) I update JavaBuildPath as: "Projects" tab I

> checked the "Plugin Y" option.

> So that there is no chance of circular dependency. But now it shows

> ActionSet (Buttons) but not initiating any actions. Giving "Information" msg

> box like: Choosen operation is not currently available.

>

> Sumit.

>

> ----- Original Message -----

> From: "Cherie Wong" <cherie.wong@xxxxxxxxx>

> To: "sumit panchasara" <sumit.panchasara@xxxxxxxxxxxxxx>; "Eclipse PDE UI

> developers list." <pde-ui-dev@xxxxxxxxxxx>

> Sent: Saturday, May 28, 2005 1:11 AM

> Subject: Re: [pde-ui-dev] regarding dependencies

>

>

> > Hi Sumit,

> >

> > Instead of adding both plug-ins as dependencies on each other, try

> > adding Plugin Y to the Java Build Path of Plugin X only.  Also, make

> > sure you are launching the runtime workbench with all workspace and

> > enabled external plug-ins.

> >

> > I just made 2 plug-ins - one with an action set relying on code from

> > the second plug-in.  I didn't seem to have any problems.

> >

> > Hope that helps! :)

> >

> > -Cherie.

> >

> >

> >

> > On 5/28/05, sumit panchasara <sumit.panchasara@xxxxxxxxxxxxxx> wrote:

> >>

> >> Hi folks,

> >> I am stucked in development due to dependency problem in Eclipse-PDE.

> >> One strange thing is happening.

> >>

> >> I have three plugins in my project. One of this (Plugin say X) is

> >> implementing Action Set, actually one button on tool-bar. that invoke

> >> another swt application. I have created one more plugin (Say Plugin Y)

> >> that

> >> does processing part for that swt application. Now when I am using

> >> dependency for this,  I have to put dependency for Y into X. and same X

> >> into

> >> Y, right. But when I run using "RunTime Workbench" it is not showing that

> >> button on toolbar. Just only framework is displayed. I need to close it

> >> afterwards.

> >>

> >> Where as If I include processing part in Plugin X itself, it works fine.

> >> i.e. if I remove Plugin Y from dependency list of Plyg in X it is running

> >> fine.

> >>

> >> Why this is happening? Any possible solution??????

> >>

> >> Thanks,

> >> Sumit Panchasara.

> >> _______________________________________________

> >> pde-ui-dev mailing list

> >> pde-ui-dev@xxxxxxxxxxx

> >> https://dev.eclipse.org/mailman/listinfo/pde-ui-dev

> >>

> >>

> >>

>

> 

_______________________________________________

pde-ui-dev mailing list

pde-ui-dev@xxxxxxxxxxx

https://dev.eclipse.org/mailman/listinfo/pde-ui-dev

 


Back to the top