MCPcopy Create free account
hub / github.com/OpenSourcePhysics/osp / toString

Method toString

src/org/opensourcephysics/tools/LaunchNode.java:252–269  ·  view source on GitHub ↗

Returns a string used as a display name for this node. @return the string name of this node

()

Source from the content-addressed store, hash-verified

250 * @return the string name of this node
251 */
252 @Override
253 public String toString() {
254 // return name, if any
255 if ((name != null) && !name.equals("")) { //$NON-NLS-1$
256 return name;
257 }
258 // return launch class name, if any
259 if (launchClassName != null) {
260 return XML.getExtension(launchClassName);
261 }
262 // return args[0] name, if any
263 if (!args[0].equals("")) { //$NON-NLS-1$
264 String name = args[0];
265 name = XML.getName(name);
266 return XML.stripExtension(name);
267 }
268 return ""; //$NON-NLS-1$
269 }
270
271 /**
272 * Gets the unique ID string for this node.

Callers 6

refreshGUIMethod · 0.95
actionPerformedMethod · 0.95
handleMousePressedMethod · 0.95
addMenuItemsToMethod · 0.95
setURLMethod · 0.45
getPathStringMethod · 0.45

Calls 4

getExtensionMethod · 0.95
getNameMethod · 0.95
stripExtensionMethod · 0.95
equalsMethod · 0.65

Tested by

no test coverage detected