directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r692228 - in /directory/studio/trunk: connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/ ldapbrowser-common/src/main/java/o...
Date Thu, 04 Sep 2008 20:36:20 GMT
Author: seelmann
Date: Thu Sep  4 13:36:20 2008
New Revision: 692228

URL: http://svn.apache.org/viewvc?rev=692228&view=rev
Log:
Moved common configuration settings to the constructor

Modified:
    directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ExtendedContentAssistCommandAdapter.java
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/DnBuilderWidget.java
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/ModWidget.java
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/FilterWidget.java
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/AttributeTypeWizardPage.java

Modified: directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ExtendedContentAssistCommandAdapter.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ExtendedContentAssistCommandAdapter.java?rev=692228&r1=692227&r2=692228&view=diff
==============================================================================
--- directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ExtendedContentAssistCommandAdapter.java
(original)
+++ directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ExtendedContentAssistCommandAdapter.java
Thu Sep  4 13:36:20 2008
@@ -20,6 +20,7 @@
 package org.apache.directory.studio.connection.ui.widgets;
 
 
+import org.eclipse.jface.fieldassist.ContentProposalAdapter;
 import org.eclipse.jface.fieldassist.IContentProposalProvider;
 import org.eclipse.jface.fieldassist.IControlContentAdapter;
 import org.eclipse.swt.widgets.Control;
