private ExternalFoldersManager() { // Prevent instantiation // https://bugs.eclipse.org/bugs/show_bug.cgi?id=377806 if (Platform.isRunning()) { getFolders(); } }
private ExternalFoldersManager() { // Prevent instantiation // https://bugs.eclipse.org/bugs/show_bug.cgi?id=377806 if (Platform.isRunning()) { getFolders(); } }
public static boolean canCreateExecutableExtension(IConfigurationElement element) { if (Platform.isRunning() && (getSystemBundle().getState() != Bundle.STOPPING)) { return true; } return false; }
private ExternalFoldersManager() { // Prevent instantiation // https://bugs.eclipse.org/bugs/show_bug.cgi?id=377806 if (Platform.isRunning()) { getFolders(); } }
private ExternalFoldersManager() { // Prevent instantiation // https://bugs.eclipse.org/bugs/show_bug.cgi?id=377806 if (Platform.isRunning()) { getFolders(); } }
/** * Tests to see if it is valid at this point in time to create an executable extension. A valid reason not to would be that the workspace is * shutting donw. * * @param element * @return <code>true</code> if it is valid point to create an executable extension. * * @since 1.0.0 */ public static boolean canCreateExecutableExtension(IConfigurationElement element) { if (Platform.isRunning() && getSystemBundle().getState() != Bundle.STOPPING) return true; return false; }
private ExternalFoldersManager() { // Prevent instantiation // https://bugs.eclipse.org/bugs/show_bug.cgi?id=377806 if (Platform.isRunning()) { getFolders(); } }
/** * A check to see if the OSGI framework is shutting down. * * @return true if the System Bundle is stopped (ie. the framework is * shutting down) */ boolean frameworkIsShuttingDown() { // in the Framework class there's a note: // set the state of the System Bundle to STOPPING. // this must be done first according to section 4.19.2 from the OSGi // R3 spec. boolean shuttingDown = !Platform.isRunning() || Platform.getBundle(OSGI_FRAMEWORK_ID).getState() == Bundle.STOPPING; return shuttingDown; }
/** * call to wait until index maintenance has completed * * @throws InterruptedException */ public void waitUntilIdle() throws InterruptedException { if (!Platform.isRunning() && reindexDelay != 0L) { // job join() behaviour is not the same when platform is not running Logger.getLogger(TaskListIndex.class.getName()).warning( "Index job joining may not work properly when Eclipse platform is not running"); //$NON-NLS-1$ } maintainIndexJob.join(); }
public static boolean isPlatformSupported() { if (Platform.isRunning()) { switch (Platform.getOS()) { case Platform.OS_WIN32: return true; default: return false; } } else { // this will happen during actual gentarget execution. // If we're on an unsupported platform the execution will fail some other way, // but since we don't know, // we'll give it a shot. return true; } }
private Map<String, QueryGroupProvider> getRegisteredQueryGroups() { if(contributedQueryGroups != null) { return contributedQueryGroups; } contributedQueryGroups = new HashMap<>(); if (Platform.isRunning()) { for (IConfigurationElement e : Platform.getExtensionRegistry().getConfigurationElementsFor(IExtensions.QUERY_SPECIFICATION_EXTENSION_POINT_ID)) { if (e.isValid()) { processExtension(e); } } } return contributedQueryGroups; }
private Map<EStructuralFeature, PQueryProvider> getSurrogateQueryProviders() { if(contributedSurrogateQueries != null) { return contributedSurrogateQueries; } contributedSurrogateQueries = new HashMap<>(); if (Platform.isRunning()) { for (IConfigurationElement e : Platform.getExtensionRegistry().getConfigurationElementsFor(ViatraQueryRuntimeConstants.SURROGATE_QUERY_EXTENSIONID)) { if (e.isValid()) { processExtension(e); } } } return contributedSurrogateQueries; }
protected static File getCacheFile() { if (Platform.isRunning()) { Bundle bundle = Platform.getBundle(HudsonCorePlugin.ID_PLUGIN); if (bundle != null) { IPath stateLocation = Platform.getStateLocation(bundle); IPath cacheFile = stateLocation.append("configuration.obj"); //$NON-NLS-1$ return cacheFile.toFile(); } } return null; }
/** * Constructs a new JavaModelManager */ private JavaModelManager() { // singleton: prevent others from creating a new instance /* * It is required to initialize all fields that depends on a headless environment * only if the platform is running. Otherwise this breaks the ability to use * ASTParser in a non-headless environment. */ if (Platform.isRunning()) { this.indexManager = new IndexManager(); this.nonChainingJars = loadClasspathListCache(NON_CHAINING_JARS_CACHE); this.invalidArchives = loadClasspathListCache(INVALID_ARCHIVES_CACHE); String includeContainerReferencedLib = System.getProperty(RESOLVE_REFERENCED_LIBRARIES_FOR_CONTAINERS); this.resolveReferencedLibrariesForContainers = TRUE.equalsIgnoreCase(includeContainerReferencedLib); } }
/** * Instructs the index to begin listening for resource and classpath * changes. */ public static void startup() { boolean shuttingDown = !Platform.isRunning() || Platform.getBundle(OSGI_FRAMEWORK_ID).getState() == Bundle.STOPPING; if (!shuttingDown) { try { LOCK.acquire(); ENABLED = !"false".equalsIgnoreCase(System.getProperty(TaglibIndex.class.getName())); //$NON-NLS-1$ getInstance().initializeInstance(); } finally { LOCK.release(); } } }
/** * Constructs a new JavaModelManager */ private JavaModelManager() { // singleton: prevent others from creating a new instance /* * It is required to initialize all fields that depends on a headless environment * only if the platform is running. Otherwise this breaks the ability to use * ASTParser in a non-headless environment. */ if (Platform.isRunning()) { this.indexManager = new IndexManager(); this.nonChainingJars = loadClasspathListCache(NON_CHAINING_JARS_CACHE); this.externalFiles = loadClasspathListCache(EXTERNAL_FILES_CACHE); this.assumedExternalFiles = loadClasspathListCache(ASSUMED_EXTERNAL_FILES_CACHE); String includeContainerReferencedLib = System.getProperty(RESOLVE_REFERENCED_LIBRARIES_FOR_CONTAINERS); this.resolveReferencedLibrariesForContainers = TRUE.equalsIgnoreCase(includeContainerReferencedLib); } }
/** * Constructs a new JavaModelManager */ private JavaModelManager() { // singleton: prevent others from creating a new instance /* * It is required to initialize all fields that depends on a headless environment * only if the platform is running. Otherwise this breaks the ability to use * ASTParser in a non-headless environment. */ if (Platform.isRunning()) { this.indexManager = new IndexManager(); this.nonChainingJars = loadClasspathListCache(NON_CHAINING_JARS_CACHE); this.externalFiles = loadClasspathListCache(EXTERNAL_FILES_CACHE); this.assumedExternalFiles = loadClasspathListCache(ASSUMED_EXTERNAL_FILES_CACHE); String includeContainerReferencedLib = System.getProperty(RESOLVE_REFERENCED_LIBRARIES_FOR_CONTAINERS); this.resolveReferencedLibrariesForContainers = TRUE.equalsIgnoreCase(includeContainerReferencedLib); } }
/** * Constructs a new JavaModelManager */ private JavaModelManager() { // singleton: prevent others from creating a new instance /* * It is required to initialize all fields that depends on a headless environment * only if the platform is running. Otherwise this breaks the ability to use * ASTParser in a non-headless environment. */ if (Platform.isRunning()) { this.indexManager = new IndexManager(); this.nonChainingJars = loadClasspathListCache(NON_CHAINING_JARS_CACHE); this.externalFiles = loadClasspathListCache(EXTERNAL_FILES_CACHE); this.assumedExternalFiles = loadClasspathListCache(ASSUMED_EXTERNAL_FILES_CACHE); String includeContainerReferencedLib = System.getProperty(RESOLVE_REFERENCED_LIBRARIES_FOR_CONTAINERS); this.resolveReferencedLibrariesForContainers = TRUE.equalsIgnoreCase(includeContainerReferencedLib); } }
/** * Constructs a new JavaModelManager */ private JavaModelManager() { // singleton: prevent others from creating a new instance /* * It is required to initialize all fields that depends on a headless environment * only if the platform is running. Otherwise this breaks the ability to use * ASTParser in a non-headless environment. */ if (Platform.isRunning()) { this.indexManager = new IndexManager(); this.nonChainingJars = loadClasspathListCache(NON_CHAINING_JARS_CACHE); this.invalidArchives = loadClasspathListCache(INVALID_ARCHIVES_CACHE); this.externalFiles = loadClasspathListCache(EXTERNAL_FILES_CACHE); this.assumedExternalFiles = loadClasspathListCache(ASSUMED_EXTERNAL_FILES_CACHE); String includeContainerReferencedLib = System.getProperty(RESOLVE_REFERENCED_LIBRARIES_FOR_CONTAINERS); this.resolveReferencedLibrariesForContainers = TRUE.equalsIgnoreCase(includeContainerReferencedLib); } }
/** * Constructs a new JavaModelManager */ private JavaModelManager() { // singleton: prevent others from creating a new instance /* * It is required to initialize all fields that depends on a headless environment * only if the platform is running. Otherwise this breaks the ability to use * ASTParser in a non-headless environment. */ if (Platform.isRunning()) { this.indexManager = new IndexManager(); this.nonChainingJars = loadClasspathListCache(NON_CHAINING_JARS_CACHE); this.invalidArchives = loadClasspathListCache(INVALID_ARCHIVES_CACHE); this.externalFiles = loadClasspathListCache(EXTERNAL_FILES_CACHE); this.assumedExternalFiles = loadClasspathListCache(ASSUMED_EXTERNAL_FILES_CACHE); String includeContainerReferencedLib = System.getProperty(RESOLVE_REFERENCED_LIBRARIES_FOR_CONTAINERS); this.resolveReferencedLibrariesForContainers = TRUE.equalsIgnoreCase(includeContainerReferencedLib); } }