directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r526705 - in /directory/ldapstudio/trunk/ldapstudio-aciitemeditor: ./ META-INF/ icons/ src/main/java/org/apache/directory/ldapstudio/aciitemeditor/ src/main/java/org/apache/directory/ldapstudio/aciitemeditor/dialogs/ src/main/java/org/apach...
Date Mon, 09 Apr 2007 10:49:39 GMT
Author: seelmann
Date: Mon Apr  9 03:49:38 2007
New Revision: 526705

URL: http://svn.apache.org/viewvc?view=rev&rev=526705
Log:
Applied browser-ui refactoring to acieditor (DIRSTUDIO-78)

Added:
    directory/ldapstudio/trunk/ldapstudio-aciitemeditor/icons/filtereditor.gif   (with props)
    directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/AttributeTypeAndValueDialog.java
    directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/AttributeTypeAndValueValueEditor.java
    directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/AttributeTypeDialog.java
    directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/AttributeTypeValueEditor.java
    directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/FilterValueEditor.java
Modified:
    directory/ldapstudio/trunk/ldapstudio-aciitemeditor/META-INF/MANIFEST.MF
    directory/ldapstudio/trunk/ldapstudio-aciitemeditor/build.xml
    directory/ldapstudio/trunk/ldapstudio-aciitemeditor/plugin.xml
    directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/ACIItemValueEditor.java
    directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/ExclusionValueEditor.java
    directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/MaxValueCountValueEditor.java
    directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/RestrictedByValueEditor.java
    directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/SubtreeValueEditor.java
    directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/dialogs/MultiValuedDialog.java
    directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/model/ProtectedItemWrapper.java
    directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/model/ProtectedItemWrapperFactory.java
    directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/model/UserClassWrapper.java
    directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/model/UserClassWrapperFactory.java
    directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/widgets/ACIItemProtectedItemsComposite.java
    directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/widgets/ACIItemUserClassesComposite.java

Modified: directory/ldapstudio/trunk/ldapstudio-aciitemeditor/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-aciitemeditor/META-INF/MANIFEST.MF?view=diff&rev=526705&r1=526704&r2=526705
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-aciitemeditor/META-INF/MANIFEST.MF (original)
+++ directory/ldapstudio/trunk/ldapstudio-aciitemeditor/META-INF/MANIFEST.MF Mon Apr  9 03:49:38 2007
@@ -11,10 +11,11 @@
  org.eclipse.jface.text,
  org.eclipse.core.resources,
  org.apache.directory.ldapstudio.jars,
- org.apache.directory.ldapstudio.browser.ui,
- org.apache.directory.ldapstudio.browser.core,
  org.eclipse.ui.editors,
- org.eclipse.ui.workbench.texteditor
+ org.eclipse.ui.workbench.texteditor,
+ org.apache.directory.ldapstudio.browser.core,
+ org.apache.directory.ldapstudio.browser.common,
+ org.apache.directory.ldapstudio.valueeditors
 Eclipse-LazyStart: true
 Bundle-ClassPath: .,
  lib/shared-ldap-0.9.6-SNAPSHOT.jar,

Modified: directory/ldapstudio/trunk/ldapstudio-aciitemeditor/build.xml
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-aciitemeditor/build.xml?view=diff&rev=526705&r1=526704&r2=526705
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-aciitemeditor/build.xml (original)
+++ directory/ldapstudio/trunk/ldapstudio-aciitemeditor/build.xml Mon Apr  9 03:49:38 2007
@@ -48,10 +48,12 @@
 				<include name="**/*.jar"/>
 			</fileset>
 			<fileset dir="${lib.dir}" />
-			<pathelement location="${basedir}/../ldapstudio-browser-ui/target/classes"/>
-			<pathelement location="${basedir}/../ldapstudio-browser-ui/target/build"/>
 			<pathelement location="${basedir}/../ldapstudio-browser-core/target/classes"/>
 			<pathelement location="${basedir}/../ldapstudio-browser-core/target/build"/>
+			<pathelement location="${basedir}/../ldapstudio-browser-common/target/classes"/>
+			<pathelement location="${basedir}/../ldapstudio-browser-common/target/build"/>
+			<pathelement location="${basedir}/../ldapstudio-valueeditors/target/classes"/>
+			<pathelement location="${basedir}/../ldapstudio-valueeditors/target/build"/>
 			<pathelement location="target/classes"/>
 		</path>
 	</target>

Added: directory/ldapstudio/trunk/ldapstudio-aciitemeditor/icons/filtereditor.gif
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-aciitemeditor/icons/filtereditor.gif?view=auto&rev=526705
==============================================================================
Binary file - no diff available.

Propchange: directory/ldapstudio/trunk/ldapstudio-aciitemeditor/icons/filtereditor.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: directory/ldapstudio/trunk/ldapstudio-aciitemeditor/plugin.xml
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-aciitemeditor/plugin.xml?view=diff&rev=526705&r1=526704&r2=526705
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-aciitemeditor/plugin.xml (original)
+++ directory/ldapstudio/trunk/ldapstudio-aciitemeditor/plugin.xml Mon Apr  9 03:49:38 2007
@@ -13,7 +13,7 @@
       </editor>
    </extension>
    <extension
-         point="org.apache.directory.ldapstudio.browser.ui.valueEditors">
+         point="org.apache.directory.ldapstudio.valueeditors">
       <valueEditor
             class="org.apache.directory.ldapstudio.aciitemeditor.ACIItemValueEditor"
             icon="icons/aciitemeditor.gif"

