Difference: DpHipePerspectives (1 vs. 21)

Revision 212014-02-19 - AlvarGarcia

Line: 1 to 1
 
META TOPICPARENT name="DpHipe"
<-- ANALYTICS CODE - DO NOT EDIT -->
<-- Google Analytics script BEGIN -->
<-- Google Analytics script END -->
Line: 16 to 16
 
<-- summary -->
If you think that a set of (new) views should be presented in standard layout, you can do so by creating a new perspective. Such a perspective defines
Changed:
<
<
how these views are layed out in tabs and split panes. This section briefly explains how to contribute a new perspective.
>
>
how these views are laid out in tabs and split panes. This section briefly explains how to contribute a new perspective.
 

See also the overview page.

Revision 202014-02-18 - AlvarGarcia

Line: 1 to 1
 
META TOPICPARENT name="DpHipe"
<-- ANALYTICS CODE - DO NOT EDIT -->
<-- Google Analytics script BEGIN -->
<-- Google Analytics script END -->
Line: 27 to 27
 

Revision 192012-10-19 - DavideRizzo

Line: 1 to 1
 
META TOPICPARENT name="DpHipe"
Added:
>
>
<-- ANALYTICS CODE - DO NOT EDIT -->
<-- Google Analytics script BEGIN -->
<-- Google Analytics script END -->

<-- END OF ANALYTICS CODE -->
 
<-- 
  • Set TOPICTITLE = Creating a perspective
-->
Line: 169 to 172
 
<-- END OF COMMENT BOX CODE -->

Changed:
<
<
META FILEATTACHMENT attr="h" autoattached="1" comment="HIPE Perspective menu" date="1341415119" name="hipe-menu-perspective.png" path="hipe-menu-perspective.png" size="25234" user="Main.DavideRizzo" version="1"
>
>
META FILEATTACHMENT attr="h" autoattached="1" comment="Script for Google Analytics" date="1350657920" name="GoogleAnalytics.txt" path="GoogleAnalytics.txt" size="549" user="Main.DavideRizzo" version="1"
 
META FILEATTACHMENT attr="h" autoattached="1" comment="Simple custom perspective" date="1341498375" name="SimplePerspective.png" path="SimplePerspective.png" size="25164" user="Main.DavideRizzo" version="1"
Added:
>
>
META FILEATTACHMENT attr="h" autoattached="1" comment="HIPE Perspective menu" date="1341415119" name="hipe-menu-perspective.png" path="hipe-menu-perspective.png" size="25234" user="Main.DavideRizzo" version="1"
 
META TOPICMOVED by="DavideRizzo" date="1272528021" from="Hcss.DpHipePerspectives" to="Public.DpHipePerspectives"

Revision 182012-07-06 - DavideRizzo

Line: 1 to 1
 
META TOPICPARENT name="DpHipe"

Revision 172012-07-05 - DavideRizzo

Line: 1 to 1
 
META TOPICPARENT name="DpHipe"

Revision 162012-07-04 - DavideRizzo

Line: 1 to 1
 
META TOPICPARENT name="DpHipe"

Basic Steps

Changed:
<
<
HIPE Perspective menu
>
>
HIPE Perspective menu
 
The aim is that your contribution is automatically picked up by the infrastructure, such that your perspective is added to the perspective menu, as shown in the picture on the right.
Line: 168 to 168
 
<-- END OF COMMENT BOX CODE -->

Deleted:
<
<
META FILEATTACHMENT attr="h" autoattached="1" comment="HIPE Perspective menu" date="1200322809" name="hipe-menu-perspective.jpg" path="hipe-menu-perspective.jpg" size="11574" user="Main.JorgoBakker" version="1"
 
META FILEATTACHMENT attr="h" autoattached="1" comment="My JIDE perspective" date="1200322562" name="myjide.jpg" path="myjide.jpg" size="7443" user="Main.JorgoBakker" version="1"
Added:
>
>
META FILEATTACHMENT attr="h" autoattached="1" comment="HIPE Perspective menu" date="1341415119" name="hipe-menu-perspective.png" path="hipe-menu-perspective.png" size="25234" user="Main.DavideRizzo" version="1"
 
META TOPICMOVED by="DavideRizzo" date="1272528021" from="Hcss.DpHipePerspectives" to="Public.DpHipePerspectives"

Revision 152012-05-14 - DavideRizzo

Line: 1 to 1
 
META TOPICPARENT name="DpHipe"

Revision 142011-06-27 - JaimeSaiz

Line: 1 to 1
 
META TOPICPARENT name="DpHipe"

Revision 132011-06-24 - DavideRizzo

Line: 1 to 1
 
META TOPICPARENT name="DpHipe"
Added:
>
>
<-- 
  • Set TOPICTITLE = Creating a perspective
-->

PDF Version Portrait Landscape

Help Did you spot something wrong or missing on this page? If you have an account on this TWiki, you can fix it yourself by editing the page. If you don't have an account, you can send a message to the Editorial Board to tell us about it. Thank you in advance!

 

Creating a Perspective

Line: 139 to 147
 
Added:
>
>
Please add your comments!
<--/commentPlugin-->
 
<--  
-->

Revision 122010-06-10 - DavideRizzo

Line: 1 to 1
 
META TOPICPARENT name="DpHipe"

Creating a Perspective

Line: 15 to 15
 

Basic Steps

Revision 112010-05-17 - DavideRizzo

Line: 1 to 1
 
META TOPICPARENT name="DpHipe"

Creating a Perspective

Line: 140 to 140
 
Added:
>
>
<--  
-->
 
META FILEATTACHMENT attr="h" autoattached="1" comment="HIPE Perspective menu" date="1200322809" name="hipe-menu-perspective.jpg" path="hipe-menu-perspective.jpg" size="11574" user="Main.JorgoBakker" version="1"
META FILEATTACHMENT attr="h" autoattached="1" comment="My JIDE perspective" date="1200322562" name="myjide.jpg" path="myjide.jpg" size="7443" user="Main.JorgoBakker" version="1"
META TOPICMOVED by="DavideRizzo" date="1272528021" from="Hcss.DpHipePerspectives" to="Public.DpHipePerspectives"

Revision 102010-04-29 - DavideRizzo

Line: 1 to 1
 
META TOPICPARENT name="DpHipe"

Creating a Perspective

Line: 25 to 25
 
Changed:
<
<
>
>
 

Line: 33 to 33
 
Changed:
<
<
>
>
  -->
Line: 142 to 142
 
META FILEATTACHMENT attr="h" autoattached="1" comment="HIPE Perspective menu" date="1200322809" name="hipe-menu-perspective.jpg" path="hipe-menu-perspective.jpg" size="11574" user="Main.JorgoBakker" version="1"
META FILEATTACHMENT attr="h" autoattached="1" comment="My JIDE perspective" date="1200322562" name="myjide.jpg" path="myjide.jpg" size="7443" user="Main.JorgoBakker" version="1"
Added:
>
>
META TOPICMOVED by="DavideRizzo" date="1272528021" from="Hcss.DpHipePerspectives" to="Public.DpHipePerspectives"

Revision 92009-12-02 - DavideRizzo

Line: 1 to 1
 
META TOPICPARENT name="DpHipe"

Creating a Perspective

Line: 12 to 12
 
Added:
>
>
 

Revision 82008-08-19 - JaimeSaiz

Line: 1 to 1
 
META TOPICPARENT name="DpHipe"

Creating a Perspective

Line: 94 to 94
  // get pointers to the views and editor area ViewPartManager vm = builder.getViewManager();
Changed:
<
<
SitePart editors = vm.getEditor();
>
>
SitePart editors = vm.getEditorArea();
  SitePart console = vm.getViewByTitle("Console"); SitePart history = vm.getViewByTitle("History");

