congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
FileWrapper.getPath
Code IndexAdd Tabnine to your IDE (free)

How to use
getPath
method
in
net.sourceforge.squirrel_sql.fw.util.FileWrapper

Best Java code snippets using net.sourceforge.squirrel_sql.fw.util.FileWrapper.getPath (Showing top 16 results out of 315)

origin: net.sf.squirrel-sql.plugins/laf

/**
 * Save preferences to disk.
 * 
 * @param prefsFile
 *           File to save preferences to.
 */
private void savePrefs(FileWrapper prefsFile) throws IOException, XMLException
{
  _settingsCache.save(prefsFile.getPath());
}
origin: net.sf.squirrel-sql.plugins/graph

private static GraphXmlSerializer[] createSerializers(GraphPlugin plugin, ISession session, FileWrapper[] graphXmlFiles)
{
 GraphXmlSerializer[] ret = new GraphXmlSerializer[graphXmlFiles.length];
 for (int i = 0; i < graphXmlFiles.length; i++)
 {
   ret[i] = new GraphXmlSerializer(plugin, session, graphXmlFiles[i].getPath());
 }
 return ret;
}
origin: net.sf.squirrel-sql.plugins/graph

public void transformToLocalCopy()
{
 try
 {
   String linkName = new File(_pathOfLinkXmlFile).getName();
   String newGraphsName = linkName.substring(LINK_PREFIX.length(), linkName.length());
   _graphFilePath = new File(_plugin.getPluginUserSettingsFolder().getPath(), newGraphsName).getAbsolutePath();
   _linkXmlBean = null;
   new File(_pathOfLinkXmlFile).delete();
   _pathOfLinkXmlFile = null;
 }
 catch (IOException e)
 {
   throw new RuntimeException(e);
 }
}
origin: net.sf.squirrel-sql.plugins/graph

private void onHomeDir()
{
 try
 {
   _linkGraphDialog.txtDir.setText(_plugin.getPluginUserSettingsFolder().getPath());
   loadTable(_plugin, _session, _plugin.getPluginUserSettingsFolder());
 }
 catch (Exception e)
 {
   throw new RuntimeException(e);
 }
}
origin: net.sf.squirrel-sql.plugins/graph

public FormatController(ISession session, GraphPlugin plugin, FormatControllerListener listener)
{
 try
 {
   _plugin = plugin;
   _session = session;
   _listener = listener;
   String userSettingsFolder = _plugin.getPluginUserSettingsFolder().getPath();
   File f = new File(userSettingsFolder + File.separator + FORMAT_XML_FILE_NAME);
   if(f.exists())
   {
    XMLBeanReader br = new XMLBeanReader();
    br.load(userSettingsFolder + File.separator + FORMAT_XML_FILE_NAME, this.getClass().getClassLoader());
    Vector<FormatXmlBean> buf = new Vector<FormatXmlBean>();
    for(Iterator<?> i=br.iterator(); i.hasNext();)
    {
      buf.add((FormatXmlBean)i.next());
    }
    _formats = buf.toArray(new FormatXmlBean[buf.size()]);
   }
 }
 catch (Exception e)
 {
   throw new RuntimeException(e);
 }
}
origin: net.sf.squirrel-sql.plugins/syntax

public void setAutoCorrects(Hashtable<String, String> newAutoCorrects, boolean enableAutoCorrects)
{
  try
  {
    _autoCorrectData = new AutoCorrectData(newAutoCorrects, enableAutoCorrects);
    XMLBeanWriter bw = new XMLBeanWriter(_autoCorrectData);
    bw.save(_pluginUserSettingsFolder.getPath() + File.separator + AUTO_CORRECT_DATA_FILE_NAME);
  }
  catch (Exception e)
  {
    throw new RuntimeException(e);
  }
}
origin: net.sf.squirrel-sql.plugins/graph

private String generateGraphFilePath(String title)
{
 try
 {
   String url = _session.getAlias().getUrl();
   return getFileName(_plugin.getPluginUserSettingsFolder().getPath(), url, title);
 }
 catch (Exception e)
 {
   throw new RuntimeException(e);
 }
}
origin: net.sf.squirrel-sql.plugins/graph

private void saveFormats()
{
 try
 {
   String userSettingsFolder = _plugin.getPluginUserSettingsFolder().getPath();
   XMLBeanWriter bw = new XMLBeanWriter();
   for (int i = 0; i < _formats.length; i++)
   {
    bw.addToRoot(_formats[i]);
   }
   bw.save(userSettingsFolder + File.separator + FORMAT_XML_FILE_NAME);
 }
 catch (Exception e)
 {
   throw new RuntimeException(e);
 }
}
origin: net.sf.squirrel-sql.plugins/graph

public void renameGraph(String newGraphName)
{
 try
 {
   String url = _session.getAlias().getUrl();
   String newGraphFile = getFileName(_plugin.getPluginUserSettingsFolder().getPath(), url, newGraphName);
   if (new File(_graphFilePath).exists())
   {
    if(false == new File(_graphFilePath).renameTo(new File(newGraphFile)))
    {
      String msg = "Failed to rename file: " + _graphFilePath;
      _session.showErrorMessage(msg);
      throw new IllegalStateException(msg);
    }
    String[] params = {_graphFilePath, newGraphFile};
    // i18n[graph.graphRenamed=Renamed "{0}" to "{1}"]
    _session.showMessage(s_stringMgr.getString("graph.graphRenamed", params));
   }
   _graphFilePath = newGraphFile;
   _title = newGraphName;
 }
 catch (IOException e)
 {
   throw new RuntimeException(e);
 }
}
origin: net.sf.squirrel-sql.plugins/graph

private ArrayList<LinkXmlBean> getExistingLinks(GraphPlugin plugin)
{
 try
 {
   String[] linkFileNames = plugin.getPluginUserSettingsFolder().list(new FilenameFilter()
   {
    @Override
    public boolean accept(File dir, String name)
    {
      if (name.startsWith(DefaultGraphXmlSerializerConfig.LINK_PREFIX))
      {
       return true;
      }
      return false;
    }
   });
   ArrayList<LinkXmlBean> ret = new ArrayList<LinkXmlBean>();
   XMLBeanReader br = new XMLBeanReader();
   for (String linkFileName : linkFileNames)
   {
    br.load(new File(plugin.getPluginUserSettingsFolder().getPath(), linkFileName), LinkGraphController.class.getClassLoader());
    ret.add((LinkXmlBean) br.iterator().next());
   }
   return ret;
 }
 catch (Exception e)
 {
   throw new RuntimeException(e);
 }
}
origin: net.sf.squirrel-sql.plugins/laf

_settingsCache.load(newPrefsFile.getPath(), getClass().getClassLoader());
origin: net.sf.squirrel-sql/squirrel-sql

os.putNextEntry(new ZipEntry(file.getPath()));
_iou.copyBytes(fis, os);
origin: realXuJiang/bigtable-sql

os.putNextEntry(new ZipEntry(file.getPath()));
_iou.copyBytes(fis, os);
origin: net.sf.squirrel-sql.plugins/graph

private void onCreate()
{
 try
 {
   int[] seletedRowIndexes = _linkGraphDialog.tblGraphFiles.getSeletedModelRows();
   for (int seletedRowIndex : seletedRowIndexes)
   {
    GraphFileDisplayBean gdb = _graphFileDisplayBeans.get(seletedRowIndex);
    String linkName = _plugin.patchName(gdb.getName().toString(), _session);
    File pathOfLinkXmlFile = new File(_plugin.getPluginUserSettingsFolder().getPath(), createLinkFileName(gdb));
    LinkXmlBean linkXmlBean =
       new LinkXmlBean(linkName, gdb.getName().toString(), gdb.getGraphFile().getAbsolutePath());
    XMLBeanWriter bw = new XMLBeanWriter(linkXmlBean);
    bw.save(pathOfLinkXmlFile.getAbsolutePath());
    GraphXmlSerializer graphXmlSerializer =
       new GraphXmlSerializer(_plugin, _session, linkXmlBean, pathOfLinkXmlFile.getAbsolutePath());
    _plugin.createNewGraphControllerForSession(_session, graphXmlSerializer, false);
   }
   onWindowClosing();
   _linkGraphDialog.setVisible(false);
   _linkGraphDialog.dispose();
 }
 catch (Exception e)
 {
   throw new RuntimeException(e);
 }
}
origin: net.sf.squirrel-sql.plugins/graph

_linkGraphDialog.txtDir.setText(graphPlugin.getPluginUserSettingsFolder().getPath());
origin: net.sf.squirrel-sql.plugins/graph

boolean isInUserSettingsFolder = graphPlugin.getPluginUserSettingsFolder().getPath().equals(path.getPath());
net.sourceforge.squirrel_sql.fw.utilFileWrappergetPath

Popular methods of FileWrapper

  • exists
  • getAbsolutePath
  • delete
  • getFileWriter
  • isFile
  • list
  • listFiles
  • mkdir
  • mkdirs
  • toURI
  • canRead
  • deleteOnExit
  • canRead,
  • deleteOnExit,
  • getFileInputStream,
  • getName,
  • isDirectory,
  • lastModified,
  • length,
  • createNewFile,
  • getBufferedReader

Popular in Java

  • Making http requests using okhttp
  • compareTo (BigDecimal)
  • getExternalFilesDir (Context)
  • putExtra (Intent)
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • JLabel (javax.swing)
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Sublime Text for Python
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now