@Override public String toString() { return delegate.toString(); }
/** Report error occured during custom validation. */ protected void error(String reason) throws SAXException { StringBuffer buf = new StringBuffer (reason).append(": ").append(fo.toString());//NOI18N if (locator != null) { buf.append(" line: ").append(locator.getLineNumber());//NOI18N buf.append(" column: ").append(locator.getColumnNumber());//NOI18N } String msg = buf.toString(); //NOI18N SAXException sex = new SAXException(msg); throw sex; }
/** Create a new exception. * @param obj the file that does not have a data object */ public DataObjectNotFoundException (FileObject obj) { super (obj.toString ()); this.obj = obj; }
public String toString() { return fo.toString(); }
/** Display name */ public String toString () { return folder.getPrimaryFile ().toString (); }
public String toString() { return "SceneManager-" + m_instanceID + "-" + (m_dObj != null ? m_dObj.getPrimaryFile().toString() : "null"); //NOI18N }
/** Message to display when an object is being opened. * @return the message or null if nothing should be displayed */ protected String messageOpening () { DataObject obj = entry.getDataObject (); return NbBundle.getMessage (OpenSupport.class , "CTL_ObjectOpen", // NOI18N obj.getName(), obj.getPrimaryFile().toString() ); }
@Override public void run() { LOGGER.log(Level.FINEST, "ImportWorker: starting import for selected file {0}", file.getAbsolutePath()); // search for available processor for (ImportProcessor importProcessor : Lookup.getDefault().lookupAll(ImportProcessor.class)) { FileObject fo = FileUtil.toFileObject(file); if (fo != null && importProcessor.isSupported(fo)) { LOGGER.log(Level.FINEST, "ImportWorker: Processor found for file {0}", importProcessor.toString()); try { DataObject dataObject = DataObject.find(fo); ImportSource source = dataObject.getLookup().lookup(ImportSource.class); if (source != null) { importProcessor.doImport(fo); } else { LOGGER.log(Level.FINEST, "Data object {0} for file {1} did not contain an import source", new Object[]{dataObject.toString(), fo.toString()}); } } catch (DataObjectNotFoundException ex) { Exceptions.printStackTrace(ex); } break; } } } }
@Override public void run() { LOGGER.log(Level.FINEST, "ImportWorker: starting import for selected file {0}", file.getAbsolutePath()); // search for available processor for (ImportProcessor importProcessor : Lookup.getDefault().lookupAll(ImportProcessor.class)) { FileObject fo = FileUtil.toFileObject(file); if (fo != null && importProcessor.isSupported(fo)) { LOGGER.log(Level.FINEST, "ImportWorker: Processor found for file {0}", importProcessor.toString()); try { DataObject dataObject = DataObject.find(fo); ImportSource source = dataObject.getLookup().lookup(ImportSource.class); if (source != null) { importProcessor.doImport(fo, context); }else{ LOGGER.log(Level.FINEST, "Data object {0} for file {1} did not contain an import source", new Object[]{dataObject.toString(), fo.toString()}); } } catch (DataObjectNotFoundException ex) { Exceptions.printStackTrace(ex); } break; } } } }
public UnrecognizedSettingNode() { super(Children.LEAF); setName(NbBundle.getMessage(InstanceDataObject.class, "LBL_BrokenSettings")); //NOI18N setIconBase("org/openide/loaders/instanceBroken"); //NOI18N setShortDescription(InstanceDataObject.this.getPrimaryFile().toString()); }
public static void serialize(PageFlowSceneData sceneData, FileObject file) { if( file == null || !file.isValid()){ LOG.warning("Can not serialize locations because file is null."); return; } LOG.entering("SceneSerializer", "serialize"); Document document = XMLUtil.createDocument(SCENE_ELEMENT, null, null, null); Node sceneElement = document.getFirstChild(); setAttribute(document, sceneElement, VERSION_ATTR, VERSION_VALUE_2); setAttribute(document, sceneElement, SCENE_LAST_USED_SCOPE_ATTR, XmlScope.getInstance(sceneData.getCurrentScopeStr() ).toString()); Node scopeFacesElement = createScopeElement(document, sceneData, XmlScope.SCOPE_FACES); if( scopeFacesElement != null ) { sceneElement.appendChild( scopeFacesElement ); } Node scopeProjectElement = createScopeElement(document, sceneData, XmlScope.SCOPE_PROJECT); if( scopeProjectElement != null ) { sceneElement.appendChild( scopeProjectElement ); } Node scopeAllElement = createScopeElement(document, sceneData, XmlScope.SCOPE_ALL); if( scopeAllElement != null ) { sceneElement.appendChild( scopeAllElement ); } writeToFile(document, file); LOG.finest("Serializing to the follwoing file: " + file.toString()); LOG.exiting("SceneSerializer", "serialize"); } /**
/** try to lock the primary file; may return <code>null</code> */ private FileLock doFileLock() { synchronized (getLock()) { if (fileLock != null) return fileLock; try { fileLock = getPrimaryFile().lock(); } catch (IOException ex) { err.annotate(ex, getPrimaryFile().toString()); inform(ex); } return fileLock; } }
@Override public void initialize(WizardDescriptor wizard) { this.wiz = wizard; Project project = Templates.getProject(wiz); Selenium2SupportImpl selenium2Support = Selenium2Support.findSelenium2Support(project); if (selenium2Support != null){ panel = selenium2Support.createTargetChooserPanel(wiz); panel.getComponent(); } else { wiz.putProperty(WizardDescriptor.PROP_ERROR_MESSAGE, Bundle.NO_SELENIUM_SUPPORT(project.getProjectDirectory().toString())); panel = Templates.buildSimpleTargetChooser(project, new SourceGroup[0]).create(); } }
throw new FileStateInvalidException(fo.toString());
/** Gets the short description of this feature. */ public String getShortDescription() { if (noBeanInfo) return super.getShortDescription(); try { InstanceCookie ic = ic(); if (ic == null) { // it must be unrecognized instance return getDataObject().getPrimaryFile().toString(); } Class clazz = ic.instanceClass(); java.beans.BeanDescriptor bd = Utilities.getBeanInfo(clazz).getBeanDescriptor(); String desc = bd.getShortDescription(); return (desc.equals(bd.getName()))? getDisplayName(): desc; } catch (Exception ex) { return super.getShortDescription(); } catch (LinkageError ex) { // #30650 - catch also LinkageError. return super.getShortDescription(); } }
ConstantPool constantPool; if (constantPoolBytes != null) { constantPool = ConstantPool.parse(constantPoolBytes, ci.getFileObject().toString()); } else { constantPool = null;