Ignore:
Timestamp:
10/18/15 23:05:09 (9 years ago)
Author:
Mateusz Poszwa
Message:

Ported Framclipse to Xtext 2.8.4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • java/Framclipse/com.framsticks.framclipse/src/com/framsticks/framclipse/script/XMLConstantProvider.java

    r437 r438  
    77import java.util.Map;
    88
     9import org.antlr.misc.MultiMap;
    910import org.apache.commons.io.IOUtils;
    1011import org.eclipse.core.runtime.ILog;
     
    2021import com.framsticks.framclipse.script.model.Type;
    2122import com.google.common.collect.Maps;
    22 import com.google.common.collect.Multimap;
    23 import com.google.common.collect.Multimaps;
    2423import com.google.inject.Inject;
    2524import com.thoughtworks.xstream.XStream;
     
    6867        private Map<String, Map<String, Type>> createTypeMappings(Framscontext framscontext, Framscript framscript) {
    6968                Map<String, Map<String, Type>> types = Maps.newHashMap();
    70                 Multimap<String, String> ext2ctx = ext2Ctx(framscontext);
    71                 Multimap<String, Type> ctx2type = ctx2Type(framscript);
     69                MultiMap<String, String> ext2ctx = ext2Ctx(framscontext);
     70                MultiMap<String, Type> ctx2type = ctx2Type(framscript);
    7271                for (String ext : ext2ctx.keySet()) {
    7372                        HashMap<String, Type> map = new HashMap<String, Type>();
     
    8281        }
    8382
    84         private Multimap<String, String> ext2Ctx(Framscontext framscontext) {
    85                 Multimap<String, String> ext2ctx = Multimaps.newHashMultimap();
     83        private MultiMap<String, String> ext2Ctx(Framscontext framscontext) {
     84                MultiMap<String, String> ext2ctx = new MultiMap<String, String>();
    8685                for (File file : framscontext.getFiles()) {
    8786                        String ext = file.getPattern();
     
    8988                        if (file.getCode() != null) {
    9089                                for (Context context : file.getCode().getContexts()) {
    91                                         ext2ctx.put(ext, context.getName());
     90                                        ext2ctx.map(ext, context.getName());
    9291                                }
    9392                        }
     
    9695        }
    9796
    98         private Multimap<String, Type> ctx2Type(Framscript framscript) {
    99                 Multimap<String, Type> ctx2type = Multimaps.newHashMultimap();
     97        private MultiMap<String, Type> ctx2Type(Framscript framscript) {
     98                MultiMap<String, Type> ctx2type = new MultiMap<String, Type>();
    10099                for (Type type : framscript.getTypes()) {
    101                         ctx2type.put(type.getContext(), type);
     100                        ctx2type.map(type.getContext(), type);
    102101                }
    103102                return ctx2type;
Note: See TracChangeset for help on using the changeset viewer.