Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Dynamically check out a file under source control with a plugin
Dynamically check out a file under source control with a plugin [message #292543] Fri, 07 October 2005 09:03 Go to next message
Eclipse UserFriend
Originally posted by: john.obyrne.gmail.com

Hello,

I am doing a plugin to extend the IDE to be able to generate code and I need
to check out the file I am modifying automatically. (this is the default
behavior of any Editor in Eclipse).

I am modifying the file using the IFile.setContents(...) method with an
InputStream. I thought at first that this method would automatically check
out the file but this is not the case.

I had a look on the org.eclipse.team.core package but didn't find any
methods to be able to check out a file having an IFile as input.
The only thing I found is that: RepositoryProvider.isShared(IProject) so I
can be able to know if a project is under source control.

Does anyone know how to manipulate an IFile under source control ?

Thanks,

John O'Byrne
Re: Dynamically check out a file under source control with a plugin [message #292560 is a reply to message #292543] Fri, 07 October 2005 11:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: daniel.megert.eclipse.org

John O'Byrne wrote:

>Hello,
>
>I am doing a plugin to extend the IDE to be able to generate code and I need
>to check out the file I am modifying automatically. (this is the default
>behavior of any Editor in Eclipse).
>
>I am modifying the file using the IFile.setContents(...) method with an
>InputStream. I thought at first that this method would automatically check
>out the file but this is not the case.
>
>
Take a look at IWorkspace.validateEdit().

Dani

>I had a look on the org.eclipse.team.core package but didn't find any
>methods to be able to check out a file having an IFile as input.
>The only thing I found is that: RepositoryProvider.isShared(IProject) so I
>can be able to know if a project is under source control.
>
>Does anyone know how to manipulate an IFile under source control ?
>
>Thanks,
>
>John O'Byrne
>
>
>
>
Re: Dynamically check out a file under source control with a plugin [message #292569 is a reply to message #292560] Fri, 07 October 2005 12:09 Go to previous message
Eclipse UserFriend
Originally posted by: john.obyrne.gmail.com

Thanks that works exactly as I wanted !

"Daniel Megert" <daniel.megert@eclipse.org> wrote in message
news:di5kpo$b5l$2@news.eclipse.org...
> John O'Byrne wrote:
>
>>Hello,
>>
>>I am doing a plugin to extend the IDE to be able to generate code and I
>>need to check out the file I am modifying automatically. (this is the
>>default behavior of any Editor in Eclipse).
>>
>>I am modifying the file using the IFile.setContents(...) method with an
>>InputStream. I thought at first that this method would automatically check
>>out the file but this is not the case.
>>
> Take a look at IWorkspace.validateEdit().
>
> Dani
>
>>I had a look on the org.eclipse.team.core package but didn't find any
>>methods to be able to check out a file having an IFile as input.
>>The only thing I found is that: RepositoryProvider.isShared(IProject) so I
>>can be able to know if a project is under source control.
>>
>>Does anyone know how to manipulate an IFile under source control ?
>>
>>Thanks,
>>
>>John O'Byrne
>>
>>
Previous Topic:form editor
Next Topic:measure build time
Goto Forum:
  


Current Time: Fri Sep 27 05:56:07 GMT 2024

Powered by FUDForum. Page generated in 0.03503 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top