@@ -38,7 +39,14 @@
 {
 
     /**
-     * Creates a new instance of ExtendedContentAssistCommandAdapter.
+     * Creates a new instance of ExtendedContentAssistCommandAdapter 
+     * with the following settings:
+     * <ul>
+     * <li>setProposalAcceptanceStyle( ContentProposalAdapter.PROPOSAL_REPLACE )</li>
+     * <li>setFilterStyle( ContentProposalAdapter.FILTER_NONE )</li>
+     * <li>setAutoActivationCharacters( null )</li>
+     * <li>setAutoActivationDelay( 0 )</li>
+     * </ul>
      * 
      * @param control the control
      * @param controlContentAdapter the control content adapter
@@ -53,6 +61,10 @@
     {
         super( control, controlContentAdapter, proposalProvider, commandId, autoActivationCharacters,
installDecoration );
 
+        setProposalAcceptanceStyle( ContentProposalAdapter.PROPOSAL_REPLACE );
+        setFilterStyle( ContentProposalAdapter.FILTER_NONE );
+        setAutoActivationCharacters( null );
+        setAutoActivationDelay( 0 );
     }
 
 

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/DnBuilderWidget.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/DnBuilderWidget.java?rev=692228&r1=692227&r2=692228&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/DnBuilderWidget.java
(original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/DnBuilderWidget.java
Thu Sep  4 13:36:20 2008
@@ -30,6 +30,7 @@
 import org.apache.directory.shared.ldap.name.Rdn;
 import org.apache.directory.studio.connection.core.DnUtils;
 import org.apache.directory.studio.connection.ui.widgets.BaseWidgetUtils;
+import org.apache.directory.studio.connection.ui.widgets.ExtendedContentAssistCommandAdapter;
 import org.apache.directory.studio.ldapbrowser.common.widgets.search.EntryWidget;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.eclipse.jface.fieldassist.ComboContentAdapter;
@@ -46,7 +47,6 @@
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.fieldassist.ContentAssistCommandAdapter;
 
 
 /**
@@ -462,12 +462,8 @@
         gd.widthHint = 180;
         rdnLine.rdnTypeCombo.setLayoutData( gd );
         rdnLine.rdnTypeCombo.setVisibleItemCount( 20 );
-        rdnLine.rdnNameCPA = new ContentAssistCommandAdapter( rdnLine.rdnTypeCombo, new ComboContentAdapter(),
+        rdnLine.rdnNameCPA = new ExtendedContentAssistCommandAdapter( rdnLine.rdnTypeCombo,
new ComboContentAdapter(),
             new ListContentProposalProvider( attributeNames ), null, null, true );
-        rdnLine.rdnNameCPA.setProposalAcceptanceStyle( ContentProposalAdapter.PROPOSAL_REPLACE
);
-        rdnLine.rdnNameCPA.setFilterStyle( ContentProposalAdapter.FILTER_NONE );
-        rdnLine.rdnNameCPA.setAutoActivationCharacters( null );
-        rdnLine.rdnNameCPA.setAutoActivationDelay( 0 );
 
         rdnLine.rdnEqualsLabel = new Label( rdnComposite, SWT.NONE );
         rdnLine.rdnEqualsLabel.setText( "=" );

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/ModWidget.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/ModWidget.java?rev=692228&r1=692227&r2=692228&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/ModWidget.java
(original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/ModWidget.java
Thu Sep  4 13:36:20 2008
@@ -25,11 +25,11 @@
 import java.util.Arrays;
 
 import org.apache.directory.studio.connection.ui.widgets.BaseWidgetUtils;
+import org.apache.directory.studio.connection.ui.widgets.ExtendedContentAssistCommandAdapter;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreConstants;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.Schema;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.SchemaUtils;
 import org.eclipse.jface.fieldassist.ComboContentAdapter;
-import org.eclipse.jface.fieldassist.ContentProposalAdapter;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.ModifyEvent;
 import org.eclipse.swt.events.ModifyListener;
@@ -41,7 +41,6 @@
 import org.eclipse.swt.widgets.Group;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.fieldassist.ContentAssistCommandAdapter;
 
 
 /**
@@ -250,12 +249,8 @@
         // attribute combo with field decoration and content proposal
         modSpec.modAttributeCombo = BaseWidgetUtils.createCombo( modSpecComposite, new String[0],
-1, 1 );
         modSpec.modAttributeCombo.setVisibleItemCount( 20 );
-        modSpec.modAttributeCPA = new ContentAssistCommandAdapter( modSpec.modAttributeCombo,
-            new ComboContentAdapter(), new ListContentProposalProvider( attributeDescriptions
), null, null, true );
-        modSpec.modAttributeCPA.setProposalAcceptanceStyle( ContentProposalAdapter.PROPOSAL_REPLACE
);
-        modSpec.modAttributeCPA.setFilterStyle( ContentProposalAdapter.FILTER_NONE );
-        modSpec.modAttributeCPA.setAutoActivationCharacters( null );
-        modSpec.modAttributeCPA.setAutoActivationDelay( 0 );
+        new ExtendedContentAssistCommandAdapter( modSpec.modAttributeCombo, new ComboContentAdapter(),
+            new ListContentProposalProvider( attributeDescriptions ), null, null, true );
 
         // add button with listener
         modSpec.modAddButton = new Button( modComposite, SWT.PUSH );
@@ -540,9 +535,6 @@
         /** The modification attribute. */
         private Combo modAttributeCombo;
 
-        /** The modification content proposal adapter */
-        private ContentProposalAdapter modAttributeCPA;
-
         /** The mod add button. */
         private Button modAddButton;
 

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/FilterWidget.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/FilterWidget.java?rev=692228&r1=692227&r2=692228&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/FilterWidget.java
(original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/FilterWidget.java
Thu Sep  4 13:36:20 2008
@@ -31,7 +31,6 @@
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.filter.parser.LdapFilterParser;
 import org.eclipse.jface.fieldassist.ComboContentAdapter;
-import org.eclipse.jface.fieldassist.ContentProposalAdapter;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.ModifyEvent;
 import org.eclipse.swt.events.ModifyListener;
@@ -146,10 +145,6 @@
         contentAssistProcessor = new FilterContentAssistProcessor( parser );
         filterCPA = new ExtendedContentAssistCommandAdapter( filterCombo, new ComboContentAdapter(),
             contentAssistProcessor, null, null, true );
-        filterCPA.setProposalAcceptanceStyle( ContentProposalAdapter.PROPOSAL_REPLACE );
-        filterCPA.setFilterStyle( ContentProposalAdapter.FILTER_NONE );
-        filterCPA.setAutoActivationCharacters( null );
-        filterCPA.setAutoActivationDelay( 0 );
 
         // auto edit strategy
         new FilterWidgetAutoEditStrategyAdapter( filterCombo, parser );

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/AttributeTypeWizardPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/AttributeTypeWizardPage.java?rev=692228&r1=692227&r2=692228&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/AttributeTypeWizardPage.java
(original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/AttributeTypeWizardPage.java
Thu Sep  4 13:36:20 2008
@@ -28,12 +28,12 @@
 
 import org.apache.directory.shared.ldap.schema.syntax.AttributeTypeDescription;
 import org.apache.directory.studio.connection.ui.widgets.BaseWidgetUtils;
+import org.apache.directory.studio.connection.ui.widgets.ExtendedContentAssistCommandAdapter;
 import org.apache.directory.studio.ldapbrowser.common.widgets.ListContentProposalProvider;
 import org.apache.directory.studio.ldapbrowser.core.model.IAttribute;
 import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.SchemaUtils;
 import org.eclipse.jface.fieldassist.ComboContentAdapter;
-import org.eclipse.jface.fieldassist.ContentProposalAdapter;
 import org.eclipse.jface.wizard.WizardPage;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.ModifyEvent;
@@ -47,7 +47,6 @@
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.fieldassist.ContentAssistCommandAdapter;
 
 
 /**
@@ -84,9 +83,6 @@
     /** The attribute type combo. */
     private Combo attributeTypeCombo;
 
-    /** The attribute type content proposal adapter */
-    private ContentProposalAdapter attributeTypeCPA;
-
     /** The show subschem attributes only button. */
     private Button showSubschemAttributesOnlyButton;
 
@@ -187,12 +183,8 @@
         attributeTypeCombo.setVisibleItemCount( 20 );
         attributeTypeCombo.setItems( possibleAttributeTypes );
         attributeTypeCombo.setText( parsedAttributeType );
-        attributeTypeCPA = new ContentAssistCommandAdapter( attributeTypeCombo, new ComboContentAdapter(),
+        new ExtendedContentAssistCommandAdapter( attributeTypeCombo, new ComboContentAdapter(),
             new ListContentProposalProvider( possibleAttributeTypes ), null, null, true );
-        attributeTypeCPA.setProposalAcceptanceStyle( ContentProposalAdapter.PROPOSAL_REPLACE
);
-        attributeTypeCPA.setFilterStyle( ContentProposalAdapter.FILTER_NONE );
-        attributeTypeCPA.setAutoActivationCharacters( null );
-        attributeTypeCPA.setAutoActivationDelay( 0 );
 
         BaseWidgetUtils.createSpacer( composite, 1 );
         showSubschemAttributesOnlyButton = BaseWidgetUtils.createCheckbox( composite, "Show
subschema attributes only",



Mime
View raw message