Modified: directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/ACIItemValueEditor.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/ACIItemValueEditor.java?view=diff&rev=526705&r1=526704&r2=526705
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/ACIItemValueEditor.java (original)
+++ directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/ACIItemValueEditor.java Mon Apr  9 03:49:38 2007
@@ -25,7 +25,7 @@
 import org.apache.directory.ldapstudio.browser.core.model.IConnection;
 import org.apache.directory.ldapstudio.browser.core.model.IEntry;
 import org.apache.directory.ldapstudio.browser.core.model.IValue;
-import org.apache.directory.ldapstudio.browser.ui.valueeditors.AbstractDialogStringValueEditor;
+import org.apache.directory.ldapstudio.valueeditors.AbstractDialogStringValueEditor;
 import org.eclipse.swt.widgets.Shell;
 
 

Added: directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/AttributeTypeAndValueDialog.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/AttributeTypeAndValueDialog.java?view=auto&rev=526705
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/AttributeTypeAndValueDialog.java (added)
+++ directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/AttributeTypeAndValueDialog.java Mon Apr  9 03:49:38 2007
@@ -0,0 +1,209 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+
+package org.apache.directory.ldapstudio.aciitemeditor;
+
+
+import java.util.Arrays;
+
+import org.apache.directory.ldapstudio.browser.common.widgets.BaseWidgetUtils;
+import org.apache.directory.ldapstudio.browser.common.widgets.ListContentProposalProvider;
+import org.apache.directory.ldapstudio.browser.core.model.schema.Schema;
+import org.apache.directory.ldapstudio.valueeditors.ValueEditorsActivator;
+import org.apache.directory.ldapstudio.valueeditors.ValueEditorsConstants;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.fieldassist.ComboContentAdapter;
+import org.eclipse.jface.fieldassist.ContentProposalAdapter;
+import org.eclipse.jface.fieldassist.DecoratedField;
+import org.eclipse.jface.fieldassist.FieldDecoration;
+import org.eclipse.jface.fieldassist.FieldDecorationRegistry;
+import org.eclipse.jface.fieldassist.IControlCreator;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+
+
+/**
+ * This class provides a dialog to enter an attribute type and value.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class AttributeTypeAndValueDialog extends Dialog
+{
+
+    /** The dialog title */
+    public static final String DIALOG_TITLE = "Attribute Type and Value Editor";
+
+    /** The schema. */
+    private Schema schema;
+
+    /** The initial attribute type. */
+    private String initialAttributeType;
+
+    /** The initial value. */
+    private String initialValue;
+
+    /** The attribute type combo field. */
+    private DecoratedField attributeTypeComboField;
+
+    /** The attribute type combo. */
+    private Combo attributeTypeCombo;
+
+    /** The attribute type content proposal adapter */
+    private ContentProposalAdapter attributeTypeCPA;
+
+    /** The value text. */
+    private Text valueText;
+
+    /** The return attribute type. */
+    private String returnAttributeType;
+
+    /** The return value. */
+    private String returnValue;
+
+
+    /**
+     * Creates a new instance of AttributeTypeDialog.
+     * 
+     * @param parentShell the parent shell
+     * @param schema the schema
+     * @param initialAttributeType the initial attribute type
+     * @param initialValue the initial value
+     */
+    public AttributeTypeAndValueDialog( Shell parentShell, Schema schema, String initialAttributeType,
+        String initialValue )
+    {
+        super( parentShell );
+        super.setShellStyle( super.getShellStyle() | SWT.RESIZE );
+        this.initialAttributeType = initialAttributeType;
+        this.initialValue = initialValue;
+        this.schema = schema;
+        this.returnValue = null;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    protected void configureShell( Shell shell )
+    {
+        super.configureShell( shell );
+        shell.setText( DIALOG_TITLE );
+        //shell.setImage( Activator.getDefault().getImage( ValueEditorsConstants.IMG_TEXTEDITOR ) );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    protected void createButtonsForButtonBar( Composite parent )
+    {
+        super.createButtonsForButtonBar( parent );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    protected void okPressed()
+    {
+        returnAttributeType = attributeTypeCombo.getText();
+        returnValue = valueText.getText();
+        super.okPressed();
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    protected Control createDialogArea( Composite parent )
+    {
+        // create composite
+        Composite composite = ( Composite ) super.createDialogArea( parent );
+        GridData gd = new GridData( GridData.FILL_BOTH );
+        gd.widthHint = convertHorizontalDLUsToPixels( IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH );
+        composite.setLayoutData( gd );
+        composite.setLayout( new GridLayout( 3, false ) );
+
+        // combo widget
+        String[] allAtNames = schema.getAttributeTypeDescriptionNames();
+        Arrays.sort( allAtNames );
+
+        final FieldDecoration fieldDecoration = FieldDecorationRegistry.getDefault().getFieldDecoration(
+            FieldDecorationRegistry.DEC_CONTENT_PROPOSAL );
+        attributeTypeComboField = new DecoratedField( composite, SWT.NONE, new IControlCreator()
+        {
+            public Control createControl( Composite parent, int style )
+            {
+                Combo combo = BaseWidgetUtils.createCombo( parent, new String[0], -1, 1 );
+                combo.setVisibleItemCount( 20 );
+                return combo;
+            }
+        } );
+        attributeTypeComboField.addFieldDecoration( fieldDecoration, SWT.TOP | SWT.LEFT, true );
+        attributeTypeComboField.getLayoutControl().setLayoutData( new GridData( SWT.FILL, SWT.CENTER, true, false ) );
+        attributeTypeCombo = ( Combo ) attributeTypeComboField.getControl();
+        attributeTypeCombo.setItems( allAtNames );
+        attributeTypeCombo.setText( initialAttributeType );
+
+        // content proposal adapter
+        attributeTypeCPA = new ContentProposalAdapter( attributeTypeCombo, new ComboContentAdapter(),
+            new ListContentProposalProvider( attributeTypeCombo.getItems() ), null, null );
+        attributeTypeCPA.setFilterStyle( ContentProposalAdapter.FILTER_NONE );
+        attributeTypeCPA.setProposalAcceptanceStyle( ContentProposalAdapter.PROPOSAL_REPLACE );
+
+        BaseWidgetUtils.createLabel( composite, " = ", 1 );
+
+        valueText = BaseWidgetUtils.createText( composite, initialValue, 1 );
+
+        applyDialogFont( composite );
+        return composite;
+    }
+
+
+    /**
+     * Gets the attribute type.
+     * 
+     * @return the attribute type, null if canceled
+     */
+    public String getAttributeType()
+    {
+        return returnAttributeType;
+    }
+
+
+    /**
+     * Gets the value.
+     * 
+     * @return the value, null if canceled
+     */
+    public String getValue()
+    {
+        return returnValue;
+    }
+
+}

Added: directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/AttributeTypeAndValueValueEditor.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/AttributeTypeAndValueValueEditor.java?view=auto&rev=526705
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/AttributeTypeAndValueValueEditor.java (added)
+++ directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/AttributeTypeAndValueValueEditor.java Mon Apr  9 03:49:38 2007
@@ -0,0 +1,177 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+
+package org.apache.directory.ldapstudio.aciitemeditor;
+
+
+import org.apache.directory.ldapstudio.browser.common.dialogs.TextDialog;
+import org.apache.directory.ldapstudio.browser.core.model.AttributeHierarchy;
+import org.apache.directory.ldapstudio.browser.core.model.IConnection;
+import org.apache.directory.ldapstudio.browser.core.model.IValue;
+import org.apache.directory.ldapstudio.browser.core.model.schema.Schema;
+import org.apache.directory.ldapstudio.valueeditors.AbstractDialogStringValueEditor;
+import org.eclipse.swt.widgets.Shell;
+
+
+/**
+ * Implementation of IValueEditor for attribute type and value.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class AttributeTypeAndValueValueEditor extends AbstractDialogStringValueEditor
+{
+
+    /**
+     * {@inheritDoc}
+     * 
+     * This implementation opens the AttributeTypeDialog.
+     */
+    public boolean openDialog( Shell shell )
+    {
+        Object value = getValue();
+        if ( value != null && value instanceof AttributeTypeAndValueValueEditorRawValueWrapper )
+        {
+            AttributeTypeAndValueValueEditorRawValueWrapper wrapper = ( AttributeTypeAndValueValueEditorRawValueWrapper ) value;
+            AttributeTypeAndValueDialog dialog = new AttributeTypeAndValueDialog( shell, wrapper.schema, wrapper.attributeType, wrapper.value );
+            if ( dialog.open() == TextDialog.OK && !"".equals( dialog.getAttributeType() ) && !"".equals( dialog.getValue() ) )
+            {
+                setValue( dialog.getAttributeType() + '=' + dialog.getValue() );
+                return true;
+            }
+        }
+        return false;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     * 
+     * Returns always the string value.
+     * 
+     * Reimplementation, because getRawValue() returns an 
+     * AttributeTypeValueEditorRawValueWrapper.
+     */
+    public String getDisplayValue( IValue value )
+    {
+        if ( value == null )
+        {
+            return "NULL";
+        }
+
+        String displayValue = value.getStringValue();
+        return displayValue;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     * 
+     * Returns null.
+     * Modification in search result editor not supported.
+     */
+    public Object getRawValue( AttributeHierarchy attributeHierarchy )
+    {
+        return null;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     * 
+     * Returns an AttributeTypeAndValueValueEditorRawValueWrapper.
+     */
+    public Object getRawValue( IValue value )
+    {
+        if ( value == null || !value.isString() )
+        {
+            return null;
+        }
+        else
+        {
+            return getRawValue( value.getAttribute().getEntry().getConnection(), value.getStringValue() );
+        }
+    }
+
+
+    /**
+     * {@inheritDoc}
+     * 
+     * Returns an AttributeTypeAndValueValueEditorRawValueWrapper.
+     */
+    public Object getRawValue( IConnection connection, Object value )
+    {
+        Schema schema = null;
+        if ( connection != null )
+        {
+            schema = connection.getSchema();
+        }
+        if ( schema == null || value == null || !( value instanceof String ) )
+        {
+            return null;
+        }
+
+        String atavValue = ( String ) value;
+        String[] atav = atavValue.split( "=", 2 );
+        String at = atav.length > 0 ? atav[0] : "";
+        String v = atav.length > 1 ? atav[1] : "";
+        AttributeTypeAndValueValueEditorRawValueWrapper wrapper = new AttributeTypeAndValueValueEditorRawValueWrapper( schema, at, v );
+        return wrapper;
+    }
+
+    /**
+     * The AttributeTypeAndValueValueEditorRawValueWrapper is used to pass contextual 
+     * information to the opened AttributeTypeAndValueDialog.
+     *
+     * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+     * @version $Rev$, $Date$
+     */
+    private class AttributeTypeAndValueValueEditorRawValueWrapper
+    {
+        /** 
+         * The schema, used in AttributeTypeDialog to build the list
+         * with possible attribute types.
+         */
+        private Schema schema;
+
+        /** The attribute type, used as initial attribute type. */
+        private String attributeType;
+        
+        /** The value, used as initial value. */
+        private String value;
+
+
+        /**
+         * Creates a new instance of AttributeTypeAndValueValueEditorRawValueWrapper.
+         * 
+         * @param schema the schema
+         * @param attributeType the attribute type
+         * @param value the value
+         */
+        private AttributeTypeAndValueValueEditorRawValueWrapper( Schema schema, String attributeType, String value )
+        {
+            super();
+            this.schema = schema;
+            this.attributeType = attributeType;
+            this.value = value;
+        }
+    }
+
+}

Added: directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/AttributeTypeDialog.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/AttributeTypeDialog.java?view=auto&rev=526705
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/AttributeTypeDialog.java (added)
+++ directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/AttributeTypeDialog.java Mon Apr  9 03:49:38 2007
@@ -0,0 +1,177 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+
+package org.apache.directory.ldapstudio.aciitemeditor;
+
+
+import java.util.Arrays;
+
+import org.apache.directory.ldapstudio.browser.common.widgets.BaseWidgetUtils;
+import org.apache.directory.ldapstudio.browser.common.widgets.ListContentProposalProvider;
+import org.apache.directory.ldapstudio.browser.core.model.schema.Schema;
+import org.apache.directory.ldapstudio.valueeditors.ValueEditorsActivator;
+import org.apache.directory.ldapstudio.valueeditors.ValueEditorsConstants;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.fieldassist.ComboContentAdapter;
+import org.eclipse.jface.fieldassist.ContentProposalAdapter;
+import org.eclipse.jface.fieldassist.DecoratedField;
+import org.eclipse.jface.fieldassist.FieldDecoration;
+import org.eclipse.jface.fieldassist.FieldDecorationRegistry;
+import org.eclipse.jface.fieldassist.IControlCreator;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+
+
+/**
+ * This class provides a dialog to enter or select an attribute type.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class AttributeTypeDialog extends Dialog
+{
+
+    /** The dialog title */
+    public static final String DIALOG_TITLE = "Attribute Type Editor";
+
+    /** The schema. */
+    private Schema schema;
+
+    /** The initial value. */
+    private String initialValue;
+
+    /** The attribute type combo field. */
+    private DecoratedField attributeTypeComboField;
+
+    /** The attribute type combo. */
+    private Combo attributeTypeCombo;
+
+    /** The attribute type content proposal adapter */
+    private ContentProposalAdapter attributeTypeCPA;
+
+    /** The return value. */
+    private String returnValue;
+
+
+    /**
+     * Creates a new instance of AttributeTypeDialog.
+     * 
+     * @param parentShell the parent shell
+     * @param schema the schema
+     * @param initialValue the initial value
+     */
+    public AttributeTypeDialog( Shell parentShell, Schema schema, String initialValue )
+    {
+        super( parentShell );
+        super.setShellStyle( super.getShellStyle() | SWT.RESIZE );
+        this.initialValue = initialValue;
+        this.schema = schema;
+        this.returnValue = null;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    protected void configureShell( Shell shell )
+    {
+        super.configureShell( shell );
+        shell.setText( DIALOG_TITLE );
+        shell.setImage( ValueEditorsActivator.getDefault().getImage( ValueEditorsConstants.IMG_ATDEDITOR ) );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    protected void createButtonsForButtonBar( Composite parent )
+    {
+        super.createButtonsForButtonBar( parent );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    protected void okPressed()
+    {
+        returnValue = attributeTypeCombo.getText();
+        super.okPressed();
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    protected Control createDialogArea( Composite parent )
+    {
+        // create composite
+        Composite composite = ( Composite ) super.createDialogArea( parent );
+        GridData gd = new GridData( GridData.FILL_BOTH );
+        gd.widthHint = convertHorizontalDLUsToPixels( IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH );
+        composite.setLayoutData( gd );
+
+        // combo widget
+        String[] allAtNames = schema.getAttributeTypeDescriptionNames();
+        Arrays.sort( allAtNames );
+
+        final FieldDecoration fieldDecoration = FieldDecorationRegistry.getDefault().getFieldDecoration(
+            FieldDecorationRegistry.DEC_CONTENT_PROPOSAL );
+        attributeTypeComboField = new DecoratedField( composite, SWT.NONE, new IControlCreator()
+        {
+            public Control createControl( Composite parent, int style )
+            {
+                Combo combo = BaseWidgetUtils.createCombo( parent, new String[0], -1, 1 );
+                combo.setVisibleItemCount( 20 );
+                return combo;
+            }
+        } );
+        attributeTypeComboField.addFieldDecoration( fieldDecoration, SWT.TOP | SWT.LEFT, true );
+        attributeTypeComboField.getLayoutControl().setLayoutData( new GridData( SWT.FILL, SWT.CENTER, true, false ) );
+        attributeTypeCombo = ( Combo ) attributeTypeComboField.getControl();
+        attributeTypeCombo.setItems( allAtNames );
+        attributeTypeCombo.setText( initialValue );
+
+        // content proposal adapter
+        attributeTypeCPA = new ContentProposalAdapter( attributeTypeCombo, new ComboContentAdapter(),
+            new ListContentProposalProvider( attributeTypeCombo.getItems() ), null, null );
+        attributeTypeCPA.setFilterStyle( ContentProposalAdapter.FILTER_NONE );
+        attributeTypeCPA.setProposalAcceptanceStyle( ContentProposalAdapter.PROPOSAL_REPLACE );
+
+        applyDialogFont( composite );
+        return composite;
+    }
+
+
+    /**
+     * Gets the attribute type.
+     * 
+     * @return the attribute type, null if canceled
+     */
+    public String getAttributeType()
+    {
+        return returnValue;
+    }
+}

Added: directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/AttributeTypeValueEditor.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/AttributeTypeValueEditor.java?view=auto&rev=526705
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/AttributeTypeValueEditor.java (added)
+++ directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/AttributeTypeValueEditor.java Mon Apr  9 03:49:38 2007
@@ -0,0 +1,170 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+
+package org.apache.directory.ldapstudio.aciitemeditor;
+
+
+import org.apache.directory.ldapstudio.browser.common.dialogs.TextDialog;
+import org.apache.directory.ldapstudio.browser.core.model.AttributeHierarchy;
+import org.apache.directory.ldapstudio.browser.core.model.IConnection;
+import org.apache.directory.ldapstudio.browser.core.model.IValue;
+import org.apache.directory.ldapstudio.browser.core.model.schema.ObjectClassDescription;
+import org.apache.directory.ldapstudio.browser.core.model.schema.Schema;
+import org.apache.directory.ldapstudio.valueeditors.AbstractDialogStringValueEditor;
+import org.eclipse.swt.widgets.Shell;
+
+
+/**
+ * Implementation of IValueEditor for attribute types.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class AttributeTypeValueEditor extends AbstractDialogStringValueEditor
+{
+
+    /**
+     * {@inheritDoc}
+     * 
+     * This implementation opens the AttributeTypeDialog.
+     */
+    public boolean openDialog( Shell shell )
+    {
+        Object value = getValue();
+        if ( value != null && value instanceof AttributeTypeValueEditorRawValueWrapper )
+        {
+            AttributeTypeValueEditorRawValueWrapper wrapper = ( AttributeTypeValueEditorRawValueWrapper ) value;
+            AttributeTypeDialog dialog = new AttributeTypeDialog( shell, wrapper.schema, wrapper.attributeType );
+            if ( dialog.open() == TextDialog.OK && !"".equals( dialog.getAttributeType() ) )
+            {
+                setValue( dialog.getAttributeType() );
+                return true;
+            }
+        }
+        return false;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     * 
+     * Returns always the string value.
+     * 
+     * Reimplementation, because getRawValue() returns an 
+     * AttributeTypeValueEditorRawValueWrapper.
+     */
+    public String getDisplayValue( IValue value )
+    {
+        if ( value == null )
+        {
+            return "NULL";
+        }
+
+        String displayValue = value.getStringValue();
+        return displayValue;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     * 
+     * Returns null.
+     * Modification in search result editor not supported.
+     */
+    public Object getRawValue( AttributeHierarchy attributeHierarchy )
+    {
+        return null;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     * 
+     * Returns a AttributeTypeValueEditorRawValueWrapper.
+     */
+    public Object getRawValue( IValue value )
+    {
+        if ( value == null || !value.isString() )
+        {
+            return null;
+        }
+        else
+        {
+            return getRawValue( value.getAttribute().getEntry().getConnection(), value.getStringValue() );
+        }
+    }
+
+
+    /**
+     * {@inheritDoc}
+     * 
+     * Returns a AttributeTypeValueEditorRawValueWrapper.
+     */
+    public Object getRawValue( IConnection connection, Object value )
+    {
+        Schema schema = null;
+        if ( connection != null )
+        {
+            schema = connection.getSchema();
+        }
+        if ( schema == null || value == null || !( value instanceof String ) )
+        {
+            return null;
+        }
+
+        String atValue = ( String ) value;
+        AttributeTypeValueEditorRawValueWrapper wrapper = new AttributeTypeValueEditorRawValueWrapper( schema, atValue );
+        return wrapper;
+    }
+
+    /**
+     * The AttributeTypeValueEditorRawValueWrapper is used to pass contextual 
+     * information to the opened AttributeTypeDialog.
+     *
+     * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+     * @version $Rev$, $Date$
+     */
+    private class AttributeTypeValueEditorRawValueWrapper
+    {
+        /** 
+         * The schema, used in AttributeTypeDialog to build the list
+         * with possible attribute types.
+         */
+        private Schema schema;
+
+        /** The attribute type, used as initial value in AttributeTypeDialog. */
+        private String attributeType;
+
+
+        /**
+         * Creates a new instance of AttributeTypeValueEditorRawValueWrapper.
+         *
+         * @param schema the schema
+         * @param attributeType the attribute type
+         */
+        private AttributeTypeValueEditorRawValueWrapper( Schema schema, String attributeType )
+        {
+            super();
+            this.schema = schema;
+            this.attributeType = attributeType;
+        }
+    }
+
+}

Modified: directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/ExclusionValueEditor.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/ExclusionValueEditor.java?view=diff&rev=526705&r1=526704&r2=526705
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/ExclusionValueEditor.java (original)
+++ directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/ExclusionValueEditor.java Mon Apr  9 03:49:38 2007
@@ -23,13 +23,13 @@
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
+import org.apache.directory.ldapstudio.browser.common.dialogs.TextDialog;
+import org.apache.directory.ldapstudio.browser.common.widgets.BaseWidgetUtils;
+import org.apache.directory.ldapstudio.browser.common.widgets.search.EntryWidget;
 import org.apache.directory.ldapstudio.browser.core.model.DN;
 import org.apache.directory.ldapstudio.browser.core.model.IConnection;
 import org.apache.directory.ldapstudio.browser.core.model.NameException;
-import org.apache.directory.ldapstudio.browser.ui.dialogs.TextDialog;
-import org.apache.directory.ldapstudio.browser.ui.valueeditors.AbstractDialogStringValueEditor;
-import org.apache.directory.ldapstudio.browser.ui.widgets.BaseWidgetUtils;
-import org.apache.directory.ldapstudio.browser.ui.widgets.search.EntryWidget;
+import org.apache.directory.ldapstudio.valueeditors.AbstractDialogStringValueEditor;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.viewers.ArrayContentProvider;
@@ -54,7 +54,7 @@
 public class ExclusionValueEditor extends AbstractDialogStringValueEditor
 {
     /* (non-Javadoc)
-     * @see org.apache.directory.ldapstudio.browser.ui.valueeditors.AbstractDialogValueEditor#openDialog(org.eclipse.swt.widgets.Shell)
+     * @see org.apache.directory.ldapstudio.valueeditors.AbstractDialogValueEditor#openDialog(org.eclipse.swt.widgets.Shell)
      */
     protected boolean openDialog( Shell shell )
     {
@@ -74,7 +74,7 @@
 
 
     /* (non-Javadoc)
-     * @see org.apache.directory.ldapstudio.browser.ui.valueeditors.AbstractDialogStringValueEditor#getRawValue(org.apache.directory.ldapstudio.browser.core.model.IConnection, java.lang.Object)
+     * @see org.apache.directory.ldapstudio.valueeditors.AbstractDialogStringValueEditor#getRawValue(org.apache.directory.ldapstudio.browser.core.model.IConnection, java.lang.Object)
      */
     public Object getRawValue( IConnection connection, Object value )
     {

Added: directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/FilterValueEditor.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/FilterValueEditor.java?view=auto&rev=526705
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/FilterValueEditor.java (added)
+++ directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/FilterValueEditor.java Mon Apr  9 03:49:38 2007
@@ -0,0 +1,150 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+
+package org.apache.directory.ldapstudio.aciitemeditor;
+
+
+import org.apache.directory.ldapstudio.browser.common.dialogs.FilterWidgetDialog;
+import org.apache.directory.ldapstudio.browser.common.dialogs.TextDialog;
+import org.apache.directory.ldapstudio.browser.core.model.IConnection;
+import org.apache.directory.ldapstudio.browser.core.model.IValue;
+import org.apache.directory.ldapstudio.valueeditors.AbstractDialogStringValueEditor;
+import org.eclipse.swt.widgets.Shell;
+
+
+/**
+ * Implementation of IValueEditor for LDAP filters.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class FilterValueEditor extends AbstractDialogStringValueEditor
+{
+
+    /**
+     * {@inheritDoc}
+     * 
+     * This implementation opens the TextDialog.
+     */
+    public boolean openDialog( Shell shell )
+    {
+        Object value = getValue();
+        if ( value != null && value instanceof FilterValueEditorRawValueWrapper )
+        {
+            FilterValueEditorRawValueWrapper wrapper = ( FilterValueEditorRawValueWrapper ) value;
+            FilterWidgetDialog dialog = new FilterWidgetDialog( shell, "Filter Editor", wrapper.filter,
+                wrapper.connection );
+            if ( dialog.open() == TextDialog.OK && !"".equals( dialog.getFilter() ) )
+            {
+                setValue( dialog.getFilter() );
+                return true;
+            }
+        }
+        return false;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     * 
+     * Returns always the string value.
+     * 
+     * Reimplementation, because getRawValue() returns an 
+     * AttributeTypeValueEditorRawValueWrapper.
+     */
+    public String getDisplayValue( IValue value )
+    {
+        if ( value == null )
+        {
+            return "NULL";
+        }
+
+        String displayValue = value.getStringValue();
+        return displayValue;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     * 
+     * Returns a FilterValueEditorRawValueWrapper.
+     */
+    public Object getRawValue( IValue value )
+    {
+        if ( value == null || !value.isString() )
+        {
+            return null;
+        }
+        else
+        {
+            return getRawValue( value.getAttribute().getEntry().getConnection(), value.getStringValue() );
+        }
+    }
+
+
+    /**
+     * {@inheritDoc}
+     * 
+     * Returns a FilterValueEditorRawValueWrapper.
+     */
+    public Object getRawValue( IConnection connection, Object value )
+    {
+        if ( connection == null || value == null || !( value instanceof String ) )
+        {
+            return null;
+        }
+
+        String filterValue = ( String ) value;
+        FilterValueEditorRawValueWrapper wrapper = new FilterValueEditorRawValueWrapper( connection, filterValue );
+        return wrapper;
+    }
+
+    /**
+     * The FilterValueEditorRawValueWrapper is used to pass contextual 
+     * information to the opened FilterDialog.
+     *
+     * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+     * @version $Rev$, $Date$
+     */
+    private class FilterValueEditorRawValueWrapper
+    {
+        /** 
+         * The connection, used in FilterDialog to build the list
+         * with possible attribute types.
+         */
+        private IConnection connection;
+
+        /** The filter, used as initial value in FilterDialog. */
+        private String filter;
+
+
+        /**
+         * Creates a new instance of FilterValueEditorRawValueWrapper.
+         *
+         * @param schema the schema
+         * @param attributeType the attribute type
+         */
+        private FilterValueEditorRawValueWrapper( IConnection connection, String filter )
+        {
+            this.connection = connection;
+            this.filter = filter;
+        }
+    }
+}

Modified: directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/MaxValueCountValueEditor.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/MaxValueCountValueEditor.java?view=diff&rev=526705&r1=526704&r2=526705
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/MaxValueCountValueEditor.java (original)
+++ directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/MaxValueCountValueEditor.java Mon Apr  9 03:49:38 2007
@@ -25,14 +25,14 @@
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
+import org.apache.directory.ldapstudio.browser.common.dialogs.TextDialog;
+import org.apache.directory.ldapstudio.browser.common.widgets.BaseWidgetUtils;
+import org.apache.directory.ldapstudio.browser.common.widgets.ListContentProposalProvider;
 import org.apache.directory.ldapstudio.browser.core.model.AttributeHierarchy;
 import org.apache.directory.ldapstudio.browser.core.model.IConnection;
 import org.apache.directory.ldapstudio.browser.core.model.IValue;
 import org.apache.directory.ldapstudio.browser.core.model.schema.Schema;
-import org.apache.directory.ldapstudio.browser.ui.dialogs.TextDialog;
-import org.apache.directory.ldapstudio.browser.ui.valueeditors.AbstractDialogStringValueEditor;
-import org.apache.directory.ldapstudio.browser.ui.widgets.BaseWidgetUtils;
-import org.apache.directory.ldapstudio.browser.ui.widgets.ListContentProposalProvider;
+import org.apache.directory.ldapstudio.valueeditors.AbstractDialogStringValueEditor;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.fieldassist.ComboContentAdapter;

Modified: directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/RestrictedByValueEditor.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/RestrictedByValueEditor.java?view=diff&rev=526705&r1=526704&r2=526705
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/RestrictedByValueEditor.java (original)
+++ directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/RestrictedByValueEditor.java Mon Apr  9 03:49:38 2007
@@ -25,14 +25,14 @@
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
+import org.apache.directory.ldapstudio.browser.common.dialogs.TextDialog;
+import org.apache.directory.ldapstudio.browser.common.widgets.BaseWidgetUtils;
+import org.apache.directory.ldapstudio.browser.common.widgets.ListContentProposalProvider;
 import org.apache.directory.ldapstudio.browser.core.model.AttributeHierarchy;
 import org.apache.directory.ldapstudio.browser.core.model.IConnection;
 import org.apache.directory.ldapstudio.browser.core.model.IValue;
 import org.apache.directory.ldapstudio.browser.core.model.schema.Schema;
-import org.apache.directory.ldapstudio.browser.ui.dialogs.TextDialog;
-import org.apache.directory.ldapstudio.browser.ui.valueeditors.AbstractDialogStringValueEditor;
-import org.apache.directory.ldapstudio.browser.ui.widgets.BaseWidgetUtils;
-import org.apache.directory.ldapstudio.browser.ui.widgets.ListContentProposalProvider;
+import org.apache.directory.ldapstudio.valueeditors.AbstractDialogStringValueEditor;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.fieldassist.ComboContentAdapter;

Modified: directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/SubtreeValueEditor.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/SubtreeValueEditor.java?view=diff&rev=526705&r1=526704&r2=526705
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/SubtreeValueEditor.java (original)
+++ directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/SubtreeValueEditor.java Mon Apr  9 03:49:38 2007
@@ -26,13 +26,13 @@
 import java.util.List;
 import java.util.Set;
 
+import org.apache.directory.ldapstudio.browser.common.dialogs.TextDialog;
+import org.apache.directory.ldapstudio.browser.common.widgets.BaseWidgetUtils;
+import org.apache.directory.ldapstudio.browser.common.widgets.search.EntryWidget;
 import org.apache.directory.ldapstudio.browser.core.model.DN;
 import org.apache.directory.ldapstudio.browser.core.model.IConnection;
 import org.apache.directory.ldapstudio.browser.core.model.NameException;
-import org.apache.directory.ldapstudio.browser.ui.dialogs.TextDialog;
-import org.apache.directory.ldapstudio.browser.ui.valueeditors.AbstractDialogStringValueEditor;
-import org.apache.directory.ldapstudio.browser.ui.widgets.BaseWidgetUtils;
-import org.apache.directory.ldapstudio.browser.ui.widgets.search.EntryWidget;
+import org.apache.directory.ldapstudio.valueeditors.AbstractDialogStringValueEditor;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.subtree.BaseSubtreeSpecification;
 import org.apache.directory.shared.ldap.subtree.SubtreeSpecification;
@@ -70,7 +70,7 @@
 public class SubtreeValueEditor extends AbstractDialogStringValueEditor
 {
     /* (non-Javadoc)
-     * @see org.apache.directory.ldapstudio.browser.ui.valueeditors.AbstractDialogValueEditor#openDialog(org.eclipse.swt.widgets.Shell)
+     * @see org.apache.directory.ldapstudio.valueeditors.AbstractDialogValueEditor#openDialog(org.eclipse.swt.widgets.Shell)
      */
     protected boolean openDialog( Shell shell )
     {
@@ -146,7 +146,7 @@
 
 
     /* (non-Javadoc)
-     * @see org.apache.directory.ldapstudio.browser.ui.valueeditors.AbstractDialogStringValueEditor#getRawValue(org.apache.directory.ldapstudio.browser.core.model.IConnection, java.lang.Object)
+     * @see org.apache.directory.ldapstudio.valueeditors.AbstractDialogStringValueEditor#getRawValue(org.apache.directory.ldapstudio.browser.core.model.IConnection, java.lang.Object)
      */
     public Object getRawValue( IConnection connection, Object value )
     {

Modified: directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/dialogs/MultiValuedDialog.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/dialogs/MultiValuedDialog.java?view=diff&rev=526705&r1=526704&r2=526705
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/dialogs/MultiValuedDialog.java (original)
+++ directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/dialogs/MultiValuedDialog.java Mon Apr  9 03:49:38 2007
@@ -26,7 +26,7 @@
 import org.apache.directory.ldapstudio.aciitemeditor.ACIItemValueWithContext;
 import org.apache.directory.ldapstudio.aciitemeditor.Activator;
 import org.apache.directory.ldapstudio.aciitemeditor.widgets.Messages;
-import org.apache.directory.ldapstudio.browser.ui.valueeditors.AbstractDialogStringValueEditor;
+import org.apache.directory.ldapstudio.valueeditors.AbstractDialogStringValueEditor;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.viewers.ArrayContentProvider;

Modified: directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/model/ProtectedItemWrapper.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/model/ProtectedItemWrapper.java?view=diff&rev=526705&r1=526704&r2=526705
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/model/ProtectedItemWrapper.java (original)
+++ directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/model/ProtectedItemWrapper.java Mon Apr  9 03:49:38 2007
@@ -12,7 +12,7 @@
 import javax.naming.NamingException;
 import javax.naming.directory.Attribute;
 
-import org.apache.directory.ldapstudio.browser.ui.valueeditors.AbstractDialogStringValueEditor;
+import org.apache.directory.ldapstudio.valueeditors.AbstractDialogStringValueEditor;
 import org.apache.directory.shared.ldap.aci.ACIItemParser;
 import org.apache.directory.shared.ldap.aci.ItemFirstACIItem;
 import org.apache.directory.shared.ldap.aci.ProtectedItem;

Modified: directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/model/ProtectedItemWrapperFactory.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/model/ProtectedItemWrapperFactory.java?view=diff&rev=526705&r1=526704&r2=526705
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/model/ProtectedItemWrapperFactory.java (original)
+++ directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/model/ProtectedItemWrapperFactory.java Mon Apr  9 03:49:38 2007
@@ -1,13 +1,13 @@
 
 package org.apache.directory.ldapstudio.aciitemeditor.model;
 
+import org.apache.directory.ldapstudio.aciitemeditor.AttributeTypeAndValueValueEditor;
+import org.apache.directory.ldapstudio.aciitemeditor.AttributeTypeValueEditor;
+import org.apache.directory.ldapstudio.aciitemeditor.FilterValueEditor;
 import org.apache.directory.ldapstudio.aciitemeditor.MaxValueCountValueEditor;
 import org.apache.directory.ldapstudio.aciitemeditor.RestrictedByValueEditor;
-import org.apache.directory.ldapstudio.browser.ui.valueeditors.internal.AttributeTypeAndValueValueEditor;
-import org.apache.directory.ldapstudio.browser.ui.valueeditors.internal.AttributeTypeValueEditor;
-import org.apache.directory.ldapstudio.browser.ui.valueeditors.internal.FilterValueEditor;
-import org.apache.directory.ldapstudio.browser.ui.valueeditors.internal.IntegerValueEditor;
-import org.apache.directory.ldapstudio.browser.ui.valueeditors.internal.TextValueEditor;
+import org.apache.directory.ldapstudio.valueeditors.TextValueEditor;
+import org.apache.directory.ldapstudio.valueeditors.integer.IntegerValueEditor;
 import org.apache.directory.shared.ldap.aci.ProtectedItem;
 
 public class ProtectedItemWrapperFactory

Modified: directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/model/UserClassWrapper.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/model/UserClassWrapper.java?view=diff&rev=526705&r1=526704&r2=526705
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/model/UserClassWrapper.java (original)
+++ directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/model/UserClassWrapper.java Mon Apr  9 03:49:38 2007
@@ -13,7 +13,7 @@
 
 import javax.naming.Name;
 
-import org.apache.directory.ldapstudio.browser.ui.valueeditors.AbstractDialogStringValueEditor;
+import org.apache.directory.ldapstudio.valueeditors.AbstractDialogStringValueEditor;
 import org.apache.directory.shared.ldap.aci.ACIItemParser;
 import org.apache.directory.shared.ldap.aci.UserClass;
 import org.apache.directory.shared.ldap.aci.UserFirstACIItem;

Modified: directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/model/UserClassWrapperFactory.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/model/UserClassWrapperFactory.java?view=diff&rev=526705&r1=526704&r2=526705
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/model/UserClassWrapperFactory.java (original)
+++ directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/model/UserClassWrapperFactory.java Mon Apr  9 03:49:38 2007
@@ -2,8 +2,8 @@
 package org.apache.directory.ldapstudio.aciitemeditor.model;
 
 import org.apache.directory.ldapstudio.aciitemeditor.SubtreeValueEditor;
-import org.apache.directory.ldapstudio.browser.ui.valueeditors.internal.DnValueEditor;
-import org.apache.directory.ldapstudio.browser.ui.valueeditors.internal.TextValueEditor;
+import org.apache.directory.ldapstudio.valueeditors.TextValueEditor;
+import org.apache.directory.ldapstudio.valueeditors.dn.DnValueEditor;
 import org.apache.directory.shared.ldap.aci.UserClass;
 
 public class UserClassWrapperFactory

Modified: directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/widgets/ACIItemProtectedItemsComposite.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/widgets/ACIItemProtectedItemsComposite.java?view=diff&rev=526705&r1=526704&r2=526705
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/widgets/ACIItemProtectedItemsComposite.java (original)
+++ directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/widgets/ACIItemProtectedItemsComposite.java Mon Apr  9 03:49:38 2007
@@ -31,7 +31,7 @@
 import org.apache.directory.ldapstudio.aciitemeditor.dialogs.MultiValuedDialog;
 import org.apache.directory.ldapstudio.aciitemeditor.model.ProtectedItemWrapper;
 import org.apache.directory.ldapstudio.aciitemeditor.model.ProtectedItemWrapperFactory;
-import org.apache.directory.ldapstudio.browser.ui.valueeditors.AbstractDialogStringValueEditor;
+import org.apache.directory.ldapstudio.valueeditors.AbstractDialogStringValueEditor;
 import org.apache.directory.shared.ldap.aci.ProtectedItem;
 import org.eclipse.jface.viewers.ArrayContentProvider;
 import org.eclipse.jface.viewers.CellEditor;

Modified: directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/widgets/ACIItemUserClassesComposite.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/widgets/ACIItemUserClassesComposite.java?view=diff&rev=526705&r1=526704&r2=526705
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/widgets/ACIItemUserClassesComposite.java (original)
+++ directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/widgets/ACIItemUserClassesComposite.java Mon Apr  9 03:49:38 2007
@@ -31,7 +31,7 @@
 import org.apache.directory.ldapstudio.aciitemeditor.dialogs.MultiValuedDialog;
 import org.apache.directory.ldapstudio.aciitemeditor.model.UserClassWrapper;
 import org.apache.directory.ldapstudio.aciitemeditor.model.UserClassWrapperFactory;
-import org.apache.directory.ldapstudio.browser.ui.valueeditors.AbstractDialogStringValueEditor;
+import org.apache.directory.ldapstudio.valueeditors.AbstractDialogStringValueEditor;
 import org.apache.directory.shared.ldap.aci.ProtectedItem;
 import org.apache.directory.shared.ldap.aci.UserClass;
 import org.eclipse.jface.viewers.ArrayContentProvider;



Mime
View raw message