Revision 72008-02-08 - JorgoBakker

Line: 1 to 1
 
META TOPICPARENT name="DpHipe"

Creating a Perspective

Line: 12 to 12
 
Added:
>
>
<--
   Some short-cuts  

-->
 

Basic Steps

HIPE Perspective menu
The aim is that your contribution is automatically picked up by the infrastructure, such that your perspective is added to the perspective menu, as shown in the picture on the right.

To make this happen, you will have to:

Changed:
<
<
  • Implement the herschel.ia.kernel.parts.Perspective interface.
  • Register your implementation to the herschel.ia.kernel.ExtensionRegistry in the __init__.py
>
>
  • Implement the Perspective interface.
  • Register your implementation to the Extension Registry in the init.py.
 
Changed:
<
<
For you convenience an abstract implementation exists (herschel.ia.kernel.parts.AbstractPerspective); it allows you to concentrate on implementing one method only:
>
>
For you convenience an abstract implementation exists (AbstractPerspective); it allows you to concentrate on implementing one method only:
 
    public abstract class AbstractPerspective implements Perspective {

Line: 36 to 60
 

Construction items

Changed:
<
<
SiteParts are the building blocks of a perspective. We distinct the following flavors:
>
>
SiteParts are the building blocks of a perspective. We distinct the following flavors:
 
  • ViewPart - normal views
  • EditorArea - the editor area
  • SplitPart - two windows with a movable split
  • TabPart - n windows organized into tabs
Changed:
<
<
Access to the views, editor area or creation of the tab and split layout containers are all through the SitePartBuilder:
>
>
Access to the views, editor area or creation of the tab and split layout containers are all through the SitePartBuilder:
 
public interface SitePartBuilder {
    ViewPartManager getViewManager();    

Revision 62008-01-15 - JaimeSaiz

Line: 1 to 1
 
META TOPICPARENT name="DpHipe"

Creating a Perspective

Line: 18 to 18
 The aim is that your contribution is automatically picked up by the infrastructure, such that your perspective is added to the perspective menu, as shown in the picture on the right.

To make this happen, you will have to:

Changed:
<
<
  • Implement the herschel.ia.core.parts.Perspective interface.
  • Register your implementation to the herschel.ia.core.ExtensionRegistry in the __init__.py
>
>
  • Implement the herschel.ia.kernel.parts.Perspective interface.
  • Register your implementation to the herschel.ia.kernel.ExtensionRegistry in the __init__.py
 
Changed:
<
<
For you convenience an abstract implementation exists (herschel.ia.core.parts.AbstractPerspective); it allows you to concentrate on implementing one method only:
>
>
For you convenience an abstract implementation exists (herschel.ia.kernel.parts.AbstractPerspective); it allows you to concentrate on implementing one method only:
 
    public abstract class AbstractPerspective implements Perspective {

Revision 52008-01-15 - JorgoBakker

Line: 1 to 1
 
META TOPICPARENT name="DpHipe"

Creating a Perspective

<-- summary -->
Changed:
<
<
If you think that a set of (new) views should be presented in convenient way, you can do so by creating a new perspective. Such a perspective defines
>
>
If you think that a set of (new) views should be presented in standard layout, you can do so by creating a new perspective. Such a perspective defines
 how these views are layed out in tabs and split panes. This section briefly explains how to contribute a new perspective.
Added:
>
>
See also the overview page.
 
Line: 99 to 100
 The following snippet, could then go into your __init__.py:


Deleted:
<
<
# import from herschel.ia.core import ExtensionRegistry, Extension PERSPECTIVE=ExtensionRegistry.PERSPECTIVE REGISTRY=ExtensionRegistry.getInstance()

# registry

 REGISTRY.register(PERSPECTIVE, Extension( "site.perspective.myjide", # a unique ID "resides.in.java.package.MyJidePerspective", # the above implementation "My JIDE", # how it should be called in the menu None # possible icon (none here)
Changed:
<
<
));

# cleanup del(ExtensionRegistry,Extension,REGISTRY,PERSPECTIVE)

>
>
))
 
Added:
>
>
See also the Extension Registry documentation for more details.
 

Revision 42008-01-15 - JorgoBakker

Line: 1 to 1
 
META TOPICPARENT name="DpHipe"

Creating a Perspective

Line: 13 to 13
 

Basic Steps

HIPE Perspective menu
Changed:
<
<
>
>
 The aim is that your contribution is automatically picked up by the infrastructure, such that your perspective is added to the perspective menu, as shown in the picture on the right.

To make this happen, you will have to:

Line: 29 to 29
  }
