Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 36291 invoked from network); 12 Aug 2009 15:20:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 12 Aug 2009 15:20:05 -0000 Received: (qmail 5849 invoked by uid 500); 12 Aug 2009 15:20:12 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 5761 invoked by uid 500); 12 Aug 2009 15:20:11 -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 5753 invoked by uid 99); 12 Aug 2009 15:20:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Aug 2009 15:20:11 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of pajbam@gmail.com designates 209.85.220.221 as permitted sender) Received: from [209.85.220.221] (HELO mail-fx0-f221.google.com) (209.85.220.221) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Aug 2009 15:20:03 +0000 Received: by fxm21 with SMTP id 21so80776fxm.3 for ; Wed, 12 Aug 2009 08:19:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to :content-type; bh=6IaynyyZI3k3UXGmRepBpIPssGJ77E5qPwzJ3VGvpX0=; b=HXkF6KPgNmwlmF/yhrM6cByqitGjJZsWVBJc5dVqqEQC8GRstL5IBFjqR9vvpo6IUC sE+TmlzI5nRrzj8+rChKkOeV+757pSqjh98wJhLqScJDMeMj/YE3zIAWjqghF2cYi60b DaSPiMEo+J50WcPf5IyOk4Wo4iKzPrgnjRCHc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; b=DSu/w9wsn4oM9q8x6uykBWj5B9M4bqJHWA08HmklIPsL5br2S9mYNmMOrW0x9O7nal UXQzCleZnw5BZ6kA10HhfFT93xKELBtMrKJLE3GwVpmYaT78jCV11eHWbjyzwYA8FseK zqKsIdqsIDYx3wyFm8fq8imAef6S8VptzMzF8= MIME-Version: 1.0 Sender: pajbam@gmail.com Received: by 10.204.62.193 with SMTP id y1mr97702bkh.212.1250090381942; Wed, 12 Aug 2009 08:19:41 -0700 (PDT) In-Reply-To: <98d8c0860908120530x5aaf123fwfafc08c4fb6502f8@mail.gmail.com> References: <98d8c0860908100900r68b51701n73c92afddc8a63ac@mail.gmail.com> <98d8c0860908120530x5aaf123fwfafc08c4fb6502f8@mail.gmail.com> Date: Wed, 12 Aug 2009 17:19:41 +0200 X-Google-Sender-Auth: c060361ee9ffb5d2 Message-ID: <98d8c0860908120819h70f6f4d1q7e59f7b6aeaf69d5@mail.gmail.com> Subject: Re: [Studio] Adding extensibility to Entry Editor From: Pierre-Arnaud Marcelot To: Apache Directory Developers List Content-Type: multipart/alternative; boundary=00504502b0512720a00470f3590f X-Virus-Checked: Checked by ClamAV on apache.org --00504502b0512720a00470f3590f Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Stefan S., FYI, here's how to access the properties of the General Preference page of Eclipse for "Open mode": - OPEN_ON_SINGLE_CLICK -- WorkbenchPlugin.getDefault().getPreferenceStore().getBoolean( IPreferenceConstants.OPEN_ON_SINGLE_CLICK ); - SELECT_ON_HOVER -- WorkbenchPlugin.getDefault().getPreferenceStore().getBoolean( IPreferenceConstants.SELECT_ON_HOVER ); - OPEN_AFTER_DELAY ("Open when using arrow keys" in the preference page) -- WorkbenchPlugin.getDefault().getPreferenceStore().getBoolean( IPreferenceConstants.OPEN_AFTER_DELAY ); Eclipse is using the "OpenStrategy.setOpenMethod(singleClickMethod);" instruction to set the open mode globally. And uses this code to determine if an object should be opened: OpenStrategy handler = new OpenStrategy(control); handler.addOpenListener(new IOpenEventListener() { public void handleOpen(SelectionEvent e) { ... // code to handle the open event. } }); Regards, Pierre-Arnaud On Wed, Aug 12, 2009 at 2:30 PM, Pierre-Arnaud Marcelot wrote: > Hi all, > Yesterday Stefan created the extension point and I created a preference > page where the user will be able to reorder the editors. > > When it is defined in the plugin.xml file of a plugin, each Entry Editor is > assigned a priority. > This priority is an integer based property. > All Entry Editors are sorted by priority. > > When a new editor needs to be opened, we're going to get an ordered list of > these Entry Editors and iterate on this list > until we find an editor that can handle ('boolean canHandle(...)' method) > the given entry. > > Stefan and I would like to allow the user to reorder the editors via the > preference page. > > As soon as the user reorders the editors, the original priority value is > discarded and the user's order is saved in the plugin's preferences. > > Now, I have a question. > > Let's say the user has re-organized the Entry Editors and he adds a new > plugin that has a new entry editor. > At the next launch of Apache Directory Studio, we'll notice that a new > Entry Editor is available, but what should we do with it ? Where should we > place it in the Entry Editors order ? > > I think we should discard the priority information since the user has > defined his own order and that this new editor should be placed at the end > of the list. > > Thoughts ? > > Thanks, > Pierre-Arnaud > > On Mon, Aug 10, 2009 at 6:00 PM, Pierre-Arnaud Marcelot wrote: > >> Hi all, >> We've had an interesting discussing on IRC with Stefan S. about adding >> extensibility to the Entry Editor. >> >> We'd like to introduce a new mechanism to allow the addition of new >> editors. >> This will allow us to have for example a single-window editor and a >> multi-window editor for entries. >> >> To do so, we'll introduce a new custom extension point with the following >> properties: >> >> - the class name of the editor >> - a name >> - if it is single-window or multi-window >> - a priority >> - an image >> - a description >> >> The class of the editor should implement our Editor's interface which >> defines only one method: >> >> - boolean canHandle(IEntry entry) /** This method indicates if the >> editor can handle the given entry. */ >> >> This feature should be part of the 1.5 release of Studio >> >> Regards >> Pierre-Arnaud >> > > --00504502b0512720a00470f3590f Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Stefan S.,

