* This class is going to become more complicated when we support compound scripts.
*/
public class PushChangesPlan {
public static PushChangesPlan create(ScriptTargetMapping filePair) {
// TODO: fix the rough behavior (inside this call).
Script script = filePair.getSingleScript();
SourceWrapSupport.Wrapper.Match wrapperMatch;
if (filePair.isVirtualProjectResource()) {
wrapperMatch = null;
} else {
SourceWrapSupport sourceWrapSupport =
filePair.getConnectedTargetData().getSourceWrapSupport();
wrapperMatch = sourceWrapSupport.chooseWrapper(script.getSource());
}
byte[] fileData;
try {
fileData = ChromiumDebugPluginUtil.readFileContents(filePair.getFile());