Added:
>
>
 

Construction items

Changed:
<
<
>
>
 SiteParts are the building blocks of a perspective. We distinct the following flavors:
  • ViewPart - normal views
  • EditorArea - the editor area
Line: 49 to 50
  SplitPart buildSplit(float split, boolean horizontal, SitePart lhs, SitePart rhs); }
Added:
>
>
 

Example

Added:
>
>
The above is explained by an example in which we are going to create a perspective with a familiar layout and register it to HIPE.
 

Implementation

Changed:
<
<
>
>
 The implementation below reflects a classic JIDE layout. My JIDE implementation
Line: 87 to 91
 
  • Creation of split panes that hold the views. First we create the bottom part (console and history), and then split the window into a top part (being the editor area) and the bottom part we just created.
  • The last part is returning the created site part.
Changed:
<
<
>
>
 
Deleted:
<
<
 

Registry

Changed:
<
<
>
>
 The following snippet, could then go into your __init__.py:


Line: 112 to 115
 # cleanup del(ExtensionRegistry,Extension,REGISTRY,PERSPECTIVE)
Added:
>
>
 
Added:
>
>
 
META FILEATTACHMENT attr="h" autoattached="1" comment="HIPE Perspective menu" date="1200322809" name="hipe-menu-perspective.jpg" path="hipe-menu-perspective.jpg" size="11574" user="Main.JorgoBakker" version="1"
META FILEATTACHMENT attr="h" autoattached="1" comment="My JIDE perspective" date="1200322562" name="myjide.jpg" path="myjide.jpg" size="7443" user="Main.JorgoBakker" version="1"

Revision 32008-01-14 - JorgoBakker

Line: 1 to 1
 
META TOPICPARENT name="DpHipe"

Creating a Perspective

Line: 14 to 14
 

Basic Steps

HIPE Perspective menu
Changed:
<
<
The aim is that your contribution is automatically picked up by the infrastructure, such that your perspective is added to the perspective menu, as shown in the picture on the right.
>
>
The aim is that your contribution is automatically picked up by the infrastructure, such that your perspective is added to the perspective menu, as shown in the picture on the right.
  To make this happen, you will have to:
  • Implement the herschel.ia.core.parts.Perspective interface.

Revision 22008-01-14 - JorgoBakker

Line: 1 to 1
 
META TOPICPARENT name="DpHipe"

Creating a Perspective

Deleted:
<
<
HIPE Perspective menu
 
<-- summary -->
If you think that a set of (new) views should be presented in convenient way, you can do so by creating a new perspective. Such a perspective defines how these views are layed out in tabs and split panes. This section briefly explains how to contribute a new perspective.
Deleted:
<
<
 
Changed:
<
<

>
>
 

Basic Steps

Added:
>
>
HIPE Perspective menu
 
Added:
>
>
The aim is that your contribution is automatically picked up by the infrastructure, such that your perspective is added to the perspective menu, as shown in the picture on the right.

To make this happen, you will have to:

 
  • Implement the herschel.ia.core.parts.Perspective interface.
  • Register your implementation to the herschel.ia.core.ExtensionRegistry in the __init__.py
Line: 30 to 30
  }
Added:
>
>

 

Construction items

