Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-ui-dev] Setting the Editor Threshold


What about my concern that a user can not change this afterwards?

Dani



Eduardo_Pereira@xxxxxxx
Sent by: platform-ui-dev-admin@xxxxxxxxxxx

01/31/02 05:52 PM
Please respond to platform-ui-dev

       
        To:        platform-ui-dev@xxxxxxxxxxx
        cc:        platform-ui-dev@xxxxxxxxxxx
        Subject:        Re: [platform-ui-dev] Setting the Editor Threshold



The API was added to IWorkbenchPage but I agree that moving it to IPageLayout would be better.


We did not think that would be necessary to allow the user to change the number of open editors for each kind of page but yes it is possible to add it to the page customization. This way, for example, the user could have a global preference "5", the debugger could programmatically change it to "1" and the user could overwrite it to be "3".


Eduardo.



Daniel_Megert@xxxxxxx
Sent by: platform-ui-dev-admin@xxxxxxxxxxx

01/31/2002 05:15 AM
Please respond to platform-ui-dev

       
       To:        platform-ui-dev@xxxxxxxxxxx
       cc:        
       Subject:        [platform-ui-dev] Setting the Editor Threshold




>There are two API in WorkbenchPage related to editor management:

>        public int
getEditorReuseThreshold();
>        
public void setEditorReuseThreshold(int openEditors);
>The idea is that  each page has a number of editors opened before they are reused and editors are reused in the order they were activated. This number is got from t
>he workbench preference page (Number of opened editors before reusing) but can be overwritten programmatically. For example the debugger perspective could >overwrite it to be "1".

If this is a page feature then I would like to set this directly on the page layout (IPageLayout) when the perspective factory creates my page (layout). Since this is not possible, what is the suggested way and how can the user change the behavior (users should be able to reconfigure any pre-configured perspective)?

Dani
Eduardo_Pereira@xxxxxxx
Sent by: platform-ui-dev-admin@xxxxxxxxxxx

01/30/02 09:26 PM
Please respond to platform-ui-dev

       
      To:        platform-ui-dev@xxxxxxxxxxx
      cc:        
      Subject:        Re: [platform-ui-dev] How do I ask if editor is pinned?





There is no API that returns if an editor is pinned or not.

The idea is that you should not do editor management. It should be done at the workbench level. So search, debugger and any other plugin that open editors would have the same behavior.

There are two API in WorkbenchPage related to editor management:

     public int
getEditorReuseThreshold();
     
public void setEditorReuseThreshold(int openEditors);
The idea is that  each page has a number of editors opened before they are reused and editors are reused in the order they were activated. This number is got from the workbench preference page (Number of opened editors before reusing) but can be overwritten programmatically. For example the debugger perspective could overwrite it to be "1".

I would expect Search to open the editors and let them be closed according the number set by the user. I have hacked the Debugger to do it and I liked the result but I did not try Search.

PS: As a user I would like to see a "Search perspective" which I could open in another window instead of having only a view.
That way the search would not change the context of the perspective I am developing in.

Eduardo.

Daniel_Megert@xxxxxxx
Sent by: platform-ui-dev-admin@xxxxxxxxxxx

01/30/2002 12:44 PM
Please respond to platform-ui-dev

       
     To:        platform-ui-dev@xxxxxxxxxxx
     cc:        
     Subject:        [platform-ui-dev] How do I ask if editor is pinned?






I need to know if an editor is pinned. I could not find the corresponding API.

Background: Search reuses non-dirty editors and therefore currently also reuses a pinned editor (bug 8765). To fix it I need the above API.

Dani





Back to the top