Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Help needed in perspective
Help needed in perspective [message #108614] Fri, 08 August 2003 04:00 Go to next message
Eclipse UserFriend
Originally posted by: pkumar.louveciennes.sema.slb.com

hi
I am new to eclipse plugin development and need some help.
Context:
I am trying to make a new perspective(following "Using Perspectives in
the Eclipse UI" by Dave Springgay ). To which I would like to add some
views. I tried few things , but the only trick which worked was opening
the perspective then opening the views and then saving the perspective.

Problems:
1) Views are not added in right position.It seems it is following a
default behaviour. All the views are added to the right of EditorView.
2) I tried to add a view through program, no results seen.

Questions:(Which could be stupid !!!)
1) Is there some other way of adding a custom view to a custom
perspective ?
2) How can I change the position of the views?

Code:
public void createInitialLayout(IPageLayout layout)
{
defineActions(layout);
defineLayout(layout);


}
ššššššššššš
ššššššššššššššš
šššššššššššššššš
public void defineLayout(IPageLayout layout)
{
// Editors are placed for free.
String editorArea = layout.getEditorArea();
// hiding the editor
// Place navigator and outline to left of
// editor area.
IFolderLayout top =
layout.createFolder("top", IPageLayout.TOP, (float) 0.26,
editorArea);
top.addView(IPageLayout.ID_RES_NAV);
top.addView(IPageLayout.ID_OUTLINE);
// IFolderLayout bottom =
layout.createFolder("bottom",IPageLayout.BOTTOM, 0.50f, editorArea );
// never worked ??????
layout.addView("org.xyz.pk.views.SampleView",IPageLayout.BOTTOM, 0.50f,
editorArea);
}

Thanx in advance
PKumar
Re: Help needed in perspective [message #109658 is a reply to message #108614] Mon, 11 August 2003 11:06 Go to previous message
Eclipse UserFriend
Originally posted by: simon.ibm.oti.lab

"PKumar" <pkumar@louveciennes.sema.slb.com> wrote in message
news:bgvlaj$s1f$1@eclipse.org...
> hi
> I am new to eclipse plugin development and need some help.
> Context:
> I am trying to make a new perspective(following "Using Perspectives in
> the Eclipse UI" by Dave Springgay ). To which I would like to add some
> views. I tried few things , but the only trick which worked was opening
> the perspective then opening the views and then saving the perspective.
>
> Problems:
> 1) Views are not added in right position.It seems it is following a
> default behaviour. All the views are added to the right of EditorView.

If you do not define in your perspective where a view goes, then the
workbench takes a guess where it should open.

> 2) I tried to add a view through program, no results seen.
>
> Questions:(Which could be stupid !!!)
> 1) Is there some other way of adding a custom view to a custom
> perspective ?

Yes - its all explained in the article

> 2) How can I change the position of the views?

What views? From where?

Did you check your .log file to see if there was any problems with your
perspective?

>
> Code:
> public void createInitialLayout(IPageLayout layout)
> {
> defineActions(layout);
> defineLayout(layout);
>
>
> }
>
Previous Topic:How to disable an action in an action set
Next Topic:Copying from outline view
Goto Forum:
  


Current Time: Tue Jul 08 14:53:45 EDT 2025

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

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

Back to the top