Line: 49 to 50
 }
Changed:
<
<

Example Implementation

>
>

Example

Implementation

  The implementation below reflects a classic JIDE layout. My JIDE implementation
Line: 78 to 81
  }
Added:
>
>
The above code is divided into three stages:
  • Getting hold of the views you are interested in. This is done by asking the builder for the view manager. Then you grab existing views either by title or by a view's unique identifier.
  • Creation of split panes that hold the views. First we create the bottom part (console and history), and then split the window into a top part (being the editor area) and the bottom part we just created.
  • The last part is returning the created site part.
 
Changed:
<
<

Example Registry

>
>

Registry

  The following snippet, could then go into your __init__.py:

Revision 12008-01-14 - JorgoBakker

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="DpHipe"

Creating a Perspective

HIPE Perspective menu

<-- summary -->
If you think that a set of (new) views should be presented in convenient way, you can do so by creating a new perspective. Such a perspective defines how these views are layed out in tabs and split panes. This section briefly explains how to contribute a new perspective.


Basic Steps

  • Implement the herschel.ia.core.parts.Perspective interface.
  • Register your implementation to the herschel.ia.core.ExtensionRegistry in the __init__.py

For you convenience an abstract implementation exists (herschel.ia.core.parts.AbstractPerspective); it allows you to concentrate on implementing one method only:

    public abstract class AbstractPerspective implements Perspective {
    
	public abstract SitePart doLayout(SitePartBuilder builder);
    
    }

Construction items

SiteParts are the building blocks of a perspective. We distinct the following flavors:

  • ViewPart - normal views
  • EditorArea - the editor area
  • SplitPart - two windows with a movable split
  • TabPart - n windows organized into tabs

Access to the views, editor area or creation of the tab and split layout containers are all through the SitePartBuilder:

public interface SitePartBuilder {
    ViewPartManager getViewManager();    
    TabbedPart buildTabs(SitePart... parts);
    SplitPart buildSplit(float split, boolean horizontal, SitePart lhs, SitePart rhs);    
}

Example Implementation

The implementation below reflects a classic JIDE layout. My JIDE implementation

public final class MyJidePerspective extends AbstractPerspective {

    @Override
    public SitePart doLayout(SitePartBuilder builder) {
        // get pointers to the views and editor area
	ViewPartManager vm = builder.getViewManager();

	SitePart editors = vm.getEditor();
	SitePart console = vm.getViewByTitle("Console");
	SitePart history = vm.getViewByTitle("History");

	// actual layout:
	boolean vert = false;
	boolean hori = true;

        SitePart bottom = builder.buildSplit(0.7f, hori, console, history);
	SitePart window = builder.buildSplit(0.7f, vert, editors, bottom);

	return window;
    }

}

Example Registry

The following snippet, could then go into your __init__.py:

# import
from herschel.ia.core import ExtensionRegistry, Extension
PERSPECTIVE=ExtensionRegistry.PERSPECTIVE
REGISTRY=ExtensionRegistry.getInstance()

# registry
REGISTRY.register(PERSPECTIVE, Extension(
         "site.perspective.myjide",                   # a unique ID
         "resides.in.java.package.MyJidePerspective", # the above implementation
         "My JIDE",                                   # how it should be called in the menu
         None                                         # possible icon (none here)
         ));

# cleanup
del(ExtensionRegistry,Extension,REGISTRY,PERSPECTIVE)

META FILEATTACHMENT attr="h" autoattached="1" comment="HIPE Perspective menu" date="1200322809" name="hipe-menu-perspective.jpg" path="hipe-menu-perspective.jpg" size="11574" user="Main.JorgoBakker" version="1"
META FILEATTACHMENT attr="h" autoattached="1" comment="My JIDE perspective" date="1200322562" name="myjide.jpg" path="myjide.jpg" size="7443" user="Main.JorgoBakker" version="1"
 
This site is powered by the TWiki collaboration platform Powered by Perl