Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » how can I specify different text on each of the multiple "Outline View" tabs?
how can I specify different text on each of the multiple "Outline View" tabs? [message #996864] Thu, 03 January 2013 04:00
Julie Pat is currently offline Julie PatFriend
Messages: 4
Registered: December 2012
Junior Member
Hi,

I have two instances of the "Outline View" in my eclipse GEF app which shows two different data. I was able to display multiple outline

views by doing the following shown below.

The problem is that both views have tab text "Outline". I would like to have one tab showing

the text "Outline" and the second tab showing the text "Template". How can I accomplish this?

Thanks in advance...

1. In Perspective.java

public void createInitialLayout(IPageLayout layout) {

IFolderLayout tabs =
layout.createFolder(ID_TABS_FOLDER, IPageLayout.LEFT, 0.3f, editorArea);

tabs.addView(IPageLayout.ID_OUTLINE +":Template");
tabs.addView(IPageLayout.ID_OUTLINE +":Editor");
}

2. In my editpart class:

@Override
public void performRequest(Request req) {
if (req.getType().equals(RequestConstants.REQ_OPEN)) {
try {
IWorkbenchPage page

= PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
page.showView(IPageLayout.ID_OUTLINE, "Template", IWorkbenchPage.VIEW_ACTIVATE);
page.showView(IPageLayout.ID_OUTLINE, "Editor", IWorkbenchPage.VIEW_ACTIVATE);

}
catch (PartInitException e) {
e.printStackTrace();
}
}
}

3. In plugin.xml:

<extension
point="org.eclipse.ui.views">
<view
id="org.eclipse.ui.views.ContentOutline"
name="Outline"
class="org.eclipse.ui.views.contentoutline.ContentOutline" allowMultiple="true" />

</extension>

4. In my main editor class, I have two classes that show the outline views with two different data:

protected class OutlinePage extends org.eclipse.gef.ui.parts.ContentOutlinePage {
.
.
}

protected class

Template extends org.eclipse.gef.ui.parts.ContentOutlinePage {
.
.
}
Previous Topic:How can I create context menu but on hover action?
Next Topic:Context menu on mouse over
Goto Forum:
  


Current Time: Thu Mar 28 23:56:07 GMT 2024

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

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

Back to the top