Examples of GitIgnoreResource


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

   @Test
   public void testGitIgnoreCreate() throws Exception
   {
      executeGitIgnoreCreate();

      GitIgnoreResource gitignore = gitIgnoreResource();
      assertTrue(gitignore.exists());
      String content = Streams.toString(gitignore.getResourceInputStream());
      assertTrue(content.contains(".settings/"));
   }
View Full Code Here

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

               GitIgnoreAddPatternCommand.class, project.getRootDirectory());
      gitIgnoreAddPatternTester.initialize();
      gitIgnoreAddPatternTester.setValueFor("pattern", "*.forge");
      gitIgnoreAddPatternTester.execute();

      GitIgnoreResource gitignore = gitIgnoreResource();
      String content = Streams.toString(gitignore.getResourceInputStream());
      assertTrue(content.contains("*.forge"));
   }
View Full Code Here

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

               GitIgnoreRemovePatternCommand.class, project.getRootDirectory());
      gitIgnoreRemovePatternTester.initialize();
      gitIgnoreRemovePatternTester.setValueFor("pattern", "target/");
      gitIgnoreRemovePatternTester.execute();

      GitIgnoreResource gitignore = gitIgnoreResource();
      String content = Streams.toString(gitignore.getResourceInputStream());
      assertFalse(content.contains("target/"));
   }
View Full Code Here

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

   @Override
   public Result execute(UIExecutionContext context) throws Exception
   {
      GitIgnoreFacet facet = getSelectedProject(context).getFacet(GitIgnoreFacet.class);
      GitIgnoreResource resource = gitIgnoreResource(context.getUIContext());
      StringBuffer buffer = new StringBuffer();
      for (String template : templates.getValue().split(" "))
      {
         String content = facet.contentOf(template);
         buffer.append(content).append("\n");
      }
      String content = buffer.toString();
      resource.setContents(content);

      StringBuilder resultString = new StringBuilder();
      resultString.append("Wrote to .gitignore. Content:").append("\n");
      resultString.append(content).append("\n");
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.addPattern(pattern.getValue());

      return Results.success("Pattern added to the .gitignore in the current directory");
   }
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
   {
      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

   @Override
   public Result execute(UIExecutionContext context) throws Exception
   {
      GitIgnoreFacet facet = getSelectedProject(context).getFacet(GitIgnoreFacet.class);
      GitIgnoreResource resource = gitIgnoreResource(context.getUIContext());
      StringBuffer buffer = new StringBuffer();
      for (String template : templates.getValue().split(" "))
      {
         String content = facet.contentOf(template);
         buffer.append(content).append("\n");
      }
      String content = buffer.toString();
      resource.setContents(content);

      StringBuilder resultString = new StringBuilder();
      resultString.append("Wrote to .gitignore. Content:").append("\n");
      resultString.append(content).append("\n");
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.addPattern(pattern.getValue());

      return Results.success("Pattern added to the .gitignore in the current directory");
   }
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.