<div dir="ltr">Hi Lincoln,<div><br></div><div>It&#39;s a class that extends AbstractFacet&lt;Project&gt; and implements ProjectFacet. It has just one constructor:</div><div><br></div><div><pre style="font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:12px;margin-top:0px;margin-bottom:0px;color:rgb(51,51,51);line-height:18px">
<div class="" id="LC19" style="padding-left:10px">    <span class="" style>@Inject</span></div><div class="" id="LC20" style="padding-left:10px">    <span class="" style="font-weight:bold">public</span> <span class="" style="color:rgb(153,0,0);font-weight:bold">SapHanaCloudFacet</span><span class="" style="font-weight:bold">(</span><span class="" style>DependencyInstaller</span> <span class="" style>dependencyInstaller</span><span class="" style="font-weight:bold">)</span> <span class="" style="font-weight:bold">{</span></div>
<div class="" id="LC21" style="padding-left:10px">        <span class="" style="font-weight:bold">this</span><span class="" style="font-weight:bold">.</span><span class="" style="color:teal">dependencyInstaller</span> <span class="" style="font-weight:bold">=</span> <span class="" style>dependencyInstaller</span><span class="" style="font-weight:bold">;</span></div>
<div class="" id="LC22" style="padding-left:10px">    <span class="" style="font-weight:bold">}</span></div></pre></div><div><br></div><div>Cheers,</div><div>Ivan</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Fri, Feb 28, 2014 at 4:22 PM, Lincoln Baxter, III <span dir="ltr">&lt;<a href="mailto:lincolnbaxter@gmail.com" target="_blank">lincolnbaxter@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Is <span style="font-family:arial,sans-serif;font-size:13px">com.sap.cloud.forge.</span><span style="font-family:arial,sans-serif;font-size:13px">SapHanaCloudFacet an interface or a Class? If it is a Class or abstract Class, does it have a default constructor?</span></div>

<div class="gmail_extra"><div><div class="h5"><br><br><div class="gmail_quote">On Fri, Feb 28, 2014 at 9:06 AM, Ivan St. Ivanov <span dir="ltr">&lt;<a href="mailto:ivan.st.ivanov@gmail.com" target="_blank">ivan.st.ivanov@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Hi George,</p>
<p dir="ltr">OK, I will try to reproduce it. Could you tell me what kind of test should I write? Something that calls isEnabled or constraintsMet in a situation that it is assumed that they are true?</p>
<p dir="ltr">Cheers,<br>
Ivan</p><div><div>
<div class="gmail_quote">On Feb 28, 2014 12:56 AM, &quot;George Gastaldi&quot; &lt;<a href="mailto:ggastald@redhat.com" target="_blank">ggastald@redhat.com</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div dir="auto"><div>Hi Ivan,</div><div><br></div><div>This is because Furnace proxies the objects to avoid ClassCastExceptions. This shouldn&#39;t present a problem though. Are your addon dependencies correctly configured? I haven&#39;t seen your project yet, but if you could reproduce this error in a test that would be great. </div>


<div><br>Em 27/02/2014, às 18:24, &quot;Ivan St. Ivanov&quot; &lt;<a href="mailto:ivan.st.ivanov@gmail.com" target="_blank">ivan.st.ivanov@gmail.com</a>&gt; escreveu:<br><br></div><div><span></span></div><blockquote type="cite">


<div><div dir="ltr">Hi folks,<div><br></div><div>I am testing my Forge 2.0 addon for SAP HANA Cloud. One of my commands (the setup command) installs the special facet that I have developer (SapHanaCloudFacet). Another command is annotated with @FacetConstraint(SapHanaCloudFacet.class). Even after I do setup, the other command is not enabled.</div>



<div><br></div><div>I started the debugger. The isInstalled method of my facet returned true. So I went on to see what happens with the isEnabled() method. I dug as deep as the AbstractFaceted::safeGetFacet(Class&lt;F&gt; type) method. What it does is: it searches all the installed facets and it checks whether the expected one is among them by calling type.isInstance(facet).</div>



<div><br></div><div>The problem in my case is that all the facet objects are actually proxies. So I expect the type to be com.sap.cloud.forge.SapHanaCloudFacet, but it is actually something like org.jboss.forge.addon.facets.AbstractFacet_$$_javassist_904cc85e-43dd-404a-846c-ed4709d14dea. Eventually, the isInstance method returns false.</div>



<div><br></div><div>Am I doing something wrong? The code of the addon can be found here: <a href="https://github.com/ivannov/addon-saphcp" target="_blank">https://github.com/ivannov/addon-saphcp</a>.</div><div><br></div>


<div>Thanks,</div>
<div>Ivan</div><div><br></div><div>P.S. Did you, guys, bring anything new to the Windows shell? I am still using my Linux VM for Forge development.</div></div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>forge-dev mailing list</span><br><span><a href="mailto:forge-dev@lists.jboss.org" target="_blank">forge-dev@lists.jboss.org</a></span><br>


<span><a href="https://lists.jboss.org/mailman/listinfo/forge-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/forge-dev</a></span></div></blockquote></div><br>_______________________________________________<br>



forge-dev mailing list<br>
<a href="mailto:forge-dev@lists.jboss.org" target="_blank">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>
</div></div><br>_______________________________________________<br>
forge-dev mailing list<br>
<a href="mailto:forge-dev@lists.jboss.org" target="_blank">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"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br>
Lincoln Baxter, III<br><a href="http://ocpsoft.org" target="_blank">http://ocpsoft.org</a><br>
&quot;Simpler is better.&quot;
</font></span></div>
<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></div>