/** * @deprecated Use {@link #restored} instead. */ @Deprecated public void installed() { restored(); }
@Override public void close() { super.close(); closed = true; }
@Override public void uninstalled() { super.uninstalled(); if (projectsListener != null) { OpenProjects.getDefault().removePropertyChangeListener(projectsListener); } }
public @Override boolean closing () { final boolean ret = super.closing (); try { Index.save (); } catch (IOException ex) { ex.printStackTrace (); } return ret; }
@Override public void close() { super.close(); writeConnections(); writeProjects(); }
public @Override boolean closing () { final boolean ret = super.closing(); RepositoryUpdater.getDefault().close(); try { for (final Language language : LanguageRegistry.getInstance()) { if (language.getIndexer() != null) { ClassIndexManager.writeLock(new ClassIndexManager.ExceptionAction<Void>() { public Void run() throws IOException { ClassIndexManager.get(language).close(); return null; } }); } } } catch (IOException ex) { Exceptions.printStackTrace(ex); } if (ENABLE_MBEANS) { unregisterMBeans(); } return ret; }
/** * @deprecated Use {@link #restored} instead. */ @Deprecated public void updated(int release, String specVersion) { restored(); }
/** * Called when the module is loaded and the version is higher than * by the previous load * The default implementation calls {@link #restored}. * @param release The major release number of the <B>old</B> module code name or -1 if not specified. * @param specVersion The specification version of the this <B>old</B> module. * @deprecated Better to check specific aspects of the module's installation. * For example, a globally installed module might be used in several * user directories. Only the module itself can know whether its * special installation tasks apply to some part of the global installation, * or whether they apply to the module's usage in the current user directory. * For this reason, implementing this method cannot be guaranteed * to have useful effects. */ public void updated ( int release, String specVersion ) { restored (); }
/** * Called when the module is first installed into the IDE. * Should perform whatever setup functions are required. * The default implementation calls restored. * <p>Typically, would do one-off functions, and then also call {@link #restored}. * @deprecated Better to check specific aspects of the module's installation. * For example, a globally installed module might be used in several * user directories. Only the module itself can know whether its * special installation tasks apply to some part of the global installation, * or whether they apply to the module's usage in the current user directory. * For this reason, implementing this method cannot be guaranteed * to have useful effects. */ public void installed () { restored (); }
/** * Called when the module is first installed into the IDE. * Should perform whatever setup functions are required. * The default implementation calls restored. * <p>Typically, would do one-off functions, and then also call {@link #restored}. * @deprecated Better to check specific aspects of the module's installation. * For example, a globally installed module might be used in several * user directories. Only the module itself can know whether its * special installation tasks apply to some part of the global installation, * or whether they apply to the module's usage in the current user directory. * For this reason, implementing this method cannot be guaranteed * to have useful effects. */ public void installed () { restored (); }
/** * Called when the module is loaded and the version is higher than * by the previous load * The default implementation calls {@link #restored}. * @param release The major release number of the <B>old</B> module code name or -1 if not specified. * @param specVersion The specification version of the this <B>old</B> module. * @deprecated Better to check specific aspects of the module's installation. * For example, a globally installed module might be used in several * user directories. Only the module itself can know whether its * special installation tasks apply to some part of the global installation, * or whether they apply to the module's usage in the current user directory. * For this reason, implementing this method cannot be guaranteed * to have useful effects. */ public void updated ( int release, String specVersion ) { restored (); }
public void restored() { super.restored(); // update source level and J2SE platforms in build.properties file updateBuildProperties(); }
public @Override void restored() { super.restored(); if (Boolean.getBoolean("netbeans.do.not.check.xalan")) // NOI18N return ; long start = System.currentTimeMillis(); boolean isBuggyXalan = checkForXalan(); long end = System.currentTimeMillis(); Logger.getLogger(AntProjectModule.class.getName()).log(Level.FINE, "check for buggy xalan took %d", end - start); // NOI18N if (isBuggyXalan) { showWarning(); } }
public @Override void restored() { super.restored(); if (Boolean.getBoolean("netbeans.do.not.check.xalan")) // NOI18N return ; long start = System.currentTimeMillis(); boolean isBuggyXalan = checkForXalan(); long end = System.currentTimeMillis(); Logger.getLogger(RakeProjectModule.class.getName()).log(Level.FINE, "check for buggy xalan took %d", end - start); // NOI18N if (isBuggyXalan) { showWarning(); } }
@Override public void restored () { super.restored(); WindowManager.getDefault().invokeWhenUIReady(new Runnable() { @Override public void run () { RequestProcessor.getDefault().post(new Runnable() { @Override public void run() { TaskProcessorControl.initialize(); } }); } }); }
/** * Called when an already-installed module is restored (during IDE startup). * Should perform whatever initializations are required. * <p>Note that it is possible for module code to be run before this method * is called, and that code must be ready nonetheless. For example, data loaders * might be asked to recognize a file before the module is "restored". For this * reason, but more importantly for general performance reasons, modules should * avoid doing anything here that is not strictly necessary - often by moving * initialization code into the place where the initialization is actually first * required (if ever). This method should serve as a place for tasks that must * be run once during every startup, and that cannot reasonably be put elsewhere. * <p>Basic programmatic services are available to the module at this stage - * for example, its class loader is ready for general use, any objects registered * declaratively to lookup (e.g. system options or services) are ready to be * queried, and so on. */ public void restored() { super.restored(); MiscUtils.setVerbosePrint(); // for EA, we want as many details in the log file as possible to be able to resolve user problems // Settings have to be load on startup at least for the following calibration (saved calibration data loading) stuff // to run correctly - it needs to know the saved JVM executable file/version to run. MiscUtils.deleteHeapTempFiles(); }
@Override public void restored() { super.restored(); File expandedPath = InstalledFileLocator.getDefault().locate("maven2/maven-plugins-xml", null, false); //NOI18N File upgrade = expandedPath == null ? null : new File(expandedPath, UPGRADE_PATH); if (expandedPath == null || !expandedPath.exists() || (expandedPath != null && expandedPath.exists() && !upgrade.exists())) { File zipFile = InstalledFileLocator.getDefault().locate("maven2/maven-plugins-xml.zip", null, false); //NOI18N assert zipFile != null : "Wrong installation, maven2/maven-plugins-xml.zip missing"; //NOI18N //TODO place somewhere else to make sure it's writable by user? expandedPath = new File(zipFile.getParentFile(), "maven-plugins-xml"); //NOI18N FileObject fo=null; InputStream in = null; try { fo = FileUtil.createFolder(expandedPath); } catch (IOException ex) { Exceptions.printStackTrace(ex); } try { in = new FileInputStream(zipFile); FileUtil.extractJar(fo, in); } catch (IOException exc) { } finally { IOUtil.close(in); } } } }
public void restored() super.restored();
public void restored() super.restored();