On 11/05/2015 05:34 PM, Emmanuel Lécharny wrote:
> Hi,
>
> I have tried to load the project in Mars, and I must say it's not really
> a success :/
I think I had it working in Mars, but I'll try again at the weekend.
> I can laod all the modules, but when I launch it, then I
> get various errors. Even if I can see some parts of it (like the
> Sercvers), some other aren't working well. Typically, I get an exception
> when opening the Connection view. It seems like it tries to create an
> URL taken from some text read from the clipboard :
>
> in org.apache.directory.studio.connection.ui.actions.PasteAction :
>
> ...
> private List<Connection> getConnectionsByLdapUrl()
> {
> List<Connection> connections = new ArrayList<Connection>();
>
> Object content = getFromClipboard( TextTransfer.getInstance()
> ); // Here, content is " /studio-rcp/resources/icons/linux/studio.xpm"
>
> if ( content instanceof String )
> {
> ConnectionParameterPage[] connectionParameterPages =
> ConnectionParameterPageManager
> .getConnectionParameterPages();
>
> String[] lines = ( ( String ) content ).split(
> ConnectionCoreConstants.LINE_SEPARATOR );
>
> for ( String line : lines )
> {
> line = line.trim();
>
> if ( StringUtils.isNotEmpty( line ) )
> {
> try
> {
> LdapUrl ldapUrl = new LdapUrl( line ); // Not
> happy with " /studio-rcp/resources/icons/linux/studio.xpm", which is
> kind of normal :/
>
> I have no idea why the clipboard returns this value :/
>
In this code we check if the String in the clipboard is an LDAP URL from
which we can prefill the connection object. If it is a valid LDAP URL
the action gets enabled and the user can "paste" a connection.
If the String is not a valid LDAP URL then you get an
LdapURLEncodingException, but that is catched and ignored some lines
below and should not appear. Do you get this exception or any other in
your ".log" file?
Kind Regards,
Stefan