public class Start extends Object
Constructor and Description |
---|
Start() |
Modifier and Type | Method and Description |
---|---|
static void |
_setClosingWindow(Window owner,
boolean on)
Changes the state of closing window.
|
static void |
activateAutoSave()
Just activation of the auto-save, no save-setting, from Eclipse.
|
static void |
activateTerminalWindow()
Show terminal window using JNI call from Eclipse, forcing
the foreground window to be set.
|
static boolean |
checkEnabledNoDialogs()
Checks if the menu bar is enabled and no dialog boxes are present
before performing a function.
|
protected static String |
checkJavaVersion()
Checks the Java version and platform.
|
static int |
closeProject(boolean askJavaFirst)
Closes the application, asks Java first or not, depending if the call is from JNI or not.
|
static String |
compileDistribution(int fromPart)
Compiles the distribution.
|
static void |
configureApplication()
Call from JNI requesting configure application.
|
static void |
configureJavaRuntime()
Call from JNI requesting configure Java.
|
static boolean |
configureProject(boolean fromPanelPart)
Configures the project.
|
static int |
convertPHA(String fileName)
Converts the PHA file specified while creating a backup file.
|
static int |
convertPHE(String fileName)
Converts the PHE file specified while creating a backup file.
|
static int |
convertPHO(String fileName)
Converts the PHO file specified while creating a backup file.
|
static int |
convertPHW(String fileName)
Converts the PHW file specified while creating a backup file.
|
static int |
createObject(PhantomObject po)
Creates a new Object definition in the Panel Editor (JNI).
|
static boolean |
delete(String filePath,
boolean deleteItself,
boolean recursive,
String[] fn,
int[] count)
Deletes a file or directory, allowing recursive directory deletion.
|
static void |
destroyLaunchDialog()
Destroys a currently shown launch progress dialog box, if any.
|
static void |
displayException(Throwable t)
Prints an exception to console output and tries to output it as native debug string using JNI.
|
protected static boolean |
doesEditorAndServerLevelsMatch(int editorLevel)
This static method is called from "javaed.cpp" to match the level.
|
static boolean |
editApplicationData()
Edits the application data.
|
static void |
foregroundHWND(String hwnd)
Places a HWND in foreground using JNI.
|
protected static String |
getApplicationIniData(String section,
String item,
String def)
Get the data from the current application file.
|
protected static String |
getAvailableImages(int type)
Method called to get a list of available images for buttons and bar DLL.id.
|
static String |
getCurrentDir()
Gets the current directory when Editor started.
|
static PhantomRuntime |
getEditorParallelRuntime(ClientSession cs)
Called when the client session attempts to connect to the Editor with a Parallel Run session.
|
static int |
getHostFieldAttributes(int xy)
Gets host field attributes from a position.
|
static HostSessionManager |
getHostSessionManager()
Gets the single host session manager for the editor.
|
static boolean |
getIniData(String section,
String item,
boolean defaultValue)
Reads a string from PHANTOM.INI.
|
static int |
getIniData(String section,
String item,
int defaultValue)
Reads a string from PHANTOM.INI.
|
static String |
getIniData(String section,
String item,
String defaultValue)
Reads a string from PHANTOM.INI.
|
static String |
getInstallDir()
Gets the installation directory.
|
static String |
getProjectName()
Gets the current project name.
|
static Window |
getTopmostWindow()
Gets the topmost frame or dialog window for the Editor, used to set the owner of an AWT window.
|
static VirtualSessionManager |
getVirtualSessionManager()
Gets the VirtualSessionManager for the Editor.
|
static boolean |
hasDialogBoxes()
Checks for dialog boxes (or message boxes) present in GUI (terminal or panel parts).
|
static boolean |
hasLoadedProject()
Checks if a project is loaded.
|
static boolean |
hasPanelPartDialogBoxes()
Check if the panel part has open dialog boxes.
|
static boolean |
isAutoSave()
Checks for auto-save.
|
static boolean |
isDirectoryContainingFileExtension(File dir,
String... extensions)
Checks if a Directory contains a file with the specified extensions.
|
static boolean |
isDistributionBuilding()
Checks if project is building distribution.
|
static boolean |
isInitiated() |
static boolean |
isMainWin32Thread()
Checks if this thread is the main Win32 thread, e.g.
|
static boolean |
isReady() |
static int |
launchProcess(boolean wait,
String... cmds)
Launches a process.
|
static File[] |
listFiles(File dir)
Recursive java.io.File.listFiles.
|
protected static String |
listJavaSource(String doc)
Selects a Java source file for an object.
|
protected static String |
listREXXSource(String doc)
Selects a REXX source file for an object.
|
static void |
loadApplication(String iniFile)
Loads an INI file as the new application, typically from saved
INI files in the File menu (remembered ones).
|
static void |
logConsoleEvent(int colorIndex,
String text)
Call to log a text in the Console Output Window.
|
static void |
main(String[] args)
The main class for the Editor.
|
static int |
message(int type,
int icon,
String message)
Displays a message box.
|
static int |
message(int type,
int icon,
String message,
String title)
Displays a message box.
|
static int |
message(int type,
int icon,
String message,
String title,
Throwable exception)
Also displays a message, but with a title and an Exception (Throwable),
not displaying the stack trace unless it's an instance of Throwable.
|
static int |
message(int type,
int icon,
String message,
Throwable exception)
Also displays a message, but with an Exception (Throwable), not displaying the stack trace
unless it's an instance of Throwable.
|
static void |
onEclipseIntegrated(boolean on)
Call from Eclipse integration when connection is present.
|
static int |
onOpenType(int type,
String id,
String index)
Opens a Type () for editing in the panel editor.
|
static void |
onProgress()
Called when the progress dialog is shown to block input.
|
static int |
onRefactor(boolean isJava,
String oldName,
String newName)
Called to perform refactor of an Object source.
|
static void |
onRuntimeReloadedTerminal()
Called when the runtime has been reloaded resulting in reload of the terminal file.
|
static boolean |
openPanelPopupOrBar(String tid)
Opens a panel or pop-up in the Panel Editor.
|
static void |
openWindowsExplorer(File dir)
Opens the Windows Explorer to browse a directory.
|
static void |
outputDebugString(String arg)
Debug output string.
|
static int |
postWin32Msg()
Posts a message to the Win32 message loop causing it to return.
|
static int |
processWin32MsgLoop()
Performs message looping in Win32 main thread until a message is posted
using "postWin32Msg()".
|
static void |
reloadCurrentProject(VirtualPanel panel)
Reloads the current project files if required.
|
static void |
rememberFile(String fileName,
boolean doRemove)
Remembers (or forgets if doRemove is true) the last file for the
File menu in the panel editor.
|
protected static long |
requestDirectoryMonitorFunction0(int operation,
String dir,
long handle) |
static int |
requestJavaFunction(int function,
String param)
Call from JNI requesting an operation.
|
static int |
requestJNIFunction(int function,
String parameter)
Requests a JNI function.
|
protected static int |
requestJNIFunction0(int function,
String parameter) |
static String |
requestJNIStringFunction(int function,
int intParameter,
String parameter)
Requests a JNI string function.
|
protected static String |
requestJNIStringFunction0(int function,
int intParameter,
String parameter) |
static int |
requestOperation(int operation)
Call from JNI requesting an operation.
|
static void |
requestShutdown()
Requests a shut-down of the Java VM, closing windows, saving states, etc.
|
static String |
saveAll()
Saves all files.
|
protected static int |
setApplicationIniData(String section,
String item,
String data)
Set INI data for the current project.
|
static void |
setAutoSave(boolean on)
Sets the auto-save option.
|
static void |
setCompanyName(String company,
String licenseCode)
Sets the company name.
|
static void |
setDistributionBuilding(boolean building)
Set project distribution building state.
|
static void |
setIniData(String section,
String item,
boolean value)
Sets a string to PHANTOM.INI.
|
static void |
setIniData(String section,
String item,
int value)
Sets a string to PHANTOM.INI.
|
static void |
setIniData(String section,
String item,
String value)
Sets a string to PHANTOM.INI.
|
static void |
setLastTestedPanel(String panel)
Sets the last tested panel (null or empty string for none).
|
static void |
setWin32MainThread()
Sets the Win32 main thread used from JNI callback in CPP.
|
static void |
showConsoleOutput()
Shows the console output window.
|
protected static void |
showDocument(String doc)
Requests a display of a document from JNI.
|
static void |
showPanels()
Show panels.
|
static void |
showTerminal()
Shows the terminal window and brings it to front.
|
static int |
switchProject(String project,
int trigger)
Opens or switches to the specified project.
|
static String |
switchProjectVerbose(String project,
int trigger)
Performs switching project with verbose message as result, null for OK.
|
static void |
updateJNIMenuStates()
Updates the JNI menu states.
|
static void |
updateJNIMenuStates(boolean enablePanelPart)
Updates the JNI menu states.
|
static void |
updateMenuState()
Updates the Terminal menu states.
|
public static final int ERR_NOTFOUND
public static final int ERR_CREATE
public static final int ERR_READ
public static final int ERR_WRITE
public static final int ERR_FORMAT
public static final int ERR_OUTOFMEMORY
public static final int PE_IS_RUN_APP_ALLOWED
public static final int PE_IS_EXIT_OK
public static final int PE_IS_SAVE_ALL_ALLOWED
public static final int PE_HAS_PANEL_PART_DIALOG_BOXES
public static final int PE_IS_CREATE_CONTROLS_ALLOWED
public static final int RO_SAVE_TERMINAL_FILE
public static final int RO_RUN_APP_NORMAL
public static final int RO_RUN_APP_DEBUG
public static final int RO_UPDATE_MENU_STATE
public static final int RO_TERMINATE_CLIENT
public static final int RO_IS_TERMINATE_CLIENT_ALLOWED
public static final int RO_IS_CLOSE_APP_ALLOWED
public static final int RO_CLOSE_APP
public static final int RO_IS_RUN_APP_ALLOWED
public static final int RO_IS_TERMINAL_SAVE_FILE_REQUIRED
public static final int RO_IS_BUILD_ALLOWED
public static final int RO_BUILD
public static final int RO_IS_CONFIGURE_PROJECT_ALLOWED
public static final int RO_IS_CLEAN_ALLOWED
public static final int RO_CLEAN
public static final int RO_FILE_SYSTEM_LOCK_ENTER
public static final int RO_FILE_SYSTEM_LOCK_EXIT
public static final int RO_IS_COMPILE_DISTRIB_ALLOWED
public static final int RO_COMPILE_DISTRIB
public static final int RO_TOGGLE_BUILD_AUTOMATICALLY
public static final int RO_IS_BUILDING_AUTOMATICALLY
public static final int RO_IS_BUILDING_PROJECT
public static final int RO_RUN_BROWSER_APP
public static final int RO_IS_RUN_BROWSER_APP_ALLOWED
public static final int RO_HAS_TERMINAL_PART_DIALOGBOXES
public static final int RO_SHOW_TOPMOST_DIALOGBOX
public static final int RO_HAS_DIALOGBOX_STATE_CHANGE
public static final int RO_ACTIVATE_ECLIPSE
public static final int RO_NEW_PROJECT
public static final int RO_IMPORT_PROJECT
public static final int RO_VIEW_REFERENCES
public static final int RO_TOGGLE_REOPEN_PROJECT
public static final int RO_IMPORT_ECLIPSE_PROJECT
public static final int RO_DISPLAY_RESOLUTION
public static final int RO_SHOW_IMAGES
public static final int RO_LOCAL_WEB_SITE
public static final int RJ_OBJECT_SOURCE_CHANGE
public static final int RJ_CROSS_REFERENCE
public static final int RJ_EDIT_REXX_SOURCE
public static final int RJ_EDIT_JAVA_SOURCE
public static final int RJ_RELOAD_TEXT_FILE
public static final int RJ_SET_AUTO_SAVE
public static final int RJ_OPEN_FILE
public static final int RJ_LOG_CONSOLE
public static final int RJ_GET_PANEL_BACKGROUND
public static final int RJ_ECLIPSE_SELECT_PANEL
public static volatile boolean isEditorShutDown
public static PhantomEditor client
public static PhantomRuntime runtimeData
public static EclipseProject projectData
public static ClientSession clientSession
public static int hostIndex
public static boolean isEditor
public static JFrame terminalPartWindow
public static JFrame panelPartWindow
public static final int JF_VERSION
public static final int JF_COMPANY
public static final int JF_REMOVE_SPLASH
public static final int JF_ABOUT
public static final int JF_LOAD_PHE
public static final int JF_CLOSE_PHA
public static final int JF_UPDATE_MENU_STATE
public static final int JF_PRINT_SCREEN
public static final int JF_PRINT_SCREEN_FIELDS
public static final int JF_CREATE_CONTROLS
public static final int JF_PRINT_SCREENS
public static final int JF_SET_CURRENT_SCREEN
public static final int JF_CLOSE_PHA_DIRECT
public static final int JF_ARE_KEYS_DOWN
public static final int JF_CLOSE_PANEL_WINDOW
public static final int JF_FILE_REFRESHED
public static final int JF_SET_BUILD_OPERATION
public static final int JF_ABOUT_PROGRESS_TEXT
public static final int JF_SET_LAST_TESTED_PANEL
public static final int JF_SET_PROJECT_NAME
public static final int JF_INITIALIZE
public static final int JF_UNINITIALIZE
public static final int JF_ISINITIALIZE
public static final int JF_SET_AUTO_SAVE
public static final int JF_ECLIPSE_INTEGRATED
public static final int JF_DISPLAY_CHANGED
public static final int JF_SET_REOPEN_PROJECT
public static final int JF_OPEN_PANEL_POPUP
public static final int JF_CREATE_OBJECT
public static final int JF_SHOW_TERMINAL_ECLIPSE
public static final int JF_FOREGROUND_HWND
public static final int JF_EDIT_APPLICATION_DATA
public static final int JF_REFACTOR
public static final int JF_OPEN_TYPE
public static final int JSF_GET_INSTALL_DIR
protected static final int DIRECTORY_MONITOR_START
protected static final int DIRECTORY_MONITOR_WAIT
protected static final int DIRECTORY_MONITOR_STOP
public static boolean doVerboseAutoBuild
public static boolean isSwitchingProject
protected static boolean doesEditorAndServerLevelsMatch(int editorLevel)
Please note that this method is called from the Editor C++ code using JNI!
editorLevel
- The code level of the Editor compiled Win32 code.protected static final String checkJavaVersion()
Platform Windows versions up to 10 and Java 8 to 17, Oracle JDK, OpenJDK Eclipse Adoptium (Temurin) or Azul are only supported.
public static void main(String[] args)
args
- The starting arguments.public static boolean isInitiated()
public static boolean isReady()
public static HostSessionManager getHostSessionManager()
public static VirtualSessionManager getVirtualSessionManager()
public static void showConsoleOutput()
public static String getIniData(String section, String item, String defaultValue)
public static int getIniData(String section, String item, int defaultValue)
public static boolean getIniData(String section, String item, boolean defaultValue)
public static void setIniData(String section, String item, String value)
public static void setIniData(String section, String item, int value)
public static void setIniData(String section, String item, boolean value)
public static boolean isDistributionBuilding()
public static void setDistributionBuilding(boolean building)
public static void requestShutdown()
public static void displayException(Throwable t)
public static void outputDebugString(String arg)
public static void showTerminal()
public static void showPanels()
public static int convertPHE(String fileName)
public static int convertPHA(String fileName)
public static int convertPHO(String fileName)
public static int convertPHW(String fileName)
public static void rememberFile(String fileName, boolean doRemove)
public static boolean isMainWin32Thread()
public static int processWin32MsgLoop()
public static int postWin32Msg()
public static void setWin32MainThread()
public static int requestOperation(int operation)
public static int closeProject(boolean askJavaFirst)
public static void updateMenuState()
public static boolean checkEnabledNoDialogs()
public static void configureJavaRuntime()
public static void configureApplication()
public static boolean configureProject(boolean fromPanelPart)
fromPanelPart
- Indicates from panel part or terminal part.public static void loadApplication(String iniFile)
public static int message(int type, int icon, String message)
Type:
1 Message with Cancel button. 2 Message with OK button. 3 Message with OK/Cancel question. 4 Message with Enter button. 5 Message with Enter/Cancel question. 6 Message with Yes/No question. 7 Message with Yes/No/Cancel question. 8 Message with Retry/Cancel question. 9 Message with Retry/Ignore/Cancel question.Icon:
1 No icon 2 Information code 3 Question mark 4 Warning code 5 Stop codeReturn value:
0 Incorrect parameters. 1 Response: Cancel. 2 Response: OK. 3 Response: Enter. 4 Response: Yes. 5 Response: No. 6 Response: Retry. 7 Response: Ignore.
public static int message(int type, int icon, String message, String title)
Type:
1 Message with Cancel button. 2 Message with OK button. 3 Message with OK/Cancel question. 4 Message with Enter button. 5 Message with Enter/Cancel question. 6 Message with Yes/No question. 7 Message with Yes/No/Cancel question. 8 Message with Retry/Cancel question. 9 Message with Retry/Ignore/Cancel question.Icon:
1 No icon 2 Information code 3 Question mark 4 Warning code 5 Stop codeReturn value:
0 Incorrect parameters. 1 Response: Cancel. 2 Response: OK. 3 Response: Enter. 4 Response: Yes. 5 Response: No. 6 Response: Retry. 7 Response: Ignore.
public static int message(int type, int icon, String message, Throwable exception)
public static int message(int type, int icon, String message, String title, Throwable exception)
public static int requestJNIFunction(int function, String parameter)
The functions are
JF_VERSION 0 version number and build JF_COMPANY 1 company name for about box JF_REMOVE_SPLASH 2 removes the splash screen (parameter=null) JF_ABOUT 3 displays the about box (parameter=null) JF_LOAD_PHE 4 loads the specified PHE file JF_CLOSE_PHA 5 closes the panels and the PHA file JF_UPDATE_MENU_STATE 6 updates the menu state (Java menus are not updated) JF_PRINT_SCREEN 7 print the PhantomHostScreen with specified name JF_PRINT_SCREEN_FIELDS 8 print the PhantomHostScreen with specified name with fields JF_CREATE_CONTROLS 9 create controls JF_PRINT_SCREENS 10 print the listing of all screens JF_SET_CURRENT_SCREEN 11 sets the current screen name JF_CLOSE_PHA_DIRECT 12 closes the PHA file without save JF_ARE_KEYS_DOWN 13 checks if Shift+Control+Alt keys are down JF_CLOSE_PANEL_WINDOW 14 closes the panel editor window free 15-17 JF_SET_BUILD_OPERATION 18 Sets the current build operation JF_ABOUT_PROGRESS_TEXT 19 Sets the about progress text JF_SET_LAST_TESTED_PANEL 20 The last tested panel JF_SET_PROJECT_NAME 21 Sets the project name in the panel part JF_INITIALIZE 22 Initialize the editor in the registry JF_UNINITIALIZE 23 Initialize the editor in the registry JF_ISINITIALIZE 24 Check if the editor has been initialized in the registry JF_SET_AUTO_SAVE 25 Set auto save on/off. JF_ECLIPSE_INTEGRATED 26 Informs that Eclipse is integrated/connected. free 27 JF_SET_REOPEN_PROJECT 28 Sets the reopen last project flag. JF_OPEN_PANEL_POPUP 29 Open panel or pop-up menu. JF_CREATE_OBJECT 30 Creates a new Object. JF_SHOW_TERMINAL_ECLIPSE 31 Shows the terminal window from Eclipse. JF_UNDO_DISPLAY_RESOLUTION 32 Undo for Display resolution. JF_REDO_DISPLAY_RESOLUTION 33 Redo for Display resolution.
protected static int requestJNIFunction0(int function, String parameter)
public static String requestJNIStringFunction(int function, int intParameter, String parameter)
The functions are:
JSF_GET_INSTALL_DIR 0 get installation directory
protected static String requestJNIStringFunction0(int function, int intParameter, String parameter)
public static void setLastTestedPanel(String panel)
public static void updateJNIMenuStates()
public static void updateJNIMenuStates(boolean enablePanelPart)
public static void setCompanyName(String company, String licenseCode)
public static boolean hasLoadedProject()
public static String compileDistribution(int fromPart)
fromPart
- 0=terminal, 1=panel, 2=Eclipse.public static int getHostFieldAttributes(int xy)
public static boolean hasPanelPartDialogBoxes()
protected static long requestDirectoryMonitorFunction0(int operation, String dir, long handle)
protected static void showDocument(String doc)
protected static String listJavaSource(String doc)
protected static String listREXXSource(String doc)
public static void logConsoleEvent(int colorIndex, String text)
colorIndex is:
STDERR_COLOR 0 STDOUT_COLOR 1 OTHER_COLOR 2 APPLICATION_COLOR 3 EXTERNAL_STDERR 4 EXTERNAL_STDOUT 5 LOG_INFORMATIONAL 6 LOG_WARNING 7 LOG_ERROR 8 LOG_CRITICAL 9
public static int requestJavaFunction(int function, String param)
function
- the function to execute (a RJ_* value).param
- a String or null depending on the function requested.public static void _setClosingWindow(Window owner, boolean on)
public static boolean delete(String filePath, boolean deleteItself, boolean recursive, String[] fn, int[] count)
public static File[] listFiles(File dir)
dir
- The directory to list files in.public static boolean isDirectoryContainingFileExtension(File dir, String... extensions)
dir
- The directory to search file in.extensions
- The file extensions (including the ".").public static void destroyLaunchDialog()
public static String getInstallDir()
public static String getCurrentDir()
public static boolean isAutoSave()
public static void activateAutoSave()
public static void setAutoSave(boolean on)
public static boolean hasDialogBoxes()
public static int switchProject(String project, int trigger)
project
- File or directory.trigger
- 0=terminal, 1=panel part, 2=Eclipse.public static String switchProjectVerbose(String project, int trigger)
public static void onEclipseIntegrated(boolean on)
public static String getProjectName()
public static boolean openPanelPopupOrBar(String tid)
tid
- The ID prefixed with "W" for panel, "O" for pop-up or "B" for bar.public static int createObject(PhantomObject po)
public static void activateTerminalWindow()
public static void foregroundHWND(String hwnd)
hwnd
- The Win32 window handle (long in String).public static boolean editApplicationData()
public static int launchProcess(boolean wait, String... cmds)
public static PhantomRuntime getEditorParallelRuntime(ClientSession cs)
public static void onRuntimeReloadedTerminal()
public static int onRefactor(boolean isJava, String oldName, String newName)
public static int onOpenType(int type, String id, String index)
type
- The type, INetPhantomEclipseConstants.TYPE_*.id
- The ID of the type.index
- The index for the type in it's parent, -1 for none.public static String saveAll()
protected static String getAvailableImages(int type)
public static void reloadCurrentProject(VirtualPanel panel)
panel
- The panel, null for none.protected static int setApplicationIniData(String section, String item, String data)
section
- Section in INI file.item
- Item in INI file.data
- Data to set.protected static String getApplicationIniData(String section, String item, String def)
section
- Section in INI file.item
- Item in INI file.def
- Default data.public static void onProgress()
public static Window getTopmostWindow()
public static void openWindowsExplorer(File dir)
Phantom® and NetPhantom® are registered trademarks of Mindus SARL.
© © Mindus SARL, 2024. All rights reserved.