Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 99759 invoked from network); 27 Nov 2008 16:42:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 Nov 2008 16:42:56 -0000 Received: (qmail 99511 invoked by uid 500); 27 Nov 2008 16:43:06 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 99468 invoked by uid 500); 27 Nov 2008 16:43:06 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 99457 invoked by uid 99); 27 Nov 2008 16:43:06 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Nov 2008 08:43:06 -0800 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [213.46.255.22] (HELO viefep18-int.chello.at) (213.46.255.22) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Nov 2008 16:41:39 +0000 Received: from felixknecht.ch ([84.72.24.104]) by viefep24-int.chello.at (InterMail vM.7.08.02.00 201-2186-121-20061213) with ESMTP id <20081127164212.SPKE13586.viefep24-int.chello.at@felixknecht.ch> for ; Thu, 27 Nov 2008 17:42:12 +0100 Received: (qmail 1660 invoked by uid 210); 27 Nov 2008 16:42:11 -0000 Received: from 192.168.1.97 by odin (envelope-from , uid 201) with qmail-scanner-2.05st (clamdscan: 0.94.1/8684. perlscan: 2.05st. Clear:RC:1(192.168.1.97):. Processed in 0.030171 secs); 27 Nov 2008 16:42:11 -0000 Received: from unknown (HELO ?192.168.1.97?) (192.168.1.97) by 192.168.1.11 with SMTP; 27 Nov 2008 16:42:11 -0000 Message-ID: <492ECDE6.9010506@otego.com> Date: Thu, 27 Nov 2008 17:42:14 +0100 From: Felix Knecht User-Agent: Thunderbird 2.0.0.18 (X11/20081121) MIME-Version: 1.0 To: Apache Directory Developers List Subject: What is 'kind' for ?? Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi all Working on externalizing strings I encountered a problem. Can please anybody explain me what the variable 'kind' is for? It's never read withing this function. The usage ATM seems quite obsolete to me. Thanks Felix From ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/ObjectClassDescriptionDetailsPage.java private void createMainContent( ObjectClassDescription ocd ) { // dispose old content if ( mainSection.getClient() != null ) { mainSection.getClient().dispose(); } // create new client Composite mainClient = toolkit.createComposite( mainSection, SWT.WRAP ); GridLayout mainLayout = new GridLayout( 2, false ); mainClient.setLayout( mainLayout ); mainSection.setClient( mainClient ); // create new content if ( ocd != null ) { toolkit.createLabel( mainClient, "Numeric OID:", SWT.NONE ); numericOidText = toolkit.createText( mainClient, getNonNullString( ocd.getNumericOid() ), SWT.NONE ); numericOidText.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) ); numericOidText.setEditable( false ); toolkit.createLabel( mainClient, "Objectclass names:", SWT.NONE ); namesText = toolkit.createText( mainClient, getNonNullString( SchemaUtils.toString( ocd ) ), SWT.NONE ); namesText.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) ); namesText.setEditable( false ); toolkit.createLabel( mainClient, "Descripton:", SWT.NONE ); descText = toolkit.createText( mainClient, getNonNullString( ocd.getDescription() ), SWT.WRAP | SWT.MULTI ); GridData gd = new GridData( GridData.FILL_HORIZONTAL ); gd.widthHint = detailForm.getForm().getSize().x - 100 - 60; descText.setLayoutData( gd ); descText.setEditable( false ); String kind = ""; switch ( ocd.getKind() ) { case STRUCTURAL: kind = "structural"; break; case ABSTRACT: kind = "abstract"; break; case AUXILIARY: kind = "auxiliary"; break; } if ( ocd.isObsolete() ) { kind += " (obsolete)"; } toolkit.createLabel( mainClient, "Objectclass kind:", SWT.NONE ); kindText = toolkit.createText( mainClient, getNonNullString( kind ), SWT.NONE ); kindText.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) ); kindText.setEditable( false ); } mainSection.layout(); }