@Override public IFile file(String path) { // try { File subFile = new File(this._file, path)/*.getCanonicalFile()*/; return CommonServices.getFileSystem().getIFile(subFile); // } catch (IOException e) { // throw new RuntimeException(e); // } }
/** * Converts a String name of a type into an IType. * * @param typeString the type name to parse * @return the parsed type * @throws IllegalArgumentException if the type string doesn't correspond to any known IType */ public static IType parseType( String typeString ) throws IllegalArgumentException { return CommonServices.getTypeSystem().parseType(typeString); }
public final Integer makeInteger( Object obj ) { if( obj == null ) { return null; } return CommonServices.getCoercionManager().makeIntegerFrom( obj ); }
@Override public String getDisplayName() { return CommonServices.getEntityAccess().getLocalizedTypeInfoName(_type); }
public static ISourceCodeTokenizer createSourceCodeTokenizer( CharSequence code ) { return CommonServices.getGosuIndustrialPark().createSourceCodeTokenizer( code ); } public static ISourceCodeTokenizer createSourceCodeTokenizer( CharSequence code, boolean bTemplate )
public static void reinitializeGosu( Project project ) { CommonServices.getKernel().redefineService_Privileged( IPlatformHelper.class, new GosuEditorPlatformHelper() ); IExecutionEnvironment execEnv = TypeSystem.getExecutionEnvironment(); _gosuInitialization = GosuInitialization.instance( execEnv ); GosucModule gosucModule = new GosucModule( IExecutionEnvironment.DEFAULT_SINGLE_MODULE_NAME, project.getSourcePath(), Gosu.deriveClasspathFrom( RunMe.class ).stream().map( File::getAbsolutePath ).collect( Collectors.toList() ), "", Collections.<GosucDependency>emptyList(), Collections.<String>emptyList() ); _gosuInitialization.reinitializeSimpleIde( gosucModule ); } }
@Override public boolean isPathIgnored( String sourceFile ) { return CommonServices.getPlatformHelper().isPathIgnored( sourceFile ); } }
@Override protected void doInit() { _time0 = CommonServices.getEntityAccess().getCurrentTime().getTime(); } }
public static ISymbol createSymbol( CharSequence name, IType type, Object value ) { return CommonServices.getGosuIndustrialPark().createSymbol( name, type, value ); } public static ISymbol createSymbol( CharSequence name, IType type, IStackProvider stackProvider )
public static ExecutionMode get() { return _mode == null ? (_mode = CommonServices.getPlatformHelper().getExecutionMode()) : _mode; } public static void clear() {
@Override public IDirectory getParent() { File parentFile = _file.getParentFile(); if (parentFile == null) { return null; } else { return CommonServices.getFileSystem().getIDirectory(parentFile); } }
public static void pushTypeLoader( IModule module, ITypeLoader loader ) { CommonServices.getTypeSystem().pushTypeLoader(module, loader); } public static void removeTypeLoader( Class<? extends ITypeLoader> loader )
private static Calendar dateToCalendar(Date date) { if (date == null) { throw new NullPointerException( "Null date" ); } Calendar dateTime = Calendar.getInstance(CommonServices.getEntityAccess().getTimeZone()); dateTime.setTime(date); return dateTime; }
public static Long makeLong( Object obj ) { if( obj == null ) { return null; } return CommonServices.getCoercionManager().makeLongFrom( obj ); }
public static ISourceCodeTokenizer createSourceCodeTokenizer( CharSequence code ) { return CommonServices.getGosuIndustrialPark().createSourceCodeTokenizer( code ); } public static ISourceCodeTokenizer createSourceCodeTokenizer( CharSequence code, boolean bTemplate )
protected boolean shouldCacheTypeNames() { return CommonServices.getPlatformHelper().shouldCacheTypeNames(); } }
public ClassPath(IModule module, ClassPathFilter filter) { _module = module; _filter = filter; // Files are assumed stable outside an IDE _fs = CommonServices.getFileSystem(); _bStableFiles = _fs instanceof FileSystemImpl; loadClasspathInfo(); }
public static void popSymTableCtx() { CommonServices.getTypeSystem().popSymTableCtx(); } public static ISymbolTable getSymTableCtx()
public static List<IDirectory> createDefaultClassPath( ) { List<String> vals = new ArrayList<String>(); vals.add(System.getProperty("java.class.path", "")); vals.add(CommonServices.getEntityAccess().getWebServerPaths()); vals.addAll(getJarsContainingSpecialClasses()); vals.add(System.getProperty("sun.boot.class.path", "")); vals.add(System.getProperty("java.ext.dirs", "")); vals.add(CommonServices.getEntityAccess().getPluginRepositories().toString()); return expand(vals); }
ArrayIterator( Object array, IType arrayType ) { _iCsr = 0; _arrayType = arrayType; _array = CommonServices.getCoercionManager().convertValue(array, _arrayType); }