You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Emmanuel Lécharny <el...@gmail.com> on 2015/11/05 17:34:37 UTC

[Studio] Eclipse mars

Hi,

I have tried to load the project in Mars, and I must say it's not really
a success :/ 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 :/


Re: [Studio] Eclipse mars

Posted by Stefan Seelmann <ma...@stefan-seelmann.de>.
Just tested with a fresh Eclipse Mars "for RCP and RAP Developers"
installation. I followed the steps on the readme (first import target
platform, initialize target platform, import the rest, installed
connector plugins). I can launch Studio, creata a server, connect to it.

Kind Regards,
Stefan

On 11/06/2015 07:52 AM, Stefan Seelmann wrote:
> 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
> 


Re: [Studio] Eclipse mars

Posted by Stefan Seelmann <ma...@stefan-seelmann.de>.
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