Lines 23-30
Link Here
|
23 |
import java.beans.PropertyChangeListener; |
23 |
import java.beans.PropertyChangeListener; |
24 |
import java.beans.PropertyChangeEvent; |
24 |
import java.beans.PropertyChangeEvent; |
25 |
import java.io.IOException; |
25 |
import java.io.IOException; |
26 |
import java.io.File; |
26 |
import java.io.*; |
27 |
import org.openide.util.*; |
27 |
import org.openide.util.*; |
|
|
28 |
import org.openide.util.actions.SystemAction; |
28 |
import org.openide.modules.ModuleInfo; |
29 |
import org.openide.modules.ModuleInfo; |
29 |
import java.net.URL; |
30 |
import java.net.URL; |
30 |
import java.util.jar.Manifest; |
31 |
import java.util.jar.Manifest; |
Lines 483-488
Link Here
|
483 |
ev.log(Events.PERF_TICK, "prepared " + m.getCodeName() ); // NOI18N |
484 |
ev.log(Events.PERF_TICK, "prepared " + m.getCodeName() ); // NOI18N |
484 |
} |
485 |
} |
485 |
ev.log(Events.PERF_END, "module preparation" ); // NOI18N |
486 |
ev.log(Events.PERF_END, "module preparation" ); // NOI18N |
|
|
487 |
|
486 |
|
488 |
|
487 |
} catch (InvalidException ie) { |
489 |
} catch (InvalidException ie) { |
488 |
// Remember that there was a problem with this guy. |
490 |
// Remember that there was a problem with this guy. |
Lines 530-538
Link Here
|
530 |
nueclassloaders.add(((Module)teIt.next()).getClassLoader()); |
532 |
nueclassloaders.add(((Module)teIt.next()).getClassLoader()); |
531 |
} |
533 |
} |
532 |
classLoader.append((ClassLoader[])(nueclassloaders.toArray(new ClassLoader[nueclassloaders.size()]))); |
534 |
classLoader.append((ClassLoader[])(nueclassloaders.toArray(new ClassLoader[nueclassloaders.size()]))); |
533 |
} else { |
535 |
} else { // Can't happen? |
534 |
Util.err.log("enable: no class loader yet, not appending"); |
536 |
Util.err.log("enable: no class loader yet, not appending"); |
535 |
} |
537 |
} |
|
|
538 |
loadActions(); |
536 |
Util.err.log("enable: continuing to installation"); |
539 |
Util.err.log("enable: continuing to installation"); |
537 |
installer.load(toEnable); |
540 |
installer.load(toEnable); |
538 |
} |
541 |
} |
Lines 552-558
Link Here
|
552 |
} |
555 |
} |
553 |
ev.log(Events.FINISH_ENABLE_MODULES, modules); |
556 |
ev.log(Events.FINISH_ENABLE_MODULES, modules); |
554 |
} |
557 |
} |
555 |
|
558 |
|
|
|
559 |
void loadActions() { |
560 |
try { |
561 |
System.err.println("Start forced action loading"); |
562 |
List l = new ArrayList(); |
563 |
BufferedReader br = new BufferedReader( new FileReader("/tmp/actions.list")); |
564 |
String line; |
565 |
while ((line = br.readLine()) != null) l.add(line); |
566 |
br.close(); |
567 |
|
568 |
ClassLoader cl = getClassLoader(); |
569 |
long time = System.currentTimeMillis(); |
570 |
Iterator it = l.iterator(); |
571 |
while(it.hasNext()) { |
572 |
String name = (String)it.next(); |
573 |
Class cls = cl.loadClass(name); |
574 |
SystemAction sa = SystemAction.get(cls); |
575 |
} |
576 |
time = System.currentTimeMillis() - time; |
577 |
|
578 |
System.err.println("Done forced action loading, took " + time + "ms"); |
579 |
} catch (Exception e) { |
580 |
e.printStackTrace(); |
581 |
} |
582 |
} |
556 |
/** Disable a set of modules together. |
583 |
/** Disable a set of modules together. |
557 |
* Must not be required by any enabled |
584 |
* Must not be required by any enabled |
558 |
* modules (except one another). |
585 |
* modules (except one another). |