[GitHub] blackleg commented on issue #395: [NETBEANS-138] Fixed InjectedTasksSupportTest test.

2018-03-13 Thread GitBox
blackleg commented on issue #395: [NETBEANS-138] Fixed InjectedTasksSupportTest 
test.
URL: 
https://github.com/apache/incubator-netbeans/pull/395#issuecomment-372790619
 
 
   @matthiasblaesing It seems right, I will update pull request to remove the 
test. 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] blackleg commented on issue #395: [NETBEANS-138] Fixed InjectedTasksSupportTest test.

2018-01-28 Thread GitBox
blackleg commented on issue #395: [NETBEANS-138] Fixed InjectedTasksSupportTest 
test.
URL: 
https://github.com/apache/incubator-netbeans/pull/395#issuecomment-361059089
 
 
   @matthiasblaesing I'm not sure but I think it tests the possibility to 
extends a indexer with a callable. 
   ```java
   private static final class CustomIndexerImpl extends CustomIndexer {
   
   private static final Logger LOG = 
Logger.getLogger(CustomIndexerImpl.class.getName());
   
   private final Callable preAction;
   private final Callable postAction;
   
   public CustomIndexerImpl(
   @NullAllowed final Callable preAction,
   @NullAllowed final Callable postAction) {
   this.preAction = preAction;
   this.postAction = postAction;
   LOG.info(String.format("%s, %s", preAction, postAction));
   }
   
   @Override
   protected void index(Iterable files, Context 
context) {
   try {
   if (preAction != null) {
   preAction.call();
   }
   final IndexingSupport is = 
IndexingSupport.getInstance(context);
   for (Indexable file : files) {
   LOG.info(String.format("Indexing file. MimeType: %s", 
file.getMimeType()));
   final IndexDocument doc = is.createDocument(file);
   final FileObject fo = 
URLMapper.findFileObject(file.getURL());
   doc.addPair(KEY_NAME, fo.getName(), true, true);
   doc.addPair(KEY_EXT, fo.getExt(), true, true);
   is.addDocument(doc);
   }
   if (postAction != null) {
   postAction.call();
   }
   } catch (Exception ioe) {
   Exceptions.printStackTrace(ioe);
   }
   }
   
   }
   ```


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists