directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r820703 - in /directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio: entryeditors/ ldapbrowser/ui/editors/entry/ ldapbrowser/ui/editors/searchresult/
Date Thu, 01 Oct 2009 16:19:10 GMT
Author: pamarcelot
Date: Thu Oct  1 16:19:09 2009
New Revision: 820703

URL: http://svn.apache.org/viewvc?rev=820703&view=rev
Log:
Fix tooltips and navigation text.

Modified:
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/entryeditors/EntryEditorInput.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/entryeditors/EntryEditorUtils.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/entry/SingleTabEntryEditor.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorNavigationLocation.java

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/entryeditors/EntryEditorInput.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/entryeditors/EntryEditorInput.java?rev=820703&r1=820702&r2=820703&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/entryeditors/EntryEditorInput.java
(original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/entryeditors/EntryEditorInput.java
Thu Oct  1 16:19:09 2009
@@ -22,6 +22,7 @@
 
 
 import org.apache.directory.studio.ldapbrowser.core.model.IBookmark;
+import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearchResult;
 import org.apache.directory.studio.ldapbrowser.ui.BrowserUIPlugin;
@@ -139,7 +140,22 @@
      */
     public String getToolTipText()
     {
-        return getResolvedEntry() != null ? getResolvedEntry().getDn().getUpName() : "";
//$NON-NLS-1$
+        if ( getResolvedEntry() != null )
+        {
+            IEntry entry = getResolvedEntry();
+            IBrowserConnection connection = entry.getBrowserConnection();
+            if ( connection != null )
+            {
+                return entry.getDn().getUpName() + " - " + connection.getConnection().getName();//$NON-NLS-1$
+            }
+            else
+            {
+                return entry.getDn().getUpName();
+            }
+        }
+
+        return ""; //$NON-NLS-1$
+
     }
 
 

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/entryeditors/EntryEditorUtils.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/entryeditors/EntryEditorUtils.java?rev=820703&r1=820702&r2=820703&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/entryeditors/EntryEditorUtils.java
(original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/entryeditors/EntryEditorUtils.java
Thu Oct  1 16:19:09 2009
@@ -87,36 +87,39 @@
             {
                 if ( input.getEntryInput() instanceof IRootDSE )
                 {
-                    return Messages.getString( "EntryEditorNavigationLocation.RootDSE" );
//$NON-NLS-1$
+                    return Messages.getString( "EntryEditorNavigationLocation.RootDSE" )
+ " - " + input.getEntryInput().getBrowserConnection().getConnection().getName(); //$NON-NLS-1$
//$NON-NLS-2$
                 }
                 else
                 {
                     return NLS.bind( Messages.getString( "EntryEditorNavigationLocation.Entry"
), //$NON-NLS-1$
-                        input.getEntryInput().getDn().getUpName() );
+                        input.getEntryInput().getDn().getUpName() )
+                        + " - " + input.getEntryInput().getBrowserConnection().getConnection().getName();
//$NON-NLS-1$
                 }
             }
             else if ( input.getSearchResultInput() != null )
             {
                 if ( input.getSearchResultInput() instanceof IRootDSE )
                 {
-                    return Messages.getString( "EntryEditorNavigationLocation.RootDSE" );
//$NON-NLS-1$
+                    return Messages.getString( "EntryEditorNavigationLocation.RootDSE" )
+ " - " + input.getEntryInput().getBrowserConnection().getConnection().getName(); //$NON-NLS-1$
//$NON-NLS-2$
                 }
                 else
                 {
                     return NLS.bind( Messages.getString( "EntryEditorNavigationLocation.SearchResult"
), //$NON-NLS-1$
-                        input.getSearchResultInput().getDn().getUpName() );
+                        input.getSearchResultInput().getDn().getUpName() )
+                        + " - " + input.getSearchResultInput().getEntry().getBrowserConnection().getConnection().getName();
//$NON-NLS-1$
                 }
             }
             else if ( input.getBookmarkInput() != null )
             {
                 if ( input.getBookmarkInput() instanceof IRootDSE )
                 {
-                    return Messages.getString( "EntryEditorNavigationLocation.RootDSE" );
//$NON-NLS-1$
+                    return Messages.getString( "EntryEditorNavigationLocation.RootDSE" )
+ " - " + input.getEntryInput().getBrowserConnection().getConnection().getName(); //$NON-NLS-1$
//$NON-NLS-2$
                 }
                 else
                 {
                     return NLS.bind( Messages.getString( "EntryEditorNavigationLocation.Bookmark"
), //$NON-NLS-1$
-                        input.getBookmarkInput().getDn().getUpName() );
+                        input.getBookmarkInput().getDn().getUpName() )
+                        + " - " + input.getBookmarkInput().getBrowserConnection().getConnection().getName();
//$NON-NLS-1$
                 }
             }
         }

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/entry/SingleTabEntryEditor.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/entry/SingleTabEntryEditor.java?rev=820703&r1=820702&r2=820703&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/entry/SingleTabEntryEditor.java
(original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/entry/SingleTabEntryEditor.java
Thu Oct  1 16:19:09 2009
@@ -54,7 +54,7 @@
     @Override
     protected void setEditorName( EntryEditorInput eei )
     {
-        // nothing, keep the default
+        setPartName( eei.getName() );
     }
 
 }

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorNavigationLocation.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorNavigationLocation.java?rev=820703&r1=820702&r2=820703&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorNavigationLocation.java
(original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorNavigationLocation.java
Thu Oct  1 16:19:09 2009
@@ -60,7 +60,8 @@
         if ( search != null )
         {
             return NLS.bind(
-                Messages.getString( "SearchResultEditorNavigationLocation.Search" ), new
String[] { search.getName() } ); //$NON-NLS-1$
+                Messages.getString( "SearchResultEditorNavigationLocation.Search" ), new
String[] { search.getName() } ) //$NON-NLS-1$
+                + " - " + search.getBrowserConnection().getConnection().getName(); //$NON-NLS-1$

         }
         else
         {



Mime
View raw message