Skip to content

moschinski/MondShell

Repository files navigation

Mondshell

Rationale

The MondShell is a plugin for Eclipse. The developement started as part of the 3rd Eclipse Hackathon in Dresden (April 20th, 2013). The plugin enhances the OSGi host console of Eclpse with additional commands. Unlike other shell plugins for Eclipse (such as Terminal plug-in for Eclipse), it does not bring OS shell capabilities to Eclipse. Rather, it brings about commands that should make developer's work more convenient.

Update Site

You can find the current build (0.5.0.20141025) under: http://update.mondshell.fastmail.fm Commands

  • refresh projectName1 projectName2 projectNameX - refreshes the given projects, if none is given, the whole Eclipse workspace is refreshed
  • match [-options] input regex - checks whether the input matches the given regular expression
    • options:
      • -part - the regex does not need to match the whole input
      • -groups - shows the matched groups if there are any given in the regex
      • -flags - let you define regex flags, currently supported are insensitive and canon (if you want to state both, you have to separate the by a comma, e.g., -flags insensitive,canon
  • encode [-options] encodingType stringToEncode - let you encode the given stringToEncode using the URL, Base64 or HTML encoding
    • options:
      • -charset charsetToUse - defines the charset to use for the encoding, the default is UTF-8
    • encodingType:
      • html - the stringToEncode is encoded using HTML encoding
      • base64 - the stringToEncode is encoded using Base64 encoding
      • url - the stringToEncode is encoded using URL encoding
  • decode [-options] decodingType stringToDecode - let you decode the given stringToDecode using the URL or Base64 decoding
    • options:
      • -charset charsetToUse - defines the charset to use for the decoding, the default is UTF-8
    • decodingType:
      • base64 - the stringToDecode is decoded using Base64 decoding
      • url - the stringToDecode is decoded using URL decoding
  • format dataType stringOrPath - let you format XML or JSON documents into a human readable form
    • dataType:
      • XML: the data type of the the given stringOrPath is XML
      • JSON: the data type of the the given stringOrPath is JSON
    • stringOrPath: let you pass an unformatted XML or JSON string or a path to a document that contains XML/JSON
  • random [randomType] - generates a random value depending on the randomType, if no randomType is given a random integer number is generated
    • randomType:
      • uuid: generates a random UUID
      • double: creates a random double number between 0.0 (inclusive) and 1.0 (exclusive)
      • int: (from JavaDoc) Returns the next pseudorandom, uniformly distributed int value from this random number generator's sequence. The general contract of nextInt is that one int value is pseudorandomly generated and returned. All 232 possible int values are produced with (approximately) equal probability.
  • portuse portNumber - Finds the process that uses the given portNumber and returns the name and the ID of the process (currently Windows only!)
  • freeport portNumber - Finds the process that uses the given portNumber and tries to kill this process (currently Windows only!)
  • kill PID - Tries to kill the process with the given PID (currently Windows only!)
### Custom Output By default the output of the commands (if any) is written to the OSGi console. However, using \> pathToFile at the end of your command, you can define a file to which the output should be written. For instance, random uuid \> C:\random.txt writes the generated random UUID to the file C:\random.txt. ### Remote Access #### Telnet Because the MondShell plugin is an extension of the OSGi host console it can be accessed via telnet if Eclipse is started with the system property `-Dosgi.console=`. #### HTTP (beta) It is also possible to acccess MondShell via HTTP. This way, you can execute your commands via **POST** requests to _http://localhost:\/mondshell?cmd=\_. For example, a refresh can be triggered by a POST request to http://localhost:8080/mondshell?cmd=refresh ##### Configuration Setting the system property _net.devmond.shell.startMondshellServlet_ to `true` you can access MondShell via HTTP. Moreover, you need to configure the port of the HTTP service via the system property _org.osgi.service.http.port_. That is, given following configuration in your eclipse.ini file: ``` -Dorg.osgi.service.http.port=8080 -Dnet.devmond.shell.startMondshellServlet=true ``` the MondShell HTTP service is available on your local machine on port 8080. ### Todo * better support for *nix systems * add help texts * your proposals :)

License

The MondShell plugin is licensed under the Apache Software License 2.0.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages