|
From: <caw...@us...> - 2007-04-19 23:54:04
|
Revision: 2343
http://svn.sourceforge.net/rubyeclipse/?rev=2343&view=rev
Author: cawilliams
Date: 2007-04-19 16:54:02 -0700 (Thu, 19 Apr 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyModelManager.java
trunk/org.rubypeople.rdt.ui/META-INF/MANIFEST.MF
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyModelManager.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyModelManager.java 2007-04-19 23:10:00 UTC (rev 2342)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyModelManager.java 2007-04-19 23:54:02 UTC (rev 2343)
@@ -19,6 +19,7 @@
import java.util.HashSet;
import java.util.Hashtable;
import java.util.Iterator;
+import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.Map.Entry;
@@ -257,31 +258,33 @@
return null;
int length = participants.length;
- CompilationParticipant[] result = new CompilationParticipant[length];
- int index = 0;
+ final List<CompilationParticipant> result = new ArrayList<CompilationParticipant>();
for (int i = 0; i < length; i++) {
if (participants[i] instanceof IConfigurationElement) {
final IConfigurationElement configElement = (IConfigurationElement) participants[i];
- final int participantIndex = i;
SafeRunner.run(new ISafeRunnable() {
public void handleException(Throwable exception) {
Util.log(exception, "Exception occurred while creating compilation participant"); //$NON-NLS-1$
}
public void run() throws Exception {
Object executableExtension = configElement.createExecutableExtension("class"); //$NON-NLS-1$
- participants[participantIndex] = executableExtension;
+ CompilationParticipant participant = (CompilationParticipant) executableExtension;
+ result.add(participant);
}
});
- }
- CompilationParticipant participant = (CompilationParticipant) participants[i];
+ } else {
+ CompilationParticipant participant = (CompilationParticipant) participants[i];
+ result.add(participant);
+ }
+ }
+ if (result.isEmpty())
+ return null;
+ List<CompilationParticipant> finalResult = new ArrayList<CompilationParticipant>();
+ for (CompilationParticipant participant : result) {
if (participant != null && participant.isActive(project))
- result[index++] = participant;
+ finalResult.add(participant);
}
- if (index == 0)
- return null;
- if (index < length)
- System.arraycopy(result, 0, result = new CompilationParticipant[index], 0, index);
- return result;
+ return finalResult.toArray(new CompilationParticipant[finalResult.size()]);
}
public HashSet managedMarkerTypes() {
Modified: trunk/org.rubypeople.rdt.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/org.rubypeople.rdt.ui/META-INF/MANIFEST.MF 2007-04-19 23:10:00 UTC (rev 2342)
+++ trunk/org.rubypeople.rdt.ui/META-INF/MANIFEST.MF 2007-04-19 23:54:02 UTC (rev 2343)
@@ -36,6 +36,7 @@
org.rubypeople.rdt.ui.text,
org.rubypeople.rdt.ui.text.folding,
org.rubypeople.rdt.ui.text.hyperlinks,
+ org.rubypeople.rdt.ui.text.ruby,
org.rubypeople.rdt.ui.text.ruby.hover,
org.rubypeople.rdt.ui.wizards
Require-Bundle: org.eclipse.ui.ide,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|