directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r475813 [1/3] - in /directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser: ./ META-INF/ resources/ resources/icons/ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/directory/ src/main...
Date Thu, 16 Nov 2006 16:56:37 GMT
Author: pamarcelot
Date: Thu Nov 16 08:56:34 2006
New Revision: 475813

URL: http://svn.apache.org/viewvc?view=rev&rev=475813
Log:
Importing project ldapstudio-browser

Added:
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/.classpath
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/.project
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/META-INF/
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/META-INF/MANIFEST.MF
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/build.properties
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/build.xml
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/ivy.xml
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/plugin.xml
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/attribute_delete.gif   (with props)
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/attribute_edit.gif   (with props)
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/attribute_new.gif   (with props)
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/attributes_view.gif   (with props)
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/browser-perspective.png   (with props)
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/browser_view.png   (with props)
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/connection.gif   (with props)
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/connection_delete.gif   (with props)
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/connection_edit.gif   (with props)
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/connection_error.gif   (with props)
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/connection_new.gif   (with props)
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/entry.gif   (with props)
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/entry_delete.gif   (with props)
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/entry_new.gif   (with props)
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/folder_entry.gif   (with props)
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/refresh.gif   (with props)
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/wizard_connection.gif   (with props)
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/Activator.java
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/AttributesViewController.java
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/BrowserViewController.java
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/PreferenceInitializer.java
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/actions/
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/actions/AttributeDeleteAction.java
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/actions/AttributeEditAction.java
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/actions/AttributeNewAction.java
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/actions/ConnectionDeleteAction.java
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/actions/ConnectionEditAction.java
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/actions/ConnectionNewAction.java
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/actions/EntryDeleteAction.java
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/actions/EntryNewAction.java
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/actions/RefreshAction.java
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/actions/RenameAttributeAction.java
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/model/
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/model/AbstractGrammar.java
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/model/Connection.java
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/model/ConnectionGrammar.java
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/model/ConnectionListener.java
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/model/ConnectionParser.java
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/model/ConnectionParserContainer.java
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/model/Connections.java
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/model/ConnectionsEvent.java
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/model/ConnectionsListener.java
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/model/GrammarAction.java
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/model/GrammarTransition.java
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/model/IAction.java
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/model/IGrammar.java
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/model/Tag.java
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/view/
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/view/ImageKeys.java
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/view/perspectives/
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/view/perspectives/LdapBrowserPerspective.java
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/view/views/
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/view/views/AttributesView.java
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/view/views/AttributesViewContentProvider.java
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/view/views/AttributesViewLabelProvider.java
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/view/views/BrowserView.java
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/view/views/BrowserViewContentProvider.java
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/view/views/BrowserViewLabelProvider.java
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/view/views/ConnectionWizard.java
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/view/views/ConnectionWizardInformationPage.java
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/view/views/wrappers/
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/view/views/wrappers/ConnectionWrapper.java
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/view/views/wrappers/DisplayableTreeViewerElement.java
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/view/views/wrappers/EntryWrapper.java
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/view/views/wrappers/TreeViewerRootNode.java
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/test/
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/test/java/

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/.classpath
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/.classpath?view=auto&rev=475813
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/.classpath (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/.classpath Thu Nov 16 08:56:34 2006
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src/main/java"/>
+	<classpathentry kind="src" path="src/test/java"/>
+	<classpathentry exported="true" kind="lib" path="lib/xpp3-1.1.3_8.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/antlr-2.7.6.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/commons-collections-3.1.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/shared-asn1-0.9.6-SNAPSHOT.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/shared-ldap-0.9.6-SNAPSHOT.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/dom4j-1.6.1.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/nlog4j-1.2.25.jar"/>
+	<classpathentry kind="lib" path="lib/ldapstudio-dsml-parser-0.1.jar"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="output" path="target"/>
+</classpath>

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/.project
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/.project?view=auto&rev=475813
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/.project (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/.project Thu Nov 16 08:56:34 2006
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>ldapstudio-browser</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/META-INF/MANIFEST.MF?view=auto&rev=475813
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/META-INF/MANIFEST.MF (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/META-INF/MANIFEST.MF Thu Nov 16 08:56:34 2006
@@ -0,0 +1,20 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: LDAP Browser Plug-in
+Bundle-SymbolicName: org.apache.directory.ldapstudio.browser; singleton:=true
+Bundle-Version: 1.0
+Bundle-Activator: org.apache.directory.ldapstudio.browser.Activator
+Bundle-Vendor: apache.org
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime
+Eclipse-LazyStart: true
+Bundle-ClassPath: .,
+ lib/xpp3-1.1.3_8.jar,
+ lib/antlr-2.7.6.jar,
+ lib/commons-collections-3.1.jar,
+ lib/shared-asn1-0.9.6-SNAPSHOT.jar,
+ lib/shared-ldap-0.9.6-SNAPSHOT.jar,
+ lib/dom4j-1.6.1.jar,
+ lib/nlog4j-1.2.25.jar,
+ lib/ldapstudio-dsml-parser-0.1.jar

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/build.properties
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/build.properties?view=auto&rev=475813
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/build.properties (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/build.properties Thu Nov 16 08:56:34 2006
@@ -0,0 +1,17 @@
+source.. = src/main/java/,\
+			src/test/java/
+output.. = bin/
+bin.includes = .,\
+               META-INF/,\
+               plugin.xml,\
+               build.properties,\
+               lib/xpp3-1.1.3_8.jar,\
+               lib/antlr-2.7.6.jar,\
+               lib/commons-collections-3.1.jar,\
+               lib/shared-asn1-0.9.6-SNAPSHOT.jar,\
+               lib/shared-ldap-0.9.6-SNAPSHOT.jar,\
+               lib/dom4j-1.6.1.jar,\
+               lib/nlog4j-1.2.25.jar,\
+               lib/ldapstudio-dsml-parser-0.1.jar,\
+               resources/
+

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/build.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/build.xml?view=auto&rev=475813
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/build.xml (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/build.xml Thu Nov 16 08:56:34 2006
@@ -0,0 +1,141 @@
+<!--
+  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.
+-->
+<project name="ldapstudio-browser-plugin" default="jar" xmlns:ivy="antlib:fr.jayasoft.ivy.ant">
+	<property name="project.name" value="org.apache.directory.ldapstudio.browser" />
+	<property name="project.version" value="0.1" />
+
+	<property name="project.output" value="${basedir}/target" />
+	<property name="project.build" value="${project.output}/build" />
+	<property name="project.src" value="${basedir}/src/main/java" />
+
+	<property name="lib.dir" value="lib" />
+
+	<property name="repository.dir" location="../dependencies/externals/"/>
+
+	<!-- Configuring Ivy (Needs to be AFTER the $repository.dir declaration) -->
+	<ivy:configure file="../tools/ivyconf.xml"/>
+
+	<!-- ================================== -->
+	<!--               RESOLVE              -->
+	<!-- ================================== -->
+	<target name="resolve" description="--> retreive dependencies with ivy">
+		<ivy:retrieve/>
+	</target>
+
+	<!-- ================================== -->
+	<!--             CLASSPATH              -->
+	<!-- ================================== -->
+	<target name="build-classpath" description="Computes a classpath according to current OS" >
+		<path id="classpath">
+			<fileset dir="../dependencies/eclipse/3.2">
+				<include name="**/*.jar"/>
+			</fileset>
+			<fileset dir="${lib.dir}" />
+		</path>
+	</target>
+
+	<!-- ================================== -->
+	<!--             COMPILE                -->
+	<!-- ================================== -->
+	<target name="compile" depends="resolve,checkclasses,build-classpath" unless="classes-up2date" description="Compiles the plugin">
+		<mkdir dir="${project.build}" />
+		<copy todir="${project.build}">
+			<fileset dir="${basedir}">
+				<include name="plugin.xml" />
+			</fileset>
+		</copy>
+		<mkdir dir="${project.build}/${lib.dir}" />
+		<copy todir="${project.build}/${lib.dir}">
+			<fileset dir="${basedir}/${lib.dir}">
+				<include name="*.jar" />
+			</fileset>
+		</copy>
+		<mkdir dir="${project.build}/resources" />
+		<copy todir="${project.build}/resources">
+			<fileset dir="${basedir}/resources">
+				<include name="**" />
+			</fileset>
+		</copy>
+		<mkdir dir="${project.build}/META-INF" />
+		<copy todir="${project.build}/META-INF">
+			<fileset dir="${basedir}/META-INF">
+				<include name="**" />
+			</fileset>
+		</copy>
+		<javac
+			source="1.5"
+			debug="yes"
+			srcdir="${project.src}"
+			excludes=""
+			destdir="${project.build}"
+			classpathref="classpath"
+			listfiles="yes" />
+
+		<tstamp>
+			<format pattern="yyyy-MMM-dd, HH:mm 'GMT'Z" property="timestamp" locale="en" />
+		</tstamp>
+		<echo message="${project.name}-${project.version} compiled ${timestamp} by ${user.name}" file="${project.build}/compile.timestamp" />
+	</target>
+
+	<target name="checkclasses">
+		<uptodate property="classes-up2date" targetfile="${project.build}/compile.timestamp">
+			<srcfiles dir="${project.src}" />
+		</uptodate>
+	</target>
+
+	<!-- ================================== -->
+	<!--              JAVADOC               -->
+	<!-- ================================== -->
+	<target name="javadoc" description="Generate Javadoc files">
+		<mkdir dir="${basedir}/doc" />
+		<javadoc destdir="${basedir}/doc">
+			<fileset dir="src/main/java" defaultexcludes="yes">
+				<include name="org/apache/directory/ldapstudio/**"/>
+			</fileset>
+		</javadoc>
+	</target>
+	
+	<!-- ================================== -->
+	<!--              JAR                   -->
+	<!-- ================================== -->
+	<target name="jar" description="Creates jar file" depends="compile">
+		<jar destfile="${project.output}/${project.name}_${project.version}.jar" manifest="${project.build}/META-INF/MANIFEST.MF">
+			<fileset dir="${project.build}" excludes="compile.timestamp" />
+		</jar>
+	</target>
+
+	<!-- ================================== -->
+	<!--               CLEAN                -->
+	<!-- ================================== -->
+	<target name="clean" description="Deletes any generated file (javadoc, classes, jars, distribution)">
+		<delete includeemptydirs="true">
+			<fileset dir="${basedir}">
+				<exclude name=".project" />
+				<exclude name=".classpath" />
+				<exclude name="build.xml" />
+				<exclude name="build.properties" />
+				<exclude name="ivy.xml" />
+				<exclude name="plugin.xml" />
+				<exclude name="resources/**" />
+				<exclude name="META-INF/**" />
+				<exclude name="src/**" />
+			</fileset>
+		</delete>
+	</target>
+</project>

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/ivy.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/ivy.xml?view=auto&rev=475813
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/ivy.xml (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/ivy.xml Thu Nov 16 08:56:34 2006
@@ -0,0 +1,26 @@
+<!--
+  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.
+-->
+<ivy-module version="1.0">
+	<info organisation="org.apache.directory.ldapstudio" module="ldapdstudio-browser-plugin"/>
+	<dependencies>
+		<dependency org="org.xmlpull" name="xpp3" rev="1.1.3_8"/>
+		<dependency org="org.apache.directory.shared" name="shared-ldap" rev="0.9.6-SNAPSHOT"/>
+		<dependency org="org.apache.directory.ldapstudio" name="ldapstudio-dsml-parser" rev="0.1"/>
+    </dependencies>
+</ivy-module>
\ No newline at end of file

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/plugin.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/plugin.xml?view=auto&rev=475813
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/plugin.xml (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/plugin.xml Thu Nov 16 08:56:34 2006
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<!--
+  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.
+-->
+<plugin
+   id="org.apache.directory.ldapstudio.browser"
+   name="LDAP Studio Browser"
+   version="0.1"
+   provider-name="apache.org">
+   <requires>
+      <import plugin="org.eclipse.ui"/>
+      <import plugin="org.eclipse.core.runtime"/>
+   </requires>
+   <extension
+         point="org.eclipse.ui.perspectives">
+      <perspective
+            class="org.apache.directory.ldapstudio.browser.view.perspectives.LdapBrowserPerspective"
+            icon="resources/icons/browser-perspective.png"
+            id="org.apache.directory.ldapstudio.browser.perspective"
+            name="LDAP Browser"/>
+   </extension>
+   <extension
+         point="org.eclipse.ui.views">
+      <view
+            allowMultiple="false"
+            class="org.apache.directory.ldapstudio.browser.view.views.BrowserView"
+            icon="resources/icons/browser_view.png"
+            id="org.apache.directory.ldapstudio.browser.BrowserView"
+            name="Browser"/>
+      <view
+            allowMultiple="false"
+            class="org.apache.directory.ldapstudio.browser.view.views.AttributesView"
+            icon="resources/icons/attributes_view.gif"
+            id="org.apache.directory.ldapstudio.browser.AttributesView"
+            name="Attributes"/>
+   </extension>
+   <extension
+         point="org.eclipse.ui.newWizards">
+      <wizard
+            class="org.apache.directory.ldapstudio.browser.view.views.ConnectionWizard"
+            id="org.apache.directory.ldapstudio.browser.connectionWizard"
+            name="ConnectionWizard"/>
+   </extension>
+   <extension
+         point="org.eclipse.core.runtime.preferences">
+      <initializer class="org.apache.directory.ldapstudio.browser.controller.PreferenceInitializer"/>
+   </extension>
+</plugin>

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/attribute_delete.gif
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/attribute_delete.gif?view=auto&rev=475813
==============================================================================
Binary file - no diff available.

Propchange: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/attribute_delete.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/attribute_edit.gif
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/attribute_edit.gif?view=auto&rev=475813
==============================================================================
Binary file - no diff available.

Propchange: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/attribute_edit.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/attribute_new.gif
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/attribute_new.gif?view=auto&rev=475813
==============================================================================
Binary file - no diff available.

Propchange: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/attribute_new.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/attributes_view.gif
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/attributes_view.gif?view=auto&rev=475813
==============================================================================
Binary file - no diff available.

Propchange: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/attributes_view.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/browser-perspective.png
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/browser-perspective.png?view=auto&rev=475813
==============================================================================
Binary file - no diff available.

Propchange: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/browser-perspective.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/browser_view.png
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/browser_view.png?view=auto&rev=475813
==============================================================================
Binary file - no diff available.

Propchange: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/browser_view.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/connection.gif
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/connection.gif?view=auto&rev=475813
==============================================================================
Binary file - no diff available.

Propchange: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/connection.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/connection_delete.gif
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/connection_delete.gif?view=auto&rev=475813
==============================================================================
Binary file - no diff available.

Propchange: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/connection_delete.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/connection_edit.gif
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/connection_edit.gif?view=auto&rev=475813
==============================================================================
Binary file - no diff available.

Propchange: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/connection_edit.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/connection_error.gif
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/connection_error.gif?view=auto&rev=475813
==============================================================================
Binary file - no diff available.

Propchange: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/connection_error.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/connection_new.gif
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/connection_new.gif?view=auto&rev=475813
==============================================================================
Binary file - no diff available.

Propchange: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/connection_new.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/entry.gif
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/entry.gif?view=auto&rev=475813
==============================================================================
Binary file - no diff available.

Propchange: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/entry.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/entry_delete.gif
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/entry_delete.gif?view=auto&rev=475813
==============================================================================
Binary file - no diff available.

Propchange: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/entry_delete.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/entry_new.gif
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/entry_new.gif?view=auto&rev=475813
==============================================================================
Binary file - no diff available.

Propchange: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/entry_new.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/folder_entry.gif
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/folder_entry.gif?view=auto&rev=475813
==============================================================================
Binary file - no diff available.

Propchange: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/folder_entry.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/refresh.gif
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/refresh.gif?view=auto&rev=475813
==============================================================================
Binary file - no diff available.

Propchange: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/refresh.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/wizard_connection.gif
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/wizard_connection.gif?view=auto&rev=475813
==============================================================================
Binary file - no diff available.

Propchange: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/resources/icons/wizard_connection.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/Activator.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/Activator.java?view=auto&rev=475813
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/Activator.java (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/Activator.java Thu Nov 16 08:56:34 2006
@@ -0,0 +1,81 @@
+/*
+ *  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.browser;
+
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin
+{
+
+    // The plug-in ID
+    public static final String PLUGIN_ID = "org.apache.directory.ldapstudio.browser"; //$NON-NLS-1$
+
+    // The shared instance
+    private static Activator plugin;
+
+
+    /**
+     * The constructor
+     */
+    public Activator()
+    {
+        plugin = this;
+    }
+
+
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+     */
+    public void start( BundleContext context ) throws Exception
+    {
+        super.start( context );
+    }
+
+
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+     */
+    public void stop( BundleContext context ) throws Exception
+    {
+        plugin = null;
+        super.stop( context );
+    }
+
+
+    /**
+     * Returns the shared instance
+     *
+     * @return the shared instance
+     */
+    public static Activator getDefault()
+    {
+        return plugin;
+    }
+
+}

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/AttributesViewController.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/AttributesViewController.java?view=auto&rev=475813
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/AttributesViewController.java (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/AttributesViewController.java Thu Nov 16 08:56:34 2006
@@ -0,0 +1,204 @@
+/*
+ *  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.browser.controller;
+
+
+import org.apache.directory.ldapstudio.browser.controller.actions.AttributeDeleteAction;
+import org.apache.directory.ldapstudio.browser.controller.actions.AttributeEditAction;
+import org.apache.directory.ldapstudio.browser.controller.actions.AttributeNewAction;
+import org.apache.directory.ldapstudio.browser.view.views.AttributesView;
+import org.apache.directory.ldapstudio.browser.view.views.BrowserView;
+import org.apache.directory.ldapstudio.browser.view.views.wrappers.ConnectionWrapper;
+import org.apache.directory.ldapstudio.browser.view.views.wrappers.EntryWrapper;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IMenuListener;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.TreeSelection;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.ui.ISelectionListener;
+import org.eclipse.ui.IWorkbenchPart;
+
+
+/**
+ * This class is the Controller for the Attributes View.
+ */
+public class AttributesViewController implements IMenuListener
+{
+    private static final AttributesViewController instance;
+
+    /** The controlled View */
+    private AttributesView view;
+
+    private static IAction attributeNewAction;
+    private static IAction attributeEditAction;
+    private static IAction attributeDeleteAction;
+
+    // Static thread-safe singleton initializer
+    static
+    {
+        try
+        {
+            instance = new AttributesViewController();
+        }
+        catch ( Throwable e )
+        {
+            throw new RuntimeException( e.getMessage() );
+        }
+    }
+
+
+    /**
+     * Use this method to get the singleton instance of the controller
+     * @return
+     */
+    public static AttributesViewController getInstance()
+    {
+        return instance;
+    }
+
+
+    /**
+     * Sets the controlled View
+     * @param view the controlled View
+     */
+    public void setView( AttributesView view )
+    {
+        this.view = view;
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.eclipse.jface.action.IMenuListener#menuAboutToShow(org.eclipse.jface.action.IMenuManager)
+     */
+    public void menuAboutToShow( IMenuManager manager )
+    {
+        manager.add( attributeNewAction );
+        manager.add( attributeEditAction );
+        manager.add( attributeDeleteAction );
+    }
+
+
+    /**
+     * Creates all the actions
+     */
+    public void createActions()
+    {
+        // Creating Actions
+        attributeNewAction = new AttributeNewAction( view, "New attribute" );
+        attributeEditAction = new AttributeEditAction( view, "Edit attribute" );
+        attributeDeleteAction = new AttributeDeleteAction( view, "Delete attribute" );
+
+        // Disabling Actions by default
+        attributeNewAction.setEnabled( false );
+        attributeEditAction.setEnabled( false );
+        attributeDeleteAction.setEnabled( false );
+
+        registerUpdateActions();
+    }
+
+
+    /**
+     * Registers a Listener on the Browser View and enable/disable the Actions
+     * according to the selection
+     */
+    private void registerUpdateActions()
+    {
+        // Handling selection of the Browser View to enable/disable the Actions
+        view.getSite().getPage().addPostSelectionListener( BrowserView.ID, new ISelectionListener()
+        {
+            public void selectionChanged( IWorkbenchPart part, ISelection selection )
+            {
+                Object selectedObject = ( ( TreeSelection ) selection ).getFirstElement();
+                Table table = view.getViewer().getTable();
+
+                if ( selectedObject == null )
+                {
+                    attributeNewAction.setEnabled( false );
+                    table.setEnabled( false );
+                }
+                else
+                {
+                    if ( selectedObject instanceof ConnectionWrapper )
+                    {
+                        attributeNewAction.setEnabled( false );
+                        table.setEnabled( false );
+                    }
+                    else if ( selectedObject instanceof EntryWrapper )
+                    {
+                        attributeNewAction.setEnabled( true );
+                        table.setEnabled( true );
+                    }
+                }
+            }
+        } );
+
+        // Handling selection of the Attributes View to enable/disable the Actions
+        view.getSite().getPage().addPostSelectionListener( AttributesView.ID, new ISelectionListener()
+        {
+            public void selectionChanged( IWorkbenchPart part, ISelection selection )
+            {
+                if ( selection.isEmpty() )
+                {
+                    attributeEditAction.setEnabled( false );
+                    attributeDeleteAction.setEnabled( false );
+                }
+                else
+                {
+                    attributeEditAction.setEnabled( true );
+                    attributeDeleteAction.setEnabled( true );
+                }
+            }
+        } );
+    }
+
+
+    /**
+     * Gets the AttibuteNewAction
+     * @return the AttibuteNewAction
+     */
+    public IAction getAttributeNewAction()
+    {
+        return attributeNewAction;
+    }
+
+
+    /**
+     * Gets the AttributeEditAction
+     * @return the AttributeEditAction
+     */
+    public IAction getAttributeEditAction()
+    {
+        return attributeEditAction;
+    }
+
+
+    /**
+     * Gets the AttributeDeleteAction
+     * @return the AttributeDeleteAction
+     */
+    public IAction getAttributeDeleteAction()
+    {
+        return attributeDeleteAction;
+    }
+
+}

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/BrowserViewController.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/BrowserViewController.java?view=auto&rev=475813
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/BrowserViewController.java (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/BrowserViewController.java Thu Nov 16 08:56:34 2006
@@ -0,0 +1,227 @@
+/*
+ *  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.browser.controller;
+
+
+import org.apache.directory.ldapstudio.browser.controller.actions.ConnectionDeleteAction;
+import org.apache.directory.ldapstudio.browser.controller.actions.ConnectionEditAction;
+import org.apache.directory.ldapstudio.browser.controller.actions.ConnectionNewAction;
+import org.apache.directory.ldapstudio.browser.controller.actions.EntryDeleteAction;
+import org.apache.directory.ldapstudio.browser.controller.actions.EntryNewAction;
+import org.apache.directory.ldapstudio.browser.controller.actions.RefreshAction;
+import org.apache.directory.ldapstudio.browser.view.views.BrowserView;
+import org.apache.directory.ldapstudio.browser.view.views.wrappers.ConnectionWrapper;
+import org.apache.directory.ldapstudio.browser.view.views.wrappers.EntryWrapper;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IMenuListener;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.TreeSelection;
+import org.eclipse.ui.ISelectionListener;
+import org.eclipse.ui.IWorkbenchPart;
+
+
+/**
+ * This class is the Controller for the Browser View.
+ */
+public class BrowserViewController implements IMenuListener
+{
+    private static final BrowserViewController instance;
+
+    /** The controlled view */
+    private BrowserView view;
+
+    private static IAction connectionNewAction;
+    private static IAction connectionEditAction;
+    private static IAction connectionDeleteAction;
+    private static IAction refreshAction;
+    private static IAction entryNewAction;
+    private static IAction entryDeleteAction;
+
+    // Static thread-safe singleton initializer
+    static
+    {
+        try
+        {
+            instance = new BrowserViewController();
+        }
+        catch ( Throwable e )
+        {
+            throw new RuntimeException( e.getMessage() );
+        }
+    }
+
+
+    /**
+     * Use this method to get the singleton instance of the controller
+     * @return
+     */
+    public static BrowserViewController getInstance()
+    {
+        return instance;
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.eclipse.jface.action.IMenuListener#menuAboutToShow(org.eclipse.jface.action.IMenuManager)
+     */
+    public void menuAboutToShow( IMenuManager manager )
+    {
+        manager.add( connectionNewAction );
+        manager.add( connectionEditAction );
+        manager.add( connectionDeleteAction );
+        manager.add( new Separator() );
+        manager.add( refreshAction );
+        manager.add( new Separator() );
+        manager.add( entryNewAction );
+        manager.add( entryDeleteAction );
+    }
+
+
+    /**
+     * Sets the controlled View
+     * @param view the controlled View
+     */
+    public void setView( BrowserView view )
+    {
+        this.view = view;
+    }
+
+
+    /**
+     * Creates all the actions
+     */
+    public void createActions()
+    {
+        connectionNewAction = new ConnectionNewAction( view, "New connection" );
+        connectionDeleteAction = new ConnectionDeleteAction( view, "Delete connection" );
+        connectionEditAction = new ConnectionEditAction( view, "Edit connection" );
+        refreshAction = new RefreshAction( view, "Refresh" );
+        entryNewAction = new EntryNewAction( view, "New entry" );
+        entryDeleteAction = new EntryDeleteAction( view, "Delete entry" );
+
+        registerUpdateActions();
+    }
+
+
+    /**
+     * Registers a Listener on the Browser View and enable/disable the Actions
+     * according to the selection
+     */
+    private void registerUpdateActions()
+    {
+        // Handling selection of the Browser View to enable/disable the Actions
+        view.getSite().getPage().addPostSelectionListener( BrowserView.ID, new ISelectionListener()
+        {
+            public void selectionChanged( IWorkbenchPart part, ISelection selection )
+            {
+                Object selectedObject = ( ( TreeSelection ) selection ).getFirstElement();
+
+                if ( selectedObject == null )
+                {
+                    connectionEditAction.setEnabled( false );
+                    connectionDeleteAction.setEnabled( false );
+                    entryNewAction.setEnabled( false );
+                    entryDeleteAction.setEnabled( false );
+                }
+                else
+                {
+                    if ( selectedObject instanceof ConnectionWrapper )
+                    {
+                        connectionEditAction.setEnabled( true );
+                        connectionDeleteAction.setEnabled( true );
+                        entryNewAction.setEnabled( false );
+                        entryDeleteAction.setEnabled( false );
+                    }
+                    else if ( selectedObject instanceof EntryWrapper )
+                    {
+                        connectionEditAction.setEnabled( false );
+                        connectionDeleteAction.setEnabled( false );
+                        entryNewAction.setEnabled( true );
+                        entryDeleteAction.setEnabled( true );
+                    }
+                }
+            }
+        } );
+    }
+
+
+    /**
+     * Gets the ConnectionDeleteAction
+     * @return the ConnectionDeleteAction
+     */
+    public IAction getConnectionDeleteAction()
+    {
+        return connectionDeleteAction;
+    }
+
+
+    /**
+     * Gets the ConnectionNewAction
+     * @return the ConnectionNewAction
+     */
+    public IAction getConnectionNewAction()
+    {
+        return connectionNewAction;
+    }
+
+
+    /**
+     * Gets the ConnectionEditAction
+     * @return the ConnectionEditAction
+     */
+    public IAction getConnectionEditAction()
+    {
+        return connectionEditAction;
+    }
+
+
+    /**
+     * Gets the RefreshAction
+     * @return the RefreshAction
+     */
+    public IAction getRefreshAction()
+    {
+        return refreshAction;
+    }
+
+
+    /**
+     * Gets the EntryDeleteAction
+     * @return the EntryDeleteAction
+     */
+    public IAction getEntryDeleteAction()
+    {
+        return entryDeleteAction;
+    }
+
+
+    /**
+     * Gets the EntryNewAction
+     * @return the EntryNewAction
+     */
+    public IAction getEntryNewAction()
+    {
+        return entryNewAction;
+    }
+
+}

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/PreferenceInitializer.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/PreferenceInitializer.java?view=auto&rev=475813
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/PreferenceInitializer.java (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/PreferenceInitializer.java Thu Nov 16 08:56:34 2006
@@ -0,0 +1,44 @@
+/*
+ *  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.browser.controller;
+
+
+import org.apache.directory.ldapstudio.browser.Activator;
+import org.apache.directory.ldapstudio.browser.view.views.ConnectionWizard;
+import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
+import org.eclipse.jface.preference.IPreferenceStore;
+
+
+/**
+ * This class initializes the preferences on the first start up of the plugin
+ */
+public class PreferenceInitializer extends AbstractPreferenceInitializer
+{
+
+    @Override
+    public void initializeDefaultPreferences()
+    {
+        IPreferenceStore store = Activator.getDefault().getPreferenceStore();
+
+        store.setDefault( ConnectionWizard.CONNECTIONS_PREFS, "<connections></connections>" );
+    }
+
+}

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/actions/AttributeDeleteAction.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/actions/AttributeDeleteAction.java?view=auto&rev=475813
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/actions/AttributeDeleteAction.java (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/actions/AttributeDeleteAction.java Thu Nov 16 08:56:34 2006
@@ -0,0 +1,134 @@
+/*
+ *  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.browser.controller.actions;
+
+
+import javax.naming.directory.Attributes;
+
+import org.apache.directory.ldapstudio.browser.Activator;
+import org.apache.directory.ldapstudio.browser.model.Connection;
+import org.apache.directory.ldapstudio.browser.view.ImageKeys;
+import org.apache.directory.ldapstudio.browser.view.views.AttributesView;
+import org.apache.directory.ldapstudio.browser.view.views.BrowserView;
+import org.apache.directory.ldapstudio.browser.view.views.wrappers.EntryWrapper;
+import org.apache.directory.shared.ldap.codec.LdapResponse;
+import org.apache.directory.shared.ldap.codec.modify.ModifyResponse;
+import org.apache.directory.shared.ldap.codec.search.SearchResultEntry;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.TreeSelection;
+import org.eclipse.swt.widgets.TableItem;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.apache.directory.ldapstudio.dsmlv2.Dsmlv2ResponseParser;
+import org.apache.directory.ldapstudio.dsmlv2.engine.Dsmlv2Engine;
+import org.apache.directory.ldapstudio.dsmlv2.reponse.ErrorResponse;
+
+
+/**
+ * This class implements the Attribute Delete Action.
+ */
+public class AttributeDeleteAction extends Action
+{
+    private AttributesView view;
+
+
+    public AttributeDeleteAction( AttributesView view, String text )
+    {
+        super( text );
+        setImageDescriptor( AbstractUIPlugin
+            .imageDescriptorFromPlugin( Activator.PLUGIN_ID, ImageKeys.ATTRIBUTE_DELETE ) );
+        setToolTipText( "Delete attribute" );
+        this.view = view;
+    }
+
+
+    public void run()
+    {
+        try
+        {
+            // Getting the selection for the Attributes View
+            TableItem item = view.getSelectedAttributeTableItem();
+
+            String selectedAttribute = item.getText( 0 );
+            String selectedValue = item.getText( 1 );
+
+            // Getting the selected Entry in the Browser View
+            BrowserView browserView = ( BrowserView ) PlatformUI.getWorkbench().getActiveWorkbenchWindow()
+                .getActivePage().findView( BrowserView.ID );
+            EntryWrapper entryWrapper = ( EntryWrapper ) ( ( TreeSelection ) browserView.getViewer().getSelection() )
+                .getFirstElement();
+            SearchResultEntry entry = entryWrapper.getEntry();
+            Connection connection = entryWrapper.getConnection();
+
+            // Initialization of the DSML Engine and the DSML Response Parser
+            Dsmlv2Engine engine = new Dsmlv2Engine( connection.getHost(), connection.getPort(), connection.getUserDN()
+                .getNormName(), connection.getPassword() );
+            Dsmlv2ResponseParser parser = new Dsmlv2ResponseParser();
+
+            String request = "<batchRequest>" + "	<modifyRequest dn=\""
+                + entry.getObjectName().getNormName().toString() + "\">" + "		<modification name=\""
+                + selectedAttribute + "\" operation=\"delete\">" + "       	<value>" + selectedValue + "</value>"
+                + "       </modification>" + "	</modifyRequest>" + "</batchRequest>";
+
+            parser.setInput( engine.processDSML( request ) );
+            parser.parse();
+
+            LdapResponse ldapResponse = parser.getBatchResponse().getCurrentResponse();
+
+            if ( ldapResponse instanceof ModifyResponse )
+            {
+                ModifyResponse modifyResponse = ( ModifyResponse ) ldapResponse;
+
+                if ( modifyResponse.getLdapResult().getResultCode() == 0 )
+                {
+                    // Removing the selected attribute value
+                    Attributes attributes = entry.getPartialAttributeList();
+                    attributes.get( selectedAttribute ).remove( selectedValue );
+
+                    // refreshing the UI
+                    view.setInput( entryWrapper );
+                    view.resizeColumsToFit();
+                }
+                else
+                {
+                    // Displaying an error
+                    MessageDialog.openError( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
+                        "Error !", "An error has ocurred.\n" + modifyResponse.getLdapResult().getErrorMessage() );
+                }
+            }
+            else if ( ldapResponse instanceof ErrorResponse )
+            {
+                ErrorResponse errorResponse = ( ErrorResponse ) ldapResponse;
+
+                // Displaying an error
+                MessageDialog.openError( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), "Error !",
+                    "An error has ocurred.\n" + errorResponse.getMessage() );
+            }
+        }
+        catch ( Exception e )
+        {
+            // Displaying an error
+            MessageDialog.openError( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), "Error !",
+                "An error has ocurred.\n" + e.getMessage() );
+        }
+    }
+}

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/actions/AttributeEditAction.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/actions/AttributeEditAction.java?view=auto&rev=475813
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/actions/AttributeEditAction.java (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/actions/AttributeEditAction.java Thu Nov 16 08:56:34 2006
@@ -0,0 +1,52 @@
+/*
+ *  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.browser.controller.actions;
+
+
+import org.apache.directory.ldapstudio.browser.Activator;
+import org.apache.directory.ldapstudio.browser.view.ImageKeys;
+import org.apache.directory.ldapstudio.browser.view.views.AttributesView;
+import org.eclipse.jface.action.Action;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+
+
+/**
+ * This class implements the Attribute Edit Action.
+ */
+public class AttributeEditAction extends Action
+{
+    private AttributesView view;
+
+
+    public AttributeEditAction( AttributesView view, String text )
+    {
+        super( text );
+        setImageDescriptor( AbstractUIPlugin.imageDescriptorFromPlugin( Activator.PLUGIN_ID, ImageKeys.ATTRIBUTE_EDIT ) );
+        setToolTipText( "Edit attribute" );
+        this.view = view;
+    }
+
+
+    public void run()
+    {
+        System.out.println( "Edit attribute" );
+    }
+}

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/actions/AttributeNewAction.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/actions/AttributeNewAction.java?view=auto&rev=475813
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/actions/AttributeNewAction.java (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/actions/AttributeNewAction.java Thu Nov 16 08:56:34 2006
@@ -0,0 +1,52 @@
+/*
+ *  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.browser.controller.actions;
+
+
+import org.apache.directory.ldapstudio.browser.Activator;
+import org.apache.directory.ldapstudio.browser.view.ImageKeys;
+import org.apache.directory.ldapstudio.browser.view.views.AttributesView;
+import org.eclipse.jface.action.Action;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+
+
+/**
+ * This class implements the Attribute New Action.
+ */
+public class AttributeNewAction extends Action
+{
+    private AttributesView view;
+
+
+    public AttributeNewAction( AttributesView view, String text )
+    {
+        super( text );
+        setImageDescriptor( AbstractUIPlugin.imageDescriptorFromPlugin( Activator.PLUGIN_ID, ImageKeys.ATTRIBUTE_NEW ) );
+        setToolTipText( "New attribute" );
+        this.view = view;
+    }
+
+
+    public void run()
+    {
+        System.out.println( "New attribute" );
+    }
+}

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/actions/ConnectionDeleteAction.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/actions/ConnectionDeleteAction.java?view=auto&rev=475813
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/actions/ConnectionDeleteAction.java (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/actions/ConnectionDeleteAction.java Thu Nov 16 08:56:34 2006
@@ -0,0 +1,74 @@
+/*
+ *  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.browser.controller.actions;
+
+
+import org.apache.directory.ldapstudio.browser.Activator;
+import org.apache.directory.ldapstudio.browser.model.Connection;
+import org.apache.directory.ldapstudio.browser.model.Connections;
+import org.apache.directory.ldapstudio.browser.view.ImageKeys;
+import org.apache.directory.ldapstudio.browser.view.views.BrowserView;
+import org.apache.directory.ldapstudio.browser.view.views.wrappers.ConnectionWrapper;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.TreeSelection;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+
+
+/**
+ * This class implements the Connection Delete Action.
+ */
+public class ConnectionDeleteAction extends Action
+{
+    private BrowserView view;
+
+
+    public ConnectionDeleteAction( BrowserView view, String text )
+    {
+        super( text );
+        setImageDescriptor( AbstractUIPlugin.imageDescriptorFromPlugin( Activator.PLUGIN_ID,
+            ImageKeys.CONNECTION_DELETE ) );
+        setToolTipText( "Delete connection" );
+        this.view = view;
+    }
+
+
+    public void run()
+    {
+        // Getting the selected connection
+        ConnectionWrapper connectionWrapper = ( ConnectionWrapper ) ( ( TreeSelection ) view.getViewer().getSelection() )
+            .getFirstElement();
+        Connection selectedConnection = connectionWrapper.getConnection();
+
+        boolean answer = MessageDialog.openConfirm( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
+            "Confirm", "Are you sure you want to delete the connection \"" + selectedConnection.getName() + "\"?" );
+
+        if ( !answer )
+        {
+            // If the user clicks on the "Cancel" button, we return...
+            return;
+        }
+
+        // Removing the connection
+        Connections.getInstance().removeConnection( selectedConnection );
+    }
+}

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/actions/ConnectionEditAction.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/actions/ConnectionEditAction.java?view=auto&rev=475813
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/actions/ConnectionEditAction.java (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/actions/ConnectionEditAction.java Thu Nov 16 08:56:34 2006
@@ -0,0 +1,87 @@
+/*
+ *  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.browser.controller.actions;
+
+
+import org.apache.directory.ldapstudio.browser.Activator;
+import org.apache.directory.ldapstudio.browser.model.Connection;
+import org.apache.directory.ldapstudio.browser.view.ImageKeys;
+import org.apache.directory.ldapstudio.browser.view.views.BrowserView;
+import org.apache.directory.ldapstudio.browser.view.views.ConnectionWizard;
+import org.apache.directory.ldapstudio.browser.view.views.ConnectionWizard.ConnectionWizardType;
+import org.apache.directory.ldapstudio.browser.view.views.wrappers.ConnectionWrapper;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TreeSelection;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+
+
+/**
+ * This class implements the Connection Edit Action
+ */
+public class ConnectionEditAction extends Action
+{
+    private BrowserView view;
+
+
+    public ConnectionEditAction( BrowserView view, String text )
+    {
+        super( text );
+        setImageDescriptor( AbstractUIPlugin.imageDescriptorFromPlugin( Activator.PLUGIN_ID, ImageKeys.CONNECTION_EDIT ) );
+        setToolTipText( "Edit connection" );
+        this.view = view;
+    }
+
+
+    public void run()
+    {
+        // Getting the selected connection
+        ConnectionWrapper connectionWrapper = ( ConnectionWrapper ) ( ( TreeSelection ) view.getViewer().getSelection() )
+            .getFirstElement();
+        Connection selectedConnection = connectionWrapper.getConnection();
+
+        // Creating the Connection Wizard
+        ConnectionWizard wizard = new ConnectionWizard();
+        wizard.init( PlatformUI.getWorkbench(), StructuredSelection.EMPTY );
+        wizard.setType( ConnectionWizardType.EDIT );
+
+        wizard.setConnection( selectedConnection );
+
+        // Instantiates the wizard container with the wizard and opens it
+        WizardDialog dialog = new WizardDialog( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), wizard );
+        dialog.create();
+        int result = dialog.open();
+
+        // O is returned when "Finish" is clicked, 1 is returned when "Cancel" is clicked
+        if ( result != 0 )
+        {
+            return;
+        }
+
+        // Updating the state of the Connection since it has changed (this causes the icon to change)
+        connectionWrapper.setHasError( false );
+
+        selectedConnection.notifyListeners();
+
+    }
+}

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/actions/ConnectionNewAction.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/actions/ConnectionNewAction.java?view=auto&rev=475813
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/actions/ConnectionNewAction.java (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/actions/ConnectionNewAction.java Thu Nov 16 08:56:34 2006
@@ -0,0 +1,95 @@
+/*
+ *  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.browser.controller.actions;
+
+
+import org.apache.directory.ldapstudio.browser.Activator;
+import org.apache.directory.ldapstudio.browser.model.Connection;
+import org.apache.directory.ldapstudio.browser.model.Connections;
+import org.apache.directory.ldapstudio.browser.view.ImageKeys;
+import org.apache.directory.ldapstudio.browser.view.views.BrowserView;
+import org.apache.directory.ldapstudio.browser.view.views.ConnectionWizard;
+import org.apache.directory.ldapstudio.browser.view.views.ConnectionWizard.ConnectionWizardType;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+
+
+/**
+ * This class implements the Connection New Action *
+ */
+public class ConnectionNewAction extends Action
+{
+    private BrowserView view;
+
+
+    public ConnectionNewAction( BrowserView view, String text )
+    {
+        super( text );
+        setImageDescriptor( AbstractUIPlugin.imageDescriptorFromPlugin( Activator.PLUGIN_ID, ImageKeys.CONNECTION_NEW ) );
+        setToolTipText( "New connection" );
+        this.view = view;
+    }
+
+
+    public void run()
+    {
+        // Creating the new Connection
+        Connection newConnection = new Connection();
+
+        // Creating a new Connection Name with verification that a connection with
+        // the same name doesn't exist yet.
+        String newConnectionString = "New Connection";
+        String testString = newConnectionString;
+        Connections connections = Connections.getInstance();
+
+        int counter = 1;
+        while ( !connections.isConnectionNameAvailable( testString ) )
+        {
+            testString = newConnectionString + counter;
+            counter++;
+        }
+        newConnection.setName( testString );
+
+        // Creating the Connection Wizard
+        ConnectionWizard wizard = new ConnectionWizard();
+        wizard.init( PlatformUI.getWorkbench(), StructuredSelection.EMPTY );
+        wizard.setType( ConnectionWizardType.NEW );
+
+        wizard.setConnection( newConnection );
+
+        // Instantiates the wizard container with the wizard and opens it
+        WizardDialog dialog = new WizardDialog( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), wizard );
+        dialog.create();
+        int result = dialog.open();
+
+        // O is returned when "Finish" is clicked, 1 is returned when "Cancel" is clicked
+        if ( result != 0 )
+        {
+            return;
+        }
+
+        // Adding the connection
+        Connections.getInstance().addConnection( newConnection );
+    }
+}

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/actions/EntryDeleteAction.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/actions/EntryDeleteAction.java?view=auto&rev=475813
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/actions/EntryDeleteAction.java (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/actions/EntryDeleteAction.java Thu Nov 16 08:56:34 2006
@@ -0,0 +1,49 @@
+/*
+ *  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.browser.controller.actions;
+
+
+import org.apache.directory.ldapstudio.browser.Activator;
+import org.apache.directory.ldapstudio.browser.view.ImageKeys;
+import org.apache.directory.ldapstudio.browser.view.views.BrowserView;
+import org.eclipse.jface.action.Action;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+
+
+public class EntryDeleteAction extends Action
+{
+    private BrowserView view;
+
+
+    public EntryDeleteAction( BrowserView view, String text )
+    {
+        super( text );
+        setImageDescriptor( AbstractUIPlugin.imageDescriptorFromPlugin( Activator.PLUGIN_ID, ImageKeys.ENTRY_DELETE ) );
+        setToolTipText( "Delete entry" );
+        this.view = view;
+    }
+
+
+    public void run()
+    {
+        System.out.println( "delete entry" );
+    }
+}

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/actions/EntryNewAction.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/actions/EntryNewAction.java?view=auto&rev=475813
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/actions/EntryNewAction.java (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser/src/main/java/org/apache/directory/ldapstudio/browser/controller/actions/EntryNewAction.java Thu Nov 16 08:56:34 2006
@@ -0,0 +1,49 @@
+/*
+ *  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.browser.controller.actions;
+
+
+import org.apache.directory.ldapstudio.browser.Activator;
+import org.apache.directory.ldapstudio.browser.view.ImageKeys;
+import org.apache.directory.ldapstudio.browser.view.views.BrowserView;
+import org.eclipse.jface.action.Action;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+
+
+public class EntryNewAction extends Action
+{
+    private BrowserView view;
+
+
+    public EntryNewAction( BrowserView view, String text )
+    {
+        super( text );
+        setImageDescriptor( AbstractUIPlugin.imageDescriptorFromPlugin( Activator.PLUGIN_ID, ImageKeys.ENTRY_NEW ) );
+        setToolTipText( "New entry" );
+        this.view = view;
+    }
+
+
+    public void run()
+    {
+        System.out.println( "New entry" );
+    }
+}



Mime
View raw message