Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Interacting with VCM provider when saving resources
Interacting with VCM provider when saving resources [message #87798] Wed, 02 July 2003 23:05 Go to next message
Eclipse UserFriend
When you wish to save a resource, do you need to explicitly interact
with the VCM provider if it protects resources? For example, when
calling IFile.create() or IFile.setContents, do you need to add any
explicit calls to the VCM provider? Or do you need to do something when
you open a file for editing?

I have been using an EMF-generated editor, which falls over when I set
it against files which are under ClearCase control, unless I explicitly
check them out first. Other editors, such as the Java editor, can handle
automatic check out of the file when you start editing it.

--
Colin M Sharples/New Zealand/IBM, IT Architect, IBM Global Services
sharples@nz.ibm.com, t: 64-4-5769853, m: 64-21-402085, f: 64-4-5765616
"Sometimes I think the surest sign intelligent life exists
elsewhere in the Universe is that it's never tried to contact us"
Re: Interacting with VCM provider when saving resources [message #88086 is a reply to message #87798] Thu, 03 July 2003 06:38 Go to previous message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

--------------036787AC160825050339BE46
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Colin,

Yeah, the editor really should handle checking out files. When I was adding
the initial support for listening to resource changes in the generated
editors I was hoping to add support for this as well. But it seemed most
important to do this in the generator itself where I added code like this to
ensure that a generated file which needs to be changed will be checked out:

if (targetFile.isReadOnly() &&
targetFile.getWorkspace().validateEdit(new IFile [] {
targetFile }, new SubProgressMonitor(progressMonitor, 1)).isOK())

Then time ran out, so we still need to add this type of
check-out-on-first-change logic to the generated editors.


Colin Sharples wrote:

> When you wish to save a resource, do you need to explicitly interact
> with the VCM provider if it protects resources? For example, when
> calling IFile.create() or IFile.setContents, do you need to add any
> explicit calls to the VCM provider? Or do you need to do something when
> you open a file for editing?
>
> I have been using an EMF-generated editor, which falls over when I set
> it against files which are under ClearCase control, unless I explicitly
> check them out first. Other editors, such as the Java editor, can handle
> automatic check out of the file when you start editing it.
>
> --
> Colin M Sharples/New Zealand/IBM, IT Architect, IBM Global Services
> sharples@nz.ibm.com, t: 64-4-5769853, m: 64-21-402085, f: 64-4-5765616
> "Sometimes I think the surest sign intelligent life exists
> elsewhere in the Universe is that it's never tried to contact us"

--------------036787AC160825050339BE46
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Colin,
<p>Yeah, the editor really should handle checking out files.&nbsp; When
I was adding the initial support for listening to resource changes in the
generated editors I was hoping to add support for this as well.&nbsp; But
it seemed most important to do this in the generator itself where I added
code like this to ensure that a generated file which needs to be changed
will be checked out:
<blockquote>if (targetFile.isReadOnly() &amp;&amp;
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; targetFile.getWorkspace().validateEdit(new
IFile [] { targetFile }, new SubProgressMonitor(progressMonitor, 1)).isOK())</blockquote>
Then time ran out, so we still need to add this type of check-out-on-first-change
logic to the generated editors.
<br>&nbsp;
<p>Colin Sharples wrote:
<blockquote TYPE=CITE>When you wish to save a resource, do you need to
explicitly interact
<br>with the VCM provider if it protects resources? For example, when
<br>calling IFile.create() or IFile.setContents, do you need to add any
<br>explicit calls to the VCM provider?&nbsp; Or do you need to do something
when
<br>you open a file for editing?
<p>I have been using an EMF-generated editor, which falls over when I set
<br>it against files which are under ClearCase control, unless I explicitly
<br>check them out first. Other editors, such as the Java editor, can handle
<br>automatic check out of the file when you start editing it.
<p>--
<br>Colin M Sharples/New Zealand/IBM, IT Architect, IBM Global Services
<br>sharples@nz.ibm.com, t: 64-4-5769853, m: 64-21-402085, f: 64-4-5765616
<br>"Sometimes I think the surest sign intelligent life exists
<br>elsewhere in the Universe is that it's never tried to contact us"</blockquote>
</html>

--------------036787AC160825050339BE46--
Previous Topic:problem running snippets !!!
Next Topic:NPE in equals of IResource
Goto Forum:
  


Current Time: Sat Jun 07 05:19:39 EDT 2025

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

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

Back to the top