/** @return */
  public List<Option> getOptions() {
    LinkedList<Option> opts = new LinkedList<Option>();

    // Add the name field
    opts.add(new Option(new JLabel("Name"), name = JUtils.textField(ourNode.getName())));

    // Add the query area
    opts.add(new Option(new JLabel("Query"), query = JUtils.textArea(ourNode.getQuery())));

    return opts;
  }
Example #2
0
 public Object exe(Object... args) {
   JUtils.LOG("-------");
   for (Object arg : args) {
     JUtils.LOG("arg=" + arg);
   }
   JUtils.LOG("method=" + method);
   try {
     return this.method.invoke(null, args);
   } catch (InvocationTargetException e) {
     e.printStackTrace();
     throw new UnsupportedOperationException(toString());
   } catch (IllegalArgumentException e) {
     e.printStackTrace();
     throw new UnsupportedOperationException(toString());
   } catch (IllegalAccessException e) {
     e.printStackTrace();
     throw new UnsupportedOperationException(toString());
   }
 }
Example #3
0
 public List<AnalyzedMessage> getMessages(int offset, int length) {
   List<AnalyzedMessage> list = new ArrayList<>();
   for (int i = 0; i < rootMessageStyleNodes.size(); i++) {
     StyleNode node = rootMessageStyleNodes.get(i);
     if (JUtils.intersects(offset, length, node.getOffset(), node.getLength())) {
       list.add(messages.get(i));
     }
   }
   return list;
 }
Example #4
0
 private CFunctionImpl(Class codingClass, String name) {
   this.codingClass = codingClass;
   this.name = name;
   for (Method m : codingClass.getMethods()) {
     if (m.getName().equals(name)) {
       this.method = m;
       return;
     }
   }
   JUtils.LOG("CANNOT FIND METHOD " + name + " IN " + codingClass);
   throw new IllegalStateException("codingClass=" + codingClass + " name=" + name);
 }
Example #5
0
 public __ptr__ addVirtualBytes(int bytes) {
   JUtils.LOG("CString::addVirtualBytes " + bytes);
   JUtils.LOG("AM " + this);
   if (bytes < 0) {
     OFFSET offset = OFFSET.fromInt(-bytes);
     JUtils.LOG("offset=" + offset);
     for (__ptr__ f : fathers) {
       JUtils.LOG("f=" + f);
       if (f instanceof StarStruct && ((StarStruct) f).getRealClass() == offset.getTheClass()) {
         JUtils.LOG("FOUND1!!");
         if (f.getPtr(offset.getField()).equals(this)) {
           JUtils.LOG("FOUND2!!");
           return f;
         }
       }
     }
   } else {
     JUtils.LOG("father=" + fathers);
     JUtils.LOG("CString created on the following place:");
     creation.printStackTrace();
   }
   throw new UnsupportedOperationException();
 }
Example #6
0
 public void setMyFather(__ptr__ struct) {
   if (this.toString().equals("black(0)")) {
     JUtils.LOG("CString::setMyFather " + this + "  " + fathers.size());
   }
   this.fathers.add(struct);
 }
 /** @return */
 public String getQuery() {
   return JUtils.taText(query);
 }