All Downloads are FREE. Search and download functionalities are using the official Maven repository.

schema.rulerColumns.exsd Maven / Gradle / Ivy

There is a newer version: 3.18.0
Show newest version




      
         
      
      
         Ruler column contributions are line based information areas that are normally shown in the vertical ruler area of a textual editor.
      
   

   
      
         
            
         
         
            
               
                  a fully qualified identifier of the target extension point
               
            
         
         
            
               
                  an optional identifier of the extension instance
               
            
         
         
            
               
                  an optional name of the extension instance
               
               
                  
               
            
         
      
   

   
      
         
            
         
         
            The specification of a ruler column contribution.
         
      
      
         
            
               
               
               
            
            
         
         
            
               
                  the unique id of this column
               
            
         
         
            
               
                  an optional name of the column, may be used in the user interface (e.g. in preference pages)
               
               
                  
               
            
         
         
            
               
                  an optional icon for the column. May be used in the user interface, for example on preference pages.
               
               
                  
               
            
         
         
            
               
                  the class implementing the column; must implement <code>org.eclipse.ui.texteditor.rulers.IContributedRulerColumn</code>
               
               
                  
               
            
         
         
            
               
                  the default enablement state of this column
               
            
         
         
            
               
                  controls whether toggling the visibility of this column operates on all targeted editors, or only the active editor. If true, the ruler is added to all applicable editors when the user enables the column; if false, the ruler is only added to the active editor.
               
            
         
         
            
               
                  whether to include a "Show/Hide" menu entry for this column in the ruler context menu
               
            
         
      
   

   
      
         
            Describes an editor that the column is contributed to.  See the <tt>org.eclipse.ui.editors</tt> extension point. Note that the rulerColumns extension point is typically only supported by line based text editors.
         
      
      
         
            
               
                  the editor id of the target editor
               
               
                  
               
            
         
      
   

   
      
         
            Describes a content type that the column is contributed to. See the <tt>org.eclipse.core.runtime.contentTypes</tt> extension point. Note that the rulerColumns extension point is typically only supported by line based text editors.
         
      
      
         
            
               
                  the id of the target content type
               
            
         
      
   

   
      
         
            Describes an editor class that the column is contributed to. Subclasses of the specified class are also targeted by this colum contribution.
         
      
      
         
            
               
                  the fully qualified name of a class implementing <code>org.eclipse.ui.texteditor.ITextEditor</code>. The class does not need to be instantiatable. Note that contributing ruler columns to an internal editor class outside of the contributor's namespace is considered bad practice, as the class name may change without notice.
               
               
                  
               
            
         
      
   

   
      
         
            Describes the placement of this ruler column relative to other contributed columns. A column may request to be placed <em>before</em> or <em>after</em> other known columns (identified by their <tt>id</tt>). Columns that would end up at the same position are ordered by <em>gravity</em> (see below). If the ordering is contradicting or no ordering can be found that fulfills all placement requests, some placement requirements are dropped until the placement can be achieved. If a column does not fully specify its placement it will be placed at an arbitrary but consistent location.
         
      
      
         
            
               
               
            
         
         
            
               
                  a float number between 0.0 and 1.0 that tells how close the column wants to be to the editor, where 0.0 means as far away as possible and 1.0 means as close as possible. After all <i>before</i> and <i>after</i> constraints are evaluated, columns that would end up at the same position are ordered by their <i>gravity</i> value.
               
            
         
      
   

   
      
         
            Requests placement before another column. The meaning of <i>before</i> is similar to the SWT.LEAD flag: In left-to-right environments, <i>before</i> means <i>to the left of</i>, in right-to-left environments, it means <i>to the right of</i>.
         
      
      
         
            
               
                  the id of another <tt>rulerColumns</tt> contribution
               
               
                  
               
            
         
      
   

   
      
         
            Requests placement after another column. The meaning of <i>after</i> is similar to the SWT.TRAIL flag: In left-to-right environments, <i>after</i> means <i>to the right of</i>, in right-to-left environments, it means <i>to the left of</i>.
         
      
      
         
            
               
                  the id of another <tt>rulerColumns</tt> contribution
               
               
                  
               
            
         
      
   

   
      
         
      
      
         3.3
      
   

   
      
         
      
      
         The following is an example of a ruler column definition:
<pre>
<extension
  point="org.eclipse.ui.workbench.texteditor.rulerColumns">
  <column
    id="org.eclipse.ui.editors.columns.linenumbers"
    name="Line Numbers"
    class="org.eclipse.ui.internal.texteditor.LineNumberColumn"
    enabled="false"
    global="true"
    includeInMenu="false">
    <placement
       gravity="0.9">
       <after id="org.eclipse.ui.editors.columns.annotations"/>
    </placement>
    <targetClass
       class="org.eclipse.ui.texteditor.AbstractDecoratedTextEditor">
    </targetClass>
  </column>
</extension>
</pre>
      
   

   
      
         
      
      
         The extension point is supported by the <tt>org.eclipse.ui.texteditor.rulers</tt> package. <code>RulerColumnRegistry</code> gives access to all contributions, which in turn are described by <code>RulerColumnDescriptor</code> instances.
<p>Editors that want to support the extension point need to provide an adapter for <code>IColumnSupport</code>. <code>AbstractTextEditor</code> already adapts to <code>IColumnSupport</code> and hence its subclasses should override <code>createColumnSupport()</code> with the suggested implementation, rather than providing the adapter again. Subclasses of <code>AbstractDecoratedTextEditor</code> automatically have this support installed.</p>
      
   

   
      
         
      
      
         All ruler column contributions must implement <code>org.eclipse.ui.texteditor.rulers.IContributedRulerColumn</code>. Many contributors will find the supplied <code>org.eclipse.ui.texteditor.rulers.AbstractContributedRulerColumn</code> useful which serves as super class for contributed ruler columns. Others might start off <code>org.eclipse.jface.text.source.AbstractRulerColumn</code> which takes over most painting and scrolling aspects of a line based column and can be extended at various granularity levels. Those subclassing the latter class will have to implement <code>org.eclipse.ui.texteditor.rulers.IContributedRulerColumn</code> on their own by using <code>org.eclipse.ui.texteditor.rulers.AbstractContributedRulerColumn</code> as template.
      
   

   
      
         
      
      
         Copyright (c) 2006, 2008 IBM Corporation and others.<br>
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
      
   






© 2015 - 2024 Weber Informatics LLC | Privacy Policy