The &quot;Git Undo&quot; functionality would certainly use the GitFacet, because you would only want to activate Undo support when working on a Project.<br><br><b>Some information about Facets:</b><br><ul><li>Facets represent project state (E.g. Git is installed. Java is installed. Servlet is installed)<br>

</li><li>Facets do not work outside of projects.</li><li>Facets avoid doing anything that prints to the shell output (sometimes it is unavoidable)<br></li><li>Facets are for encapsulating additional functionality that is usable in one or more plugins</li>
</ul><p>With that said, only some of the additional methods you suggested are not really appropriate for a Facet:<br>
</p><blockquote style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><p>- showLatestDiff()<br></p></blockquote><div>probably not appropriate because it would print output - this should go into the GitPlugin instead<br>
</div><blockquote style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><p>
- showLatestCommit()<br></p></blockquote><div></div><div>Probably not appropriate because it would print output  - this should go into the GitPlugin instead</div><blockquote style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">
<p>
- getNotes()<br></p></blockquote><div>Not sure what this does. <br></div><blockquote style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><p>
- showLog()<br></p></blockquote><div>
<div>Probably not appropriate because it would print output  - this should go into the GitPlugin instead</div></div><blockquote style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">
<p>
- switchBranch()<br></p></blockquote><div>Appropriate as an API, but not if it requires user input - this is potentially a good method and  in line with being appropriate for a Facet.</div><blockquote style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">
<p>
- cleanWorkingDirectory()</p></blockquote><div>Not exactly sure what this would do, but yes, sounds in line with being appropriate for a Facet.<br> </div><p>Does that help? :)<br></p><p>~Lincoln<br></p><div class="gmail_quote">
On Fri, Apr 20, 2012 at 4:52 PM, Jevgeni Zelenkov <span dir="ltr">&lt;<a href="mailto:jevgeni.zelenkov@googlemail.com">jevgeni.zelenkov@googlemail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Lincoln,<br>
<br>
Thanks for the explanation, that helped me to understand it but not<br>
completely. So, what do you actually mean by &quot;inspect the state of a<br>
Project&quot;?<br>
<br>
I take methods provided by you:<br>
- getBranches()<br>
- getTags()<br>
- getRemotes()<br>
- getStatus()<br>
<br>
And here are some more suggestions to help inspect the state of a project:<br>
- showLatestDiff()<br>
- showLatestCommit()<br>
- getNotes()<br>
- showLog()<br>
- switchBranch()<br>
- cleanWorkingDirectory()<br>
<br>
Would that be enough?<br>
I guess, I don&#39;t understand the use cases for the GitFacet yet.<br>
Who is going to use it and what are the potential scenarios? The git<br>
undo plugin will require a lot more than that. And I assume that<br>
GitFacet is not really a wrapper for the jGit functionality.<br>
<br>
Regards,<br>
Jevgeni<br>
<br>
On 04/20/2012 06:00 PM, <a href="mailto:forge-dev-request@lists.jboss.org">forge-dev-request@lists.jboss.org</a> wrote:<br>
&gt; Message: 5<br>
&gt; Date: Fri, 20 Apr 2012 09:21:10 -0400<br>
&gt; From: &quot;Lincoln Baxter, III&quot;&lt;<a href="mailto:lincolnbaxter@gmail.com">lincolnbaxter@gmail.com</a>&gt;<br>
&gt; Subject: Re: [forge-dev] GitPlugin Facet<br>
&gt; To: forge-dev List&lt;<a href="mailto:forge-dev@lists.jboss.org">forge-dev@lists.jboss.org</a>&gt;<br>
&gt; Message-ID:<br>
&gt;       &lt;<a href="mailto:CAEp_U4GGVD8p8hH2M5PRm6gK_MkDGtAyXzokGcm3VVz70jeX2g@mail.gmail.com">CAEp_U4GGVD8p8hH2M5PRm6gK_MkDGtAyXzokGcm3VVz70jeX2g@mail.gmail.com</a>&gt;<br>
&gt; Content-Type: text/plain; charset=&quot;iso-8859-1&quot;<br>
&gt;<br>
&gt; Hey Jevgeni,<br>
&gt;<br>
&gt; Welcome!<br>
&gt;<br>
&gt; Regarding the GitFacet - I believe it&#39;s in the right place for the moment,<br>
&gt; but I don&#39;t believe that the GitPlugin should be referencing it, since the<br>
&gt; commands in GitPlugin could be used even without a Project.<br>
&gt;<br>
&gt; GitFacet (as the issue describes poorly) is something that should be usable<br>
&gt; to inspect the state of a Project via:<br>
&gt;<br>
&gt; project.hasFacet(GitFacet.class)<br>
&gt;<br>
&gt; After that, everything else is an added benefit. It should probably also<br>
&gt; perform tasks like:<br>
&gt;<br>
&gt; project.getFacet(GitFacet.class).getBranches()<br>
&gt; project.getFacet(GitFacet.class).getTags()<br>
&gt; project.getFacet(GitFacet.class).getRemotes()<br>
&gt; project.getFacet(GitFacet.class).getStatus()<br>
&gt;<br>
&gt; And that&#39;s where your imagination kicks in.<br>
&gt;<br>
&gt; Does that make sense?<br>
&gt;<br>
&gt; ~Lincoln<br>
<br>
_______________________________________________<br>
forge-dev mailing list<br>
<a href="mailto:forge-dev@lists.jboss.org">forge-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/forge-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/forge-dev</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Lincoln Baxter, III<br><a href="http://ocpsoft.org" target="_blank">http://ocpsoft.org</a><br>&quot;Simpler is better.&quot;<br>