/** @exception FileStateInvalidException always */ public FileSystem getFileSystem() throws FileStateInvalidException { throw new FileStateInvalidException(null, name + "[" + fileSystemName + "]"); // NOI18N }
public String getDisplayName() { String n = fo.getName(); try { n = fo.getFileSystem().getStatus().annotateName(n, Collections.singleton(fo)); } catch (FileStateInvalidException ex) { LOG.log(Level.WARNING, ex.getMessage(), ex); } return n; }
/** Creates a the pointbase menus for start/stop actions, dynamically * If we did that in the layer file, it would always be there. * Now the menu is optional... */ static void execute() { FileObject pbFolder = FileUtil.getConfigFile("Menu/Tools/PointbaseMenu"); //NOI18N if (pbFolder!=null){ return; } final FileObject ToolsFolder = FileUtil.getConfigFile("Menu/Tools");//NOI18N try { ToolsFolder.getFileSystem().runAtomicAction(new FileSystem.AtomicAction() { public void run() throws IOException { FileObject pointbaseFolder = ToolsFolder.createFolder("PointbaseMenu"); //NOI18N pointbaseFolder.setAttribute("SystemFileSystem.localizingBundle","org.netbeans.modules.j2ee.sun.ide.j2ee.db.Bundle");//NOI18N pointbaseFolder.createData("org.netbeans.modules.j2ee.sun.ide.j2ee.db.StartAction","instance");//NOI18N pointbaseFolder.createData("org.netbeans.modules.j2ee.sun.ide.j2ee.db.StopAction" ,"instance");//NOI18N ToolsFolder.setAttribute("OpenIDE-Folder-Order","org.netbeans.modules.j2ee.sun.ide.j2ee.db.StartAction.instance/org.netbeans.modules.j2ee.sun.ide.j2ee.db.StopAction.instance");//NOI18N } }); } catch (FileStateInvalidException ex) { ex.printStackTrace(); } catch (IOException ex) { ex.printStackTrace(); } }
ErrorManager.getDefault().log(ErrorManager.WARNING, e.toString()); return;
private String classToSourceURL (FileObject fo, Log logger) { try { ClassPath cp = ClassPath.getClassPath (fo, ClassPath.EXECUTE); FileObject root = cp.findOwnerRoot (fo); String resourceName = cp.getResourceName (fo, '/', false); if (resourceName == null) { logger.info("Can not find classpath resource for "+fo+", skipping..."); return null; } int i = resourceName.indexOf ('$'); if (i > 0) resourceName = resourceName.substring (0, i); FileObject[] sRoots = SourceForBinaryQuery.findSourceRoots (root.getURL ()).getRoots (); ClassPath sourcePath = ClassPathSupport.createClassPath (sRoots); FileObject rfo = sourcePath.findResource (resourceName + ".java"); if (rfo == null) return null; return rfo.getURL ().toExternalForm (); } catch (FileStateInvalidException ex) { ex.printStackTrace (); return null; } }
throw new FileStateInvalidException(NbBundle.getMessage(AbstractFileObject.class, "EXC_ApplicationCreateError", getPath(), n));
private void attachListener() { FileObject sourcesDirectory = ProjectPropertiesSupport.getSourcesDirectory(project); if (sourcesDirectory == null) { // broken project return; } try { FileSystem fileSystem = sourcesDirectory.getFileSystem(); fileSystem.addFileChangeListener(FileUtil.weakFileChangeListener(fileChangeListener, fileSystem)); } catch (FileStateInvalidException exc) { LOGGER.log(Level.WARNING, exc.getMessage(), exc); } }
imgResUrl = fo.getURL(); } catch (FileStateInvalidException e) { e.printStackTrace();
throw new FileStateInvalidException(NbBundle.getMessage(AbstractFileObject.class, "EXC_ApplicationCreateError", getPath(), name));
.append(mine.getURL().toExternalForm()); } catch (FileStateInvalidException ex) { debug.append(ex.getMessage()); .append(remote.getURL().toExternalForm()); } catch (FileStateInvalidException ex) { debug.append(ex.getMessage());
throw new FileStateInvalidException(NbBundle.getMessage(MultiFileObject.class, "EXC_ApplicationCreateError", getPath(), n));
throw new FileStateInvalidException( NbBundle.getMessage(AbstractFileObject.class, "EXC_ApplicationCreateError", abstractTarget.getPath(), n));
throw new FileStateInvalidException(NbBundle.getMessage(MultiFileObject.class, "EXC_ApplicationCreateError", getPath(), name));
throw new FileStateInvalidException( NbBundle.getMessage(AbstractFileObject.class, "EXC_ApplicationCreateError", abstractTarget.getPath(), n));
/** @exception FileStateInvalidException always */ public FileSystem getFileSystem () throws FileStateInvalidException { throw new FileStateInvalidException (null, name+"["+fileSystemName+"]");// NOI18N }
/** @exception FileStateInvalidException always */ public FileSystem getFileSystem () throws FileStateInvalidException { throw new FileStateInvalidException (null, name+"["+fileSystemName+"]");// NOI18N }
throw new FileStateInvalidException(fo.toString());
throw new FileStateInvalidException();
throw new FileStateInvalidException (FileSystem.getString ("EXC_ApplicationCreateError", getPath (), n));
throw new FileStateInvalidException (FileSystem.getString ("EXC_ApplicationCreateError", getPath (), n));