FYI, here's how to access the properties = of the General Preference page of Eclipse for "Open mode":
<= div>
  • OPEN_ON_SINGLE_CLICK =A0-- =A0WorkbenchPlugin.getDefault()= .getPreferenceStore().getBoolean( IPreferenceConstants.OPEN_ON_SINGLE_CLICK= );
  • SELECT_ON_HOVER =A0-- =A0WorkbenchPlugin.getDefault().getPreferenceStor= e().getBoolean( IPreferenceConstants.SELECT_ON_HOVER );
  • OPEN_AFTER_= DELAY ("Open when using arrow keys" in the preference page) =A0--= =A0WorkbenchPlugin.getDefault().getPreferenceStore().getBoolean( IPreferen= ceConstants.OPEN_AFTER_DELAY );
Eclipse is using the "OpenStrategy.setOpenMethod(= singleClickMethod);" instruction to set the open mode globally.
<= div>
And uses this code to determine if an object should be o= pened:

OpenStrategy handler =3D new OpenStrategy(control);<= /p>

= handler.addOpenListener(new IOpenEventListener() {

= public void handleOpen(SelectionEvent e) {

= ... // code to handle the open event.

= }

= });


Regards,
Pierre-Arnaud


On Wed, Aug 12, 2009 at = 2:30 PM, Pierre-Arnaud Marcelot <pa@marcelot.net> wrote:
Hi all,

Yesterday Stefan created the extension point and= I created a preference page where the user will be able to reorder the edi= tors.

When it is defined in the plugin.xml file of= a plugin, each Entry Editor is assigned a priority.
This priority is an integer based property.
All=A0Entry=A0Ed= itors=A0are=A0sorted=A0by=A0priority.

When=A0a=A0n= ew=A0editor=A0needs=A0to=A0be=A0opened,=A0we're=A0going=A0to=A0get=A0an= ordered=A0list of these Entry Editors and iterate on this list until=A0we= =A0find=A0an=A0editor=A0that=A0can=A0handle ('boolean canHandle(...)= 9; method) the given entry.

Stefan and I would like to allow the user to reorder th= e editors via the preference page.

As soon as the = user reorders the editors, the original priority value is discarded and the= user's order is saved in the plugin's preferences.

Now, I have a question.

Let= 9;s say the user has re-organized the Entry Editors and he adds a new plugi= n that has a new entry editor.
At the next launch of Apache Direc= tory Studio, we'll notice that a new Entry Editor is available, but wha= t should we do with it ? Where should we place it in the Entry Editors orde= r ?

I think we should discard the priority information sinc= e the user has defined his own order and that this new editor should be pla= ced at the end of the list.

Thoughts ?

Thanks,
Pierre-Arnaud

On Mon, Aug 10, 2009 at 6:00= PM, Pierre-Arnaud Marcelot <pa@marcelot.net> wrote:
Hi all,

We've had an = interesting discussing on IRC with Stefan S. about adding extensibility to = the Entry Editor.

We'd like to introduce a new mechanism to allow the= addition of new editors.
This will allow us to have for example a single-window editor and a mu= lti-window editor for entries.

To do so, we'll= introduce a new custom extension point with the following properties:
  • the class name of the editor
  • a name
  • if it= is single-window or multi-window
  • a priority
  • an image
  • <= li>a description
The class of the editor should implement our= Editor's interface which defines only one method:
  • boolean canHandle(IEntry entry) /** This method indicates if t= he editor can handle the given entry. */
This feature should = be part of the 1.5 release of Studio

Regards
Pierre-Arnaud


--00504502b0512720a00470f3590f--