directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r684324 - in /directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor: EntryEditorWidgetContentProvider.java EntryEditorWidgetUniversalListener.java
Date Sat, 09 Aug 2008 20:02:19 GMT
Author: seelmann
Date: Sat Aug  9 13:02:19 2008
New Revision: 684324

URL: http://svn.apache.org/viewvc?rev=684324&view=rev
Log:
Fix for DIRSTUDIO-361: show operational attributes if an operational attribute was added

Modified:
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetContentProvider.java
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetUniversalListener.java

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetContentProvider.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetContentProvider.java?rev=684324&r1=684323&r2=684324&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetContentProvider.java
(original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetContentProvider.java
Sat Aug  9 13:02:19 2008
@@ -135,7 +135,7 @@
 
             boolean oai = entry.isOperationalAttributesInitialized();
             boolean ai = entry.isAttributesInitialized();
-            if ( ( !ai || ( !oai && showOperationalAttributes ) ) && entry.isDirectoryEntry()
)
+            if ( ( !ai || ( !oai && showOperationalAttributes && entry.isConsistent()
) ) && entry.isDirectoryEntry() )
             {
                 InitializeAttributesRunnable runnable = new InitializeAttributesRunnable(
new IEntry[]
                     { entry }, showOperationalAttributes );

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetUniversalListener.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetUniversalListener.java?rev=684324&r1=684323&r2=684324&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetUniversalListener.java
(original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetUniversalListener.java
Sat Aug  9 13:02:19 2008
@@ -22,6 +22,7 @@
 
 
 import org.apache.directory.studio.ldapbrowser.common.BrowserCommonActivator;
+import org.apache.directory.studio.ldapbrowser.common.BrowserCommonConstants;
 import org.apache.directory.studio.ldapbrowser.common.actions.BrowserSelectionUtils;
 import org.apache.directory.studio.ldapbrowser.core.events.BulkModificationEvent;
 import org.apache.directory.studio.ldapbrowser.core.events.EmptyValueAddedEvent;
@@ -167,7 +168,6 @@
      */
     public void entryUpdated( EntryModificationEvent event )
     {
-
         if ( viewer == null || viewer.getTree() == null || viewer.getTree().isDisposed()
|| viewer.getInput() == null
             || ( event.getModifiedEntry() != viewer.getInput() && !( event instanceof
BulkModificationEvent ) ) )
         {
@@ -203,8 +203,19 @@
         }
         else if ( event instanceof EmptyValueAddedEvent )
         {
-            // select the added value and start editing
             EmptyValueAddedEvent evaEvent = ( EmptyValueAddedEvent ) event;
+
+            // show operational attributes if an operational attribute was added
+            if ( evaEvent.getAddedValue().getAttribute().isOperationalAttribute() &&

+                !BrowserCommonActivator.getDefault().getPreferenceStore().getBoolean(
+                    BrowserCommonConstants.PREFERENCE_ENTRYEDITOR_SHOW_OPERATIONAL_ATTRIBUTES
)
+                )
+            {
+                BrowserCommonActivator.getDefault().getPreferenceStore().setValue(
+                    BrowserCommonConstants.PREFERENCE_ENTRYEDITOR_SHOW_OPERATIONAL_ATTRIBUTES,
true );
+            }
+
+            // select the added value and start editing
             viewer.setSelection( new StructuredSelection( evaEvent.getAddedValue() ), true
);
             if ( startEditAction.isEnabled() )
             {



Mime
View raw message