Re: HTML5 Offline Web-Application
Hi,
> Followed this thread, and also stumbled the same problem.
> anyone solved this?
>> DevMode warning: Clobbering appcache.nocache.manifest to allow debugging.
>> Recompile before deploying your app!
>>
>> And the appcache.nocache.manifest_user-agent doesn't contain the js file
>> name!
>>
>> Any idea what is causing this???
Sorry no idea at all. Have never seen it. I don't understand the problem.
If you need to know which js file goes into which user-agent file, you
can figure that out from this:
[actually this makes a separate permutation.properties file. I have
the same login in my linker class to make sure the pro]
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.util.Map;
import java.util.Properties;
import java.util.SortedMap;
import java.util.SortedSet;
import com.google.gwt.core.ext.LinkerContext;
import com.google.gwt.core.ext.TreeLogger;
import com.google.gwt.core.ext.UnableToCompleteException;
import com.google.gwt.core.ext.linker.AbstractLinker;
import com.google.gwt.core.ext.linker.ArtifactSet;
import com.google.gwt.core.ext.linker.CompilationResult;
import com.google.gwt.core.ext.linker.LinkerOrder;
import com.google.gwt.core.ext.linker.SelectionProperty;
import com.google.gwt.core.ext.linker.SyntheticArtifact;
/**
* This GWT linker creates a properties file which can be used to
resolve Permutation Strong name given UserAgent and
* locale.
*
* @author Etienne Lacazedieu
*/
@LinkerOrder(LinkerOrder.Order.PRE) public class
StrongNameOracleLinker extends AbstractLinker {
public static final String STRONGNAME_FILE = "permutation.properties";
@Override public String getDescription() {
return "PermutationStrongName Oracle linker";
}
@Override public ArtifactSet link(TreeLogger logger, LinkerContext
context, ArtifactSet artifacts) throws UnableToCompleteException {
artifacts = new ArtifactSet(artifacts);
ByteArrayOutputStream out = new ByteArrayOutputStream();
String permutation = null;
String locale = null;
String userAgent = null;
SelectionProperty selectionProperty = null;
Properties props = new Properties();
for (CompilationResult result : artifacts.find(CompilationResult.class)) {
permutation = result.getStrongName();
SortedSet<SortedMap<SelectionProperty, String>> propertiesMap =
result.getPropertyMap();
for (SortedMap<SelectionProperty, String> sm : propertiesMap) {
for (Map.Entry<SelectionProperty, String> e : sm.entrySet()) {
selectionProperty = e.getKey();
if ("locale".equals(selectionProperty.getName())) {
locale = e.getValue();
}
if ("user.agent".equals(selectionProperty.getName())) {
userAgent = e.getValue();
}
}
}
props.setProperty(userAgent + "." + locale, permutation);
}
try {
props.store(out, "StrongNameOracle properties file");
} catch (IOException e) { // Should generally not happen
logger.log(TreeLogger.ERROR, "Unable to store deRPC data", e);
throw new UnableToCompleteException();
}
SyntheticArtifact a = emitBytes(logger, out.toByteArray(), STRONGNAME_FILE);
artifacts.add(a);
return artifacts;
}
}
-------------------------------
so in the actual linker class I have I use
...
Properties props = new Properties();
for (CompilationResult result : artifacts.find(CompilationResult.class)) {
permutation = result.getStrongName();
SortedSet<SortedMap<SelectionProperty, String>> propertiesMap =
result.getPropertyMap();
for (SortedMap<SelectionProperty, String> sm : propertiesMap) {
for (Map.Entry<SelectionProperty, String> e : sm.entrySet()) {
selectionProperty = e.getKey();
if ("locale".equals(selectionProperty.getName())) {
locale = e.getValue();
}
if ("user.agent".equals(selectionProperty.getName())) {
userAgent = e.getValue();
}
}
}
props.setProperty(userAgent + "." + locale, permutation);
}
...
that gets the right js file into the right permutation manifest.
Is that what the question is?
shawn
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home