Examples of Library


Examples of at.bestsolution.efxclipse.formats.fxg.fxg.Library

            EClassifier classifier = FxgPackage.eINSTANCE.getEClassifier(localName);
            FXGElement element = null;

            if (classifier == null) {
              if (graphic.get_children().get(0) instanceof Library) {
                Library l = (Library) graphic.get_children().get(0);
                for (Definition d : l.get_children()) {
                  if (localName.equals(d.getName())) {
                    element = EcoreUtil.copy(d.get_children().get(0));
                    break;
                  }
                }
View Full Code Here

Examples of com.cburch.logisim.tools.Library

  public void reload(LoadedLibrary lib) {
    LibraryManager.instance.reload(this, lib);
  }
 
  public boolean save(LogisimFile file, File dest) {
    Library reference = LibraryManager.instance.findReference(file, dest);
    if (reference != null) {
      JOptionPane.showMessageDialog(parent,
          StringUtil.format(Strings.get("fileCircularError"), reference.getDisplayName()),
          Strings.get("fileSaveErrorTitle"),
          JOptionPane.ERROR_MESSAGE);
      return false;
    }
   
View Full Code Here

Examples of com.cburch.logisim.tools.Library

    if (!(Library.class.isAssignableFrom(retClass))) {
      throw new LoadFailedException(StringUtil.format(Strings.get("jarClassNotLibraryError"), className));
    }
   
    // instantiate library
    Library ret;
    try {
      ret = (Library) retClass.newInstance();
    } catch (Exception e) {
      throw new LoadFailedException(StringUtil.format(Strings.get("jarLibraryNotCreatedError"), className));
    }
View Full Code Here

Examples of com.cburch.logisim.tools.Library

    }
    return elt;
  }

  Element fromTool(Tool tool) {
    Library lib = findLibrary(tool);
    String lib_name;
    if (lib == null) {
      loader.showError(StringUtil.format("tool `%s' not found",
        tool.getDisplayName()));
      return null;
View Full Code Here

Examples of com.cburch.logisim.tools.Library

    return ret;
  }

  Element fromComponent(Component comp) {
    ComponentFactory source = comp.getFactory();
    Library lib = findLibrary(source);
    String lib_name;
    if (lib == null) {
      loader.showError(source.getName() + " component not found");
      return null;
    } else if (lib == file) {
View Full Code Here

Examples of com.cburch.logisim.tools.Library

      } else if (act == LibraryEvent.REMOVE_LIBRARY) {
        if (event.getData() instanceof LibraryEventSource) {
          ((LibraryEventSource) event.getData()).removeLibraryListener(subListener);
        }
      }
      Library lib = event.getSource();
      switch (act) {
      case LibraryEvent.DIRTY_STATE:
      case LibraryEvent.SET_NAME:
        model.fireNodesChanged(model.findPaths(lib));
        break;
View Full Code Here

Examples of com.cburch.logisim.tools.Library

    }
    String fmt = "%" + countDigits(total.getUniqueCount()) + "d\t"
      + "%" + countDigits(total.getRecursiveCount()) + "d\t";
    String fmtNormal = fmt + "%-" + maxName + "s\t%s\n";
    for (FileStatistics.Count count : stats.getCounts()) {
      Library lib = count.getLibrary();
      String libName = lib == null ? "-" : lib.getDisplayName();
      System.out.printf(fmtNormal, //OK
          Integer.valueOf(count.getUniqueCount()),
          Integer.valueOf(count.getRecursiveCount()),
          count.getFactory().getDisplayName(), libName);
    }
View Full Code Here

Examples of com.cburch.logisim.tools.Library

        sourceVersion = LogisimVersion.parse(versionString);
      }

      // first, load the sublibraries
      for (Element o : XmlIterator.forChildElements(elt, "lib")) {
        Library lib = toLibrary(o);
        if (lib != null) file.addLibrary(lib);
      }
     
      // second, create the circuits - empty for now
      List<CircuitData> circuitsData = new ArrayList<CircuitData>();
View Full Code Here

Examples of com.cburch.logisim.tools.Library

        loader.showError(Strings.get("libDescMissingError"));
        return null;
      }
      String name = elt.getAttribute("name");
      String desc = elt.getAttribute("desc");
      Library ret = loader.loadLibrary(desc);
      if (ret == null) return null;
      libs.put(name, ret);
      for (Element sub_elt : XmlIterator.forChildElements(elt, "tool")) {
        if (!sub_elt.hasAttribute("name")) {
          loader.showError(Strings.get("toolNameMissingError"));
        } else {
          String tool_str = sub_elt.getAttribute("name");
          Tool tool = ret.getTool(tool_str);
          if (tool != null) {
            try {
              initAttributeSet(sub_elt, tool.getAttributeSet(), tool);
            } catch (XmlReaderException e) {
              addErrors(e, "lib." + name + "." + tool_str);
View Full Code Here

Examples of com.cburch.logisim.tools.Library

        }
      }
    }

    Tool toTool(Element elt) throws XmlReaderException {
      Library lib = findLibrary(elt.getAttribute("lib"));
      String name = elt.getAttribute("name");
      if (name == null || name.equals("")) {
        throw new XmlReaderException(Strings.get("toolNameMissing"));
      }
      Tool tool = lib.getTool(name);
      if (tool == null) {
        throw new XmlReaderException(Strings.get("toolNotFound"));
      }
      return tool;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.