directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1214696 - /directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/EditorsUtils.java
Date Thu, 15 Dec 2011 10:54:31 GMT
Author: pamarcelot
Date: Thu Dec 15 10:54:31 2011
New Revision: 1214696

URL: http://svn.apache.org/viewvc?rev=1214696&view=rev
Log:
Part of a fix for DIRSTUDIO-446 (Allow the user to rename any item using the F2 shortcut).
Updated LabelProvider to match the format of other label providers of the Eclipse platform.

Modified:
    directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/EditorsUtils.java

Modified: directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/EditorsUtils.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/EditorsUtils.java?rev=1214696&r1=1214695&r2=1214696&view=diff
==============================================================================
--- directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/EditorsUtils.java
(original)
+++ directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/EditorsUtils.java
Thu Dec 15 10:54:31 2011
@@ -118,7 +118,21 @@ public class EditorsUtils
 
             public String getText( Object element )
             {
-                return ( ( IEditorPart ) element ).getTitle();
+                IEditorPart editorPart = ( IEditorPart ) element;
+
+                StringBuilder sb = new StringBuilder();
+                sb.append( editorPart.getTitle() );
+
+                String tooltip = editorPart.getTitleToolTip();
+
+                if ( ( tooltip != null ) && ( !"".equals( tooltip ) ) )
+                {
+                    sb.append( " [" );
+                    sb.append( tooltip );
+                    sb.append( "]" );
+                }
+
+                return sb.toString();
             }
         };
     }



Mime
View raw message