Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

165
LINES

< > BotCompany Repo | #1029928 // Compact Module Include v4 (LIVE for new code using cmodule2)

JavaX fragment (include)

lib 1029927 // Loadable Utils v2

set flag PublicExceptTopClass. // so we can override methods

!include once #1020737 // global functions

do not include function dm_current_generic.
do not include function dm_current_mandatory_generic.

import loadableUtils.utils;
import static loadableUtils.utils.fail;
//import static loadableUtils.utils.print_byThread;
//import static loadableUtils.utils.print_byThread_dontCreate;
import static loadableUtils.utils._threadInfo;
import static loadableUtils.utils._threadInheritInfo;
import static loadableUtils.utils._threadInfo_addMakerAndRetriever;
import static loadableUtils.utils.dm_currentModule;
import static loadableUtils.utils.dm_current_mandatory;
import static loadableUtils.utils.match;
//import static loadableUtils.utils.getOpt; // getOpt is in x30
import static loadableUtils.utils.getOpt_raw;
//import static loadableUtils.utils.setOpt; // TODO: move to x30?
import static loadableUtils.utils.setOpt_raw;
import static loadableUtils.utils.getField;
import static loadableUtils.utils.fieldType;
import static loadableUtils.utils.format3;
import static loadableUtils.utils.vm_generalIdentityHashSet;
import static loadableUtils.utils.vm_generalHashMap;
import static loadableUtils.utils.vm_generalWeakSubMap;
import static loadableUtils.utils.bindToComponent;
import static loadableUtils.utils.struct;
import static loadableUtils.utils.structure;
import static loadableUtils.utils.loadPage;
import static loadableUtils.utils.loadPage_utf8;
import static loadableUtils.utils.loadPageSilentlyWithTimeout;
import static loadableUtils.utils.loadPageSilently;
//import static loadableUtils.utils.loadPageWithUserAgent; // TODO: fix the src lib compilation problem
import static loadableUtils.utils.loadSnippet;
import static loadableUtils.utils.loadSnippetQuietly;
import static loadableUtils.utils.sendToLocalBot;
import static loadableUtils.utils.sendToLocalBotOpt;
import static loadableUtils.utils.sendToLocalBotQuietly;
import static loadableUtils.utils.componentPopupMenu;
import static loadableUtils.utils.componentPopupMenu_top;
import static loadableUtils.utils.componentPopupMenu_initForComponent;
import static loadableUtils.utils.componentPopupMenu_getEvent;
import static loadableUtils.utils.listPopupMenu;
import static loadableUtils.utils.tablePopupMenu;
import static loadableUtils.utils.tablePopupMenuFirst;
import static loadableUtils.utils.rowSorter_setComparators;
import static loadableUtils.utils.sexyTableWithoutDrag;
import static loadableUtils.utils.dm_current_generic;
import static loadableUtils.utils.dm_current_mandatory_generic;
//import static loadableUtils.utils.cget; // it's mapMethodLike
import static loadableUtils.utils.cset;
import static loadableUtils.utils.DynamicObject_loading;
//import static loadableUtils.utils.withDBLock;
import static loadableUtils.utils.concepts_unlisted;
import static loadableUtils.utils.makePopupMenuConditional;
import static loadableUtils.utils.makeConceptsTable_idWidth;
import static loadableUtils.utils.showConceptsTable_afterUpdate;
import static loadableUtils.utils.dynamicObjectIsLoading;
import static loadableUtils.utils.rethrow;
import static loadableUtils.utils.hasBot;
//import static loadableUtils.utils.interceptPrintInThisThread;
import static loadableUtils.utils.concepts_internStringsLongerThan;
import static loadableUtils.utils.concepts_setUnlistedByDefault;
import static loadableUtils.utils.realMC_tl;

// import static loadableUtils.utils.getProgramID; // XXX - should do, but possible breaking change

//please include function programID.
!include once #1027168 // programID variable - WHY?
// XXX please include function print.

// for print-to-module
// XXX? please include function tempInterceptPrintIfNotIntercepted.

