Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How to maximize/restore view?
How to maximize/restore view? [message #782869] Tue, 24 January 2012 16:15 Go to next message
Marc Eckart is currently offline Marc EckartFriend
Messages: 9
Registered: January 2012
Junior Member
I want the same behaviour like in eclipse when double click on a view and it gets maximized. I configured my views with the plugin-xml. I can move them, but I can't maximize them. I disabled the editorarea. I just have views, no editors.

Is it possible to have the maximize and restore feature and forbid to minimize or close the view?

   <extension
         point="org.eclipse.ui.views">
      <view
            allowMultiple="false"
            class="de.agrar.fieldrecord.views.company.CompanyView"
            id="de.agrar.fieldrecord.views.CompanyView"
            name="Betrieb"
            restorable="true">
      </view>
      <view
            class="de.agrar.fieldrecord.views.field.FieldView"
            id="de.agrar.fieldrecord.views.FieldView"
            name="Schläge"
            restorable="true">
      </view>
      <view
            class="de.agrar.fieldrecord.views.field.FieldDetailsView"
            id="de.agrar.fieldrecord.views.FieldDetailsView"
            name="Details des Schlages"
            restorable="true">
      </view>
      <view
            allowMultiple="false"
            class="de.agrar.fieldrecord.views.sowing.SowingView"
            id="de.agrar.fieldrecord.views.SowingView"
            name="Aussaat"
            restorable="true">
      </view>
      <view
            class="de.agrar.fieldrecord.views.fertilization.FertilizationView"
            id="de.agrar.fieldrecord.views.FertilizationView"
            name="Düngung"
            restorable="true">
      </view>
      <view
            class="de.agrar.fieldrecord.views.plantprotection.PlantProtectionView"
            id="de.agrar.fieldrecord.views.PlantProtectionView"
            name="Pflanzenschutz seit Ernte Vorfrucht"
            restorable="true">
      </view>
      <view
            class="de.agrar.fieldrecord.views.soiltesting.SoilTestingView"
            id="de.agrar.fieldrecord.views.SoilTestingView"
            name="Bodenuntersuchung"
            restorable="true">
      </view>
      <view
            class="de.agrar.fieldrecord.views.harvest.HarvestView"
            id="de.agrar.fieldrecord.views.HarvestView"
            name="Ernte"
            restorable="true">
      </view>
   </extension>
   <extension
         point="org.eclipse.ui.perspectiveExtensions">
      <perspectiveExtension
            targetID="de.agrar.fieldrecord.perspective">
         <view
               closeable="false"
               id="de.agrar.fieldrecord.views.CompanyView"
               minimized="false"
               moveable="true"
               ratio="0.2f"
               relationship="top"
               relative="org.eclipse.ui.editorss"
               showTitle="true"
               standalone="false"
               visible="true">
         </view>
         <view
               id="de.agrar.fieldrecord.views.FieldView"
               moveable="true"
               ratio="0.2"
               relationship="bottom"
               relative="de.agrar.fieldrecord.views.CompanyView"
               visible="true">
         </view>
         <view
               id="de.agrar.fieldrecord.views.FieldDetailsView"
               moveable="true"
               ratio="0.7"
               relationship="bottom"
               relative="de.agrar.fieldrecord.views.FieldView"
               standalone="true"
               visible="true">
         </view>
         <view
               id="de.agrar.fieldrecord.views.SowingView"
               minimized="false"
               moveable="true"
               ratio="0.25"
               relationship="right"
               relative="de.agrar.fieldrecord.views.FieldView"
               visible="true">
         </view>
         <view
               id="de.agrar.fieldrecord.views.FertilizationView"
               minimized="false"
               moveable="true"
               ratio="0.3"
               relationship="bottom"
               relative="de.agrar.fieldrecord.views.SowingView"
               visible="true">
         </view>
         <view
               closeable="false"
               id="de.agrar.fieldrecord.views.PlantProtectionView"
               minimized="false"
               moveable="true"
               ratio="0.5"
               relationship="bottom"
               relative="de.agrar.fieldrecord.views.FertilizationView"
               visible="true">
         </view>
         <view
               id="de.agrar.fieldrecord.views.SoilTestingView"
               minimized="false"
               moveable="true"
               ratio="0.25"
               relationship="right"
               relative="de.agrar.fieldrecord.views.FieldDetailsView"
               standalone="true"
               visible="true">
         </view>
         <view
               id="de.agrar.fieldrecord.views.HarvestView"
               minimized="false"
               moveable="true"
               ratio="0.70"
               relationship="right"
               relative="de.agrar.fieldrecord.views.SoilTestingView"
               standalone="true"
               visible="true">
         </view>
         
      </perspectiveExtension>
   </extension>

[Updated on: Tue, 24 January 2012 16:17]

Report message to a moderator

Re: How to maximize/restore view? [message #786722 is a reply to message #782869] Mon, 30 January 2012 19:00 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

You can use org.eclipse.ui.IWorkbenchPage.toggleZoom(IWorkbenchPartReference) or org.eclipse.ui.IWorkbenchPage.setPartState(IWorkbenchPartReference, int) within the restrictions of maximized parts (i.e. only one view can be maximized, and then it should be restored before moving onto the next behaviour).

PW


Re: How to maximize/restore view? [message #787983 is a reply to message #786722] Wed, 01 February 2012 07:52 Go to previous messageGo to next message
Marc Eckart is currently offline Marc EckartFriend
Messages: 9
Registered: January 2012
Junior Member
Thx,

But I was wondering how I can get the maximize and restore icons in the views. At the moment they are not displayed.

/Marc
Re: How to maximize/restore view? [message #789064 is a reply to message #787983] Thu, 02 February 2012 15:13 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Oh, they're not part of your view stacks? Is your perspective fixed?

PW


Re: How to maximize/restore view? [message #789784 is a reply to message #789064] Fri, 03 February 2012 12:00 Go to previous messageGo to next message
Marc Eckart is currently offline Marc EckartFriend
Messages: 9
Registered: January 2012
Junior Member
Ahh, my bad, I overlooked, that I set the fixed property to true in the plugin.xml.
Now it behaves like I want to.

Another question: Is it possible to disable the minimize icon? So that the user just can maximize and restore a view but not minimize it?

Thanks!

/Marc
Re: How to maximize/restore view? [message #789850 is a reply to message #789784] Fri, 03 February 2012 13:46 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

No, I don't believe they're separately configurable.

PW


Previous Topic:JavaScript Error on Eclipse Indigo Service Release 1
Next Topic:weird behaviour of compare editor
Goto Forum:
  


Current Time: Fri Apr 19 02:40:30 GMT 2024

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

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

Back to the top