Dynamically check out a file under source control with a plugin [message #292543] |
Fri, 07 October 2005 09:03 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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
>>
>>
|
|
|
Powered by
FUDForum. Page generated in 0.02859 seconds