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

167
LINES

< > BotCompany Repo | #1031187 // Compact Module Include v5 (LIVE for new code using cmodule5)

JavaX fragment (include)

lib 1031186 // Loadable Utils v5

set flag PublicExceptTopClass. // so we can override methods
set flag CleanImports.

!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.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.ItIt;
import loadableUtils.utils.IFieldIndex;
import loadableUtils.utils.ImageSurfaceSelector;
//import loadableUtils.utils.Cache; // because often used with string function references
import loadableUtils.utils.SimpleCRUD;
import loadableUtils.utils.Swingable;
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;
import loadableUtils.utils.WidthAndHeight;

// 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 #1029928

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, ekrmjmnbrukm, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt, wnsclhtenguj

No comments. add comment

Snippet ID: #1031187
Snippet name: Compact Module Include v5 (LIVE for new code using cmodule5)
Eternal ID of this version: #1031187/9
Text MD5: 235247028e254ff1b5ea5a3874750f22
Author: stefan
Category: javax / stefan's os
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-10-16 17:03:55
Source code size: 7065 bytes / 167 lines
Pitched / IR pitched: No / No
Views / Downloads: 113 / 1382
Version history: 8 change(s)
Referenced in: [show references]