Forum Controls
Spotlight Features

The Rich Engineering Heritage Behind Dependency Injection

Andrew McVeigh takes us on a tour of the rich heritage behind dependency injection, what it represents, and tells us why its here to stay.

Java, the OLPC, and community responsibility

The "One Laptop Per Child" project has a great device ready to ship, but there's no Java on there. Let's think about working together to put Java on OLPC!
Replies: 7 - Pages: 1  
Threads: [ Previous | Next ]
  Click to reply to this thread Reply

New article on Eclipse Filing System available on EclipseZone

At 4:56 PM on Dec 11, 2006, Alex Blewitt DeveloperZone Top 100 wrote:

The subject of the Eclipse Filing System has come up before, with RJ's Working with the Eclipse File System , as well as a look at a Zip file editor . Writing your own EFS implementation, as opposing to use the existing ones, is actually pretty easy, and the newly published Eclipse Filing System article goes through creating your own EFS implementation in order to navigate through a Zip file inside Eclipse.

Please post any questions or comments about the article here.
  Click to reply to this thread Reply
1. At 4:00 PM on Dec 12, 2006, Daniel Spiewak Javalobby Junkies wrote:

Re: New article on Eclipse Filing System available on EclipseZone

Actually, the Eclipse Zip editor doesn't use EFS at all. It should though...
Daniel Spiewak
ActiveObjects: an Easier Java ORM; Fuse: Resource Injection for Java
  Click to reply to this thread Reply
3. At 1:02 AM on Mar 22, 2007, melody Javalobby Newcomers wrote:

Re: New article on Eclipse Filing System available on EclipseZone

What's the relationship between org.eclipse.core.resources and EFS?
If I would like to extend the extention point of org.eclipse.ui.editors to create a editor,which use the resources file system,how could I use EFS to create the editor?
  Click to reply to this thread Reply
4. At 4:55 AM on Mar 22, 2007, Alex Blewitt DeveloperZone Top 100 wrote:

Re: New article on Eclipse Filing System available on EclipseZone

EFS is the hook which allows IResources (usually headed up with a linkedResource to a URI) to be loaded from other filing systems. It's not going to help you write an editor as such, although you could imagine an editor which was only applicable if the IResource's URI started with the EFS scheme e.g. only allowed you to open documents that began with 'sql:', for example.

Alex.
  Click to reply to this thread Reply
5. At 6:07 AM on Mar 22, 2007, melody Javalobby Newcomers wrote:

Re: New article on Eclipse Filing System available on EclipseZone

public void writeContents(LocalFile newFile, String xfdlNamespace) throws CoreException
{

InputStream theInputStream = getFormTemplateManager().getContentStream(xfdlNamespace);
if (theInputStream != null)
{
byte[] data = new byte[1];
try
{
OutputStream theOutputStream2 = newFile.openOutputStream(EFS.NONE, null);
BufferedOutputStream bout = new BufferedOutputStream(theOutputStream2);
while (theInputStream.read(data) != -1)
{
bout.write(data);
}
theOutputStream2.flush();

theInputStream.close();
theOutputStream2.close();
bout.close();
}
catch (IOException e)
{
e.printStackTrace();
}
}
}

Could the code fragment above write some contents(eg. string) to the LocalStore?If not,how could I do?
  Click to reply to this thread Reply
6. At 7:18 AM on Mar 22, 2007, Alex Blewitt DeveloperZone Top 100 wrote:

Re: New article on Eclipse Filing System available on EclipseZone

This isn't an EFS question, it's an editor question.

In any case, I don't see why you need to do this. Just write to a normal IResource, except that IResource is backed by an EFS implementation. You don't actually need to change how it's done at all at the editor level.

Alex.
  Click to reply to this thread Reply
7. At 11:14 PM on Mar 22, 2007, melody Javalobby Newcomers wrote:

Re: New article on Eclipse Filing System available on EclipseZone

Yes.You maybe don't understand me.
Ok,Let me describe the problem from another aspect.
How LocalFile store the contents?And how could I access,read,or write the contents of LocalFile?Is this method analogous to the method of java.io.File?
  Click to reply to this thread Reply
8. At 9:40 AM on Aug 28, 2007, Adrian Wilkins Javalobby Newcomers wrote:

You can create linked resources

You can use the generic "add file" or "add folder" dialogues to add filesystem links

thread.rss_message