001: /*******************************************************************************
002: * Copyright (c) 2000, 2007 IBM Corporation and others.
003: * All rights reserved. This program and the accompanying materials
004: * are made available under the terms of the Eclipse Public License v1.0
005: * which accompanies this distribution, and is available at
006: * http://www.eclipse.org/legal/epl-v10.html
007: *
008: * Contributors:
009: * IBM Corporation - initial API and implementation
010: *******************************************************************************/package org.eclipse.jdt.launching;
011:
012: import org.eclipse.jdt.internal.launching.LaunchingPlugin;
013:
014: /**
015: * Constant definitions for Java launch configurations.
016: * <p>
017: * Constant definitions only; not to be implemented.
018: * </p>
019: * @since 2.0
020: */
021: public interface IJavaLaunchConfigurationConstants {
022:
023: /**
024: * Identifier for the Local Java Application launch configuration type
025: * (value <code>"org.eclipse.jdt.launching.localJavaApplication"</code>).
026: */
027: public static final String ID_JAVA_APPLICATION = LaunchingPlugin
028: .getUniqueIdentifier()
029: + ".localJavaApplication"; //$NON-NLS-1$
030:
031: /**
032: * Identifier for the Remote Java Application launch configuration type
033: * (value <code>"org.eclipse.jdt.launching.remoteJavaApplication"</code>).
034: */
035: public static final String ID_REMOTE_JAVA_APPLICATION = LaunchingPlugin
036: .getUniqueIdentifier()
037: + ".remoteJavaApplication"; //$NON-NLS-1$
038:
039: /**
040: * Identifier for the Java Applet launch configuration type
041: * (value <code>"org.eclipse.jdt.launching.javaApplet"</code>).
042: */
043: public static final String ID_JAVA_APPLET = LaunchingPlugin
044: .getUniqueIdentifier()
045: + ".javaApplet"; //$NON-NLS-1$
046:
047: /**
048: * Identifier for the standard Socket Attaching VM connector
049: * (value <code>"org.eclipse.jdt.launching.socketAttachConnector"</code>).
050: */
051: public static final String ID_SOCKET_ATTACH_VM_CONNECTOR = LaunchingPlugin
052: .getUniqueIdentifier()
053: + ".socketAttachConnector"; //$NON-NLS-1$
054:
055: /**
056: * Identifier for the standard Socket Listening VM connector
057: * (value <code>"org.eclipse.jdt.launching.socketListenConnector"</code>).
058: * @since 3.4
059: */
060: public static final String ID_SOCKET_LISTEN_VM_CONNECTOR = LaunchingPlugin
061: .getUniqueIdentifier()
062: + ".socketListenConnector"; //$NON-NLS-1$
063:
064: /**
065: * Identifier for the java process type, which is annotated on processes created
066: * by the local java application launch delegate.
067: *
068: * (value <code>"java"</code>).
069: */
070: public static final String ID_JAVA_PROCESS_TYPE = "java"; //$NON-NLS-1$
071:
072: /**
073: * Launch configuration attribute key. The value is a name of
074: * a Java project associated with a Java launch configuration.
075: */
076: public static final String ATTR_PROJECT_NAME = LaunchingPlugin
077: .getUniqueIdentifier()
078: + ".PROJECT_ATTR"; //$NON-NLS-1$
079:
080: /**
081: * Launch configuration attribute key. The value is a fully qualified name
082: * of a main type to launch.
083: */
084: public static final String ATTR_MAIN_TYPE_NAME = LaunchingPlugin
085: .getUniqueIdentifier()
086: + ".MAIN_TYPE"; //$NON-NLS-1$
087:
088: /**
089: * Launch configuration attribute key. The value is a boolean specifying
090: * whether execution should stop when main is entered. The default value
091: * is <code>false</code>.
092: *
093: * @since 2.1
094: */
095: public static final String ATTR_STOP_IN_MAIN = LaunchingPlugin
096: .getUniqueIdentifier()
097: + ".STOP_IN_MAIN"; //$NON-NLS-1$
098:
099: /**
100: * Launch configuration attribute key. The value is a string specifying
101: * program arguments for a Java launch configuration, as they should appear
102: * on the command line.
103: */
104: public static final String ATTR_PROGRAM_ARGUMENTS = LaunchingPlugin
105: .getUniqueIdentifier()
106: + ".PROGRAM_ARGUMENTS"; //$NON-NLS-1$
107:
108: /**
109: * Launch configuration attribute key. The value is a string specifying
110: * VM arguments for a Java launch configuration, as they should appear
111: * on the command line.
112: */
113: public static final String ATTR_VM_ARGUMENTS = LaunchingPlugin
114: .getUniqueIdentifier()
115: + ".VM_ARGUMENTS"; //$NON-NLS-1$
116:
117: /**
118: * Launch configuration attribute key. The value is a string specifying a
119: * path to the working directory to use when launching a local VM.
120: * When specified as an absolute path, the path represents a path in the local
121: * file system. When specified as a full path, the path represents a workspace
122: * relative path. When unspecified, the working directory defaults to the project
123: * associated with a launch configuration. When no project is associated with a
124: * launch configuration, the working directory is inherited from the current
125: * process.
126: */
127: public static final String ATTR_WORKING_DIRECTORY = LaunchingPlugin
128: .getUniqueIdentifier()
129: + ".WORKING_DIRECTORY"; //$NON-NLS-1$
130:
131: /**
132: * Launch configuration attribute key. The value is a path identifying the JRE used
133: * when launching a local VM. The path is a classpath container corresponding
134: * to the <code>JavaRuntime.JRE_CONTAINER</code> classpath container.
135: * <p>
136: * When unspecified the default JRE for a launch configuration is used (which is the
137: * JRE associated with the project being launched, or the workspace default JRE when
138: * no project is associated with a configuration). The default JRE classpath container
139: * refers explicitly to the workspace default JRE.
140: * </p>
141: * @since 3.2
142: */
143: public static final String ATTR_JRE_CONTAINER_PATH = JavaRuntime.JRE_CONTAINER;
144:
145: /**
146: * Launch configuration attribute key. The value is a name of a VM install
147: * to use when launching a local VM. This attribute must be qualified
148: * by a VM install type, via the <code>ATTR_VM_INSTALL_TYPE</code>
149: * attribute. When unspecified, the default VM is used.
150: *
151: * @deprecated use <code>ATTR_JRE_CONTAINER_PATH</code>
152: */
153: public static final String ATTR_VM_INSTALL_NAME = LaunchingPlugin
154: .getUniqueIdentifier()
155: + ".VM_INSTALL_NAME"; //$NON-NLS-1$
156:
157: /**
158: * Launch configuration attribute key. The value is an identifier of
159: * a VM install type. Used in conjunction with a VM install name, to
160: * specify the VM to use when launching a local Java application.
161: * The associated VM install name is specified via the attribute
162: * <code>ATTR_VM_INSTALL_NAME</code>.
163: *
164: * @deprecated use <code>ATTR_JRE_CONTAINER_PATH</code>
165: */
166: public static final String ATTR_VM_INSTALL_TYPE = LaunchingPlugin
167: .getUniqueIdentifier()
168: + ".VM_INSTALL_TYPE_ID"; //$NON-NLS-1$
169:
170: /**
171: * Launch configuration attribute key. The value is a Map of attributes specific
172: * to a particular VM install type, used when launching a local Java
173: * application. The map is passed to a <code>VMRunner</code> via a <code>VMRunnerConfiguration</code>
174: * when launching a VM. The attributes in the map are implementation dependent
175: * and are limited to String keys and values.
176: */
177: public static final String ATTR_VM_INSTALL_TYPE_SPECIFIC_ATTRS_MAP = LaunchingPlugin
178: .getUniqueIdentifier()
179: + "VM_INSTALL_TYPE_SPECIFIC_ATTRS_MAP"; //$NON-NLS-1$
180:
181: /**
182: * Launch configuration attribute key. The value is an identifier of
183: * a VM connector, specifying a connector to use when attaching to
184: * a remote VM.
185: */
186: public static final String ATTR_VM_CONNECTOR = LaunchingPlugin
187: .getUniqueIdentifier()
188: + ".VM_CONNECTOR_ID"; //$NON-NLS-1$
189:
190: /**
191: * Launch configuration attribute key. The attribute value is an ordered list of strings
192: * which are mementos for runtime class path entries. When unspecified, a default
193: * classpath is generated by the classpath provider associated with a launch
194: * configuration (via the <code>ATTR_CLASSPATH_PROVIDER</code> attribute).
195: */
196: public static final String ATTR_CLASSPATH = LaunchingPlugin
197: .getUniqueIdentifier()
198: + ".CLASSPATH"; //$NON-NLS-1$
199:
200: /**
201: * Launch configuration attribute key. The value is a boolean specifying
202: * whether a default classpath should be used when launching a local
203: * Java application. When <code>false</code>, a classpath must be specified
204: * via the <code>ATTR_CLASSPATH</code> attribute. When <code>true</code> or
205: * unspecified, a classpath is computed by the classpath provider associated
206: * with a launch configuration.
207: */
208: public static final String ATTR_DEFAULT_CLASSPATH = LaunchingPlugin
209: .getUniqueIdentifier()
210: + ".DEFAULT_CLASSPATH"; //$NON-NLS-1$
211:
212: /**
213: * Launch configuration attribute key. The value is an identifier of a
214: * classpath provider extension used to compute the classpath
215: * for a launch configuration. When unspecified, the default classpath
216: * provider is used - <code>StandardClasspathProvider</code>.
217: */
218: public static final String ATTR_CLASSPATH_PROVIDER = LaunchingPlugin
219: .getUniqueIdentifier()
220: + ".CLASSPATH_PROVIDER"; //$NON-NLS-1$
221:
222: /**
223: * Launch configuration attribute key. The value is an ordered list of
224: * strings which are mementos for associated runtime classpath entries
225: * interpreted as locations in which to look for source code. When unspecified,
226: * a default source lookup path is generated by the source path provider
227: * associated with a launch configurations (via the
228: * <code>ATTR_SOURCE_PATH_PROVIDER</code> attribute).
229: */
230: public static final String ATTR_SOURCE_PATH = LaunchingPlugin
231: .getUniqueIdentifier()
232: + ".SOURCE_PATH"; //$NON-NLS-1$
233:
234: /**
235: * Launch configuration attribute key. The value is a boolean specifying
236: * whether a default source lookup path should be used. When
237: * <code>false</code> a source path must be specified via the
238: * <code>ATTR_SOURCE_PATH</code> attribute. When <code>true</code> or
239: * unspecified, a source lookup path is computed by the source path
240: * provider associated with a launch configuration.
241: */
242: public static final String ATTR_DEFAULT_SOURCE_PATH = LaunchingPlugin
243: .getUniqueIdentifier()
244: + ".DEFAULT_SOURCE_PATH"; //$NON-NLS-1$
245:
246: /**
247: * Launch configuration attribute key. The value is an identifier of a
248: * source path provider extension used to compute the source lookup path
249: * for a launch configuration. When unspecified, the default source lookup
250: * path provider is used - <code>StandardSourcePathProvider</code>.
251: */
252: public static final String ATTR_SOURCE_PATH_PROVIDER = LaunchingPlugin
253: .getUniqueIdentifier()
254: + ".SOURCE_PATH_PROVIDER"; //$NON-NLS-1$
255:
256: /**
257: * Launch configuration attribute key. The value is a boolean, indicating
258: * whether a VM will support/allow the terminate action.
259: * This attribute is used for remote debugging.
260: */
261: public static final String ATTR_ALLOW_TERMINATE = LaunchingPlugin
262: .getUniqueIdentifier()
263: + ".ALLOW_TERMINATE"; //$NON-NLS-1$
264:
265: /**
266: * Attribute key for VM specific attributes found in the
267: * <code>ATTR_VM_INSTALL_TYPE_SPECIFIC_ATTRS_MAP</code>. The value is a String,
268: * indicating the String to use to invoke the JRE.
269: */
270: public static final String ATTR_JAVA_COMMAND = LaunchingPlugin
271: .getUniqueIdentifier()
272: + ".JAVA_COMMAND"; //$NON-NLS-1$
273:
274: /**
275: * Launch configuration attribute key. The value is
276: * a map. Keys in the map correspond to arguments names
277: * returned by <code>IVMConnector#getDefaultArguments()</code>.
278: * Values are strings corresponding to the values to use when
279: * establishing a connection to a remote VM.
280: */
281: public static final String ATTR_CONNECT_MAP = LaunchingPlugin
282: .getUniqueIdentifier()
283: + ".CONNECT_MAP"; //$NON-NLS-1$
284:
285: /**
286: * Launch configuration attribute key. The value is an integer
287: * indicating the width of the applet viewing area.
288: *
289: * @since 2.1
290: */
291: public static final String ATTR_APPLET_WIDTH = LaunchingPlugin
292: .getUniqueIdentifier()
293: + ".APPLET_WIDTH"; //$NON-NLS-1$
294:
295: /**
296: * Launch configuration attribute key. The value is an integer
297: * indicating the height of the applet viewing area.
298: *
299: * @since 2.1
300: */
301: public static final String ATTR_APPLET_HEIGHT = LaunchingPlugin
302: .getUniqueIdentifier()
303: + ".APPLET_HEIGHT"; //$NON-NLS-1$
304:
305: /**
306: * Launch configuration attribute key. The value is a String indicating the
307: * HTML name of the applet.
308: *
309: * @since 2.1
310: */
311: public static final String ATTR_APPLET_NAME = LaunchingPlugin
312: .getUniqueIdentifier()
313: + ".APPLET_NAME"; //$NON-NLS-1$
314:
315: /**
316: * Launch configuration attribute key. The value is a Map. Keys in the map
317: * represent applet parameter names and the values in the map are the
318: * corresponding parameter values
319: *
320: * @since 2.1
321: */
322: public static final String ATTR_APPLET_PARAMETERS = LaunchingPlugin
323: .getUniqueIdentifier()
324: + ".APPLET_PARAMETERS"; //$NON-NLS-1$
325:
326: /**
327: * Launch configuration attribute key. The value is a String indicating the
328: * fully qualified name of the applet viewer utility class to use.
329: *
330: * @since 2.1
331: */
332: public static final String ATTR_APPLET_APPLETVIEWER_CLASS = LaunchingPlugin
333: .getUniqueIdentifier()
334: + ".APPLET_APPLETVIEWER_CLASS"; //$NON-NLS-1$
335:
336: /**
337: * Attribute key for a VM specific argument. Value is an array
338: * of strings describing paths in the local file system that
339: * should be prepended to the bootpath, or <code>null</code>
340: * if none. The value is computed dynamically at launch time
341: * and placed in the VM specific arguments map by the Java
342: * application launch delegate.
343: *
344: * @since 3.0
345: */
346: public static final String ATTR_BOOTPATH_PREPEND = LaunchingPlugin
347: .getUniqueIdentifier()
348: + ".-Xbootclasspath/p:"; //$NON-NLS-1$
349:
350: /**
351: * Attribute key for a VM specific argument. Value is an array
352: * of strings describing paths in the local file system that
353: * should be placed on the bootpath explicitly, or <code>null</code>
354: * if none. The value is computed dynamically at launch time
355: * and placed in the VM specific arguments map by the Java
356: * application launch delegate.
357: *
358: * @since 3.0
359: */
360: public static final String ATTR_BOOTPATH = LaunchingPlugin
361: .getUniqueIdentifier()
362: + ".-Xbootclasspath:"; //$NON-NLS-1$
363:
364: /**
365: * Attribute key for a VM specific argument. Value is an array
366: * of strings describing paths in the local file system that
367: * should be appended to the bootpath, or <code>null</code>
368: * if none. The value is computed dynamically at launch time
369: * and placed in the VM specific arguments map by the Java
370: * application launch delegate.
371: *
372: * @since 3.0
373: */
374: public static final String ATTR_BOOTPATH_APPEND = LaunchingPlugin
375: .getUniqueIdentifier()
376: + ".-Xbootclasspath/a:"; //$NON-NLS-1$
377:
378: /**
379: * Status code indicating a launch configuration does not
380: * specify a project when a project is required.
381: */
382: public static final int ERR_UNSPECIFIED_PROJECT = 100;
383:
384: /**
385: * Status code indicating a launch configuration does not
386: * specify a main type to launch.
387: */
388: public static final int ERR_UNSPECIFIED_MAIN_TYPE = 101;
389:
390: /**
391: * Status code indicating a launch configuration does not
392: * specify a VM Install Type.
393: */
394: public static final int ERR_UNSPECIFIED_VM_INSTALL_TYPE = 102;
395:
396: /**
397: * Status code indicating a launch configuration does not
398: * specify a VM Install
399: */
400: public static final int ERR_UNSPECIFIED_VM_INSTALL = 103;
401:
402: /**
403: * Status code indicating a launch configuration's VM install
404: * type could not be found.
405: */
406: public static final int ERR_VM_INSTALL_TYPE_DOES_NOT_EXIST = 104;
407:
408: /**
409: * Status code indicating a launch configuration's VM install
410: * could not be found.
411: */
412: public static final int ERR_VM_INSTALL_DOES_NOT_EXIST = 105;
413:
414: /**
415: * Status code indicating a VM runner could not be located
416: * for the VM install specified by a launch configuration.
417: */
418: public static final int ERR_VM_RUNNER_DOES_NOT_EXIST = 106;
419:
420: /**
421: * Status code indicating the project associated with
422: * a launch configuration is not a Java project.
423: */
424: public static final int ERR_NOT_A_JAVA_PROJECT = 107;
425:
426: /**
427: * Status code indicating the specified working directory
428: * does not exist.
429: */
430: public static final int ERR_WORKING_DIRECTORY_DOES_NOT_EXIST = 108;
431:
432: /**
433: * Status code indicating a launch configuration does not
434: * specify a host name value
435: */
436: public static final int ERR_UNSPECIFIED_HOSTNAME = 109;
437:
438: /**
439: * Status code indicating a launch configuration has
440: * specified an invalid host name attribute
441: */
442: public static final int ERR_INVALID_HOSTNAME = 110;
443:
444: /**
445: * Status code indicating a launch configuration does not
446: * specify a port number value
447: */
448: public static final int ERR_UNSPECIFIED_PORT = 111;
449:
450: /**
451: * Status code indicating a launch configuration has
452: * specified an invalid port number attribute
453: */
454: public static final int ERR_INVALID_PORT = 112;
455:
456: /**
457: * Status code indicating an attempt to connect to a remote VM
458: * has failed or an attempt to listen for a remote VM connecting
459: * has failed.
460: */
461: public static final int ERR_REMOTE_VM_CONNECTION_FAILED = 113;
462:
463: /**
464: * Status code indicating that the shared memory attach or listen
465: * connector could not be found.
466: */
467: public static final int ERR_SHARED_MEMORY_CONNECTOR_UNAVAILABLE = 114;
468:
469: /**
470: * Status code indicating that the Eclipse runtime does not support
471: * launching a program with a working directory. This feature is only
472: * available if Eclipse is run on a 1.3 runtime or higher.
473: * <p>
474: * A status handler may be registered for this error condition,
475: * and should return a Boolean indicating whether the program
476: * should be relaunched with the default working directory.
477: * </p>
478: */
479: public static final int ERR_WORKING_DIRECTORY_NOT_SUPPORTED = 115;
480:
481: /**
482: * Status code indicating that an error occurred launching a VM.
483: * The status error message is the text that
484: * the VM wrote to standard error before exiting.
485: */
486: public static final int ERR_VM_LAUNCH_ERROR = 116;
487:
488: /**
489: * Status code indicating that a timeout has occurred waiting for
490: * the VM to connect with the debugger.
491: * <p>
492: * A status handler may be registered for this error condition,
493: * and should return a Boolean indicating whether the program
494: * should continue waiting for a connection for the associated
495: * timeout period.
496: * </p>
497: */
498: public static final int ERR_VM_CONNECT_TIMEOUT = 117;
499:
500: /**
501: * Status code indicating that a free socket was not available to
502: * communicate with the VM.
503: */
504: public static final int ERR_NO_SOCKET_AVAILABLE = 118;
505:
506: /**
507: * Status code indicating that the JDI connector required for a
508: * debug launch was not available.
509: */
510: public static final int ERR_CONNECTOR_NOT_AVAILABLE = 119;
511:
512: /**
513: * Status code indicating that the debugger failed to connect
514: * to the VM.
515: */
516: public static final int ERR_CONNECTION_FAILED = 120;
517:
518: /**
519: * Status code indicating that the applet launcher was asked to
520: * launch a resource that did not extend <code>java.applet.Applet</code>.
521: *
522: * @since 2.1
523: */
524: public static final int ERR_NOT_AN_APPLET = 121;
525:
526: /**
527: * Status code indicating that no launch configuration was specified.
528: *
529: * @since 2.1
530: */
531: public static final int ERR_UNSPECIFIED_LAUNCH_CONFIG = 122;
532:
533: /**
534: * Status code indicating that the .html file used to initiate an applet
535: * launch could not be built.
536: *
537: * @since 2.1
538: */
539: public static final int ERR_COULD_NOT_BUILD_HTML = 123;
540:
541: /**
542: * Status code indicating that the project referenced by a launch configuration
543: * is closed.
544: *
545: * @since 3.0
546: */
547: public static final int ERR_PROJECT_CLOSED = 124;
548:
549: /**
550: * Status code indicating an unexpected internal error.
551: */
552: public static final int ERR_INTERNAL_ERROR = 150;
553:
554: /**
555: * Default value for the 'ATTR_APPLET_APPLETVIEWER' attribute.
556: *
557: * @since 2.1
558: */
559: public static final String DEFAULT_APPLETVIEWER_CLASS = "sun.applet.AppletViewer"; //$NON-NLS-1$
560:
561: /**
562: * Detail code for a custom debug event that is fired when a remote debug configuration with
563: * a standard socket listen connector is ready to accept connections from a remote VM.
564: *
565: * @since 3.4
566: * @see org.eclipse.jdt.internal.launching.SocketListenConnector
567: * @see org.eclipse.jdt.internal.launching.SocketListenConnectorProcess
568: */
569: public static final int DETAIL_CONFIG_READY_TO_ACCEPT_REMOTE_VM_CONNECTION = 1001;
570: }
|