Questions about some APIs.

Discussion of development versions only
Post Reply [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
egdamy
Posts:1
Joined:02 Apr 2010 13:27
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
Questions about some APIs.

Post by egdamy » 02 Apr 2010 13:51

I'm currently developing a plugin for Gephi and I'm having some issues.

1. How can I avoid my plugin's window (like the one for ranking or partition) to appear in Data Laboratory and Preview? I'd like it to only be visible in Overview without modifying Gephi's code (Desktop Branding).

2. About the Import API: in the alpha3, doImport can now take an InputStream. Would it be possible for this method to take a String or a java.io.Reader? Because I'm reading my GEXF file from an URL (kind of a wget) but I need to process it a little bit to obtain an actual GEXF file (suppress some encapsulating data which I can do nothing about). I could put my data in an intermediate ByteArrayInput but this requires extra computations. Also the documentation does not seem to tell what the 'String importer' argument should be...

3. Is there an interest for me to use the LongTask API in my plugin's TopComponent? I'm not sure to get what is that API used for...

Thanks.

User avatar
mbastian
Gephi Architect
Posts:728
Joined:10 Dec 2009 10:11
Location:San Francisco, CA
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Questions about some APIs.

Post by mbastian » 03 Apr 2010 11:12

1. How can I avoid my plugin's window (like the one for ranking or partition) to appear in Data Laboratory and Preview? I'd like it to only be visible in Overview without modifying Gephi's code (Desktop Branding).
Currently you cannot, as your plugin TopComponent is not part of a group. A better system will be introduced in the next release.
Would it be possible for this method to take a String or a java.io.Reader
Yes maybe java.io.Reader is a better choice, I agree. I'll change this.
Also the documentation does not seem to tell what the 'String importer' argument should be...
It's simply the file extension, set "gexf".
3. Is there an interest for me to use the LongTask API in my plugin's TopComponent? I'm not sure to get what is that API used for...
Yes you can get a LongTaskExecutor and use it for executing your treatment. Have a look on the documentation here and in the Javadoc.

Post Reply
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable