public void setCMakeCommand(String make) { try { getEntry().getFile().setAttribute(PROP_CMAKE_COMMAND, make); } catch (IOException ex) { if (Boolean.getBoolean("netbeans.debug.exceptions")) { // NOI18N ex.printStackTrace(); } } }
/** Try to lock this file entry. * @return the lock if the operation was successful; otherwise <code>null</code> * @throws IOException if the lock could not be taken */ public FileLock takeLock() throws IOException { FileLock l = lock == null ? null : (FileLock)lock.get (); if (l == null || !l.isValid ()){ l = getFile ().lock (); lock = new WeakReference (l); } return l; }
public void setRunDirectory(String dir) { FileObject fo = getEntry().getFile(); try { fo.setAttribute(PROP_RUN_DIRECTORY, dir); } catch (IOException ex) { if (Boolean.getBoolean("netbeans.debug.exceptions")) { // NOI18N ex.printStackTrace(); } } }
/** Get the request parameters associated with a given entry. * @param entry the entry * @return the arguments, or an empty string if no arguments are specified */ static String getRequestParams(MultiDataObject.Entry entry) { return WebExecSupport.getQueryString(entry.getFile ()); }
public String getRunDirectory() { String dir = (String) getEntry().getFile().getAttribute(PROP_RUN_DIRECTORY); if (dir == null) { dir = "."; // NOI18N setRunDirectory(dir); } return dir; }
/** * Get the the shell command * * @return the shell command */ public String getShellCommand() { String shellCommand = (String) getEntry().getFile().getAttribute(PROP_SHELL_COMMAND); if (shellCommand == null || shellCommand.length() == 0) { shellCommand = ""; // NOI18N } return shellCommand; }
public String getCMakeCommand() { String make = (String) getEntry().getFile().getAttribute(PROP_CMAKE_COMMAND); if (make == null || make.equals("")) { // NOI18N make = "cmake";// NOI18N setCMakeCommand(make); } return make; }
public void setRunDirectory(String dir) { FileObject fo = getEntry().getFile(); try { fo.setAttribute(PROP_RUN_DIRECTORY, dir); } catch (IOException ex) { if (Boolean.getBoolean("netbeans.debug.exceptions")) { // NOI18N ex.printStackTrace(); } } }
public void setQMakeCommand(String make) { try { getEntry().getFile().setAttribute(PROP_QMAKE_COMMAND, make); } catch (IOException ex) { if (Boolean.getBoolean("netbeans.debug.exceptions")) { // NOI18N ex.printStackTrace(); } } }
public String getQMakeCommand() { String make = (String) getEntry().getFile().getAttribute(PROP_QMAKE_COMMAND); if (make == null || make.equals("")) { // NOI18N make = "qmake";// NOI18N setQMakeCommand(make); } return make; }
/** Set execution arguments for a given entry. * @param entry the entry * @param args array of arguments * @exception IOException if arguments cannot be set */ public static void setArguments(MultiDataObject.Entry entry, String[] args) throws IOException { entry.getFile().setAttribute(EA_ARGUMENTS, args); }
public String[] getEnvironmentVariables() { Object o = entry.getFile().getAttribute(EA_ENVIRONMENT_VARIABLES); if (o != null && (o instanceof String[])) { return (String[]) o; } else { return new String[]{}; } }
/** Make a Serialization replacement. * The entry is identified by the * file object is holds. When serialized, it stores the * file object and the data object. On deserialization * it finds the data object and creates the right entry * for it. */ protected Object writeReplace () { return new EntryReplace (getFile ()); } }
/** Remove a secondary entry from the list. * @param fe the entry to remove */ protected final void removeSecondaryEntry (Entry fe) { synchronized (getSecondary()) { getSecondary().remove (fe.getFile ()); } firePropertyChangeLater (PROP_FILES, null, null); if (fe.isImportant ()) { checkConsistency(this); } }
/** Returns the origin of the instance. * @return the origin */ public FileObject instanceOrigin () { // return getEntry ().getFile (); return entry.getFile (); }
/** Uses cache to remember list of classes to them this object is * assignable. */ public Class instanceClass() throws IOException, ClassNotFoundException { Class type = super.instanceClass (customClassLoader); updateListOfClasses (type, entry ().getFile ()); return type; }
public String getRunDirectory() { String dir = (String) getEntry().getFile().getAttribute(PROP_RUN_DIRECTORY); if (dir == null) { dir = "."; // NOI18N setRunDirectory(dir); } return dir; }
/** Get the arguments associated with a given entry. * @param entry the entry * @return the arguments, or an empty array if no arguments are specified */ public static String[] getArguments(MultiDataObject.Entry entry) { Object o = entry.getFile().getAttribute(EA_ARGUMENTS); if (o != null && (o instanceof String[])) { return (String[]) o; } else { return new String[]{}; } }
Pair(MultiDataObject.Entry e) { entry = e; file = e.getFile (); } }