Examples of GitIgnoreResource


Examples of org.jboss.forge.addon.git.gitignore.resources.GitIgnoreResource

      return projectFactory;
   }

   protected GitIgnoreResource gitIgnoreResource(UIContext context)
   {
      GitIgnoreResource resource = getSelectedProject(context).getRootDirectory().getChildOfType(
               GitIgnoreResource.class,
               ".gitignore");
      if (resource == null || !resource.exists())
      {
         resource.createNewFile();
      }
      return resource;
   }
View Full Code Here

Examples of org.jboss.forge.addon.git.gitignore.resources.GitIgnoreResource

   @Override
   public Result execute(UIExecutionContext context) throws Exception
   {
      UIContext uiContext = context.getUIContext();
      GitIgnoreResource resource = gitIgnoreResource(uiContext);
      uiContext.setSelection(resource);
      return Results.success();
   }
View Full Code Here

Examples of org.jboss.forge.addon.git.gitignore.resources.GitIgnoreResource

   @Override
   public Result execute(UIExecutionContext context) throws Exception
   {
      StringBuilder sb = new StringBuilder();
      GitIgnoreResource gitIgnore = gitIgnoreResource(context.getUIContext());
      for (String pattern : gitIgnore.getPatterns())
      {
         sb.append(pattern).append("\n");
      }

      return Results.success(sb.toString());
View Full Code Here

Examples of org.jboss.forge.addon.git.gitignore.resources.GitIgnoreResource

   }

   @Override
   public Result execute(UIExecutionContext context) throws Exception
   {
      GitIgnoreResource gitIgnore = gitIgnoreResource(context.getUIContext());
      gitIgnore.removePattern(pattern.getValue());

      return Results.success("Pattern removed from the .gitignore in the current directory");
   }
View Full Code Here

Examples of org.jboss.forge.addon.git.gitignore.resources.GitIgnoreResource

      return projectFactory;
   }

   protected GitIgnoreResource gitIgnoreResource(UIContext context)
   {
      GitIgnoreResource resource = getSelectedProject(context).getRootDirectory().getChildOfType(
               GitIgnoreResource.class,
               GITIGNORE);
      if (resource == null || !resource.exists())
      {
         resource.createNewFile();
      }
      return resource;
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.