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] Wed, 02 January 2013 23:00
Julie Pat is currently offline Julie Pat
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: Sun Aug 31 02:30:36 EDT 2014

Powered by FUDForum. Page generated in 0.01626 seconds