svoid _onLoad_initUtils { utils.__javax = javax(); }

import loadableUtils.utils.F0;
import loadableUtils.utils.F1;
import loadableUtils.utils.IF0;
import loadableUtils.utils.IF1;
import loadableUtils.utils.IVF1;
import loadableUtils.utils.IVF2;
import loadableUtils.utils.Matches;
import loadableUtils.utils.BetterLabel;
import loadableUtils.utils.SingleComponentPanel;
import loadableUtils.utils.Snippet;
import loadableUtils.utils.Q;
import loadableUtils.utils.ImageSurface;
import loadableUtils.utils.structure_Data;
import loadableUtils.utils.structure_ClassInfo;
import loadableUtils.utils.RGBImage;
import loadableUtils.utils.RGB;
import loadableUtils.utils.BWImage;
import loadableUtils.utils.MakesBufferedImage;
//import loadableUtils.utils.DynamicObject;
import loadableUtils.utils.MultiSet;
import loadableUtils.utils.Concept;
import loadableUtils.utils.Concepts;
import loadableUtils.utils.RC;
import loadableUtils.utils.IConceptIndex;
import loadableUtils.utils.IConceptCounter;
import loadableUtils.utils.IFieldIndex;
import loadableUtils.utils.Derefable;
import loadableUtils.utils.ImageSurfaceSelector;
//import loadableUtils.utils.Cache; // because often used with string function references
import loadableUtils.utils.SimpleCRUD;
import loadableUtils.utils.PersistableThrowable;

import loadableUtils.utils.DynModule;
import loadableUtils.utils.DynPrintLog;
import loadableUtils.utils.DynObjectTable;
import loadableUtils.utils.DynImageSurface;
import loadableUtils.utils.DynCalculatedList;
import loadableUtils.utils.GlobalID;
import loadableUtils.utils.Rect;
import loadableUtils.utils.Pt;
import loadableUtils.utils.SynchronizedArrayList;
//import loadableUtils.utils.IntRange;
//import loadableUtils.utils.LongRange;
import loadableUtils.utils.SecretValue;

svoid _onLoad_defaultClassFinder() {
  setDefaultClassFinder(new F1<S, Class>() {
    public Class get(S name) {
      Class c = findClass_fullName(name);
      if (c != null) ret c;
      if (name.startsWith("main$"))
        ret loadableUtils.utils.findClass_fullName("loadableUtils.utils" + name.substring(4));
      null;
    }
  });
}

/*svoid _onLoad_printByThread() {
  print_byThread = loadableUtils.utils.print_byThread();
}*/

meta-comment { We need these functions in main class because they may call String functions (callMC). }

//!include once #1020728 // callF + callMC + call
function callF is in #1020728.
function callMC is in #1020728.
function call is in #1020728.

!include once #1028442 // Do this always to make Concepts as module field work
//function dynamicObjectIsLoading_threadLocal is in #1028442.

!include once #1023504 // now empty

import loadableUtils.utils.HCRUD;
import loadableUtils.utils.HCRUD_Data;
import loadableUtils.utils.HCRUD_Concepts;
import loadableUtils.utils.ValueConverterForField;
import loadableUtils.utils.DefaultValueConverterForField;
import loadableUtils.utils.OrError;
import loadableUtils.utils.HTML;

// actually this will now always be included. doesn't cost much though
ifclass Concepts
please include function db_mainConcepts.
endif

Author comment

Began life as a copy of #1027167

download  show line numbers  debug dex  old transpilations   

Travelled to 5 computer(s): bhatertpkbcr, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1029928
Snippet name: Compact Module Include v4 (LIVE for new code using cmodule2)
Eternal ID of this version: #1029928/11
Text MD5: d485cc5b3207c0aa29d88fd4c01d8cf5
Author: stefan
Category: javax / stefan's os
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-06-29 02:52:29
Source code size: 7004 bytes / 165 lines
Pitched / IR pitched: No / No
Views / Downloads: 234 / 2289
Version history: 10 change(s)
Referenced in: [show references]