×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Java
Posted by: Massimo Zappino
Added: May 13, 2016 8:33 AM
Modified: Sep 6, 2017 11:52 AM
Views: 7
  1. org.openide.loaders.DataObject dataObject = NbEditorUtilities.getDataObject(context.getDocument());
  2. final String displayName = dataObject.getNodeDelegate().getDisplayName();
  3. org.openide.filesystems.FileObject primaryFile = dataObject.getPrimaryFile();
  4. String mimeTypeMethod1 = NbEditorUtilities.getMimeType(component);
  5.  
  6.  
  7. JTextComponent component = context.getOpenedPanes()[0];
  8. String mimeTypeMethod2 = NbEditorUtilities.getMimeType(component);