| OLD | NEW |
| 1 package com.google.dart.tools.core.pub; | 1 package com.google.dart.tools.core.pub; |
| 2 | 2 |
| 3 import com.google.dart.engine.sdk.DirectoryBasedDartSdk; | 3 import com.google.dart.engine.sdk.DirectoryBasedDartSdk; |
| 4 import com.google.dart.tools.core.DartCore; | 4 import com.google.dart.tools.core.DartCore; |
| 5 import com.google.dart.tools.core.DartCoreDebug; |
| 5 import com.google.dart.tools.core.MessageConsole; | 6 import com.google.dart.tools.core.MessageConsole; |
| 6 import com.google.dart.tools.core.dart2js.ProcessRunner; | 7 import com.google.dart.tools.core.dart2js.ProcessRunner; |
| 7 import com.google.dart.tools.core.model.DartSdkManager; | 8 import com.google.dart.tools.core.model.DartSdkManager; |
| 8 | 9 |
| 9 import org.eclipse.core.resources.IContainer; | 10 import org.eclipse.core.resources.IContainer; |
| 10 import org.eclipse.core.resources.IFolder; | 11 import org.eclipse.core.resources.IFolder; |
| 11 import org.eclipse.core.resources.IResource; | 12 import org.eclipse.core.resources.IResource; |
| 12 import org.eclipse.core.resources.IncrementalProjectBuilder; | 13 import org.eclipse.core.resources.IncrementalProjectBuilder; |
| 13 import org.eclipse.core.runtime.CoreException; | 14 import org.eclipse.core.runtime.CoreException; |
| 14 import org.eclipse.core.runtime.IProgressMonitor; | 15 import org.eclipse.core.runtime.IProgressMonitor; |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 // Build the process description to run pub | 125 // Build the process description to run pub |
| 125 DirectoryBasedDartSdk sdk = DartSdkManager.getManager().getSdk(); | 126 DirectoryBasedDartSdk sdk = DartSdkManager.getManager().getSdk(); |
| 126 File pubFile = sdk.getPubExecutable(); | 127 File pubFile = sdk.getPubExecutable(); |
| 127 | 128 |
| 128 ProcessBuilder builder = new ProcessBuilder(); | 129 ProcessBuilder builder = new ProcessBuilder(); |
| 129 builder.directory(container.getLocation().toFile()); | 130 builder.directory(container.getLocation().toFile()); |
| 130 builder.redirectErrorStream(true); | 131 builder.redirectErrorStream(true); |
| 131 | 132 |
| 132 List<String> args = new ArrayList<String>(); | 133 List<String> args = new ArrayList<String>(); |
| 133 args.add(pubFile.getAbsolutePath()); | 134 args.add(pubFile.getAbsolutePath()); |
| 135 if (DartCoreDebug.NO_PUB_PACKAGES) { |
| 136 args.add("--no-package-symlinks"); |
| 137 } |
| 134 if (command.contains(" ")) { | 138 if (command.contains(" ")) { |
| 135 String[] strings = command.split(" "); | 139 String[] strings = command.split(" "); |
| 136 args.addAll(Arrays.asList(strings)); | 140 args.addAll(Arrays.asList(strings)); |
| 137 } else { | 141 } else { |
| 138 args.add(command); | 142 args.add(command); |
| 139 } | 143 } |
| 140 // add flags for pub build | 144 // add flags for pub build |
| 141 if (command.equals(BUILD_COMMAND)) { | 145 if (command.equals(BUILD_COMMAND)) { |
| 142 args.add("--mode"); | 146 args.add("--mode"); |
| 143 args.add("debug"); | 147 args.add("debug"); |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 private void setDerived(IProgressMonitor monitor) { | 241 private void setDerived(IProgressMonitor monitor) { |
| 238 IFolder buildDir = container.getFolder(new Path("build")); | 242 IFolder buildDir = container.getFolder(new Path("build")); |
| 239 try { | 243 try { |
| 240 ((IResource) buildDir).setDerived(true, monitor); | 244 ((IResource) buildDir).setDerived(true, monitor); |
| 241 } catch (CoreException e) { | 245 } catch (CoreException e) { |
| 242 DartCore.logError("Failed to set derived flag: " + buildDir, e); | 246 DartCore.logError("Failed to set derived flag: " + buildDir, e); |
| 243 } | 247 } |
| 244 } | 248 } |
| 245 | 249 |
| 246 } | 250 } |
| OLD | NEW |