I`m looking for that, but I`m find nothing.
So I was try looking inside GWT code, but I trying do that, and nothings is
working.
My experiment:
<define-linker name="phpRpcLinker"
class="com.mostka.phprpc.linker.PhpRpcLinker" />
<add-linker name="phpRpcLinker" />
<define-configuration-property name="serverPath" is-multi-valued="false"
/>
<set-configuration-property name="serverPath" value="server" />
<generate-with class="com.mostka.phprpc.rebind.PhpRpcObjectGenerator">
<any>
<when-type-assignable class="com.mostka.phprpc.client.PhpRpcObject" />
</any>
</generate-with>
</module>
public class PhpRpcDataArtifact extends Artifact<PhpRpcDataArtifact> {
private final String phpRpcClassName = "phpRpcClassName";
private final Map<String, Integer> fieldsByClassName = new HashMap<String,
Integer>();
public PhpRpcDataArtifact() {
super(PhpRpcLinker.class);
}
@Override
public int hashCode() {
return phpRpcClassName.hashCode();
}
public void addClassName(String className) {
fieldsByClassName.put(className, 0);
}
@Override
protected int compareToComparableArtifact(PhpRpcDataArtifact o) {
return phpRpcClassName.compareTo(o.phpRpcClassName);
}
@Override
protected Class<PhpRpcDataArtifact> getComparableArtifactType() {
return PhpRpcDataArtifact.class;
}
}
@LinkerOrder(Order.POST)
@Shardable
public class PhpRpcLinker extends AbstractLinker {
private static final String SUFFIX = ".gwt.phprpc";
@Override
public String getDescription() {
return "dePHPRPC linker";
}
@Override
public ArtifactSet link(TreeLogger logger, LinkerContext context,
ArtifactSet artifacts, boolean onePermutation){
if (onePermutation) {
System.out.println("PhpRpcLinker - onePermutation true");
}else{
System.out.println("PhpRpcLinker - onePermutation false");
}
return artifacts;
}
}
So, I have linker and artifact. in linker have log mesage "PhpRpcLinker -
onePermutation true". I use this in PhpRpcObjectGenerator like this :
public class PhpRpcObjectGenerator extends Generator {
public String generate(TreeLogger logger, GeneratorContext context, String
typeName) throws UnableToCompleteException {
.....
.....
PhpRpcDataArtifact artifact = new PhpRpcDataArtifact();
artifact.addClassName(typeName); context.commitArtifact(logger, artifact);
System.out.println(typeName + "PhpObjectGenerated"); return typeName +
"PhpObjectGenerated";
.....
}
there is log too (typeName + "PhpObjectGenerated) . So, I need run linker
after generator. So the log should be like this:
objectNamePhpObjectGenerated
objectName2PhpObjectGenerated
PhpRpcLinker - onePermutation true
But real log is
PhpRpcLinker - onePermutation false
objectNamePhpObjectGenerated
objectName2PhpObjectGenerated
What I do wrong ? or where can I find some more information ?
Thanks
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.