Camelia, the Perl 6 bug

IRC log for #bioclipse, 2007-08-20

| Channels | #bioclipse index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
06:16 egonw joined #bioclipse
07:22 thomas_ku joined #bioclipse
07:52 jonalv joined #bioclipse
08:42 Nout joined #bioclipse
09:05 jonalv How can I in a plugin taht extends an extension point (and in some magic way through XML instantiates a class) get this instantiation?
09:06 egonw explain the use case...
09:06 egonw the plugin knows which extension it has for am EP
09:07 jonalv A plugin using the Keyring implements an account type
09:07 jonalv The plugin would like to ask the Keyring if a user with this certain accounttype is logged in
09:10 jonalv How can the plugin get the extension for an EP?
09:11 egonw ah... iterature over the extensions...
09:11 egonw there is example code in several plugins. e.g. net.bioclipse.descriptor
09:12 jonalv okey I am of searching
09:14 jonalv egonw, could you direct me a bit more specificly?
09:15 egonw mom
09:18 egonw bioclipse/trunk/plugins/net.bioclipse​.descriptor/src/net/bioclipse/wizards
09:18 egonw SelectDescriptorsPage.java
09:18 egonw see inner class DescriptorTreeRoot
09:18 egonw                        IExtensionRegistry registry = Platform.getExtensionRegistry();
09:18 egonw                        IExtensionPoint extensionPoint = registry.getExtensionPoint("net.biocl​ipse.descriptor.descriptorProvider");
09:18 egonw etc
09:19 jonalv thnaks
09:19 jonalv thanks
09:45 jonalv Hm I must admit that I can't figure out how to get from the ExtensionPoint interface to the actual object that is instantiated...
09:46 egonw ah, which is instantiated...
09:46 egonw that will require the EP to have some mechanism to return you that...
09:46 egonw I would recommend adding a method "getAccount(the details)" to the EP
09:46 egonw which each extension would implement
09:46 jonalv I dno't follow
09:47 egonw you want the instance olaSecretWoWAccount, right?
09:48 jonalv well I want the instance wowAccountType
09:48 jonalv but yes
09:48 egonw but olaSecretWoWAccount is not an extension in itself
09:48 egonw is wowAccountType an extension?
09:48 jonalv yes
09:48 egonw ok, then just in the code I pointed you too...
09:49 egonw ok, then just in the code I pointed you too...
09:49 egonw provider = (IDescriptorProvider)configelements[j​].createExecutableExtension("class");
09:49 jonalv It tells what a olaSecretWoWAccount must contain in order to be a WOW account...
09:49 egonw provider is then an Object
09:49 jonalv yes I have been looking at that line but not understood it
09:50 jonalv is this an executable extension?
09:50 egonw it returns an Object
09:50 egonw a wowAccountType instance
09:50 jonalv Why do I give it "class"?
09:50 jonalv and not "AccountType" or something like that
09:50 egonw good point. no idea about that :)
09:51 egonw oh wait, I *do* know
09:51 jonalv Well I guess I don't have to understand it to use it... :)
09:51 egonw that "class" matches the plugin.xml
09:51 egonw mom
09:51 egonw <extension-point id="descriptorProvider" name="Descriptor Provider" schema="schema/descriptorProvider.exsd"/>
09:51 egonw and the schema says:
09:52 egonw <attribute name="class" type="string" use="required">
09:52 egonw (among a lot of other things :)
09:52 egonw OK, now based on your EP
09:53 egonw is your plugin in playground?
09:53 jonalv yes
09:53 jonalv keyring in playground
09:54 egonw ah, interesting...
09:54 jonalv ?
09:54 egonw your AccountType does not have the 'class' equivalent...
09:55 egonw you need to fix that
09:55 jonalv hm?
09:55 jonalv I don't think I understand this...
09:56 egonw well, it seems you do not define any classes that are AccountType
09:56 egonw not in keyring.demo anyway
09:56 jonalv But what do I do then?
09:56 jonalv Something works+
09:56 egonw what does works then?
09:57 jonalv the accounttype in the keyring demo specifies that the account should have two different "subaccounts" and I can use them
09:58 jonalv So I can create an account that is of the accounttype specified for the plugin
09:58 jonalv that part works
09:58 jonalv If you understand me... :)
09:59 egonw OK, where do you create a new account? and a Object to represent that?
10:00 jonalv From the properties gui. The code is in the Keyring.instance
10:00 jonalv Did you check out both Keyring and Keyring.demo?
10:01 egonw hey, just bits of it OK? :)
10:02 egonw OK, not sure your set up is correct...
10:02 egonw the way the other EP/E setups in Bioclipse work is like this:
10:02 jonalv bits of the lpugin?
10:03 egonw each plugin that has an extension, has a class that implements a common interface...
10:03 jonalv otherwise you could take it out for a spin and see how it works... :)
10:03 egonw (or abstract class)
10:03 egonw so each extension has an associated Class
10:03 egonw in your case it seems all use AccountType
10:03 jonalv I just realised that I instantiate the accountType in the KeyRing
10:04 jonalv Which means that I really can't get the same object in the demo plugin
10:04 jonalv This whole way of doing things seems  bit broken to me...
10:05 egonw well, with your current code, you will not be able to get a copy of an instance of a certain EP
10:05 egonw lunch time
10:05 egonw please look into the 'class' field of other EPs in Bioclipse
10:05 jonalv I am actually getting things from XML in the KeyRing class instead of just getting the defined object from the Extension API. Guess the fact that it is not working as Spring does is confusing me
10:05 egonw have to go now
10:07 jonalv So I guess the question is how do I now instead from a plugin check that a user having an account with the correct accounttype is logged in to the Keyring
10:07 jonalv I can't pass the AccountType object since I can't get that
10:36 egonw no, so you need to adapt your code so that you can
10:37 jonalv I don't think I really need to
10:37 jonalv I mean I can just use the accountType name instead
10:37 jonalv of course if two accountTypes have the same name then it will be broken but if that happends there are problems anyway... :/
10:38 jonalv I probably should stop that from happening somewhere...
10:41 jonalv Yep that is the way to go and that seems to be how I have done things earlier aswell. The accountTypeName uniquely identifies an accountType
11:47 Nout joined #bioclipse
11:52 jonalv joined #bioclipse
11:52 CIA-37 joined #bioclipse
11:52 ilogger2 joined #bioclipse
13:17 masak joined #bioclipse
13:25 steinbeck joined #bioclipse
13:25 steinbeck Good morning from Boston
13:25 jonalv good morning :)
14:11 CIA-37 bioclipse: jonalv * r3704 /trunk/playground/plugins/net.bioclipse.keyr​ing/src/net/bioclipse/keyring/KeyRing.java:
14:11 CIA-37 bioclipse: removed outcommented logging code,
14:11 CIA-37 bioclipse: wrote javadoc,
14:11 CIA-37 bioclipse: added method to check whether a user with a certain accounttype (identified by name) is logged in
14:38 jonalv joined #bioclipse
14:54 Nout joined #bioclipse
16:11 egonw joined #bioclipse
17:02 CIA-37 bioclipse: jonalv * r3705 /trunk/plugins/net.bioclipse.statistics/s​rc/net/bioclipse/editors/GridEditor.java: minor hack that works around a current bug in the Grid widget. Now the row headers works.
17:20 CIA-37 bioclipse: jonalv * r3706 /trunk/playground/plugins/net.bioclipse.keyring/ (META-INF/MANIFEST.MF src/net/bioclipse/keyring/KeyRing.java): Wrote some methods for getting username and password based upon acountType names. And some more javadocs.
18:07 masak left #bioclipse
19:00 steinbeck joined #bioclipse
21:46 CIA-37 bioclipse: shk3 * r3707 /trunk/playground/plugins/net.bioclipse.nmrshiftd​b/src/bc_nmrshiftdb/intro/MynmrshiftdbIntro.java: better intro screen

| Channels | #bioclipse index | Today | | Search | Google Search | Plain-Text | summary