@DefaultCommand public void run(final PipeOut out, final String... parms) throws IOException { NativeSystemCall.execFromPath("git", parms, out, shell.getCurrentDirectory()); }
public void observeReinitialize(@Observes final ReinitializeEnvironment event, final Shell shell) { workingDir = shell.getCurrentDirectory().getUnderlyingResourceObject(); manager.fireEvent(new Shutdown()); restartRequested = true; }
@DefaultCommand public void run() { shell.println(shell.getCurrentDirectory().getFullyQualifiedName()); } }
/** * Retrieves the package portion of the current directory if it is a package, null otherwise. * * @return String representation of the current package, or null */ private String getPackagePortionOfCurrentDirectory() { for (DirectoryResource r : project.getFacet(JavaSourceFacet.class).getSourceFolders()) { final DirectoryResource currentDirectory = shell.getCurrentDirectory(); if (ResourceUtil.isChildOf(r, currentDirectory)) { return currentDirectory.getFullyQualifiedName().replace(r.getFullyQualifiedName() + "/", "") .replaceAll("/", "."); } } return null; } }
/** * Retrieves the package portion of the current directory if it is a package, null otherwise. * * @return String representation of the current package, or null */ private String getPackagePortionOfCurrentDirectory() { for (DirectoryResource r : project.getFacet(JavaSourceFacet.class).getSourceFolders()) { final DirectoryResource currentDirectory = shell.getCurrentDirectory(); if (ResourceUtil.isChildOf(r, currentDirectory)) { // Have to remember to include the last slash so it's not part of the package return currentDirectory.getFullyQualifiedName().replace(r.getFullyQualifiedName() + File.separator, "") .replace(File.separator, "."); } } return null; } }
public void doInit(@Observes final InitProject event) DirectoryResource currentDirectory = shell.getCurrentDirectory();
buildDir = shell.getCurrentDirectory().createTempResource();
dir = shell.getCurrentDirectory().getChildDirectory(name); dir = shell.getCurrentDirectory(); do newDir = shell.getCurrentDirectory(); shell.println(); if (!projectFactory.containsProject(newDir.reify(DirectoryResource.class)))