Java Doc for IdeUtil.java in  » IDE-Netbeans » visualweb.api.designer » org » netbeans » modules » visualweb » complib » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE Netbeans » visualweb.api.designer » org.netbeans.modules.visualweb.complib 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.netbeans.modules.visualweb.complib.IdeUtil

IdeUtil
public class IdeUtil (Code)
Misc methods to simplify interface to IDE
author:
   Edwin Goei




Method Summary
public static  StringbaseClassName(String name)
    
public static  StringbaseName(String name)
     Return basename of a string similar to unix basename command.
public static  voidcopyFile(File src, File dst)
    
public static  voidcopyFileRecursive(File source, File dest)
    
public static  booleandeleteRecursive(File dir)
     Deletes all files and subdirectories under dir.
public static  ProjectfileToProject(File projectDir)
     Returns a NB Project for a project directory or else null if not a project.
public static  FilefindUniqueFile(File dir, String baseFileName, String suffix)
     Find unique file name within a directory which can either be a plain file or a directory.
Parameters:
  dir - eg.
public static  FilefreeJarFile(File origFile)
     Possibly make a copy of a file to workaround a problem on Windows where a jar file can be locked and not allow the user to remove it.
public static  ProjectgetActiveProject()
     Return the Project that is currently active according to the Designer.
public static  StringgetCodeNameBase()
     Returns the NetBeans module code name base.
public static  FilegetComplibStateDir()
     Get the directory where state of this module is kept.
public static  LoggergetLogger()
     Returns the Logger for this NB module.
public static  FilegetNetBeansInstallDirectory()
    
public static  FilegetProjectLibraryDirectory(Project project)
     Returns a directory under the project root under which library resources such as jar files can be managed by the IDE.
public static  FilegetRaveSamplesDirectory()
    
public static  voidlogError(Throwable th)
    
public static  voidlogError(String msg)
    
public static  voidlogError(String msg, Throwable cause)
    
public static  voidlogWarning(Throwable th)
    
public static  voidlogWarning(String msg)
    
public static  voidlogWarning(String msg, Throwable cause)
    
public static  voidprintDebug(String msg)
    
public static  StringremoveExtension(String name)
     Return the non-extension part of a filename.
public static  StringremoveWhiteSpace(String str)
    
public static  voidrunAntTask(File antScript, String target, Properties props)
    
public static  voidunzip(File zipFile, File dest)
     Unzip a zip or jar file into a dest directory.



Method Detail
baseClassName
public static String baseClassName(String name)(Code)
Return base class name using "." as a separator
Parameters:
  name -



baseName
public static String baseName(String name)(Code)
Return basename of a string similar to unix basename command. Uses platform file separator char. Basename of root dir is itself.
Parameters:
  name -



copyFile
public static void copyFile(File src, File dst) throws IOException(Code)
Copy files using nio
Parameters:
  src - source file
Parameters:
  dst - destination file
throws:
  IOException -



copyFileRecursive
public static void copyFileRecursive(File source, File dest) throws IOException(Code)



deleteRecursive
public static boolean deleteRecursive(File dir)(Code)
Deletes all files and subdirectories under dir. Returns true if all deletions were successful. If a deletion fails, the method stops attempting to delete and returns false.
Parameters:
  dir -



fileToProject
public static Project fileToProject(File projectDir)(Code)
Returns a NB Project for a project directory or else null if not a project.
Parameters:
  projectDir - NB Project object or null if not a project



findUniqueFile
public static File findUniqueFile(File dir, String baseFileName, String suffix)(Code)
Find unique file name within a directory which can either be a plain file or a directory.
Parameters:
  dir - eg. an absoluteLibDir
Parameters:
  baseFileName - eg. "sample-date-dt"
Parameters:
  suffix - Can be empty string to mean no suffix. eg. ".jar", ""



freeJarFile
public static File freeJarFile(File origFile) throws IOException(Code)
Possibly make a copy of a file to workaround a problem on Windows where a jar file can be locked and not allow the user to remove it. The tradeoff is that the file will be copied which may take time for large files. A System property can be set to override the default behavior.
Parameters:
  origFile - original file eg. jar or complib file
throws:
  IOException -



getActiveProject
public static Project getActiveProject()(Code)
Return the Project that is currently active according to the Designer. currently active project or null, if none.



getCodeNameBase
public static String getCodeNameBase()(Code)
Returns the NetBeans module code name base.



getComplibStateDir
public static File getComplibStateDir()(Code)
Get the directory where state of this module is kept. This will be in the userdir and also part of the NetBeans filesystem so that it will make it easier to migrate to future IDE versions.
throws:
  IOException -



getLogger
public static Logger getLogger()(Code)
Returns the Logger for this NB module. Use Java logging instead of the older NB ErrorManager APIs.



getNetBeansInstallDirectory
public static File getNetBeansInstallDirectory()(Code)
Get the top level netbeans install directory



getProjectLibraryDirectory
public static File getProjectLibraryDirectory(Project project)(Code)
Returns a directory under the project root under which library resources such as jar files can be managed by the IDE.
Parameters:
  project - Target project File of the library directory or null if it does not exist



getRaveSamplesDirectory
public static File getRaveSamplesDirectory()(Code)
Get the rave samples directory



logError
public static void logError(Throwable th)(Code)

Parameters:
  th -



logError
public static void logError(String msg)(Code)



logError
public static void logError(String msg, Throwable cause)(Code)



logWarning
public static void logWarning(Throwable th)(Code)

Parameters:
  th -



logWarning
public static void logWarning(String msg)(Code)



logWarning
public static void logWarning(String msg, Throwable cause)(Code)



printDebug
public static void printDebug(String msg)(Code)



removeExtension
public static String removeExtension(String name)(Code)
Return the non-extension part of a filename. eg. foo.txt -> "foo"
Parameters:
  name -



removeWhiteSpace
public static String removeWhiteSpace(String str)(Code)
Remove whitespace in a String and replace with underscores
Parameters:
  str - new String with whitespace replaced with underscores



runAntTask
public static void runAntTask(File antScript, String target, Properties props) throws IOException(Code)

Parameters:
  antScript - Ant build file
Parameters:
  target - target to build
Parameters:
  props - properties to set
throws:
  IOException -



unzip
public static void unzip(File zipFile, File dest) throws IOException(Code)
Unzip a zip or jar file into a dest directory. Derived from jar command in JDK.
Parameters:
  zipFile - a zip or jar file
Parameters:
  dest - destination directory to contain expanded contents
throws:
  IOException -



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.