@Override public String toString() { return _file.getPath().getPathString(); } }
@Override public String getFilePath() { return _file.getPath().getFileSystemPathString(); }
public String getFilePath() { return _file == null ? null : _file.getPath().getPathString(); }
@Override public String toString() { return file.getPath().getPathString(); }
@Override public String getFilePath() { return _file.getPath().getFileSystemPathString(); }
@Override public String getFilePath() { return _file.getPath().getFileSystemPathString(); }
public String getFilePath() { return _file == null ? null : _file.getPath().getPathString(); }
private String getClassNameFromFile( IDirectory root, IFile file ) { String strQualifiedClassName = root.relativePath(file); if( !isClassFileName( strQualifiedClassName ) ) { throw new IllegalArgumentException( file.getPath() + " is not a legal Java class name. " + "It does not end with " + CLASS_FILE_EXT ); } strQualifiedClassName = strQualifiedClassName.substring( 0, strQualifiedClassName.length() - CLASS_FILE_EXT.length() ); return strQualifiedClassName.replace('/', '.'); }
private String getClassNameFromFile( IDirectory root, IFile file ) { String strQualifiedClassName = root.relativePath(file); if( !isClassFileName( strQualifiedClassName ) ) { throw new IllegalArgumentException( file.getPath() + " is not a legal Java class name. " + "It does not end with " + CLASS_FILE_EXT ); } strQualifiedClassName = strQualifiedClassName.substring( 0, strQualifiedClassName.length() - CLASS_FILE_EXT.length() ); return strQualifiedClassName.replace('/', '.'); }
public static String getTypeNameFromFile( IDirectory root, IFile file ) { String strClassPath = root.getPath().getFileSystemPathString() + File.separatorChar; String strQualifiedClassName = file.getPath().getFileSystemPathString().substring( strClassPath.length() ); int iDot = strQualifiedClassName.lastIndexOf( '.' ); if( iDot >= 0 ) { strQualifiedClassName = strQualifiedClassName.substring( 0, iDot ); strQualifiedClassName = strQualifiedClassName.replace( '/', '.' ).replace( '\\', '.' ); } if( strQualifiedClassName.startsWith( "." ) ) { strQualifiedClassName = strQualifiedClassName.substring( 1 ); } return strQualifiedClassName; }
@Override public String getClassNameFromFile( IDirectory root, IFile file, String[] fileExts ) { String strClassPath = root.getPath().getFileSystemPathString() + File.separatorChar; String strQualifiedClassName = file.getPath().getFileSystemPathString().substring( strClassPath.length() ); if( !Util.isClassFileName( strQualifiedClassName, fileExts ) ) { String strExts = ""; for( String strExt : fileExts ) { strExts += " " + strExt; } throw new IllegalArgumentException( file.getPath().getName() + " is not a legal Gosu class name. It does not end with [" + strExts.trim() + "]" ); } strQualifiedClassName = strQualifiedClassName.substring( 0, strQualifiedClassName.lastIndexOf( '.' ) ); strQualifiedClassName = strQualifiedClassName.replace( '/', '.' ).replace( '\\', '.' ); if( strQualifiedClassName.startsWith( "." ) ) { strQualifiedClassName = strQualifiedClassName.substring( 1 ); } return strQualifiedClassName; }
@Override public String getClassNameFromFile( IDirectory root, IFile file, String[] fileExts ) { String strClassPath = root.getPath().getFileSystemPathString() + File.separatorChar; String strQualifiedClassName = file.getPath().getFileSystemPathString().substring( strClassPath.length() ); if( !Util.isClassFileName( strQualifiedClassName, fileExts ) ) { String strExts = ""; for( String strExt : fileExts ) { strExts += " " + strExt; } throw new IllegalArgumentException( file.getPath().getName() + " is not a legal Gosu class name. It does not end with [" + strExts.trim() + "]" ); } strQualifiedClassName = strQualifiedClassName.substring( 0, strQualifiedClassName.lastIndexOf( '.' ) ); strQualifiedClassName = strQualifiedClassName.replace( '/', '.' ).replace( '\\', '.' ); if( strQualifiedClassName.startsWith( "." ) ) { strQualifiedClassName = strQualifiedClassName.substring( 1 ); } return strQualifiedClassName; }
private void maybeCopySourceFile( File parent, IGosuClass gsClass ) { ISourceFileHandle sfh = gsClass.getSourceFileHandle(); IFile srcFile = sfh.getFile(); if( srcFile != null ) { File file = new File( srcFile.getPath().getFileSystemPathString() ); if( file.isFile() ) { try { copyFile( file, new File( parent, file.getName() ) ); } catch( IOException e ) { throw new RuntimeException( e ); } } } }
private void maybeCopySourceFile( File parent, IGosuClass gsClass ) { ISourceFileHandle sfh = gsClass.getSourceFileHandle(); IFile srcFile = sfh.getFile(); if( srcFile != null ) { File file = new File( srcFile.getPath().getFileSystemPathString() ); if( file.isFile() ) { try { copyFile( file, new File( parent, file.getName() ) ); } catch( IOException e ) { throw new RuntimeException( e ); } } } }
/** * If the types need to be initialized, this will create the parser and * parse the wsdl document. */ private void maybeInit() { if ( _types != null ) { // already inited return; } try { _allTypeNames = new HashSet<String>(); createTypes(); return; } catch (Exception ex) { getLogger().warn("Unable to parse WSDL: " + _resourceFile.getPath(), ex); } _types = Collections.emptyMap(); _allTypeNames = Collections.emptySet(); }
private void maybeCopySourceFile( File parent, IGosuClass gsClass, File sourceFile, ICompilerDriver driver ) { ISourceFileHandle sfh = gsClass.getSourceFileHandle(); IFile srcFile = sfh.getFile(); if( srcFile != null ) { File file = new File( srcFile.getPath().getFileSystemPathString() ); if( file.isFile() ) { try { File destFile = new File( parent, file.getName() ); copyFile( file, destFile ); driver.registerOutput( _compilingSourceFile, destFile ); } catch( IOException e ) { e.printStackTrace(); driver.sendCompileIssue( sourceFile, ERROR, 0, 0, 0, "Cannot copy source file to output folder." ); } } } }
for (IDirectory possibleSourceDir : TypeSystem.getCurrentModule().getSourcePath()) { if (changedFile.isDescendantOf(possibleSourceDir)) { String relativeFilePath = possibleSourceDir.getPath().relativePath(changedFile.getPath(), "/"); String typeName = relativeFilePath.replace('/', '.'); typeName = typeName.substring(0, typeName.lastIndexOf("."));