Changeset 438 for java/Framclipse/com.framsticks.framclipse/src/com/framsticks/framclipse/script/XMLConstantProvider.java
- Timestamp:
- 10/18/15 23:05:09 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
java/Framclipse/com.framsticks.framclipse/src/com/framsticks/framclipse/script/XMLConstantProvider.java
r437 r438 7 7 import java.util.Map; 8 8 9 import org.antlr.misc.MultiMap; 9 10 import org.apache.commons.io.IOUtils; 10 11 import org.eclipse.core.runtime.ILog; … … 20 21 import com.framsticks.framclipse.script.model.Type; 21 22 import com.google.common.collect.Maps; 22 import com.google.common.collect.Multimap;23 import com.google.common.collect.Multimaps;24 23 import com.google.inject.Inject; 25 24 import com.thoughtworks.xstream.XStream; … … 68 67 private Map<String, Map<String, Type>> createTypeMappings(Framscontext framscontext, Framscript framscript) { 69 68 Map<String, Map<String, Type>> types = Maps.newHashMap(); 70 Multi map<String, String> ext2ctx = ext2Ctx(framscontext);71 Multi map<String, Type> ctx2type = ctx2Type(framscript);69 MultiMap<String, String> ext2ctx = ext2Ctx(framscontext); 70 MultiMap<String, Type> ctx2type = ctx2Type(framscript); 72 71 for (String ext : ext2ctx.keySet()) { 73 72 HashMap<String, Type> map = new HashMap<String, Type>(); … … 82 81 } 83 82 84 private Multi map<String, String> ext2Ctx(Framscontext framscontext) {85 Multi map<String, String> ext2ctx = Multimaps.newHashMultimap();83 private MultiMap<String, String> ext2Ctx(Framscontext framscontext) { 84 MultiMap<String, String> ext2ctx = new MultiMap<String, String>(); 86 85 for (File file : framscontext.getFiles()) { 87 86 String ext = file.getPattern(); … … 89 88 if (file.getCode() != null) { 90 89 for (Context context : file.getCode().getContexts()) { 91 ext2ctx. put(ext, context.getName());90 ext2ctx.map(ext, context.getName()); 92 91 } 93 92 } … … 96 95 } 97 96 98 private Multi map<String, Type> ctx2Type(Framscript framscript) {99 Multi map<String, Type> ctx2type = Multimaps.newHashMultimap();97 private MultiMap<String, Type> ctx2Type(Framscript framscript) { 98 MultiMap<String, Type> ctx2type = new MultiMap<String, Type>(); 100 99 for (Type type : framscript.getTypes()) { 101 ctx2type. put(type.getContext(), type);100 ctx2type.map(type.getContext(), type); 102 101 } 103 102 return ctx2type;
Note: See TracChangeset
for help on using the changeset viewer.